1 #ifndef __vtkSlicerAnnotationModuleLogic_h 2 #define __vtkSlicerAnnotationModuleLogic_h 5 #include "vtkSlicerAnnotationsModuleLogicExport.h" 16 #include <vtkStdString.h> 27 RefreshRequestEvent = vtkCommand::UserEvent,
28 HierarchyNodeAddedEvent
32 void PrintSelf(ostream& os, vtkIndent indent)
override;
43 void AddAnnotationNode(
const char * nodeDescriptor,
bool persistent=
false);
62 bool IsAnnotationNode(
const char*
id);
64 bool IsAnnotationHierarchyNode(
const char*
id);
80 const char * GetAnnotationName(
const char *
id);
83 vtkStdString GetAnnotationText(
const char*
id);
85 void SetAnnotationText(
const char*
id,
const char * newtext);
88 double GetAnnotationTextScale(
const char*
id);
90 void SetAnnotationTextScale(
const char*
id,
double textScale);
93 double * GetAnnotationTextSelectedColor(
const char*
id);
95 void SetAnnotationTextSelectedColor(
const char*
id,
double * color);
98 double * GetAnnotationTextUnselectedColor(
const char*
id);
100 void SetAnnotationTextUnselectedColor(
const char*
id,
double * color);
103 double * GetAnnotationColor(
const char *
id);
105 void SetAnnotationColor(
const char *
id,
double *color);
108 double * GetAnnotationUnselectedColor(
const char *
id);
110 void SetAnnotationUnselectedColor(
const char *
id,
double *color);
113 double * GetAnnotationPointColor(
const char *
id);
115 void SetAnnotationPointColor(
const char *
id,
double *color);
118 double * GetAnnotationPointUnselectedColor(
const char *
id);
120 void SetAnnotationPointUnselectedColor(
const char *
id,
double *color);
124 const char * GetAnnotationPointGlyphTypeAsString(
const char *
id);
126 int GetAnnotationPointGlyphType(
const char *
id);
128 void SetAnnotationPointGlyphTypeFromString(
const char *
id,
const char *glyphType);
130 void SetAnnotationPointGlyphType(
const char *
id,
int glyphType);
133 double * GetAnnotationLineColor(
const char *
id);
135 void SetAnnotationLineColor(
const char *
id,
double *color);
138 double * GetAnnotationLineUnselectedColor(
const char *
id);
140 void SetAnnotationLineUnselectedColor(
const char *
id,
double *color);
144 const char * GetAnnotationMeasurement(
const char *
id,
bool showUnits);
147 const char * GetAnnotationIcon(
const char *
id);
148 const char * GetAnnotationIcon(
vtkMRMLNode* mrmlNode);
151 int GetAnnotationLockedUnlocked(
const char *
id);
153 void SetAnnotationLockedUnlocked(
const char *
id);
156 int GetAnnotationVisibility(
const char *
id);
158 void SetAnnotationVisibility(
const char *
id);
161 void SetAnnotationSelected(
const char *
id,
bool selected);
163 void SetAllAnnotationsSelected(
bool selected);
166 void BackupAnnotationNode(
const char *
id);
168 void RestoreAnnotationNode(
const char *
id);
170 void DeleteBackupNodes(
const char *
id);
173 void JumpSlicesToAnnotationCoordinate(
const char*
id);
175 const char * MoveAnnotationUp(
const char*
id);
176 const char * MoveAnnotationDown(
const char*
id);
182 void CreateSnapShot(
const char* name,
const char* description,
int screenshotType,
double scaleFactor, vtkImageData* screenshot);
185 void ModifySnapShot(vtkStdString
id,
const char* name,
const char* description,
int screenshotType,
double scaleFactor, vtkImageData* screenshot);
188 vtkStdString GetSnapShotName(
const char*
id);
191 vtkStdString GetSnapShotDescription(
const char*
id);
194 int GetSnapShotScreenshotType(
const char*
id);
197 double GetSnapShotScaleFactor(
const char*
id);
200 vtkImageData* GetSnapShotScreenshot(
const char*
id);
203 bool IsSnapshotNode(
const char*
id);
219 char * GetTopLevelHierarchyNodeID(
vtkMRMLNode* node=
nullptr);
228 vtkGetStringMacro(ActiveHierarchyNodeID);
229 vtkSetStringMacro(ActiveHierarchyNodeID);
256 char *LoadAnnotation(
const char *filename,
const char *name,
int fileType);
270 char *AddFiducial(
double r=0.0,
double a=0.0,
double s=0.0,
const char *label=
nullptr);
287 void *callData )
override;
288 virtual void OnMRMLAnnotationNodeModifiedEvent(
vtkMRMLNode* node);
294 std::string m_StringHolder;
296 char* m_MeasurementFormat;
297 char* m_CoordinateFormat;
300 char *ActiveHierarchyNodeID;
void PrintSelf(ostream &os, vtkIndent indent) override
static vtkSlicerModuleLogic * New()
The Usual vtk class functions.
virtual void OnMRMLSceneEndClose()
virtual void ProcessMRMLNodesEvents(vtkObject *caller, unsigned long event, void *callData)
A set of MRML Nodes that supports serialization and undo/redo.
virtual void OnMRMLSceneNodeAdded(vtkMRMLNode *)
virtual void RegisterNodes()
virtual void ObserveMRMLScene()
virtual void SetMRMLSceneInternal(vtkMRMLScene *newScene)
Abstract Superclass for all specific types of MRML nodes.