[vtkusers] Removing Volumes from the render window

David Patch dpatch at rockfieldtech.com
Fri Aug 28 21:12:53 EDT 2009


I am displaying and updating 3D images on a renderWindowControl in MS VS 8.
Every time I update the image, the control retains the previous copy.  My
question is how do I remove the previous image before updating with the new
one?

 

I think I should be removing the volumes to accomplish this.  However, the
call to GetNextVolume always returns null even though the GetNumberOfItems
returns the expected count.

 

                int j = renderer2.GetVolumes().GetNumberOfItems();

                for (int i = 1; i <= j; i++)

                {

                    vol2 = renderer2.GetVolumes().GetNextVolume();

                    renderer2.RemoveViewProp(vol2);

                }

 

Am I doing something wrong?  

Thanks in advance.

 

 

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


More information about the vtkusers mailing list