I have an ImageData containing an object which I have transformed (rotated) using ImageReslicer. In order for the object to still be fully visible after the rotation I have set the SetAutoCropOutput of ImageReslicer to True. However, this gives me lots of empty white space around the object, which I want to remove/crop out.
I don’t have any/much experience with VTK (started a week ago) and therefore I am looking for the (best) method to achieve this. My method right now is to find the minimum axis aligned bounding box (AABB) which I can get by using the OutlineFilter applied to the contour of the rotated object.
The problem is that I do not know how to transfer the information given by the OutlineFilter to a so called extent, which can be used as input parameters for ExtractVoi’s SetVOI. Any help is appreciated.