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 =========================================================================*/
31 #ifndef vtkImageActor_h
32 #define vtkImageActor_h
33 
34 #include "vtkRenderingCoreModule.h" // For export macro
35 #include "vtkImageSlice.h"
36 
37 class vtkAlgorithm;
38 class vtkPropCollection;
39 class vtkRenderer;
40 class vtkImageData;
41 
42 
43 class VTKRENDERINGCORE_EXPORT vtkImageActor : public vtkImageSlice
44 {
45 public:
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
52  static vtkImageActor *New();
53 
55 
60  virtual void SetInputData(vtkImageData *);
61  virtual vtkImageData *GetInput();
63 
65 
69  virtual void SetInterpolate(vtkTypeBool);
70  virtual vtkTypeBool GetInterpolate();
71  vtkBooleanMacro(Interpolate,vtkTypeBool);
73 
75 
79  virtual void SetOpacity(double);
80  virtual double GetOpacity();
81  double GetOpacityMinValue() { return 0.0; }
82  double GetOpacityMaxValue() { return 1.0; }
84 
86 
90  void SetDisplayExtent(const int extent[6]);
91  void SetDisplayExtent(int minX, int maxX, int minY, int maxY,
92  int minZ, int maxZ);
93  void GetDisplayExtent(int extent[6]);
94  int *GetDisplayExtent() VTK_SIZEHINT(6) {return this->DisplayExtent;}
96 
98 
104  double *GetBounds() VTK_SIZEHINT(6) override;
105  void GetBounds(double bounds[6]) { this->Superclass::GetBounds(bounds); };
107 
109 
115  double *GetDisplayBounds();
116  void GetDisplayBounds(double bounds[6]);
118 
120 
124  int GetSliceNumber();
125  int GetSliceNumberMax();
126  int GetSliceNumberMin();
128 
130 
139  void SetZSlice(int z) {this->SetDisplayExtent(
140  this->DisplayExtent[0], this->DisplayExtent[1],
141  this->DisplayExtent[2], this->DisplayExtent[3], z, z);
142  };
143  int GetZSlice() { return this->DisplayExtent[4];};
144  int GetWholeZMin();
145  int GetWholeZMax();
147 
155  int HasTranslucentPolygonalGeometry() override;
156 
158 
163  vtkGetMacro(ForceOpaque, bool);
164  vtkSetMacro(ForceOpaque, bool);
165  vtkBooleanMacro(ForceOpaque, bool);
167 
168 protected:
169  vtkImageActor();
170  ~vtkImageActor() override;
171 
176  static int GetOrientationFromExtent(const int extent[6]);
177 
178  int DisplayExtent[6];
179  double DisplayBounds[6];
180 
181  // Convenience function that returns the input of the mapper
182  vtkAlgorithm *GetInputAlgorithm();
183 
184  // the result of HasTranslucentPolygonalGeometry is cached
188 
189 private:
190  vtkImageActor(const vtkImageActor&) = delete;
191  void operator=(const vtkImageActor&) = delete;
192 };
193 
194 #endif
vtkImageActor::ForceOpaque
bool ForceOpaque
Definition: vtkImageActor.h:187
vtkImageActor::GetOpacityMaxValue
double GetOpacityMaxValue()
Definition: vtkImageActor.h:82
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:53
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:32
vtkProp3D::GetBounds
double * GetBounds() override=0
Get the bounds for this Prop as (Xmin,Xmax,Ymin,Ymax,Zmin,Zmax).
vtkImageSlice
represents an image in a 3D scene
Definition: vtkImageSlice.h:46
VTK_SIZEHINT
#define VTK_SIZEHINT(...)
Definition: vtkWrappingHints.h:42
vtkImageSlice::New
static vtkImageSlice * New()
Creates an Image with the following defaults: origin(0,0,0) position=(0,0,0) scale=1 visibility=1 pic...
vtkImageActor::SetZSlice
void SetZSlice(int z)
Set/Get the current slice number.
Definition: vtkImageActor.h:139
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImageActor::TranslucentComputationTime
vtkTimeStamp TranslucentComputationTime
Definition: vtkImageActor.h:185
vtkImageSlice::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkImageSlice::GetBounds
double * GetBounds() override
Get the bounds - either all six at once (xmin, xmax, ymin, ymax, zmin, zmax) or one at a time.
vtkImageSlice.h
vtkImageSlice::HasTranslucentPolygonalGeometry
int HasTranslucentPolygonalGeometry() override
Internal method, should only be used by rendering.
vtkImageActor::GetZSlice
int GetZSlice()
Definition: vtkImageActor.h:143
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:57
vtkImageActor
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:43
vtkImageActor::TranslucentCachedResult
int TranslucentCachedResult
Definition: vtkImageActor.h:186
vtkImageActor::GetOpacityMinValue
double GetOpacityMinValue()
Definition: vtkImageActor.h:81
vtkX3D::extent
Definition: vtkX3D.h:345
vtkImageActor::GetDisplayExtent
int * GetDisplayExtent()
Definition: vtkImageActor.h:94
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:35
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69