<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Excellent solution! Thanks, Dean.<br>
      <br>
      Weiguang<br>
      <br>
      On 21/08/2013 9:28 AM, Dean Inglis wrote:<br>
    </div>
    <blockquote
cite="mid:CABX+vok1VCzUqudWR1-GfwK2WA0Qf9-TY0FfeZ=K8vtEMpDW4w@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>Hi Weiguang,<br>
            <br>
          </div>
          you can use non-axis aligned planes to crop a volume by
          retrieving the 6 planes defining<br>
          the box widget in a call back and passing them to your volume
          mapper:<br>
          <br>
          &nbsp; vtkBoxWidget2 *self =
          reinterpret_cast&lt;vtkBoxWidget2*&gt;( caller );<br>
          &nbsp; vtkBoxRepresentation2* rep =<br>
          &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; vtkBoxRepresentation2::SafeDownCast(
          self-&gt;GetRepresentation() );<br>
          &nbsp; rep-&gt;GetPlanes( this-&gt;Planes );<br>
          &nbsp; this-&gt;Volume-&gt;GetMapper()-&gt;SetClippingPlanes(
          this-&gt;Planes );<br>
          <br>
        </div>
        Dean <br>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Tue, Aug 20, 2013 at 2:05 PM,
          Weiguang Guan <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:guanw@rhpcs.mcmaster.ca" target="_blank">guanw@rhpcs.mcmaster.ca</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
            <br>
            I have a volume data of vtkImageData type, and would like to
            do volume rendering of a portion of it, specified by a
            vtkBoxWidget. The box widget is rotation enabled so that the
            region of interest may not align with x-y-z axes. I hesitate
            to use vtkClipVolume because it would change the data to
            unstructured gird data and the fast texture-mapping based
            volume rendering couldn't be used. Can someone suggest a
            better solution for what I want to do? Thanks.<br>
            <br>
            Best,<br>
            Weiguang<br>
            _______________________________________________<br>
            Powered by <a moz-do-not-send="true"
              href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
            <br>
            Visit other Kitware open-source projects at <a
              moz-do-not-send="true"
              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
              moz-do-not-send="true"
              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 moz-do-not-send="true"
              href="http://www.vtk.org/mailman/listinfo/vtkusers"
              target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>