SetOrigin() bug?

Elizabeth Bullitt bullitt at med.unc.edu
Thu Dec 9 02:28:07 EST 1999


I am writing an application that combines surface rendering of objects
extracted from MR datasets with volume rendering of selected regions of
the same dataset. Volume rendering is done by MIP projection, and
employs a structured points dataset of unequal axial spacing (stepsizes
of approximately 0.08, 0.08, 0.11).
	The volume rendered chunk of space is only part of the total MR, and so
has an offset from the MR's origin of (xmin * xstep, ymin * ystep, zmin
* zstep), where (xmin, ymin, zmin) represent a voxel at the corner of
the sub-block and (xstep, ystep, zstep) represent the voxel spacing
along each axis.
	If I set the offset value via the volume actor's SetOrigin()command,
the volume rendered region ends up misregistered with the other, surface
rendered objects extracted from the same dataset and sharing the same
coordinate system. The misregistration becomes linearly worse the
farther (xmin, ymin, zmin) is from the origin. As a matter of fact
(really odd) if I multiply each x,y,z offset value by 1.1, the
registration is perfect. This 1.1 value has held true for multiple
different volume rendered regions in each of 4 different datasets with
slightly different xstep/ystep values but the same 0.11 zstep value.
	The problem goes away if I incorporate the correct initial translation
into my own matrix chain and set the volume's position via
SetUserMatrix(), thus avoiding SetOrigin() entirely. This problem also
does not occur if I use SetOrigin() with structured datasets of unitary
spacing.
	Is there a bug in SetOrigin() for structured datasets of unequal and/or
non-unitary axial spacing? (And is the problem possibly related to the
zstep value?).
		----------------
	Two other quick questions. Is there a way to volume render more than
one region of space at the same time? And is there a way to
simultaneously volume render one region of space and also show a texture
mapped plane? In both cases, the second object rendered maps to black
(if the rendering order is reversed, the other object maps correctly but
the one initially OK is now black).

Thanks
Liz


-----------------------------------------------------------------------------
This is the private VTK discussion list.  Please keep messages on-topic.
Check the FAQ at: <http://www.automatrix.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at gsao.med.ge.com>.  For help, send message body containing
"info vtkusers" to the same address.     Live long and prosper.
-----------------------------------------------------------------------------




More information about the vtkusers mailing list