<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Hi David,<div><br></div><div>Interesting functionality and perspective. I like the way the mapper implicitly handles </div>
<div>image reslicing and event callbacks.</div><div><br></div><div>Could we implement this so we have the same mapper for reslicing of multiple datasets or would this imply creating one mapper for each dataset.</div><div>
<br></div><div>Best regards,</div><div>Cartik</div></span><br><div class="gmail_quote">On Sat, Jan 22, 2011 at 9:52 AM, David Gobbi <span dir="ltr"><<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Dean,<br>
<br>
Thanks for the feedback! I'll add the tcl example to my branch.<br>
<br>
The background issue is what I'm working on right now.  Early next<br>
week you should see an option for whether to fill the viewport (the<br>
current behavior) or to clip at the image bounds.<br>
<br>
For the interactor, I can add key bindings for "X", "Y", and "Z" to<br>
select the view direction.  And "R" for re-centering the view.<br>
<br>
Did you notice that the example didn't need window/level observers?<br>
The new InteractorStyleImage automatically finds the "property" object<br>
and does the adjustment.  With the old vtkImageActor, the users had to<br>
write window/level observers to adjust an external<br>
vtkImageMapToWindowLevelColors object.<br>
<font color="#888888"><br>
  - David<br>
</font><div><div></div><div class="h5"><br>
On Sat, Jan 22, 2011 at 8:15 AM, Dean Inglis <<a href="mailto:dean.inglis@camris.ca">dean.inglis@camris.ca</a>> wrote:<br>
> Hi David,<br>
><br>
> truly amazing! Very easy to scroll or oblique slice.  I couldnt see<br>
> the colored background in the renderer: it seems like the new<br>
> vtkImage/Mapper<br>
> takes up the whole viewport?  It would be nice to have a reset in the<br>
> interactor style<br>
> to reposition the image slice along one of the orthogonal data axes of a 3D<br>
> image,<br>
> but this should be easy to do with a callback.<br>
> Attached is the tcl version for anyone who wants it.<br>
><br>
> Dean<br>
><br>
> ----- Original Message -----<br>
> From: Will Schroeder<br>
> To: David Gobbi<br>
> Cc: VTK Developers<br>
> Sent: Saturday, January 22, 2011 9:32 AM<br>
> Subject: Re: [vtk-developers] A new way to look at images<br>
> David this is very clever and seems pretty intuitive to use (I did not<br>
> actually try it).<br>
> I think my initial (minor) concern is naming, while I think what you've come<br>
> up is pretty good I can see how a novice might get confused.  Did you<br>
> consider something like "ImageResliceActor", "ResliceActor" or simply<br>
> "Reslice"?<br>
> W<br>
><br>
><br>
> On Fri, Jan 21, 2011 at 6:53 PM, David Gobbi <<a href="mailto:david.gobbi@gmail.com">david.gobbi@gmail.com</a>> wrote:<br>
>><br>
>> Hi All,<br>
>><br>
>> I've been experimenting with a new way of rendering 3D images in VTK.<br>
>> So far, it is working fairly well.  Here is a rough description of the<br>
>> new VTK classes I've written:<br>
>><br>
>> vtkImage - a new prop for image viewing, analogous to vtkVolume and<br>
>> vtkActor<br>
>> vtkImageProperty - holds the lookup table, window/level, etc.<br>
>> vtkImageMapper3D - a new mapper that does image reslicing and texturing<br>
>><br>
>> Using these classes is very simple: just set up the camera, and the<br>
>> vtkImage object will automatically display the slice at the camera<br>
>> focal point.  To show a different slice, just move the focal point so<br>
>> that it lies at a different position in the 3D image.  To slice in a<br>
>> different orientation, rotate the camera around the focal point.  In<br>
>> other words, the slicing is completely controlled by the camera.  This<br>
>> makes everything work nicely with the VTK interactors, and also<br>
>> simplifies the intermixing of images and geometry.<br>
>><br>
>> My reason for making this class is that I've seen plenty of users on<br>
>> the list who struggle with vtkImageReslice and with vtkImageViewer.  I<br>
>> wanted to make it as easy to view an image in VTK as it is to view an<br>
>> actor. I have the code on my github account<br>
>> git://<a href="http://github.com/dgobbi/VTK.git" target="_blank">github.com/dgobbi/VTK.git</a> in the branch "image-prop"<br>
>> <a href="http://github.com/dgobbi/VTK/tree/image-prop" target="_blank">http://github.com/dgobbi/VTK/tree/image-prop</a><br>
>><br>
>> The code includes a modified vtkInteractorStyleImage class that has<br>
>> new interactions for rotating the camera with shift-leftbutton (for<br>
>> oblique slicing) and for adjusting the focal point with<br>
>> shift-middlebutton (for slicing through the image).  There is also a<br>
>> python example in Examples/ImageProcessing/Python/ImageMapper3D.py.<br>
>> All of this is still preliminary development, but so far I haven't<br>
>> encountered any show-stopping bugs.<br>
>><br>
>> Please let me know what you think.  I'll try to make a wiki page with<br>
>> more details next week.<br>
>><br>
>>  - David<br>
>> _______________________________________________<br>
>> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
>><br>
>> Visit other Kitware open-source projects at<br>
>> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
>><br>
>> Follow this link to subscribe/unsubscribe:<br>
>> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
>><br>
><br>
><br>
><br>
> --<br>
> William J. Schroeder, PhD<br>
> Kitware, Inc.<br>
> 28 Corporate Drive<br>
> Clifton Park, NY 12065<br>
> <a href="mailto:will.schroeder@kitware.com">will.schroeder@kitware.com</a><br>
> <a href="http://www.kitware.com" target="_blank">http://www.kitware.com</a><br>
> (518) 881-4902<br>
><br>
> ________________________________<br>
><br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
><br>
><br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br>