CSOFilter

MLModule
genre CSOModule
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLCSOModules
definition MLCSOModules.def
see also CSOManager
keywords contour, group, attributes, subset, info, query

Purpose

The module CSOFilter filters an input CSOList by some criteria and generates a filtered copy as an output list.

Usage

Adjust the filter criteria to your needs and either perform the filtering manually or let the filtering be performed at certain notifications.

Details

The module offers two ways of adjusting filtering criteria:

  1. A list of identifiers for either CSOs or CSOGroups can be entered manually or automatically,
  2. CSOs can be filtered that meets certain conditions like they are selected or should be voxelized (CSOVoxelizeContours and CSOGenerateSmoothSurfaceFromSparseContours).

Note that the module fills in the lists of identifiers itself if the second way of setting up the filtering constraints is chosen.

The resulting CSOList can contain both, CSOs and CSOGroups, regardless if only CSO identifiers or only CSOGroup identifiers are provided. If a CSO is identified and copied to the output, its embracing CSOGroup is copied as well. And if a certain CSOGroup is identified, then all its contained CSOs are copied to the output list, too.

Providing a list of identifier string

If a list of identifiers, separated by spaces, is provided, either by filling the CSO input or the CSOGroup input string, the intended meaning of these strings can also be adjusted. For CSOs, the list of strings can be interpreted as being a list of ids, labels, descriptions, substrings of labels, substrings of descriptions, timepoints or types, subtypes or creator ids (all set by the processors and generators). For CSOGroups, only ids, labels, descriptions, substrings of labels and substrings of descriptions are available.

Using substrings plays the role of using wild cards, i.e. if there are three CSOGroups with the labels tumor1, tumor2 and liver, and the input list for CSOGroups contains only tumor and the strings are evaluated as being substrings of labels, the first two groups are identified, while giving just an r with the same settings, all the groups are identified.

The module offers the possibility to choose between including and excluding the identified objects. If an input CSOList consists of three CSOs with the ids 1,2 and 3, and the CSO identifier string is filled with only a 1 (and the string is evaluated as a list of identifiers), a setting to include would result in an output CSOList consisting of only the CSO with the id 1, while a setting to exclude would result in a CSOList containing all the CSOs with ids not being 1, i.e. of the CSOs with ids 2 and 3.

For enhancing the lucidity, the ids of all output CSOs and CSOGroups are provided on the modul’s GUI.

The fields for the string lists for CSOs or CSOGroups can be filled with all existing ids by pressing an according button on the GUI. Note that the module does not automatically set the evaluation mode to ids. The lists of strings can also be cleared by pressing a button on the GUI.

Using the automatic filter mechanism

Here, four filtering options are available: All Selected, All Voxelize, All Shown and All Editable. All of those allude to CSOs, not to CSOGroups. If a notification is registered in the network, and at least one of the four options is checked, the output list is filtered by the adjusted options. Note that the automatic filling is internally evaluated after the manual set lists, so the manual entries are eventually replaced by entries generated on base of the automatic filling.

Actions

The filtered CSOs can be modified after being copied.

Note that all the filtered CSOs will be changed in the same way, so for example, if the setting of the color green to CSOs is enabled, all the resulting CSOs that are filtered will be rendered in a green color.

Tips

Note that in the output (filtered) CSOList, the ids of CSOs and CSOGroups are always sorted ascending.

Typically, the ids of CSOs and CSOGroups of the input (to be filtered) CSOList are also sorted ascending, but if this is not the case for any reason, the output CSOList’s ids of objects will be sorted ascending nevertheless.

Windows

Default Panel

../../../Modules/ML/MLCSOModules/mhelp/Images/Screenshots/CSOFilter._default.png

Input Fields

inputCSOList

name: inputCSOList, type: CSOList(MLBase)

The CSOList that is to be filtered.

For accessing this object via scripting see the Scripting Reference: MLCSOListWrapper.

Output Fields

outputCSOList

name: outputCSOList, type: CSOList(MLBase), deprecated name: outCSOList

A filtered copy of the input CSOList.

For accessing this object via scripting see the Scripting Reference: MLCSOListWrapper.

Parameter Fields

Field Index

