vtkImageViewer.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00046 #ifndef __vtkImageViewer_h
00047 #define __vtkImageViewer_h
00048
00049 #include "vtkObject.h"
00050
00051 #include "vtkImageMapper.h"
00052 #include "vtkRenderWindow.h"
00053
00054 class vtkInteractorStyleImage;
00055
00056 class VTK_RENDERING_EXPORT vtkImageViewer : public vtkObject
00057 {
00058 public:
00059 static vtkImageViewer *New();
00060
00061 vtkTypeRevisionMacro(vtkImageViewer,vtkObject);
00062 void PrintSelf(ostream& os, vtkIndent indent);
00063
00065 char *GetWindowName() {return this->RenderWindow->GetWindowName();};
00066
00068 virtual void Render(void);
00069
00071
00072 void SetInput(vtkImageData *in) {this->ImageMapper->SetInput(in);};
00073 vtkImageData *GetInput() { return this->ImageMapper->GetInput();};
00075
00077
00078 int GetWholeZMin() {return this->ImageMapper->GetWholeZMin();};
00079 int GetWholeZMax() {return this->ImageMapper->GetWholeZMax();};
00081
00083
00084 int GetZSlice() {return this->ImageMapper->GetZSlice();};
00085 void SetZSlice(int s) {this->ImageMapper->SetZSlice(s);};
00087
00089
00090 double GetColorWindow() {return this->ImageMapper->GetColorWindow();};
00091 double GetColorLevel() {return this->ImageMapper->GetColorLevel();};
00092 void SetColorWindow(double s) {this->ImageMapper->SetColorWindow(s);};
00093 void SetColorLevel(double s) {this->ImageMapper->SetColorLevel(s);};
00095
00097
00098 void SetDisplayId(void *a) {this->RenderWindow->SetDisplayId(a);};
00099 void SetWindowId(void *a) {this->RenderWindow->SetWindowId(a);};
00100 void SetParentId(void *a) {this->RenderWindow->SetParentId(a);};
00102
00104
00106 int GetGrayScaleHint()
00107 {vtkWarningMacro("GetGrayScaleHint deprecated, not required anymore"); return 0;};
00108 void SetGrayScaleHint(int vtkNotUsed(a))
00109 {vtkWarningMacro("SetGrayScaleHint deprecated, not required anymore");};
00110 void GrayScaleHintOn()
00111 {vtkWarningMacro("GrayScaleHintOn deprecated, not required anymore");};
00112 void GrayScaleHintOff()
00113 {vtkWarningMacro("GrayScaleHintOff deprecated, not required anymore");};
00115
00117
00118 int *GetPosition() {return this->RenderWindow->GetPosition();};
00119 void SetPosition(int a,int b) {this->RenderWindow->SetPosition(a,b);};
00120 virtual void SetPosition(int a[2]);
00122
00124
00125 int *GetSize() {return this->RenderWindow->GetSize();};
00126 void SetSize(int a,int b) {this->RenderWindow->SetSize(a,b);};
00127 virtual void SetSize(int a[2]);
00129
00131
00132 vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
00133 vtkGetObjectMacro(Renderer, vtkRenderer);
00134 vtkGetObjectMacro(ImageMapper,vtkImageMapper);
00135 vtkGetObjectMacro(Actor2D,vtkActor2D);
00137
00139 void SetupInteractor(vtkRenderWindowInteractor *);
00140
00142
00145 void SetOffScreenRendering(int);
00146 int GetOffScreenRendering();
00147 void OffScreenRenderingOn();
00148 void OffScreenRenderingOff();
00150
00151 protected:
00152 vtkImageViewer();
00153 ~vtkImageViewer();
00154
00155 vtkRenderWindow *RenderWindow;
00156 vtkRenderer *Renderer;
00157 vtkImageMapper *ImageMapper;
00158 vtkActor2D *Actor2D;
00159 int FirstRender;
00160 vtkRenderWindowInteractor *Interactor;
00161 vtkInteractorStyleImage *InteractorStyle;
00162 private:
00163 vtkImageViewer(const vtkImageViewer&);
00164 void operator=(const vtkImageViewer&);
00165 };
00166
00167 #endif
00168
00169