Slicer
5.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Modules
Loadable
Annotations
MRML
vtkMRMLAnnotationTextNode.h
Go to the documentation of this file.
1
// .NAME vtkMRMLAnnotationTextNode - MRML node to represent a text.
2
// .SECTION Description
3
// Annotation nodes contains control points, internally represented as vtkPolyData.
4
// A Annotation node contains many control points and forms the smallest logical unit of tractography
5
// that MRML will manage/read/write. Each control point has accompanying data.
6
// Visualization parameters for these nodes are controlled by the vtkMRMLAnnotationPointDisplayNode class.
7
//
8
9
#ifndef __vtkMRMLAnnotationTextNode_h
10
#define __vtkMRMLAnnotationTextNode_h
11
12
#include "vtkSlicerAnnotationsModuleMRMLExport.h"
13
#include "
vtkMRMLAnnotationControlPointsNode.h
"
14
15
#include <vtkStdString.h>
16
class
vtkStringArray;
17
19
class
VTK_SLICER_ANNOTATIONS_MODULE_MRML_EXPORT
vtkMRMLAnnotationTextNode
:
public
vtkMRMLAnnotationControlPointsNode
20
{
21
public
:
22
static
vtkMRMLAnnotationTextNode
*
New
();
23
vtkTypeMacro(
vtkMRMLAnnotationTextNode
,
vtkMRMLAnnotationControlPointsNode
);
24
25
//--------------------------------------------------------------------------
26
// MRMLNode methods
27
//--------------------------------------------------------------------------
28
29
vtkMRMLNode
*
CreateNodeInstance
()
override
;
30
// Description:
31
// Get node XML tag name (like Volume, Model)
32
const
char
*
GetNodeTagName
()
override
{
return
"AnnotationText"
;}
33
34
const
char
*
GetIcon
()
override
{
return
":/Icons/AnnotationText.png"
;}
35
36
int
SetTextCoordinates
(
double
newCoord[3]) {
return
this->
SetControlPoint
(0,newCoord,1,1);}
37
double
*
GetTextCoordinates
() {
return
this->
GetControlPointCoordinates
(0);}
38
39
// normalized viewport coordinates of the lower left of the text box for the caption widget
40
int
SetCaptionCoordinates(
double
x,
double
y);
41
int
SetCaptionCoordinates(
double
newCoord[2]);
42
double
*
GetCaptionCoordinates
() {
return
this->
GetControlPointCoordinates
(1);}
43
44
void
SetTextLabel
(
const
char
* newLabel) {this->
SetText
(0, newLabel, 1, 1);}
45
vtkStdString
GetTextLabel
() {
return
this->
GetText
(0);}
46
47
enum
48
{
49
TextNodeAddedEvent = 0,
50
ValueModifiedEvent
,
51
};
52
53
protected
:
54
vtkMRMLAnnotationTextNode
();
55
~
vtkMRMLAnnotationTextNode
()
override
=
default
;
56
vtkMRMLAnnotationTextNode
(
const
vtkMRMLAnnotationTextNode
&);
57
void
operator=
(
const
vtkMRMLAnnotationTextNode
&);
58
59
};
60
61
#endif
vtkMRMLAnnotationTextNode::ValueModifiedEvent
Definition:
vtkMRMLAnnotationTextNode.h:50
vtkMRMLAnnotationTextNode::SetTextCoordinates
int SetTextCoordinates(double newCoord[3])
Definition:
vtkMRMLAnnotationTextNode.h:36
vtkMRMLAnnotationControlPointsNode.h
vtkMRMLAnnotationControlPointsNode::New
static vtkMRMLAnnotationControlPointsNode * New()
vtkMRMLAnnotationTextNode::GetIcon
const char * GetIcon() override
Definition:
vtkMRMLAnnotationTextNode.h:34
vtkMRMLAnnotationTextNode::GetTextLabel
vtkStdString GetTextLabel()
Definition:
vtkMRMLAnnotationTextNode.h:45
vtkMRMLAnnotationControlPointsNode
Definition:
vtkMRMLAnnotationControlPointsNode.h:17
vtkMRMLAnnotationTextNode::GetCaptionCoordinates
double * GetCaptionCoordinates()
Definition:
vtkMRMLAnnotationTextNode.h:42
vtkMRMLAnnotationControlPointsNode::CreateNodeInstance
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
vtkMRMLAnnotationTextNode::SetTextLabel
void SetTextLabel(const char *newLabel)
Definition:
vtkMRMLAnnotationTextNode.h:44
vtkMRMLAnnotationTextNode::GetTextCoordinates
double * GetTextCoordinates()
Definition:
vtkMRMLAnnotationTextNode.h:37
vtkMRMLAnnotationTextNode::GetNodeTagName
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
Definition:
vtkMRMLAnnotationTextNode.h:32
vtkMRMLAnnotationNode::GetText
vtkStdString GetText(int id)
vtkMRMLAnnotationControlPointsNode::GetControlPointCoordinates
double * GetControlPointCoordinates(vtkIdType id)
vtkMRMLAnnotationTextNode
Definition:
vtkMRMLAnnotationTextNode.h:19
vtkMRMLAnnotationNode::SetText
void SetText(int id, const char *newText, int selectedFlag, int visibleFlag)
vtkMRMLAnnotationControlPointsNode::operator=
void operator=(const vtkMRMLAnnotationControlPointsNode &)
vtkMRMLNode
Abstract Superclass for all specific types of MRML nodes.
Definition:
vtkMRMLNode.h:167
vtkMRMLAnnotationControlPointsNode::SetControlPoint
int SetControlPoint(int id, double newControl[3], int selectedFlag, int visibleFlag)
Generated on Thu Nov 24 2022 07:48:28 for Slicer by
1.8.14