Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
vtkSlicerAnnotationModuleLogic Class Reference

#include <Modules/Loadable/Annotations/Logic/vtkSlicerAnnotationModuleLogic.h>

Inheritance diagram for vtkSlicerAnnotationModuleLogic:
Inheritance graph
[legend]
Collaboration diagram for vtkSlicerAnnotationModuleLogic:
Collaboration graph
[legend]

Public Types

enum  { None = 0, Fiducial, Ruler, ROI }
 Enumeration listing valid file types to load. More...
 
enum  Events { RefreshRequestEvent = vtkCommand::UserEvent, HierarchyNodeAddedEvent }
 
typedef vtkSlicerModuleLogic Superclass
 
- Public Types inherited from vtkSlicerModuleLogic
typedef vtkMRMLAbstractLogic Superclass
 
- Public Types inherited from vtkMRMLAbstractLogic
typedef vtkObject Superclass
 
typedef void(vtkMRMLAbstractLogic::* TaskFunctionPointer) (void *clientdata)
 

Public Member Functions

void AddAnnotationNode (const char *nodeDescriptor, bool persistent=false)
 
const char * AddDisplayNodeForHierarchyNode (vtkMRMLAnnotationHierarchyNode *hnode)
 
char * AddFiducial (double r=0.0, double a=0.0, double s=0.0, const char *label=NULL)
 
bool AddHierarchy ()
 
void AddNodeCompleted (vtkMRMLAnnotationNode *annotationNode)
 
void BackupAnnotationNode (const char *id)
 Backup an Annotation MRML node. More...
 
void CancelCurrentOrRemoveLastAddedAnnotationNode ()
 
void CreateSnapShot (const char *name, const char *description, int screenshotType, double scaleFactor, vtkImageData *screenshot)
 Create a snapShot. More...
 
void DeleteBackupNodes (const char *id)
 Deletes a backup of an Annotation MRML node. More...
 
vtkMRMLAnnotationHierarchyNodeGetActiveHierarchyNode ()
 Get the active hierarchy node which will be used as a parent for new annotations. More...
 
virtual char * GetActiveHierarchyNodeID ()
 get/set the id of the active hierarchy node More...
 
double * GetAnnotationColor (const char *id)
 Get the color of an annotation mrml node, returns null if can't find it. More...
 
const char * GetAnnotationIcon (const char *id)
 Get the icon name of an Annotation MRML node. More...
 
const char * GetAnnotationIcon (vtkMRMLNode *mrmlNode)
 
double * GetAnnotationLineColor (const char *id)
 Get the line color of an annotation mrml node, returns null if can't find it. More...
 
double * GetAnnotationLineUnselectedColor (const char *id)
 Get the unselected line color of an annotation mrml node, returns null if can't find it. More...
 
int GetAnnotationLockedUnlocked (const char *id)
 Get the lock flag of an Annotation MRML node. More...
 
const char * GetAnnotationMeasurement (const char *id, bool showUnits)
 Get the measurement value of an Annotation MRML node. More...
 
const char * GetAnnotationName (const char *id)
 Get the name of an Annotation MRML node. More...
 
double * GetAnnotationPointColor (const char *id)
 Get the point color of an annotation mrml node, returns null if can't find it. More...
 
int GetAnnotationPointGlyphType (const char *id)
 Get the point glyph type of the annotation mrml node,. More...
 
const char * GetAnnotationPointGlyphTypeAsString (const char *id)
 
double * GetAnnotationPointUnselectedColor (const char *id)
 Get the unselected point color of an annotation mrml node, returns null if can't find it. More...
 
vtkStdString GetAnnotationText (const char *id)
 Return the text of an Annotation MRML node. More...
 
double GetAnnotationTextScale (const char *id)
 Get the text scale of an Annotation MRML node. More...
 
double * GetAnnotationTextSelectedColor (const char *id)
 Get the selected text color of an Annotation MRML node. More...
 
double * GetAnnotationTextUnselectedColor (const char *id)
 Get the text color of an Annotation MRML node. More...
 
double * GetAnnotationUnselectedColor (const char *id)
 Get the unselected color of an annotation mrml node, returns null if can't find it. More...
 
int GetAnnotationVisibility (const char *id)
 Get the visibility flag of an Annotation MRML node. More...
 
virtual const char * GetClassName ()
 
const char * GetHTMLRepresentation (vtkMRMLAnnotationNode *annotationNode, int level)
 Return HTML markup for a specific annotation node. More...
 
const char * GetHTMLRepresentation (vtkMRMLAnnotationHierarchyNode *hierarchyNode, int level)
 Return HTML markup for a specific hierarchy node. More...
 
vtkMRMLAnnotationLineDisplayNodeGetLineDisplayNode (const char *id)
 
