Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MPI-Dortmund
sphire
eman2mirror
Commits
36b8c944
Commit
36b8c944
authored
Jun 27, 2022
by
shadow_walker
Browse files
Merge branch 'read-image'
parents
0c129aa2
764e7a69
Changes
2
Hide whitespace changes
Inline
Side-by-side
libpyEM/EMAN2.py
View file @
36b8c944
...
...
@@ -2977,6 +2977,15 @@ def db_read_image(self, fsp, *parms, **kparms):
#if lsxcache==None or lsxcache.path!=fsp: lsxcache=LSXFile(fsp,True)
#return lsxcache.read_image(parms[0])
fsp
,
idxs
=
parse_infile_arg
(
fsp
)
if
len
(
parms
)
>
0
and
parms
[
0
]:
idx
=
idxs
[
parms
[
0
]]
else
:
idx
=
idxs
[
0
]
parms
=
idx
,
*
parms
[
1
:]
if
len
(
kparms
)
!=
0
:
if
'img_index'
not
in
kparms
:
kparms
[
'img_index'
]
=
0
...
...
rt/pyem/test_imageio.py
View file @
36b8c944
...
...
@@ -354,20 +354,6 @@ class TestSpiderIO(ImageIOTester):
e
.
process_inplace
(
'testimage.sinewave'
,
{
'wavelength'
:
20
})
e
.
set_attr
(
'SPIDER.title'
,
'The fourth image in the stack'
)
e
.
write_image
(
'test.spi'
,
3
)
f
=
EMData
()
#read the overall herder
f
.
read_image
(
'test.spi'
,
-
1
,
True
)
d
=
f
.
get_attr_dict
()
img_num
=
d
[
'SPIDER.maxim'
]
#read the individual image from a stack
for
i
in
range
(
img_num
):
f
.
read_image
(
'test.spi'
,
i
)
self
.
assertEqual
(
f
.
is_complex
(),
False
)
self
.
assertEqual
(
f
.
get_xsize
(),
100
)
self
.
assertEqual
(
f
.
get_ysize
(),
100
)
self
.
assertEqual
(
f
.
get_zsize
(),
1
)
finally
:
testlib
.
safe_unlink
(
'test.spi'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment