VTK
vtkImageActor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageActor.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
37 #ifndef vtkImageActor_h
38 #define vtkImageActor_h
39 
40 #include "vtkRenderingCoreModule.h" // For export macro
41 #include "vtkImageSlice.h"
42 
43 class vtkAlgorithm;
44 class vtkPropCollection;
45 class vtkRenderer;
46 class vtkImageData;
47 
48 
49 class VTKRENDERINGCORE_EXPORT vtkImageActor : public vtkImageSlice
50 {
51 public:
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
58  static vtkImageActor *New();
59 
61 
66  virtual void SetInputData(vtkImageData *);
67  virtual vtkImageData *GetInput();
69 
71 
75  virtual void SetInterpolate(int);
76  virtual int GetInterpolate();
77  vtkBooleanMacro(Interpolate,int);
79 
81 
85  virtual void SetOpacity(double);
86  virtual double GetOpacity();
87  double GetOpacityMinValue() { return 0.0; }
88  double GetOpacityMaxValue() { return 1.0; }
90 
92 
96  void SetDisplayExtent(int extent[6]);
97  void SetDisplayExtent(int minX, int maxX, int minY, int maxY,
98  int minZ, int maxZ);
99  void GetDisplayExtent(int extent[6]);
100  int *GetDisplayExtent() {return this->DisplayExtent;}
102 
104 
110  double *GetBounds();
111  void GetBounds(double bounds[6]) { this->Superclass::GetBounds(bounds); };
113 
115 
121  double *GetDisplayBounds();
122  void GetDisplayBounds(double bounds[6]);
124 
126 
134 
136 
145  void SetZSlice(int z) {this->SetDisplayExtent(
146  this->DisplayExtent[0], this->DisplayExtent[1],
147  this->DisplayExtent[2], this->DisplayExtent[3], z, z);
148  };
149  int GetZSlice() { return this->DisplayExtent[4];};
153 
162 
164 
168  vtkGetMacro(ForceOpaque, bool);
169  vtkSetMacro(ForceOpaque, bool);
170  vtkBooleanMacro(ForceOpaque, bool);
172 
173 protected:
176 
181  static int GetOrientationFromExtent(const int extent[6]);
182 
183  int DisplayExtent[6];
184  double DisplayBounds[6];
185 
186  // Convenience function that returns the input of the mapper
188 
189  // the result of HasTranslucentPolygonalGeometry is cached
193 
194 private:
195  vtkImageActor(const vtkImageActor&) VTK_DELETE_FUNCTION;
196  void operator=(const vtkImageActor&) VTK_DELETE_FUNCTION;
197 };
198 
199 #endif
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:60
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:50
virtual vtkImageData * GetInput()
virtual void SetInputData(vtkImageData *)
Set/Get the image data input for the image actor.
int GetWholeZMax()
double * GetDisplayBounds()
Get the bounds of the data that is displayed by this image actor.
int GetSliceNumberMax()
void GetDisplayExtent(int extent[6])
int * GetDisplayExtent()
int GetSliceNumber()
Return the slice number (& min/max slice number) computed from the display extent.
static vtkImageActor * New()
Instantiate the image actor.
void GetDisplayBounds(double bounds[6])
double GetOpacityMaxValue()
Definition: vtkImageActor.h:88
vtkTimeStamp TranslucentComputationTime
void SetDisplayExtent(int extent[6])
The image extent is generally set explicitly, but if not set it will be determined from the input ima...
double * GetBounds()
Get the bounds of this image actor.
virtual double GetOpacity()
int GetSliceNumberMin()
virtual void SetOpacity(double)
Set/Get the object's opacity.
virtual int GetInterpolate()
virtual void SetInterpolate(int)
Turn on/off linear interpolation of the image when rendering.
int TranslucentCachedResult
double GetOpacityMinValue()
Definition: vtkImageActor.h:87
vtkAlgorithm * GetInputAlgorithm()
void GetBounds(double bounds[6])
void SetZSlice(int z)
Set/Get the current slice number.
static int GetOrientationFromExtent(const int extent[6])
Guess the orientation from the extent.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
int GetWholeZMin()
void SetDisplayExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ)
virtual int HasTranslucentPolygonalGeometry()
Internal method, should only be used by rendering.
topologically and geometrically regular array of data
Definition: vtkImageData.h:46
represents an image in a 3D scene
Definition: vtkImageSlice.h:53
a simple class to control print indentation
Definition: vtkIndent.h:40
virtual double * GetBounds()=0
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
a list of Props
abstract specification for renderers
Definition: vtkRenderer.h:64
record modification and/or execution time
Definition: vtkTimeStamp.h:36
@ extent
Definition: vtkX3D.h:345
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.