29#ifndef __vtkTeemNRRDReader_h
30#define __vtkTeemNRRDReader_h
36#include "vtkTeemConfigure.h"
37#include "vtkMedicalImageReader2.h"
42#include <vtkMatrix4x4.h>
43#include <vtkPointData.h>
44#include <vtkSmartPointer.h>
45#include <vtkVersion.h>
95 void PrintSelf(ostream& os, vtkIndent indent)
override;
147 switch (nrrdPixelType)
150 case nrrdTypeDefault:
return VTK_VOID;
break;
151 case nrrdTypeChar:
return VTK_CHAR;
break;
152 case nrrdTypeUChar:
return VTK_UNSIGNED_CHAR;
break;
153 case nrrdTypeShort:
return VTK_SHORT;
break;
155 return VTK_UNSIGNED_SHORT;
163 case nrrdTypeInt:
return VTK_INT;
break;
164 case nrrdTypeUInt:
return VTK_UNSIGNED_INT;
break;
165 case nrrdTypeFloat:
return VTK_FLOAT;
break;
166 case nrrdTypeDouble:
return VTK_DOUBLE;
break;
167 case nrrdTypeBlock:
return -1;
break;
173 switch (vtkPixelType)
176 case VTK_VOID:
return nrrdTypeDefault;
break;
177 case VTK_CHAR:
return nrrdTypeChar;
break;
178 case VTK_UNSIGNED_CHAR:
return nrrdTypeUChar;
break;
179 case VTK_SHORT:
return nrrdTypeShort;
break;
180 case VTK_UNSIGNED_SHORT:
181 return nrrdTypeUShort;
189 case VTK_INT:
return nrrdTypeInt;
break;
190 case VTK_UNSIGNED_INT:
return nrrdTypeUInt;
break;
191 case VTK_FLOAT:
return nrrdTypeFloat;
break;
192 case VTK_DOUBLE:
return nrrdTypeDouble;
break;
196 void AllocateOutputData(vtkImageData* out, vtkInformation* outInfo,
int* uExtent)
override { Superclass::AllocateOutputData(out, outInfo, uExtent); }
203 static bool GetPointType(Nrrd* nrrdTemp,
int& pointDataType,
int& numOfComponents);
const char * GetAxisLabel(unsigned int axis)
Get label for specified axis.
void SetUseNativeOriginOff()
Use image center as origin.
static vtkTeemNRRDReader * New()
vtkSmartPointer< vtkMatrix4x4 > MeasurementFrameMatrix
const char * GetAxisUnit(unsigned int axis)
Get unit for specified axis.
const std::map< std::string, std::string > GetHeaderKeysMap()
int tenSpaceDirectionReduce(Nrrd *nout, const Nrrd *nin, double SD[9])
void ExecuteDataWithInformation(vtkDataObject *output, vtkInformation *outInfo) override
vtkSmartPointer< vtkMatrix4x4 > RasToIjkMatrix
vtkImageData * AllocateOutputData(vtkDataObject *out, vtkInformation *outInfo) override
int VTKToNrrdPixelType(const int vtkPixelType) const
vtkMatrix4x4 * GetMeasurementFrameMatrix()
Returns the measurement frame matrix used for tensor valued data.
int NrrdToVTKScalarType(const int nrrdPixelType) const
void PrintSelf(ostream &os, vtkIndent indent) override
static bool GetPointType(Nrrd *nrrdTemp, int &pointDataType, int &numOfComponents)
std::string CurrentFileName
void AllocatePointData(vtkImageData *out, vtkInformation *outInfo)
void AllocateOutputData(vtkImageData *out, vtkInformation *outInfo, int *uExtent) override
std::string DataArrayName
int CanReadFile(const char *filename) override
is the given file name a NRRD file?
const char * GetDescriptiveName() override
A descriptive name for this format.
const std::vector< std::string > GetHeaderKeysVector()
vtkSmartPointer< vtkMatrix4x4 > NRRDWorldToRasMatrix
vtkMatrix4x4 * GetRasToIjkMatrix()
Returns a IJK to RAS transformation matrix.
std::map< std::string, std::string > HeaderKeyValue
std::map< unsigned int, std::string > AxisLabels
const char * GetFileExtensions() override
Valid extensions.
void SetUseNativeOriginOn()
Use image origin from the file.
const char * GetHeaderValue(const char *key)
Get a value given a key in the header.
~vtkTeemNRRDReader() override
std::map< unsigned int, std::string > AxisUnits
void ExecuteInformation() override
const char * GetHeaderKeys()