[vtkusers] RE: picking in a vtkTkImageViewerWidget

Lederer, Maitland mlederer at foster-miller.com
Thu Dec 2 09:49:15 EST 2004


Hey all-

I apologize for the repeated posts, but this is actually a matter of
some time sensitivity.  Has anybody here used vtkPropPicker with
vtkTkImageViewerWidget?  Is there some reason why it can't be done or is
particularly tricky?  Is there any information out there that you can
point me to?

Again, I apologize for repeating myself, but if I can't figure this out
in the next couple of days, my boss will be seriously unhappy . . .

-Maitland

-----Original Message-----
From: Lederer, Maitland 
Sent: Wednesday, December 01, 2004 10:23 AM
To: vtkusers at vtk.org
Subject: picking in a vtkTkImageViewerWidget

Hey users-

I'd like to pick a point in a vtkTkImageViewerWidget using a
vtkPropPicker and I'm running into a problem.  The picker is not finding
any vtkProps, despite the fact that there is one in the renderer's
vtkPropCollection.  Can anyone offer any suggestions?  Some of my code
(Tcl/Tk) is below.

Any help appreciated.  Thanks muchly.

-Maitland

set ::rf2D [vtkTkImageViewerWidget $::renderFrame.r2f -width 1024
-height 1024]
[$::rf2D GetImageViewer] SetColorWindow 255
[$::rf2D GetImageViewer] SetColorLevel 128
# slider for 2D view
scale $::renderFrame.s2 -orient horizontal -command SetVisibleSlice \
    -from [lindex $::extent 4] -to [lindex $::extent 5] -length 1000
grid $::rf2D -row 1 -column 2 
grid $::renderFrame.s2 -row 2 -column 2
::vtk::bind_tk_imageviewer_widget $::rf2D
bind $::rf2D <KeyRelease> { } 
bind $::rf2D <Expose> "$::rf2D Render"

**************************
M. Maitland Lederer
Staff Engineer 
Foster-Miller, Inc.
(781)684-4618





More information about the vtkusers mailing list