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

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 =========================================================================*/
00059 #ifndef __vtkImageViewer2_h
00060 #define __vtkImageViewer2_h
00061 
00062 #include "vtkObject.h"
00063 
00064 class vtkAlgorithmOutput;
00065 class vtkImageActor;
00066 class vtkImageData;
00067 class vtkImageMapToWindowLevelColors;
00068 class vtkInteractorStyleImage;
00069 class vtkRenderWindow;
00070 class vtkRenderer;
00071 class vtkRenderWindowInteractor;
00072 
00073 class VTK_RENDERING_EXPORT vtkImageViewer2 : public vtkObject 
00074 {
00075 public:
00076   static vtkImageViewer2 *New();
00077   vtkTypeRevisionMacro(vtkImageViewer2,vtkObject);
00078   void PrintSelf(ostream& os, vtkIndent indent);
00079 
00081   virtual char *GetWindowName();
00082 
00084   virtual void Render(void);
00085   
00087 
00088   virtual void SetInput(vtkImageData *in);
00089   virtual vtkImageData *GetInput();
00090   virtual void SetInputConnection(vtkAlgorithmOutput* input);
00092   
00094 
00095   enum
00096   {
00097     SLICE_ORIENTATION_YZ = 0,
00098     SLICE_ORIENTATION_XZ = 1,
00099     SLICE_ORIENTATION_XY = 2
00100   };
00101   //ETX
00102   vtkGetMacro(SliceOrientation, int);
00103   virtual void SetSliceOrientation(int orientation);
00104   virtual void SetSliceOrientationToXY()
00105     { this->SetSliceOrientation(vtkImageViewer2::SLICE_ORIENTATION_XY); };
00106   virtual void SetSliceOrientationToYZ()
00107     { this->SetSliceOrientation(vtkImageViewer2::SLICE_ORIENTATION_YZ); };
00108   virtual void SetSliceOrientationToXZ()
00109     { this->SetSliceOrientation(vtkImageViewer2::SLICE_ORIENTATION_XZ); };
00111 
00113 
00115   vtkGetMacro(Slice, int);
00116   virtual void SetSlice(int s);
00118   
00120 
00122   virtual int GetSliceMin();
00123   virtual int GetSliceMax();
00124   virtual void GetSliceRange(int range[2])
00125     { this->GetSliceRange(range[0], range[1]); }
00126   virtual void GetSliceRange(int &min, int &max);
00127   virtual int* GetSliceRange();
00129   
00131 
00132   virtual double GetColorWindow();
00133   virtual double GetColorLevel();
00134   virtual void SetColorWindow(double s);
00135   virtual void SetColorLevel(double s);
00137 
00139 
00140   virtual void SetDisplayId(void *a);
00141   virtual void SetWindowId(void *a);
00142   virtual void SetParentId(void *a);
00144   
00146 
00147   virtual int* GetPosition();
00148   virtual void SetPosition(int a,int b);
00149   virtual void SetPosition(int a[2]) { this->SetPosition(a[0],a[1]); }
00151   
00153 
00154   virtual int* GetSize();
00155   virtual void SetSize(int a, int b);
00156   virtual void SetSize(int a[2]) { this->SetSize(a[0],a[1]); }
00158   
00160 
00162   vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
00163   vtkGetObjectMacro(Renderer, vtkRenderer);
00164   vtkGetObjectMacro(ImageActor,vtkImageActor);
00165   vtkGetObjectMacro(WindowLevel,vtkImageMapToWindowLevelColors);
00166   vtkGetObjectMacro(InteractorStyle,vtkInteractorStyleImage);
00168   
00170 
00171   virtual void SetRenderWindow(vtkRenderWindow *arg);
00172   virtual void SetRenderer(vtkRenderer *arg);
00174 
00176   virtual void SetupInteractor(vtkRenderWindowInteractor*);
00177   
00179 
00182   virtual void SetOffScreenRendering(int);
00183   virtual int GetOffScreenRendering();
00184   vtkBooleanMacro(OffScreenRendering,int);
00186 
00188   VTK_LEGACY(int GetWholeZMin());
00189 
00191   VTK_LEGACY(int GetWholeZMax());
00192 
00194   VTK_LEGACY(int GetZSlice());
00195 
00197   VTK_LEGACY(void SetZSlice(int));
00198 
00199 protected:
00200   vtkImageViewer2();
00201   ~vtkImageViewer2();
00202 
00203   virtual void InstallPipeline();
00204   virtual void UnInstallPipeline();
00205 
00206   vtkImageMapToWindowLevelColors  *WindowLevel;
00207   vtkRenderWindow                 *RenderWindow;
00208   vtkRenderer                     *Renderer;
00209   vtkImageActor                   *ImageActor;
00210   vtkRenderWindowInteractor       *Interactor;
00211   vtkInteractorStyleImage         *InteractorStyle;
00212 
00213   int SliceOrientation;
00214   int FirstRender;
00215   int Slice;
00216 
00217   virtual void UpdateOrientation();
00218   virtual void UpdateDisplayExtent();
00219 
00220 private:
00221   vtkImageViewer2(const vtkImageViewer2&);  // Not implemented.
00222   void operator=(const vtkImageViewer2&);  // Not implemented.
00223 };
00224 
00225 #endif
00226 
00227 

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