[Insight-users] GetOrigin problem?
Bill Lorensen
bill.lorensen at gmail.com
Fri Dec 14 11:23:05 EST 2007
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
> >
> >
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20071214/427ab6db/attachment.htm
More information about the Insight-users
mailing list