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
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
20class vtkImageData;
21
26 : public vtkMRMLStorageNode
27{
28public:
31 void PrintSelf(ostream& os, vtkIndent indent) override;
32
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
94
95 void SetFileScalarTypeAsString(const char* );
96
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
120protected:
121
126
129
131 int ReadDataInternal(vtkMRMLNode *refNode) override;
132
134 int WriteDataInternal(vtkMRMLNode *refNode) override;
135
140 double FileSpacing[3];
142
144};
145
146#endif
static vtkMRMLVolumeHeaderlessStorageNode * New()
void PrintSelf(ostream &os, vtkIndent indent) override
void operator=(const vtkMRMLVolumeHeaderlessStorageNode &)
vtkMRMLNode * CreateNodeInstance() override
Create instance of the default node. Like New only virtual.
void InitializeSupportedWriteFileTypes() override
Initialize all the supported write file types.
const char * GetNodeTagName() override
Get node XML tag name (like Storage, Model)
bool CanWriteFromReferenceNode(vtkMRMLNode *refNode) override
void ReadXMLAttributes(const char **atts) override
Read node attributes from XML file.
void WriteXML(ostream &of, int indent) override
Write this node's information to a MRML file in XML format.
int WriteDataInternal(vtkMRMLNode *refNode) override
Write data from a referenced node.
bool CanReadInReferenceNode(vtkMRMLNode *refNode) override
Return true if node can be read in.
void SetFileScalarTypeAsString(const char *)
vtkMRMLVolumeHeaderlessStorageNode(const vtkMRMLVolumeHeaderlessStorageNode &)
int ReadDataInternal(vtkMRMLNode *refNode) override
Read data and set it in the referenced node.
void Copy(vtkMRMLNode *node) override
Copy the node's attributes to this object.