[vtkusers] Moving 2D image in 3D space

David.Pont at ForestResearch.co.nz David.Pont at ForestResearch.co.nz
Mon Feb 17 15:34:23 EST 2003


Hi Raphael,
  Yes now you mention it I did find it slow, but I just lived with it. Well
done for finding the cause. I suppose if you can pre-process your images to
be power-of-2 dimensions you can speed up processing. vtkImageConstantPad
should do it. You would have to change the texture coordinates associated
with the vtkPlaneSource if you need to manage positions, sizes etc in terms
of the original image coordinates. I cant think of a better way offhand,
and padding should be faster than resampling.

   Dave Pont



|--------+--------------------------------->
|        |          Raphael Sebbe          |
|        |          <raphael.sebbe at tcts.fpm|
|        |          s.ac.be>               |
|        |          Sent by:               |
|        |          vtkusers-admin at public.k|
|        |          itware.com             |
|        |                                 |
|        |                                 |
|        |          18/02/2003 03:12       |
|        |                                 |
|--------+--------------------------------->
  >------------------------------------------------------------------------------------------------------------|
  |                                                                                                            |
  |      To:                                                                                                   |
  |      cc:     vtkusers at public.kitware.com                                                                   |
  |      Subject:     Re: [vtkusers] Moving 2D image in 3D space                                               |
  >------------------------------------------------------------------------------------------------------------|




Sampler tells me it comes from
vtkOpenGLTexture::ResampleToPowerOfTwo(), where almost half of the CPU
time is spent. I guess next step is to render it to black padded, power
of two sized image and use texture coordinates that fit only a region
of that. Or is there an easier route ?

Raphael

On Monday, February 17, 2003, at 02:52 PM, Raphael Sebbe wrote:

> Thanks, that works. But it is slow. I don't understand why, as it
> should come down to the same set of GL commands in the end (when
> compared to image actor).
>
> Raphael
>
>
> On Sunday, February 16, 2003, at 10:29 PM,
> David.Pont at ForestResearch.co.nz wrote:
>

_______________________________________________
This is the private VTK discussion list.
Please keep messages on-topic. Check the FAQ at: <
http://public.kitware.com/cgi-bin/vtkfaq>
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/vtkusers







More information about the vtkusers mailing list