Rendering/vtkImageViewer.h Source File

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

# Rendering/vtkImageViewer.h

Go to the documentation of this file.

    00001 /*=========================================================================
    00002
    00003   Program:   Visualization Toolkit
    00004   Module:    $RCSfile: vtkImageViewer.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 =========================================================================*/
    00050 #ifndef __vtkImageViewer_h
    00051 #define __vtkImageViewer_h
    00052
    00053 #include "vtkObject.h"
    00054
    00055 #include "vtkImageMapper.h" // For all the inline methods
    00056 #include "vtkRenderWindow.h" // For all the inline methods
    00057
    00058 class vtkInteractorStyleImage;
    00059
    00060 class VTK_RENDERING_EXPORT vtkImageViewer : public vtkObject
    00061 {
    00062 public:
    00063   static vtkImageViewer *New();
    00064
    00065   vtkTypeRevisionMacro(vtkImageViewer,vtkObject);
    00066   void PrintSelf(ostream& os, vtkIndent indent);
    00067
    00069   char *GetWindowName() {return this->RenderWindow->GetWindowName();};
    00070
    00072   virtual void Render(void);
    00073
    00075
    00076   void SetInput(vtkImageData *in) {this->ImageMapper->SetInput(in);};
    00077   vtkImageData *GetInput() { return this->ImageMapper->GetInput();};
    00079
    00081
    00082   int GetWholeZMin() {return this->ImageMapper->GetWholeZMin();};
    00083   int GetWholeZMax() {return this->ImageMapper->GetWholeZMax();};
    00085
    00087
    00088   int GetZSlice() {return this->ImageMapper->GetZSlice();};
    00089   void SetZSlice(int s) {this->ImageMapper->SetZSlice(s);};
    00091
    00093
    00094   float GetColorWindow() {return this->ImageMapper->GetColorWindow();};
    00095   float GetColorLevel() {return this->ImageMapper->GetColorLevel();};
    00096   void SetColorWindow(float s) {this->ImageMapper->SetColorWindow(s);};
    00097   void SetColorLevel(float s) {this->ImageMapper->SetColorLevel(s);};
    00099
    00101
    00102   void SetDisplayId(void *a) {this->RenderWindow->SetDisplayId(a);};
    00103   void SetWindowId(void *a) {this->RenderWindow->SetWindowId(a);};
    00104   void SetParentId(void *a) {this->RenderWindow->SetParentId(a);};
    00106
    00108
    00110   int GetGrayScaleHint()
    00111     {vtkWarningMacro("GetGrayScaleHint deprecated, not required anymore"); return 0;};
    00112   void SetGrayScaleHint(int vtkNotUsed(a))
    00113     {vtkWarningMacro("SetGrayScaleHint deprecated, not required anymore");};
    00114   void GrayScaleHintOn()
    00115     {vtkWarningMacro("GrayScaleHintOn deprecated, not required anymore");};
    00116   void GrayScaleHintOff()
    00117     {vtkWarningMacro("GrayScaleHintOff deprecated, not required anymore");};
    00119
    00121
    00122   int *GetPosition() {return this->RenderWindow->GetPosition();};
    00123   void SetPosition(int a,int b) {this->RenderWindow->SetPosition(a,b);};
    00124   virtual void SetPosition(int a[2]);
    00126
    00128
    00129   int *GetSize() {return this->RenderWindow->GetSize();};
    00130   void SetSize(int a,int b) {this->RenderWindow->SetSize(a,b);};
    00131   virtual void SetSize(int a[2]);
    00133
    00135
    00136   vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
    00137   vtkGetObjectMacro(Renderer, vtkRenderer);
    00138   vtkGetObjectMacro(ImageMapper,vtkImageMapper);
    00139   vtkGetObjectMacro(Actor2D,vtkActor2D);
    00141
    00143   void SetupInteractor(vtkRenderWindowInteractor *);
    00144
    00146
    00149   void SetOffScreenRendering(int);
    00150   int GetOffScreenRendering();
    00151   void OffScreenRenderingOn();
    00152   void OffScreenRenderingOff();
    00154
    00155 protected:
    00156   vtkImageViewer();
    00157   ~vtkImageViewer();
    00158
    00159   vtkRenderWindow *RenderWindow;
    00160   vtkRenderer *Renderer;
    00161   vtkImageMapper *ImageMapper;
    00162   vtkActor2D     *Actor2D;
    00163   int FirstRender;
    00164   vtkRenderWindowInteractor *Interactor;
    00165   vtkInteractorStyleImage *InteractorStyle;
    00166 private:
    00167   vtkImageViewer(const vtkImageViewer&);  // Not implemented.
    00168   void operator=(const vtkImageViewer&);  // Not implemented.
    00169 };
    00170
    00171 #endif
    00172
    00173