VTK  9.7.1
vtkImageStack.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
23 #ifndef vtkImageStack_h
24 #define vtkImageStack_h
25 
26 #include "vtkImageSlice.h"
27 #include "vtkRenderingImageModule.h" // For export macro
28 #include "vtkWrappingHints.h"
29 
30 VTK_ABI_NAMESPACE_BEGIN
32 class vtkImageProperty;
33 class vtkImageMapper3D;
34 class vtkCollection;
35 
36 class VTKRENDERINGIMAGE_EXPORT VTK_MARSHALAUTO vtkImageStack : public vtkImageSlice
37 {
38 public:
39  vtkTypeMacro(vtkImageStack, vtkImageSlice);
40  void PrintSelf(ostream& os, vtkIndent indent) override;
41  static vtkImageStack* New();
42 
47  void AddImage(vtkImageSlice* prop);
48 
53  void RemoveImage(vtkImageSlice* prop);
54 
58  vtkTypeBool HasImage(vtkImageSlice* prop);
59 
63  vtkImageSliceCollection* GetImages() { return this->Images; }
64 
66 
70  vtkSetMacro(ActiveLayer, int);
71  int GetActiveLayer() { return this->ActiveLayer; }
73 
79  vtkImageSlice* GetActiveImage();
80 
84  vtkImageMapper3D* GetMapper() override;
85 
89  vtkImageProperty* GetProperty() override;
90 
92 
95  double* GetBounds() override;
96  void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds(bounds); }
98 
102  vtkMTimeType GetMTime() override;
103 
110  vtkMTimeType GetRedrawMTime() override;
111 
115  void ShallowCopy(vtkProp* prop) override;
116 
123 
125 
128  int RenderOverlay(vtkViewport* viewport) override;
129  int RenderOpaqueGeometry(vtkViewport* viewport) override;
130  int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
132 
137 
141  void ReleaseGraphicsResources(vtkWindow* win) override;
142 
144 
148  void InitPathTraversal() override;
150  vtkAssemblyPath* GetNextPath() override;
151  int GetNumberOfPaths() override;
153 
159  void BuildPaths(vtkAssemblyPaths* paths, vtkAssemblyPath* path) override;
160 
161 protected:
162  vtkImageStack();
163  ~vtkImageStack() override;
164 
165  void SetMapper(vtkImageMapper3D* mapper);
166  void SetProperty(vtkImageProperty* property);
167 
168  void PokeMatrices(vtkMatrix4x4* matrix);
169  void UpdatePaths();
170 
171  vtkTimeStamp PathTime;
172  vtkCollection* ImageMatrices;
174  int ActiveLayer;
175 
176 private:
177  vtkImageStack(const vtkImageStack&) = delete;
178  void operator=(const vtkImageStack&) = delete;
179 };
180 
181 VTK_ABI_NAMESPACE_END
182 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:49
void GetBounds(double bounds[6])
Get the combined bounds of all of the images.
Definition: vtkImageStack.h:96
vtkMTimeType GetRedrawMTime() override
Return the mtime of anything that would cause the rendered image to appear differently.
represent and manipulate 4x4 transformation matrices
Definition: vtkMatrix4x4.h:31
a sorted list of image slice objects
double * GetBounds() override=0
Return a reference to the Prop3D's composite transform.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
abstract specification for Viewports
Definition: vtkViewport.h:46
void ReleaseGraphicsResources(vtkWindow *win) override
Release any resources held by this prop.
record modification and/or execution time
Definition: vtkTimeStamp.h:24
image display properties
int RenderOpaqueGeometry(vtkViewport *viewport) override
Support the standard render methods.
virtual vtkImageProperty * GetProperty()
Set/Get the image display properties.
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:64
window superclass for vtkRenderWindow
Definition: vtkWindow.h:41
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkImageSlice.
vtkImageSliceCollection * GetImages()
Get the list of images as a vtkImageSliceCollection.
Definition: vtkImageStack.h:63
void InitPathTraversal() override
Overload vtkProp's method for setting up assembly paths.
a list of nodes that form an assembly path
a simple class to control print indentation
Definition: vtkIndent.h:28
int RenderOverlay(vtkViewport *viewport) override
Support the standard render methods.
abstract class for mapping images to the screen
void GetImages(vtkPropCollection *)
For some exporters and other other operations we must be able to collect all the actors, volumes, and images.
a list of lists of props representing an assembly hierarchy
#define VTK_MARSHALEXCLUDE(reason)
create and manipulate ordered lists of objects
Definition: vtkCollection.h:39
int GetActiveLayer()
Set the active layer number.
Definition: vtkImageStack.h:71
represents an image in a 3D scene
Definition: vtkImageSlice.h:39
Allocate and hold a VTK object.
int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override
Support the standard render methods.
static vtkImageSlice * New()
Creates an Image with the following defaults: origin(0,0,0) position=(0,0,0) scale=1 visibility=1 pic...
#define VTK_MARSHALAUTO
#define VTK_MARSHAL_EXCLUDE_REASON_NOT_SUPPORTED
virtual vtkImageMapper3D * GetMapper()
Set/Get the mapper.
vtkMTimeType GetMTime() override
Return the MTime also considering the property etc.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
manages a stack of composited images
Definition: vtkImageStack.h:36