VTK manipulation of image in memory.

Dear All,

I have a 3D .mhd file. Then I visualize that file with VTK. I determine a region of that image to crop.
How I reflect the crop in the visualization.

Have I to crop the .mhd image in memory and redisplay? Are there another ways?
Which filters to manipulate (crop and other operations) the image in memory?

Thanks,

Luís Gonçalves

If you use volume rendering then you can set clipping planes based on the ROI. There is no need to modify the volume.

But in the final I want to save to file the clipped volume.

You can use vtkImagePadFilter to cut at current voxel boundaries or use vtkImageReslice for cutting at exact position or with a rotated ROI.