VTK  9.0.1
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 "vtkImageSlice.h"
35 #include "vtkRenderingCoreModule.h" // For export macro
36 
37 class vtkAlgorithm;
38 class vtkPropCollection;
39 class vtkRenderer;
40 class vtkImageData;
41 
42 class VTKRENDERINGCORE_EXPORT vtkImageActor : public vtkImageSlice
43 {
44 public:
45  vtkTypeMacro(vtkImageActor, vtkImageSlice);
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
51  static vtkImageActor* New();
52 
54 
59  virtual void SetInputData(vtkImageData*);
60  virtual vtkImageData* GetInput();
62 
64 
68  virtual void SetInterpolate(vtkTypeBool);
69  virtual vtkTypeBool GetInterpolate();
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 
113  double* GetDisplayBounds();
114  void GetDisplayBounds(double bounds[6]);
116 
118 
122  int GetSliceNumber();
123  int GetSliceNumberMax();
124  int GetSliceNumberMin();
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]; }
143  int GetWholeZMin();
144  int GetWholeZMax();
146 
155 
157 
162  vtkGetMacro(ForceOpaque, bool);
163  vtkSetMacro(ForceOpaque, bool);
164  vtkBooleanMacro(ForceOpaque, bool);
166 
167 protected:
168  vtkImageActor();
169  ~vtkImageActor() override;
170 
175  static int GetOrientationFromExtent(const int extent[6]);
176 
177  int DisplayExtent[6];
178  double DisplayBounds[6];
179 
180  // Convenience function that returns the input of the mapper
181  vtkAlgorithm* GetInputAlgorithm();
182 
183  // the result of HasTranslucentPolygonalGeometry is cached
187 
188 private:
189  vtkImageActor(const vtkImageActor&) = delete;
190  void operator=(const vtkImageActor&) = delete;
191 };
192 
193 #endif
void SetZSlice(int z)
Set/Get the current slice number.
vtkTimeStamp TranslucentComputationTime
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:92
record modification and/or execution time
Definition: vtkTimeStamp.h:32
int GetZSlice()
Set/Get the current slice number.
abstract specification for renderers
Definition: vtkRenderer.h:67
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:42
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
double GetOpacityMinValue()
Set/Get the object's opacity.
Definition: vtkImageActor.h:80
double GetOpacityMaxValue()
Set/Get the object's opacity.
Definition: vtkImageActor.h:81
#define VTK_SIZEHINT(...)
represents an image in a 3D scene
Definition: vtkImageSlice.h:46
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.