103 itkSetStringMacro(FileName);
104 itkGetStringMacro(FileName);
107#if !defined(ITK_LEGACY_REMOVE)
109 static constexpr IOPixelEnum UNKNOWNPIXELTYPE = IOPixelEnum::UNKNOWNPIXELTYPE;
110 static constexpr IOPixelEnum SCALAR = IOPixelEnum::SCALAR;
111 static constexpr IOPixelEnum RGB = IOPixelEnum::RGB;
112 static constexpr IOPixelEnum RGBA = IOPixelEnum::RGBA;
113 static constexpr IOPixelEnum OFFSET = IOPixelEnum::OFFSET;
114 static constexpr IOPixelEnum VECTOR = IOPixelEnum::VECTOR;
115 static constexpr IOPixelEnum POINT = IOPixelEnum::POINT;
116 static constexpr IOPixelEnum COVARIANTVECTOR = IOPixelEnum::COVARIANTVECTOR;
117 static constexpr IOPixelEnum SYMMETRICSECONDRANKTENSOR = IOPixelEnum::SYMMETRICSECONDRANKTENSOR;
118 static constexpr IOPixelEnum DIFFUSIONTENSOR3D = IOPixelEnum::DIFFUSIONTENSOR3D;
119 static constexpr IOPixelEnum COMPLEX = IOPixelEnum::COMPLEX;
120 static constexpr IOPixelEnum FIXEDARRAY = IOPixelEnum::FIXEDARRAY;
121 static constexpr IOPixelEnum ARRAY = IOPixelEnum::ARRAY;
122 static constexpr IOPixelEnum MATRIX = IOPixelEnum::MATRIX;
123 static constexpr IOPixelEnum VARIABLELENGTHVECTOR = IOPixelEnum::VARIABLELENGTHVECTOR;
124 static constexpr IOPixelEnum VARIABLESIZEMATRIX = IOPixelEnum::VARIABLESIZEMATRIX;
127#if !defined(ITK_LEGACY_REMOVE)
129 static constexpr IOComponentEnum UNKNOWNCOMPONENTTYPE = IOComponentEnum::UNKNOWNCOMPONENTTYPE;
138 static constexpr IOComponentEnum ULONGLONG = IOComponentEnum::ULONGLONG;
145#if !defined(ITK_LEGACY_REMOVE)
147 static constexpr IOFileEnum ASCII = IOFileEnum::ASCII;
148 static constexpr IOFileEnum BINARY = IOFileEnum::BINARY;
149 static constexpr IOFileEnum TYPENOTAPPLICABLE = IOFileEnum::TYPENOTAPPLICABLE;
152#if !defined(ITK_LEGACY_REMOVE)
154 static constexpr IOByteOrderEnum BigEndian = IOByteOrderEnum::BigEndian;
155 static constexpr IOByteOrderEnum LittleEndian = IOByteOrderEnum::LittleEndian;
156 static constexpr IOByteOrderEnum OrderNotApplicable = IOByteOrderEnum::OrderNotApplicable;
159#if !defined(ITK_LEGACY_REMOVE)
161 static constexpr IOFileModeEnum ReadMode = IOFileModeEnum::ReadMode;
162 static constexpr IOFileModeEnum WriteMode = IOFileModeEnum::WriteMode;
165#if !defined(ITK_LEGACY_REMOVE)
167 static constexpr CellGeometryEnum VERTEX_CELL = CellGeometryEnum::VERTEX_CELL;
169 static constexpr CellGeometryEnum TRIANGLE_CELL = CellGeometryEnum::TRIANGLE_CELL;
170 static constexpr CellGeometryEnum QUADRILATERAL_CELL = CellGeometryEnum::QUADRILATERAL_CELL;
171 static constexpr CellGeometryEnum POLYGON_CELL = CellGeometryEnum::POLYGON_CELL;
172 static constexpr CellGeometryEnum TETRAHEDRON_CELL = CellGeometryEnum::TETRAHEDRON_CELL;
173 static constexpr CellGeometryEnum HEXAHEDRON_CELL = CellGeometryEnum::HEXAHEDRON_CELL;
174 static constexpr CellGeometryEnum QUADRATIC_EDGE_CELL = CellGeometryEnum::QUADRATIC_EDGE_CELL;
175 static constexpr CellGeometryEnum QUADRATIC_TRIANGLE_CELL = CellGeometryEnum::QUADRATIC_TRIANGLE_CELL;
176 static constexpr CellGeometryEnum LAST_ITK_CELL = CellGeometryEnum::LAST_ITK_CELL;
177 static constexpr CellGeometryEnum MAX_ITK_CELLS = CellGeometryEnum::MAX_ITK_CELLS;
203 template <
typename T>
209 template <
typename T>
227 template <
typename T>
245 template <
typename T>
263 template <
typename T,
unsigned int VLength>
281 template <
typename T,
unsigned int VLength>
299 template <
typename T,
unsigned int VLength>
317 template <
typename T,
unsigned int VLength>
335 template <
typename T>
353 template <
typename T,
unsigned int VRows,
unsigned int VColumns>
371 template <
typename T>
373 SetPixelType(
const std::complex<T> & itkNotUsed(dummy),
bool usePointPixel =
true)
389 template <
typename T>
407 template <
typename T>
425 template <
typename T>
447 itkSetMacro(NumberOfPointPixelComponents,
unsigned int);
448 itkGetConstMacro(NumberOfPointPixelComponents,
unsigned int);
449 itkSetMacro(NumberOfCellPixelComponents,
unsigned int);
450 itkGetConstMacro(NumberOfCellPixelComponents,
unsigned int);
451 itkSetMacro(PointDimension,
unsigned int);
452 itkGetConstMacro(PointDimension,
unsigned int);
463 itkSetMacro(UpdatePoints,
bool);
464 itkGetConstMacro(UpdatePoints,
bool);
465 itkBooleanMacro(UpdatePoints);
466 itkSetMacro(UpdateCells,
bool);
467 itkGetConstMacro(UpdateCells,
bool);
468 itkBooleanMacro(UpdateCells);
469 itkSetMacro(UpdatePointData,
bool);
470 itkGetConstMacro(UpdatePointData,
bool);
471 itkBooleanMacro(UpdatePointData);
472 itkSetMacro(UpdateCellData,
bool);
473 itkGetConstMacro(UpdateCellData,
bool);
474 itkBooleanMacro(UpdateCellData);
534 itkSetMacro(UseCompression,
bool);
535 itkGetConstMacro(UseCompression,
bool);
536 itkBooleanMacro(UseCompression);
626 template <
typename T>
632 inputFile >> buffer[i];
638 template <
typename T>
642 inputFile.read(
reinterpret_cast<char *
>(buffer), numberOfComponents *
sizeof(T));
651 else if (
m_ByteOrder == IOByteOrderEnum::LittleEndian)
661 template <
typename T>
664 std::ofstream & outputFile,
680 template <
typename TOutput,
typename TInput>
684 if (
typeid(TInput) ==
typeid(TOutput))
696 outputFile.write(
reinterpret_cast<char *
>(buffer), numberOfComponents);
703 data[ii] =
static_cast<TOutput
>(buffer[ii]);
715 outputFile.write(
reinterpret_cast<char *
>(data.get()), numberOfComponents);
722 template <
typename TInput,
typename TOutput>
733 auto numberOfPoints =
static_cast<unsigned int>(input[inputIndex++]);
734 for (
unsigned int jj = 0; jj < numberOfPoints; ++jj)
736 output[outputIndex++] =
static_cast<TOutput
>(input[inputIndex++]);
746 template <
typename TInput,
typename TOutput>
759 auto nn =
static_cast<unsigned int>(input[inputIndex++]);
760 if (cellType == type)
762 output[outputIndex++] = nn;
763 for (
unsigned int jj = 0; jj < nn; ++jj)
765 output[outputIndex++] =
static_cast<TOutput
>(input[inputIndex++]);
778 template <
typename TInput,
typename TOutput>
783 unsigned int numberOfPoints,
792 output[outputIndex++] =
static_cast<TOutput
>(cellType);
793 output[outputIndex++] =
static_cast<TOutput
>(numberOfPoints);
794 for (
unsigned int jj = 0; jj < numberOfPoints; ++jj)
796 output[outputIndex++] =
static_cast<TOutput
>(input[inputIndex++]);
805 template <
typename TInput,
typename TOutput>
815 auto numberOfPoints =
static_cast<unsigned int>(input[inputIndex++]);
816 if (numberOfPoints > 2 && cellType == CellGeometryEnum::LINE_CELL)
818 output[outputIndex++] =
static_cast<TOutput
>(CellGeometryEnum::POLYLINE_CELL);
822 output[outputIndex++] =
static_cast<TOutput
>(cellType);
824 output[outputIndex++] =
static_cast<TOutput
>(numberOfPoints);
827 for (
unsigned int jj = 0; jj < numberOfPoints; ++jj)
829 output[outputIndex++] =
static_cast<TOutput
>(input[inputIndex++]);