VTK  9.3.0
vtkImageActor.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
34#ifndef vtkImageActor_h
35#define vtkImageActor_h
36
37#include "vtkImageSlice.h"
38#include "vtkRenderingCoreModule.h" // For export macro
39
40VTK_ABI_NAMESPACE_BEGIN
41class vtkAlgorithm;
43class vtkRenderer;
44class vtkImageData;
45
46class VTKRENDERINGCORE_EXPORT vtkImageActor : public vtkImageSlice
47{
48public:
50 void PrintSelf(ostream& os, vtkIndent indent) override;
51
55 static vtkImageActor* New();
56
58
63 virtual void SetInputData(vtkImageData*);
66
68
74 vtkBooleanMacro(Interpolate, vtkTypeBool);
76
78
82 virtual void SetOpacity(double);
83 virtual double GetOpacity();
84 double GetOpacityMinValue() { return 0.0; }
85 double GetOpacityMaxValue() { return 1.0; }
87
89
93 void SetDisplayExtent(const int extent[6]);
94 void SetDisplayExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
95 void GetDisplayExtent(int extent[6]);
96 int* GetDisplayExtent() VTK_SIZEHINT(6) { return this->DisplayExtent; }
98
100
106 double* GetBounds() VTK_SIZEHINT(6) override;
107 void GetBounds(double bounds[6]) { this->Superclass::GetBounds(bounds); }
109
111
118 void GetDisplayBounds(double bounds[6]);
120
122
126 int GetSliceNumber();
127 int GetSliceNumberMax();
128 int GetSliceNumberMin();
130
132
141 void SetZSlice(int z)
142 {
143 this->SetDisplayExtent(this->DisplayExtent[0], this->DisplayExtent[1], this->DisplayExtent[2],
144 this->DisplayExtent[3], z, z);
145 }
146 int GetZSlice() { return this->DisplayExtent[4]; }
150
159
161
166 vtkGetMacro(ForceOpaque, bool);
167 vtkSetMacro(ForceOpaque, bool);
168 vtkBooleanMacro(ForceOpaque, bool);
170
171protected:
173 ~vtkImageActor() override;
174
179 static int GetOrientationFromExtent(const int extent[6]);
180
181 int DisplayExtent[6];
182 double DisplayBounds[6];
183
184 // Convenience function that returns the input of the mapper
186
187 // the result of HasTranslucentPolygonalGeometry is cached
191
192private:
193 vtkImageActor(const vtkImageActor&) = delete;
194 void operator=(const vtkImageActor&) = delete;
195};
196
197VTK_ABI_NAMESPACE_END
198#endif
Superclass for all sources, filters, and sinks in VTK.
draw an image in a rendered 3D scene
virtual void SetInputData(vtkImageData *)
Set/Get the image data input for the image actor.
int GetWholeZMax()
Set/Get the current slice number.
virtual vtkTypeBool GetInterpolate()
Turn on/off linear interpolation of the image when rendering.
void GetDisplayExtent(int extent[6])
The image extent is generally set explicitly, but if not set it will be determined from the input ima...
double * GetBounds() override
Get the bounds of this image actor.
int * GetDisplayExtent()
The image extent is generally set explicitly, but if not set it will be determined from the input ima...
double * GetDisplayBounds()
Get the bounds of the data that is displayed by this image actor.
double GetOpacityMaxValue()
Set/Get the object's opacity.
vtkTimeStamp TranslucentComputationTime
virtual vtkImageData * GetInput()
Set/Get the image data input for the image actor.
virtual double GetOpacity()
Set/Get the object's opacity.
virtual void SetOpacity(double)
Set/Get the object's opacity.
vtkTypeBool HasTranslucentPolygonalGeometry() override
Internal method, should only be used by rendering.
static vtkImageActor * New()
Instantiate the image actor.
vtkAlgorithm * GetInputAlgorithm()
virtual void SetInterpolate(vtkTypeBool)
Turn on/off linear interpolation of the image when rendering.
int TranslucentCachedResult
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double GetOpacityMinValue()
Set/Get the object's opacity.
void SetDisplayExtent(const int extent[6])
The image extent is generally set explicitly, but if not set it will be determined from the input ima...
static int GetOrientationFromExtent(const int extent[6])
Guess the orientation from the extent.
~vtkImageActor() override
int GetWholeZMin()
Set/Get the current slice number.
void SetDisplayExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ)
The image extent is generally set explicitly, but if not set it will be determined from the input ima...
int GetZSlice()
Set/Get the current slice number.
topologically and geometrically regular array of data
represents an image in a 3D scene
a simple class to control print indentation
Definition vtkIndent.h:38
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
an ordered list of Props
abstract specification for renderers
Definition vtkRenderer.h:68
record modification and/or execution time
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_SIZEHINT(...)