vtkMRMLAnnotationPointDisplayNodeGetPointDisplayNode (const char *id)
 
vtkStdString GetSnapShotDescription (const char *id)
 Return the description of an existing annotation snapShot. More...
 
vtkStdString GetSnapShotName (const char *id)
 Return the name of an existing annotation snapShot. More...
 
double GetSnapShotScaleFactor (const char *id)
 Return the scaleFactor of an existing annotation snapShot. More...
 
vtkImageData * GetSnapShotScreenshot (const char *id)
 Return the screenshot of an existing annotation snapShot. More...
 
int GetSnapShotScreenshotType (const char *id)
 Return the screenshotType of an existing annotation snapShot. More...
 
vtkMRMLAnnotationTextDisplayNodeGetTextDisplayNode (const char *id)
 
char * GetTopLevelHierarchyNodeID (vtkMRMLNode *node=0)
 
char * GetTopLevelHierarchyNodeIDForNodeClass (vtkMRMLAnnotationNode *annotationNode)
 Return the top level annotation hierarchy node for this node's class, adding one under the top level annotation hierarchy if there is none. If the passed in node is null, return null. More...
 
virtual int IsA (const char *type)
 
bool IsAnnotationHierarchyNode (const char *id)
 
bool IsAnnotationNode (const char *id)
 Check if node id corresponds to an annotaton node. More...
 
bool IsSnapshotNode (const char *id)
 Check if node id corresponds to a snapShot node. More...
 
void JumpSlicesToAnnotationCoordinate (const char *id)
 Jump 2d Slices to the location of the first control point of an Annotation MRML node. More...
 
char * LoadAnnotation (const char *filename, const char *name, int fileType)
 
char * LoadFiducialList (const char *filename)
 
void ModifySnapShot (vtkStdString id, const char *name, const char *description, int screenshotType, double scaleFactor, vtkImageData *screenshot)
 Modify an existing snapShot. More...
 
const char * MoveAnnotationDown (const char *id)
 
const char * MoveAnnotationUp (const char *id)
 
virtual void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
virtual void RegisterNodes () VTK_OVERRIDE
 Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this logic class. More...
 
void RemoveAnnotationNode (vtkMRMLAnnotationNode *annotationNode)
 Remove an AnnotationNode and also its 1-1 IS-A hierarchyNode, if found. More...
 
void RestoreAnnotationNode (const char *id)
 Restore a backup of an Annotation MRML node. More...
 
virtual void SetActiveHierarchyNodeID (const char *)
 
void SetAllAnnotationsSelected (bool selected)
 Set the selected flag of all annotation mrml nodes. More...
 
void SetAnnotationColor (const char *id, double *color)
 Set the color of an annotation mrml node. More...
 
void SetAnnotationLineColor (const char *id, double *color)
 Set the line color of an annotation mrml node. More...
 
void SetAnnotationLineUnselectedColor (const char *id, double *color)
 Set the unselected line color of an annotation mrml node. More...
 
void SetAnnotationLockedUnlocked (const char *id)
 Toggle the lock flag of an Annotation MRML node. More...
 
void SetAnnotationPointColor (const char *id, double *color)
 Set the point color of an annotation mrml node. More...
 
void SetAnnotationPointGlyphType (const char *id, int glyphType)
 Set the point glyph type of the annotation mrml node. More...
 
void SetAnnotationPointGlyphTypeFromString (const char *id, const char *glyphType)
 Set the point glyph type of the annotation mrml node from a string. More...
 
void SetAnnotationPointUnselectedColor (const char *id, double *color)
 Set the unselected point color of an annotation mrml node. More...
 
void SetAnnotationSelected (const char *id, bool selected)
 Set the selected flag of an Annotation MRML node. More...
 
void SetAnnotationText (const char *id, const char *newtext)
 Set the text of an Annotation MRML node. More...
 
void SetAnnotationTextScale (const char *id, double textScale)
 Set the text scale of an Annotation MRML node. More...
 
void SetAnnotationTextSelectedColor (const char *id, double *color)
 Set the selected text color of an Annotation MRML node. More...
 
void SetAnnotationTextUnselectedColor (const char *id, double *color)
 Set the text color of an Annotation MRML node. More...
 
void SetAnnotationUnselectedColor (const char *id, double *color)
 Set the unselected color of an annotation mrml node. More...
 
void SetAnnotationVisibility (const char *id)
 Toggle the visibility flag of an Annotation MRML node. More...
 
void SetHierarchyAnnotationsLockFlag (vtkMRMLAnnotationHierarchyNode *hierarchyNode, bool flag)
 Set the lock flag on all annotations in the hierarchy. If hierarchy is null, use active hierarchy. More...
 
void SetHierarchyAnnotationsVisibleFlag (vtkMRMLAnnotationHierarchyNode *hierarchyNode, bool flag)
 Set the visible flag on all annotations in the hierarchy. If hierarchy is null, use active hierarchy. More...
 
