[vtkusers] OrientationMarkerWidget question from VTK newbie

Romy Schneider romy at tacc.utexas.edu
Fri Sep 22 11:38:34 EDT 2006


Dean,

Thanks for the reply.    I'm probably using this widget incorrectly,  
but what I want is a small set of 3D axes in the lower left hand  
corner, like Paraview has.   I don't want any sort of axes around the  
data.  The issue is, I can produce the small set of axes in the  
corner just as I want them (small, non-interactive, etc), but I also  
have a set of axes drawn near my data set.  Actually, what VTK draws  
is really tiny axes with huge axes labels.  Calls to SetFontSize( i )  
have absolutely no effect (although I can change the font type, bold,  
italicize, etc:  I'm running VTK with Carbon on an Intel MacBook Pro,  
I figure this is just a bug).  Here's my code (I'm just starting out  
at VTK...).

...

# add orientation axes
vtkAxesActor axes

vtkOrientationMarkerWidget marker
marker SetOrientationMarker axes
marker SetViewport 0.0 0.0 0.15 0.2

#  RENDERER
vtkRenderer ren1
ren1 AddActor imageActor
ren1 AddActor axes
ren1 SetBackground 0.0 0.0 0.0

#  RENDER WINDOW
vtkRenderWindow renWin
renWin AddRenderer ren1

set vtkw [vtkTkRenderWidget .ren -width 600 -height 600 -rw renWin]
# launch the vtk/tk interactor (command line) window
wm deiconify .vtkInteract

#
# Setup Tk bindings and VTK observers for that widget.
#
::vtk::bind_tk_render_widget $vtkw

# set interactor for the render widget and orientation marker?
set iact [[$vtkw GetRenderWindow] GetInteractor]
vtkInteractorStyleTrackballCamera style
$iact SetInteractorStyle style

marker SetInteractor $iact
marker SetEnabled 1
marker InteractiveOff
...


I've attached a screenshot, but I'm not sure if it will come through  
(I haven't seen any other attachments in the mailinglist).  The  
unwanted axes appear right next to the data slice, there's a small  
green dot (for the incredibly tiny axes it's drawing) and large white  
X, Y, Z, overlain on each other.   So, how do I make those go away  
while keeping the small orientation marker in the lower left hand  
corner?

Thanks for your help!

Romy




On Sep 21, 2006, at 9:43 PM, Dean Inglis wrote:

> Hi Romy,
>
> I'm not sure what you want here.  The axes actor has
> 3D polydata representing the axes as tubes with cones
> for arrows and text for labels.  The axes are
> the "marker" that marks out the orientation.  You can
> also have a marker that is a cube with labels for
> different directions.  The whole idea when I wrote this
> class was to use the widget to accommodate the x-y-z arrow axes
> as seen in ParaView and the cube with anatomical direction labels
> as seen in VolView.  the widget allows the user to move it
> around the render window for interactive placement.
> Can you be a bit more specific about what you want to visualize?
>
> Dean
>
>> however I don't want the main set of axes visible, just the
>> orientation marker.  How do I accomplish this?  When I set the
>> vtkAxesActor visibility off with VisibilityOff(), the orientation
>> maker widget goes away as well.  I searched around and tinkered a
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060922/d1de354d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot.tiff
Type: image/tiff
Size: 129708 bytes
Desc: not available
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060922/d1de354d/attachment.tiff>


More information about the vtkusers mailing list