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

vtkImageViewer.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkImageViewer.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 =========================================================================*/
00034 #ifndef __vtkImageViewer_h
00035 #define __vtkImageViewer_h
00036 
00037 #include "vtkObject.h"
00038 
00039 #include "vtkImageMapper.h" // For all the inline methods
00040 #include "vtkRenderWindow.h" // For all the inline methods
00041 
00042 class vtkInteractorStyleImage;
00043 
00044 class VTK_RENDERING_EXPORT vtkImageViewer : public vtkObject 
00045 {
00046 public:
00047   static vtkImageViewer *New();
00048   
00049   vtkTypeRevisionMacro(vtkImageViewer,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->ImageMapper->SetInput(in);};
00061   vtkImageData *GetInput() { return this->ImageMapper->GetInput();};
00062   virtual void SetInputConnection(vtkAlgorithmOutput* input) {
00063     this->ImageMapper->SetInputConnection(input);};
00065 
00067 
00068   int GetWholeZMin() {return this->ImageMapper->GetWholeZMin();};
00069   int GetWholeZMax() {return this->ImageMapper->GetWholeZMax();};
00071   
00073 
00074   int GetZSlice() {return this->ImageMapper->GetZSlice();};
00075   void SetZSlice(int s) {this->ImageMapper->SetZSlice(s);};
00077   
00079 
00080   double GetColorWindow() {return this->ImageMapper->GetColorWindow();};
00081   double GetColorLevel() {return this->ImageMapper->GetColorLevel();};
00082   void SetColorWindow(double s) {this->ImageMapper->SetColorWindow(s);};
00083   void SetColorLevel(double s) {this->ImageMapper->SetColorLevel(s);};
00085 
00087 
00088   void SetDisplayId(void *a) {this->RenderWindow->SetDisplayId(a);};
00089   void SetWindowId(void *a) {this->RenderWindow->SetWindowId(a);};
00090   void SetParentId(void *a) {this->RenderWindow->SetParentId(a);};
00092   
00094 
00096   VTK_LEGACY(int GetGrayScaleHint());
00097   VTK_LEGACY(void SetGrayScaleHint(int vtkNotUsed(a)));
00098   VTK_LEGACY(void GrayScaleHintOn());
00099   VTK_LEGACY(void GrayScaleHintOff());
00101 
00103 
00104   int *GetPosition() {return this->RenderWindow->GetPosition();};
00105   void SetPosition(int a,int b) {this->RenderWindow->SetPosition(a,b);};
00106   virtual void SetPosition(int a[2]);
00108 
00110 
00111   int *GetSize() {return this->RenderWindow->GetSize();};
00112   void SetSize(int a,int b) {this->RenderWindow->SetSize(a,b);};
00113   virtual void SetSize(int a[2]);
00115   
00117 
00118   vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
00119   vtkGetObjectMacro(Renderer, vtkRenderer);
00120   vtkGetObjectMacro(ImageMapper,vtkImageMapper);
00121   vtkGetObjectMacro(Actor2D,vtkActor2D);
00123   
00125   void SetupInteractor(vtkRenderWindowInteractor *);
00126   
00128 
00131   void SetOffScreenRendering(int);
00132   int GetOffScreenRendering();
00133   void OffScreenRenderingOn();
00134   void OffScreenRenderingOff();
00136 
00137 protected:
00138   vtkImageViewer();
00139   ~vtkImageViewer();
00140 
00141   vtkRenderWindow *RenderWindow;
00142   vtkRenderer *Renderer;
00143   vtkImageMapper *ImageMapper;
00144   vtkActor2D     *Actor2D;
00145   int FirstRender;
00146   vtkRenderWindowInteractor *Interactor;
00147   vtkInteractorStyleImage *InteractorStyle;
00148 
00149 private:
00150   vtkImageViewer(const vtkImageViewer&);  // Not implemented.
00151   void operator=(const vtkImageViewer&);  // Not implemented.
00152 };
00153 
00154 #endif
00155 
00156 

Generated on Mon Jan 21 23:07:34 2008 for VTK by  doxygen 1.4.3-20050530