<br>I&#39;m using a clipping example of GPURenderDemo, with a Box and a Callback, the boxWidget has only InsideOutOff() and InsideOutOn() options, and no one of then work like I want.<br><div class="gmail_quote">I&#39;m doing anything wrong?<br>
<br>//---------------------------------------------------------------------------<br>
<br>class vtkBoxWidgetCallback : public vtkCommand<br>{<br>public:<br>  static vtkBoxWidgetCallback *New()<br>    { return new vtkBoxWidgetCallback; }<br>  virtual void Execute(vtkObject *caller, unsigned long, void*)<br>

    {<br>      vtkBoxWidget *widget = reinterpret_cast&lt;vtkBoxWidget*&gt;(caller);<br>      if (this-&gt;Mapper)<br>        {<br>        vtkPlanes *planes = vtkPlanes::New();<br>        widget-&gt;GetPlanes(planes);<br>

        this-&gt;Mapper-&gt;SetClippingPlanes(planes);<br>        planes-&gt;Delete();<br>        }<br>    }<br><br>    void SetMapper(vtkSmartVolumeMapper* m)<br>    { this-&gt;Mapper = m; }<br><br>protected:<br>  vtkBoxWidgetCallback()<br>

    { this-&gt;Mapper = 0; }<br><br>  vtkSmartVolumeMapper *Mapper;<br>};<br><br>//---------------------------------------------------------------------------<br><br><br>        vtkBoxWidget *box = vtkBoxWidget::New();<br>

<br>        box-&gt;SetInteractor(vtkWindow1-&gt;GetInteractor());<br>        box-&gt;SetPlaceFactor(1.01);<br>        box-&gt;SetInput(mapperG-&gt;GetInput());<br>        box-&gt;SetDefaultRenderer(vtkWindow1-&gt;GetRenderer());<br>

        box-&gt;TranslationEnabledOn();<br>        box-&gt;ScalingEnabledOn();<br>        box-&gt;RotationEnabledOn();<br>        box-&gt;PlaceWidget();<br>        vtkPlanes *planes = vtkPlanes::New();<br>        box-&gt;GetPlanes(planes);<br>

        box-&gt;InsideOutOn();<br>        mapperG-&gt;SetClippingPlanes(planes);<br>        planes-&gt;Delete();<br>        vtkBoxWidgetCallback *callback = vtkBoxWidgetCallback::New();<br>        callback-&gt;SetMapper(mapperG);<br>

        box-&gt;AddObserver(vtkCommand::InteractionEvent, callback);<br>        callback-&gt;Delete();<br>        box-&gt;EnabledOn();<br>        box-&gt;GetSelectedFaceProperty()-&gt;SetOpacity(0.0);<div><div></div><div class="h5">
<br><br><br><div class="gmail_quote">
On Mon, Aug 9, 2010 at 9:53 PM, Sebastien Jourdain <span dir="ltr">&lt;<a href="mailto:sebastien.jourdain@kitware.com" target="_blank">sebastien.jourdain@kitware.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


If you are using an implicit function for your selection, then you can<br>
use the Clip filter and just set the InsideOut value to 1.<br>
<br>
Seb<br>
<div><div></div><div><br>
On Mon, Aug 9, 2010 at 6:52 PM, Alessandro Martini<br>
&lt;<a href="mailto:alessandromartini@gmail.com" target="_blank">alessandromartini@gmail.com</a>&gt; wrote:<br>
&gt; Hello All,<br>
&gt;<br>
&gt; I need to do a inverted crop in a volume, mantain the content external to<br>
&gt; box ( selection ) and hide the internal content, make any like a &quot;hole&quot;.<br>
&gt; What is the correct way? Have any example of this ?<br>
&gt;<br>
&gt; Thank&#39;s,<br>
&gt; --<br>
&gt; Alessandro Martini<br>
&gt; <a href="mailto:alessandromartini@gmail.com" target="_blank">alessandromartini@gmail.com</a><br>
&gt; -------------------------------------------------<br>
&gt; &#39;Existem 10 tipos de pessoas no mundo:<br>
&gt; aquelem que entendem binário, e aqueles que não!&#39;<br>
&gt;<br>
</div></div>&gt; _______________________________________________<br>
&gt; Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
&gt;<br>
&gt; Visit other Kitware open-source projects at<br>
&gt; <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
&gt;<br>
&gt; Please keep messages on-topic and check the VTK FAQ at:<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;<br>
&gt; Follow this link to subscribe/unsubscribe:<br>
&gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;<br>
&gt;<br>
</blockquote></div><br><br clear="all"><br></div></div>-- <br><div><div></div><div class="h5">Alessandro Martini<br><a href="mailto:alessandromartini@gmail.com" target="_blank">alessandromartini@gmail.com</a><br>-------------------------------------------------<br>

&#39;Existem 10 tipos de pessoas no mundo:<br>
aquelem que entendem binário, e aqueles que não!&#39;<br>
</div></div></div><br><br clear="all"><br>-- <br>Alessandro Martini<br><a href="mailto:alessandromartini@gmail.com">alessandromartini@gmail.com</a><br>-------------------------------------------------<br>&#39;Existem 10 tipos de pessoas no mundo:<br>
aquelem que entendem binário, e aqueles que não!&#39;<br>