[vtkusers] Mixing images with 3D geometry

Chris Volpe ARA/SED cvolpe at ara.com
Fri Jul 1 17:46:49 EDT 2011


Hi David-

Repositioning the actor seems fairly straightforward, but is there a image resize filter, or do I need to use something more generic like a vtkProbeFilter?

thanks,

-Chris


> -----Original Message-----
> From: David Gobbi [mailto:david.gobbi at gmail.com]
> Sent: Friday, July 01, 2011 11:12 AM
> To: Chris Volpe ARA/SED
> Cc: vtkusers
> Subject: Re: [vtkusers] Mixing images with 3D geometry
> 
> Hi Chris,
> 
> The way to do this is with vtkActor2D and vtkImageMapper.  Since
> vtkImageMapper uses display coordinates, you will have to resample
> the image to the correct size and repositiion the actor every time the
> window size changes.
> 
>  - David
> 
> On Fri, Jul 1, 2011 at 7:27 AM, Chris Volpe ARA/SED <cvolpe at ara.com>
> wrote:
> > This seems like it should be an easy thing to do, but none of the
> > documentation or examples I've seen seem to do what I want. I would
> like to
> > draw 3D geometry on top of a 2D background image. I want the image to
> > subtend a fixed angular extent, e.g. if the camera FOV is 30deg, and
> I
> > define the image as 30deg, I want it to fill the vertical extent of
> the
> > render window (assuming the camera is not set to Use Horizontal View
> Angle)
> > . I want *all* 3D geometry also in the scene to be drawn on top of
> the image
> > - i.e. the image shouldn't have a "position" which would allow it to
> obscure
> > the 3D geometry. When I change the camera pose, I want to provide a
> new
> > image, but I don't want the image to be viewed at an oblique angle -
> I want
> > it to be centered facing the camera again. vtkImageActor just maps an
> image
> > onto a planar surface sitting out in space and doesn't maintain its
> place
> > and orientation  in the render window. Basically, I want the
> functionality
> > of vtkFollower, but in addition to automatically correcting its
> orientation
> > so that it always faces the camera, I want it to automatically
> correct its
> > position so that it's always in the center of the field of view and
> always
> > at the right distance. Does this functionality exist anywhere or do I
> need
> > to jump through some hoops in my render loop to achieve this?
> >
> >
> >
> > Thanks,
> >
> >
> >
> > Chris
> >
> > --
> > Christopher R. Volpe,
> > Ph.D.
> Email:
> > cvolpe at ara.com
> >
> > Senior Scientist, Information Exploitation Systems             Main
> Desk:
> > 919-582-3300
> >
> > Applied Research Associates,
> > Inc                                                     Direct: 919-
> 582-3380
> >
> > 8537 Six Forks Rd., Suite
> > 6000                                                            Fax :
> > 919-582-3301
> >
> > Raleigh, NC 27615                                         Web:
> > http://www.ara.com/offices/NC.htm



More information about the vtkusers mailing list