SetOrigin() bug?

Lisa S. Avila lisa.avila at kitware.com
Thu Dec 9 01:14:17 EST 1999


Hello Liz,

It is possible that there is a bug in the placement of the volume during
rendering. From your later question, I assume you are using the texture
mapping volume mapper, right? If you switch to the ray caster, does it
change at all? Can you start from one of the standard examples (such as
volTexSimple.tcl), change the spacing and origin of the data, and
demonstrate this problem (perhaps by adding an outline filter and showing
that the outline doesn't match with the volume rendering)?

Yes, you can render more than one region at a time, provided those regions
do not overlap in 3D space. If you are using the texture mapping volume
mapper, then make sure to add a vtkFrustumCoverageCuller to the renderer
with back-to-front sorting on (if you are using a recent version of VTK
that automatically creates a vtkFrustumCoverageCuller, then you can set
this flag on the culler or remove it and add a new one)

As for the black textures - this is a known problem at the moment that I
have not been able to solve yet. At first glance it seemed simple - 2D
texturing was being turned off in the volume texture mapper and it should
not have been. But removing that did not seem to solve the problem. You can
try removing the  glDisable( GL_TEXTURE_2D ); line from your
vtkOpenGLVolumeTextureMapper2D.cxx file and see if it helps you.  


Lisa


At 11:28 PM 12/8/99 -0800, Elizabeth Bullitt wrote:
>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.
>-----------------------------------------------------------------------------
> 



-----------------------------------------------------------------------------
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