21 #if !defined(__mlKernelModule_H)
22 #define __mlKernelModule_H
379 bool createToggle=
false,
bool useIt=
false);
396 bool createToggle=
false,
bool useIt=
false);
816 bool _autoMinMaxValid;
822 bool _normImageInterval;
825 bool _normKernelInterval;
Field to encapsulate a boolean value.
Field to encapsulate a double value.
Base class for all fields used in the ML.
Field to encapsulate an integer value.
The module base class to apply kernels to an image.
The typically used convenience class to apply a kernel to an image.
BoolField * getUseImageIntervalFld() const
A field enabling the usage of the _imageIntervalMinFld and _imageIntervalMaxFld if true.
DoubleField * getKernelIntervalMinFld() const
virtual void _createExternalKernelFields(bool createUseToggle=false, bool defaultVal=false)
Creates a kernel input field and an information field.
void calcOutSubImagePostProcessing(SubImage *outSubImg, int outIndex, SubImage *inSubImgs) override
Called to postProcess the output image outSubImg with the index outIndex from the input subimage inIm...
virtual void _updateKernel()
Convenience routine to call the typically used _updateKernel() functionality, e.g.
void handleNotification(Field *field) override
Called when any parameter field is changed.
BoolField * getUseKernelIntervalFld() const
A field enabling the usage of the _kernelIntervalMinFld and _kernelIntervalMaxFld if true.
StringField * getKernelOutputFld() const
A field containing the current kernel.
DoubleField * getImageIntervalMinFld() const
virtual void _createKernelElementsSumField()
Creates an information field which will contain the sum of all kernel elements.
virtual void _userKernelPostUpdate()
Typical method to be overloaded by derived modules to apply kernel changes.
IntField * getNumKernelElementsFld() const
If created this field contains the number of voxels in the kernel.
virtual void _createKernelInfoField()
Creates an information field about the current kernel and its creation process.
virtual void _createKernelOutputField()
Creates a kernel output field.
BoolField * getAutoCalcMinMaxFld() const
BoolField * getMakeSphericalFld() const
Controls whether kernel is circular or rectangular (in 6D).
IntField * getKernelUFld() const
U extent of kernel. The field name will be "kernelU". Field default is 1 if created.
IntField * getKernelZFld() const
Z extent of kernel. The field name will be "kernelZ". Field default is 1 if created.
void _setKernelInterval(MLdouble minVal=-DBL_MAX, MLdouble maxVal=DBL_MAX)
Update private test members for fast kernel testings.
NotifyField * getSetAutoMinMaxFld() const
Field which assigns the current settings of automatically determined minimum/maximum values of alread...
bool _isInImageInterval(MLdouble v) const
Test whether the value v is within image interval.
virtual void _createMinMaxFields(MLdouble minVal=0, MLdouble maxVal=0, bool defaultValue=false)
Creates a minimum and a maximum field containing minimum/maximum values for the output image.
virtual void _createNormalizeField(bool defaultVal=false)
Creates a bool field which enables/disables the automatic normalization of the kernel after each chan...
BoolField * getUseExternalKernelFld() const
A field enabling the usage of the _externalKernelFld if true.
KernelModule(int inputNum=1, int outputNum=1)
Constructor.
void _setImageInterval(MLdouble minVal=-DBL_MAX, MLdouble maxVal=DBL_MAX)
Update private test members for fast image interval testings.
void calculateOutputImageProperties(int outputIndex, PagedImage *outputImage) override
Computes the output image properties for output outIndex.
StringField * getExternalKernelFld() const
DoubleField * getOutputMinFld() const
IntField * getKernelCFld() const
C extent of kernel. The field name will be "kernelC". Field default is 1 if created.
virtual void _createMakeSphericalField(bool defaultVal=false)
Creates a bool field which enables/disables the usage of a connected kernel.
IntField * getKernelYFld() const
Y extent of kernel. The field name will be "kernelY". Field default is 3 if created.
BoolField * getUseMinMaxFld() const
If enabled then contents of _outputMinFld and _outputMaxFld will be used as minimum and maximum value...
virtual void _createNumKernelElementsField()
Creates an information field which will contain the number of kernel elements.
virtual void _validateKernelExtents()
Checks all existing kernel extent fields and corrects all to values >= 0 if necessary.
void activateAttachments() override
Called when field loading or module cloning has finished.
virtual void _createKernelExtentFields(int numDim=6, const ImageVector &defaultExt=ImageVector(3, 3, 1, 1, 1, 1))
Creates the fields _kernelXFld, ...
virtual void _createImageIntervalFields(MLdouble min=0, MLdouble max=1024, bool createToggle=false, bool useIt=false)
Creates two limit fields to specify an interval and - if createToggle is passed as true - a toggle to...
virtual void _updateKernel(bool permitExtentChanges)
This is the method to update the kernel, it should be called if the kernel requires an update,...
virtual void _updateKernelOutputField()
Updates the kernel output to the value of the kernel if the _kernelOutputFld is defined.
virtual void _userKernelPreUpdate()
Typical method to be overloaded by derived modules to apply kernel changes.
virtual std::string _composeKernelInfo(bool valid=true) const
Create a string containing all important kernel information.
IntField * getKernelXFld() const
X extent of kernel. The field name will be "kernelX". Field default is 3 if created.
IntField * getKernelTFld() const
T extent of kernel. The field name will be "kernelT". Field default is 1 if created.
DoubleField * getKernelElementsSumFld() const
If created this methods returns the pointer to the field containing the sum of all kernel elements,...
DoubleField * getOutputMaxFld() const
The maximum value used for the output image if _useAutoMinMax is on.
virtual void _createKernelIntervalFields(MLdouble min=0, MLdouble max=1024, bool createToggle=false, bool useIt=false)
Creates two limit fields to specify an interval and - if createToggle is passed as true - a toggle to...
DoubleField * getKernelIntervalMaxFld() const
A field containing the maximum limit of an interval specifying the values of voxels under kernel elem...
virtual void _createMinMaxCalcFields(bool defaultValue=false, bool createSetOutputMinMax=false)
Creates a toggle field which enables the scan of calculated output pages for min/max values if enable...
DoubleField * getImageIntervalMaxFld() const
A field containing the maximum limit of an interval specifying the values of voxels to be filtered.
bool _isInKernelInterval(MLdouble v) const
Test whether the value v is within kernel interval.
BoolField * getNormalizeFld() const
StringField * getKernelInfoFld() const
Field without value for notifications.
The class PagedImage, representing a fragmented image that manages properties and data of an image lo...
Field to encapsulate a string value.
This class manages/represents a rectangular 6D image region that is organized linearly in memory.
#define ML_ABSTRACT_MODULE_CLASS_HEADER(className)
Similar to ML_ABSTRACT_CLASS_HEADER for the usage of derived classes from Module.
#define MLKERNELEXPORT
Includes files used in many parts of the dll, defined dll-specific macros and controls any system dep...
TImageVector< MLint > ImageVector
Defines the standard ImageVector type that is used by the ML for indexing and coordinates.