VTK
dox/Rendering/vtkImageActor.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkImageActor.h
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 =========================================================================*/
00036 #ifndef __vtkImageActor_h
00037 #define __vtkImageActor_h
00038 
00039 #include "vtkImageSlice.h"
00040 
00041 class vtkPropCollection;
00042 class vtkRenderer;
00043 class vtkImageData;
00044 
00045 
00046 class VTK_RENDERING_EXPORT vtkImageActor : public vtkImageSlice
00047 {
00048 public:
00049   vtkTypeMacro(vtkImageActor,vtkImageSlice);
00050   void PrintSelf(ostream& os, vtkIndent indent);
00051 
00053   static vtkImageActor *New();
00054 
00056 
00059   virtual void SetInput(vtkImageData *);
00060   virtual vtkImageData *GetInput();
00062 
00064 
00066   virtual void SetInterpolate(int);
00067   virtual int GetInterpolate();
00068   vtkBooleanMacro(Interpolate,int);
00070 
00072 
00074   virtual void SetOpacity(double);
00075   virtual double GetOpacity();
00076   double GetOpacityMinValue() { return 0.0; }
00077   double GetOpacityMaxValue() { return 1.0; }
00079 
00081 
00083   void SetDisplayExtent(int extent[6]);
00084   void SetDisplayExtent(int minX, int maxX, int minY, int maxY,
00085                         int minZ, int maxZ);
00086   void GetDisplayExtent(int extent[6]);
00087   int *GetDisplayExtent() {return this->DisplayExtent;}
00089 
00091 
00095   double *GetBounds();
00096   void GetBounds(double bounds[6]) { this->Superclass::GetBounds(bounds); };
00098 
00100 
00103   double *GetDisplayBounds();
00104   void GetDisplayBounds(double bounds[6]);
00106 
00108 
00110   int GetSliceNumber();
00111   int GetSliceNumberMax();
00112   int GetSliceNumberMin();
00114 
00116 
00123   void SetZSlice(int z) {this->SetDisplayExtent(
00124     this->DisplayExtent[0], this->DisplayExtent[1],
00125     this->DisplayExtent[2], this->DisplayExtent[3], z, z);
00126   };
00127   int GetZSlice() { return this->DisplayExtent[4];};
00128   int GetWholeZMin();
00129   int GetWholeZMax();
00131 
00134   virtual int HasTranslucentPolygonalGeometry();
00135 
00136 protected:
00137   vtkImageActor();
00138   ~vtkImageActor();
00139 
00142   static int GetOrientationFromExtent(const int extent[6]);
00143 
00144   int           DisplayExtent[6];
00145   double        DisplayBounds[6];
00146 
00147 private:
00148   vtkImageActor(const vtkImageActor&);  // Not implemented.
00149   void operator=(const vtkImageActor&);  // Not implemented.
00150 };
00151 
00152 #endif