<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2769" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#c0c0c0>
<DIV>
<DIV>
<DIV>Hi Terry,</DIV>
<DIV> </DIV>
<DIV>I came across an old massage on the vtk message board that was posted
</DIV>
<DIV>by you. Amazingly, more than five years after your post, I going the
same</DIV>
<DIV>way. I am trying to overlay two 2D images, but I am having the same </DIV>
<DIV>problems with vtkActor2D... ("SetOpacity" and "SetLayerNumber")</DIV>
<DIV> </DIV>
<DIV>I am not sure if this e-mail will get to you, but if it does, could
you please</DIV>
<DIV>let me know how I can do that? I would really appreciate your help.</DIV>
<DIV> </DIV>
<DIV>Thank you,</DIV>
<DIV> </DIV>
<DIV>Lyubomir</DIV>
<DIV> </DIV>
<DIV>======================================================</DIV>
<DIV>About two and a half weeks ago I sent out a message to this list
asking<BR>for general and specific information about 2D vis. and VTK. I
also<BR>asked for people's experiences. I wanted to followup up in the
message,<BR>let people know what I found out, what I have decided to do, and ask
a<BR>few more specific questions.<BR><BR>I want to thank Hank Childs (LLNL) and
Robert Stein (NCSA) for their<BR>e-mails. Nothing was posted to this group
but I would be happy to<BR>forward their comments (with their permission, of
course!) if there was<BR>interest.<BR><BR>Basically they both map their 2D stuff
(sometimes using texture maps)<BR>onto 3D objects and then restrict the
interaction to 2D (i.e. only<BR>rotations about the z axis) as necessary.
This looks like the approach<BR>I will be using. It will actually be a
combination of techniques.<BR>First I will produce a composite image from all
the different data<BR>grids/images and then I will texture map this onto a 3D
rectangle. All<BR>the overlays (grid bounding boxes, contours, etc.) will
then be placed<BR>"above" this in Z (with orthogonal projection turned
on). I will be<BR>padding the texture map to power of 2 dimensions and
then mapping the<BR>unpadded portion (the original data) to my
rectangle.<BR><BR>I know VTK will resample my texture to handle this but for
this<BR>application it isn't acceptable to resample the data - I need
the<BR>original representation and resolution. By the way, it would be
nice to<BR>have the option with texture maps in VTK to either resample
(current<BR>setup) or pad (and use the unpadded portion of the texture map) -
of<BR>course, a lot of things would be nice to have in VTK if you're
simply<BR>asking for them, :-).<BR><BR>QUESTIONS (here are a few lingering,
specific questions I have about 2D<BR>stuff in VTK):<BR><BR> * In
"vtkActor2D" there is a "SetLayerNumber" method. I have
tried<BR> to use this to set the order in which
different actors will be<BR> drawn but it hasn't had any
effect. Specifically, I define two 2D<BR> actors
and I set one to have layer number 0 and one to have
layer<BR> number 1. I add each actor to a
"vtkImager" (or "vtkRenderer") and<BR> all that seems to
matter is the order the 2D actors are added to<BR> the
imager (i.e. the first actor added is drawn first, the
second<BR> actor added is drawn second). The layer
number doesn't seem to<BR> have any
effect.<BR><BR> My guess is that I am misunderstanding
what layer numbers are for<BR> but I haven't been able
to find any description of what this is<BR> supposed to
do. Several examples use "SetLayerNumber" but when
I<BR> modified the example to not use this (or changed
the layer numbers<BR> around) nothing changed in the
example. The only change occurred<BR> when I
changed the order the actors were added to the imager
or<BR> renderer.<BR><BR> * In the
"vtkProperty2D" for an "vtkActor2D" there is a
"SetOpacity"<BR> method. It doesn't seem to matter
what I set this to, the image I<BR> am displaying (via
"vtkImager" or "vtkRenderer") is always opaque.<BR> Is
this correct behavior? Is there any way to make an
image<BR> translucent without changing the original
colormapping to have an<BR> opacity component (e.g. an
alpha channel/value)?<BR><BR>I would still be very interested in any description
of the image<BR>capabilities of VTK which included descriptions of the use of
the<BR>various classes and the sematics of their methods.<BR><BR>In any case, it
has been helpful to have this forum to ask about these<BR>(and other!) things
and I thank everyone for their time, help, patience,<BR>and
guidance...<BR></DIV></DIV></DIV></BODY></HTML>