MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
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
37
38
40{
41public:
44 virtual ~CSOGeneratorBase() = default;
45
50 CSO* generatorAddCSO(CSOList* csoList, bool useUndoRedo = true);
52 CSO* generatorAddCSONoEvent(CSOList* csoList, bool useUndoRedo = true, bool sendEvent = false);
54 CSOGroup* generatorGetParentGroup(CSOList* csoList, bool useUndoRedo = false, bool generate = false);
57
58
59 // Abstract interface, needs to be implemented by deriving classes.
60
62 virtual int getModuleCreatorId() const = 0;
64 virtual std::string getModuleType() const = 0;
65
68 virtual bool getShouldEmptyBeforeGeneration() const = 0;
70 virtual int getAddCSOToGroupMode() const = 0;
72 virtual std::string getAddCSOToGroupLabel() const = 0;
74 virtual int getAddCSOToGroupId() const = 0;
75
77 virtual int getDefaultPathPointStyle() const = 0;
79 virtual float getDefaultPathPointWidth() const = 0;
81 virtual Vector3 getDefaultPathPointColor() const = 0;
83 virtual float getDefaultPathPointAlpha() const = 0;
84
86 virtual int getDefaultSeedPointStyle() const = 0;
88 virtual float getDefaultSeedPointSize() const = 0;
90 virtual Vector3 getDefaultSeedPointColor() const = 0;
92 virtual float getDefaultSeedPointAlpha() const = 0;
93
95 virtual int getDefaultVoxelWriteMode() const = 0;
97 virtual float getDefaultVoxelWriteValue() const = 0;
98};
99
#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 CSOGroup according to current CSOGroup settings.
void generatorEmptyGroupOnDemand(CSOList *csoList)
Empties a CSOGroup on demand of the given CSOList with the set label.
CSO * generatorAddCSONoEvent(CSOList *csoList, bool useUndoRedo=true, bool sendEvent=false)
See generatorAddCSO, but no CSOGroup 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 CSOGroup 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 CSOGroup 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 CSOGroup.
virtual std::string getAddCSOToGroupLabel() const =0
Returns the label string of a target CSOGroup.
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 CSOGroup modes.
@ GROUP_BY_ID
Add to CSOGroup with is as defined by _addCSOToGroupWithIdFld.
@ GROUP_BY_LABEL
Add to CSOGroup with label as defined by _addCSOToGroupWithLabelFld.