21#ifndef __vtkMRMLAbstractViewNode_h
22#define __vtkMRMLAbstractViewNode_h
25#include <vtkSmartPointer.h>
43 void PrintSelf(ostream& os, vtkIndent indent)
override;
53 void WriteXML(ostream& of,
int indent)
override;
69 inline void SetLayoutName(
const char *layoutName);
70 inline const char *GetLayoutName();
82 vtkSetMacro(ViewGroup,
int);
83 vtkGetMacro(ViewGroup,
int);
87 vtkSetStringMacro(LayoutLabel);
88 vtkGetStringMacro(LayoutLabel);
91 vtkGetMacro(Active,
int );
92 vtkSetMacro(Active,
int );
101 vtkGetMacro(Visibility,
int);
102 vtkSetMacro(Visibility,
int);
162 vtkGetVector3Macro(BackgroundColor,
double);
163 vtkSetVector3Macro(BackgroundColor,
double);
168 vtkGetVector3Macro(BackgroundColor2,
double);
169 vtkSetVector3Macro(BackgroundColor2,
double);
174 vtkSetVector3Macro(LayoutColor,
double);
175 vtkGetVector3Macro(LayoutColor,
double);
178 static
double* GetYellowColor() VTK_SIZEHINT(3);
179 static
double* GetGreenColor() VTK_SIZEHINT(3);
180 static
double* GetCompareColor() VTK_SIZEHINT(3);
181 static
double* GetGrayColor() VTK_SIZEHINT(3);
182 static
double* GetThreeDViewBlueColor() VTK_SIZEHINT(3);
186 vtkGetMacro(OrientationMarkerEnabled,
bool);
189 vtkSetMacro(OrientationMarkerType,
int);
190 vtkGetMacro(OrientationMarkerType,
int);
197 void SetOrientationMarkerHumanModelNodeID(const
char* modelNodeId);
198 const
char* GetOrientationMarkerHumanModelNodeID();
202 static const
char* GetOrientationMarkerTypeAsString(
int id);
203 static
int GetOrientationMarkerTypeFromString(const
char* name);
206 vtkSetMacro(OrientationMarkerSize,
int);
207 vtkGetMacro(OrientationMarkerSize,
int);
210 static const
char* GetOrientationMarkerSizeAsString(
int id);
211 static
int GetOrientationMarkerSizeFromString(const
char* name);
216 OrientationMarkerTypeNone=0,
220 OrientationMarkerType_Last
225 OrientationMarkerSizeSmall=0,
228 OrientationMarkerSize_Last
233 vtkGetMacro(RulerEnabled,
bool);
236 vtkSetMacro(RulerType,
int);
237 vtkGetMacro(RulerType,
int);
253 vtkSetMacro(RulerColor,
int);
254 vtkGetMacro(RulerColor,
int);
282 std::string
GetDirectionLabel(
double direction[3],
bool positive=
true,
double toleranceDeg=1.0);
306 char* LayoutLabel{
nullptr};
320 double BackgroundColor[3];
321 double BackgroundColor2[3];
325 double LayoutColor[3];
330 bool OrientationMarkerEnabled{
false};
331 int OrientationMarkerType{OrientationMarkerTypeNone};
332 int OrientationMarkerSize{OrientationMarkerSizeMedium};
339 bool RulerEnabled{
false};
340 int RulerType{RulerTypeNone};
341 int RulerColor{RulerColorWhite};
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
void ReadXMLAttributes(const char **atts) override
MRMLNode methods.
std::string GetDirectionLabel(double direction[3], bool positive=true, double toleranceDeg=1.0)
bool SetAndObserveParentLayoutNodeID(const char *layoutNodeId)
OrientationMarkerTypeType
Enum to specify orientation marker types.
@ OrientationMarkerTypeHuman
@ OrientationMarkerTypeAxes
@ OrientationMarkerTypeCube
static const char * GetRulerColorAsString(int id)
Convert between ruler color ID and name.
virtual void SetMappedInLayout(int value)
static int GetRulerTypeFromString(const char *name)
vtkSmartPointer< vtkStringArray > AxisLabels
Labels of coordinate system axes.
bool IsViewVisibleInLayout()
Indicates whether or not the view is visible in the current layout.
void SetLayoutName(const char *layoutName)
bool SetAndObserveParentLayoutNode(vtkMRMLNode *node)
OrientationMarkerSizeType
@ OrientationMarkerSizeMedium
@ OrientationMarkerSizeLarge
RulerColorType
Enum to specify ruler colors.
RulerTypeType
Enum to specify ruler types.
vtkMRMLCopyContentMacro(vtkMRMLAbstractViewNode)
const char * GetLayoutName()
static const int AxisLabelsCount
Total number of coordinate system axis labels.
bool SetInteractionNodeID(const char *interactionNodeId)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
static double * GetRedColor() VTK_SIZEHINT(3)
vtkMRMLAbstractViewNode()
vtkMRMLAbstractViewNode(const vtkMRMLAbstractViewNode &)
static const char * OrientationMarkerHumanModelReferenceRole
const char * GetAxisLabel(int labelIndex)
vtkMRMLInteractionNode * GetInteractionNode()
Get interaction node.
virtual int IsMappedInLayout()
static int GetRulerColorFromString(const char *name)
static const char * ParentLayoutNodeReferenceRole
static const char * InteractionNodeReferenceRole
~vtkMRMLAbstractViewNode() override
vtkMRMLLayoutNode * GetMaximizedState(bool &maximized, bool &canBeMaximized)
vtkMRMLNode * GetParentLayoutNode()
static const char * GetRulerTypeAsString(int id)
Convert between ruler type ID and name.
void SetAxisLabel(int labelIndex, const char *label)
void PrintSelf(ostream &os, vtkIndent indent) override
bool SetInteractionNode(vtkMRMLNode *node)
void Reset(vtkMRMLNode *defaultNode) override
Reimplemented to preserve layout label when reset.
void operator=(const vtkMRMLAbstractViewNode &)
Node that describes the view layout of the application.
MRML node to represent a 3D surface model.
Abstract Superclass for all specific types of MRML nodes.
virtual char * GetSingletonTag()
virtual void SetSingletonTag(const char *)
Tag that make this node a singleton in the scene.