void StartPlaceMode (bool persistent=false)
 
void StopPlaceMode (bool persistent=false)
 
- Public Member Functions inherited from vtkSlicerModuleLogic
virtual vtkSlicerApplicationLogicGetApplicationLogic ()
 Get access to overall application state. More...
 
std::string GetModuleShareDirectory () const
 
void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
void SetModuleShareDirectory (const std::string &shareDirectory)
 
- Public Member Functions inherited from vtkMRMLAbstractLogic
virtual vtkMRMLApplicationLogicGetMRMLApplicationLogic () const
 Get access to overall application state. More...
 
vtkMRMLSceneGetMRMLScene () const
 Return a reference to the current MRML scene. More...
 
void PrintSelf (ostream &os, vtkIndent indent) VTK_OVERRIDE
 
virtual void SetMRMLApplicationLogic (vtkMRMLApplicationLogic *logic)
 
void SetMRMLScene (vtkMRMLScene *newScene)
 Set and observe the MRMLScene. More...
 

Static Public Member Functions

static int IsTypeOf (const char *type)
 
static vtkSlicerAnnotationModuleLogicNew ()
 
static vtkSlicerAnnotationModuleLogicSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkSlicerModuleLogic
static int IsTypeOf (const char *type)
 
static vtkSlicerModuleLogicNew ()
 The Usual vtk class functions. More...
 
static vtkSlicerModuleLogicSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkMRMLAbstractLogic
static int IsTypeOf (const char *type)
 
static vtkMRMLAbstractLogicNew ()
 
static vtkMRMLAbstractLogicSafeDownCast (vtkObject *o)
 

Protected Member Functions

virtual void ObserveMRMLScene () VTK_OVERRIDE
 
virtual void OnInteractionModeChangedEvent (vtkMRMLInteractionNode *interactionNode)
 
virtual void OnInteractionModePersistenceChangedEvent (vtkMRMLInteractionNode *interactionNode)
 
virtual void OnMRMLAnnotationNodeModifiedEvent (vtkMRMLNode *node)
 
virtual void OnMRMLSceneEndClose () VTK_OVERRIDE
 
virtual void OnMRMLSceneNodeAdded (vtkMRMLNode *node) VTK_OVERRIDE
 
virtual void ProcessMRMLNodesEvents (vtkObject *caller, unsigned long event, void *callData) VTK_OVERRIDE
 
virtual void SetMRMLSceneInternal (vtkMRMLScene *newScene) VTK_OVERRIDE
 
 vtkSlicerAnnotationModuleLogic ()
 
virtual ~vtkSlicerAnnotationModuleLogic ()
 
- Protected Member Functions inherited from vtkSlicerModuleLogic
 vtkSlicerModuleLogic ()
 
virtual ~vtkSlicerModuleLogic ()
 
- Protected Member Functions inherited from vtkMRMLAbstractLogic
int EndModify (bool wasModifying)
 
virtual bool EnterMRMLLogicsCallback () const
 
virtual bool EnterMRMLNodesCallback () const
 
virtual bool EnterMRMLSceneCallback () const
 
bool GetDisableModifiedEvent () const
 
int GetInMRMLLogicsCallbackFlag () const
 
int GetInMRMLNodesCallbackFlag () const
 
int GetInMRMLSceneCallbackFlag () const
 
vtkCallbackCommand * GetMRMLLogicsCallbackCommand ()
 
vtkObserverManagerGetMRMLLogicsObserverManager () const
 
vtkCallbackCommand * GetMRMLNodesCallbackCommand ()
 
vtkObserverManagerGetMRMLNodesObserverManager () const
 
vtkCallbackCommand * GetMRMLSceneCallbackCommand ()
 
vtkObserverManagerGetMRMLSceneObserverManager () const
 
int GetPendingModifiedEventCount () const
 
int GetProcessingMRMLSceneEvent () const
 Return the event id currently processed or 0 if any. More...
 
int InvokePendingModifiedEvent ()
 
virtual void Modified () VTK_OVERRIDE
 
virtual void OnMRMLNodeModified (vtkMRMLNode *)
 
virtual void OnMRMLSceneEndBatchProcess ()
 
virtual void OnMRMLSceneEndImport ()
 
virtual void OnMRMLSceneEndRestore ()
 
virtual void OnMRMLSceneNew ()
 
virtual void OnMRMLSceneNodeRemoved (vtkMRMLNode *)
 
virtual void OnMRMLSceneStartBatchProcess ()
 
virtual void OnMRMLSceneStartClose ()
 
virtual void OnMRMLSceneStartImport ()
 
virtual void OnMRMLSceneStartRestore ()
 
