32 #ifndef itkIPLCommonImageIO_h
33 #define itkIPLCommonImageIO_h
34 #include "ITKIOIPLExport.h"
61 using U8 =
unsigned char;
62 using S8 =
signed char;
63 using U16 =
unsigned short;
65 using U32 =
unsigned int;
87 CanReadFile(
const char * FileNameToRead)
override;
91 ReadImageInformation()
override;
100 Read(
void * buffer)
override;
106 GetComponentSize()
const override;
117 CanWriteFile(
const char * FileNameToWrite)
override;
121 WriteImageInformation()
override;
126 Write(
const void * buffer)
override;
130 SortImageListByNameAscend();
134 SortImageListByNameDescend();
140 PrintSelf(std::ostream & os,
Indent indent)
const override;
143 AddElementToList(
char const *
const filename,
144 const float sliceLocation,
154 sortImageListAscend();
157 sortImageListDescend();
160 statTimeToAscii(
void * clock,
char * timeString,
int len);
163 ReadHeader(
const char * FileNameToRead);
169 IPLFileNameList * m_FilenameList{};
173 GetStringAt(std::ifstream & f, std::streamoff
Offset,
char * buf,
size_t amount,
bool throw_exception =
true);
176 GetIntAt(std::ifstream & f, std::streamoff
Offset,
int * ip,
bool throw_exception =
true);
179 GetShortAt(std::ifstream & f, std::streamoff
Offset,
short * ip,
bool throw_exception =
true);
182 GetFloatAt(std::ifstream & f, std::streamoff
Offset,
float * ip,
bool throw_exception =
true);
185 GetDoubleAt(std::ifstream & f, std::streamoff
Offset,
double * ip,
bool throw_exception =
true);
188 hdr2Short(
char * hdr);
194 hdr2Float(
char * hdr);
197 hdr2Double(
char * hdr);
200 #define RAISE_EXCEPTION() \
202 ExceptionObject exception(__FILE__, __LINE__); \
203 exception.SetDescription("File cannot be read"); \
206 ITK_MACROEND_NOOP_STATEMENT
217 ITK_MACROEND_NOOP_STATEMENT
219 #endif // itkIPLCommonImageIO_h