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 "vtkObject.h"
38 
39 #include "vtkImageMapper.h" // For all the inline methods
40 #include "vtkRenderWindow.h" // For all the inline methods
41 
43 
45 {
46 public:
47  static vtkImageViewer *New();
48 
49  vtkTypeMacro(vtkImageViewer,vtkObject);
50  void PrintSelf(ostream& os, vtkIndent indent);
51 
53  char *GetWindowName() {return this->RenderWindow->GetWindowName();};
54 
56  virtual void Render(void);
57 
59 
60  void SetInput(vtkImageData *in) {this->ImageMapper->SetInput(in);};
61  vtkImageData *GetInput() { return this->ImageMapper->GetInput();};
62  virtual void SetInputConnection(vtkAlgorithmOutput* input) {
63  this->ImageMapper->SetInputConnection(input);};
65 
67 
68  int GetWholeZMin() {return this->ImageMapper->GetWholeZMin();};
69  int GetWholeZMax() {return this->ImageMapper->GetWholeZMax();};
71 
73 
74  int GetZSlice() {return this->ImageMapper->GetZSlice();};
75  void SetZSlice(int s) {this->ImageMapper->SetZSlice(s);};
77 
79 
80  double GetColorWindow() {return this->ImageMapper->GetColorWindow();};
81  double GetColorLevel() {return this->ImageMapper->GetColorLevel();};
82  void SetColorWindow(double s) {this->ImageMapper->SetColorWindow(s);};
83  void SetColorLevel(double s) {this->ImageMapper->SetColorLevel(s);};
85 
87 
88  void SetDisplayId(void *a) {this->RenderWindow->SetDisplayId(a);};
89  void SetWindowId(void *a) {this->RenderWindow->SetWindowId(a);};
90  void SetParentId(void *a) {this->RenderWindow->SetParentId(a);};
92 
94 
96  VTK_LEGACY(int GetGrayScaleHint());
97  VTK_LEGACY(void SetGrayScaleHint(int vtkNotUsed(a)));
98  VTK_LEGACY(void GrayScaleHintOn());
99  VTK_LEGACY(void GrayScaleHintOff());
101 
103 
104  int *GetPosition() {return this->RenderWindow->GetPosition();};
105  void SetPosition(int a,int b) {this->RenderWindow->SetPosition(a,b);};
106  virtual void SetPosition(int a[2]);
108 
110 
111  int *GetSize() {return this->RenderWindow->GetSize();};
112  void SetSize(int a,int b) {this->RenderWindow->SetSize(a,b);};
113  virtual void SetSize(int a[2]);
115 
117 
118  vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
119  vtkGetObjectMacro(Renderer, vtkRenderer);
120  vtkGetObjectMacro(ImageMapper,vtkImageMapper);
121  vtkGetObjectMacro(Actor2D,vtkActor2D);
123 
125  void SetupInteractor(vtkRenderWindowInteractor *);
126 
128 
131  void SetOffScreenRendering(int);
132  int GetOffScreenRendering();
133  void OffScreenRenderingOn();
134  void OffScreenRenderingOff();
136 
137 protected:
138  vtkImageViewer();
139  ~vtkImageViewer();
140 
148 
149 private:
150  vtkImageViewer(const vtkImageViewer&); // Not implemented.
151  void operator=(const vtkImageViewer&); // Not implemented.
152 };
153 
154 #endif
155 
156