[vtkusers] vtkImageMapper
David Gobbi
david.gobbi at gmail.com
Fri Sep 23 13:03:13 EDT 2011
On Fri, Sep 23, 2011 at 7:30 AM, David Doria <daviddoria at gmail.com> wrote:
> Though this class is probably deprecated by the new
> vtkImageSliceMapper, we should probably have some record of how it is
> intended to be used. I gave it a shot:
>
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Broken/Visualization/ImageMapper
>
> but all I get is a blank window. Anyone know what is going wrong here?
When I ran the example, I saw a small 20x20 red-and-green image in the
corner of the window, just like I would expect. Your image is just a
little small, I think.
The vtkImageMapper is a 2D mapper, which means that it uses display
coordinates. In display coordinates, one image pixel is always one
screen pixel. So you should get rid of the call to ResetCamera(), the
camera settings have no effect on the display of 2D actors.
Also, just to be clear on this point, the vtkImageMapper is not
deprecated. It is a 2D mapper for displaying images in display
coordinates. In contrast, the vtkImageMapper3D classes are for
displaying images in world coordinates.
- David
More information about the vtkusers
mailing list