Rank: 204050 based on 0 downloads (last 30 days) and 0 file submitted
photo

Felx

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Felx
Updated File Comments Rating
15 Jul 2011 Read Medical Data 3D GUI to open most Medical file-formats: Dicom, V3D, ISI, NifTI, Analyze and other formats Author: Dirk-Jan Kroon

I had trouble reading data that I imported from DICOM (using SPM) and analyzed/modified through SPM. SPM saved the data in .hdr/.img files and I used the 'hdr_read_volume()' function to read it back into matlab. I fond that some datasets were read incorrectly and found that this happened when the value of the 'ImgDataType' in the .hdr file was 512. Both, the coustom read function ('get_info_analyze_hdr()') as well as Matlabs 'analyze75info.m' can't handle that value. After a little research I found that the datatype for 512 is DT_UNINT16 but this datatype is not known either so I tried DT_SIGNED_SHORT and the data is read in correctly.

So my fix was to add to strImgData in
'get_info_analyze_hdr()' the cell

strImgData{512}.ImgDataType = 'DT_SIGNED_SHORT';
strImgData{512}.ColorType = 'grayscale';

alternatively one could modify 'analyze76info.m' and add under

switch ImgDataType
...
case int16(512)
metadata.ImgDataType = 'DT_SIGNED_SHORT'

Contact us