virtual void ProcessMRMLLogicsEvents (vtkObject *caller, unsigned long event, void *callData)
 
virtual void ProcessMRMLSceneEvents (vtkObject *caller, unsigned long event, void *callData)
 
void SetAndObserveMRMLSceneEventsInternal (vtkMRMLScene *newScene, vtkIntArray *events, vtkFloatArray *priorities=0)
 
void SetDisableModifiedEvent (bool onOff)
 
void SetInMRMLLogicsCallbackFlag (int flag)
 
void SetInMRMLNodesCallbackFlag (int flag)
 
void SetInMRMLSceneCallbackFlag (int flag)
 
void SetProcessingMRMLSceneEvent (int event)
 
bool StartModify ()
 
virtual void UnobserveMRMLScene ()
 
virtual void UpdateFromMRMLScene ()
 
 vtkMRMLAbstractLogic ()
 
virtual ~vtkMRMLAbstractLogic ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from vtkMRMLAbstractLogic
static void MRMLLogicsCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 MRMLLogicCallback is a static function to relay modified events from the logics. More...
 
static void MRMLNodesCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 MRMLNodesCallback is a static function to relay modified events from the nodes. More...
 
static void MRMLSceneCallback (vtkObject *caller, unsigned long eid, void *clientData, void *callData)
 

Detailed Description

Definition at line 19 of file vtkSlicerAnnotationModuleLogic.h.

Member Typedef Documentation

◆ Superclass

Definition at line 28 of file vtkSlicerAnnotationModuleLogic.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Enumeration listing valid file types to load.

Enumerator
None 
Fiducial 
Ruler 
ROI 

Definition at line 256 of file vtkSlicerAnnotationModuleLogic.h.

◆ Events

Enumerator
RefreshRequestEvent 
HierarchyNodeAddedEvent 

Definition at line 23 of file vtkSlicerAnnotationModuleLogic.h.

Constructor & Destructor Documentation

◆ vtkSlicerAnnotationModuleLogic()

vtkSlicerAnnotationModuleLogic::vtkSlicerAnnotationModuleLogic ( )
protected

◆ ~vtkSlicerAnnotationModuleLogic()

virtual vtkSlicerAnnotationModuleLogic::~vtkSlicerAnnotationModuleLogic ( )
protectedvirtual

Member Function Documentation

◆ AddAnnotationNode()

void vtkSlicerAnnotationModuleLogic::AddAnnotationNode ( const char *  nodeDescriptor,
bool  persistent = false 
)

◆ AddDisplayNodeForHierarchyNode()

const char* vtkSlicerAnnotationModuleLogic::AddDisplayNodeForHierarchyNode ( vtkMRMLAnnotationHierarchyNode hnode)

Add a model display node to the scene for a passed in hierarchy node, if it doesn't already have one, return the ID, NULL on failure

◆ AddFiducial()

char* vtkSlicerAnnotationModuleLogic::AddFiducial ( double  r = 0.0,
double  a = 0.0,
double  s = 0.0,
const char *  label = NULL 
)

Add a new fiducial to the currently active hierarchy. Places the fiducial at the given RAS coordinates (default 0,0,0) with the given label (if NULL, uses default naming convention). Returns the ID of the newly added node.

◆ AddHierarchy()

bool vtkSlicerAnnotationModuleLogic::AddHierarchy ( )

Add a new visible annotation hierarchy. The active hierarchy node will be the parent. If there is no active hierarchy node, use the top-level annotation hierarchy node as the parent. If there is no top-level annotation hierarchy node, create additionally a top-level hierarchy node which serves as a parent to the new hierarchy node. The newly added hierarchy node will be the active hierarchy node. Return true on success, false on failure.

◆ AddNodeCompleted()

void vtkSlicerAnnotationModuleLogic::AddNodeCompleted ( vtkMRMLAnnotationNode annotationNode)

◆ BackupAnnotationNode()

void vtkSlicerAnnotationModuleLogic::BackupAnnotationNode ( const char *  id)

Backup an Annotation MRML node.

◆ CancelCurrentOrRemoveLastAddedAnnotationNode()

void vtkSlicerAnnotationModuleLogic::CancelCurrentOrRemoveLastAddedAnnotationNode ( )

◆ CreateSnapShot()

void vtkSlicerAnnotationModuleLogic::CreateSnapShot ( const char *  name,
const char *  description,
int  screenshotType,
double  scaleFactor,
vtkImageData *  screenshot 
)

Create a snapShot.

◆ DeleteBackupNodes()

void vtkSlicerAnnotationModuleLogic::DeleteBackupNodes ( const char *  id)

Deletes a backup of an Annotation MRML node.

◆ GetActiveHierarchyNode()

vtkMRMLAnnotationHierarchyNode* vtkSlicerAnnotationModuleLogic::GetActiveHierarchyNode ( )

