32 #ifndef __itkIPLCommonImageIO_h
33 #define __itkIPLCommonImageIO_h
34 #include "ITKIOIPLExport.h"
58 typedef unsigned char U8;
59 typedef signed char S8;
60 typedef unsigned short U16;
61 typedef signed short S16;
62 typedef unsigned int U32;
63 typedef signed int S32;
83 virtual bool CanReadFile(
const char *FileNameToRead) ITK_OVERRIDE;
86 virtual void ReadImageInformation() ITK_OVERRIDE;
89 virtual
void ModifyImageInformation() {}
92 virtual void Read(
void *buffer) ITK_OVERRIDE;
97 virtual unsigned int GetComponentSize() const ITK_OVERRIDE;
107 virtual
bool CanWriteFile(const
char *FileNameToWrite) ITK_OVERRIDE;
110 virtual
void WriteImageInformation() ITK_OVERRIDE;
114 virtual
void Write(const
void *buffer) ITK_OVERRIDE;
117 virtual
void SortImageListByNameAscend();
120 virtual
void SortImageListByNameDescend();
125 virtual
void PrintSelf(std::ostream & os,
Indent indent) const ITK_OVERRIDE;
127 int AddElementToList(
char const *const filename,
128 const
float sliceLocation,
137 void sortImageListAscend();
139 void sortImageListDescend();
141 int statTimeToAscii(
void *clock,
char *timeString,
int len);
143 virtual
GEImageHeader * ReadHeader(const
char *FileNameToRead);
149 IPLFileNameList *m_FilenameList;
152 int GetStringAt(std::ifstream & f, std::streamoff
Offset,
char *buf,
153 size_t amount,
bool throw_exception = true);
155 int GetIntAt(std::ifstream & f, std::streamoff Offset,
int *ip,
156 bool throw_exception = true);
158 int GetShortAt(std::ifstream & f, std::streamoff Offset,
short *ip,
159 bool throw_exception = true);
161 int GetFloatAt(std::ifstream & f, std::streamoff Offset,
float *ip,
162 bool throw_exception = true);
164 int GetDoubleAt(std::ifstream & f, std::streamoff Offset,
double *ip,
165 bool throw_exception = true);
167 short hdr2Short(
char *hdr);
169 int hdr2Int(
char *hdr);
171 float hdr2Float(
char *hdr);
173 double hdr2Double(
char *hdr);
176 IPLCommonImageIO(const
Self &);
177 void operator=(const Self &);
180 #define RAISE_EXCEPTION() \
181 { ExceptionObject exception(__FILE__, __LINE__); \
182 exception.SetDescription("File cannot be read"); \
195 #endif // __itkAnalyzeImageIO_h
SmartPointer< Self > Pointer
Light weight base class for most itk classes.
Represent the offset between two n-dimensional indexes in a n-dimensional image.
Abstract superclass defines image IO interface.
typedef::itksysFundamentalType_Int64 int64_t
Class that defines how to read GE4 file format.
typedef::itksysFundamentalType_UInt64 uint64_t
Control indentation during Print() invocation.
Base class for most ITK classes.