questions > RE: error converting PAR/REC to nii - fewer slices found than expected
Mar 8, 2019  04:03 PM | Josh Robinson
RE: error converting PAR/REC to nii - fewer slices found than expected
Hello,

I have an issue similar to this one below. I'm trying to convert PAR/REC diffusion files, but for some of them, I get the following error message:

Error: Catastrophic error: found 2310 but expected 2380 slices.

Checking the PAR header files and RECs don't reveal any obvious problems - there are 2380 slices reported in the PAR and there are 2380 slices in the REC file. I don't get any error regarding the image type, which is what the patch explained on github relates to, if I'm not mistaken. I have looked at headers of subjects who convert successfully and haven't revealed any causes as far as I can tell. One volume in the REC file is an ADC image, which would be my guess as to what is causing it, but that doesn't explain why it handles others with the same acquisition fine. I see that PAR/REC is not too popular here, but any guidance would be very much appreciated.

Thanks,

Josh

Originally posted by Ben Conrad:
Hello,
I am attempting to convert some PAR/REC images to nifti. I had been doing this (1+ years ago) with dicm2nii.m matlab package on the same files (mostly successfully except there was a flipped dimension). But after upgrading to most recent version of the matlab package, these files will not convert. I am now trying to do this with dcm2niix, which provides a bit more explicit error message. Here is the error I receive:
conrabn1@conrabn1-VirtualBox:~$ ./dcm2niix /mnt/CR7T_Connectivity/MRI_raw/CR_035_314914/Price_314914_WIP_MP2RAGE_1x1x1_SENSE_5_1.PAR
Chris Rorden's dcm2niiX version v1.0.20181125 (JP2:OpenJPEG) (JP-LS:CharLS) GCC5.5.0 (64-bit Linux)
Warning: dcm2niix PAR is not actively supported (hint: use dicm2nii)
Error: Unknown type 4: not magnitude[0], real[1], imaginary[2] or phase[3].
Error: Catastrophic error: found 480 but expected 720 slices. /mnt/CR7T_Connectivity/MRI_raw/CR_035_314914/Price_314914_WIP_MP2RAGE_1x1x1_SENSE_5_1.PAR
slices*grad*bval*cardiac*echo*dynamic*mix*labels = 240*1*1*1*1*1*1*1
Warning: Intensity slope/intercept varies between slices! [check resulting images]
Done reading PAR header version 4.2, with 720 slices

And just for reference, here is error message in matlab from dicm2nii.m, running on same data: 

Validating 1 files ...

Inconsistent image size, bits etc: /mnt/CR7T_Connectivity/MRI_raw/CR_035_314914/Price_314914_WIP_MP2RAGE_1x1x1_SENSE_5_1.PAR.

No valid files found:

Inconsistent image size, bits etc: /mnt/CR7T_Connectivity/MRI_raw/CR_035_314914/Price_314914_WIP_MP2RAGE_1x1x1_SENSE_5_1.PAR

.

Any help would be greatly appreciated, thank you!

-Ben

Threaded View

TitleAuthorDate
Ben Conrad Jan 12, 2019
RE: error converting PAR/REC to nii - fewer slices found than expected
Josh Robinson Mar 8, 2019
Chris Rorden Jan 12, 2019
Chris Rorden Jan 12, 2019
Ben Conrad Jan 12, 2019