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 =========================================================================*/
37 #ifndef vtkImageActor_h
38 #define vtkImageActor_h
39 
40 #include "vtkRenderingCoreModule.h" // For export macro
41 #include "vtkImageSlice.h"
42 
43 class vtkAlgorithm;
44 class vtkPropCollection;
45 class vtkRenderer;
46 class vtkImageData;
47 
48 
49 class VTKRENDERINGCORE_EXPORT vtkImageActor : public vtkImageSlice
50 {
51 public:
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
58  static vtkImageActor *New();
59 
61 
66  virtual void SetInputData(vtkImageData *);
67  virtual vtkImageData *GetInput();
69 
71 
75  virtual void SetInterpolate(vtkTypeBool);
76  virtual vtkTypeBool GetInterpolate();
77  vtkBooleanMacro(Interpolate,vtkTypeBool);
79 
81 
85  virtual void SetOpacity(double);
86  virtual double GetOpacity();
87  double GetOpacityMinValue() { return 0.0; }
88  double GetOpacityMaxValue() { return 1.0; }
90 
92 
96  void SetDisplayExtent(const int extent[6]);
97  void SetDisplayExtent(int minX, int maxX, int minY, int maxY,
98  int minZ, int maxZ);
99  void GetDisplayExtent(int extent[6]);
100  int *GetDisplayExtent() VTK_SIZEHINT(6) {return this->DisplayExtent;}
102 
104 
110  double *GetBounds() VTK_SIZEHINT(6) override;
111  void GetBounds(double bounds[6]) { this->Superclass::GetBounds(bounds); };
113 
115 
121  double *GetDisplayBounds();
122  void GetDisplayBounds(double bounds[6]);
124 
126 
130  int GetSliceNumber();
131  int GetSliceNumberMax();
132  int GetSliceNumberMin();
134 
136 
145  void SetZSlice(int z) {this->SetDisplayExtent(
146  this->DisplayExtent[0], this->DisplayExtent[1],
147  this->DisplayExtent[2], this->DisplayExtent[3], z, z);
148  };
149  int GetZSlice() { return this->DisplayExtent[4];};
150  int GetWholeZMin();
151  int GetWholeZMax();
153 
162 
164 
169  vtkGetMacro(ForceOpaque, bool);
170  vtkSetMacro(ForceOpaque, bool);
171  vtkBooleanMacro(ForceOpaque, bool);
173 
174 protected:
175  vtkImageActor();
176  ~vtkImageActor() override;
177 
182  static int GetOrientationFromExtent(const int extent[6]);
183 
184  int DisplayExtent[6];
185  double DisplayBounds[6];
186 
187  // Convenience function that returns the input of the mapper
188  vtkAlgorithm *GetInputAlgorithm();
189 
190  // the result of HasTranslucentPolygonalGeometry is cached
194 
195 private:
196  vtkImageActor(const vtkImageActor&) = delete;
197  void operator=(const vtkImageActor&) = delete;
198 };
199 
200 #endif
vtkImageActor::ForceOpaque
bool ForceOpaque
Definition: vtkImageActor.h:193
vtkImageActor::GetOpacityMaxValue
double GetOpacityMaxValue()
Definition: vtkImageActor.h:88
vtkAlgorithm
Superclass for all sources, filters, and sinks in VTK.
Definition: vtkAlgorithm.h:59
vtkTimeStamp
record modification and/or execution time
Definition: vtkTimeStamp.h:35
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:52
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:145
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:45
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkImageActor::TranslucentComputationTime
vtkTimeStamp TranslucentComputationTime
Definition: vtkImageActor.h:191
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
vtkImageActor::GetZSlice
int GetZSlice()
Definition: vtkImageActor.h:149
vtkRenderer
abstract specification for renderers
Definition: vtkRenderer.h:63
vtkImageActor
draw an image in a rendered 3D scene
Definition: vtkImageActor.h:49
vtkImageActor::TranslucentCachedResult
int TranslucentCachedResult
Definition: vtkImageActor.h:192
vtkImageSlice::HasTranslucentPolygonalGeometry
vtkTypeBool HasTranslucentPolygonalGeometry() override
Internal method, should only be used by rendering.
vtkImageActor::GetOpacityMinValue
double GetOpacityMinValue()
Definition: vtkImageActor.h:87
vtkX3D::extent
Definition: vtkX3D.h:345
vtkImageActor::GetDisplayExtent
int * GetDisplayExtent()
Definition: vtkImageActor.h:100
vtkPropCollection
an ordered list of Props
Definition: vtkPropCollection.h:41
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69