[Insight-users] TransformMatrix and Position when reading MetaIO files with itkImageFileReader

Luis Ibanez luis.ibanez at kitware.com
Sun Jan 20 21:07:52 EST 2008


Hi Torleif,

Yes, this is/was a known problem.

       http://public.kitware.com/Bug/view.php?id=5834


This problem was fixed on October 18 2007:

http://www.itk.org/cgi-bin/viewcvs.cgi/Code/IO/itkMetaImageIO.cxx?root=Insight&r1=1.79&r2=1.80


Please update your checkout of ITK and
let us know if you still find any problem.


   Thanks


      Luis


-----------------------
Torleif Sandnes wrote:
> Hi.
> 
> I am using itkImageFileReader to read metaIO files, but it seems that  
> the positon and transformation of the files are ignored.
> Is this a known problem?
> Is there anything I might be doing wrong setting up the  
> itkImageFileReader?
> Could there be anything wrong with the headerfile?
> 
> This is the headerfile
> 
> NDims = 3
> DimSize = 256 256 180
> ElementType = MET_USHORT
> ElementSpacing = 1.000000 1.000000 1.000000
> TransformMatrix = 0.999999 -0.001688 0.000242 0.001687 0.999986  
> 0.004929 -0.000251 -0.004929 0.999988
> Origin = -0.271393 0.752919 -0.254205
> ElementByteOrderMSB = True
> ElementDataFile = MR.raw
> 
> This is how I read the file:
> 
> typedef itk::OrientedImage< unsigned short, 3>  ImageType
> itk::ImageFileReader<ImageType> reader =  
> itk::ImageFileReader<ImageType>::New();
> 
> reader->SetFileName("MR.mha");
> try
> {
>   reader->Update();
> }
> catch(itk::Exception& e)
> {
>   //errorhandling
> }
> 
> Regards,
> Torleif Sandnes
> Sintef Health Research
> _______________________________________________
> 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