Get the active hierarchy node which will be used as a parent for new annotations.

◆ GetActiveHierarchyNodeID()

virtual char* vtkSlicerAnnotationModuleLogic::GetActiveHierarchyNodeID ( )
virtual

get/set the id of the active hierarchy node

◆ GetAnnotationColor()

double* vtkSlicerAnnotationModuleLogic::GetAnnotationColor ( const char *  id)

Get the color of an annotation mrml node, returns null if can't find it.

◆ GetAnnotationIcon() [1/2]

const char* vtkSlicerAnnotationModuleLogic::GetAnnotationIcon ( const char *  id)

Get the icon name of an Annotation MRML node.

◆ GetAnnotationIcon() [2/2]

const char* vtkSlicerAnnotationModuleLogic::GetAnnotationIcon ( vtkMRMLNode mrmlNode)

◆ GetAnnotationLineColor()

double* vtkSlicerAnnotationModuleLogic::GetAnnotationLineColor ( const char *  id)

Get the line color of an annotation mrml node, returns null if can't find it.

◆ GetAnnotationLineUnselectedColor()

double* vtkSlicerAnnotationModuleLogic::GetAnnotationLineUnselectedColor ( const char *  id)

Get the unselected line color of an annotation mrml node, returns null if can't find it.

◆ GetAnnotationLockedUnlocked()

int vtkSlicerAnnotationModuleLogic::GetAnnotationLockedUnlocked ( const char *  id)

Get the lock flag of an Annotation MRML node.

◆ GetAnnotationMeasurement()

const char* vtkSlicerAnnotationModuleLogic::GetAnnotationMeasurement ( const char *  id,
bool  showUnits 
)

Get the measurement value of an Annotation MRML node.

◆ GetAnnotationName()

const char* vtkSlicerAnnotationModuleLogic::GetAnnotationName ( const char *  id)

Get the name of an Annotation MRML node.

◆ GetAnnotationPointColor()

double* vtkSlicerAnnotationModuleLogic::GetAnnotationPointColor ( const char *  id)

Get the point color of an annotation mrml node, returns null if can't find it.

◆ GetAnnotationPointGlyphType()

int vtkSlicerAnnotationModuleLogic::GetAnnotationPointGlyphType ( const char *  id)

Get the point glyph type of the annotation mrml node,.

◆ GetAnnotationPointGlyphTypeAsString()

const char* vtkSlicerAnnotationModuleLogic::GetAnnotationPointGlyphTypeAsString ( const char *  id)

Get the point glyph type of the annotation mrml node as a string, returns null if can't find it

◆ GetAnnotationPointUnselectedColor()

double* vtkSlicerAnnotationModuleLogic::GetAnnotationPointUnselectedColor ( const char *  id)

Get the unselected point color of an annotation mrml node, returns null if can't find it.

◆ GetAnnotationText()

vtkStdString vtkSlicerAnnotationModuleLogic::GetAnnotationText ( const char *  id)

Return the text of an Annotation MRML node.

◆ GetAnnotationTextScale()

double vtkSlicerAnnotationModuleLogic::GetAnnotationTextScale ( const char *  id)

Get the text scale of an Annotation MRML node.

◆ GetAnnotationTextSelectedColor()

double* vtkSlicerAnnotationModuleLogic::GetAnnotationTextSelectedColor ( const char *  id)

Get the selected text color of an Annotation MRML node.

◆ GetAnnotationTextUnselectedColor()

double* vtkSlicerAnnotationModuleLogic::GetAnnotationTextUnselectedColor ( const char *  id)

Get the text color of an Annotation MRML node.

◆ GetAnnotationUnselectedColor()

double* vtkSlicerAnnotationModuleLogic::GetAnnotationUnselectedColor ( const char *  id)

Get the unselected color of an annotation mrml node, returns null if can't find it.

◆ GetAnnotationVisibility()

int vtkSlicerAnnotationModuleLogic::GetAnnotationVisibility ( const char *  id)

Get the visibility flag of an Annotation MRML node.

◆ GetClassName()

virtual const char* vtkSlicerAnnotationModuleLogic::GetClassName ( )
virtual

Reimplemented from vtkSlicerModuleLogic.

◆ GetHTMLRepresentation() [1/2]

const char* vtkSlicerAnnotationModuleLogic::GetHTMLRepresentation ( vtkMRMLAnnotationNode annotationNode,
int  level 
)

Return HTML markup for a specific annotation node.

◆ GetHTMLRepresentation() [2/2]

const char* vtkSlicerAnnotationModuleLogic::GetHTMLRepresentation ( vtkMRMLAnnotationHierarchyNode hierarchyNode,
int  level 
)

Return HTML markup for a specific hierarchy node.

◆ GetLineDisplayNode()

