[vtkusers] Followup on 2D visualization questions...
Lyubomir Zagorchev
lzagorch at verizon.net
Sun Dec 4 19:51:02 EST 2005
Hi Terry,
I came across an old massage on the vtk message board that was posted
by you. Amazingly, more than five years after your post, I going the same
way. I am trying to overlay two 2D images, but I am having the same
problems with vtkActor2D... ("SetOpacity" and "SetLayerNumber")
I am not sure if this e-mail will get to you, but if it does, could you please
let me know how I can do that? I would really appreciate your help.
Thank you,
Lyubomir
======================================================
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...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20051204/2b4d271f/attachment.htm>
More information about the vtkusers
mailing list