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