VTK
vtkImageViewer.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageViewer.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
34 #ifndef vtkImageViewer_h
35 #define vtkImageViewer_h
36 
37 #include "vtkInteractionImageModule.h" // For export macro
38 #include "vtkObject.h"
39 
40 #include "vtkImageMapper.h" // For all the inline methods
41 #include "vtkRenderWindow.h" // For all the inline methods
42 
44 
46 {
47 public:
48  static vtkImageViewer *New();
49 
50  vtkTypeMacro(vtkImageViewer,vtkObject);
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54  char *GetWindowName() {return this->RenderWindow->GetWindowName();};
55 
57  virtual void Render(void);
58 
60 
61  void SetInputData(vtkImageData *in) {this->ImageMapper->SetInputData(in);};
62  vtkImageData *GetInput() { return this->ImageMapper->GetInput();};
63  virtual void SetInputConnection(vtkAlgorithmOutput* input) {
64  this->ImageMapper->SetInputConnection(input);};
66 
68 
69  int GetWholeZMin() {return this->ImageMapper->GetWholeZMin();};
70  int GetWholeZMax() {return this->ImageMapper->GetWholeZMax();};
72 
74 
75  int GetZSlice() {return this->ImageMapper->GetZSlice();};
76  void SetZSlice(int s) {this->ImageMapper->SetZSlice(s);};
78 
80 
81  double GetColorWindow() {return this->ImageMapper->GetColorWindow();};
82  double GetColorLevel() {return this->ImageMapper->GetColorLevel();};
83  void SetColorWindow(double s) {this->ImageMapper->SetColorWindow(s);};
84  void SetColorLevel(double s) {this->ImageMapper->SetColorLevel(s);};
86 
88 
89  void SetDisplayId(void *a) {this->RenderWindow->SetDisplayId(a);};
90  void SetWindowId(void *a) {this->RenderWindow->SetWindowId(a);};
91  void SetParentId(void *a) {this->RenderWindow->SetParentId(a);};
93 
95 
96  int *GetPosition() {return this->RenderWindow->GetPosition();};
97  void SetPosition(int a,int b) {this->RenderWindow->SetPosition(a,b);};
98  virtual void SetPosition(int a[2]);
100 
102 
103  int *GetSize() {return this->RenderWindow->GetSize();};
104  void SetSize(int a,int b) {this->RenderWindow->SetSize(a,b);};
105  virtual void SetSize(int a[2]);
107 
109 
110  vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
111  vtkGetObjectMacro(Renderer, vtkRenderer);
112  vtkGetObjectMacro(ImageMapper,vtkImageMapper);
113  vtkGetObjectMacro(Actor2D,vtkActor2D);
115 
117  void SetupInteractor(vtkRenderWindowInteractor *);
118 
120 
123  void SetOffScreenRendering(int);
124  int GetOffScreenRendering();
125  void OffScreenRenderingOn();
126  void OffScreenRenderingOff();
128 
129 protected:
130  vtkImageViewer();
131  ~vtkImageViewer();
132 
140 
141  friend class vtkImageViewerCallback;
142  vtkAlgorithm* GetInputAlgorithm();
143 
144 private:
145  vtkImageViewer(const vtkImageViewer&); // Not implemented.
146  void operator=(const vtkImageViewer&); // Not implemented.
147 };
148 
149 #endif
abstract base class for most VTK objects
Definition: vtkObject.h:61
a actor that draws 2D data
Definition: vtkActor2D.h:44
vtkImageMapper * ImageMapper
vtkRenderWindowInteractor * Interactor
void SetColorWindow(double s)
void SetWindowId(void *a)
virtual void SetWindowId(void *)=0
abstract specification for renderers
Definition: vtkRenderer.h:63
void SetParentId(void *a)
vtkInteractorStyleImage * InteractorStyle
vtkRenderer * Renderer
Display a 2d image.
virtual void SetSize(int, int)
double GetColorWindow()
Proxy object to connect input/output ports.
interactive manipulation of the camera specialized for images
void SetPosition(int a, int b)
platform-independent render window interaction including picking and frame rate control.
virtual void SetParentId(void *)=0
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:61
vtkImageData * GetInput()
virtual void PrintSelf(ostream &os, vtkIndent indent)
#define VTKINTERACTIONIMAGE_EXPORT
void SetColorLevel(double s)
a simple class to control print indentation
Definition: vtkIndent.h:38
topologically and geometrically regular array of data
Definition: vtkImageData.h:44
void SetZSlice(int s)
virtual void SetDisplayId(void *)=0
char * GetWindowName()
int * GetPosition()
void SetSize(int a, int b)
virtual int * GetPosition()
vtkWeakPointer< vtkRenderWindow > RenderWindow
virtual char * GetWindowName()
virtual int * GetSize()
create a window for renderers to draw into
double GetColorLevel()
vtkRenderWindow * RenderWindow
virtual void SetInputConnection(vtkAlgorithmOutput *input)
2D image display
vtkActor2D * Actor2D
virtual void SetPosition(int, int)
static vtkObject * New()
void SetInputData(vtkImageData *in)
void SetDisplayId(void *a)