[Insight-users] GetOrigin problem?

Vincent A. Magnotta vincent-magnotta at uiowa.edu
Fri Dec 14 14:21:58 EST 2007


Gabriele,

The Analyze format as specified by the Mayo Clinic does not specify the
origin. SPM has extended the format to include an origin. I believe that
this is stored in bytes 72-80 of the header corresponding to structure
elements roi_scale, funused1, funused2 in itkAnalyzeDbh.h. 

We decided to ignore this SPM extension because it is not widely used by
others. I would recommend using the NiFTi format instead that is much
more universally supported across several libraries and programs.

Vince
 

 

On Fri, 2007-12-14 at 11:23 -0500, Bill Lorensen wrote:
> Gabriele,
>  
> In many file formats, the "origin" is stored in the header of the
> file. The various ImageIO classes set the origin appropriately if
> origin is stored in the header. I'm not sure if Analyze stores an
> origin. If it does, then itkAnalyzeImageIO has a bug that needs top be
> fixed.
>  
> Bill
> 
> 
> On Dec 14, 2007 11:13 AM, gabri <tartuz at gmail.com> wrote:
>         Hi Bill,
>         if AnalyzeImageIO does not set the origin ... what the command
>          virtual void SetOrigin
>         <
>         http://www.itk.org/Insight/Doxygen/html/classitk_1_1ImageIOBase.html#itk_1_1VTKImageIOz1867_1> 
>         (unsigned int i, double origin)
>         do?
>         I'm not sure that the problem is in the format maybe I read in
>         a bad way
>         the input image...
>         Have I need to set AnalyzeImageIO also in the ImageFileReader
>         to get it
>         work properly?
>         
>         best reguards,
>         gabriele
>         
>         Bill Lorensen ha scritto:
>         > Gabriele,
>         >
>         > itkAnalyzeImageIO does not set the origin. I'm not sure if
>         Analyze
>         > stores this information. Perhaps Hans Johnson can comment.
>         >
>         > Bill
>         >
>         > On Dec 14, 2007 10:38 AM, gabri < tartuz at gmail.com
>         
>         > <mailto:tartuz at gmail.com>> wrote:
>         >
>         >     Hi all,
>         >     I've noticed something strange with the GetOrigin.
>         >     My Images are of Analyze type (hdr+img) files and i can
>         read then 
>         >     correctly but after the registration process stops I
>         need to write
>         >     down
>         >     the result images so, using the resampleImageFilter I
>         apply the
>         >     transform, setted via resampler->SetTranform() . 
>         >     I need also that the spacing and origin informations
>         have to be
>         >     conserved so i thought that using
>          resampler->SetOutputOrigin() and
>         >     SetOutputSpacing() this will be done succesfully but
>         this is not real 
>         >     infact if I open the input images , using MRICRO,
>         spacing is
>         >     conserved
>         >     but origin is setted in the OutputImages to [0,0,0]that
>         is not
>         >     correct.
>         >
>         >     the problem seems to be also in the ImageFileReader
>         infact if I print 
>         >     out the result of
>         fixedImageReader->GetOutput()->GetOrigin() the
>         >     values
>         >     are still wrongly setted to all zeros .
>         >
>         >     This happens for all images that I have .
>         > 
>         >     Any suggestions?
>         >
>         >     Sincerly,
>         >     Gabriele
>         >
>         >
>         >     _______________________________________________
>         >     Insight-users mailing list
>         
>         >     Insight-users at itk.org <mailto:Insight-users at itk.org>
>         
>         >     http://www.itk.org/mailman/listinfo/insight-users
>         >
>         >
>         
>         
>         
> 
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
-- 
Assistant Professor
Department of Radiology
0453-D JCP
200 Hawkins Drive
Iowa City, IA 52242
E-mail: vincent-magnotta at uiowa.edu
Phone: 319-356-8255
Fax: 319-353-6275
Website: http://www.radiology.uiowa.edu


More information about the Insight-users mailing list