<div>Hi All,<br></div><div></div><div>I'm looking for a way to rescale a 3d image data to a smaller size. I was trying to use vtkImageReslice, but I can't make it work the way I want to. I have two 3d images, I want to rescale the bigger one to the size of the smaller one, in the way that x and y dimensions of the bigger one are equal to x and y dimensions of the smaller one. Z-dimension of the bigger one has to remain the same. I was trying to use:</div>
<div>imageReslice->SetOutputExtent(        0, dimSmallerVol[0]-1, 0, dimSmallerVol[1]-1, 0, dimBiggerVol[2]-1);</div><div>but it only clips my image data, but do not rescale it.</div><div>I was trying to use vtkTransform with vtkImageReslice</div>
<div></div><div>double scaleX = (double)dimSmallerVol[0] / (double)dimBiggerVol[0];<br>double scaleY = (double)dimSmallerVol[1] / (double)dimBiggerVol[1];<br>double scaleZ = 1;<br><br>vtkTransform *scaleTransf = vtkTransform::New();<br>
scaleTransf->Scale(scaleX,scaleY,scaleZ);</div><div>imageReslice->SetResliceTransform(scaleTransf);</div><div>but it doesn't seem to work as well. The image isn't clipped, but it isn't rescaled as well.</div>
<div></div><div>I would really appreciate any help,</div><div>Kind regards,</div><div>Robert Golebiowski<br><br><br></div>