Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

dox/Rendering/vtkImageViewer2.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Visualization Toolkit 00004 Module: $RCSfile: vtkImageViewer2.h,v $ 00005 00006 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 00007 All rights reserved. 00008 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00009 00010 This software is distributed WITHOUT ANY WARRANTY; without even 00011 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00012 PURPOSE. See the above copyright notice for more information. 00013 00014 =========================================================================*/ 00055 #ifndef __vtkImageViewer2_h 00056 #define __vtkImageViewer2_h 00057 00058 #include "vtkObject.h" 00059 00060 #include "vtkRenderWindow.h" // For inline methods 00061 #include "vtkImageActor.h" // For inline methods 00062 #include "vtkImageMapToWindowLevelColors.h" // For inline methods 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&); // Not implemented. 00163 void operator=(const vtkImageViewer2&); // Not implemented. 00164 }; 00165 00166 #endif 00167 00168