Slicer 5.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkTeemNRRDWriter.h
Go to the documentation of this file.
1
2#ifndef __vtkTeemNRRDWriter_h
3#define __vtkTeemNRRDWriter_h
4
5#include "vtkWriter.h"
6
7#include "vtkDoubleArray.h"
8#include "vtkMatrix4x4.h"
9#include "vtkSmartPointer.h"
10
11#include "vtkTeemConfigure.h"
12
13class vtkImageData;
14class AttributeMapType;
15class AxisInfoMapType;
16
28class VTK_Teem_EXPORT vtkTeemNRRDWriter : public vtkWriter
29{
30public:
31 vtkTypeMacro(vtkTeemNRRDWriter, vtkWriter);
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
35
38 vtkImageData* GetInput();
39 vtkImageData* GetInput(int port);
40
43 vtkSetStringMacro(FileName);
44 vtkGetStringMacro(FileName);
45
46 vtkSetObjectMacro(DiffusionGradients, vtkDoubleArray);
47 vtkGetObjectMacro(DiffusionGradients, vtkDoubleArray);
48
49 vtkSetObjectMacro(BValues, vtkDoubleArray);
50 vtkGetObjectMacro(BValues, vtkDoubleArray);
51
52 vtkSetObjectMacro(IJKToRASMatrix, vtkMatrix4x4);
53 vtkGetObjectMacro(IJKToRASMatrix, vtkMatrix4x4);
54
55 vtkSetObjectMacro(MeasurementFrameMatrix, vtkMatrix4x4);
56 vtkGetObjectMacro(MeasurementFrameMatrix, vtkMatrix4x4);
57
58 vtkSetMacro(UseCompression, int);
59 vtkGetMacro(UseCompression, int);
60 vtkBooleanMacro(UseCompression, int);
61
62 vtkSetClampMacro(CompressionLevel, int, 0, 9);
63 vtkGetMacro(CompressionLevel, int);
64
65 vtkSetClampMacro(FileType, int, VTK_ASCII, VTK_BINARY);
66 vtkGetMacro(FileType, int);
67 void SetFileTypeToASCII() { this->SetFileType(VTK_ASCII); };
68 void SetFileTypeToBinary() { this->SetFileType(VTK_BINARY); };
69
71 vtkBooleanMacro(WriteError, int);
72 vtkSetMacro(WriteError, int);
73 vtkGetMacro(WriteError, int);
74
77 void SetAttribute(const std::string& name, const std::string& value);
78
80 void SetAxisLabel(unsigned int axis, const char* label);
81
83 void SetAxisUnit(unsigned int axis, const char* unit);
84
88 void SetVectorAxisKind(int kind);
89
92 vtkSetMacro(Space, int);
93 vtkGetMacro(Space, int);
94
98
102
105 vtkSetMacro(ForceRangeAxis, bool);
106 vtkGetMacro(ForceRangeAxis, bool);
107 vtkBooleanMacro(ForceRangeAxis, bool);
108
110 void* MakeNRRD();
111
112protected:
115
116 int FillInputPortInformation(int port, vtkInformation* info) override;
117
120 void WriteData() override;
121
125
126 char* FileName;
127
128 vtkDoubleArray* BValues;
129 vtkDoubleArray* DiffusionGradients;
130
131 vtkMatrix4x4* IJKToRASMatrix;
133
137
138 AttributeMapType* Attributes;
139 AxisInfoMapType* AxisLabels;
140 AxisInfoMapType* AxisUnits;
142 int Space;
143
145
146private:
147 vtkTeemNRRDWriter(const vtkTeemNRRDWriter&) = delete;
148 void operator=(const vtkTeemNRRDWriter&) = delete;
149 void vtkImageDataInfoToNrrdInfo(vtkImageData* in, int& nrrdKind, size_t& numComp, int& vtkType, void** buffer);
150 int VTKToNrrdPixelType(const int vtkPixelType);
151 int DiffusionWeightedData;
152};
153
154#endif
AxisInfoMapType * AxisLabels
AttributeMapType * Attributes
AxisInfoMapType * AxisUnits
virtual void SetFileType(int)
static vtkTeemNRRDWriter * New()
void SetVectorAxisKind(int kind)
void * MakeNRRD()
Utility function to return image as a Nrrd*.
void SetAttribute(const std::string &name, const std::string &value)
vtkMatrix4x4 * IJKToRASMatrix
~vtkTeemNRRDWriter() override
vtkDoubleArray * BValues
void PrintSelf(ostream &os, vtkIndent indent) override
vtkMatrix4x4 * MeasurementFrameMatrix
void WriteData() override
Write method. It is called by vtkWriter::Write();.
vtkDoubleArray * DiffusionGradients
int FillInputPortInformation(int port, vtkInformation *info) override
vtkImageData * GetInput(int port)
void SetAxisLabel(unsigned int axis, const char *label)
Method to set label for each axis.
void vtkSetSpaceToRAS()
Set coordinate system to RAS.
void SetAxisUnit(unsigned int axis, const char *unit)
Method to set unit for each axis.
int WriteError
Flag to set to on when a write error occurred.
vtkImageData * GetInput()
Get the input to this writer.
void vtkSetSpaceToLPS()
Set coordinate system to LPS.
void vtkSetSpaceToLPST()
void vtkSetSpaceToRAST()