[vtk-developers] vtkImagePlaneWidget fixes before release

Dean Inglis dean.inglis at on.aibn.com
Fri Apr 19 14:54:10 EDT 2002


Will,


> >   I have a problem with the cross
> >hairs though: to determine which side of the vtkPlaneSource to plot the
> >cross hairs on I take the dot product with the plane normal and
> the current
> >camera's direction of projection. If the plane is zoomed in too
> closely this
> >does not work: either the cross hairs are not plotted or they
> are plotted on
> >the flip side.
>
> To make sure the lines draw on top of the plane, invoke the method
> vtkMapper::SetResolveCoincidentTopologyToPolygonOffset(). You may have to
> change the order in which the line actor is added relative to the plane
> (I'm not sure about this).
>

That works beautifully: no longer any need to use the camera direction/dot
product/offset/ method...but a problem still exists with seeing cross-hairs
when the plane is appears too close in the render window.   The picking is
obviously working: the plane is highlighted and the image coords and data
are reflected in the text mapper/actor output but the cross-hairs are not
there ?!!

Some proposals for the current vtkImagePlaneWidget:

1) as one rotates the plane, because the PlaneProperty and
SelectedPlaneProperty have their AmbientColor set, the color gradually fades
away to white.  The outline color should be independent of actor/camera
postion in my opinion so property->SetAmbientColor() should be replced with
property->SetColor()

2) remove the this->PlaneOutline altogether since the same 'outline' effect
can be achieved with this->PlaneSource->SetResolution(1).  As a consequence:
   2b) the PositionHandles() method can be removed
   2c) in SetRepresentation(), remove this->PlaneMapper->SetInput(
this->PlaneOutline );

Dean






More information about the vtk-developers mailing list