Slicer  4.13
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLLinearTransformSequenceStorageNode.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8 =========================================================================auto=*/
12 
13 #ifndef __vtkMRMLLinearTransformSequenceStorageNode_h
14 #define __vtkMRMLLinearTransformSequenceStorageNode_h
15 
16 #include "vtkMRML.h"
17 #include "vtkMRMLNRRDStorageNode.h"
18 
19 #include <deque>
20 
22 
24  {
28  };
29 
32 {
33  public:
34 
37 
38  vtkMRMLNode* CreateNodeInstance() override;
39 
42  const char* GetNodeTagName() override {return "LinearTransformSequenceStorage";};
43 
45  bool CanReadInReferenceNode(vtkMRMLNode *refNode) override;
46 
48  bool CanWriteFromReferenceNode(vtkMRMLNode* refNode) override;
49  int WriteDataInternal(vtkMRMLNode *refNode) override;
50 
53  const char* GetDefaultWriteFileExtension() override;
54 
59  static int ReadSequenceFileTransforms(const std::string& fileName, vtkMRMLScene *scene,
60  std::deque< vtkSmartPointer<vtkMRMLSequenceNode> > &createdNodes, std::map< int, std::string >& frameNumberToIndexValueMap,
61  std::map< std::string, std::string > &imageMetaData, SequenceFileType fileType = METAIMAGE_SEQUENCE_FILE);
62 
64  static bool WriteSequenceMetafileTransforms(const std::string& fileName, std::deque< vtkMRMLSequenceNode* > &transformNodes,
65  std::deque< std::string > &transformNames, vtkMRMLSequenceNode* masterNode, vtkMRMLSequenceNode* imageNode);
66 
67 protected:
72 
77  int ReadDataInternal(vtkMRMLNode* refNode) override;
78 
80  void InitializeSupportedReadFileTypes() override;
81 
83  void InitializeSupportedWriteFileTypes() override;
84 };
85 
86 #endif
void InitializeSupportedWriteFileTypes() override
Initialize all the supported write file types.
virtual const char * GetDefaultWriteFileExtension()
Return default file extension for writing.
MRML node for representing a sequence of MRML nodes.
MRML node for representing a volume storage.
static vtkMRMLNRRDStorageNode * New()
void operator=(const vtkMRMLNRRDStorageNode &)
A set of MRML Nodes that supports serialization and undo/redo.
Definition: vtkMRMLScene.h:61
virtual bool CanWriteFromReferenceNode(vtkMRMLNode *refNode)
bool CanReadInReferenceNode(vtkMRMLNode *refNode) override
Return true if the node can be read in.
int ReadDataInternal(vtkMRMLNode *refNode) override
Read data and set it in the referenced node.
void InitializeSupportedReadFileTypes() override
Initialize all the supported write file types.
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
int WriteDataInternal(vtkMRMLNode *refNode) override
Write data from a referenced node.