FreeMat: vtkImageViewer

FreeMat

- Main Page
- Related Pages

vtkImageViewer

Section: Visualization Toolkit Rendering Classes

# Usage

vtkImageViewer is a convenience class for displaying a 2d image. It packages up the functionality found in vtkRenderWindow, vtkRenderer, vtkActor2D and vtkImageMapper into a single easy to use class. Behind the scenes these four classes are actually used to to provide the required functionality. vtkImageViewer is simply a wrapper around them.

To create an instance of class vtkImageViewer, simply invoke its constructor as follows

      obj = vtkImageViewer

# Methods

The class vtkImageViewer has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, `obj` is an instance of the vtkImageViewer class.

- `string = obj.GetClassName ()`
- `int = obj.IsA (string name)`
- `vtkImageViewer = obj.NewInstance ()`
- `vtkImageViewer = obj.SafeDownCast (vtkObject o)`
- `string = obj.GetWindowName ()` - Get name of rendering window
- `obj.Render (void )` - Render the resulting image.
- `obj.SetInput (vtkImageData in)` - Set/Get the input to the viewer.
- `vtkImageData = obj.GetInput ()` - Set/Get the input to the viewer.
- `obj.SetInputConnection (vtkAlgorithmOutput input)` - Set/Get the input to the viewer.
- `int = obj.GetWholeZMin ()` - What is the possible Min/ Max z slices available.
- `int = obj.GetWholeZMax ()` - What is the possible Min/ Max z slices available.
- `int = obj.GetZSlice ()` - Set/Get the current Z Slice to display
- `obj.SetZSlice (int s)` - Set/Get the current Z Slice to display
- `double = obj.GetColorWindow ()` - Sets window/level for mapping pixels to colors.
- `double = obj.GetColorLevel ()` - Sets window/level for mapping pixels to colors.
- `obj.SetColorWindow (double s)` - Sets window/level for mapping pixels to colors.
- `obj.SetColorLevel (double s)` - Sets window/level for mapping pixels to colors.
- `int = obj.GetGrayScaleHint ()` - By default this is a color viewer. GrayScaleHintOn will improve the appearance of gray scale images on some systems.
- `obj.SetGrayScaleHint (int )` - By default this is a color viewer. GrayScaleHintOn will improve the appearance of gray scale images on some systems.
- `obj.GrayScaleHintOn ()` - By default this is a color viewer. GrayScaleHintOn will improve the appearance of gray scale images on some systems.
- `obj.GrayScaleHintOff ()` - By default this is a color viewer. GrayScaleHintOn will improve the appearance of gray scale images on some systems.
- `int = obj.GetPosition ()` - Set/Get the position in screen coordinates of the rendering window.
- `obj.SetPosition (int a, int b)` - Set/Get the position in screen coordinates of the rendering window.
- `obj.SetPosition (int a[2])` - Set/Get the position in screen coordinates of the rendering window.
- `int = obj.GetSize ()` - Set/Get the size of the window in screen coordinates in pixels.
- `obj.SetSize (int a, int b)` - Set/Get the size of the window in screen coordinates in pixels.
- `obj.SetSize (int a[2])` - Set/Get the size of the window in screen coordinates in pixels.
- `vtkRenderWindow = obj.GetRenderWindow ()` - Get the internal objects
- `vtkRenderer = obj.GetRenderer ()` - Get the internal objects
- `vtkImageMapper = obj.GetImageMapper ()` - Get the internal objects
- `vtkActor2D = obj.GetActor2D ()` - Get the internal objects
- `obj.SetupInteractor (vtkRenderWindowInteractor )` - Create and attach an interactor for this window
- `obj.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 = obj.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.
- `obj.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.
- `obj.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.