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;
104 return ".nhdr .nrrd";
111 return "NRRD - Nearly Raw Raster Data";
160 switch( nrrdPixelType )
163 case nrrdTypeDefault:
170 return VTK_UNSIGNED_CHAR;
176 return VTK_UNSIGNED_SHORT;
188 return VTK_UNSIGNED_INT;
204 switch( vtkPixelType )
208 return nrrdTypeDefault;
213 case VTK_UNSIGNED_CHAR:
214 return nrrdTypeUChar;
217 return nrrdTypeShort;
219 case VTK_UNSIGNED_SHORT:
220 return nrrdTypeUShort;
231 case VTK_UNSIGNED_INT:
235 return nrrdTypeFloat;
238 return nrrdTypeDouble;
244 { Superclass::AllocateOutputData(out, outInfo, uExtent); }
251 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()