78#define ML_ITK_WRAPPER_0_2D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
79 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_0, \
80 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0, \
81 ML_IMPLEMENT_ALL_ITK_2D_CASES, _ML_ITK_DETERMINE_OUT_REGION_0)
84#define ML_ITK_WRAPPER_1_2D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
85 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_N, \
86 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_1, \
87 ML_IMPLEMENT_ALL_ITK_2D_CASES, _ML_ITK_DETERMINE_OUT_REGION_N)
90#define ML_ITK_WRAPPER_2_2D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
91 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_N, \
92 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_2, \
93 ML_IMPLEMENT_ALL_ITK_2D_CASES, _ML_ITK_DETERMINE_OUT_REGION_N)
96#define ML_ITK_WRAPPER_3_2D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
97 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_N, \
98 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_3, \
99 ML_IMPLEMENT_ALL_ITK_2D_CASES, _ML_ITK_DETERMINE_OUT_REGION_N)
107#define ML_ITK_WRAPPER_0_3D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
108 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_0, \
109 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0, \
110 ML_IMPLEMENT_ALL_ITK_3D_CASES, _ML_ITK_DETERMINE_OUT_REGION_0)
113#define ML_ITK_WRAPPER_1_3D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
114 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_N, \
115 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_1, \
116 ML_IMPLEMENT_ALL_ITK_3D_CASES, _ML_ITK_DETERMINE_OUT_REGION_N)
119#define ML_ITK_WRAPPER_2_3D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
120 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_N, \
121 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_2, \
122 ML_IMPLEMENT_ALL_ITK_3D_CASES, _ML_ITK_DETERMINE_OUT_REGION_N)
125#define ML_ITK_WRAPPER_3_3D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
126 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_N, \
127 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_3, \
128 ML_IMPLEMENT_ALL_ITK_3D_CASES, _ML_ITK_DETERMINE_OUT_REGION_N)
136#define ML_ITK_WRAPPER_0_2D3D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
137 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_0, \
138 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0, \
139 ML_IMPLEMENT_ALL_ITK_2D3D_CASES, _ML_ITK_DETERMINE_OUT_REGION_0)
142#define ML_ITK_WRAPPER_1_2D3D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
143 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_N, \
144 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_1, \
145 ML_IMPLEMENT_ALL_ITK_2D3D_CASES, _ML_ITK_DETERMINE_OUT_REGION_N)
148#define ML_ITK_WRAPPER_2_2D3D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
149 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_N, \
150 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_2, \
151 ML_IMPLEMENT_ALL_ITK_2D3D_CASES, _ML_ITK_DETERMINE_OUT_REGION_N)
154#define ML_ITK_WRAPPER_3_2D3D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
155 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_N, \
156 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_3, \
157 ML_IMPLEMENT_ALL_ITK_2D3D_CASES, _ML_ITK_DETERMINE_OUT_REGION_N)
164#define ML_ITK_WRAPPER_0_6D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
165 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_0, \
166 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_0, \
167 ML_IMPLEMENT_ALL_ITK_6D_CASES, _ML_ITK_DETERMINE_OUT_REGION_0)
170#define ML_ITK_WRAPPER_1_6D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
171 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_N, \
172 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_1, \
173 ML_IMPLEMENT_ALL_ITK_6D_CASES, _ML_ITK_DETERMINE_OUT_REGION_N)
176#define ML_ITK_WRAPPER_2_6D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
177 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_N, \
178 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_2, \
179 ML_IMPLEMENT_ALL_ITK_6D_CASES, _ML_ITK_DETERMINE_OUT_REGION_N)
182#define ML_ITK_WRAPPER_3_6D(PROJECT_PREFIX, CLASS_NAME, NAMESPACE) \
183 _ML_ITK_WRAPPER(PROJECT_PREFIX, CLASS_NAME, NAMESPACE, _ML_ITK_DETERMINE_IN_REGION_N, \
184 ML_ITK_DEFAULT_WRAPPER_TYPEDEFS_3, \
185 ML_IMPLEMENT_ALL_ITK_6D_CASES, _ML_ITK_DETERMINE_OUT_REGION_N)
216template <
typename FILTER_TYPE>
245#define IMPLEMENT_ITK_INTERFACE_H(CLASS_NAME) \
251 void calculateOutputSubImage(SubImage *outSubImg, int outIndex, SubImage *inSubImgs) override;\
255 TypedObjectHolderBase *_itkObj; \
258 MLint _m_Dimension; \
261 MLDataType _m_PixelType; \
265 ImageVector _m_Shift[5]; \
269 bool _isValidFilter(){ return _itkObj && _itkObj->voidFilterPtr(); } \
273 void _createITKFilter(MLDataType dataType, MLint dim); \
276 void _destroyITKFilter(); \
279 SubImageBox _determineInRegion(MLint inIndex, const SubImageBox &outBox, MLint outIndex, MLint numActiveInputs); \
283 SubImageBox _getOutImageRegion(int numImageInputs); \
286 MLErrorCode _setFilterParameters(); \
289 MLErrorCode _getFilterParameters(); \
Base class for all derived classes containing an itk object type pointer and some of its basic inform...
void * voidFilterPtr()
Access method to access the filter as a void pointer.
virtual ~TypedObjectHolderBase()
Virtual destructor implicitly destroying the typed object in the derived class.
TypedObjectHolderBase()
Constructor for the itk object's base information.
Typed version of a mini class containing an itkObject smart pointer.
TypedObjectHolderT()
Construction and storing of the itk object managed by the smart pointer.
ItkObjPtrType _typedFilterSmartPtr
The typed version of the itk object as smart pointer.
FILTER_TYPE::Pointer ItkObjPtrType
The type of the pointer to the itk object.
ItkObjPtrType ptr()
Returns the smart pointer to the itk object.
MLint32 MLErrorCode
Type of an ML Error code.
#define ML_PRINT_ERROR(FUNC_NAME, REASON, HANDLING)
Like ML_PRINT_ERROR_DUMP(FUNC_NAME, REASON, HANDLING, RT_OBJ) without a runtime object to be dumped.
void ML_ITK_ML_PRINT_ERROR(const std::string &className, MLErrorCode errCode, std::string reason, const std::string &strParam1="", MLint intParam1=-965386, const std::string &strParam2="", MLint intParam2=-965386, const std::string &strParam3="", MLint intParam3=-965386, const std::string &strParam4="", MLint intParam4=-965386)
Include most ml specific things.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...