19 #include "../CSOList.h"
21 #include "../CSORules/CSOGroupRules.h"
22 #include "../CSORules/CSOListRules.h"
194 BoolField* _workDirectlyOnInputCSOListFld;
203 BoolField* _shouldUpdateCsoDisplayTreeFld;
205 BoolField* _shouldUpdateGroupDisplayTreeFld;
260 FloatField* _selectionBrightenPathPointColorFld;
273 FloatField* _selectedSeedPointBrightenColorFld;
289 IntField* _csoSingleTimePointIndexFld;
323 BoolField* _csoDefaultLabelAddUniqueIdFld;
327 BoolField* _csoDefaultLabelAddUniqueIdAlwaysFld;
350 BoolField* _groupSingleUseTimePointIndexFld;
352 IntField* _groupSingleTimePointIndexFld;
358 BoolField* _groupSingleUseVoxelizeStateFld;
362 BoolField* _groupSingleUseEditableStateFld;
368 BoolField* _groupSingleUsePathPointStyleFld;
372 BoolField* _groupSingleUsePathPointWidthFld;
374 BoolField* _groupSingleUsePathPointColorFld;
377 BoolField* _groupSingleUsePathPointAlphaFld;
383 BoolField* _groupSingleUseSeedPointStyleFld;
386 BoolField* _groupSingleUseSeedPointSizeFld;
389 BoolField* _groupSingleUseSeedPointColorFld;
392 BoolField* _groupSingleUseSeedPointAlphaFld;
396 BoolField* _groupSingleUseVoxelWriteModeFld;
400 BoolField* _groupSingleUseVoxelWriteValueFld;
404 IntField* _groupSingleNumMaximumCSOsFld;
415 BoolField* _groupDefaultLabelAddUniqueIdFld;
419 BoolField* _groupDefaultLabelAddUniqueIdAlwaysFld;
425 BoolField* _groupDefaultUseTimePointIndexFld;
427 IntField* _groupDefaultTimePointIndexFld;
433 BoolField* _groupDefaultUseVoxelizeStateFld;
435 BoolField* _groupDefaultVoxelizeStateFld;
437 BoolField* _groupDefaultUseEditableStateFld;
439 BoolField* _groupDefaultEditableStateFld;
442 BoolField* _groupDefaultUsePathPointStyleFld;
445 BoolField* _groupDefaultUsePathPointWidthFld;
448 BoolField* _groupDefaultUsePathPointColorFld;
451 BoolField* _groupDefaultUsePathPointAlphaFld;
455 BoolField* _groupDefaultUseSeedPointSizeFld;
458 BoolField* _groupDefaultUseSeedPointStyleFld;
461 BoolField* _groupDefaultUseSeedPointColorFld;
464 BoolField* _groupDefaultUseSeedPointAlphaFld;
468 BoolField* _groupDefaultUseVoxelWriteModeFld;
472 BoolField* _groupDefaultUseVoxelWriteValueFld;
476 IntField* _groupDefaultNumMaximumCSOsFld;
495 BoolField* _useSelectionCSONotificationFld;
497 BoolField* _useSelectionGroupNotificationFld;
499 BoolField* _useFinishedCSONotificationFld;
501 BoolField* _useFinishedGroupNotificationFld;
507 BoolField* _useInteractionInitNotificationFld;
509 BoolField* _useNewCSOStartedNotificationFld;
531 BoolField* _enableSelectionNotificationFld;
533 BoolField* _enableFinishedNotificationFld;
535 BoolField* _enableCSOMovedNotificationFld;
537 BoolField* _enableRepaintNotificationFld;
548 BoolField* _outputApplicationEventsDebugFld;
556 struct GroupCSOPair {
562 CSOListPtr _outCSOList;
564 CSOListPtr _inCSOList;
567 bool _isOutputCSOListOwner;
569 bool _isWorkingDirectlyOnInputCSOList;
572 std::vector<GroupCSOPair>_csoSelectedGroups;
574 std::vector<GroupCSOPair>_groupSelectedCSOs;
577 std::vector<CSO*>_copiedCSOs;
579 std::vector<CSOGroup*>_copiedGroups;
582 bool _isInNotificationCB;
585 bool _useSelectionCSONotification;
587 bool _useSelectionGroupNotification;
589 bool _useFinishedCSONotification;
591 bool _useFinishedGroupNotification;
593 bool _useCSOMovedNotification;
595 bool _useRepaintNotification;
597 bool _useInteractionInitNotification;
599 bool _useNewCSOStartedNotification;
602 bool _selectedCSOItemsChangedFromField;
604 bool _selectedCSOGroupItemsChangedFromField;
607 bool _isNotifyingItself;
612 static void _csoListNotificationCB(
void* userData,
int notificationFlag);
615 void _updateManagerFields();
618 void _updateCSOManagerFields();
620 void _updateGroupManagerFields();
623 void _updateInformationFields();
627 bool _parseCSOSelectedItemsString();
630 bool _parseGroupSelectedItemsString();
633 void _parseStringToVector(std::string toParse, std::vector<int>& parsedIds);
636 void _parseCSOGroupToVector();
638 void _parseGroupCSOToVector();
641 void _parsePair(std::string toParse,
int& firstId,
int& secondId);
643 void _addPairToVector(
int csoId,
int groupId, std::vector<GroupCSOPair>& gcPairVec);
648 void _openUndoRedoGroup(
const std::string& description);
651 void _closeUndoRedoGroup();
654 void _createCSOString();
656 void _createGroupString();
659 void _updateCSOInformationFields();
661 void _updateGroupInformationFields();
664 void _copySelectedCSOs();
666 void _copySelectedGroups();
668 void _pasteCopiedCSOs();
670 void _pasteCopiedGroups();
673 void _addSelectedCSOtoGroup();
675 void _breakSelectedCSOFromGroup();
680 void _removeGroups();
685 static void baseEventCB(
void* userData,
BaseEvent* event);
687 int _eventGroupCounter;
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
BaseEvent is the base class for all events emitted from EventSourceBase.
Field to encapsulate a pointer to an ML base object.
Field to encapsulate a boolean value.
A CSOGroup comprises a number of CSOs, which themselves can be in a number of different CSOGroups.
The CSOManager allows for storing and iterating CSOs, and implements an undo/redo mechanism.
void getSelectedSeedPointColor(Vector3 &origColor)
Returns the selected seed point color (on base of the given color if in 'brighten' mode).
bool getGroupDefaultShowState() const
Returns the default show state for CSOGroups.
float getSelectedPathPointsBrightenValue() const
Returns the brighten value for selected path points.
bool getGroupDefaultUseVoxelWriteValue() const
Returns the default voxel write value for CSOGroups.
float getSelectedSeedPointBrightenValue() const
Returns the brighten value for selected seed points.
Vector3 getSelectedSeedPointFixedColor() const
Returns the fixed color for selected seed points.
float getSelectedSeedPointEnlargeValue() const
Returns the value for selected seed points.
float getGroupDefaultPathPointAlpha() const
CSOGroupOverflowHandling getGroupDefaultOverflowHandling() const
Returns the default overflow handling mode for CSOGroups.
int getGroupDefaultTimePointIndex() const
Returns the default time point index for CSOGroups.
void activateAttachments() override
Initialize module after loading.
CSORemoveHandling getGroupDefaultRemoveFromGroupHandling() const
Returns the default remove from group handling mode for CSOGroups.
bool getGroupDefaultUsePathPointStyle() const
Returns the default line style for CSOGroups.
CSORemoveHandling getGroupDefaultDeleteGroupCSOHandling() const
bool getCSODefaultEditableState() const
Returns the default editable state for CSOs.
bool getGroupDefaultUsePathPointAlpha() const
Returns the default alpha value for CSOGroups.
std::string getGroupDefaultDescription() const
Returns the default description for CSOGroups.
int getGroupDefaultVoxelWriteMode() const
Vector3 getGroupDefaultSeedPointColor() const
std::string getGroupDefaultLabel()
Returns the default label for CSOGroups.
std::string getCSODefaultDescription() const
Returns the default description for CSOs.
bool getGroupDefaultUseSeedPointSize() const
Returns the default marker size for CSOGroups.
float getSelectedPathPointsWidenValue() const
Returns the widen value for selected path points.
bool getGroupDefaultUseSeedPointStyle() const
Returns the default marker mode for CSOGroups.
bool getGroupDefaultEditableState() const
Returns the default editable state for CSOGroups.
Vector3 getSelectedPathPointsFixedColor() const
Returns the fixed color for selected path points without regarding the coloring mode.
bool getCSODefaultShowState() const
Returns the default show state for CSOs.
void handleNotification(Field *field) override
Called when input changes.
bool getCSODefaultVoxelizeState() const
Returns the default voxelize state for CSOs.
int getGroupDefaultNumMaximumCSOs() const
Returns the default maximum number of CSOs for CSOGroups.
bool getGroupDefaultUseSeedPointAlpha() const
Returns the default marker alpha value for CSOGroups.
void updateGroupManager()
Updates the Group list view and the single Group fields.
void updateCSOManager()
Updates the CSO list view and the single CSO fields.
int getSelectedSeedPointSizeMode()
Returns the size mode for selected seed points (enlarge / fixed size).
bool getGroupDefaultUseEditableState() const
Returns whether the member CSOs shall use the CSOGroup's editable state by default.
CSORemoveEmptyGroupHandling getDefaultRemoveEmptyGroupHandling() const
Returns the default remove empty group handling mode for CSOLists.
Vector3 getGroupDefaultPathPointColor() const
void updateManager()
Updates the tree views and the single CSO/Group fields.
bool getGroupDefaultVoxelizeState() const
Returns the default voxelize state for CSOGroups.
void getSelectionPathPointWidth(float &origLineWidth)
Returns the selection line width (on base of the given line width if in 'widen' mode).
~CSOManager() override
Standard destructor.
void setInternalVariables()
Sets internal state variables.
float getSelectedPathPointsFixedLineWidth() const
Returns the fixed line width value for selected path points.
int getSelectionPathPointColoringMode()
Returns the coloring mode for selected CSOs (brighten / fixed color).
bool getGroupDefaultUseShowState() const
Returns whether the member CSOs shall use the CSOGroup's show state by default.
CSOPathPointsStyle getGroupDefaultPathPointStyle() const
float getGroupDefaultVoxelWriteValue() const
std::string getCSODefaultLabel()
Returns the default label for CSOs.
bool getGroupDefaultUseTimePointIndex() const
Returns whether the member CSOs shall use the CSOGroup's time point index by default.
bool getGroupDefaultUsePathPointWidth() const
Returns the default line width for CSOGroups.
bool getGroupDefaultUseVoxelizeState() const
Returns whether the member CSOs shall use the CSOGroup's voxelize state by default.
bool getGroupDefaultUseSeedPointColor() const
Returns the default marker color for CSOGroups.
int getSelectionPathPointWidthMode()
Returns the line width mode for selected CSOs (widen / fixed width).
float getGroupDefaultSeedPointSize() const
float getSelectedSeedPointFixedSize() const
Returns the fixed size value for selected seed points.
int getSelectedSeedPointColoringMode()
Returns the coloring mode for selected seed points (brighten / fixed color).
void getSelectionPathPointColor(Vector3 &origColor)
Returns the selection color (on base of the given color if in 'brighten' mode).
int getGroupDefaultSeedPointStyle() const
CSOManager(int numInImages=0, int numOutImages=0)
Standard constructor.
bool getGroupDefaultUsePathPointColor() const
Returns the default color for CSOGroups.
bool getGroupDefaultUseVoxelWriteMode() const
Returns the default voxel write mode for CSOGroups.
float getGroupDefaultSeedPointAlpha() const
void getSelectedSeedPointSize(float &origSize)
Returns the selected seed point size (on base of the given size if in 'enlarge' mode).
float getGroupDefaultPathPointWidth() const
The CSO represents a contour segmentation object.
Field to encapsulate a vector of 3 float values representing an (rgb) color with all properties of Ve...
Base class for all fields used in the ML.
Field to encapsulate a float value.
Field to encapsulate an integer value.
Base class for an image processing module of the ML.
Field without value for notifications.
Field to encapsulate a string value.
#define ML_MODULE_CLASS_HEADER(className)
Like ML_CLASS_HEADER for the usage of derived classes from Module.
CSORemoveHandling
Enumeration for the removal handling of CSOs from group and if group is deleted.
CSOPathPointsStyle
Enumeration of line styles (order as StylePalette::LineStyle).
CSORemoveEmptyGroupHandling
Enumeration for empty groups removal.
CSOGroupOverflowHandling
Enumeration for the group overflow handling modes.