VTK  9.3.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 
29 VTK_ABI_NAMESPACE_BEGIN
31 class vtkImageProperty;
32 class vtkImageMapper3D;
33 class vtkCollection;
34 
35 class VTKRENDERINGIMAGE_EXPORT vtkImageStack : public vtkImageSlice
36 {
37 public:
38  vtkTypeMacro(vtkImageStack, vtkImageSlice);
39  void PrintSelf(ostream& os, vtkIndent indent) override;
40  static vtkImageStack* New();
41 
46  void AddImage(vtkImageSlice* prop);
47 
52  void RemoveImage(vtkImageSlice* prop);
53 
57  vtkTypeBool HasImage(vtkImageSlice* prop);
58 
62  vtkImageSliceCollection* GetImages() { return this->Images; }
63 
65 
69  vtkSetMacro(ActiveLayer, int);
70  int GetActiveLayer() { return this->ActiveLayer; }
72 
78  vtkImageSlice* GetActiveImage();
79 
83  vtkImageMapper3D* GetMapper() override;
84 
88  vtkImageProperty* GetProperty() override;
89 
91 
94  double* GetBounds() override;
95  void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds(bounds); }
97 
101  vtkMTimeType GetMTime() override;
102 
109  vtkMTimeType GetRedrawMTime() override;
110 
114  void ShallowCopy(vtkProp* prop) override;
115 
122 
124 
127  int RenderOverlay(vtkViewport* viewport) override;
128  int RenderOpaqueGeometry(vtkViewport* viewport) override;
129  int RenderTranslucentPolygonalGeometry(vtkViewport* viewport) override;
131 
136 
140  void ReleaseGraphicsResources(vtkWindow* win) override;
141 
143 
147  void InitPathTraversal() override;
148  vtkAssemblyPath* GetNextPath() override;
149  int GetNumberOfPaths() override;
151 
157  void BuildPaths(vtkAssemblyPaths* paths, vtkAssemblyPath* path) override;
158 
159 protected:
160  vtkImageStack();
161  ~vtkImageStack() override;
162 
163  void SetMapper(vtkImageMapper3D* mapper);
164  void SetProperty(vtkImageProperty* property);
165 
166  void PokeMatrices(vtkMatrix4x4* matrix);
167  void UpdatePaths();
168 
173 
174 private:
175  vtkImageStack(const vtkImageStack&) = delete;
176  void operator=(const vtkImageStack&) = delete;
177 };
178 
179 VTK_ABI_NAMESPACE_END
180 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:45
vtkImageSliceCollection * Images
void GetBounds(double bounds[6])
Get the combined bounds of all of the images.
Definition: vtkImageStack.h:95
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:30
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:270
abstract specification for Viewports
Definition: vtkViewport.h:44
void ReleaseGraphicsResources(vtkWindow *win) override
Release any resources held by this prop.
virtual void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path)
WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE DO NOT USE THIS METHOD OUTSIDE OF THE RENDERI...
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.
virtual vtkAssemblyPath * GetNextPath()
vtkProp and its subclasses can be picked by subclasses of vtkAbstractPicker (e.g., vtkPropPicker).
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:27
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkImageSlice.
vtkImageSliceCollection * GetImages()
Get the list of images as a vtkImageSliceCollection.
Definition: vtkImageStack.h:62
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 SetProperty(vtkImageProperty *property)
Set/Get the image display properties.
void GetImages(vtkPropCollection *)
For some exporters and other other operations we must be able to collect all the actors, volumes, and images.
void SetMapper(vtkImageMapper3D *mapper)
Set/Get the mapper.
a list of lists of props representing an assembly hierarchy
vtkTimeStamp PathTime
create and manipulate ordered lists of objects
Definition: vtkCollection.h:44
int GetActiveLayer()
Set the active layer number.
Definition: vtkImageStack.h:70
represents an image in a 3D scene
Definition: vtkImageSlice.h:38
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...
virtual int GetNumberOfPaths()
vtkProp and its subclasses can be picked by subclasses of vtkAbstractPicker (e.g., vtkPropPicker).
Definition: vtkProp.h:146
vtkCollection * ImageMatrices
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:35