Add All Existing CSOs: Trigger Filter Mode: (groupFilterMode): Enum Target Group Seed Point Size: Float
Add All Existing Groups: Trigger Filter Mode: (csoFilterMode): Enum Target Group Seed Point Style: Enum
All editable (autoAddAllEditableCSO): Bool Group Ids:: String Target Path Point Alpha: Float
All editable (autoAddAllEditableGroup): Bool Input (inputGroupString): String Target Path Point Brighten Value: Float
All selected (autoAddAllSelectedCSO): Bool Input (inputCSOString): String Target Path Point Color: Color
All selected (autoAddAllSelectedGroup): Bool isProcessing: Bool Target Path Point Style: Enum
All shown (autoAddAllShownCSO): Bool Listen to finishing (listenToFinishingCSONotifications): Bool Target Path Point Width: Float
All shown (autoAddAllShownGroup): Bool Listen to finishing (listenToFinishingGroupNotifications): Bool Target Selected CSO: Bool
All voxelize (autoAddAllVoxelizeCSO): Bool Listen to moved: Bool Target Selected Group: Bool
All voxelize (autoAddAllVoxelizeGroup): Bool Listen to selection changes (listenToSelectionCSOChangedNotifications): Bool Target Show State: Bool
Alpha (actionSetPathPointAlpha): Bool Listen to selection changes (listenToSelectionGroupChangedNotifications): Bool Target Time Point Index: Integer
Alpha (actionSetGroupSeedPointAlpha): Bool Mode: Enum Target Voxel Write Mode: Enum
Auto apply: Bool Selected state (actionSetSelectedCSO): Bool Target Voxel Write Value: Float
Brighten: Bool Selected state (actionSetSelectedGroup): Bool Target Voxelize State: Bool
Clear CSO Input String: Trigger Sep.: String Time point index: Bool
Clear Group Input String: Trigger Should Compare Case Insensitive: Bool Update: Trigger
Color (actionSetPathPointColor): Bool Show state: Bool Voxel write mode: Bool
Color (actionSetGroupSeedPointColor): Bool Size: Bool Voxel write value: Bool
CSO Ids:: String Style (actionSetPathPointStyle): Bool Voxelize state: Bool
done: Trigger Style (actionSetGroupSeedPointStyle): Bool whichInputStringToUse: Enum
Editable state: Bool Target Editable State: Bool Width: Bool
Eval. String As: (groupInputEvaluationMode): Enum Target Group Seed Point Alpha: Float  
Eval. String As: (csoInputEvaluationMode): Enum Target Group Seed Point Color: Color  

Visible Fields

Mode

name: updateMode, type: Enum, default: AutoClear

Defines the update mode of this module.

Values:

Title Name Description
Off Off The module does not update on input field changes or on any notications.
Auto Update AutoUpdate The module updates if the input CSOList field is touched (connected or disconnected) and on notifications, depending on the notifications the module is allowed to listen to.
Auto Clear AutoClear  

Auto apply

name: autoApply, type: Bool, default: FALSE

If checked, the module computes anew on changing any field on the module’s GUI.

Update

name: apply, type: Trigger

If pressed, the module computes anew.

Input (inputGroupString)

name: inputGroupString, type: String

Sets the list of input strings that are evaluated according to the setting of Eval. String As:.

Input (inputCSOString)

name: inputCSOString, type: String

Sets the list of input strings that are evaluated according to the setting of Eval. String As:.

CSO Ids:

name: passingCSOIds, type: String, persistent: no

Shows the ids of all CSOs that are passing the filter.

Group Ids:

name: passingCSOGroupIds, type: String, persistent: no

Shows the ids of all CSOGroups that are passing the filter.

Filter Mode: (groupFilterMode)

name: groupFilterMode, type: Enum, default: FilterModeInclude

Defines the filter mode for the CSOGroups.

Values:

Title Name Description
Include FilterModeInclude The CSOGroups given by the string in Input which is evaluated by Eval. String As: are all included in the module’s output.
Exclude FilterModeExclude The CSOGroups given by the string in Input which is evaluated by Eval. String As: are all excluded in the module’s output.

Filter Mode: (csoFilterMode)

name: csoFilterMode, type: Enum, default: FilterModeInclude

Defines the filter mode for the CSOs.

Values:

Title Name Description
Include FilterModeInclude The CSOs given by the string in Input which is evaluated by Eval. String As: are all included in the module’s output.
Exclude FilterModeExclude The CSOs given by the string in Input which is evaluated by Eval. String As: are all excluded in the module’s output.

Sep.

name: separatorString, type: String, default: None

