[vtkusers] vtkImageReslice - Rendering slice is stretched for oblique planes if no OutputExtent is set

Schröder, Tobias t.schroeder at dkfz-heidelberg.de
Mon Jan 16 08:04:32 EST 2012


Hi All,

I have a vtkPlaneSource where a slice from a volume is mapped. This plane
is generated with a manually calculated size which is the largest possible
region within the image for the oblique plane.

When I leave the OutputExtent of the slice in vtkImageReslice to default
the image is stretched in render window by factor 1.5 or so.

When I set the extent with the method used for the plane, a vtk warning appears
at some angles for rotated/oblique planes that the extent is at least one pixel outside
the wholeExtent. It is vtkImageReslice who produces these warning.
So vtkImageReslice seems to know the boundary.
I know the method has a rounding error which is not fixed yet. But that might not be a
reason for the factor 1.5, because it is just one pixel (e.g. 255->256).

As far as I understood the documentation there is no need to set the OutputExtent
manually, as long as the largest possible extent is preferred.
The documentation says:
If no OutputExtent is set the extent is permuted through the reslice axis.

Does vtkImageReslice really take the extent of the input for the output?
Calling GetOutputExtent() returns just the min and max integer values. Thus
nothing seems to set.
Any ideas?



Regards,

Tobias Schröder
German Cancer Research Center (Deutsches Krebsforschungszentrum, DKFZ)
Member of the Helmholtz Association
Division Medical and Biological Informatics E130
Im Neuenheimer Feld 280
D-69120 Heidelberg

E-Mail: t.schroeder at dkfz-heidelberg.de<mailto:t.schroeder at dkfz-heidelberg.de>
Web: www.dkfz.de<http://www.dkfz.de>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120116/c86d8307/attachment.htm>


More information about the vtkusers mailing list