Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkMRMLVolumeHeaderlessStorageNode.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: vtkMRMLVolumeHeaderlessStorageNode.h,v $
10  Date: $Date: 2006/03/19 17:12:29 $
11  Version: $Revision: 1.3 $
12 
13 =========================================================================auto=*/
14 
15 #ifndef __vtkMRMLVolumeHeaderlessStorageNode_h
16 #define __vtkMRMLVolumeHeaderlessStorageNode_h
17 
18 #include "vtkMRMLStorageNode.h"
19 
20 class vtkImageData;
21 
26  : public vtkMRMLStorageNode
27 {
28 public:
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  void Copy(vtkMRMLNode *node) override;
46 
49  const char* GetNodeTagName() override {return "VolumeHeaderlessStorage";}
50 
53  vtkGetStringMacro(FileScanOrder);
54  vtkSetStringMacro(FileScanOrder);
55 
58  vtkGetVector3Macro(FileDimensions, int);
59  vtkSetVector3Macro(FileDimensions, int);
60 
63  vtkGetVector3Macro(FileSpacing, double);
64  vtkSetVector3Macro(FileSpacing, double);
65 
69  vtkSetMacro(FileScalarType, int);
70  vtkGetMacro(FileScalarType, int);
71 
73  {this->SetFileScalarType(VTK_UNSIGNED_CHAR);};
75  {this->SetFileScalarType(VTK_CHAR);};
77  this->SetFileScalarType(VTK_SHORT);};
79  {this->SetFileScalarType(VTK_UNSIGNED_SHORT);};
81  this->SetFileScalarType(VTK_INT);};
83  this->SetFileScalarType(VTK_UNSIGNED_INT);};
85  this->SetFileScalarType(VTK_LONG);};
87  this->SetFileScalarType(VTK_UNSIGNED_LONG);};
89  this->SetFileScalarType(VTK_FLOAT);};
91  this->SetFileScalarType(VTK_DOUBLE);};
92 
93  const char* GetFileScalarTypeAsString();
94 
95  void SetFileScalarTypeAsString(const char* );
96 
100  vtkGetMacro(FileNumberOfScalarComponents, int);
101  vtkSetMacro(FileNumberOfScalarComponents, int);
102 
107  vtkGetMacro(FileLittleEndian, int);
108  vtkSetMacro(FileLittleEndian, int);
109  vtkBooleanMacro(FileLittleEndian, int);
110 
113  vtkGetMacro(CenterImage, int);
114  vtkSetMacro(CenterImage, int);
115 
117  bool CanReadInReferenceNode(vtkMRMLNode *refNode) override;
118  bool CanWriteFromReferenceNode(vtkMRMLNode *refNode) override;
119 
120 protected:
121 
126 
128  void InitializeSupportedWriteFileTypes() override;
129 
131  int ReadDataInternal(vtkMRMLNode *refNode) override;
132 
134  int WriteDataInternal(vtkMRMLNode *refNode) override;
135 
140  double FileSpacing[3];
141  int FileDimensions[3];
142 
144 
146 };
147 
148 #endif
vtkMRMLNode * CreateNodeInstance() override=0
Create instance of the default node. Like New only virtual.
MRML node for representing a volume storage.
virtual int ReadDataInternal(vtkMRMLNode *refNode)
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
virtual bool CanWriteFromReferenceNode(vtkMRMLNode *refNode)
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()
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
virtual int WriteDataInternal(vtkMRMLNode *refNode)
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:167
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode)=0