Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLTransformStorageNode.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  Program: 3D Slicer
9  Module: $RCSfile: vtkMRMLTransformStorageNode.h,v $
10  Date: $Date: 2006/03/19 17:12:29 $
11  Version: $Revision: 1.3 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLTransformStorageNode_h
16 #define __vtkMRMLTransformStorageNode_h
17 
18 #include "vtkMRMLStorageNode.h"
19 
20 class vtkAbstractTransform;
22 
26 class VTK_MRML_EXPORT vtkMRMLTransformStorageNode : public vtkMRMLStorageNode
27 {
28  public:
29  static vtkMRMLTransformStorageNode *New();
31  void PrintSelf(ostream& os, vtkIndent indent) override;
32 
33  vtkMRMLNode* CreateNodeInstance() override;
34 
37  void ReadXMLAttributes( const char** atts) override;
38 
41  void WriteXML(ostream& of, int indent) override;
42 
45  const char* GetNodeTagName() override {return "TransformStorage";};
46 
49  void Copy(vtkMRMLNode *node) override;
50 
53  void InitializeSupportedWriteFileTypes() override;
54 
56  bool CanReadInReferenceNode(vtkMRMLNode* refNode) override;
57 
63  vtkGetMacro ( PreferITKv3CompatibleTransforms, int );
64  vtkSetMacro ( PreferITKv3CompatibleTransforms, int );
65  vtkBooleanMacro ( PreferITKv3CompatibleTransforms, int );
66 
67 protected:
69  ~vtkMRMLTransformStorageNode() override;
72 
76  virtual bool IsImageFile(const std::string &filename);
77 
84  virtual void SetAndObserveTransformFromParentAutoInvert(vtkMRMLTransformNode* transformNode, vtkAbstractTransform *transform);
85 
87  int ReadDataInternal(vtkMRMLNode *refNode) override;
88 
93  virtual int ReadFromITKv3BSplineTransformFile(vtkMRMLNode *refNode);
94 
103  virtual int ReadFromTransformFile(vtkMRMLNode *refNode);
104 
109  virtual int ReadFromImageFile(vtkMRMLNode *refNode);
110 
112  int WriteDataInternal(vtkMRMLNode *refNode) override;
113 
116  virtual int WriteToTransformFile(vtkMRMLNode* refNode);
117 
122  virtual int WriteToImageFile(vtkMRMLNode* refNode);
123 
126 
127 protected:
128 
130 };
131 
132 #endif
vtkMRMLNode * CreateNodeInstance() override=0
Create instance of the default node. Like New only virtual.
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Transform)
virtual int ReadDataInternal(vtkMRMLNode *refNode)
MRML node for representing a transformation between this node space and a parent node space...
void operator=(const vtkMRMLStorageNode &)
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object
void PrintSelf(ostream &os, vtkIndent indent) override
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
A superclass for other storage nodes.
virtual void InitializeSupportedWriteFileTypes()
static bool RegisterInverseTransformTypesCompleted
Flag to prevent repeated registration of ITK transforms.
MRML node for transform storage on disk.
virtual int WriteDataInternal(vtkMRMLNode *refNode)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode)=0