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

Method UpdateAnnotations

Views/Core/vtkDataRepresentation.cxx:301–319  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

299
300//------------------------------------------------------------------------------
301void vtkDataRepresentation::UpdateAnnotations(vtkAnnotationLayers* annotations, bool extend)
302{
303 if (extend)
304 {
305 // Append the annotations to the existing set of annotations on the link
306 vtkAnnotationLayers* currentAnnotations = this->AnnotationLinkInternal->GetAnnotationLayers();
307 for (unsigned int i = 0; i < annotations->GetNumberOfAnnotations(); ++i)
308 {
309 currentAnnotations->AddAnnotation(annotations->GetAnnotation(i));
310 }
311 this->InvokeEvent(
312 vtkCommand::AnnotationChangedEvent, reinterpret_cast<void*>(currentAnnotations));
313 }
314 else
315 {
316 this->AnnotationLinkInternal->SetAnnotationLayers(annotations);
317 this->InvokeEvent(vtkCommand::AnnotationChangedEvent, reinterpret_cast<void*>(annotations));
318 }
319}
320
321//------------------------------------------------------------------------------
322void vtkDataRepresentation::SetSelectionArrayName(const char* name)

Callers 2

AnnotateMethod · 0.95
UpdateAnnotationsFunction · 0.80

Calls 5

AddAnnotationMethod · 0.80
InvokeEventMethod · 0.80
SetAnnotationLayersMethod · 0.80
GetAnnotationMethod · 0.45

Tested by

no test coverage detected