22#include <mlUndoStep.h>
79 return "Remove Contour";
84 unsigned int _lastCurrentCSOId;
86 std::vector<unsigned int> _csoGroupIds;
106 return "Add Contour";
110 unsigned int _removeCSOId;
130 return "Remove Contour Group";
135 unsigned int _lastCurrentGroupId;
136 unsigned int _groupId;
137 std::vector<unsigned int> _groupCSOIds;
157 return "Add Contour Group";
161 unsigned int _csoGroupId;
181 return "Remove Contour From Group";
186 unsigned int _groupId;
207 return "Add Contour To Group";
212 unsigned int _groupId;
232 return "Remove Contours";
256 return "Move Contour";
263 int _fromTimePointIndex;
264 int _toTimePointIndex;
284 return "Move Contour Point";
290 unsigned int _numSeedPoints;
291 unsigned int _numPathPoints;
294 std::vector<Vector4>* _pathPointPositionValues;
314 return "Add Contour Point";
320 std::string _subType;
322 CSO _originalGeometry;
344 return "Remove Contours";
348 struct CSOUndoRedoData
354 CSOUndoRedoData(CSO* _cso,
unsigned int _csoId,
const std::vector<unsigned int>& _csoGroupIds)
357 , csoGroupIds(_csoGroupIds)
361 std::vector<unsigned int> csoGroupIds;
364 unsigned int _lastCurrentCSOId;
365 std::vector<CSOUndoRedoData> _csoUndoRedoData;
385 return "Add Contours";
389 std::vector<unsigned int> _removeCSOIds;
409 return "Change Contours";
413 struct CSOUndoRedoData
417 , _pathPointPositionValues(
nullptr)
419 CSOUndoRedoData(
unsigned int csoId,
const std::string& type,
int markerMode,
bool csoIsClosed,
420 unsigned int numSeedPoints,
unsigned int numPathPoints, Vector3*
seedPositions,
424 , _seedPointStyle(markerMode)
426 , _numSeedPoints(numSeedPoints)
427 , _numPathPoints(numPathPoints)
436 unsigned int _numSeedPoints;
437 unsigned int _numPathPoints;
439 std::vector<Vector4>* _pathPointPositionValues;
442 std::vector<CSOUndoRedoData> _csoUndoRedoData;
462 return "Modify Visual Attributes";
469 float _pathPointAlpha;
471 float _pathPointWidth;
474 float _seedPointAlpha;
476 float _seedPointSize;
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
Class for undo/redo of adding a CSOGroup to the CSOList.
CSOCmdAddCSOGroup(const CSOListPtr &csoList, CSOGroup *group)
Constructor.
int execute() override
Method is executed on undo/redo.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
~CSOCmdAddCSOGroup() override
Destructor.
Class for undo/redo of adding multiple CSOs to the CSOList.
int execute() override
Method is executed on undo/redo.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
~CSOCmdAddCSOList() override
Destructor.
CSOCmdAddCSOList(const CSOListPtr &csoList)
Constructor.
Class for undo/redo of of adding a set of CSOs to the CSOList.
int execute() override
Method is executed on undo/redo.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
CSOCmdAddCSOSet(const CSOListPtr &csoList, const std::vector< CSO * > &csos)
Constructor.
~CSOCmdAddCSOSet() override
Destructor.
Class for undo/redo of adding a new CSO to the CSOList.
int execute() override
Method is executed on undo/redo.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
CSOCmdAddCSO(const CSOListPtr &csoList, CSO *cso)
Constructor.
~CSOCmdAddCSO() override
Destructor.
Class for undo/redo of adding a CSO to a CSOGroup.
CSOCmdAddCSOtoGroup(const CSOListPtr &csoList, CSO *cso, CSOGroup *group)
Constructor.
~CSOCmdAddCSOtoGroup() override
Destructor.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
int execute() override
Method is executed on undo/redo.
Class for undo/redo of modifying attributes of a CSO.
int execute() override
Method is executed on undo/redo.
~CSOCmdCSOModifyVisualAttributes() override
Destructor.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
CSOCmdCSOModifyVisualAttributes(const CSOListPtr &csoList, CSO *cso)
Constructor.
Class for undo/redo of the insertion/removal of a single seed point.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
int execute() override
Method is executed on undo/redo.
CSOCmdInsertRemoveSeedPoint(const CSOListPtr &csoList, CSO *cso)
Constructor.
~CSOCmdInsertRemoveSeedPoint() override
Destructor.
Class for undo/redo of modifying a set of CSOs.
~CSOCmdModifySet() override
Destructor.
int execute() override
Method is executed on undo/redo.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
CSOCmdModifySet(const CSOListPtr &csoList, const std::vector< CSO * > &csos)
Constructor.
Class for undo/redo of the moving of a contour.
~CSOCmdMoveContour() override
Destructor.
CSOCmdMoveContour(const CSOListPtr &csoList, CSO *cso, Vector3 fromPos, Vector3 toPos, int fromTPI, int toTPI)
Constructor.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
int execute() override
Method is executed on undo/redo.
Class for undo/redo of the moving of a single seed point.
CSOCmdMoveSeedPoint(const CSOListPtr &csoList, CSO *cso)
Constructor.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
int execute() override
Method is executed on undo/redo.
~CSOCmdMoveSeedPoint() override
Destructor.
Class for undo/redo of removing a CSOGroup from the CSOList.
CSOCmdRemoveCSOGroup(const CSOListPtr &csoList, CSOGroup *group)
Constructor.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
int execute() override
Method is executed on undo/redo.
~CSOCmdRemoveCSOGroup() override
Destructor.
Class for undo/redo of removing a set of CSOs from the CSOList.
int execute() override
Method is executed on undo/redo.
CSOCmdRemoveCSOSet(const CSOListPtr &csoList, const std::vector< CSO * > &csos)
Constructor.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
~CSOCmdRemoveCSOSet() override
Destructor.
Class for undo/redo of removing a CSO from the CSOList.
int execute() override
Method is executed on undo/redo.
~CSOCmdRemoveCSO() override
Destructor.
CSOCmdRemoveCSO(const CSOListPtr &csoList, CSO *cso)
Constructor.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
Class for undo/redo of removing a CSO from a CSOGroup.
CSOCmdRemoveCSOfromGroup(const CSOListPtr &csoList, CSO *cso, CSOGroup *group)
Constructor.
~CSOCmdRemoveCSOfromGroup() override
Destructor.
std::string description() const override
Undo descriptions are the inverse of the performed operation.
int execute() override
Method is executed on undo/redo.
Base class for a CSOCommand for the undo/redo mechanism.
bool checkRedoBehavior() const override
Returns whether the undo/redo behavior should be checked; returns 'false' to disable the check.
~CSOCommand() override
Destructor.
virtual int execute()=0
Execute method that must be overridden by each derived class.
CSOList * _csoList
Pointer to the csoList.
CSOCommand(const CSOListPtr &csoList)
Constructor.
void undo() override
Calls execute.
std::string commandName
The command as a string (for debugging purposes).
A CSOGroup comprises a number of CSOs, which themselves can be in a number of different CSOGroups.
A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation...
The CSO represents a contour segmentation object.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
Tvec3< MLdouble > Vector3
A vector with three components of type double.