20#ifndef __vtkMRMLClipNode_h
21#define __vtkMRMLClipNode_h
25class vtkImplicitBoolean;
26class vtkImplicitFunction;
27class vtkImplicitFunctionCollection;
28class vtkPlaneCollection;
45 void PrintSelf(ostream& os, vtkIndent indent)
override;
57 void WriteXML(ostream& of,
int indent)
override;
int GetClippingNodeIndex(const char *nodeID)
Get or set the clipping node index.
void SetAndObserveClippingNodeID(const char *clippingNodeID)
bool HasClippingNodeID(const char *clippingNodeID)
Check if the clip plane node ID exists.
void CopyReferences(vtkMRMLNode *node) override
Overridden to update the implicit function when the clipping nodes are modified.
void RemoveNthClippingNodeID(int n)
void ProcessMRMLEvents(vtkObject *caller, unsigned long event, void *callData) override
Overridden to update the implicit function when the clipping nodes are modified.
int GetNthClippingNodeState(int n)
void GetPlanes(vtkPlaneCollection *planes)
Get all the plane implicit functions from the clipping nodes.
vtkMRMLClipNode(const vtkMRMLClipNode &)
vtkImplicitFunction * GetImplicitFunctionWorld()
Get the implicit function that represents the clipping function created from the referenced clipping ...
static const char * ClippingNodeStatePropertyName
static const char * GetClipTypeAsString(int type)
vtkMRMLNode * CreateNodeInstance() override
MRMLNode methods.
void PrintSelf(ostream &os, vtkIndent indent) override
void RemoveClippingNodeID(const char *clippingNodeID)
Remove the clip plane node.
void AddAndObserveClippingNodeID(const char *clippingNodeID)
int GetYellowSliceClipState()
void SetRedSliceClipState(int)
const char * GetNodeTagName() override
Get node XML tag name (like Volume, Model)
const char * GetClippingNodeReferenceRole() const
Node reference role used for storing clip plane node references.
void SetClippingNodeState(const char *nodeID, int)
void SetGreenSliceClipState(int)
vtkMRMLNode * GetClippingNode()
int GetNumberOfClippingNodes()
Get the number of clip plane nodes.
void SetAndObserveNthClippingNodeID(int n, const char *clippingNodeID)
vtkMRMLCopyContentMacro(vtkMRMLClipNode)
void RemoveAllClippingNodeIDs()
~vtkMRMLClipNode() override
static const char * ClippingNodeReferenceRole
int GetSliceClipState(const char *nodeID)
void OnNodeReferenceModified(vtkMRMLNodeReference *reference) override
Called when a node reference ID is modified.
vtkMRMLNode * GetNthClippingNode(int n)
Get the clipping node.
static int GetClippingStateFromString(const char *name)
void SetClipType(int clipType)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
void OnNodeReferenceAdded(vtkMRMLNodeReference *reference) override
Called when a node reference ID is added (list size increased).
static const char * GetClippingMethodAsString(int type)
const char * GetClippingNodeID()
void UpdateImplicitFunction()
Update the implicit function based on the clipping nodes.
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
int GetRedSliceClipState()
vtkSmartPointer< vtkImplicitBoolean > ImplicitFunction
void SetClippingNodeState(vtkMRMLNode *, int)
ClippingStateType
Clipping state for each clipping node reference.
static vtkMRMLClipNode * New()
void OnNodeReferenceRemoved(vtkMRMLNodeReference *reference) override
Called after a node reference ID is removed (list size decreased).
void SetSliceClipState(const char *nodeID, int state)
int GetGreenSliceClipState()
static const char * GetClippingStateAsString(int state)
static int GetClippingMethodFromString(const char *name)
void SetNthClippingNodeState(int n, int state)
int GetClippingNodeState(vtkMRMLNode *node)
static int GetClipTypeFromString(const char *name)
int GetClippingNodeState(const char *nodeID)
static const char * GetClippingNodeStatePropertyName()
Get the node reference property name for the clipping node state.
void operator=(const vtkMRMLClipNode &)
void SetYellowSliceClipState(int)
int GetClippingNodeIndexFromID(const char *clippingNodeID)
Get the index of the clipping node.
const char * GetNthClippingNodeID(int n)
Get the clip plane node ID.
static const char * ClippingNodeReferenceRef
Class to hold information about a node reference.