ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkImageIOBase.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * https://www.apache.org/licenses/LICENSE-2.0.txt
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 *
17 *=========================================================================*/
18#ifndef itkImageIOBase_h
19#define itkImageIOBase_h
20#include "ITKIOImageBaseExport.h"
21
22#include "itkIOConfigure.h"
23
25#include "itkIndent.h"
26#include "itkImageIORegion.h"
27#include "itkRGBPixel.h"
28#include "itkRGBAPixel.h"
29#include "itkCovariantVector.h"
32#include "itkArray.h"
35#include "itkCommonEnums.h"
36
37#include "vnl/vnl_vector.h"
38#include "vcl_compiler.h"
39
40#include <fstream>
41#include <string>
42
43namespace itk
44{
45// Forward reference for VariableLengthVector
46template <typename TValue>
48
77class ITKIOImageBase_EXPORT ImageIOBase : public LightProcessObject
78{
79public:
80 ITK_DISALLOW_COPY_AND_MOVE(ImageIOBase);
81
87
89 itkOverrideGetNameOfClassMacro(ImageIOBase);
90
93 itkSetStringMacro(FileName);
94 itkGetStringMacro(FileName);
96
100
107 {};
108
109#if !defined(ITK_LEGACY_REMOVE)
111 using IOPixelType = IOPixelEnum;
112 static constexpr IOPixelEnum UNKNOWNPIXELTYPE = IOPixelEnum::UNKNOWNPIXELTYPE;
113 static constexpr IOPixelEnum SCALAR = IOPixelEnum::SCALAR;
114 static constexpr IOPixelEnum RGB = IOPixelEnum::RGB;
115 static constexpr IOPixelEnum RGBA = IOPixelEnum::RGBA;
116 static constexpr IOPixelEnum OFFSET = IOPixelEnum::OFFSET;
117 static constexpr IOPixelEnum VECTOR = IOPixelEnum::VECTOR;
118 static constexpr IOPixelEnum POINT = IOPixelEnum::POINT;
119 static constexpr IOPixelEnum COVARIANTVECTOR = IOPixelEnum::COVARIANTVECTOR;
120 static constexpr IOPixelEnum SYMMETRICSECONDRANKTENSOR = IOPixelEnum::SYMMETRICSECONDRANKTENSOR;
121 static constexpr IOPixelEnum DIFFUSIONTENSOR3D = IOPixelEnum::DIFFUSIONTENSOR3D;
122 static constexpr IOPixelEnum COMPLEX = IOPixelEnum::COMPLEX;
123 static constexpr IOPixelEnum FIXEDARRAY = IOPixelEnum::FIXEDARRAY;
124 static constexpr IOPixelEnum MATRIX = IOPixelEnum::MATRIX;
125#endif
126
128#if !defined(ITK_LEGACY_REMOVE)
130 using IOComponentType = IOComponentEnum;
131 static constexpr IOComponentEnum UNKNOWNCOMPONENTTYPE = IOComponentEnum::UNKNOWNCOMPONENTTYPE;
132 static constexpr IOComponentEnum UCHAR = IOComponentEnum::UCHAR;
133 static constexpr IOComponentEnum CHAR = IOComponentEnum::CHAR;
134 static constexpr IOComponentEnum USHORT = IOComponentEnum::USHORT;
135 static constexpr IOComponentEnum SHORT = IOComponentEnum::SHORT;
136 static constexpr IOComponentEnum UINT = IOComponentEnum::UINT;
137 static constexpr IOComponentEnum INT = IOComponentEnum::INT;
138 static constexpr IOComponentEnum ULONG = IOComponentEnum::ULONG;
139 static constexpr IOComponentEnum LONG = IOComponentEnum::LONG;
140 static constexpr IOComponentEnum ULONGLONG = IOComponentEnum::ULONGLONG;
141 static constexpr IOComponentEnum LONGLONG = IOComponentEnum::LONGLONG;
142 static constexpr IOComponentEnum FLOAT = IOComponentEnum::FLOAT;
143 static constexpr IOComponentEnum DOUBLE = IOComponentEnum::DOUBLE;
144#endif
145
147#if !defined(ITK_LEGACY_REMOVE)
149 static constexpr IOFileEnum ASCII = IOFileEnum::ASCII;
150 static constexpr IOFileEnum Binary = IOFileEnum::Binary;
151 static constexpr IOFileEnum TypeNotApplicable = IOFileEnum::TypeNotApplicable;
152#endif
153
155#if !defined(ITK_LEGACY_REMOVE)
156 using ByteOrder = itk::IOByteOrderEnum;
158 static constexpr IOByteOrderEnum BigEndian = IOByteOrderEnum::BigEndian;
159 static constexpr IOByteOrderEnum LittleEndian = IOByteOrderEnum::LittleEndian;
160 static constexpr IOByteOrderEnum OrderNotApplicable = IOByteOrderEnum::OrderNotApplicable;
161#endif
162
166 void
168
169 itkGetConstMacro(NumberOfDimensions, unsigned int);
170
175 virtual void
176 SetDimensions(unsigned int i, SizeValueType dim);
177 virtual SizeValueType
178
179 GetDimensions(unsigned int i) const
180 {
181 return m_Dimensions[i];
182 }
183
184
187 virtual void
188 SetOrigin(unsigned int i, double origin);
189
190 virtual double
191 GetOrigin(unsigned int i) const
192 {
193 return m_Origin[i];
194 }
195
198 virtual void
199 SetSpacing(unsigned int i, double spacing);
200
201 virtual double
202 GetSpacing(unsigned int i) const
203 {
204 return m_Spacing[i];
205 }
206
209 virtual void
210 SetDirection(unsigned int i, const std::vector<double> & direction);
211
212 virtual void
213 SetDirection(unsigned int i, const vnl_vector<double> & direction);
214
215 virtual std::vector<double>
216 GetDirection(unsigned int i) const
217 {
218 return m_Direction[i];
219 }
220
223 virtual std::vector<double>
224 GetDefaultDirection(unsigned int k) const;
225
233 itkSetMacro(IORegion, ImageIORegion);
234 itkGetConstReferenceMacro(IORegion, ImageIORegion);
236
243 itkSetEnumMacro(PixelType, itk::CommonEnums::IOPixel);
244 itkGetEnumMacro(PixelType, itk::CommonEnums::IOPixel);
246
249 itkSetEnumMacro(ComponentType, IOComponentEnum);
250 itkGetEnumMacro(ComponentType, IOComponentEnum);
251
257 virtual const std::type_info &
259
265 itkSetMacro(NumberOfComponents, unsigned int);
266 itkGetConstReferenceMacro(NumberOfComponents, unsigned int);
268
271 itkSetMacro(UseCompression, bool);
272 itkGetConstMacro(UseCompression, bool);
273 itkBooleanMacro(UseCompression);
275
282 itkSetClampMacro(CompressionLevel, int, 1, this->GetMaximumCompressionLevel());
283 itkGetConstMacro(CompressionLevel, int);
284
295 virtual void
296 SetCompressor(std::string _c);
297 itkGetConstReferenceMacro(Compressor, std::string);
298
301 itkSetMacro(UseStreamedReading, bool);
302 itkGetConstMacro(UseStreamedReading, bool);
303 itkBooleanMacro(UseStreamedReading);
305
308 itkSetMacro(UseStreamedWriting, bool);
309 itkGetConstMacro(UseStreamedWriting, bool);
310 itkBooleanMacro(UseStreamedWriting);
312
318 itkSetMacro(ExpandRGBPalette, bool);
319 itkGetConstMacro(ExpandRGBPalette, bool);
320 itkBooleanMacro(ExpandRGBPalette);
322
326 itkSetMacro(WritePalette, bool);
327 itkGetConstMacro(WritePalette, bool);
328 itkBooleanMacro(WritePalette);
330
335 itkGetConstMacro(IsReadAsScalarPlusPalette, bool);
336
340
342 static IOComponentEnum
343 GetComponentTypeFromString(const std::string & typeString);
344
348
350 static IOPixelEnum
351 GetPixelTypeFromString(const std::string & pixelString);
352
356 itkSetEnumMacro(FileType, IOFileEnum);
357 itkGetEnumMacro(FileType, IOFileEnum);
358 void
360 {
361 this->SetFileType(IOFileEnum::ASCII);
362 }
363
364
365 void
367 {
368 this->SetFileType(IOFileEnum::Binary);
369 }
370
383 itkSetEnumMacro(ByteOrder, IOByteOrderEnum);
384 itkGetEnumMacro(ByteOrder, IOByteOrderEnum);
385 void
387 {
388 this->SetByteOrder(IOByteOrderEnum::BigEndian);
389 }
390
391
392 void
394 {
395 this->SetByteOrder(IOByteOrderEnum::LittleEndian);
396 }
397
400 std::string GetFileTypeAsString(IOFileEnum) const;
401
405
407 using SizeType = itk::intmax_t;
408
412
419 virtual SizeType
421
425
429
434
439 virtual unsigned int
441
442 /*-------- This part of the interfaces deals with reading data ----- */
443
446 virtual bool
447 CanReadFile(const char *) = 0;
448
453 virtual bool
455 {
456 return false;
457 }
458
461 virtual void
463
465 virtual void
466 Read(void * buffer) = 0;
467
468 /*-------- This part of the interfaces deals with writing data ----- */
469
472 virtual bool
473 CanWriteFile(const char *) = 0;
474
481 virtual bool
483 {
484 return false;
485 }
486
489 virtual void
491
495 virtual void
496 Write(const void * buffer) = 0;
497
498 /* --- Support reading and writing data as a series of files. --- */
499
505 virtual bool
506 SupportsDimension(unsigned long dim)
507 {
508 return (dim == 2);
509 }
510
522 virtual ImageIORegion
524
539 virtual unsigned int
540 GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits,
541 const ImageIORegion & pasteRegion,
542 const ImageIORegion & largestPossibleRegion);
543
550 virtual ImageIORegion
551 GetSplitRegionForWriting(unsigned int ithPiece,
552 unsigned int numberOfActualSplits,
553 const ImageIORegion & pasteRegion,
554 const ImageIORegion & largestPossibleRegion);
555
557 using ArrayOfExtensionsType = std::vector<std::string>;
558
565
572
573 template <typename TPixel>
574 void
575 SetTypeInfo(const TPixel *);
576
579 template <typename TPixel>
581 {
582 static constexpr IOComponentEnum CType = IOComponentEnum::UNKNOWNCOMPONENTTYPE;
583 };
584 template <typename TPixel>
585 void
586 SetPixelTypeInfo(const TPixel *)
587 {
588 this->SetNumberOfComponents(1);
589 this->SetPixelType(IOPixelEnum::SCALAR);
591 }
592 template <typename TPixel>
593 void
595 {
596 this->SetNumberOfComponents(3);
597 this->SetPixelType(IOPixelEnum::RGB);
599 }
600 template <typename TPixel>
601 void
603 {
604 this->SetNumberOfComponents(4);
605 this->SetPixelType(IOPixelEnum::RGBA);
607 }
608 template <unsigned int VLength>
609 void
611 {
612 this->SetNumberOfComponents(VLength);
613 this->SetPixelType(IOPixelEnum::OFFSET);
614 this->SetComponentType(IOComponentEnum::LONG);
615 }
616 template <typename TPixel, unsigned int VLength>
617 void
619 {
620 this->SetNumberOfComponents(VLength);
621 this->SetPixelType(IOPixelEnum::VECTOR);
623 }
624 template <typename TCoordinate, unsigned int VPointDimension>
625 void
627 {
628 this->SetNumberOfComponents(VPointDimension);
629 this->SetPixelType(IOPixelEnum::POINT);
631 }
632 template <typename TPixel, unsigned int VLength>
633 void
635 {
636 this->SetNumberOfComponents(VLength);
637 this->SetPixelType(IOPixelEnum::COVARIANTVECTOR);
639 }
640 template <typename TPixel, unsigned int VLength>
641 void
643 {
644 this->SetNumberOfComponents(VLength * (VLength + 1) / 2);
645 this->SetPixelType(IOPixelEnum::SYMMETRICSECONDRANKTENSOR);
647 }
648 template <typename TPixel>
649 void
651 {
652 this->SetNumberOfComponents(6);
653 this->SetPixelType(IOPixelEnum::DIFFUSIONTENSOR3D);
655 }
656 template <typename TPixel>
657 void
658 SetPixelTypeInfo(const std::complex<TPixel> *)
659 {
660 this->SetNumberOfComponents(2);
661 this->SetPixelType(IOPixelEnum::COMPLEX);
663 }
664 template <typename TPixel, unsigned int VLength>
665 void
667 {
668 this->SetNumberOfComponents(VLength);
669 this->SetPixelType(IOPixelEnum::FIXEDARRAY);
671 }
672 template <typename TPixel>
673 void
675 {
676 this->SetNumberOfComponents(1);
677 this->SetPixelType(IOPixelEnum::VARIABLELENGTHVECTOR);
679 }
680 template <typename TValue>
681 void
683 {
684 this->SetNumberOfComponents(1);
685 this->SetPixelType(IOPixelEnum::ARRAY);
687 }
688 template <typename TPixel, unsigned int VLength>
689 void
691 {
692 this->SetNumberOfComponents(VLength * VLength);
693 this->SetPixelType(IOPixelEnum::MATRIX);
695 }
696 template <typename TValue>
697 void
699 {
700 this->SetNumberOfComponents(1);
701 this->SetPixelType(IOPixelEnum::VARIABLESIZEMATRIX);
703 }
704
705
706protected:
708 ~ImageIOBase() override;
709 void
710 PrintSelf(std::ostream & os, Indent indent) const override;
711
712 virtual const ImageRegionSplitterBase *
714
720 virtual bool
721 HasSupportedReadExtension(const char * fileName, bool ignoreCase = true);
722 virtual bool
723 HasSupportedWriteExtension(const char * fileName, bool ignoreCase = true);
725
727 IOPixelEnum m_PixelType{ IOPixelEnum::SCALAR };
728
731 IOComponentEnum m_ComponentType{ IOComponentEnum::UNKNOWNCOMPONENTTYPE };
732
734 IOByteOrderEnum m_ByteOrder{ IOByteOrderEnum::OrderNotApplicable };
735
736 IOFileEnum m_FileType{ IOFileEnum::TypeNotApplicable };
737
740
742 std::string m_FileName{};
743
746 unsigned int m_NumberOfComponents{};
747
749 unsigned int m_NumberOfDimensions{ 0 };
750
752 bool m_UseCompression{ false };
753
754
757 std::string m_Compressor{ "uninitialized" };
758
761 virtual void
763 itkGetConstMacro(MaximumCompressionLevel, int);
765
769 virtual void
770 InternalSetCompressor(const std::string & _compressor);
771
774
777
780
784
787
791
793 std::vector<SizeValueType> m_Dimensions{};
794
797 std::vector<double> m_Spacing{};
798
800 std::vector<double> m_Origin{};
801
803 std::vector<std::vector<double>> m_Direction{};
804
807 std::vector<SizeType> m_Strides{};
808
810 virtual void
811 Reset(const bool freeDynamic = true);
812
814 void
815 Resize(const unsigned int numDimensions, const unsigned int * dimensions);
816
819 virtual unsigned int
821
828 void
830
835
840
845
857 virtual void
858 OpenFileForReading(std::ifstream & inputStream, const std::string & filename, bool ascii = false);
859
875 virtual void
876 OpenFileForWriting(std::ofstream & outputStream,
877 const std::string & filename,
878 bool truncate = true,
879 bool ascii = false);
880
882 virtual void
883 WriteBufferAsASCII(std::ostream & os, const void * buffer, IOComponentEnum ctype, SizeType numComp);
884
886 virtual void
887 ReadBufferAsASCII(std::istream & is, void * buffer, IOComponentEnum ctype, SizeType numComp);
888
890 bool
891 ReadBufferAsBinary(std::istream & is, void * buffer, SizeType num);
892
894 void
895 AddSupportedReadExtension(const char * extension);
896
898 void
899 AddSupportedWriteExtension(const char * extension);
900
901
902 void
904 void
906
909 virtual unsigned int
910 GetActualNumberOfSplitsForWritingCanStreamWrite(unsigned int numberOfRequestedSplits,
911 const ImageIORegion & pasteRegion) const;
912
915 virtual ImageIORegion
917 unsigned int numberOfActualSplits,
918 const ImageIORegion & pasteRegion) const;
919
920private:
921 bool
922 HasSupportedExtension(const char *, const ArrayOfExtensionsType &, bool ignoreCase = true);
923
926};
927
929extern ITKIOImageBase_EXPORT void
931 const void * buffer,
932 std::ofstream & file,
933 IOByteOrderEnum byteOrder,
934 SizeValueType numberOfBytes,
935 SizeValueType numberOfComponents);
936
938extern ITKIOImageBase_EXPORT void
940 void * buffer,
941 IOByteOrderEnum byteOrder,
942 SizeValueType numberOfComponents);
943
944#define IMAGEIOBASE_TYPEMAP(type, ctype) \
945 template <> \
946 struct ImageIOBase::MapPixelType<type> \
947 { \
948 static constexpr IOComponentEnum CType = ctype; \
949 }
950
951// the following typemaps are not platform independent
952IMAGEIOBASE_TYPEMAP(signed char, IOComponentEnum::CHAR);
953IMAGEIOBASE_TYPEMAP(char, std::numeric_limits<char>::is_signed ? IOComponentEnum::CHAR : IOComponentEnum::UCHAR);
954IMAGEIOBASE_TYPEMAP(unsigned char, IOComponentEnum::UCHAR);
955IMAGEIOBASE_TYPEMAP(short, IOComponentEnum::SHORT);
956IMAGEIOBASE_TYPEMAP(unsigned short, IOComponentEnum::USHORT);
957IMAGEIOBASE_TYPEMAP(int, IOComponentEnum::INT);
958IMAGEIOBASE_TYPEMAP(unsigned int, IOComponentEnum::UINT);
959IMAGEIOBASE_TYPEMAP(long, IOComponentEnum::LONG);
960IMAGEIOBASE_TYPEMAP(unsigned long, IOComponentEnum::ULONG);
961IMAGEIOBASE_TYPEMAP(long long, IOComponentEnum::LONGLONG);
962IMAGEIOBASE_TYPEMAP(unsigned long long, IOComponentEnum::ULONGLONG);
963IMAGEIOBASE_TYPEMAP(float, IOComponentEnum::FLOAT);
964IMAGEIOBASE_TYPEMAP(double, IOComponentEnum::DOUBLE);
965#undef IMAGIOBASE_TYPEMAP
966
967} // end namespace itk
968
969#endif // itkImageIOBase_h
Array class with size defined at construction time.
Definition itkArray.h:48
A templated class holding a n-Dimensional covariant vector.
Represent a diffusion tensor as used in DTI images.
Simulate a standard C array with copy semantics.
virtual unsigned int GetActualNumberOfSplitsForWriting(unsigned int numberOfRequestedSplits, const ImageIORegion &pasteRegion, const ImageIORegion &largestPossibleRegion)
void SetPixelTypeInfo(const VariableSizeMatrix< TValue > *)
virtual double GetOrigin(unsigned int i) const
~ImageIOBase() override
virtual ImageIORegion GetSplitRegionForWriting(unsigned int ithPiece, unsigned int numberOfActualSplits, const ImageIORegion &pasteRegion, const ImageIORegion &largestPossibleRegion)
void SetPixelTypeInfo(const Matrix< TPixel, VLength, VLength > *)
std::vector< std::vector< double > > m_Direction
virtual void InternalSetCompressor(const std::string &_compressor)
bool ReadBufferAsBinary(std::istream &is, void *buffer, SizeType num)
virtual void Reset(const bool freeDynamic=true)
void AddSupportedReadExtension(const char *extension)
virtual double GetSpacing(unsigned int i) const
void SetPixelTypeInfo(const DiffusionTensor3D< TPixel > *)
SmartPointer< const Self > ConstPointer
void SetByteOrderToBigEndian()
virtual void SetOrigin(unsigned int i, double origin)
std::vector< SizeValueType > m_Dimensions
itk::intmax_t SizeType
void SetPixelTypeInfo(const CovariantVector< TPixel, VLength > *)
virtual void OpenFileForWriting(std::ofstream &outputStream, const std::string &filename, bool truncate=true, bool ascii=false)
Opens a file for writing and random access.
virtual bool CanReadFile(const char *)=0
IOByteOrderEnum m_ByteOrder
virtual void SetNumberOfComponents(unsigned int _arg)
virtual void ReadBufferAsASCII(std::istream &is, void *buffer, IOComponentEnum ctype, SizeType numComp)
virtual bool HasSupportedWriteExtension(const char *fileName, bool ignoreCase=true)
void SetPixelTypeInfo(const FixedArray< TPixel, VLength > *)
virtual std::vector< double > GetDirection(unsigned int i) const
std::vector< double > m_Spacing
virtual unsigned int GetPixelSize() const
SizeType GetRowStride() const
virtual void SetComponentType(const IOComponentEnum _arg)
IOComponentEnum m_ComponentType
std::vector< double > m_Origin
virtual ImageIORegion GetSplitRegionForWritingCanStreamWrite(unsigned int ithPiece, unsigned int numberOfActualSplits, const ImageIORegion &pasteRegion) const
void SetPixelTypeInfo(const SymmetricSecondRankTensor< TPixel, VLength > *)
SizeType GetImageSizeInComponents() const
virtual void WriteBufferAsASCII(std::ostream &os, const void *buffer, IOComponentEnum ctype, SizeType numComp)
virtual void SetDirection(unsigned int i, const std::vector< double > &direction)
void SetSupportedReadExtensions(const ArrayOfExtensionsType &)
virtual void SetMaximumCompressionLevel(int)
std::string m_FileName
virtual unsigned int GetComponentSize() const
SizeType GetComponentStride() const
ArrayOfExtensionsType m_SupportedWriteExtensions
unsigned int m_NumberOfComponents
std::string GetByteOrderAsString(IOByteOrderEnum) const
virtual const ImageRegionSplitterBase * GetImageRegionSplitter() const
SizeType GetImageSizeInBytes() const
void SetTypeInfo(const TPixel *)
virtual bool SupportsDimension(unsigned long dim)
ArrayOfExtensionsType m_SupportedReadExtensions
virtual bool HasSupportedReadExtension(const char *fileName, bool ignoreCase=true)
virtual unsigned int GetActualNumberOfSplitsForWritingCanStreamWrite(unsigned int numberOfRequestedSplits, const ImageIORegion &pasteRegion) const
virtual void SetCompressor(std::string _c)
Set/Get the compression algorithm to use.
const ArrayOfExtensionsType & GetSupportedReadExtensions() const
virtual bool CanStreamWrite()
static IOComponentEnum GetComponentTypeFromString(const std::string &typeString)
SmartPointer< Self > Pointer
bool HasSupportedExtension(const char *, const ArrayOfExtensionsType &, bool ignoreCase=true)
static IOPixelEnum GetPixelTypeFromString(const std::string &pixelString)
void SetPixelTypeInfo(const Vector< TPixel, VLength > *)
void SetPixelTypeInfo(const Offset< VLength > *)
void SetPixelTypeInfo(const Array< TValue > *)
virtual void SetByteOrder(const IOByteOrderEnum _arg)
virtual bool CanWriteFile(const char *)=0
virtual void Write(const void *buffer)=0
virtual void SetDirection(unsigned int i, const vnl_vector< double > &direction)
virtual ImageIORegion GenerateStreamableReadRegionFromRequestedRegion(const ImageIORegion &requested) const
void SetPixelTypeInfo(const RGBPixel< TPixel > *)
itk::IOByteOrderEnum IOByteOrderEnum
void SetPixelTypeInfo(const std::complex< TPixel > *)
void SetByteOrderToLittleEndian()
void SetSupportedWriteExtensions(const ArrayOfExtensionsType &)
virtual SizeValueType GetDimensions(unsigned int i) const
const ArrayOfExtensionsType & GetSupportedWriteExtensions() const
SizeType GetImageSizeInPixels() const
void Resize(const unsigned int numDimensions, const unsigned int *dimensions)
std::string GetFileTypeAsString(IOFileEnum) const
itk::OffsetValueType BufferSizeType
virtual void WriteImageInformation()=0
itk::IOComponentEnum IOComponentEnum
IOPixelEnum m_PixelType
static std::string GetComponentTypeAsString(IOComponentEnum)
virtual void SetFileType(const IOFileEnum _arg)
std::vector< SizeType > m_Strides
LightProcessObject Superclass
static std::string GetPixelTypeAsString(IOPixelEnum)
unsigned int m_NumberOfDimensions
virtual void SetDimensions(unsigned int i, SizeValueType dim)
virtual void SetSpacing(unsigned int i, double spacing)
void SetPixelTypeInfo(const RGBAPixel< TPixel > *)
void SetPixelTypeInfo(const TPixel *)
ImageIORegion m_IORegion
virtual void SetPixelType(const itk::CommonEnums::IOPixel _arg)
void SetNumberOfDimensions(unsigned int)
itk::SizeValueType SizeValueType
virtual bool CanStreamRead()
void AddSupportedWriteExtension(const char *extension)
virtual void ReadImageInformation()=0
std::vector< std::string > ArrayOfExtensionsType
virtual std::vector< double > GetDefaultDirection(unsigned int k) const
IOFileEnum m_FileType
virtual void Read(void *buffer)=0
void SetPixelTypeInfo(const VariableLengthVector< TPixel > *)
std::string m_Compressor
virtual void OpenFileForReading(std::ifstream &inputStream, const std::string &filename, bool ascii=false)
Opens a file for reading and random access.
itk::IOFileEnum IOFileEnum
virtual int GetMaximumCompressionLevel() const
virtual SizeType GetPixelStride() const
itk::IndexValueType IndexValueType
void PrintSelf(std::ostream &os, Indent indent) const override
virtual const std::type_info & GetComponentTypeInfo() const
SizeType GetSliceStride() const
void SetPixelTypeInfo(const Point< TCoordinate, VPointDimension > *)
An ImageIORegion represents a structured region of data.
Divide an image region into several pieces.
Control indentation during Print() invocation.
Definition itkIndent.h:50
A templated class holding a M x N size Matrix.
Definition itkMatrix.h:53
A templated class holding a geometric point in n-Dimensional space.
Definition itkPoint.h:54
Represent Red, Green, Blue and Alpha components for color images.
Represent Red, Green and Blue components for color images.
Definition itkRGBPixel.h:59
Implements transparent reference counting.
Represent a symmetric tensor of second rank.
A templated class holding a M x N size Matrix.
A templated class holding a n-Dimensional vector.
Definition itkVector.h:63
#define IMAGEIOBASE_TYPEMAP(type, ctype)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
CommonEnums::IOComponent IOComponentEnum
unsigned long SizeValueType
Definition itkIntTypes.h:86
long OffsetValueType
Definition itkIntTypes.h:97
CommonEnums::IOFile IOFileEnum
CommonEnums::IOByteOrder IOByteOrderEnum
ITKIOImageBase_EXPORT void WriteRawBytesAfterSwapping(IOComponentEnum componentType, const void *buffer, std::ofstream &file, IOByteOrderEnum byteOrder, SizeValueType numberOfBytes, SizeValueType numberOfComponents)
CommonEnums::IOPixel IOPixelEnum
long IndexValueType
Definition itkIntTypes.h:93
ITKIOImageBase_EXPORT void ReadRawBytesAfterSwapping(IOComponentEnum componentType, void *buffer, IOByteOrderEnum byteOrder, SizeValueType numberOfComponents)
static constexpr IOComponentEnum CType
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image.
Definition itkOffset.h:67