[vtkusers] SeedWidget with ImageViewer2 to get 3D locations

Bryn Lloyd blloyd at vision.ee.ethz.ch
Fri Feb 20 02:51:19 EST 2009


I have written a simple viewer which inherits from vtkImageViewer2 and 
has picking added as well as an observer to move between slices.

You can have a look at the code here:

http://people.ee.ethz.ch/~blloyd/ImageViewer/

You can switch picking On and Off by pressing 's' (for seed). Use the 
arrows (Up/Down) >,< for scrolling through slices.

-Bryn



kent williams wrote:
> I suspect that while it reports 3D points, they're really 2D, and you
> have to fill in the Z coordinate.  You should know this anyway since
> you use the sliderWidget to scroll through the volume.
> 
> I'm curious about your application. We're going to do the same thing
> for picking points of interest in a volume.  Another developer in our
> team is working on that, so I don't have hands on experience with the
> vtkSeedWidget yet, but I suspect that it has the same idiosyncrasy
> with respect to the coordinate system in which it reports points.  It
> has methods that have 'WorldCoordinates' in the name, but in fact, the
> X,Y,Z values are permuted such that X and Y are X and Y in the viewing
> plane, and Z is the direction perpendicular to the viewing plane.
> 
> We use vtkinria3d's synchronized views instead of vtkImageViewer2, and
> I don't know if the idea of coordinate systems in 2D views are exactly
> the same, but we additionally have to negate the Y coordinate in Axial
> views. So if your point values look upside down, that's one thing to
> consider ;-)
> 
> On Thu, Feb 19, 2009 at 7:06 AM, Mark Gooding <mark.gooding at gmail.com> wrote:
>> Hi there,
>>
>> I'm using an ImageViewer2 with a sliderWidget to scroll through a
>> volume image (following an example I found in the archives when
>> searching for a solution to this problem). I am also using a
>> SeedWidget to select points from the current slice. The display XY
>> co-ordinate seems to be picked correctly, however the slice selected
>> by the seed widget is not the current slice, but appears to be fixed.
>> Has anyone done something like this? Some pointers would be helpful.
>>
>> thanks,
>>
>> mark
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtkusers
>>
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
> 


-- 
-------------------------------------------------
Bryn Lloyd
Computer Vision Laboratory
ETH Zürich, Sternwartstrasse 7
CH - 8092 Zürich, Switzerland
Tel: +41 44 63 26668
Fax: +41 44 63 21199
-------------------------------------------------



More information about the vtkusers mailing list