[Insight-users] Get and Set itk Origin

Bill Lorensen bill.lorensen at gmail.com
Tue Sep 15 08:22:50 EDT 2009


Maybe you should post some code. What you describe should work.

Bill

On Tue, Sep 15, 2009 at 5:32 AM, jef vdmb <jvdmb at hotmail.com> wrote:
> Hi,
>
> I am having a hard time understanding the way meta data like the image
> origin is updated after a pipeline execution.
>
> My situation is the following:
>
> * an image is read
> * next passed as input to a filter (in this case MirrorPadImageFilter, but I
> have seen it for others as well)
> * the filter is updated (->Update());
> * the output retrieved using ->GetOutput()
>
> The initial input had origin (0,0,0). The output however should have an
> origin different from zero (with the parameters I used for the
> MirrorPadImageFilter). When the output is interrogated for its origin
> (->GetOrigin() ), it (wrongly) shows all zeros. When writing the image
> afterwards, it was written with the correct origin ( offset field of the
> .mhd image format).
>
> It would seem my output image is not yet updated at the time I performed the
> ->GetOrigin(). The last filter was however explicitly updated just before
> and even an "->Update()" on the output image itself doesn't modify this
> behaviour.
>
> I would like to retrieve the origin for further processing but seem to end
> up with the uninitialized (0,0,0).  I would appreciate any suggestions on
> how to assure the meta information is fully updated.
>
> Regards,
> Jef
>
>
>
> ________________________________
> Hotmail: Powerful Free email with security by Microsoft. Get it now.
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
>


More information about the Insight-users mailing list