[vtkusers] Bitmap and Slider help

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Mon Feb 3 16:01:46 EST 2003


Hi Shawn,
   I have done something like this in the past. I had vtkTIFFReader (you
want vtkBMPReader) and used GetDataExtent to get the image dimensions.
Input the image to a vtkTexture. Use vtkPlaneSource to create a plane and
SetPoint0, 1 and 2 to size the plane to the image dimensions.
vtkTransformPolyDataFilter and vtkTransform to apply global scaling and
positioning to the plane (optional for you?), then to a mapper and actor.
On the actor use SetTexture to apply the image to the plane.
When the slider moves, get its position and use to set the opacity with
actor->GetProperty()->SetOpacity.
It seems you only need to blend between two consecutive images. You just
need to figure out a way to map the slider position to: a-the correct 2
images; b-the relative opacity of the images.
Check out vtkImageBlend, it might be useful, with this you might only need
a single plane?? Otherwise you should get away with two planes by calling
actor->SetTexture with the appropriate two images and then SetOpacity.

  good luck
      Dave Pont



|--------+--------------------------------->
|        |          "shawn b"              |
|        |          <brewinull at hotmail.com>|
|        |          Sent by:               |
|        |          vtkusers-admin at public.k|
|        |          itware.com             |
|        |                                 |
|        |                                 |
|        |          01/02/2003 07:12       |
|        |                                 |
|--------+--------------------------------->
  >------------------------------------------------------------------------------------------------------------|
  |                                                                                                            |
  |      To:     vtkusers at public.kitware.com                                                                   |
  |      cc:                                                                                                   |
  |      Subject:     [vtkusers] Bitmap and Slider help                                                        |
  >------------------------------------------------------------------------------------------------------------|




I am pretty new to VTK and I am trying to figure out a few things.  I am
trying to make a final product that displays a string of bitmap files(one
after another) and fades out the displayed bitmap so the next one can be
seen.  I am also trying to add a slider bar that can be used to scroll
through the files(used to determine which image is being displayed).

The way I am thinking about accopmlishing this is by creating a plane for
each bitmap and mapping the bitmap onto the plane's surface.

However, I am at a loss as to how I can fade the images so the next can be
seen and how to link everything to a slider bar.

Any suggestions or ideas as to what files I should look at to accomplish
any of the above would be greatly appreciated.

MSN 8 helps ELIMINATE E-MAIL VIRUSES. Get 2 months FREE*.
_______________________________________________ This is the private VTK
discussion list. Please keep messages on-topic. Check the FAQ at: Follow
this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers






More information about the vtkusers mailing list