vtkMRMLVolumeHeaderlessStorageNode.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00017
00018 #ifndef __vtkMRMLVolumeHeaderlessStorageNode_h
00019 #define __vtkMRMLVolumeHeaderlessStorageNode_h
00020
00021 #include "vtkMRML.h"
00022 #include "vtkMRMLScene.h"
00023 #include "vtkMRMLStorageNode.h"
00024
00025
00026 class vtkImageData;
00027
00028 class VTK_MRML_EXPORT vtkMRMLVolumeHeaderlessStorageNode : public vtkMRMLStorageNode
00029 {
00030 public:
00031 static vtkMRMLVolumeHeaderlessStorageNode *New();
00032 vtkTypeMacro(vtkMRMLVolumeHeaderlessStorageNode,vtkMRMLStorageNode);
00033 void PrintSelf(ostream& os, vtkIndent indent);
00034
00035 virtual vtkMRMLNode* CreateNodeInstance();
00036
00039 virtual void ReadXMLAttributes( const char** atts);
00040
00044 virtual int ReadData(vtkMRMLNode *refNode);
00045
00049 virtual int WriteData(vtkMRMLNode *refNode);
00050
00053 virtual void WriteXML(ostream& of, int indent);
00054
00058 virtual void ProcessParentNode(vtkMRMLNode *parentNode);
00059
00062 virtual void Copy(vtkMRMLNode *node);
00063
00066 virtual const char* GetNodeTagName() {return "VolumeHeaderlessStorage";};
00067
00070 vtkGetStringMacro(FileScanOrder);
00071 vtkSetStringMacro(FileScanOrder);
00072
00075 vtkGetVector3Macro(FileDimensions, int);
00076 vtkSetVector3Macro(FileDimensions, int);
00077
00080 vtkGetVector3Macro(FileSpacing, double);
00081 vtkSetVector3Macro(FileSpacing, double);
00082
00086 vtkSetMacro(FileScalarType, int);
00087 vtkGetMacro(FileScalarType, int);
00088
00089 void SetFileScalarTypeToUnsignedChar()
00090 {this->SetFileScalarType(VTK_UNSIGNED_CHAR);};
00091 void SetFileScalarTypeToChar()
00092 {this->SetFileScalarType(VTK_CHAR);};
00093 void SetFileScalarTypeToShort() {
00094 this->SetFileScalarType(VTK_SHORT);};
00095 void SetFileScalarTypeToUnsignedShort()
00096 {this->SetFileScalarType(VTK_UNSIGNED_SHORT);};
00097 void SetFileScalarTypeToInt() {
00098 this->SetFileScalarType(VTK_INT);};
00099 void SetFileScalarTypeToUnsignedInt() {
00100 this->SetFileScalarType(VTK_UNSIGNED_INT);};
00101 void SetFileScalarTypeToLong() {
00102 this->SetFileScalarType(VTK_LONG);};
00103 void SetFileScalarTypeToUnsignedLong() {
00104 this->SetFileScalarType(VTK_UNSIGNED_LONG);};
00105 void SetFileScalarTypeToFloat() {
00106 this->SetFileScalarType(VTK_FLOAT);};
00107 void SetFileScalarTypeToDouble() {
00108 this->SetFileScalarType(VTK_DOUBLE);};
00109
00110 const char* GetFileScalarTypeAsString();
00111
00112 void SetFileScalarTypeAsString(const char* );
00113
00117 vtkGetMacro(FileNumberOfScalarComponents, int);
00118 vtkSetMacro(FileNumberOfScalarComponents, int);
00119
00124 vtkGetMacro(FileLittleEndian, int);
00125 vtkSetMacro(FileLittleEndian, int);
00126 vtkBooleanMacro(FileLittleEndian, int);
00127
00130 vtkGetMacro(CenterImage, int);
00131 vtkSetMacro(CenterImage, int);
00132
00137 virtual int SupportedFileType(const char *fileName);
00138
00141 virtual void InitializeSupportedWriteFileTypes();
00142
00143 protected:
00144
00145
00146 vtkMRMLVolumeHeaderlessStorageNode();
00147 ~vtkMRMLVolumeHeaderlessStorageNode();
00148 vtkMRMLVolumeHeaderlessStorageNode(const vtkMRMLVolumeHeaderlessStorageNode&);
00149 void operator=(const vtkMRMLVolumeHeaderlessStorageNode&);
00150
00151 char *FileScanOrder;
00152 int FileScalarType;
00153 int FileNumberOfScalarComponents;
00154 int FileLittleEndian;
00155 double FileSpacing[3];
00156 int FileDimensions[3];
00157
00158 int CenterImage;
00159
00160 char* WriteFileFormat;
00161 };
00162
00163 #endif
00164
00165
00166