Mouse-Imaging-Centre / RMINC

Statistics for MINC volumes: A library to integrate voxel-based statistics for MINC volumes into the R environment. Supports getting and writing of MINC volumes, running voxel-wise linear models, correlations, etc.; correcting for multiple comparisons using the False Discovery Rate, and more. With contributions from Jason Lerch, Chris Hammill, Jim Nikelski and Matthijs van Eede. Some additional information can be found here:
https://mouse-imaging-centre.github.io/RMINC
Other
22 stars 17 forks source link

provide better feedback on corrupt MINC files #53

Open mcvaneede opened 8 years ago

mcvaneede commented 8 years ago

When MINC files get corrupted, you can see error messages like this when loading them:

DF5-DIAG: Error detected in HDF5 (1.8.10-patch1) thread 0:

000: H5Dio.c line 174 in H5Dread(): can't read data

major: Dataset
minor: Read failed

001: H5Dio.c line 449 in H5D__read(): can't read data

major: Dataset
minor: Read failed

002: H5Dchunk.c line 1735 in H5D__chunk_read(): unable to read raw data chunk

major: Low-level I/O
minor: Read failed

003: H5Dchunk.c line 2766 in H5D__chunk_lock(): data pipeline read failed

major: Data filters
minor: Filter operation failed

004: H5Z.c line 1120 in H5Z_pipeline(): filter returned failure during read

major: Data filters
minor: Read failed

005: H5Zdeflate.c line 125 in H5Z_filter_deflate(): inflate() failed

major: Data filters
minor: Unable to initialize object

/projects/mice/share/arch/linux-3_2_0-36-generic-x86_64-eglibc-2_15/src/minc-toolkit/libminc/libsrc2/hyper.c:794 (from MINC2): HDF5 function H5Dread failed Error in mincGetVolume(testfiles$filename[i]) : Could not get hyperslab.

Currently the RMINC functions (mincLm for instance) will die on this without indicating which file from your list of input files was the culprit.

cfhammill commented 8 years ago

Hey Matthijs, can you give me an example that breaks, I'll look in to fixing this

mcvaneede commented 8 years ago

Next time I run into a corrupted file, I'll save it for you! (The ones in question have been fixed)