Sets the separator string used to separate the items to filter.

Eval. String As: (groupInputEvaluationMode)

name: groupInputEvaluationMode, type: Enum, default: EvaluationModeIds

Defines how the module should evaluate the Input.

Values:

Title Name Description
Ids EvaluationModeIds The string is expected to contain a list of ids.
Label EvaluationModeLabel The string is expected to contain a list of labels.
Description EvaluationModeDescription The string is expected to contain a list of descriptions.
Label Sub Str And EvaluationModeLabelSubStrAnd CSOGroups are recognized if their label string contains all of the given substrings.
Label Sub Str Or EvaluationModeLabelSubStrOr CSOGroups are recognized if their label string contains any of the given substrings.
Description Sub Str And EvaluationModeDescriptionSubStrAnd CSOGroups are recognized if their description string contains all of the given substrings.
Description Sub Str Or EvaluationModeDescriptionSubStrOr CSOGroups are recognized if their description string contains any of the given substrings.
Timepoint EvaluationModeTimepoint The string is expected to contain a list of timepoint indices.

Eval. String As: (csoInputEvaluationMode)

name: csoInputEvaluationMode, type: Enum, default: EvaluationModeIds

Defines how the module should evaluate the Input.

Values:

Title Name Description
Ids EvaluationModeIds The string is expected to contain a list of ids.
Label EvaluationModeLabel The string is expected to contain a list of labels.
Description EvaluationModeDescription The string is expected to contain a list of descriptions.
Label Sub Str And EvaluationModeLabelSubStrAnd CSOs are recognized if their label string contains all of the given substrings.
Label Sub Str Or EvaluationModeLabelSubStrOr CSOs are recognized if their label string contains any of the given substrings.
Description Sub Str And EvaluationModeDescriptionSubStrAnd CSOs are recognized if their description string contains all of the given substrings.
Description Sub Str Or EvaluationModeDescriptionSubStrOr CSOs are recognized if their description string contains any of the given substrings.
Timepoint EvaluationModeTimepoint The string is expected to contain a list of timepoint indices.
Type EvaluationModeType The string is expected to contain a list of CSO types (set by a generating module or processor).
Subtype EvaluationModeSubtype The string is expected to contain a list of CSO subtypes (set by a generating module or processor).
Creator Id EvaluationModeCreatorId The string is expected to contain a list of CSO creator ids (set by a generating module or processor).

Should Compare Case Insensitive

name: shouldCompareCaseInsensitive, type: Bool, default: FALSE

If checked, the string comparisons (label, description) are performed case-insensitive.

Add All Existing Groups

name: addAllExistingGroups, type: Trigger

If pressed, all existing CSOGroups are added to the output.

Add All Existing CSOs

name: addAllExistingCSOs, type: Trigger

If pressed, all existing CSOs are added to the output.

Clear Group Input String

name: clearGroupInputString, type: Trigger

If pressed, the Input field is cleared.

Clear CSO Input String

name: clearCSOInputString, type: Trigger

If pressed, the Input field is cleared.

All selected (autoAddAllSelectedCSO)

name: autoAddAllSelectedCSO, type: Bool, default: FALSE

If pressed, all selected CSOs are added to the output.

All selected (autoAddAllSelectedGroup)

name: autoAddAllSelectedGroup, type: Bool, default: FALSE

If pressed, all selected CSOGroups are added to the output.

All shown (autoAddAllShownCSO)

name: autoAddAllShownCSO, type: Bool, default: FALSE

If pressed, all shown/visible CSOs are added to the output.

All shown (autoAddAllShownGroup)

name: autoAddAllShownGroup, type: Bool, default: FALSE

If pressed, all shown/visible CSOGroups are added to the output.

All voxelize (autoAddAllVoxelizeCSO)

name: autoAddAllVoxelizeCSO, type: Bool, default: FALSE

If pressed, all CSOs that are to be voxelized are added to the output.

All voxelize (autoAddAllVoxelizeGroup)

name: autoAddAllVoxelizeGroup, type: Bool, default: FALSE

If pressed, all CSOGroups that are to be voxelized are added to the output.

All editable (autoAddAllEditableCSO)

name: autoAddAllEditableCSO, type: Bool, default: FALSE

If pressed, all editable CSOs are added to the output.

All editable (autoAddAllEditableGroup)

name: autoAddAllEditableGroup, type: Bool, default: FALSE

