questions > PAR file/extract orientation matrix
Showing 1-3 of 3 posts
Mar 18, 2021 12:03 PM | Bassam Al-Fatly
PAR file/extract orientation matrix
Dear Chris
I have a only PAR files of subjects (DWI acquisition) which I want to know the image orientation matrix from. Reading though the PAR file text, there is no direct way of inferring such info, the problem is that I don't have associated REC file to convert using dcm2niix, have tried this however and was successful on some PAR/REC files and can read orientation matrix from json file. I have coupled the PAR files I have with other REC files from other subjects just to deceive dcm2niix to extract for me json files, is it okay to do so? or that will extract orientation matrix differently from what expected since I am using unmatched REC files?
Looking forward to hearing from you
Best Regards
Bassam
I have a only PAR files of subjects (DWI acquisition) which I want to know the image orientation matrix from. Reading though the PAR file text, there is no direct way of inferring such info, the problem is that I don't have associated REC file to convert using dcm2niix, have tried this however and was successful on some PAR/REC files and can read orientation matrix from json file. I have coupled the PAR files I have with other REC files from other subjects just to deceive dcm2niix to extract for me json files, is it okay to do so? or that will extract orientation matrix differently from what expected since I am using unmatched REC files?
Looking forward to hearing from you
Best Regards
Bassam
Mar 18, 2021 12:03 PM | Chris Rorden
RE: PAR file/extract orientation matrix
The REC file only contains the raw image data, it does not contain
any information regarding spatial orientation or dimension. You can
deceive dcm2niix by providing any file of the appropriate size and
giving it the .REC extension. You could even create a file of
zeros, just specify the correct count in bytes...
dd if=/dev/zero of=binary.dat bs=1c count=1
Alternatively, you could adapt the Matlab scripts of dicm2nii to do this for you:
https://github.com/xiangruili/dicm2nii
dd if=/dev/zero of=binary.dat bs=1c count=1
Alternatively, you could adapt the Matlab scripts of dicm2nii to do this for you:
https://github.com/xiangruili/dicm2nii
Mar 18, 2021 01:03 PM | Bassam Al-Fatly
RE: PAR file/extract orientation matrix
...thanks, that helped a lot :)
Best Wishes
Bassam
Best Wishes
Bassam