Bounded 2D slice from 3D Image

Hello together,

I have 3D image data and want to extract a bounded oblique slice from it.
I used image reslice with SetResliceAxes to obtain a “regular” unbounded slice from it (black).
Now I only want to get a rectangluar subsection of that plane (red), that I can describe either as a polygon or ideally with dimensions relative to the planes normal vector (blue, reslice axes).
How could I achieve this?



You can set a custom output extent via vtkImageReslice::SetOutputExtent and make sure that AutoCropOutput is off.

Thanks for your reply @sankhesh,
as far as I understand, this will limit the extent of the cutting plane but not with repect to the position of the plane vector. Assume the plane vector points to the far left part of the black border. Instead of cropping around it’s position, setting the extent will always crop the same region as defined by the extent.
How can I bind the cropping to the tip of the planes normal vector?

Somehow I had to manually SetOutputOrigin of the reslice to the same value the input image already had for the custom extent to apply correctly. It now works.