[vtkusers] Reverse clipping box
Julien Finet
julien.finet at kitware.com
Mon Apr 22 09:19:25 EDT 2013
Hi Chris,
You would need to look at the 2 classes: vtkGPUVolumeRayCastMapper and
vtkOpenGLGPUVolumeRayCastMapper.
Some option would need to be added to the classes to handle inside cropping
(vs outside clipping).
j.
On Sun, Apr 21, 2013 at 10:54 PM, Christopher Mullins <
christopher.mullins at kitware.com> wrote:
> 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
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20130422/524f46f3/attachment.htm>
More information about the vtkusers
mailing list