[Insight-users] Resample Image Filter

Bradley Lowekamp blowekamp at mail.nih.gov
Wed Mar 14 10:18:58 EDT 2012


Hello Vikash,

I would need to know more about the spacing and origin of the input image and the output image along with all the parameters passed to be certain.

However, without that information I am going to assume that you set the output origin to the same as the input, and halved the spacing.

If you look at Figure 4.1 in the ITK Software Guide, ( and likely some where in the doxygen ) it indicates that ITK's model of an image has the origin at the center of the pixel indexed by all zeros. What this means for the common case of doubling the pixels the origin should be decreased by 1/2 the spacing, so that double resolution git whole fits with in the original.

Looking at Figure 4.1 just imagine splitting that first voxel with the dot in it in half, and then placing the new dot in the first subdivided pixel.

Hope that help,
Brad




On Mar 14, 2012, at 7:01 AM, Vikash Gupta wrote:

> Hello everyone, 
> I am trying to resample a 3D scalar Image of size 25 x 25 x 25 to a size 50 x 50 x 50, using an Identity transform. 
> But the last slices in all the 3 dimensions in the resampled Image has all values 0, and everywhere else it works just fine.
> 
> Can anyone throw some light on this issue ?
> 
> Thanks 
> VIkash
> _____________________________________
> 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

========================================================
Bradley Lowekamp  
Medical Science and Computing for
Office of High Performance Computing and Communications
National Library of Medicine 
blowekamp at mail.nih.gov



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20120314/58d46a41/attachment.htm>


More information about the Insight-users mailing list