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 Language: C++ 00006 00007 Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen 00008 All rights reserved. 00009 See Copyright.txt or http://www.kitware.com/Copyright.htm for details. 00010 00011 This software is distributed WITHOUT ANY WARRANTY; without even 00012 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00013 PURPOSE. See the above copyright notice for more information. 00014 00015 =========================================================================*/ 00033 #ifndef __vtkImageViewer2_h 00034 #define __vtkImageViewer2_h 00035 00036 #include "vtkObject.h" 00037 00038 #include "vtkRenderWindow.h" // For inline methods 00039 #include "vtkImageActor.h" // For inline methods 00040 #include "vtkImageMapToWindowLevelColors.h" // For inline methods 00041 00042 class vtkInteractorStyleImage; 00043 00044 class VTK_RENDERING_EXPORT vtkImageViewer2 : public vtkObject 00045 { 00046 public: 00047 static vtkImageViewer2 *New(); 00048 00049 vtkTypeRevisionMacro(vtkImageViewer2,vtkObject); 00050 void PrintSelf(ostream& os, vtkIndent indent); 00051 00053 char *GetWindowName() {return this->RenderWindow->GetWindowName();}; 00054 00056 virtual void Render(void); 00057 00059 00060 void SetInput(vtkImageData *in) {this->WindowLevel->SetInput(in);}; 00061 vtkImageData *GetInput() { return this->WindowLevel->GetInput();}; 00063 00065 00066 int GetWholeZMin() {return this->ImageActor->GetWholeZMin();}; 00067 int GetWholeZMax() {return this->ImageActor->GetWholeZMax();}; 00069 00071 00072 int GetZSlice() {return this->ImageActor->GetZSlice();}; 00073 void SetZSlice(int s) {this->ImageActor->SetZSlice(s);}; 00075 00077 00078 float GetColorWindow() {return this->WindowLevel->GetWindow();}; 00079 float GetColorLevel() {return this->WindowLevel->GetLevel();}; 00080 void SetColorWindow(float s) {this->WindowLevel->SetWindow(s);}; 00081 void SetColorLevel(float s) {this->WindowLevel->SetLevel(s);}; 00083 00085 00086 void SetDisplayId(void *a) {this->RenderWindow->SetDisplayId(a);}; 00087 void SetWindowId(void *a) {this->RenderWindow->SetWindowId(a);}; 00088 void SetParentId(void *a) {this->RenderWindow->SetParentId(a);}; 00090 00092 00093 int *GetPosition() {return this->RenderWindow->GetPosition();}; 00094 void SetPosition(int a,int b) {this->RenderWindow->SetPosition(a,b);}; 00095 virtual void SetPosition(int a[2]); 00097 00099 00100 int *GetSize() {return this->RenderWindow->GetSize();}; 00101 void SetSize(int a,int b) {this->RenderWindow->SetSize(a,b);}; 00102 virtual void SetSize(int a[2]); 00104 00106 00107 vtkGetObjectMacro(RenderWindow,vtkRenderWindow); 00108 vtkGetObjectMacro(Renderer, vtkRenderer); 00109 vtkGetObjectMacro(ImageActor,vtkImageActor); 00110 vtkGetObjectMacro(WindowLevel,vtkImageMapToWindowLevelColors); 00112 00114 void SetupInteractor(vtkRenderWindowInteractor *); 00115 00117 00120 void SetOffScreenRendering(int); 00121 int GetOffScreenRendering(); 00122 void OffScreenRenderingOn(); 00123 void OffScreenRenderingOff(); 00125 00126 protected: 00127 vtkImageViewer2(); 00128 ~vtkImageViewer2(); 00129 00130 vtkImageMapToWindowLevelColors *WindowLevel; 00131 vtkRenderWindow *RenderWindow; 00132 vtkRenderer *Renderer; 00133 vtkImageActor *ImageActor; 00134 int FirstRender; 00135 vtkRenderWindowInteractor *Interactor; 00136 vtkInteractorStyleImage *InteractorStyle; 00137 private: 00138 vtkImageViewer2(const vtkImageViewer2&); // Not implemented. 00139 void operator=(const vtkImageViewer2&); // Not implemented. 00140 }; 00141 00142 #endif 00143 00144