Hi All,<div><br></div><div>   I am trying to rotate vtkImageData using vtkTransform and vtkImageReslice, i used following code to do the job.</div><div><br></div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div>vtkImageData * rotateImage(vtkImageData *data, QPointF center, int angle)</div><div>{</div><div><div>        vtkTransform *imageTransform = vtkTransform::New();</div></div><div><div>        imageTransform-&gt;PostMultiply();</div>
</div><div><div><br></div></div><div><div>        imageTransform-&gt;Translate(center.x(), center.y(), 0.0);</div></div><div><div>        imageTransform-&gt;RotateZ(angle);</div></div><div><div>       imageTransform-&gt;Translate(-center.x(), -center.y(), 0.0);</div>
</div><div><div><br></div></div><div><div>        // Now create filter and set previously created transformation</div></div><div><div>        vtkImageReslice *algo = vtkImageReslice::New();</div></div><div><div>        algo-&gt;SetInput(data);</div>
</div><div><div>        algo-&gt;SetInformationInput(data);</div></div><div><div>        algo-&gt;SetResliceTransform(imageTransform);</div></div><div><div>        algo-&gt;SetInterpolationModeToLinear();</div></div><div>
<div>        algo-&gt;Update();</div></div><div><br></div><div>        return algo-&gt;GetOutput();</div><div>}</div></blockquote><div><br></div><div>When i try to rotate image data, after rotation the data which is outside the image is getting lost.</div>
<div>Is there a way around to rotate image data without data loss..</div><div><br></div><div>thanks in advance.</div><div><br></div><div>regards,</div><div>srinivas.</div>