MCPcopy Create free account
hub / github.com/Kitware/VTK / SetAnnotationLayers

Method SetAnnotationLayers

Filters/General/vtkAnnotationLink.cxx:87–111  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

85
86//------------------------------------------------------------------------------
87void vtkAnnotationLink::SetAnnotationLayers(vtkAnnotationLayers* layers)
88{
89 // This method is a cut and paste of vtkCxxSetObjectMacro
90 // except that we listen for modified events from the annotations layers
91 if (layers != this->AnnotationLayers)
92 {
93 vtkAnnotationLayers* tmp = this->AnnotationLayers;
94 if (tmp)
95 {
96 tmp->RemoveObserver(this->Observer);
97 }
98 this->AnnotationLayers = layers;
99 if (this->AnnotationLayers != nullptr)
100 {
101 this->AnnotationLayers->Register(this);
102 this->AnnotationLayers->AddObserver(vtkCommand::ModifiedEvent, this->Observer);
103 }
104 if (tmp != nullptr)
105 {
106 tmp->UnRegister(this);
107 }
108 this->Modified();
109 this->InvokeEvent(vtkCommand::AnnotationChangedEvent, this->AnnotationLayers);
110 }
111}
112
113//------------------------------------------------------------------------------
114void vtkAnnotationLink::AddDomainMap(vtkTable* map)

Callers 1

UpdateAnnotationsMethod · 0.80

Calls 6

InvokeEventMethod · 0.80
RemoveObserverMethod · 0.45
RegisterMethod · 0.45
AddObserverMethod · 0.45
UnRegisterMethod · 0.45
ModifiedMethod · 0.45

Tested by

no test coverage detected