Hi All,<br>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:<br>
imageReslice->SetOutputExtent( 0, dimSmallerVol[0]-1, 0, dimSmallerVol[1]-1, 0, dimBiggerVol[2]-1);<br>but it only clips my image data, but do not rescale it.<br>I was trying to use vtkTransform with vtkImageReslice<br>
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);<br>
imageReslice->SetResliceTransform(scaleTransf);<br>but it doesn't seem to work as well. The image isn't clipped, but it isn't rescaled as well.<br>I would really appreciate any help,<br>Kind regards,<br>Robert Golebiowski<br>
<br>