<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello again,<div><br><div><div>On Nov 18, 2014, at 2:52 PM, Jameson Merkow <<a href="mailto:jmerkow@gmail.com">jmerkow@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><br>
BUG: you should also scale the origin.<br></blockquote><div><br></div><div>I guess this is whats confusing. The origin should be the same (or very close due to spacing changes).  I am resampling and updating the spacing to be the inverse of the scale. The new image should have the same physical dimensions, but sampled at a different scale (fewer or greater number of voxels).</div></div></div></div></blockquote><div><br></div><div>No, they are different. When you are doing resampling  you are applying a transform mapping the input image's physical space to the output image's by the transform. In your case it's a scale. So if you have applying a scale of 0.1, and you origin was [100,100], it would be transform to [10,10].</div><br><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><br></div><div>Its possible that I am using ResampleImageFilter wrong. Think the ShrinkImageFilter or ExpandImageFilter with non-integer values.</div><div>If I do the equivalent operation with Shrink/Expand, the origin, spacing and size end up the same as what I calculate for the resample image filter, but the image comes out blank.</div></div></div></div></blockquote><div><br></div><div>These filters are a little different they are not applying a transform of the physical space. The input image an output image occupy approximately the same physical space, just the resolution has changed.</div><div><br></div><div>If you want to do a similar thing with the resample image filter you set the transform to the identity transform, then change change the Size. If you use the ResampleImageFilter as a class you may find the SetReferenceImage useful [1].</div><div><br></div><div>Brad</div><div><br></div><div>[1] <a href="http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ResampleImageFilter.html#a850affc7fc3ce420c04f754d5d7773a5">http://www.itk.org/SimpleITKDoxygen/html/classitk_1_1simple_1_1ResampleImageFilter.html#a850affc7fc3ce420c04f754d5d7773a5</a></div></div></div></body></html>