28 #ifndef itkIPLFileNameList_h
29 #define itkIPLFileNameList_h
30 #include "ITKIOIPLExport.h"
40 #define IPLSetMacroDeclaration(name, type) virtual void Set##name(const type _arg);
43 #define IPLSetMacroDefinition(class, name, type) \
44 void class ::Set##name(const type _arg) \
47 CLANG_SUPPRESS_Wfloat_equal if (this->m_##name != _arg) CLANG_PRAGMA_POP { this->m_##name = _arg; } \
51 #define IPLGetMacroDeclaration(name, type) virtual type Get##name();
54 #define IPLGetMacroDefinition(class, name, type) \
55 type class ::Get##name() { return this->m_##name; }
76 IPLFileSortInfo(
const char *
const filename,
81 void * data =
nullptr)
83 m_ImageFileName = filename;
84 m_SliceLocation = sliceLocation;
85 m_SliceOffset = sliceOffset;
86 m_EchoNumber = echoNumber;
87 m_ImageNumber = imageNumber;
91 virtual ~IPLFileSortInfo();
107 std::string m_ImageFileName;
108 float m_SliceLocation;
120 class ITKIOIPL_EXPORT IPLFileNameList
123 using ListType = std::vector<IPLFileSortInfo *>;
124 using IteratorType = ListType::iterator;
125 using ListSizeType = size_t;
129 SortGlobalAscend = 0,
130 SortGlobalDescend = 1,
131 SortByNameAscend = 2,
132 SortByNameDescend = 3
146 m_SortOrder = SortGlobalAscend;
149 virtual ~IPLFileNameList();
154 return m_List.begin();
163 IPLFileSortInfo * operator[](
unsigned int __n)
168 for (
unsigned int i = 0; it != itend && i != __n; it++, i++)
181 return m_List.size();
185 AddElementToList(
char const *
const filename,
186 const float sliceLocation,
192 const int imageNumber,
205 else if (XDim != m_XDim || YDim != m_YDim)
213 else if (Key1 != m_Key1 || Key2 != m_Key2)
221 if (std::string(filename) == (*it)->GetImageFileName())
227 m_List.push_back(
new IPLFileSortInfo(filename,
236 RemoveElementFromList(
const int ElementToRemove)
238 auto it = m_List.begin();
239 auto itend = m_List.end();
242 for (i = 0; it != itend; i++, it++)
244 if (i != ElementToRemove)
260 sortImageListAscend();
263 sortImageListDescend();
266 GetnumImageInfoStructs()
const
268 return m_List.size();