VTK  9.3.20240227
vtkAnnotationLayers.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-USGov
4 
16 #ifndef vtkAnnotationLayers_h
17 #define vtkAnnotationLayers_h
18 
19 #include "vtkCommonDataModelModule.h" // For export macro
20 #include "vtkDataObject.h"
21 
22 VTK_ABI_NAMESPACE_BEGIN
23 class vtkAnnotation;
24 class vtkSelection;
25 
26 class VTKCOMMONDATAMODEL_EXPORT vtkAnnotationLayers : public vtkDataObject
27 {
28 public:
30  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
36  int GetDataObjectType() override { return VTK_ANNOTATION_LAYERS; }
37 
39 
42  virtual void SetCurrentAnnotation(vtkAnnotation* ann);
43  vtkGetObjectMacro(CurrentAnnotation, vtkAnnotation);
45 
47 
51  virtual void SetCurrentSelection(vtkSelection* sel);
54 
58  unsigned int GetNumberOfAnnotations();
59 
63  vtkAnnotation* GetAnnotation(unsigned int idx);
64 
69 
74 
78  void Initialize() override;
79 
84  void ShallowCopy(vtkDataObject* other) override;
85 
90  void DeepCopy(vtkDataObject* other) override;
91 
93 
99 
103  vtkMTimeType GetMTime() override;
104 
105 protected:
108 
109  class Internals;
110  Internals* Implementation;
112 
113 private:
114  vtkAnnotationLayers(const vtkAnnotationLayers&) = delete;
115  void operator=(const vtkAnnotationLayers&) = delete;
116 };
117 
118 VTK_ABI_NAMESPACE_END
119 #endif
Stores a ordered collection of annotation sets.
vtkAnnotation * CurrentAnnotation
void Initialize() override
Initialize the data structure to an empty state.
void ShallowCopy(vtkDataObject *other) override
Copy data from another data object into this one which references the same member annotations.
static vtkAnnotationLayers * New()
virtual void SetCurrentAnnotation(vtkAnnotation *ann)
The current annotation associated with this annotation link.
void DeepCopy(vtkDataObject *other) override
Copy data from another data object into this one, performing a deep copy of member annotations.
unsigned int GetNumberOfAnnotations()
The number of annotations in a specific layer.
static vtkAnnotationLayers * GetData(vtkInformation *info)
Retrieve a vtkAnnotationLayers stored inside an information object.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkAnnotationLayers * GetData(vtkInformationVector *v, int i=0)
Retrieve a vtkAnnotationLayers stored inside an information object.
int GetDataObjectType() override
Returns VTK_ANNOTATION.
~vtkAnnotationLayers() override
void AddAnnotation(vtkAnnotation *ann)
Add an annotation to a layer.
vtkMTimeType GetMTime() override
The modified time for this object.
void RemoveAnnotation(vtkAnnotation *ann)
Remove an annotation from a layer.
virtual void SetCurrentSelection(vtkSelection *sel)
The current selection associated with this annotation link.
vtkAnnotation * GetAnnotation(unsigned int idx)
Retrieve an annotation from a layer.
virtual vtkSelection * GetCurrentSelection()
The current selection associated with this annotation link.
Stores a collection of annotation artifacts.
Definition: vtkAnnotation.h:33
general representation of visualization data
a simple class to control print indentation
Definition: vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
data object that represents a "selection" in VTK.
Definition: vtkSelection.h:159
@ info
Definition: vtkX3D.h:376
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:270
#define VTK_ANNOTATION_LAYERS
Definition: vtkType.h:110