If pressed, all editable CSOGroups are added to the output.

Color (actionSetPathPointColor)

name: actionSetPathPointColor, type: Bool, default: FALSE, deprecated name: actionSetColor

If checked, all output CSOs are colored as set in Target Path Point Color.

Alpha (actionSetPathPointAlpha)

name: actionSetPathPointAlpha, type: Bool, default: FALSE, deprecated name: actionSetAlpha

If checked, all output CSOs have an alpha value as set in Target Path Point Alpha.

Brighten

name: actionSetPathPointBrighten, type: Bool, default: FALSE, deprecated name: actionSetBrighten

If checked, all output CSOs will be brightened by the value set in Target Path Point Brighten Value.

Style (actionSetPathPointStyle)

name: actionSetPathPointStyle, type: Bool, default: FALSE, deprecated name: actionSetLineStyle

If checked, all output CSOs will have the line style set as in Target Path Point Style.

Width

name: actionSetPathPointWidth, type: Bool, default: FALSE, deprecated name: actionSetLineWidth

If checked, all output CSOs will have a line width as set in Target Path Point Width.

Voxel write mode

name: actionSetVoxelWriteMode, type: Bool, default: FALSE

If checked, all output CSOs will have a voxel write mode as set in Target Voxel Write Mode.

Voxel write value

name: actionSetVoxelWriteValue, type: Bool, default: FALSE

If checked, all output CSOs will have a voxel write value as set in Target Voxel Write Value.

Show state

name: actionSetShowState, type: Bool, default: FALSE

If checked, all output CSOs will have a show state as set in Target Show State.

Voxelize state

name: actionSetVoxelizeState, type: Bool, default: FALSE

If checked, all output CSOs will have a voxelize state as set in Target Voxelize State.

Editable state

name: actionSetEditableState, type: Bool, default: FALSE

If checked, all output CSOs will have an editable state as set in Target Editable State.

Time point index

name: actionSetTimePointIndex, type: Bool, default: FALSE

If checked, all output CSOs will have a timepoint index as set in Target Time Point Index.

Selected state (actionSetSelectedCSO)

name: actionSetSelectedCSO, type: Bool, default: FALSE

If checked, all output CSOs will have a selection state as set in Target Selected CSO.

Selected state (actionSetSelectedGroup)

name: actionSetSelectedGroup, type: Bool, default: FALSE

If checked, all output CSOGroups will have a selection state as set in Target Selected Group.

Color (actionSetGroupSeedPointColor)

name: actionSetGroupSeedPointColor, type: Bool, default: FALSE, deprecated name: actionSetGroupMarkerColor

If checked, all output CSOGroups will overwrite the seed point color of the containing CSOs.

Style (actionSetGroupSeedPointStyle)

name: actionSetGroupSeedPointStyle, type: Bool, default: FALSE, deprecated name: actionSetGroupMarkerMode

If checked, all output CSOGroups will overwrite the seed point of the containing CSOs.

Size

name: actionSetGroupSeedPointSize, type: Bool, default: FALSE, deprecated name: actionSetGroupMarkerSize

If checked, all output CSOGroups will overwrite the seed point size of the containing CSOs.

Alpha (actionSetGroupSeedPointAlpha)

name: actionSetGroupSeedPointAlpha, type: Bool, default: FALSE, deprecated name: actionSetGroupMarkerAlpha

If checked, all output CSOGroups will overwrite the seed point alpha of the containing CSOs.

Target Path Point Color

name: targetPathPointColor, type: Color, default: 1 1 1, deprecated name: targetColor

Sets the color of filtered CSOs if the field Color is checked.

Target Path Point Alpha

name: targetPathPointAlpha, type: Float, default: 1, deprecated name: targetAlphaValue

Sets the alpha value of the filtered CSOs if the field Alpha is checked.

Target Path Point Brighten Value

name: targetPathPointBrightenValue, type: Float, default: 1, deprecated name: targetBrightenValue

Sets the brighten value of the filtered CSOs if the field Brighten is checked.

Target Path Point Style

name: targetPathPointStyle, type: Enum, default: LineStyleSolid, deprecated name: targetLineStyle

Defines the line style of filtered CSOs if the field Style is checked.

Values:

Title Name
None LineStyleNone
Solid LineStyleSolid
Dashed LineStyleDashed
Dotted LineStyleDotted
Short Dashed LineStyleShortDashed

