[vtkusers] Followup on 2D visualization questions...

Terry J. Ligocki tjligocki at lbl.gov
Tue Aug 22 13:31:14 EDT 2000


About two and a half weeks ago I sent out a message to this list asking
for general and specific information about 2D vis. and VTK.  I also
asked for people's experiences.  I wanted to followup up in the message,
let people know what I found out, what I have decided to do, and ask a
few more specific questions.

I want to thank Hank Childs (LLNL) and Robert Stein (NCSA) for their
e-mails.  Nothing was posted to this group but I would be happy to
forward their comments (with their permission, of course!) if there was
interest.

Basically they both map their 2D stuff (sometimes using texture maps)
onto 3D objects and then restrict the interaction to 2D (i.e. only
rotations about the z axis) as necessary.  This looks like the approach
I will be using.  It will actually be a combination of techniques.
First I will produce a composite image from all the different data
grids/images and then I will texture map this onto a 3D rectangle.  All
the overlays (grid bounding boxes, contours, etc.) will then be placed
"above" this in Z (with orthogonal projection turned on).  I will be
padding the texture map to power of 2 dimensions and then mapping the
unpadded portion (the original data) to my rectangle.

I know VTK will resample my texture to handle this but for this
application it isn't acceptable to resample the data - I need the
original representation and resolution.  By the way, it would be nice to
have the option with texture maps in VTK to either resample (current
setup) or pad (and use the unpadded portion of the texture map) - of
course, a lot of things would be nice to have in VTK if you're simply
asking for them, :-).

QUESTIONS (here are a few lingering, specific questions I have about 2D
stuff in VTK):

   * In "vtkActor2D" there is a "SetLayerNumber" method.  I have tried
     to use this to set the order in which different actors will be
     drawn but it hasn't had any effect.  Specifically, I define two 2D
     actors and I set one to have layer number 0 and one to have layer
     number 1.  I add each actor to a "vtkImager" (or "vtkRenderer") and
     all that seems to matter is the order the 2D actors are added to
     the imager (i.e. the first actor added is drawn first, the second
     actor added is drawn second).  The layer number doesn't seem to
     have any effect.

     My guess is that I am misunderstanding what layer numbers are for
     but I haven't been able to find any description of what this is
     supposed to do.  Several examples use "SetLayerNumber" but when I
     modified the example to not use this (or changed the layer numbers
     around) nothing changed in the example.  The only change occurred
     when I changed the order the actors were added to the imager or
     renderer.

   * In the "vtkProperty2D" for an "vtkActor2D" there is a "SetOpacity"
     method.  It doesn't seem to matter what I set this to, the image I
     am displaying (via "vtkImager" or "vtkRenderer") is always opaque.
     Is this correct behavior?  Is there any way to make an image
     translucent without changing the original colormapping to have an
     opacity component (e.g. an alpha channel/value)?

I would still be very interested in any description of the image
capabilities of VTK which included descriptions of the use of the
various classes and the sematics of their methods.

In any case, it has been helpful to have this forum to ask about these
(and other!) things and I thank everyone for their time, help, patience,
and guidance...

                Terry J. (Ligocki, tjligocki at lbl.gov, (510)486-6140)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20000822/f1134d19/attachment.htm>


More information about the vtkusers mailing list