18 #ifndef __vtkMRMLMarkupsNode_h 19 #define __vtkMRMLMarkupsNode_h 25 #include "vtkSlicerMarkupsModuleMRMLExport.h" 28 #include <vtkSmartPointer.h> 29 #include <vtkVector.h> 42 double OrientationWXYZ[4];
76 void PrintMarkup(ostream& os, vtkIndent indent,
Markup *markup);
77 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
79 virtual const char*
GetIcon() {
return "";};
93 virtual void WriteXML(ostream& of,
int indent) VTK_OVERRIDE;
99 virtual void WriteCLI(std::vector<std::string>& commandLine,
100 std::string prefix,
int coordinateSystem = 0,
101 int multipleFlag = 1) VTK_OVERRIDE;
112 void * ) VTK_OVERRIDE;
119 int AddText(
const char *newText);
120 void SetText(
int id,
const char *newText);
121 vtkStdString GetText(
int id);
122 int DeleteText(
int id);
123 int GetNumberOfTexts();
124 void RemoveAllTexts();
140 LockModifiedEvent = 19000,
152 virtual void RemoveAllMarkups();
155 vtkGetMacro(Locked,
int);
163 void SetLocked(
int locked);
166 vtkBooleanMacro(Locked,
int);
169 bool MarkupExists(
int n);
171 int GetNumberOfMarkups();
173 bool PointExistsInMarkup(
int p,
int n);
175 int GetNumberOfPointsInNthMarkup(
int n);
179 void InitMarkup(
Markup *markup);
182 int AddMarkup(
Markup markup);
187 int AddMarkupWithNPoints(
int n, std::string label = std::string(), vtkVector3d*
point = NULL);
190 int AddPointToNewMarkup(vtkVector3d
point, std::string label = std::string());
193 int AddPointWorldToNewMarkup(vtkVector3d point, std::string label = std::string());
195 int AddPointToNthMarkup(vtkVector3d point,
int n);
199 vtkVector3d GetMarkupPointVector(
int markupIndex,
int pointIndex);
202 void GetMarkupPoint(
int markupIndex,
int pointIndex,
double point[3]);
204 void GetMarkupPointLPS(
int markupIndex,
int pointIndex,
double point[3]);
208 int GetMarkupPointWorld(
int markupIndex,
int pointIndex,
double worldxyz[4]);
211 void RemoveMarkup(
int m);
217 bool InsertMarkup(
Markup m,
int targetIndex);
223 void SwapMarkups(
int m1,
int m2);
227 void SetMarkupPointFromPointer(
const int markupIndex,
const int pointIndex,
const double * pos);
230 void SetMarkupPointFromArray(
const int markupIndex,
const int pointIndex,
const double pos[3]);
233 void SetMarkupPoint(
const int markupIndex,
const int pointIndex,
const double x,
const double y,
const double z);
236 void SetMarkupPointLPS(
const int markupIndex,
const int pointIndex,
const double x,
const double y,
const double z);
241 void SetMarkupPointWorld(
const int markupIndex,
const int pointIndex,
const double x,
const double y,
const double z);
244 void SetNthMarkupOrientationFromPointer(
int n,
const double *orientation);
246 void SetNthMarkupOrientationFromArray(
int n,
const double orientation[4]);
248 void SetNthMarkupOrientation(
int n,
double w,
double x,
double y,
double z);
250 void GetNthMarkupOrientation(
int n,
double orientation[4]);
253 std::string GetNthMarkupAssociatedNodeID(
int n = 0);
254 void SetNthMarkupAssociatedNodeID(
int n, std::string
id);
257 std::string GetNthMarkupID(
int n = 0);
259 int GetMarkupIndexByID(
const char* markupID);
261 Markup* GetMarkupByID(
const char* markupID);
265 bool GetNthMarkupSelected(
int n = 0);
268 void SetNthMarkupSelected(
int n,
bool flag);
271 bool GetNthMarkupLocked(
int n = 0);
278 void SetNthMarkupLocked(
int n,
bool flag);
281 bool GetNthMarkupVisibility(
int n = 0);
289 void SetNthMarkupVisibility(
int n,
bool flag);
292 std::string GetNthMarkupLabel(
int n = 0);
294 void SetNthMarkupLabel(
int n, std::string label);
297 std::string GetNthMarkupDescription(
int n = 0);
299 void SetNthMarkupDescription(
int n, std::string description);
308 virtual
void ApplyTransform(vtkAbstractTransform* transform) VTK_OVERRIDE;
312 std::
string GetMarkupLabelFormat();
322 void SetMarkupLabelFormat(
std::
string format);
328 std::
string ReplaceListNameInMarkupLabelFormat();
337 virtual
bool GetModifiedSinceRead() VTK_OVERRIDE;
342 bool ResetNthMarkupID(
int n);
346 ~vtkMRMLMarkupsNode();
347 vtkMRMLMarkupsNode(const vtkMRMLMarkupsNode&);
348 void operator=(const vtkMRMLMarkupsNode&);
350 vtkStringArray *TextList;
355 void SetNthMarkupID(
int n,
std::
string id);
360 std::
string GenerateUniqueMarkupID();;
369 std::
string MarkupLabelFormat;
374 int MaximumNumberOfMarkups;
virtual vtkMRMLStorageNode * CreateDefaultStorageNode()
virtual void WriteCLI(std::vector< std::string > &vtkNotUsed(commandLine), std::string vtkNotUsed(prefix), int vtkNotUsed(coordinateSystemFlag)=0, int vtkNotUsed(multipleFlag)=1)
see doxygen enabled comment in class description
static vtkMRMLMarkupsFiducialStorageNode * New()
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
MRML node to represent a list of markups Markups nodes contains a list of markups that each contain a...
virtual void ProcessMRMLEvents(vtkObject *, unsigned long, void *) VTK_OVERRIDE
alternative method to propagate events generated in Display nodes
virtual const char * GetNodeTagName() VTK_OVERRIDE
Get node XML tag name (like Volume, Model)
A set of MRML Nodes that supports serialization and undo/redo.
virtual const char * GetIcon()
virtual void ReadXMLAttributes(const char **atts) VTK_OVERRIDE
Read node attributes from XML file.
A supercalss for other storage nodes.
virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE
Copy the node's attributes to this object.
virtual void WriteXML(ostream &of, int indent) VTK_OVERRIDE
Write this node's information to a MRML file in XML format.
std::string AssociatedNodeID
Abstract Superclass for all specific types of MRML nodes.
virtual void UpdateScene(vtkMRMLScene *scene) VTK_OVERRIDE
Finds the storage node and read the data.
std::vector< vtkVector3d > points
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE=0
MRMLNode methods.