<div dir="ltr">Hi Julien,<div><br></div><div style>Thanks for the suggestion, it's clear that this is one place where clipping planes are being computed. However these volume mappers are not supported on my architecture (Mac OS X). So the SmartVolumeMapper is using the vtkFixedPointVolumeRayCastMapper. So would it be correct to look at a corresponding function in this mapper [1] ? </div>
<div style><br></div><div style>vtkClipVolume appears to have my functionality in mind, but its Update() function returns a vtkUnstructuredGrid [2], which makes it seem like this is not what I should use (I'm operating on vtkImageData).</div>
<div style><br></div><div style>[1] <a href="https://github.com/Kitware/VTK/blob/master/Rendering/Volume/vtkFixedPointVolumeRayCastMapper.h#L709">https://github.com/Kitware/VTK/blob/master/Rendering/Volume/vtkFixedPointVolumeRayCastMapper.h#L709</a></div>
<div style>[2] <a href="http://www.vtk.org/doc/release/4.0/html/classvtkClipVolume.html#a19">http://www.vtk.org/doc/release/4.0/html/classvtkClipVolume.html#a19</a></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Apr 22, 2013 at 10:19 AM, Julien Finet <span dir="ltr"><<a href="mailto:julien.finet@kitware.com" target="_blank">julien.finet@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi Chris,<div><br></div><div>You would need to look at the 2 classes: vtkGPUVolumeRayCastMapper and vtkOpenGLGPUVolumeRayCastMapper.</div><div>Some option would need to be added to the classes to handle inside cropping (vs outside clipping).</div>
<div>j.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div class="h5">On Sun, Apr 21, 2013 at 10:54 PM, Christopher Mullins <span dir="ltr"><<a href="mailto:christopher.mullins@kitware.com" target="_blank">christopher.mullins@kitware.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi all,<div><br></div><div>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.</div>
<div><br></div><div>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:</div><div><br></div><div><div>vtkPlanes *planes = vtkPlanes::New();</div>
<div> boxWidget->GetPlanes(planes);</div></div><div><div>volumeMapper->SetClippingPlanes(planes);</div><div><br></div><div>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. </div>
<div><br></div><div>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.</div>
<div><br></div><div>Thanks for all your help,</div><div><br></div><div>[1] <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/VolumeRendering/SmartVolumeMapper" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/VolumeRendering/SmartVolumeMapper</a></div>
<span><font color="#888888">
-- <br>Christopher Mullins<div>R&D Engineer</div><div>Kitware Inc.,</div><div><a href="tel:919.869.8871" value="+19198698871" target="_blank">919.869.8871</a></div>
</font></span></div></div>
<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Christopher Mullins<div>R&D Engineer</div><div>Kitware Inc.,</div><div>919.869.8871</div>
</div>