<div id="result_box" dir="ltr">Thank you David!<br><br>Regards,<br>Paulo Amorim<br><br><br></div><br><br><div class="gmail_quote">2008/11/13 David Gobbi <span dir="ltr">&lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">Hi Paulo,<br>
<br>
The documentation for SetZSlice() is pretty bad. &nbsp;When it says &quot;not<br>
the same as on the hard drive&quot; what it really means is this:<br>
<br>
- The &quot;Z&quot; direction in VTK does not always correspond to the Slice<br>
direction in the original files<br>
- Even when the VTK Z direction and the slice direction are the same,<br>
when you read an image into VTK, it resets the Z indexing so that it<br>
starts at zero. &nbsp;So if you read slices 3-12 from disk, you end up with<br>
Z indexes 0-9 in VTK.<br>
<br>
I&#39;m not sure which one of the items above is causing the SetZSlice()<br>
method to do something unexpected for you. &nbsp;Usually I use<br>
vtkImageReslice to extract the slice that I want, as in the<br>
Examples/ImageProcessing/Cxx/ImageSlicing.cxx, by calling<br>
reslice-&gt;SetOutputDimensionality(2) to make reslice extract just a<br>
single slice, and by using reslice-&gt;SetResliceAxes() to choose the<br>
slice position and orientation.<br>
<br>
The trick with ImageReslice is that it expects you to select slice<br>
positions using physical data coordinates (i.e. millimetre positions)<br>
instead of using (I,J,K) pixel indices.<br>
<br>
 &nbsp;David<br>
<br>
<br>
<br>
</div>On Thu, Nov 13, 2008 at 4:50 AM, Paulo Henrique Junqueira Amorim<br>
<div><div></div><div class="Wj3C7c">&lt;<a href="mailto:paulojamorim@gmail.com">paulojamorim@gmail.com</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; How can I change the slice in vtkImageActor ?<br>
&gt;<br>
&gt; I am trying to use the image_actor.SetZSlice (10), but does not change the<br>
&gt; piece, it seems that the manual says it is not on the slices that are in HD.<br>
&gt;<br>
&gt;<br>
&gt; Regards,<br>
&gt; Paulo Amorim<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; 2008/11/11 David Gobbi &lt;<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>&gt;<br>
&gt;&gt;<br>
&gt;&gt; Hi Paulo,<br>
&gt;&gt;<br>
&gt;&gt; It is impossible to zoom a 2D actor. &nbsp;Instead, you have to magnify the<br>
&gt;&gt; image before it goes to the vtkImageMapper. &nbsp;To zoom by an integer<br>
&gt;&gt; factor, you can use something like vtkImageMagnify to enlarge the<br>
&gt;&gt; image and then vtkImageClip to crop the image to the desired size.<br>
&gt;&gt;<br>
&gt;&gt; You might find it easier to use vtkImageActor, though, since<br>
&gt;&gt; vtkImageActor is a 3D actor and you can just zoom the camera.<br>
&gt;&gt;<br>
&gt;&gt; &nbsp; &nbsp;David<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Tue, Nov 11, 2008 at 1:28 PM, Paulo Henrique Junqueira Amorim<br>
&gt;&gt; &lt;<a href="mailto:paulojamorim@gmail.com">paulojamorim@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt; Hi,<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; How do I zoom into a vtkActor2D with vtkImageMapper?<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; The vtkCamera only works with 3D.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Regards,<br>
&gt;&gt; &gt; Paulo Amorim<br>
&gt;&gt; &gt; _______________________________________________<br>
&gt;&gt; &gt; This is the private VTK discussion list.<br>
&gt;&gt; &gt; Please keep messages on-topic. Check the FAQ at:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
&gt;&gt; &gt; Follow this link to subscribe/unsubscribe:<br>
&gt;&gt; &gt; <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><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>
</div></div></blockquote></div><br>