16 #if !defined(__mlKernelLineApplicatorBase_H)
17 #define __mlKernelLineApplicatorBase_H
29 #define ML_DEBUG_ENV_NAME "ML_KERNELLINEAPPLICATORBASE"
62 template <
typename DATATYPE,
typename KDATATYPE>
122 size_t )
override { _defineIndices(*inSubImg); };
142 virtual void _defineIndices(
const SubImage &inSubImg);
147 virtual void _clearIndices();
193 template <
typename DATATYPE,
typename KDATATYPE>
197 *
this=kernLineAppBase;
205 template <
typename DATATYPE,
typename KDATATYPE>
218 template <
typename DATATYPE,
typename KDATATYPE>
234 template <
typename DATATYPE,
typename KDATATYPE>
240 if (
this != &kernLineAppBase){
242 _kernel = kernLineAppBase.
_kernel;
248 _indexTab =
new MLsoffset[_indexTabSize];
251 ML_NO_MEMORY,
"Not enough memory. Cannot complete assignment operator correctly!");
255 if (_indexTab){ memcpy(_indexTab, kernLineAppBase.
_indexTab,
sizeof(
MLsoffset)*_indexTabSize); }
269 template <
typename DATATYPE,
typename KDATATYPE>
276 _indexTab = KernelTools::createIndexTab(inSubImg.
getStride(), *_kernel);
279 _srcVoxOffset = KernelTools::calcSrcVoxelOffset(inSubImg.
getStride(), _kernel->getNegativeExtent());
282 _indexTabSize = _kernel->getTabSize();
289 template <
typename DATATYPE,
typename KDATATYPE>
306 #undef ML_DEBUG_ENV_NAME
The KernelLineApplicatorBase class is designed to implement new kernel based filters to be applied to...
const TKernel< KDATATYPE > & getKernel() const
void applyToLine(TSubImageWithCursor< DATATYPE > *inSubImg, TSubImageWithCursor< DATATYPE > *, size_t) override
Applies the kernel to a row of the input subimage.
~KernelLineApplicatorBase() override
Destructor. Frees dynamic members.
ImageVector getNegativeExtent() const override
Returns the negative extent of a kernel used for filtering.
KernelLineApplicatorBase()
Default constructor.
MLsoffset _srcVoxOffset
Offset from origin of kernel in input image to the voxel under the replaced voxel in output image.
size_t _indexTabSize
Size of _indexTab. Default is 0.
const TKernel< KDATATYPE > * _kernel
Pointer to the kernel used to filter an input page.
ImageVector getPositiveExtent() const override
Returns the positive extent of a kernel used for filtering.
void setKernel(const TKernel< KDATATYPE > &kernel)
MLsoffset * _indexTab
Table and variables defined temporarily while filtering a page.
The LineApplicator class provides pure virtual functions used by the old applyFiltering functions fro...
This class manages/represents a rectangular 6D image region that is organized linearly in memory.
ImageVector getStride() const
Returns a stride vector to address the memory efficiently.
Class to manage a filtering kernel for images.
A class that offers a TSubImage with a TSubImageCursor.
#define ML_NO_MEMORY
The system does not have enough memory to perform the desired operation; try to reduce application da...
#define ML_PRINT_FATAL_ERROR(FUNC_NAME, REASON, HANDLING)
Like ML_PRINT_FATAL_ERROR_DUMP(FUNC_NAME, REASON, HANDLING, RT_OBJ) without a runtime object to be du...
MLint MLsoffset
Signed ML offset type that is a 32-bit signed integer on 32-bit platforms and a 64-bit integer on 64-...
TImageVector< MLint > ImageVector
Defines the standard ImageVector type that is used by the ML for indexing and coordinates.