00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00031 #ifndef __vtkImageViewer_h
00032 #define __vtkImageViewer_h
00033
00034 #include "vtkObject.h"
00035
00036 #include "vtkImageMapper.h"
00037 #include "vtkRenderWindow.h"
00038
00039 class vtkInteractorStyleImage;
00040
00041 class VTK_RENDERING_EXPORT vtkImageViewer : public vtkObject
00042 {
00043 public:
00044 static vtkImageViewer *New();
00045
00046 vtkTypeRevisionMacro(vtkImageViewer,vtkObject);
00047 void PrintSelf(ostream& os, vtkIndent indent);
00048
00050 char *GetWindowName() {return this->RenderWindow->GetWindowName();};
00051
00053 virtual void Render(void);
00054
00056
00057 void SetInput(vtkImageData *in) {this->ImageMapper->SetInput(in);};
00058 vtkImageData *GetInput() { return this->ImageMapper->GetInput();};
00059 virtual void SetInputConnection(vtkAlgorithmOutput* input) {
00060 this->ImageMapper->SetInputConnection(input);};
00062
00064
00065 int GetWholeZMin() {return this->ImageMapper->GetWholeZMin();};
00066 int GetWholeZMax() {return this->ImageMapper->GetWholeZMax();};
00068
00070
00071 int GetZSlice() {return this->ImageMapper->GetZSlice();};
00072 void SetZSlice(int s) {this->ImageMapper->SetZSlice(s);};
00074
00076
00077 double GetColorWindow() {return this->ImageMapper->GetColorWindow();};
00078 double GetColorLevel() {return this->ImageMapper->GetColorLevel();};
00079 void SetColorWindow(double s) {this->ImageMapper->SetColorWindow(s);};
00080 void SetColorLevel(double s) {this->ImageMapper->SetColorLevel(s);};
00082
00084
00085 void SetDisplayId(void *a) {this->RenderWindow->SetDisplayId(a);};
00086 void SetWindowId(void *a) {this->RenderWindow->SetWindowId(a);};
00087 void SetParentId(void *a) {this->RenderWindow->SetParentId(a);};
00089
00091
00093 VTK_LEGACY(int GetGrayScaleHint());
00094 VTK_LEGACY(void SetGrayScaleHint(int vtkNotUsed(a)));
00095 VTK_LEGACY(void GrayScaleHintOn());
00096 VTK_LEGACY(void GrayScaleHintOff());
00098
00100
00101 int *GetPosition() {return this->RenderWindow->GetPosition();};
00102 void SetPosition(int a,int b) {this->RenderWindow->SetPosition(a,b);};
00103 virtual void SetPosition(int a[2]);
00105
00107
00108 int *GetSize() {return this->RenderWindow->GetSize();};
00109 void SetSize(int a,int b) {this->RenderWindow->SetSize(a,b);};
00110 virtual void SetSize(int a[2]);
00112
00114
00115 vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
00116 vtkGetObjectMacro(Renderer, vtkRenderer);
00117 vtkGetObjectMacro(ImageMapper,vtkImageMapper);
00118 vtkGetObjectMacro(Actor2D,vtkActor2D);
00120
00122 void SetupInteractor(vtkRenderWindowInteractor *);
00123
00125
00128 void SetOffScreenRendering(int);
00129 int GetOffScreenRendering();
00130 void OffScreenRenderingOn();
00131 void OffScreenRenderingOff();
00133
00134 protected:
00135 vtkImageViewer();
00136 ~vtkImageViewer();
00137
00138 vtkRenderWindow *RenderWindow;
00139 vtkRenderer *Renderer;
00140 vtkImageMapper *ImageMapper;
00141 vtkActor2D *Actor2D;
00142 int FirstRender;
00143 vtkRenderWindowInteractor *Interactor;
00144 vtkInteractorStyleImage *InteractorStyle;
00145
00146 private:
00147 vtkImageViewer(const vtkImageViewer&);
00148 void operator=(const vtkImageViewer&);
00149 };
00150
00151 #endif
00152
00153