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 ITK_GCC_SUPPRESS_Wfloat_equal \
48 if (this->m_##name != _arg) \
50 this->m_##name = _arg; \
56#define IPLGetMacroDeclaration(name, type) virtual type Get##name();
59#define IPLGetMacroDefinition(class, name, type) \
60 type class ::Get##name() { return this->m_##name; }
81 IPLFileSortInfo(
const char *
const filename,
86 void * data =
nullptr)
88 m_ImageFileName = filename;
89 m_SliceLocation = sliceLocation;
90 m_SliceOffset = sliceOffset;
91 m_EchoNumber = echoNumber;
92 m_ImageNumber = imageNumber;
96 virtual ~IPLFileSortInfo();
112 std::string m_ImageFileName{};
113 float m_SliceLocation{};
117 const void * m_Data{};
125class ITKIOIPL_EXPORT IPLFileNameList
128 using ListType = std::vector<IPLFileSortInfo *>;
129 using IteratorType = ListType::iterator;
130 using ListSizeType = size_t;
134 SortGlobalAscend = 0,
135 SortGlobalDescend = 1,
136 SortByNameAscend = 2,
137 SortByNameDescend = 3
151 m_SortOrder = SortGlobalAscend;
154 virtual ~IPLFileNameList();
159 return m_List.begin();
168 IPLFileSortInfo * operator[](
unsigned int __n)
173 for (
unsigned int i = 0; it != itend && i != __n; it++, i++)
186 return m_List.size();
190 AddElementToList(
char const *
const filename,
191 const float sliceLocation,
197 const int imageNumber,
210 else if (XDim != m_XDim || YDim != m_YDim)
218 else if (Key1 != m_Key1 || Key2 != m_Key2)
226 if (std::string(filename) == (*it)->GetImageFileName())
232 m_List.push_back(
new IPLFileSortInfo(filename,
241 RemoveElementFromList(
const int ElementToRemove)
243 auto it = m_List.begin();
244 auto itend = m_List.end();
247 for (i = 0; it != itend; i++, it++)
249 if (i != ElementToRemove)
265 sortImageListAscend();
268 sortImageListDescend();
271 GetnumImageInfoStructs()
const
273 return m_List.size();
#define IPLSetMacroDeclaration(name, type)
#define IPLGetMacroDeclaration(name, type)
bool NotAlmostEquals(T1 x1, T2 x2)
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....