32 #ifndef itkIPLCommonImageIO_h
33 #define itkIPLCommonImageIO_h
34 #include "ITKIOIPLExport.h"
60 using U8 =
unsigned char;
61 using S8 =
signed char;
62 using U16 =
unsigned short;
63 using S16 =
signed short;
64 using U32 =
unsigned int;
65 using S32 =
signed int;
85 bool CanReadFile(
const char *FileNameToRead)
override;
88 void ReadImageInformation()
override;
94 void Read(
void *buffer)
override;
99 unsigned int GetComponentSize()
const override;
109 bool CanWriteFile(
const char *FileNameToWrite)
override;
112 void WriteImageInformation()
override;
116 void Write(
const void *buffer)
override;
119 virtual void SortImageListByNameAscend();
122 virtual void SortImageListByNameDescend();
127 void PrintSelf(std::ostream & os,
Indent indent)
const override;
129 int AddElementToList(
char const *
const filename,
130 const float sliceLocation,
139 void sortImageListAscend();
141 void sortImageListDescend();
143 int statTimeToAscii(
void *clock,
char *timeString,
int len);
145 virtual GEImageHeader * ReadHeader(
const char *FileNameToRead);
154 int GetStringAt(std::ifstream & f, std::streamoff
Offset,
char *buf,
155 size_t amount,
bool throw_exception =
true);
157 int GetIntAt(std::ifstream & f, std::streamoff
Offset,
int *ip,
158 bool throw_exception =
true);
160 int GetShortAt(std::ifstream & f, std::streamoff
Offset,
short *ip,
161 bool throw_exception =
true);
163 int GetFloatAt(std::ifstream & f, std::streamoff
Offset,
float *ip,
164 bool throw_exception =
true);
166 int GetDoubleAt(std::ifstream & f, std::streamoff
Offset,
double *ip,
167 bool throw_exception =
true);
169 short hdr2Short(
char *hdr);
171 int hdr2Int(
char *hdr);
173 float hdr2Float(
char *hdr);
175 double hdr2Double(
char *hdr);
178 #define RAISE_EXCEPTION() \
179 { ExceptionObject exception(__FILE__, __LINE__); \
180 exception.SetDescription("File cannot be read"); \
193 #endif // itkIPLCommonImageIO_h
Light weight base class for most itk classes.
Abstract superclass defines image IO interface.
IPLFileNameList * m_FilenameList
Class that defines how to read GE4 file format.
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image...
ImageIOBase::ByteOrder m_SystemByteOrder
Control indentation during Print() invocation.
GEImageHeader * m_ImageHeader
virtual void ModifyImageInformation()
Base class for most ITK classes.