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=========================================================================*/
30
31#ifndef vtkImageActor_h
32#define vtkImageActor_h
33
34#include "vtkImageSlice.h"
35#include "vtkRenderingCoreModule.h" // For export macro
36
37class vtkAlgorithm;
39class vtkRenderer;
40class vtkImageData;
41
42class VTKRENDERINGCORE_EXPORT vtkImageActor : public vtkImageSlice
43{
44public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
51 static vtkImageActor* New();
52
54
59 virtual void SetInputData(vtkImageData*);
62
64
70 vtkBooleanMacro(Interpolate, vtkTypeBool);
72
74
78 virtual void SetOpacity(double);
79 virtual double GetOpacity();
80 double GetOpacityMinValue() { return 0.0; }
81 double GetOpacityMaxValue() { return 1.0; }
83
85
89 void SetDisplayExtent(const int extent[6]);
90 void SetDisplayExtent(int minX, int maxX, int minY, int maxY, int minZ, int maxZ);
91 void GetDisplayExtent(int extent[6]);
92 int* GetDisplayExtent() VTK_SIZEHINT(6) { return this->DisplayExtent; }
94
96
102 double* GetBounds() VTK_SIZEHINT(6) override;
103 void GetBounds(double bounds[6]) { this->Superclass::GetBounds(bounds); }
105
107
114 void GetDisplayBounds(double bounds[6]);
116
118
126
128
137 void SetZSlice(int z)
138 {
139 this->SetDisplayExtent(this->DisplayExtent[0], this->DisplayExtent[1], this->DisplayExtent[2],
140 this->DisplayExtent[3], z, z);
141 }
142 int GetZSlice() { return this->DisplayExtent[4]; }
146
155
157
162 vtkGetMacro(ForceOpaque, bool);
163 vtkSetMacro(ForceOpaque, bool);
164 vtkBooleanMacro(ForceOpaque, bool);
166
167protected:
169 ~vtkImageActor() override;
170
175 static int GetOrientationFromExtent(const int extent[6]);
176
178 double DisplayBounds[6];
179
180 // Convenience function that returns the input of the mapper
182
183 // the result of HasTranslucentPolygonalGeometry is cached
187
188private:
189 vtkImageActor(const vtkImageActor&) = delete;
190 void operator=(const vtkImageActor&) = delete;
191};
192
193#endif
Superclass for all sources, filters, and sinks in VTK.
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.
int GetSliceNumberMax()
Return the slice number (& min/max slice number) computed from the display extent.
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 GetSliceNumber()
Return the slice number (& min/max slice number) computed from the display extent.
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 DisplayBounds[6]
void GetDisplayBounds(double bounds[6])
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.
int GetSliceNumberMin()
Return the slice number (& min/max slice number) computed from the display extent.
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...
void SetZSlice(int z)
Set/Get the current slice number.
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
a simple class to control print indentation
Definition vtkIndent.h:34
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:67
record modification and/or execution time
int vtkTypeBool
Definition vtkABI.h:69
#define VTK_SIZEHINT(...)