vtkMRMLAnnotationLineDisplayNode* vtkSlicerAnnotationModuleLogic::GetLineDisplayNode ( const char *  id)

Return the line display node for the annotation mrml node with this id, null if not a valid node, not an annotation node, or doesn't have a line display node

◆ GetPointDisplayNode()

vtkMRMLAnnotationPointDisplayNode* vtkSlicerAnnotationModuleLogic::GetPointDisplayNode ( const char *  id)

Return the point display node for the annotation mrml node with this id, null if not a valid node, not an annotation node, or doesn't have a point display node

◆ GetSnapShotDescription()

vtkStdString vtkSlicerAnnotationModuleLogic::GetSnapShotDescription ( const char *  id)

Return the description of an existing annotation snapShot.

◆ GetSnapShotName()

vtkStdString vtkSlicerAnnotationModuleLogic::GetSnapShotName ( const char *  id)

Return the name of an existing annotation snapShot.

◆ GetSnapShotScaleFactor()

double vtkSlicerAnnotationModuleLogic::GetSnapShotScaleFactor ( const char *  id)

Return the scaleFactor of an existing annotation snapShot.

◆ GetSnapShotScreenshot()

vtkImageData* vtkSlicerAnnotationModuleLogic::GetSnapShotScreenshot ( const char *  id)

Return the screenshot of an existing annotation snapShot.

◆ GetSnapShotScreenshotType()

int vtkSlicerAnnotationModuleLogic::GetSnapShotScreenshotType ( const char *  id)

Return the screenshotType of an existing annotation snapShot.

◆ GetTextDisplayNode()

vtkMRMLAnnotationTextDisplayNode* vtkSlicerAnnotationModuleLogic::GetTextDisplayNode ( const char *  id)

Return the text display node for the annotation mrml node with this id, null if not a valid node, not an annotation node, or doesn't have a text display node

◆ GetTopLevelHierarchyNodeID()

char* vtkSlicerAnnotationModuleLogic::GetTopLevelHierarchyNodeID ( vtkMRMLNode node = 0)

Return the toplevel Annotation hierarchy node ID or create one and add it to the scene if there is none: If an optional annotationNode is given, insert the new toplevel hierarchy before it. If not, just add the new toplevel hierarchy node.

◆ GetTopLevelHierarchyNodeIDForNodeClass()

char* vtkSlicerAnnotationModuleLogic::GetTopLevelHierarchyNodeIDForNodeClass ( vtkMRMLAnnotationNode annotationNode)

Return the top level annotation hierarchy node for this node's class, adding one under the top level annotation hierarchy if there is none. If the passed in node is null, return null.

◆ IsA()

virtual int vtkSlicerAnnotationModuleLogic::IsA ( const char *  type)
virtual

Reimplemented from vtkSlicerModuleLogic.

◆ IsAnnotationHierarchyNode()

bool vtkSlicerAnnotationModuleLogic::IsAnnotationHierarchyNode ( const char *  id)

◆ IsAnnotationNode()

bool vtkSlicerAnnotationModuleLogic::IsAnnotationNode ( const char *  id)

Check if node id corresponds to an annotaton node.

◆ IsSnapshotNode()

bool vtkSlicerAnnotationModuleLogic::IsSnapshotNode ( const char *  id)

Check if node id corresponds to a snapShot node.

◆ IsTypeOf()

static int vtkSlicerAnnotationModuleLogic::IsTypeOf ( const char *  type)
static

◆ JumpSlicesToAnnotationCoordinate()

void vtkSlicerAnnotationModuleLogic::JumpSlicesToAnnotationCoordinate ( const char *  id)

Jump 2d Slices to the location of the first control point of an Annotation MRML node.

◆ LoadAnnotation()

char* vtkSlicerAnnotationModuleLogic::LoadAnnotation ( const char *  filename,
const char *  name,
int  fileType 
)

Load an annotation from file, return NULL on error, node ID string otherwise. Adds the appropriate storage and display nodes to the scene as well. fileType is from this class's enum

◆ LoadFiducialList()

char* vtkSlicerAnnotationModuleLogic::LoadFiducialList ( const char *  filename)

Legacy support: load a Slicer3 fiducial list from file. Uses FiducialsLogic to load into a legacy node first, then translates into annotation nodes returns a comma separated list of the annot nodes loaded

◆ ModifySnapShot()

void vtkSlicerAnnotationModuleLogic::ModifySnapShot ( vtkStdString  id,
const char *  name,
const char *  description,
int  screenshotType,
double  scaleFactor,
vtkImageData *  screenshot 
)

Modify an existing snapShot.

◆ MoveAnnotationDown()

const char* vtkSlicerAnnotationModuleLogic::MoveAnnotationDown ( const char *  id)

◆ MoveAnnotationUp()

