vtkMRMLAnnotationNode.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __vtkMRMLAnnotationNode_h
00010 #define __vtkMRMLAnnotationNode_h
00011
00012 #include "qSlicermiAnnotationModuleExport.h"
00013 #include "vtkMRMLModelNode.h"
00014
00015 class vtkStringArray;
00016 class vtkMRMLStorageNode;
00017 class vtkMRMLAnnotationTextDisplayNode;
00018
00019 class Q_SLICER_QTMODULES_ANNOTATIONS_EXPORT vtkMRMLAnnotationNode : public vtkMRMLModelNode
00020 {
00021 public:
00022 static vtkMRMLAnnotationNode *New();
00023 vtkTypeMacro(vtkMRMLAnnotationNode,vtkMRMLModelNode);
00024 void PrintSelf(ostream& os, vtkIndent indent);
00025
00026
00027 virtual void PrintAnnotationInfo(ostream& os, vtkIndent indent, int titleFlag = 1);
00028
00029
00030
00031
00032
00033 virtual vtkMRMLNode* CreateNodeInstance();
00034
00035
00036 virtual const char* GetNodeTagName() {return "Annotation";};
00037
00038
00039
00040 virtual void ReadXMLAttributes( const char** atts);
00041
00042
00043
00044 virtual void WriteXML(ostream& of, int indent);
00045
00046
00047
00048
00049 virtual void Copy(vtkMRMLNode *node);
00050
00051 void UpdateScene(vtkMRMLScene *scene);
00052
00053
00054
00055 virtual void ProcessMRMLEvents ( vtkObject * ,
00056 unsigned long ,
00057 void * );
00058
00059
00060
00061
00062 virtual vtkMRMLStorageNode* CreateDefaultStorageNode();
00063
00064 int AddText(const char *newText,int selectedFlag, int visibleFlag);
00065 void SetText(int id, const char *newText,int selectedFlag, int visibleFlag);
00066 vtkStdString GetText(int id);
00067 int DeleteText(int id);
00068
00069 int GetNumberOfTexts();
00070
00071
00072 enum
00073 {
00074 TEXT_SELECTED = 0,
00075 TEXT_VISIBLE,
00076 NUM_TEXT_ATTRIBUTE_TYPES
00077 };
00078
00079 virtual const char *GetAttributeTypesEnumAsString(int val);
00080 vtkDataArray* GetAnnotationAttributes(int att);
00081 int GetAnnotationAttribute(vtkIdType id, int att);
00082 void SetAnnotationAttribute(vtkIdType id, int att, double value);
00083 int DeleteAttribute(vtkIdType idAttEntry, vtkIdType idAttType);
00084
00085
00086
00087 virtual void ResetAnnotations();
00088
00089
00090
00091 void CreateAnnotationTextDisplayNode();
00092
00093 vtkMRMLAnnotationTextDisplayNode* GetAnnotationTextDisplayNode();
00094
00095
00096
00097 vtkGetStringMacro (ReferenceNodeID);
00098 vtkSetStringMacro (ReferenceNodeID);
00099
00100
00101
00102
00103
00104 vtkGetMacro(Visible, int);
00105 vtkSetMacro(Visible, int);
00106 vtkBooleanMacro(Visible, int);
00107
00108
00109
00110 vtkGetMacro(Locked, int);
00111 void SetLocked(int init);
00112
00113 protected:
00114 vtkMRMLAnnotationNode();
00115 ~vtkMRMLAnnotationNode();
00116 vtkMRMLAnnotationNode(const vtkMRMLAnnotationNode&);
00117 void operator=(const vtkMRMLAnnotationNode&);
00118
00119
00120
00121
00122
00123
00124
00125 void ResetAttributes(int id);
00126
00127
00128 void ResetTextAttributesAll();
00129 void SetAttributeSize(vtkIdType id, vtkIdType n);
00130
00131 vtkStringArray *TextList;
00132 char *ReferenceNodeID;
00133
00134 void CreatePolyData();
00135
00136 int Visible;
00137 int Locked;
00138
00139 };
00140
00141 #endif