22#include <mlUndoStep.h>
75 std::string
description()
const override {
return "Remove Contour"; }
80 unsigned int _lastCurrentCSOId;
82 std::vector<unsigned int> _csoGroupIds;
101 std::string
description()
const override {
return "Add Contour"; }
105 unsigned int _removeCSOId;
124 std::string
description()
const override {
return "Remove Contour Group"; }
129 unsigned int _lastCurrentGroupId;
130 unsigned int _groupId;
131 std::vector<unsigned int> _groupCSOIds;
149 std::string
description()
const override {
return "Add Contour Group"; }
153 unsigned int _csoGroupId;
172 std::string
description()
const override {
return "Remove Contour From Group"; }
177 unsigned int _groupId;
197 std::string
description()
const override {
return "Add Contour To Group"; }
202 unsigned int _groupId;
221 std::string
description()
const override {
return "Remove Contours"; }
244 std::string
description()
const override {
return "Move Contour"; }
251 int _fromTimePointIndex;
252 int _toTimePointIndex;
271 std::string
description()
const override {
return "Move Contour Point"; }
277 unsigned int _numSeedPoints;
278 unsigned int _numPathPoints;
281 std::vector<Vector4>* _pathPointPositionValues;
300 std::string
description()
const override {
return "Add Contour Point"; }
306 std::string _subType;
308 CSO _originalGeometry;
329 std::string
description()
const override {
return "Remove Contours"; }
333 struct CSOUndoRedoData
335 CSOUndoRedoData() : cso(
nullptr), csoId(0) {}
336 CSOUndoRedoData(CSO* _cso,
unsigned int _csoId,
const std::vector<unsigned int>& _csoGroupIds)
337 : cso(_cso), csoId(_csoId), csoGroupIds(_csoGroupIds) {}
340 std::vector<unsigned int> csoGroupIds;
343 unsigned int _lastCurrentCSOId;
344 std::vector<CSOUndoRedoData> _csoUndoRedoData;
363 std::string
description()
const override {
return "Add Contours"; }
367 std::vector<unsigned int> _removeCSOIds;
386 std::string
description()
const override {
return "Change Contours"; }
390 struct CSOUndoRedoData
392 CSOUndoRedoData() : _seedPositions(
nullptr), _pathPointPositionValues(
nullptr) {}
394 : _csoId(csoId), _type(type), _seedPointStyle(markerMode), _csoIsClosed(
csoIsClosed), _numSeedPoints(numSeedPoints), _numPathPoints(numPathPoints), _seedPositions(
seedPositions), _pathPointPositionValues(
pathPointPositionValues) {}
400 unsigned int _numSeedPoints;
401 unsigned int _numPathPoints;
403 std::vector<Vector4>* _pathPointPositionValues;
406 std::vector<CSOUndoRedoData> _csoUndoRedoData;
425 std::string
description()
const override {
return "Modify Visual Attributes"; }
432 float _pathPointAlpha;
434 float _pathPointWidth;
437 float _seedPointAlpha;
439 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 Group.
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 Group.
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
Not every undo step generates a redo step (a previous step might generate two instead),...
~CSOCommand() override
Destructor.
virtual int execute()=0
Execute method, 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 3 components of type double.