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;
126 Write(
const void * buffer)
override;
144 const float sliceLocation,
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);
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
void WriteImageInformation() override
short hdr2Short(char *hdr)
int statTimeToAscii(void *clock, char *timeString, int len)
void Read(void *buffer) override
IOByteOrderEnum m_SystemByteOrder
void sortImageListAscend()
int GetShortAt(std::ifstream &f, std::streamoff Offset, short *ip, bool throw_exception=true)
GEImageHeader * m_ImageHeader
float hdr2Float(char *hdr)
bool CanWriteFile(const char *FileNameToWrite) override
void PrintSelf(std::ostream &os, Indent indent) const override
int GetIntAt(std::ifstream &f, std::streamoff Offset, int *ip, bool throw_exception=true)
virtual void SortImageListByNameAscend()
void sortImageListDescend()
virtual GEImageHeader * ReadHeader(const char *FileNameToRead)
double hdr2Double(char *hdr)
int GetStringAt(std::ifstream &f, std::streamoff Offset, char *buf, vcl_size_t amount, bool throw_exception=true)
IPLFileNameList * m_FilenameList
bool CanReadFile(const char *FileNameToRead) override
void Write(const void *buffer) override
unsigned int GetComponentSize() const override
virtual void ModifyImageInformation()
virtual void SortImageListByNameDescend()
int GetFloatAt(std::ifstream &f, std::streamoff Offset, float *ip, bool throw_exception=true)
void ReadImageInformation() override
SmartPointer< Self > Pointer
~IPLCommonImageIO() override
int AddElementToList(const char *const filename, const float sliceLocation, const int offset, const int XDim, const int YDim, const float XRes, const float YRes, const int Key1, const int Key2)
int GetDoubleAt(std::ifstream &f, std::streamoff Offset, double *ip, bool throw_exception=true)
itk::IOByteOrderEnum IOByteOrderEnum
Control indentation during Print() invocation.
Implements transparent reference counting.
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....
Represent a n-dimensional offset between two n-dimensional indexes of n-dimensional image.