Rendering/vtkImageViewer2.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00055 #ifndef __vtkImageViewer2_h
00056 #define __vtkImageViewer2_h
00057
00058 #include "vtkObject.h"
00059
00060 #include "vtkRenderWindow.h"
00061 #include "vtkImageActor.h"
00062 #include "vtkImageMapToWindowLevelColors.h"
00063
00064 class vtkInteractorStyleImage;
00065
00066 class VTK_RENDERING_EXPORT vtkImageViewer2 : public vtkObject
00067 {
00068 public:
00069 static vtkImageViewer2 *New();
00070
00071 vtkTypeRevisionMacro(vtkImageViewer2,vtkObject);
00072 void PrintSelf(ostream& os, vtkIndent indent);
00073
00075 char *GetWindowName() {return this->RenderWindow->GetWindowName();}
00076
00078 virtual void Render(void);
00079
00081
00082 void SetInput(vtkImageData *in) {this->WindowLevel->SetInput(in);}
00083 vtkImageData *GetInput() { return this->WindowLevel->GetInput();}
00085
00087
00088 int GetWholeZMin() {return this->ImageActor->GetWholeZMin();}
00089 int GetWholeZMax() {return this->ImageActor->GetWholeZMax();}
00091
00093
00094 int GetZSlice() {return this->ImageActor->GetZSlice();}
00095 void SetZSlice(int s) {this->ImageActor->SetZSlice(s);}
00097
00099
00100 double GetColorWindow() {return this->WindowLevel->GetWindow();}
00101 double GetColorLevel() {return this->WindowLevel->GetLevel();}
00102 void SetColorWindow(double s) {this->WindowLevel->SetWindow(s);}
00103 void SetColorLevel(double s) {this->WindowLevel->SetLevel(s);}
00105
00107
00108 void SetDisplayId(void *a) {this->RenderWindow->SetDisplayId(a);}
00109 void SetWindowId(void *a) {this->RenderWindow->SetWindowId(a);}
00110 void SetParentId(void *a) {this->RenderWindow->SetParentId(a);}
00112
00114
00115 int *GetPosition() {return this->RenderWindow->GetPosition();}
00116 void SetPosition(int a,int b) {this->RenderWindow->SetPosition(a,b);}
00117 virtual void SetPosition(int a[2]);
00119
00121
00122 int *GetSize() {return this->RenderWindow->GetSize();}
00123 void SetSize(int a,int b) {this->RenderWindow->SetSize(a,b);}
00124 virtual void SetSize(int a[2]);
00126
00128
00130 vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
00131 vtkGetObjectMacro(Renderer, vtkRenderer);
00132 vtkGetObjectMacro(ImageActor,vtkImageActor);
00133 vtkGetObjectMacro(WindowLevel,vtkImageMapToWindowLevelColors);
00135
00137 void SetupInteractor(vtkRenderWindowInteractor *);
00138
00140
00143 void SetOffScreenRendering(int);
00144 int GetOffScreenRendering();
00145 void OffScreenRenderingOn();
00146 void OffScreenRenderingOff();
00148
00149 protected:
00150 vtkImageViewer2();
00151 ~vtkImageViewer2();
00152
00153 vtkImageMapToWindowLevelColors *WindowLevel;
00154 vtkRenderWindow *RenderWindow;
00155 vtkRenderer *Renderer;
00156 vtkImageActor *ImageActor;
00157 int FirstRender;
00158 vtkRenderWindowInteractor *Interactor;
00159 vtkInteractorStyleImage *InteractorStyle;
00160
00161 private:
00162 vtkImageViewer2(const vtkImageViewer2&);
00163 void operator=(const vtkImageViewer2&);
00164 };
00165
00166 #endif
00167
00168