17#if !defined(__mlKernelTools_H)
18#define __mlKernelTools_H
110 size_t numVox)
const override
135 return (v >= minVal) && (v <= maxVal);
138 return (v < maxVal) || (v > minVal);
143template <
typename DATATYPE>
148template <
typename DATATYPE>
159template <
typename IN_DATATYPE,
typename OUT_DATATYPE>
191template <
typename IN_DATATYPE,
typename OUT_DATATYPE,
typename K_DATATYPE>
236template <
typename IN_DATATYPE,
typename OUT_DATATYPE,
typename K_DATATYPE>
243 const bool normal = minVal <= maxVal;
299template <
typename IN_DATATYPE,
typename OUT_DATATYPE,
typename K_DATATYPE>
306 const bool normal = minVal <= maxVal;
374template <
typename IN_DATATYPE,
typename OUT_DATATYPE,
typename K_DATATYPE>
455template <
typename IN_DATATYPE,
typename OUT_DATATYPE,
typename K_DATATYPE>
666 static const char*
const BorderHandlingNames[];
783 template <
typename IN_DATATYPE,
typename OUT_DATATYPE>
790 template <
typename IN_DATATYPE,
typename OUT_DATATYPE,
typename K_DATATYPE>
798 template <
typename IN_DATATYPE,
typename OUT_DATATYPE,
typename K_DATATYPE>
808 template <
typename IN_DATATYPE,
typename OUT_DATATYPE,
typename K_DATATYPE>
818 template <
typename IN_DATATYPE,
typename OUT_DATATYPE,
typename K_DATATYPE>
static void
830 template <
typename IN_DATATYPE,
typename OUT_DATATYPE,
typename K_DATATYPE>
843 template <
typename DATATYPE>
852 template <
typename DATATYPE>
886template <
typename DATATYPE>
910template <
typename DATATYPE>
938 for (p.u =
ov1.u; p.u <=
ov2.u; p.u++) {
939 for (p.t =
ov1.t; p.t <=
ov2.t; p.t++) {
940 for (p.c =
ov1.c; p.c <=
ov2.c; p.c++) {
941 for (p.z =
ov1.z; p.z <=
ov2.z; p.z++) {
943 for (p.y =
ov1.y; p.y <=
ov2.y; p.y++) {
The LineApplicator class provides pure virtual functions used by the old applyFiltering functions fro...
virtual ImageVector getNegativeExtent() const
Returns the negative extent of a kernel used for filtering.
The class PagedImage, representing a fragmented image that manages properties and data of an image lo...
This class manages/represents a rectangular 6D image region that is organized linearly in memory.
const SubImageBox & getBox() const
Returns the box describing the origin/extent of the subimage.
void set(const ComponentType v=0)
Sets all components to v or - if v is not specified - to 0.
static TSubImageBox< intT > intersect(const TSubImageBox< intT > &box1, const TSubImageBox< intT > &box2)
Returns the overlapping region of subimage regions box1 and box2.
A class that offers a TSubImage with a TSubImageCursor.
void setCursorImagePosition(const ImageVector &position)
Sets the cursor to the given 6D position relative to the origin of the complete image region.
bool MLValueIs0WOM(MLint8 a)
Returns true if value is 0; otherwise, it returns false.
#define MLKERNELEXPORT
Includes files used in many parts of the dll, defined dll-specific macros and controls any system dep...
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
MLint MLsoffset
Signed ML offset type that is a 32-bit signed integer on 32-bit platforms and a 64-bit integer on 64-...
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
static void MLKernelToolsCorrelateLineWithImageAndKernelInterval(const IN_DATATYPE *inCursor, OUT_DATATYPE *outCursor, size_t numVox, const K_DATATYPE *valTab, const MLsoffset *indexTab, size_t indexTabSize, MLsoffset srcVoxelOffset, MLdouble imgIntMinVal, MLdouble imgIntMaxVal, MLdouble kernIntMinVal, MLdouble kernIntMaxVal)
Correlate all voxels of the a row pointed to by inCursor with the current kernel and write the result...
static bool isScalarValueInRange(const DATATYPE &v, bool normal, double minVal, double maxVal)
static void MLKernelToolsCorrelateLineEvtWithIntervals(const IN_DATATYPE *inCursor, OUT_DATATYPE *outCursor, size_t numVox, const K_DATATYPE *valTab, const MLsoffset *indexTab, size_t indexTabSize, MLsoffset srcVoxelOffset, MLdouble imgIntMinVal, MLdouble imgIntMaxVal, MLdouble kernIntMinVal, MLdouble kernIntMaxVal, bool useImgInt, bool useKernInt)
Correlate all voxels of the a row pointed to by inCursor with the current kernel and write the result...
static void MLKernelToolsCopyLine(const IN_DATATYPE *inCursor, OUT_DATATYPE *outCursor, size_t numVox, MLsoffset srcVoxelOffset)
Copy the line from input subimage which corresponds to the line to be modified in the output image.
static void MLKernelToolsApplyFiltering(const ImageVector &inImgExt, LineApplicator< DATATYPE > &lineApp, KernelTools::BorderHandling borderHandling, MLdouble fillValue, TSubImageWithCursor< DATATYPE > &outSubImg, TSubImageWithCursor< DATATYPE > &inSubImg)
Global template functions for page filtering.
static void MLKernelToolsCorrelateLineWithKernelInterval(const IN_DATATYPE *inCursor, OUT_DATATYPE *outCursor, size_t numVox, const K_DATATYPE *valTab, const MLsoffset *indexTab, size_t indexTabSize, MLsoffset srcVoxelOffset, MLdouble minVal, MLdouble maxVal)
Correlate all voxels of the a row pointed to by inCursor with the current kernel and write the result...
static void MLKernelToolsCorrelateLineWithImageInterval(const IN_DATATYPE *inCursor, OUT_DATATYPE *outCursor, size_t numVox, const K_DATATYPE *valTab, const MLsoffset *indexTab, size_t indexTabSize, MLsoffset srcVoxelOffset, MLdouble minVal, MLdouble maxVal)
Correlate all voxels of the a row pointed to by inCursor with the current kernel and write the result...
static bool _isScalarValueInRange(const DATATYPE &v, bool normal, double minVal, double maxVal, OverloadSelector::OnTrue)
Global static template functions for line filtering.
static void MLKernelToolsCorrelateLine(const IN_DATATYPE *inCursor, OUT_DATATYPE *outCursor, size_t numVox, const K_DATATYPE *valTab, const MLsoffset *indexTab, size_t indexTabSize)
Correlate all voxels of the a row pointed to by inCursor with the current kernel and write the result...
Helper types to switch between implementations of functions by overloading.
The basic implementation of a filter to filter an image row with kernel operations.
virtual void operator()(TSubImageWithCursor< DATATYPE > *, TSubImageWithCursor< DATATYPE > *, size_t) const
This operator does the work of a fctLineFilter.
virtual ~fctLineFilter()
Virtual destructor to avoid warnings. Currently it does nothing.
Wrapper for the use of object bound row filters.
T * pOb
Pointer to store the pointer to the class type object passed to the explicit useObjectLineFilter as p...
~useObjectLineFilter() override
Virtual destructor to avoid warnings. Currently it does nothing.
void operator()(TSubImageWithCursor< DATATYPE > *inSubImg, TSubImageWithCursor< DATATYPE > *outSubImg, size_t numVox) const override
This operator is calling the filtering method pLF of the object pOb.
useObjectLineFilter(T *po, void(T::*pf)(TSubImageWithCursor< DATATYPE > *, TSubImageWithCursor< DATATYPE > *, size_t))
Constructor.