[vtkusers] How to trim a VOI to start from 0,0,0
Magnus Elden
magnus_elden at hotmail.com
Thu Sep 22 17:45:56 EDT 2016
I have this setup: vtkXMLImageDataReader -> vtkExtractVOI -> vtkImageCanvasSource2D
What I do is that I use the VOI to extract a single slice of the volume and then draw that to a specified area in the image canvas. The image canvas has enough room in the x and the y directions, but because the VOI has a non-zero z range it crashes. How can I trim away the unwanted Z range?
For example, let us sau I have the volume 0, 100; 0, 100; 0, 100. I extract the single plane of scalar values at a Z of 50. That gives me this VOI: 0, 100; 0, 100; 50, 50.
I need to turn that into 0, 100; 0, 100; 0, 0. (I think this will let the image canvas' function DrawImage())
The rest seem to work just fine. All I need now is for the draw function to draw the scalar values to its area in the canvas.
Thank you for your time.
Yours,
Magnus Elden
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160922/9c34b86f/attachment.html>
More information about the vtkusers
mailing list