const char* vtkSlicerAnnotationModuleLogic::MoveAnnotationUp ( const char *  id)

◆ New()

static vtkSlicerAnnotationModuleLogic* vtkSlicerAnnotationModuleLogic::New ( )
static

◆ ObserveMRMLScene()

virtual void vtkSlicerAnnotationModuleLogic::ObserveMRMLScene ( )
protectedvirtual

Called after a scene is set to the logic and nodes are registered (RegisterNodes()). The scene events to observe are already set in SetMRMLSceneInternal(). By default, ObserveMRMLScene() calls UpdateFromMRMLScene(). Overide for a custom behavior.

See also
SetMRMLSceneInternal, RegisterNodes, UnobserveMRMLScene
UpdateFromMRMLScene

Reimplemented from vtkMRMLAbstractLogic.

◆ OnInteractionModeChangedEvent()

virtual void vtkSlicerAnnotationModuleLogic::OnInteractionModeChangedEvent ( vtkMRMLInteractionNode interactionNode)
protectedvirtual

◆ OnInteractionModePersistenceChangedEvent()

virtual void vtkSlicerAnnotationModuleLogic::OnInteractionModePersistenceChangedEvent ( vtkMRMLInteractionNode interactionNode)
protectedvirtual

◆ OnMRMLAnnotationNodeModifiedEvent()

virtual void vtkSlicerAnnotationModuleLogic::OnMRMLAnnotationNodeModifiedEvent ( vtkMRMLNode node)
protectedvirtual

◆ OnMRMLSceneEndClose()

virtual void vtkSlicerAnnotationModuleLogic::OnMRMLSceneEndClose ( )
protectedvirtual

If vtkMRMLScene::EndCloseEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event

See also
ProcessMRMLSceneEvents, SetMRMLSceneInternal
OnMRMLSceneStartClose

Reimplemented from vtkMRMLAbstractLogic.

◆ OnMRMLSceneNodeAdded()

virtual void vtkSlicerAnnotationModuleLogic::OnMRMLSceneNodeAdded ( vtkMRMLNode )
protectedvirtual

If vtkMRMLScene::NodeAddedEvent has been set to be observed in SetMRMLSceneInternal, it is called when the scene fires the event

See also
ProcessMRMLSceneEvents, SetMRMLSceneInternal
OnMRMLSceneNodeRemoved, vtkMRMLScene::NodeAboutToBeAdded

Reimplemented from vtkMRMLAbstractLogic.

◆ PrintSelf()

virtual void vtkSlicerAnnotationModuleLogic::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
virtual

◆ ProcessMRMLNodesEvents()

virtual void vtkSlicerAnnotationModuleLogic::ProcessMRMLNodesEvents ( vtkObject *  caller,
unsigned long  event,
void *  callData 
)
protectedvirtual

Receives all the events fired by the nodes. To listen to a node, you can add an observer using GetMRMLNodesCallbackCommand() or use the utility macros vtk[SetAndObserve|Observe]MRMLNode[Event]Macro ProcessMRMLNodesEvents calls OnMRMLNodeModified when event is vtkCommand::ModifiedEvent.

See also
ProcessMRMLSceneEvents, ProcessMRMLLogicsEvents, OnMRMLNodeModified(), vtkSetAndObserveMRMLNodeMacro, vtkObserveMRMLNodeMacro, vtkSetAndObserveMRMLNodeEventMacro

Reimplemented from vtkMRMLAbstractLogic.

◆ RegisterNodes()

virtual void vtkSlicerAnnotationModuleLogic::RegisterNodes ( )
virtual

Register MRML Node classes to Scene. Gets called automatically when the MRMLScene is attached to this logic class.

Reimplemented from vtkMRMLAbstractLogic.

◆ RemoveAnnotationNode()

void vtkSlicerAnnotationModuleLogic::RemoveAnnotationNode ( vtkMRMLAnnotationNode annotationNode)

Remove an AnnotationNode and also its 1-1 IS-A hierarchyNode, if found.

◆ RestoreAnnotationNode()

void vtkSlicerAnnotationModuleLogic::RestoreAnnotationNode ( const char *  id)

Restore a backup of an Annotation MRML node.

◆ SafeDownCast()

static vtkSlicerAnnotationModuleLogic* vtkSlicerAnnotationModuleLogic::SafeDownCast ( vtkObject *  o)
static

◆ SetActiveHierarchyNodeID()

virtual void vtkSlicerAnnotationModuleLogic::SetActiveHierarchyNodeID ( const char *  )
virtual

◆ SetAllAnnotationsSelected()

void vtkSlicerAnnotationModuleLogic::SetAllAnnotationsSelected ( bool  selected)

Set the selected flag of all annotation mrml nodes.

◆ SetAnnotationColor()