Target Path Point Width

name: targetPathPointWidth, type: Float, default: 1, deprecated name: targetLineWidth

The line width of filtered CSOs if the field Width is checked.

Target Voxel Write Mode

name: targetVoxelWriteMode, type: Enum, default: VoxelWriteModeModule

Defines the voxel write mode of the filtered CSOs if the field Voxel write mode is checked.

Values:

Title Name
Id VoxelWriteModeId
Const VoxelWriteModeConst
Const Plus Id VoxelWriteModeConstPlusId
Module VoxelWriteModeModule

Target Voxel Write Value

name: targetVoxelWriteValue, type: Float, default: 1024

Sets the voxel write value of the filtered CSOs if the field Voxel write value is checked.

Target Show State

name: targetShowState, type: Bool, default: TRUE

Sets the show state of the filtered CSOs if the field Show state is checked.

Target Voxelize State

name: targetVoxelizeState, type: Bool, default: TRUE

Sets the voxelize state of the filtered CSOs if the field Voxelize state is checked.

Target Editable State

name: targetEditableState, type: Bool, default: TRUE

Sets the editable state of the filtered CSOs if the field Editable state is checked.

Target Time Point Index

name: targetTimePointIndex, type: Integer, default: 0

Sets the timepoint index of the filtered CSOs if the field Time point index is checked.

Target Selected CSO

name: targetSelectedCSO, type: Bool, default: TRUE

Sets the selection state of the filtered CSOs if the field Selected state is checked.

Target Selected Group

name: targetSelectedGroup, type: Bool, default: TRUE

Sets the selection state of the filtered CSOGroups if the field Selected state is checked.

Target Group Seed Point Color

name: targetGroupSeedPointColor, type: Color, default: 1 1 1, deprecated name: targetGroupMarkerColor

Sets the seed point color of the filtered CSOGroups if the field Color is checked.

Target Group Seed Point Style

name: targetGroupSeedPointStyle, type: Enum, default: MarkerModeRect, deprecated name: targetGroupMarkerMode

Sets the seed point style of the filtered CSOGroups if the field Style is checked.

Values:

Title Name
None MarkerModeNone
Rect MarkerModeRect
Circle MarkerModeCircle
Fixed Circle MarkerModeFixedCircle
Triangle MarkerModeTriangle
Filled Rect MarkerModeFilledRect
Filled Circle MarkerModeFilledCircle
Filled Triangle MarkerModeFilledTriangle
Dashed Rectangle MarkerModeDashedRectangle

Target Group Seed Point Size

name: targetGroupSeedPointSize, type: Float, default: 2, deprecated name: targetGroupMarkerSize

Sets the seed point size of the filtered CSOGroups if the field Size is checked.

Target Group Seed Point Alpha

name: targetGroupSeedPointAlpha, type: Float, default: 1, deprecated name: targetGroupMarkerAlpha

Sets the seed point alpha of the filtered CSOGroups if the field Alpha is checked.

Listen to finishing (listenToFinishingCSONotifications)

name: listenToFinishingCSONotifications, type: Bool, default: TRUE

If checked, the module listens to CSO finished notifications if the field Mode is set to Auto Update.

Listen to finishing (listenToFinishingGroupNotifications)

name: listenToFinishingGroupNotifications, type: Bool, default: TRUE

If checked, the module listens to CSOGroup finished notifications if the field Mode is set to Auto Update.

Listen to selection changes (listenToSelectionCSOChangedNotifications)

name: listenToSelectionCSOChangedNotifications, type: Bool, default: TRUE

If checked, the module listens to CSO selection notifications if the field Mode is set to Auto Update.

Listen to selection changes (listenToSelectionGroupChangedNotifications)

name: listenToSelectionGroupChangedNotifications, type: Bool, default: TRUE

If checked, the module listens to CSOGroup finished notifications if the field Mode is set to Auto Update.

Listen to moved

name: listenToMovedCSONotifications, type: Bool, default: FALSE

If checked, the module listens to CSO moved notifications if the field Mode is set to Auto Update.

Hidden Fields

isProcessing

name: isProcessing, type: Bool, persistent: no

done

name: done, type: Trigger, persistent: no

whichInputStringToUse

name: whichInputStringToUse, type: Enum, default: UseInputStringCSO

Values:

Title Name
CSO UseInputStringCSO
CSOGroup UseInputStringCSOGroup