Module vrAnnotation
[frames] | no frames]

Module vrAnnotation

This class is deprecated; use vrAnnotationService and vrdAnnotationNode instead.

Functions
vrAnnotationPtr
createAnnotation(name)
Creates a new annotation.
 
deleteAnnotations(annotations)
Deletes the annotations.
vrAnnotationPtr
duplicateAnnotation(annotation)
Duplicates the annotation.
vrAnnotationPtr or None
findAnnotation(name)
Find an annotation by name.
list of vrAnnotationPtr
getAnnotations()
Get a list of all annotations.
bool
getShowAnnotations()
Returns whether annotation visualizations are shown.
list of vrAnnotationPtr
loadAnnotationsXML(path)
Loads annotations from XML file and adds them to the scene.
 
pickAnnotation(annotation)
Activates the picking tool in the render window to reposition the given annotation.
 
saveAnnotationsXML(path, annotations)
Saves annotations to an XML file.
 
setShowAnnotations(state)
Shows/hides all annotations.
Function Details

createAnnotation(name)

 

Creates a new annotation.

Parameters:
  • name (string) - The name of the new annotation. The name is made unique.
Returns: vrAnnotationPtr
The created annotation.

deleteAnnotations(annotations)

 

Deletes the annotations.

Parameters:
  • annotations (list of vrAnnotationPtr) - list of the annotations to delete.

duplicateAnnotation(annotation)

 

Duplicates the annotation.

Parameters:
  • annotation (vrAnnotationPtr) - source annotation
Returns: vrAnnotationPtr
The copy.

findAnnotation(name)

 

Find an annotation by name. If multiple annotations have the same name, the first one is returned.

Parameters:
  • name (string) - The name of the annotation.
Returns: vrAnnotationPtr or None
Found annotation or None if not found.

getAnnotations()

 

Get a list of all annotations.

Returns: list of vrAnnotationPtr
List of annotations.

getShowAnnotations()

 

Returns whether annotation visualizations are shown.

Returns: bool
True if annotations shown, false if hidden.

loadAnnotationsXML(path)

 

Loads annotations from XML file and adds them to the scene.

Parameters:
  • path (string) - XML file path
Returns: list of vrAnnotationPtr
list of loaded annotations

pickAnnotation(annotation)

 

Activates the picking tool in the render window to reposition the given annotation.

Parameters:
  • annotation (vrAnnotationPtr) - annotation

saveAnnotationsXML(path, annotations)

 

Saves annotations to an XML file. Omit second parameter to save all annotations.

Parameters:
  • path (string) - XML file path
  • annotations (list of vrAnnotationPtr) - list of annotations to save (Optional)

setShowAnnotations(state)

 

Shows/hides all annotations.

Parameters:
  • state (bool) - Toggle show/hide.