void vtkSlicerAnnotationModuleLogic::SetAnnotationColor ( const char *  id,
double *  color 
)

Set the color of an annotation mrml node.

◆ SetAnnotationLineColor()

void vtkSlicerAnnotationModuleLogic::SetAnnotationLineColor ( const char *  id,
double *  color 
)

Set the line color of an annotation mrml node.

◆ SetAnnotationLineUnselectedColor()

void vtkSlicerAnnotationModuleLogic::SetAnnotationLineUnselectedColor ( const char *  id,
double *  color 
)

Set the unselected line color of an annotation mrml node.

◆ SetAnnotationLockedUnlocked()

void vtkSlicerAnnotationModuleLogic::SetAnnotationLockedUnlocked ( const char *  id)

Toggle the lock flag of an Annotation MRML node.

◆ SetAnnotationPointColor()

void vtkSlicerAnnotationModuleLogic::SetAnnotationPointColor ( const char *  id,
double *  color 
)

Set the point color of an annotation mrml node.

◆ SetAnnotationPointGlyphType()

void vtkSlicerAnnotationModuleLogic::SetAnnotationPointGlyphType ( const char *  id,
int  glyphType 
)

Set the point glyph type of the annotation mrml node.

◆ SetAnnotationPointGlyphTypeFromString()

void vtkSlicerAnnotationModuleLogic::SetAnnotationPointGlyphTypeFromString ( const char *  id,
const char *  glyphType 
)

Set the point glyph type of the annotation mrml node from a string.

◆ SetAnnotationPointUnselectedColor()

void vtkSlicerAnnotationModuleLogic::SetAnnotationPointUnselectedColor ( const char *  id,
double *  color 
)

Set the unselected point color of an annotation mrml node.

◆ SetAnnotationSelected()

void vtkSlicerAnnotationModuleLogic::SetAnnotationSelected ( const char *  id,
bool  selected 
)

Set the selected flag of an Annotation MRML node.

◆ SetAnnotationText()

void vtkSlicerAnnotationModuleLogic::SetAnnotationText ( const char *  id,
const char *  newtext 
)

Set the text of an Annotation MRML node.

◆ SetAnnotationTextScale()

void vtkSlicerAnnotationModuleLogic::SetAnnotationTextScale ( const char *  id,
double  textScale 
)

Set the text scale of an Annotation MRML node.

◆ SetAnnotationTextSelectedColor()

void vtkSlicerAnnotationModuleLogic::SetAnnotationTextSelectedColor ( const char *  id,
double *  color 
)

Set the selected text color of an Annotation MRML node.

◆ SetAnnotationTextUnselectedColor()

void vtkSlicerAnnotationModuleLogic::SetAnnotationTextUnselectedColor ( const char *  id,
double *  color 
)

Set the text color of an Annotation MRML node.

◆ SetAnnotationUnselectedColor()

void vtkSlicerAnnotationModuleLogic::SetAnnotationUnselectedColor ( const char *  id,
double *  color 
)

Set the unselected color of an annotation mrml node.

◆ SetAnnotationVisibility()

void vtkSlicerAnnotationModuleLogic::SetAnnotationVisibility ( const char *  id)

Toggle the visibility flag of an Annotation MRML node.

◆ SetHierarchyAnnotationsLockFlag()

void vtkSlicerAnnotationModuleLogic::SetHierarchyAnnotationsLockFlag ( vtkMRMLAnnotationHierarchyNode hierarchyNode,
bool  flag 
)

Set the lock flag on all annotations in the hierarchy. If hierarchy is null, use active hierarchy.

◆ SetHierarchyAnnotationsVisibleFlag()

void vtkSlicerAnnotationModuleLogic::SetHierarchyAnnotationsVisibleFlag ( vtkMRMLAnnotationHierarchyNode hierarchyNode,
bool  flag 
)

Set the visible flag on all annotations in the hierarchy. If hierarchy is null, use active hierarchy.

◆ SetMRMLSceneInternal()

virtual void vtkSlicerAnnotationModuleLogic::SetMRMLSceneInternal ( vtkMRMLScene newScene)
protectedvirtual

Called each time a new scene is set. Can be reimplemented in derivated classes. Doesn't observe the scene by default, that means that UpdateFromMRMLScene() won't be called by default when a scene is imported, closed or restored, only when a new scene is set.

See also
SetAndObserveMRMLSceneInternal() SetAndObserveMRMLSceneEventsInternal()
UpdateFromMRMLScene()

Reimplemented from vtkMRMLAbstractLogic.

◆ StartPlaceMode()

void vtkSlicerAnnotationModuleLogic::StartPlaceMode ( bool  persistent = false)

◆ StopPlaceMode()

void vtkSlicerAnnotationModuleLogic::StopPlaceMode ( bool  persistent = false)

The documentation for this class was generated from the following file: