18#ifndef __vtkMRMLSequenceNode_h
19#define __vtkMRMLSequenceNode_h
52 void PrintSelf(ostream& os, vtkIndent indent)
override;
61 void WriteXML(ostream& of,
int indent)
override;
friend class vtkMRMLScene
bool UpdateIndexValue(const std::string &oldIndexValue, const std::string &newIndexValue)
Change index value of an existing data node.
void UpdateSequenceIndex()
Update sequence index to point to nodes.
int GetNumberOfDataNodes()
Return the number of nodes stored in this sequence.
vtkMRMLNode * GetDataNodeAtValue(const std::string &indexValue, bool exactMatchRequired=true)
void UpdateScene(vtkMRMLScene *scene) override
Update node IDs in case of node ID conflicts on scene import.
vtkMRMLNode * CreateNodeInstance() override
Create instance of a sequence node.
void ReadIndexValues(const std::string &indexText)
std::string GetNthIndexValue(int itemNumber)
Index value of n-th data node.
void SetIndexName(const std::string &str)
Set index name (example: time)
std::string GetDefaultStorageNodeClassName(const char *filename=nullptr) override
static vtkMRMLSequenceNode * New()
~vtkMRMLSequenceNode() override
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object.
vtkMRMLStorageNode * CreateDefaultStorageNode() override
std::string GetDataNodeTagName()
Return the human-readable type name of the data nodes (e.g., TransformNode). If there are no data nod...
void operator=(const vtkMRMLSequenceNode &)
vtkMRMLNode * DeepCopyNodeToScene(vtkMRMLNode *source, vtkMRMLScene *scene)
static std::string GetIndexTypeAsString(int indexType)
Helper functions for converting between string and code representation of the index type.
const char * GetNodeTagName() override
Get unique node XML tag name (like Volume, Model)
void SetIndexTypeFromString(const char *indexTypeString)
vtkMRMLNode * SetDataNodeAtValue(vtkMRMLNode *node, const std::string &indexValue)
void ReadXMLAttributes(const char **atts) override
Set node attributes from name/value pairs.
void SetIndexType(int indexType)
Set the type of the index (numeric, text, ...)
vtkMRMLSequenceNode(const vtkMRMLSequenceNode &)
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
void SetIndexUnit(const std::string &str)
Set unit for the index (example: s)
std::deque< IndexEntryType > IndexEntries
List of data items (the scene may contain some more nodes, such as storage nodes)
vtkMRMLScene * GetSequenceScene(bool autoCreate=true)
bool UpdateDataNodeAtValue(vtkMRMLNode *node, const std::string &indexValue, bool shallowCopy=false)
std::string GetDataNodeClassName()
Return the class name of the data nodes (e.g., vtkMRMLTransformNode). If there are no data nodes yet ...
vtkMRMLNode * GetNthDataNode(int itemNumber)
Get the data node corresponding to the n-th index value.
static int GetIndexTypeFromString(const std::string &indexTypeString)
void SetNumericIndexValueTolerance(double tolerance)
Set tolerance value for comparing numeric index values.
virtual void CopySequenceIndex(vtkMRMLNode *node)
int GetItemNumberFromIndexValue(const std::string &indexValue, bool exactMatchRequired=true)
std::string IndexName
Describes index of the sequence node.
double NumericIndexValueTolerance
void PrintSelf(ostream &os, vtkIndent indent) override
int GetInsertPosition(const std::string &indexValue)
void RemoveDataNodeAtValue(const std::string &indexValue)
Remove data node corresponding to the specified index.
void RemoveAllDataNodes()
Remove all data nodes from the sequence.
virtual std::string GetIndexTypeAsString()
vtkMRMLScene * SequenceScene
A superclass for other storage nodes.
vtkWeakPointer< vtkMRMLNode > DataNode