22 #include "muParserDLL.h"
25 #include "muParserDLL.h"
54 DoNotChangeConfig = 0,
63 NumConfigurationAssignmentEnumModes
68 DoNotChangeProcSettings = 0,
77 NumProcSettingsAssignmentEnumModes
81 static const char *
const LabellingEnumStrings[NumLabellingEnumModes];
84 static const char *
const ConfigurationAssignmentEnumStrings[NumConfigurationAssignmentEnumModes];
87 static const char *
const ProcessingSettingsAssignmentEnumStrings[NumProcSettingsAssignmentEnumModes];
176 bool &expMatches)
const;
208 bool& expMatches)
const;
238 bool &expMatches)
const;
250 bool &expMatches)
const;
262 bool &expMatches)
const;
272 std::vector<DCMTree::Const_TagPtr>* foundTags)
const;
299 const std::string &privateCreatorStr,
300 std::vector<DCMTree::Const_TagPtr> *foundTags=
nullptr)
const;
305 std::vector<std::string> &foundValues)
const;
322 MLint tagValueFilterId,
323 const std::string &privateCreatorString,
324 MLint valueIndex)
const;
330 BoolField *_clearPassFlagBeforeFilteringFld;
348 EnumField *_processingSettingsAssignModeFld;
367 BoolField *_clearPassFlagOnPathMismatchesFld;
382 IntField *_tagStringFilterTagValueIndexFld;
389 BoolField *_checkOnlyFirstRecursiveTagStringFld;
398 BoolField *_setTagStrEvalPassFlagOnPathMatchesFld;
401 BoolField *_clearTagStrEvalPassFlagOnPathMismatchesFld;
412 muParserHandle_t _parser;
442 MLint _tagValueFilterId0;
443 MLint _tagValueFilterId1;
444 MLint _tagValueFilterId2;
445 MLint _tagValueFilterId3;
461 BoolField *_setPassFlagOnTagValueMatchesFld;
464 BoolField *_clearPassFlagOnTagValueMismatchesFld;
Field to encapsulate a boolean value.
Field to encapsulate a double value.
Field to encapsulate an enumerated value.
Base class for all fields used in the ML.
A base class for plugins which can be used by file list importers to filter and classify files.
A concrete module class for file and DCMTree filtering which can be used by FileList importers to fil...
ProcessingSettingsAssignmentEnumModes
Enumerator defining how processing settings are assigned to the file attribute structures.
@ SetProcSettingsIfPassFlagIsTrue
The processing settings are assigned if after filtering the pass flag is true or if it was already tr...
@ SetProcSettingsIfExpressionDoesNotMatch
The processing settings are assigned if any expression matches.
@ SetProcSettingsIfPassFlagIsFalse
The processing settings are assigned if after filtering the pass flag is false or if it was false bef...
@ SetProcSettingsIfExpressionMatches
The processing settings are assigned if any expression matches.
@ SetProcSettingsIfPassFlagIsSet
The processing settings are assigned if the pass flag is set to true (independent of its previous sta...
@ SetProcSettingsIfPassFlagIsUnchanged
The processing settings are assigned if the pass flag is neither set nor cleared by the filter.
@ SetProcSettingsIfPassFlagIsCleared
The processing settings are assigned if the pass flag is set to false (independent of its previous st...
DoubleField & getConst1Fld() const
virtual bool _handleNotificationForPathStringFiltering(Field *field)
Do the notification handling for path string filtering, return true if output notification is needed.
StringField & getTagId3Fld() const
virtual void filterFile(FileListTools::FileAttribute &filterAttributes, FilterMessageList *messageList) const override
Evaluates the regular expression given by field _pathFilterRegExFld on the filterAttributes....
DoubleField & getConst2Fld() const
StringField & getPathFilterRegExFld() const
BoolField & getCheckOnlyFirstRecursiveTagStringFld() const
ConfigurationAssignmentEnumModes
Enumerator defining how configurations are assigned to the file/DCMTree attribute structures.
@ SetConfigIfExpressionDoesNotMatch
The configuration is assigned if any expression matches.
@ SetConfigIfPassFlagIsUnchanged
The configuration is assigned if the pass flag is neither set nor cleared by the filter.
@ SetConfigIfPassFlagIsFalse
The configuration is assigned if after filtering the pass flag is false or if it was false before.
@ SetConfigIfPassFlagIsCleared
The configuration is assigned if the pass flag is set to false (independent of its previous state).
@ SetConfigIfExpressionMatches
The configuration is assigned if any expression matches.
@ SetConfigIfPassFlagIsSet
The configuration is assigned if the pass flag is set to true (independent of its previous state).
@ SetConfigIfPassFlagIsTrue
The configuration is assigned if after filtering the pass flag is true or if it was already true befo...
StringField & getTagId0PrivateCreatorFld() const
StringField & getTagStringEvalRegExFld() const
BoolField & getApplyFilePathFilterFld() const
IntField & getTagId2ValueIndexFld() const
virtual void _applyFilePathFiltering(FileListTools::FileAttribute &filterAttributes, FilterMessageList *messageList, bool &wasDisabled, bool &wasEnabled, bool &expMatches) const
Applies path filtering.
BoolField & getSetPassFlagOnPathMatchesFld() const
StringField & getTagStringFilterPrivateCreatorFld() const
IntField & getTagId1ValueIndexFld() const
StringField & getVolumeLabelFld() const
virtual void _applyTagStringFiltering(FileListTools::FileAttribute &filterAttributes, FilterMessageList *messageList, bool &wasDisabled, bool &wasEnabled, bool &expMatches, DCMTree::Const_TreePtr &dcmTree) const
Applies filtering of tag values as strings.
StringField & getVolumeConfigFld() const
DoubleField & getConst0Fld() const
StringField & getTreeFilterExFld() const
BoolField & getSetPassFlagOnTagValueMatchesFld() const
BoolField & getApplyTagStringFilterFld() const
IntField & getTagStringFilterTagValueIndexFld() const
BoolField & getClearPassFlagBeforeFilteringFld() const
Provide programming access to field interface, see corresponding member for documentation.
BoolField & getClearTagStrEvalPassFlagOnPathMismatchesFld() const
BoolField & getAllowRecursiveTagSearchFld() const
void handleNotification(Field *field) override
Handle field changes of the field field, typically of the input field where changes are passes as not...
DoubleField & getConst3Fld() const
double _getTagValueForTagValueFilter(DCMTree::Const_TreePtr dcmTree, MLint tagValueFilterId, const std::string &privateCreatorString, MLint valueIndex) const
Read tag tagValueFilterId from dcmTree, take its double value and return it.
void _updateFlagsAccordingToTagStringValues(const std::vector< std::string > &tagStringValues, bool &passFlag, bool &wasDisabled, bool &wasEnabled, bool &expMatches) const
Apply tag string expression on all values in tagStringValues and update the flags.
StringField & getTagStringFilterTagIdFld() const
StringField & getTagId1Fld() const
StringField & getTagFilterRegExStatusFld() const
IntField & getTagId0ValueIndexFld() const
StringField & getTagId2Fld() const
StringField & getProcessingSettingsFld() const
StringField & getTreeFilterStatusFld() const
virtual void _applyTagValueFiltering(FileListTools::FileAttribute &filterAttributes, FilterMessageList *messageList, bool &wasDisabled, bool &wasEnabled, bool &expMatches, DCMTree::Const_TreePtr dcmTree) const
Applies filtering of tag values as numeric values.
EnumField & getLabelAssignModeFld() const
virtual bool _handleNotificationForTagStringFiltering(Field *field)
Do the notification handling for tag string filtering, return true if output notification is needed.
DoubleField & getRangeMinFld() const
BoolField & getInvertTagStringEvalRegExFld() const
FileListFilterPlugin(int numIns=0, int numOuts=0)
Constructor. Input and out images are probably not used.
StringField & getTagId1PrivateCreatorFld() const
EnumField & getConfigAssignModeFld() const
IntField & getTagId3ValueIndexFld() const
BoolField & getSetTagStrEvalPassFlagOnPathMatchesFld() const
LabellingEnumModes
Enumerator defining how label values are assigned to the file/DCMTree attribute structures.
@ SetLabelIfExpressionDoesNotMatch
The label is assigned if any expression matches.
@ SetLabelIfExpressionMatches
The label is assigned if any expression matches.
@ SetLabelIfPassFlagIsTrue
The label is assigned if after filtering the pass flag is true or if it was already true before.
@ SetLabelIfPassFlagIsFalse
The label is assigned if after filtering the pass flag is false or if it was false before.
@ SetLabelIfPassFlagIsSet
The label is assigned if the pass flag is set to true (independent of its previous state).
@ SetLabelIfPassFlagIsCleared
The label is assigned if the pass flag is set to false (independent of its previous state).
@ SetLabelIfPassFlagIsUnchanged
The label is assigned if the pass flag is neither set nor cleared by the filter.
virtual bool _handleNotificationForTagValueFiltering(Field *field)
Do the notification handling for tag value filtering, return true if output notification is needed.
BoolField & getClearPassFlagOnTagValueMismatchesFld() const
virtual void _applyProcessingSettingsAssignment(FileListTools::FileAttribute &filterAttributes, FilterMessageList *messageList, bool &wasDisabled, bool &wasEnabled, bool &expMatches) const
Sets processing settings if parameters and filter results require that.
StringField & getTagId3PrivateCreatorFld() const
virtual void _applyConfigAssignment(FileListTools::FileAttribute &filterAttributes, FilterMessageList *messageList, bool &wasDisabled, bool &wasEnabled, bool &expMatches) const
Sets volume configuration if parameters and filter results require that.
~FileListFilterPlugin() override
Destructor.
StringField & getTagId0Fld() const
BoolField & getClearPassFlagOnPathMismatchesFld() const
BoolField & getApplyTagValueFilterFld() const
void _getTagStringValues(DCMTree::Const_TreePtr dcmTree, std::vector< std::string > &foundValues) const
Retrieves as many string values from dcmTree as possible and specified by _allowRecursiveTagSearchFld...
EnumField & getProcessingSettingsAssignModeFld() const
DoubleField & getRangeMaxFld() const
DCMTree::Const_TagPtr _getNormalOrPrivateTag(DCMTree::Const_TreePtr dcmTree, DCMTree::RawTagId rawTagId, const std::string &privateCreatorStr, std::vector< DCMTree::Const_TagPtr > *foundTags=nullptr) const
Function to get as many normal or private tag values from the given DCIOM tree dependent on whether t...
BoolField & getInvertPathFilterRegExFld() const
StringField & getTagId2PrivateCreatorFld() const
virtual void _applyLabelling(FileListTools::FileAttribute &filterAttributes, FilterMessageList *messageList, bool &wasDisabled, bool &wasEnabled, bool &expMatches) const
Sets volume label if parameters and filter results require that.
void activateAttachments() override
Update internal state after field reload or clone..
DCMTree::Const_TagPtr _searchOneOrMultipleTags(DCMTree::Const_TreePtr dcmTree, DCMTree::RawTagId rawTagId, std::vector< DCMTree::Const_TagPtr > *foundTags) const
Dependent on _allowRecursiveTagSearchFld and _checkOnlyFirstRecursiveTagStringFld one or multiple tag...
StringField & getRegExStatusFld() const
Field to encapsulate an integer value.
Field to encapsulate a string value.
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
A base class for plugins which can be used by file list importers to filter and classify files.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
boost::shared_ptr< const Tag > Const_TagPtr
boost::shared_ptr< const Tree > Const_TreePtr
FileListFilterPlugin DirectDicomImportImportFilterPlugin
For backward compatibility:
std::list< FilterMessage > FilterMessageList
List of messages which can occur during filter calls.