Hi Steve,
I am not sure about the specifics of this case. I came across a
situation yesterday trying to open an image exported from the viewer in
EPU. I tried opening it with e2display.py and got the error messages
pasted below. I faced a similar problem when trying to open the image
with IMOD. I checked the size of the image and header and it seemed OK.
I then tried opening the image in Chimera and it worked, saved it to a
new file and I was able to open it in both IMOD and EMAN2. The image is
too large to attach to this message, you can download it from
https://www.dropbox.com/s/hj8ezrs6sm2mllt/grid1_001.mrc?dl=0.
Thanks!
Mario
Here is the error:
> e2display.py grid1_001.mrc
Reached premature end-of-file reading region from image/slice number 0
of file with 33555456 bytes.
Traceback (most recent call last):
File "/usr/local/EMAN2-20160603/bin/e2display.py", line 295, in <module>
main()
File "/usr/local/EMAN2-20160603/bin/e2display.py", line 127, in main
display_file(i,app,options.singleimage,usescenegraph=options.newwidget)
File "/usr/local/EMAN2-20160603/bin/e2display.py", line 229, in
display_file
w = EMWidgetFromFile(filename,application=app,force_2d=force_2d)
File "/usr/local/EMAN2-20160603/lib/emimage.py", line 206, in __new__
data = [EMData(filename,0)]
File "/usr/local/EMAN2-20160603/lib/EMAN2db.py", line 380, in db_emd_init
self.__initc(*parms)
RuntimeError: ImageReadException at
/build/co/eman2.daily/libEM/emutil.cpp:1160: error with
'Unknownfilename': 'incomplete data read' caught
On 06/07/2016 05:46 PM, Steve Ludtke wrote:
> Not sure what situation you are contending with which would require
> this? The only situations I can think of where I have ever
> encountered a corrupt MRC file were A) when the disk became full
> during writing, B) a program was killed in the middle of writing a
> file or C) an incomplete file transfer.
>
> I am not aware of any cryoEM image processing pipeline which does
> "prevalidation" of input images. If you have a bad image file, then
> the actual process fails. There is little point in detecting it in
> advance, since if you have a bad image file, there is no way you could
> recover automatically anyway. Does that make sense?
>
> Anyway, if you want to detect whether an image file is readable, you can:
>
> e2iminfo.py -s y.mrc
>
> which will fail if the file is corrupt. If it is a stack file and you
> wish to check all of the images, you could
>
> e2iminfo.py -as y.mrcs
>
> ----------------------------------------------------------------------------
> Steven Ludtke, Ph.D.
> Professor, Dept. of Biochemistry and Mol. Biol. Those
> who do
> Co-Director National Center For Macromolecular Imaging ARE
> Baylor College of Medicine The
> converse
>
slu...@bcm.edu <mailto:
slu...@bcm.edu> -or-
>
ste...@alumni.caltech.edu <mailto:
ste...@alumni.caltech.edu>
> also applies
>
http://ncmi.bcm.edu/~stevel <
http://ncmi.bcm.edu/%7Estevel>
>> <mailto:
lil...@umich.edu>> wrote:
>>
>> Hello,
>>
>> This is not specific to EMAN2, but does affect the program suite
>> along with every other cryo-em program used to process MRCs. Is
>> there a good way to validate an MRC image/stack before having a
>> program operate on it thus preventing a crash due to
>> bad/corrupt/incomplete data?
>>
>> --
>> --
>> ----------------------------------------------------------------------------------------------
>> You received this message because you are subscribed to the Google
>> Groups "EMAN2" group.
>> To post to this group, send email to
em...@googlegroups.com
>> <mailto:
em...@googlegroups.com>
>> <mailto:
eman2+un...@googlegroups.com>
>> <mailto:
eman2+un...@googlegroups.com>.
> --
> --
> ----------------------------------------------------------------------------------------------
> You received this message because you are subscribed to the Google
> Groups "EMAN2" group.
> To post to this group, send email to
em...@googlegroups.com
> To unsubscribe from this group, send email to
>
eman2+un...@googlegroups.com
> For more options, visit this group at
>
http://groups.google.com/group/eman2
>
> ---
> You received this message because you are subscribed to the Google
> Groups "EMAN2" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
eman2+un...@googlegroups.com
> <mailto:
eman2+un...@googlegroups.com>.