VTK  9.2.6
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 "vtkImageSlice.h"
41 #include "vtkRenderingCoreModule.h" // For export macro
42 
43 class vtkAlgorithm;
44 class vtkPropCollection;
45 class vtkRenderer;
46 class vtkImageData;
47 
48 class VTKRENDERINGCORE_EXPORT vtkImageActor : public vtkImageSlice
49 {
50 public:
51  vtkTypeMacro(vtkImageActor, vtkImageSlice);
52  void PrintSelf(ostream& os, vtkIndent indent) override;
53 
57  static vtkImageActor* New();
58 
60 
65  virtual void SetInputData(vtkImageData*);
66  virtual vtkImageData* GetInput();
68 
70 
74  virtual void SetInterpolate(vtkTypeBool);
75  virtual vtkTypeBool GetInterpolate();
76  vtkBooleanMacro(Interpolate, vtkTypeBool);
78 
80 
84  virtual void SetOpacity(double);
85  virtual double GetOpacity();
86  double GetOpacityMinValue() { return 0.0; }
87  double GetOpacityMaxValue() { return 1.0; }
89 
91 
95  void SetDisplayExtent(const int extent[6]);
96  void SetDisplayExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
97  void GetDisplayExtent(int extent[6]);
98  int* GetDisplayExtent() VTK_SIZEHINT(6) { return this->DisplayExtent; }
100 
102 
108  double* GetBounds() VTK_SIZEHINT(6) override;
109  void GetBounds(double bounds[6]) { this->Superclass::GetBounds(bounds); }
111 
113 
119  double* GetDisplayBounds();
120  void GetDisplayBounds(double bounds[6]);
122 
124 
128  int GetSliceNumber();
129  int GetSliceNumberMax();
130  int GetSliceNumberMin();
132 
134 
143  void SetZSlice(int z)
144  {
145  this->SetDisplayExtent(this->DisplayExtent[0], this->DisplayExtent[1], this->DisplayExtent[2],
146  this->DisplayExtent[3], z, z);
147  }
148  int GetZSlice() { return this->DisplayExtent[4]; }
149  int GetWholeZMin();
150  int GetWholeZMax();
152 
161 
163 
168  vtkGetMacro(ForceOpaque, bool);
169  vtkSetMacro(ForceOpaque, bool);
170  vtkBooleanMacro(ForceOpaque, bool);
172 
173 protected:
174  vtkImageActor();
175  ~vtkImageActor() override;
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
187  vtkAlgorithm* GetInputAlgorithm();
188 
189  // the result of HasTranslucentPolygonalGeometry is cached
193 
194 private:
195  vtkImageActor(const vtkImageActor&) = delete;
196  void operator=(const vtkImageActor&) = delete;
197 };
198 
199 #endif
void SetZSlice(int z)
Set/Get the current slice number.
vtkTimeStamp TranslucentComputationTime
void GetBounds(T a, double bds[6])
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
int * GetDisplayExtent()
The image extent is generally set explicitly, but if not set it will be determined from the input ima...
Definition: vtkImageActor.h:98
record modification and/or execution time
Definition: vtkTimeStamp.h:35
int GetZSlice()
Set/Get the current slice number.
abstract specification for renderers
Definition: vtkRenderer.h:72
vtkTypeBool HasTranslucentPolygonalGeometry() override
Internal method, should only be used by rendering.
double * GetBounds() override
Get the bounds - either all six at once (xmin, xmax, ymin, ymax, zmin, zmax) or one at a time...
an ordered list of Props
int vtkTypeBool
Definition: vtkABI.h:69
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:62
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:48
a simple class to control print indentation
Definition: vtkIndent.h:39
topologically and geometrically regular array of data
Definition: vtkImageData.h:53
double GetOpacityMinValue()
Set/Get the object's opacity.
Definition: vtkImageActor.h:86
double GetOpacityMaxValue()
Set/Get the object's opacity.
Definition: vtkImageActor.h:87
#define VTK_SIZEHINT(...)
represents an image in a 3D scene
Definition: vtkImageSlice.h:49
static vtkImageSlice * New()
Creates an Image with the following defaults: origin(0,0,0) position=(0,0,0) scale=1 visibility=1 pic...
int TranslucentCachedResult
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.