[vtkusers] Reverse clipping box

Christopher Mullins christopher.mullins at kitware.com
Sun Apr 21 22:54:17 EDT 2013


Hi all,

My question is probably fairly simple.  I'd like to implement something
like a reverse clipping box.  Instead of rendering everything inside the
box and clipping outside the box, I'd like to render what is outside the
box and clip what is inside the box.

My code is almost exactly the SmartVolumeMapper example [1].  I've been
able to create a regular clipping box with the vtkBoxWidget, and placing
within a callback:

vtkPlanes *planes = vtkPlanes::New();
 boxWidget->GetPlanes(planes);
volumeMapper->SetClippingPlanes(planes);

There exists a function called boxWidget->InsideOutOn();, but it appears
this was not made with my use case in mind.  I've also tried (in the
callback function) manually getting each plane from the boxWidget and
reversing each normal - but this also does nothing.

Does anyone have an idea of where I should look?  I've looked into
vtkClipVolume, but I'm not sure what the point is of using this, if the
volume mapper will accept clipping planes.

Thanks for all your help,

[1]
http://www.vtk.org/Wiki/VTK/Examples/Cxx/VolumeRendering/SmartVolumeMapper
-- 
Christopher Mullins
R&D Engineer
Kitware Inc.,
919.869.8871
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130421/dcb31cd8/attachment.htm>


More information about the vtkusers mailing list