189 bool _shouldBaseParameterFieldTriggerUpdate(
Field *
field)
const;
190 bool _isAutomaticallyUpdating();
191 bool _isAutomaticallyClearing();
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
Field to encapsulate a pointer to an ML base object.
Field to encapsulate a boolean value.
The CSOGenerator is the base class for all modules that generate CSOs, be it automatically or interac...
Base class for performing modifications on the CSOs of a CSOList.
virtual void clearOutput()
Clears all outputs (used by auto clear mode)
BoolField * _changeSettingsForModifiedCSOsFld
Shall the module's user settings be used for modified CSOs?
virtual void _applyModificatorOnCSOs(const std::vector< CSO * > &csosToBeProcessed)
may be overwritten by subclasses if, for example, CSOs should be processed in parallel
virtual void _setupCSOList()
Sets the _outCSOList correctly.
virtual void _applyModificator()
Applies the modification to the CSOs of the attached list.
std::vector< CSO * > _getModifyCSOsFromIdList()
virtual std::vector< CSO * > getCSOsToBeProcessed(const std::vector< CSO * > &csosFromIdList)
may be overwritten to filter out CSOs that are processed by this modificator, by default returns the ...
StringField * _csoIdListFld
The list of ids of the CSOs to be transformed; if this list is empty, all CSOs are transformed.
virtual bool canProcessInput()
returns whether the current input can be processed, i.e.
virtual void _notifyObservers(bool didSomething)
Notifies other modules that processing has finished.
void _storeCurrentStateInUndoManager(std::vector< CSO * > csosToBeProcessed)
virtual void _onCSOIdListChanged()
virtual void _applyModificatorOn(CSO &outputCSO)
may be overwritten by subclasses if CSOs are processed one by one
bool _outCSOListChanged
Flag that indicates that _outCSOList has been changed and thus that _outputCSOListFld has to be updat...
virtual void resetParsedIds()
Resets parameteres of the modificator.
bool _isWorkingDirectlyOnInputCSOList
Flag that indicates whether this module should work on its input CSO list directly.
virtual bool shouldTriggerParameterApplied(Field *field) const
This method exists only for legacy reasons and shoult not be overwritten when writing new CSOModifica...
void _applyChangedSettings(CSO &cso) const
Changes the settings of the given CSO (only if _changeSettingsForModifiedCSOsFld is true).
virtual void _updateCSOType(CSO &outputCSO)
Updates the CSO's type. Most modules change the type to the modificators name, but not all do it.
BoolField * _listenToFinishingNotificationsFld
Shall the module listen to finishing events?
bool _isInIdList(CSO *cso)
Checks if the given CSO is in the list of IDs given by _csoIdListFld.
BoolField * _listenToSelectionNotificationsFld
Shall the module listen to selection change notifications?
bool _parsedIDsValid
Flag that indicates if _parsedIDs is valid.
virtual void _onWorkDirectlyOnInputChanged()
bool _isNotifyingMyself
Is this module notifying itself? Locking variable to avoid infinite loops.
virtual void process()
Sets up the CSOList, applies the modificator to the CSOList and notifies other modules that processin...
virtual bool shouldUseUndoRedo() const
Whether undo/Redo should be used.
CSOModificator(const std::string &type="CSOModificator", int numInImages=0, int numOutImages=0)
Standard constructor.
virtual void _onInputChanged()
helper functions called by handleNotification, may be overwritten in very special cases
virtual void _onParameterApplied()
ML_ABSTRACT_MODULE_CLASS_HEADER(CSOModificator)
bool _isOutputCSOListOwner
Flag that indicates whether this module is the owner of the output CSO list.
std::set< unsigned int > _parsedIDs
The IDs of the CSOs that should be processed according to the _csoIdListFld.
CSOListPtr _inCSOList
A pointer to the input CSOList.
void activateAttachments() override
Initialize module after loading.
bool _isChangeSettingField(Field *field) const
BaseField * _inputCSOListFld
The input CSOList.
static void _csoListNotifyObserverCB(void *userData, int notificationFlag)
Can be called from anywhere from the network.
BoolField * _workDirectlyOnInputListFld
Shall the module work directly on the input CSOList? Otherwise, it would work on a copy which is retu...
void _parseCSOIds(std::set< unsigned int > &ids)
Parse the CSO id field into the given vector of ids.
BoolField * _useUndoRedoFld
Shall undo/redo be used? The value is ignored if workDirectlyOnInputList is disabled.
void handleNotification(Field *field) override
Called when input changes.
BaseField * _outputCSOListFld
The filtered output CSOList.
CSOListPtr _outCSOList
A pointer to the output CSOList.
~CSOModificator() override
Standard destructor.
virtual bool shouldTriggerInputChanged(Field *field) const
returns whether a field notification triggers auto update.
bool _isInNotificationCB
Locking variable for removing/adding a notification observer.
The CSO represents a contour segmentation object.
Base class for all fields used in the ML.
Field to encapsulate a string value.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.