2 #ifndef __vtkTeemNRRDWriter_h 3 #define __vtkTeemNRRDWriter_h 7 #include "vtkDoubleArray.h" 8 #include "vtkMatrix4x4.h" 9 #include "vtkSmartPointer.h" 10 #include "teem/nrrd.h" 12 #include "vtkTeemConfigure.h" 15 class AttributeMapType;
16 class AxisInfoMapType;
28 void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
34 vtkImageData* GetInput();
35 vtkImageData* GetInput(
int port);
39 vtkSetStringMacro(FileName);
40 vtkGetStringMacro(FileName);
42 vtkSetObjectMacro(DiffusionGradients,vtkDoubleArray);
43 vtkGetObjectMacro(DiffusionGradients,vtkDoubleArray);
45 vtkSetObjectMacro(BValues,vtkDoubleArray);
46 vtkGetObjectMacro(BValues,vtkDoubleArray);
48 vtkSetObjectMacro(IJKToRASMatrix,vtkMatrix4x4);
49 vtkGetObjectMacro(IJKToRASMatrix,vtkMatrix4x4);
51 vtkSetObjectMacro(MeasurementFrameMatrix,vtkMatrix4x4);
52 vtkGetObjectMacro(MeasurementFrameMatrix,vtkMatrix4x4);
54 vtkSetMacro(UseCompression,
int);
55 vtkGetMacro(UseCompression,
int);
56 vtkBooleanMacro(UseCompression,
int);
58 vtkSetClampMacro(CompressionLevel,
int, 0, 9);
59 vtkGetMacro(CompressionLevel,
int);
61 vtkSetClampMacro(FileType,
int,VTK_ASCII,VTK_BINARY);
62 vtkGetMacro(FileType,
int);
66 vtkBooleanMacro(WriteError,
int);
67 vtkSetMacro(WriteError,
int);
68 vtkGetMacro(WriteError,
int);
72 void SetAttribute(
const std::string& name,
const std::string& value);
75 void SetAxisLabel(
unsigned int axis,
const char* label);
78 void SetAxisUnit(
unsigned int axis,
const char* unit);
83 void SetVectorAxisKind(
int kind);
92 virtual int FillInputPortInformation(
int port, vtkInformation *info) VTK_OVERRIDE;
96 void WriteData() VTK_OVERRIDE;
104 vtkDoubleArray* BValues;
105 vtkDoubleArray* DiffusionGradients;
107 vtkMatrix4x4* IJKToRASMatrix;
108 vtkMatrix4x4* MeasurementFrameMatrix;
111 int CompressionLevel;
114 AttributeMapType *Attributes;
115 AxisInfoMapType *AxisLabels;
116 AxisInfoMapType *AxisUnits;
122 void vtkImageDataInfoToNrrdInfo(vtkImageData *in,
int &nrrdKind,
size_t &numComp,
int &vtkType,
void **buffer);
123 int VTKToNrrdPixelType( const
int vtkPixelType );
124 int DiffusionWeightedData;
void SetFileTypeToASCII()
void SetFileTypeToBinary()