[Insight-users] building a metaimage header and convert to Analyse file format

Leila baghdadi baghdadi at sickkids.ca
Fri Jan 21 10:16:43 EST 2005


Jose,

I am not sure I understand what you are trying to do!!

1) This image has a dimension ordering of z,y,x
you CAN NOT just change the header (i.e reorder to x,y,z) and expect ITK
to figure out that the ordering is backwards

2) According ti the volume info you provided yourself the type is signed
short Not byte

3) My understanding of MINC file format has always lead me to believe
that endian-ness should not matter, at least not to the user,

4) If your propose of converting is just to save the file, you can just
use ITK's meta writer and save the image as raw. Keep in mind that
converting between image formats specifically ANALYZE which has a few
different versions out there might result in loss of information in the
header or inaccuracy of the raw data itself (due to conversion from one
data type to another)


5) Finally, Please take a moment and review some informative material
about MINC file format,
http://www.bic.mni.mcgill.ca/software/minc/
http://www.imaging.robarts.ca/Software/command_line_tools/


HTH


Leila

On Fri, 2005-01-21 at 04:13, jose santamaria wrote:
> Hi,
> 
>   I have downloaded one volume data from brainWeb
> with the following info
> 
> 
> % BrainWeb download: T1 ICBM normal 3mm pn0 rf20
> % Modality=T1, Protocol=ICBM, Phantom_name=normal, Slice_thickness=3mm,
> % Noise=0%, INU=20%
> %
> % MINC volume info:
> %
> %
> % image: signed__ short 0 to 4095
> % image dimensions: zspace yspace xspace
> %     dimension name         length         step        start
> %     --------------         ------         ----        -----
> %     zspace                     60            3          -72
> %     yspace                    217            1         -126
> %     xspace                    181            1          -90
> 
> The pixel type is byte (unsigned) and stored as big-endian.
> 
> Then, I have make its metaimage header for the raw data file downloaded
> with the following lines
> 
> % NDims = 3
> % DimSize = 181 217 60
> % ElementSpacing = 1 1 3
> % Position = -90 -126 -72
> % ElementByteOrderMSB = True
> % ElementType = MET_UCHAR
> % HeaderSize = -1
> % ElementDataFile = t1_icbm_normal_3mm_pn0_rf20.raw
> 
> Have the metaimage header any mistake ?
> 
> In the other hand, I need to convert this raw data to
> Analyse file format. Which is the correct PixelType
> for byte (unsigned) pixel to modify the corresponding
> line at the Insight/Examples/IO/ImageReadWrite.cxx file ?
> 
> Thanks.
> 
> Jose.
> 
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users



More information about the Insight-users mailing list