[Insight-users] Bug in PyramidFIlter?

Johnson, Hans J hans-johnson at uiowa.edu
Sun Jul 14 10:30:23 EDT 2013


Sam,

You are close, but you are not taking image direction into account.  The
direction you compute is correct for images with direction cosigns of
identity, but not otherwise.  There are other examples of this in ITK to
use as references.


Hans


On 7/13/13 8:35 PM, "sgerber" <sgerber at cs.utah.edu> wrote:

>
>Thank you for your reply.
>
>> This offset is intentional. The Pyramid filter uses the
>> RecursiveGaussian filters, along with the ShrinkImage Filter. If the
>> image is divisible by the shrink factor then the edge to edge extent
>> is maintained when the origin is adjusted. If not the origin and
>> samples are adjusted such that the center of the images align, which
>> is the preferred approach for neuro-imaging registration.
>
>I noticed that i missed to set the origin properly as well and fixed
>this by adding this piece of code:
>
>      ImageType::PointType origin = input->GetOrigin();
>      origin[0] -= inputSpacing[0]/2 - outputSpacing[0]/2;
>      origin[1] -= inputSpacing[1]/2 - outputSpacing[1]/2;
>
>
>However, this still yields different results from the
>RecursivePyrmaidFilter. I put the images generated by both
>approaches using 5 lelves. (test2* is hand made code and test1* is the
>Pyramid filter) here:
>http://www.cs.utah.edu/~sgerber/tmp/pyramids.zip
>
>Notice that if you compare for example level 2 from both to level 4
>(the original image) that the PyramidFilter introduces an offset. I used
>Seg3D to overlay the images from all scales, but the effect is also
>visible when resampling to the original scale.
>
>Thanks
>  Sam
>_____________________________________
>Powered by www.kitware.com
>
>Visit other Kitware open-source projects at
>http://www.kitware.com/opensource/opensource.html
>
>Kitware offers ITK Training Courses, for more information visit:
>http://www.kitware.com/products/protraining.php
>
>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



________________________________
Notice: This UI Health Care e-mail (including attachments) is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential and may be legally privileged.  If you are not the intended recipient, you are hereby notified that any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error, then delete it.  Thank you.
________________________________


More information about the Insight-users mailing list