vtkImageViewer2 Class Reference
#include <vtkImageViewer2.h>
Inheritance diagram for vtkImageViewer2:
[legend]Collaboration diagram for vtkImageViewer2:
[legend]List of all members.
Detailed Description
Display a 2D image.
vtkImageViewer2 is a convenience class for displaying a 2D image. It packages up the functionality found in vtkRenderWindow, vtkRenderer, vtkImageActor and vtkImageMapToWindowLevelColors into a single easy to use class. This class also creates an image interactor style (vtkInteractorStyleImage) that allows zooming and panning of images, and supports interactive window/level operations on the image. Note that vtkImageViewer2 is simply a wrapper around these classes.
vtkImageViewer2 uses the 3D rendering and texture mapping engine to draw an image on a plane. This allows for rapid rendering, zooming, and panning. The image is placed in the 3D scene at a depth based on the z-coordinate of the particular image slice. Each call to SetZSlice() changes the image data (slice) displayed AND changes the depth of the displayed slice in the 3D scene. This can be controlled by the AutoResetCameraClippingRange ivar.
It is possible to mix images and geometry, using the methods:
viewer->SetInput( myImage ); viewer->GetRenderer()->AddActor( myActor );
This can be used to annotate an image with a PolyData of "edges" or or highlight sections of an image or display a 3D isosurface with a slice from the volume, etc. Any portions of your geometry that are in front of the displayed slice will be visible; any portions of your geometry that are behind the displayed slice will be obscured. A more general framework (with respect to viewing direction) for achieving this effect is provided by the vtkImagePlaneWidget .
- See also:
- vtkRenderWindow vtkRenderer vtkImageActor vtkImageMapToWindowLevelColors
- Created by:
-
- CVS contributions (if > 5%):
- Martin, Ken (53%)
- Cedilnik, Andy (12%)
- Schroeder, Will (10%)
- Barre, Sebastien (8%)
- Malaterre, Mathieu (7%)
- Miller, Jim (5%)
- CVS logs (CVSweb):
.cxx (/Rendering/vtkImageViewer2
.cxx)
.h (/Rendering/vtkImageViewer2
.h)
- Tests:
- vtkImageViewer2 (Tests)
Definition at line 82 of file vtkImageViewer2.h.
Member Typedef Documentation
Constructor & Destructor Documentation
vtkImageViewer2::vtkImageViewer2 |
( |
|
) |
[protected] |
|
Member Function Documentation
|
Create an object with Debug turned off, modified time initialized to zero, and reference counting on.
Reimplemented from vtkObject. |
virtual const char* vtkImageViewer2::GetClassName |
( |
|
) |
[virtual] |
|
int vtkImageViewer2::IsTypeOf |
( |
const char * |
type |
) |
[static] |
|
|
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkObject. |
virtual int vtkImageViewer2::IsA |
( |
const char * |
type |
) |
[virtual] |
|
|
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeRevisionMacro found in vtkSetGet.h.
Reimplemented from vtkObject. |
void vtkImageViewer2::PrintSelf |
( |
ostream & |
os, |
|
|
vtkIndent |
indent |
|
) |
[virtual] |
|
|
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkObject. |
char* vtkImageViewer2::GetWindowName |
( |
|
) |
[inline] |
|
virtual void vtkImageViewer2::Render |
( |
void |
|
) |
[virtual] |
|
|
Render the resulting image. |
void vtkImageViewer2::SetInput |
( |
vtkImageData * |
in |
) |
[inline] |
|
int vtkImageViewer2::GetWholeZMin |
( |
|
) |
[inline] |
|
int vtkImageViewer2::GetWholeZMax |
( |
|
) |
[inline] |
|
virtual int vtkImageViewer2::GetAutoResetCameraClippingRange |
( |
|
) |
[virtual] |
|
virtual void vtkImageViewer2::SetAutoResetCameraClippingRange |
( |
int |
|
) |
[virtual] |
|
virtual void vtkImageViewer2::AutoResetCameraClippingRangeOn |
( |
|
) |
[virtual] |
|
virtual void vtkImageViewer2::AutoResetCameraClippingRangeOff |
( |
|
) |
[virtual] |
|
int vtkImageViewer2::GetZSlice |
( |
|
) |
[inline] |
|
void vtkImageViewer2::SetZSlice |
( |
int |
s |
) |
|
|
|
Set/Get the current z-slice to display. |
double vtkImageViewer2::GetColorWindow |
( |
|
) |
[inline] |
|
|
Set window and level for mapping pixels to colors.
Definition at line 122 of file vtkImageViewer2.h. |
double vtkImageViewer2::GetColorLevel |
( |
|
) |
[inline] |
|
|
Set window and level for mapping pixels to colors.
Definition at line 123 of file vtkImageViewer2.h. |
void vtkImageViewer2::SetColorWindow |
( |
double |
s |
) |
[inline] |
|
|
Set window and level for mapping pixels to colors.
Definition at line 124 of file vtkImageViewer2.h. |
void vtkImageViewer2::SetColorLevel |
( |
double |
s |
) |
[inline] |
|
|
Set window and level for mapping pixels to colors.
Definition at line 125 of file vtkImageViewer2.h. |
void vtkImageViewer2::SetDisplayId |
( |
void * |
a |
) |
[inline] |
|
void vtkImageViewer2::SetWindowId |
( |
void * |
a |
) |
[inline] |
|
void vtkImageViewer2::SetParentId |
( |
void * |
a |
) |
[inline] |
|
int* vtkImageViewer2::GetPosition |
( |
|
) |
[inline] |
|
|
Set/Get the position in screen coordinates of the rendering window.
Definition at line 137 of file vtkImageViewer2.h. |
void vtkImageViewer2::SetPosition |
( |
int |
a, |
|
|
int |
b |
|
) |
[inline] |
|
|
Set/Get the position in screen coordinates of the rendering window.
Definition at line 138 of file vtkImageViewer2.h. |
virtual void vtkImageViewer2::SetPosition |
( |
int |
a[2] |
) |
[virtual] |
|
|
Set/Get the position in screen coordinates of the rendering window. |
int* vtkImageViewer2::GetSize |
( |
|
) |
[inline] |
|
|
Set/Get the size of the window in screen coordinates.
Definition at line 144 of file vtkImageViewer2.h. |
void vtkImageViewer2::SetSize |
( |
int |
a, |
|
|
int |
b |
|
) |
[inline] |
|
|
Set/Get the size of the window in screen coordinates.
Definition at line 145 of file vtkImageViewer2.h. |
virtual void vtkImageViewer2::SetSize |
( |
int |
a[2] |
) |
[virtual] |
|
|
Set/Get the size of the window in screen coordinates. |
|
Get the internal render window, renderer, image actor, and image map instances. |
virtual vtkRenderer* vtkImageViewer2::GetRenderer |
( |
|
) |
[virtual] |
|
|
Get the internal render window, renderer, image actor, and image map instances. |
virtual vtkImageActor* vtkImageViewer2::GetImageActor |
( |
|
) |
[virtual] |
|
|
Get the internal render window, renderer, image actor, and image map instances. |
|
Get the internal render window, renderer, image actor, and image map instances. |
|
Create and attach an interactor for the internal render window. |
void vtkImageViewer2::SetOffScreenRendering |
( |
int |
|
) |
|
|
|
Create a window in memory instead of on the screen. This may not be supported for every type of window and on some windows you may need to invoke this prior to the first render. |
int vtkImageViewer2::GetOffScreenRendering |
( |
|
) |
|
|
|
Create a window in memory instead of on the screen. This may not be supported for every type of window and on some windows you may need to invoke this prior to the first render. |
void vtkImageViewer2::OffScreenRenderingOn |
( |
|
) |
|
|
|
Create a window in memory instead of on the screen. This may not be supported for every type of window and on some windows you may need to invoke this prior to the first render. |
void vtkImageViewer2::OffScreenRenderingOff |
( |
|
) |
|
|
|
Create a window in memory instead of on the screen. This may not be supported for every type of window and on some windows you may need to invoke this prior to the first render. |
Member Data Documentation
The documentation for this class was generated from the following file: