<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"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></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. When it says "not<br>
the same as on the hard drive" what it really means is this:<br>
<br>
- The "Z" 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. So if you read slices 3-12 from disk, you end up with<br>
Z indexes 0-9 in VTK.<br>
<br>
I'm not sure which one of the items above is causing the SetZSlice()<br>
method to do something unexpected for you. 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->SetOutputDimensionality(2) to make reslice extract just a<br>
single slice, and by using reslice->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>
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"><<a href="mailto:paulojamorim@gmail.com">paulojamorim@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
> How can I change the slice in vtkImageActor ?<br>
><br>
> I am trying to use the image_actor.SetZSlice (10), but does not change the<br>
> piece, it seems that the manual says it is not on the slices that are in HD.<br>
><br>
><br>
> Regards,<br>
> Paulo Amorim<br>
><br>
><br>
><br>
> 2008/11/11 David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>><br>
>><br>
>> Hi Paulo,<br>
>><br>
>> It is impossible to zoom a 2D actor. Instead, you have to magnify the<br>
>> image before it goes to the vtkImageMapper. To zoom by an integer<br>
>> factor, you can use something like vtkImageMagnify to enlarge the<br>
>> image and then vtkImageClip to crop the image to the desired size.<br>
>><br>
>> You might find it easier to use vtkImageActor, though, since<br>
>> vtkImageActor is a 3D actor and you can just zoom the camera.<br>
>><br>
>> David<br>
>><br>
>><br>
>> On Tue, Nov 11, 2008 at 1:28 PM, Paulo Henrique Junqueira Amorim<br>
>> <<a href="mailto:paulojamorim@gmail.com">paulojamorim@gmail.com</a>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> > How do I zoom into a vtkActor2D with vtkImageMapper?<br>
>> ><br>
>> > The vtkCamera only works with 3D.<br>
>> ><br>
>> ><br>
>> > Regards,<br>
>> > Paulo Amorim<br>
>> > _______________________________________________<br>
>> > This is the private VTK discussion list.<br>
>> > Please keep messages on-topic. Check the FAQ at:<br>
>> > <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>
>> ><br>
>> ><br>
><br>
><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>