[Insight-users] Get and Set itk Origin
jef vdmb
jvdmb at hotmail.com
Tue Sep 15 05:32:41 EDT 2009
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.
http://clk.atdmt.com/GBL/go/171222986/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20090915/ad22d869/attachment.htm>
More information about the Insight-users
mailing list