<div dir="ltr">Hi Nick,<div><br></div><div>If you want to shrink an image with interpolation and antialiasing, then I recommend vtkImageResize:</div><div><br></div><div>    resize = vtkImageResize()</div><div>    resize.SetInputConnection(reader->GetOutputPort())</div><div>    resize.SetResizeMethodToOutputDimensions()</div><div>    resize.SetOutputDimensions(128, 128, 1)</div><div>    resize.Update()</div><div><br></div><div>Note that you have to give three output dimensions, so if you have a volume with 40 slices, you would set the third dimension to 40.  Or, you could use resize.SetOutputDimensions(128, 128, -1) to tell the filter to leave the third dimension alone (output number of slices will be the same as the input number of slices).</div><div><br></div><div>I used vtkImageShrink3D before, but like you, I found that I had to shift the images afterwards (e.g. if I shrunk the image by a factor of 4, then I had to shift by 1.5 voxels... by inspecting the code, I found that I needed a shift of 0.5*(N-1) where "N" was my shrink factor.</div><div><br></div><div> - David</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 16, 2015 at 1:12 PM, Nick Patterson <span dir="ltr"><<a href="mailto:pattersonnp.work@gmail.com" target="_blank">pattersonnp.work@gmail.com</a>></span> wrote:<br><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">VTK Users,<br>
<br>
What would be the appropriate way of resampling a DICOM image from 512x512 to something like 128x128? I though I had this worked out, but I generated a test DICOM image (a number of different sized boxes) and noticed that there is some slight offset of the boxes. Is it appropriate to use something like vtkImageResample or vtkImageShrink3D to perform this operation?<br></blockquote></div></div></div></div>