MeVisLab Toolbox Reference
CSOGeneratorBase.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2012, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13
16
17#pragma once
18
19
20#include <MLCSOIncludes.h>
21
23
24class CSO;
25class CSOGroup;
26class CSOList;
27
28
36
37
39{
40public:
43 virtual ~CSOGeneratorBase() = default;
44
49 CSO* generatorAddCSO(CSOList* csoList, bool useUndoRedo=true);
51 CSO* generatorAddCSONoEvent(CSOList* csoList, bool useUndoRedo = true, bool sendEvent = false);
53 CSOGroup* generatorGetParentGroup(CSOList* csoList, bool useUndoRedo=false, bool generate=false);
56
57
58 // Abstract interface, needs to be implemented by deriving classes.
59
61 virtual int getModuleCreatorId() const = 0;
63 virtual std::string getModuleType() const = 0;
64
67 virtual bool getShouldEmptyBeforeGeneration() const = 0;
69 virtual int getAddCSOToGroupMode() const = 0;
71 virtual std::string getAddCSOToGroupLabel() const = 0;
73 virtual int getAddCSOToGroupId() const = 0;
74
76 virtual int getDefaultPathPointStyle() const = 0;
78 virtual float getDefaultPathPointWidth() const = 0;
80 virtual Vector3 getDefaultPathPointColor() const = 0;
82 virtual float getDefaultPathPointAlpha() const = 0;
83
85 virtual int getDefaultSeedPointStyle() const = 0;
87 virtual float getDefaultSeedPointSize() const = 0;
89 virtual Vector3 getDefaultSeedPointColor() const = 0;
91 virtual float getDefaultSeedPointAlpha() const = 0;
92
94 virtual int getDefaultVoxelWriteMode() const = 0;
96 virtual float getDefaultVoxelWriteValue() const = 0;
97};
98
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
Definition MLCSOSystem.h:23
virtual int getModuleCreatorId() const =0
Returns the module's creator id.
virtual float getDefaultPathPointWidth() const =0
Returns the set default path point width for a new CSO.
virtual ~CSOGeneratorBase()=default
virtual Vector3 getDefaultSeedPointColor() const =0
Returns the set default seed point color for a new CSO.
virtual int getDefaultSeedPointStyle() const =0
Returns the set default seed point style for a new CSO.
virtual std::string getModuleType() const =0
Returns the module's type string.
CSOGroup * generatorGetParentGroup(CSOList *csoList, bool useUndoRedo=false, bool generate=false)
Returns the parent group according to current group settings.
void generatorEmptyGroupOnDemand(CSOList *csoList)
Empties a group on demand of the given CSOList with the set label.
CSO * generatorAddCSONoEvent(CSOList *csoList, bool useUndoRedo=true, bool sendEvent=false)
See generatorAddCSO, but no group scope event is emitted. (So this method is faster!...
virtual float getDefaultPathPointAlpha() const =0
Returns the set default path point alpha for a new CSO.
CSOGeneratorBase()
Default constructor.
virtual float getDefaultVoxelWriteValue() const =0
Returns the set default voxel write value for a new CSO.
virtual Vector3 getDefaultPathPointColor() const =0
Returns the set default path point color for a new CSO.
virtual int getDefaultPathPointStyle() const =0
Returns the set default path point style for a new CSO.
virtual int getAddCSOToGroupMode() const =0
Returns the group generation mode.
virtual int getDefaultVoxelWriteMode() const =0
Returns the set default voxel write mode for a new CSO.
CSO * generatorAddCSO(CSOList *csoList, bool useUndoRedo=true)
Adds a new CSO to the CSOList.
virtual bool getShouldEmptyBeforeGeneration() const =0
Returns whether the module should empty a group before generating CSOs into it.
virtual float getDefaultSeedPointAlpha() const =0
Returns the set default seed point alpha for a new CSO.
virtual float getDefaultSeedPointSize() const =0
Returns the set default seed point size for a new CSO.
virtual int getAddCSOToGroupId() const =0
Returns the id of a target group.
virtual std::string getAddCSOToGroupLabel() const =0
Returns the label string of a target group.
A CSOGroup comprises a number of CSOs, which themselves can be in a number of different CSOGroups.
Definition CSOGroup.h:38
A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation...
Definition CSOList.h:61
The CSO represents a contour segmentation object.
Definition CSO.h:44
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
CSOAddToGroupModes
Enumeration of the add to group modes.
@ GROUP_BY_ID
Add to group with is as defined by _addCSOToGroupWithIdFld. If no group with this id exists,...
@ GROUP_BY_LABEL
Add to group with label as defined by _addCSOToGroupWithLabelFld. A new group is generated if no grou...