As some extra information, since using the newest git version, I also get an error when exiting my application: &quot;a vtkShader2 object is being deleted before ReleaseGraphicsResources() has been called.&quot;, this error is repeated quite a few times. <div>

<br></div><div>Cheers,</div><div>Tijmen<br><br><div class="gmail_quote">On Thu, Sep 22, 2011 at 1:03 PM, Tijmen Klein <span dir="ltr">&lt;<a href="mailto:T.R.Klein@student.rug.nl">T.R.Klein@student.rug.nl</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi David,<div><br></div><div>This is exactly what I was looking for, thank you! Got the newest VTK version from git, compiled it and modified my program (using <a href="http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/ImageProcessing/Python/ImageInteractorReslice.py" target="_blank">http://vtk.org/gitweb?p=VTK.git;a=blob;f=Examples/ImageProcessing/Python/ImageInteractorReslice.py</a> as an example). vtkImageResliceMapper really makes a world of difference, and makes the slicing a lot easier.</div>


<div><br></div><div>However, there is still one small issue for me. I would like to display this slice as if it was a 2D image. Would you have an idea how to do this? If I simply add the vtkImageSlice to my renderer, it shows up at the exact location of the cut (which is to be expected). I could set the camera position + focal point based on the origion and normal of the cutting plane, but I would like the slice to fill the whole viewport. The method  ResampleToScreenPixelsOn() seems to be designed to do this, using this however does not change a thing for me.</div>


<div><br></div><div>Cheers,</div><div>Tijmen<div><div></div><div class="h5"><br><br><div class="gmail_quote">On Wed, Sep 21, 2011 at 5:06 PM, David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com" target="_blank">david.gobbi@gmail.com</a>&gt;</span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Tijmen,<br>
<br>
If you are able to grab the devel version of VTK from git, your<br>
best option is to use the new image rendering classes:<br>
<a href="http://www.vtk.org/Wiki/VTK/Image_Rendering_Classes" target="_blank">http://www.vtk.org/Wiki/VTK/Image_Rendering_Classes</a><br>
The vtkImageResliceMapper has a method called SetSlicePlane(),<br>
so all you have to do is set the image as the input, then set the<br>
plane you want to slice with.  The mapper will do everything else.<br>
<font color="#888888"><br>
 - David<br>
</font><div><div></div><div><br>
<br>
On Wed, Sep 21, 2011 at 3:42 AM, Tijmen Klein &lt;<a href="mailto:T.R.Klein@student.rug.nl" target="_blank">T.R.Klein@student.rug.nl</a>&gt; wrote:<br>
&gt; Hello Everyone,<br>
&gt; I have a volume that I cut off using a vtkPlane<br>
&gt; (volume-&gt;AddClippingPlane()), which works really well. But sometimes I also<br>
&gt; need to show to cut itself. First I tried to use a vtkCutter for this, the<br>
&gt; geometry of the output is fine, but the texture is incorrect.<br>
&gt; So I&#39;m now used a vtkImageReslice, which gives the desired output. However,<br>
&gt; the textured plane of the output does not always cover the whole area of the<br>
&gt; vtkCutter. For example, see this<br>
&gt; image: <a href="http://dl.dropbox.com/u/27566470/slice_and_cut.png" target="_blank">http://dl.dropbox.com/u/27566470/slice_and_cut.png</a> The red bar<br>
&gt; indicates the geometry of the vtkCutter, the blue plane is the slice of the<br>
&gt; vtkImageReslice.<br>
&gt; How can I make sure that the output of vtkImageReslice covers the whole<br>
&gt; vtkCutter? I have the feeling that my current method is too complex. I want<br>
&gt; an output that is equal to the output of creating a slice in Paraview.<br>
&gt; Cheers,<br>
&gt; Tijmen<br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div>