Slicer  4.10
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) VTK_OVERRIDE;
32 
33  virtual vtkMRMLNode* CreateNodeInstance() VTK_OVERRIDE;
34 
37  virtual void ReadXMLAttributes( const char** atts) VTK_OVERRIDE;
38 
41  virtual void WriteXML(ostream& of, int indent) VTK_OVERRIDE;
42 
45  virtual void Copy(vtkMRMLNode *node) VTK_OVERRIDE;
46 
49  virtual const char* GetNodeTagName() VTK_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  virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode) VTK_OVERRIDE;
118  virtual bool CanWriteFromReferenceNode(vtkMRMLNode *refNode) VTK_OVERRIDE;
119 
120 protected:
121 
126 
128  virtual void InitializeSupportedWriteFileTypes() VTK_OVERRIDE;
129 
131  virtual int ReadDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE;
132 
134  virtual int WriteDataInternal(vtkMRMLNode *refNode) VTK_OVERRIDE;
135 
136  char *FileScanOrder;
137  int FileScalarType;
138  int FileNumberOfScalarComponents;
139  int FileLittleEndian;
140  double FileSpacing[3];
141  int FileDimensions[3];
142 
143  int CenterImage;
144 
145  char* WriteFileFormat;
146 };
147 
148 #endif
MRML node for representing a volume storage.
void operator=(const vtkMRMLStorageNode &)
virtual vtkMRMLNode * CreateNodeInstance() VTK_OVERRIDE=0
Create instance of the default node. Like New only virtual.
virtual bool CanWriteFromReferenceNode(vtkMRMLNode *refNode)
A superclass for other storage nodes.
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
virtual void InitializeSupportedWriteFileTypes()
Abstract Superclass for all specific types of MRML nodes.
Definition: vtkMRMLNode.h:138
virtual bool CanReadInReferenceNode(vtkMRMLNode *refNode)=0