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

# 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 =========================================================================*/
    00045 #ifndef __vtkImageViewer2_h
    00046 #define __vtkImageViewer2_h
    00047
    00048 #include "vtkObject.h"
    00049
    00050 #include "vtkRenderWindow.h" // For inline methods
    00051 #include "vtkImageActor.h" // For inline methods
    00052 #include "vtkImageMapToWindowLevelColors.h" // For inline methods
    00053
    00054 class vtkInteractorStyleImage;
    00055
    00056 class VTK_RENDERING_EXPORT vtkImageViewer2 : public vtkObject
    00057 {
    00058 public:
    00059   static vtkImageViewer2 *New();
    00060
    00061   vtkTypeRevisionMacro(vtkImageViewer2,vtkObject);
    00062   void PrintSelf(ostream& os, vtkIndent indent);
    00063
    00065   char *GetWindowName() {return this->RenderWindow->GetWindowName();};
    00066
    00068   virtual void Render(void);
    00069
    00071
    00072   void SetInput(vtkImageData *in) {this->WindowLevel->SetInput(in);};
    00073   vtkImageData *GetInput() { return this->WindowLevel->GetInput();};
    00075
    00077
    00078   int GetWholeZMin() {return this->ImageActor->GetWholeZMin();};
    00079   int GetWholeZMax() {return this->ImageActor->GetWholeZMax();};
    00081
    00083
    00084   int GetZSlice() {return this->ImageActor->GetZSlice();};
    00085   void SetZSlice(int s) {this->ImageActor->SetZSlice(s);};
    00087
    00089
    00090   float GetColorWindow() {return this->WindowLevel->GetWindow();};
    00091   float GetColorLevel() {return this->WindowLevel->GetLevel();};
    00092   void SetColorWindow(float s) {this->WindowLevel->SetWindow(s);};
    00093   void SetColorLevel(float s) {this->WindowLevel->SetLevel(s);};
    00095
    00097
    00098   void SetDisplayId(void *a) {this->RenderWindow->SetDisplayId(a);};
    00099   void SetWindowId(void *a) {this->RenderWindow->SetWindowId(a);};
    00100   void SetParentId(void *a) {this->RenderWindow->SetParentId(a);};
    00102
    00104
    00105   int *GetPosition() {return this->RenderWindow->GetPosition();};
    00106   void SetPosition(int a,int b) {this->RenderWindow->SetPosition(a,b);};
    00107   virtual void SetPosition(int a[2]);
    00109
    00111
    00112   int *GetSize() {return this->RenderWindow->GetSize();};
    00113   void SetSize(int a,int b) {this->RenderWindow->SetSize(a,b);};
    00114   virtual void SetSize(int a[2]);
    00116
    00118
    00119   vtkGetObjectMacro(RenderWindow,vtkRenderWindow);
    00120   vtkGetObjectMacro(Renderer, vtkRenderer);
    00121   vtkGetObjectMacro(ImageActor,vtkImageActor);
    00122   vtkGetObjectMacro(WindowLevel,vtkImageMapToWindowLevelColors);
    00124
    00126   void SetupInteractor(vtkRenderWindowInteractor *);
    00127
    00129
    00132   void SetOffScreenRendering(int);
    00133   int GetOffScreenRendering();
    00134   void OffScreenRenderingOn();
    00135   void OffScreenRenderingOff();
    00137
    00138 protected:
    00139   vtkImageViewer2();
    00140   ~vtkImageViewer2();
    00141
    00142   vtkImageMapToWindowLevelColors  *WindowLevel;
    00143   vtkRenderWindow *RenderWindow;
    00144   vtkRenderer     *Renderer;
    00145   vtkImageActor   *ImageActor;
    00146   int FirstRender;
    00147   vtkRenderWindowInteractor *Interactor;
    00148   vtkInteractorStyleImage *InteractorStyle;
    00149 private:
    00150   vtkImageViewer2(const vtkImageViewer2&);  // Not implemented.
    00151   void operator=(const vtkImageViewer2&);  // Not implemented.
    00152 };
    00153
    00154 #endif
    00155
    00156