|
virtual vtkTypeBool | IsA (const char *type) |
| Return 1 if this class is the same type of (or a subclass of) the named class. More...
|
|
vtkImageViewer2 * | NewInstance () const |
|
void | PrintSelf (ostream &os, vtkIndent indent) override |
| Methods invoked by print to print information about the object including superclasses. More...
|
|
virtual const char * | GetWindowName () |
| Get the name of rendering window. More...
|
|
virtual void | Render (void) |
| Render the resulting image. More...
|
|
virtual int | GetSliceOrientation () |
|
virtual void | SetSliceOrientation (int orientation) |
|
virtual void | SetSliceOrientationToXY () |
|
virtual void | SetSliceOrientationToYZ () |
|
virtual void | SetSliceOrientationToXZ () |
|
virtual void | UpdateDisplayExtent () |
| Update the display extent manually so that the proper slice for the given orientation is displayed. More...
|
|
virtual void | SetupInteractor (vtkRenderWindowInteractor *) |
| Attach an interactor for the internal render window. More...
|
|
|
virtual void | SetInputData (vtkImageData *in) |
| Set/Get the input image to the viewer. More...
|
|
virtual vtkImageData * | GetInput () |
| Set/Get the input image to the viewer. More...
|
|
virtual void | SetInputConnection (vtkAlgorithmOutput *input) |
| Set/Get the input image to the viewer. More...
|
|
|
virtual int | GetSlice () |
| Set/Get the current slice to display (depending on the orientation this can be in X, Y or Z). More...
|
|
virtual void | SetSlice (int s) |
| Set/Get the current slice to display (depending on the orientation this can be in X, Y or Z). More...
|
|
|
virtual int | GetSliceMin () |
| Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). More...
|
|
virtual int | GetSliceMax () |
| Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). More...
|
|
virtual void | GetSliceRange (int range[2]) |
| Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). More...
|
|
virtual void | GetSliceRange (int &min, int &max) |
| Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). More...
|
|
virtual int * | GetSliceRange () |
| Return the minimum and maximum slice values (depending on the orientation this can be in X, Y or Z). More...
|
|
|
virtual double | GetColorWindow () |
| Set window and level for mapping pixels to colors. More...
|
|
virtual double | GetColorLevel () |
| Set window and level for mapping pixels to colors. More...
|
|
virtual void | SetColorWindow (double s) |
| Set window and level for mapping pixels to colors. More...
|
|
virtual void | SetColorLevel (double s) |
| Set window and level for mapping pixels to colors. More...
|
|
|
virtual void | SetDisplayId (void *a) |
| These are here when using a Tk window. More...
|
|
virtual void | SetWindowId (void *a) |
| These are here when using a Tk window. More...
|
|
virtual void | SetParentId (void *a) |
| These are here when using a Tk window. More...
|
|
|
virtual int * | GetPosition () |
| Set/Get the position in screen coordinates of the rendering window. More...
|
|
virtual void | SetPosition (int a, int b) |
| Set/Get the position in screen coordinates of the rendering window. More...
|
|
virtual void | SetPosition (int a[2]) |
| Set/Get the position in screen coordinates of the rendering window. More...
|
|
|
virtual int * | GetSize () |
| Set/Get the size of the window in screen coordinates in pixels. More...
|
|
virtual void | SetSize (int a, int b) |
| Set/Get the size of the window in screen coordinates in pixels. More...
|
|
virtual void | SetSize (int a[2]) |
| Set/Get the size of the window in screen coordinates in pixels. More...
|
|
|
virtual vtkRenderWindow * | GetRenderWindow () |
| Get the internal render window, renderer, image actor, and image map instances. More...
|
|
virtual vtkRenderer * | GetRenderer () |
| Get the internal render window, renderer, image actor, and image map instances. More...
|
|
virtual vtkImageActor * | GetImageActor () |
| Get the internal render window, renderer, image actor, and image map instances. More...
|
|
virtual vtkImageMapToWindowLevelColors * | GetWindowLevel () |
| Get the internal render window, renderer, image actor, and image map instances. More...
|
|
virtual vtkInteractorStyleImage * | GetInteractorStyle () |
| Get the internal render window, renderer, image actor, and image map instances. More...
|
|
|
virtual void | SetRenderWindow (vtkRenderWindow *arg) |
| Set your own renderwindow and renderer. More...
|
|
virtual void | SetRenderer (vtkRenderer *arg) |
| Set your own renderwindow and renderer. More...
|
|
|
virtual void | SetOffScreenRendering (vtkTypeBool) |
| Create a window in memory instead of on the screen. More...
|
|
virtual vtkTypeBool | GetOffScreenRendering () |
| Create a window in memory instead of on the screen. More...
|
|
virtual void | OffScreenRenderingOn () |
| Create a window in memory instead of on the screen. More...
|
|
virtual void | OffScreenRenderingOff () |
| Create a window in memory instead of on the screen. More...
|
|
| vtkBaseTypeMacro (vtkObject, vtkObjectBase) |
|
virtual void | DebugOn () |
| Turn debugging output on. More...
|
|
virtual void | DebugOff () |
| Turn debugging output off. More...
|
|
bool | GetDebug () |
| Get the value of the debug flag. More...
|
|
void | SetDebug (bool debugFlag) |
| Set the value of the debug flag. More...
|
|
virtual void | Modified () |
| Update the modification time for this object. More...
|
|
virtual vtkMTimeType | GetMTime () |
| Return this object's modified time. More...
|
|
void | RemoveObserver (unsigned long tag) |
|
void | RemoveObservers (unsigned long event) |
|
void | RemoveObservers (const char *event) |
|
void | RemoveAllObservers () |
|
vtkTypeBool | HasObserver (unsigned long event) |
|
vtkTypeBool | HasObserver (const char *event) |
|
int | InvokeEvent (unsigned long event) |
|
int | InvokeEvent (const char *event) |
|
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
|
|
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
|
|
vtkCommand * | GetCommand (unsigned long tag) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
|
|
void | RemoveObserver (vtkCommand *) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
|
|
void | RemoveObservers (unsigned long event, vtkCommand *) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
|
|
void | RemoveObservers (const char *event, vtkCommand *) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
|
|
vtkTypeBool | HasObserver (unsigned long event, vtkCommand *) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
|
|
vtkTypeBool | HasObserver (const char *event, vtkCommand *) |
| Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
|
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
| Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
|
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
| Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
|
|
template<class U , class T > |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
| Allow user to set the AbortFlagOn() with the return value of the callback method. More...
|
|
int | InvokeEvent (unsigned long event, void *callData) |
| This method invokes an event and return whether the event was aborted or not. More...
|
|
int | InvokeEvent (const char *event, void *callData) |
| This method invokes an event and return whether the event was aborted or not. More...
|
|
const char * | GetClassName () const |
| Return the class name as a string. More...
|
|
virtual void | Delete () |
| Delete a VTK object. More...
|
|
virtual void | FastDelete () |
| Delete a reference to this object. More...
|
|
void | InitializeObjectBase () |
|
void | Print (ostream &os) |
| Print an object to an ostream. More...
|
|
virtual void | Register (vtkObjectBase *o) |
| Increase the reference count (mark as used by another object). More...
|
|
virtual void | UnRegister (vtkObjectBase *o) |
| Decrease the reference count (release by another object). More...
|
|
int | GetReferenceCount () |
| Return the current reference count of this object. More...
|
|
void | SetReferenceCount (int) |
| Sets the reference count. More...
|
|
void | PrintRevisions (ostream &) |
| Legacy. More...
|
|
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
| Methods invoked by print to print information about the object including superclasses. More...
|
|
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
| Methods invoked by print to print information about the object including superclasses. More...
|
|
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 SetSlice() changes the image data (slice) displayed AND changes the depth of the displayed slice in the 3D scene. This can be controlled by the AutoAdjustCameraClippingRange ivar of the InteractorStyle member.
It is possible to mix images and geometry, using the methods:
viewer->SetInputConnection( imageSource->GetOutputPort() ); // or viewer->SetInputData ( image ); 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 .
Note that pressing 'r' will reset the window/level and pressing shift+'r' or control+'r' will reset the camera.
- See also
- vtkRenderWindow vtkRenderer vtkImageActor vtkImageMapToWindowLevelColors
- Tests:
- vtkImageViewer2 (Tests)
Definition at line 78 of file vtkImageViewer2.h.