VTK
vtkImageStack.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkImageStack.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 =========================================================================*/
35 #ifndef vtkImageStack_h
36 #define vtkImageStack_h
37 
38 #include "vtkRenderingImageModule.h" // For export macro
39 #include "vtkImageSlice.h"
40 
42 class vtkImageProperty;
43 class vtkImageMapper3D;
44 class vtkCollection;
45 
46 class VTKRENDERINGIMAGE_EXPORT vtkImageStack : public vtkImageSlice
47 {
48 public:
50  void PrintSelf(ostream& os, vtkIndent indent) override;
51  static vtkImageStack *New();
52 
57  void AddImage(vtkImageSlice *prop);
58 
63  void RemoveImage(vtkImageSlice *prop);
64 
68  int HasImage(vtkImageSlice *prop);
69 
73  vtkImageSliceCollection *GetImages() { return this->Images; }
74 
76 
80  vtkSetMacro(ActiveLayer, int);
81  int GetActiveLayer() { return this->ActiveLayer; }
83 
89  vtkImageSlice *GetActiveImage();
90 
94  vtkImageMapper3D *GetMapper() override;
95 
99  vtkImageProperty *GetProperty() override;
100 
102 
105  double *GetBounds() override;
106  void GetBounds(double bounds[6]) { this->vtkProp3D::GetBounds( bounds ); };
108 
112  vtkMTimeType GetMTime() override;
113 
120  vtkMTimeType GetRedrawMTime() override;
121 
125  void ShallowCopy(vtkProp *prop) override;
126 
133 
135 
138  int RenderOverlay(vtkViewport *viewport) override;
139  int RenderOpaqueGeometry(vtkViewport *viewport) override;
140  int RenderTranslucentPolygonalGeometry(vtkViewport *viewport) override;
142 
147 
151  void ReleaseGraphicsResources(vtkWindow *win) override;
152 
154 
158  void InitPathTraversal() override;
159  vtkAssemblyPath *GetNextPath() override;
160  int GetNumberOfPaths() override;
162 
168  void BuildPaths(vtkAssemblyPaths *paths, vtkAssemblyPath *path) override;
169 
170 protected:
171  vtkImageStack();
172  ~vtkImageStack() override;
173 
174  void SetMapper(vtkImageMapper3D *mapper);
175  void SetProperty(vtkImageProperty *property);
176 
177  void PokeMatrices(vtkMatrix4x4 *matrix);
178  void UpdatePaths();
179 
184 
185 private:
186  vtkImageStack(const vtkImageStack&) = delete;
187  void operator=(const vtkImageStack&) = delete;
188 };
189 
190 #endif
abstract superclass for all actors, volumes and annotations
Definition: vtkProp.h:52
vtkImageSliceCollection * Images
void GetBounds(double bounds[6])
Get the combined bounds of all of the images.
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:41
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:302
abstract specification for Viewports
Definition: vtkViewport.h:47
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:35
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:69
window superclass for vtkRenderWindow
Definition: vtkWindow.h:37
void ShallowCopy(vtkProp *prop) override
Shallow copy of this vtkImageSlice.
vtkImageSliceCollection * GetImages()
Get the list of images as a vtkImageSliceCollection.
Definition: vtkImageStack.h:73
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:39
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:51
int GetActiveLayer()
Set the active layer number.
Definition: vtkImageStack.h:81
represents an image in a 3D scene
Definition: vtkImageSlice.h:52
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:155
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:46