Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkMRMLSequenceStorageNode.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Portions (c) Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16==============================================================================*/
17
18#ifndef __vtkMRMLSequenceStorageNode_h
19#define __vtkMRMLSequenceStorageNode_h
20
21#include "vtkMRML.h"
22#include "vtkMRMLStorageNode.h"
23#include "vtkMRMLSequenceNode.h"
24
28class VTK_MRML_EXPORT vtkMRMLSequenceStorageNode : public vtkMRMLStorageNode
29{
30public:
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
36
39 const char* GetNodeTagName() override {return "SequenceStorage";};
40
42 const char* GetDefaultWriteFileExtension() override;
43
45 bool CanReadInReferenceNode(vtkMRMLNode *refNode) override;
46
47 // fileName: fCal_Test_Validation_3NWires_fCal2.0-ProbeToTracker-Seq.seq.mha
48 // itemName: ProbeToTracker
49 // return: fCal_Test_Validation_3NWires_fCal2.0
50 static std::string GetSequenceBaseName(const std::string& fileNameName, const std::string& itemName);
51
52 // baseName: fCal_Test_Validation_3NWires_fCal2.0
53 // itemName: Image
54 // return: fCal_Test_Validation_3NWires_fCal2.0-Image-Seq
55 static std::string GetSequenceNodeName(const std::string& baseName, const std::string& itemName);
56
57protected:
62
65
68
70 int ReadDataInternal(vtkMRMLNode *refNode) override;
71
73 int WriteDataInternal(vtkMRMLNode *refNode) override;
74
75 bool WriteToMRB(const char* fullName, vtkMRMLScene *scene);
76
77 bool ReadFromMRB(const char* fullName, vtkMRMLScene *scene);
78
81};
82
83#endif
friend class vtkMRMLScene
MRML node for representing a sequence of MRML nodes.
~vtkMRMLSequenceStorageNode() override
void InitializeSupportedWriteFileTypes() override
Initialize all the supported write file types.
static std::string GetSequenceNodeName(const std::string &baseName, const std::string &itemName)
vtkMRMLSequenceStorageNode(const vtkMRMLSequenceStorageNode &)
bool WriteToMRB(const char *fullName, vtkMRMLScene *scene)
void InitializeSupportedReadFileTypes() override
Initialize all the supported read file types.
bool CanReadInReferenceNode(vtkMRMLNode *refNode) override
Return true if the reference node can be read in.
int WriteDataInternal(vtkMRMLNode *refNode) override
Write data from a referenced node.
static std::string GetSequenceBaseName(const std::string &fileNameName, const std::string &itemName)
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Sequence)
int ReadDataInternal(vtkMRMLNode *refNode) override
Read data and set it in the referenced node.
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
static vtkMRMLSequenceStorageNode * New()
void operator=(const vtkMRMLSequenceStorageNode &)
void PrintSelf(ostream &os, vtkIndent indent) override
const char * GetDefaultWriteFileExtension() override
Return a default file extension for writing.
void ForceUniqueDataNodeFileNames(vtkMRMLSequenceNode *sequenceNode)
Force each storable node to be saved to a file with a different name, preventing overwriting during s...
bool ReadFromMRB(const char *fullName, vtkMRMLScene *scene)