75 return static_cast<unsigned int>(_memberCSOIds.size());
82 return _memberCSOIds[index];
134 return _attributes.label;
141 return _attributes.description;
147 return _attributes.timePointIndex;
156 return _attributes.showState;
163 return _attributes.voxelizeState;
170 return _attributes.editableState;
187 return _attributes.pathPointWidth;
194 return _attributes.pathPointColor;
201 return _attributes.pathPointAlpha;
208 return _attributes.seedPointStyle;
215 return _attributes.seedPointSize;
222 return _attributes.seedPointColor;
229 return _attributes.seedPointAlpha;
236 return _attributes.voxelWriteMode;
243 return _attributes.voxelWriteValue;
256 _attributes.setUserData(name, value);
261 return _attributes.getUserData(name);
266 _attributes.getUserDataNames(
names);
271 _attributes.removeUserData(name);
282 return _useTimePointIndex;
287 _useTimePointIndex = state;
292 return _useShowState;
297 _useShowState = state;
302 return _useVoxelizeState;
307 _useVoxelizeState = state;
312 return _useEditableState;
317 _useEditableState = state;
322 return _useSeedPointStyle;
327 _useSeedPointStyle = state;
332 return _useSeedPointSize;
337 _useSeedPointSize = state;
342 return _useSeedPointColor;
347 _useSeedPointColor = state;
352 return _useSeedPointAlpha;
357 _useSeedPointAlpha = state;
362 return _usePathPointStyle;
367 _usePathPointStyle = state;
372 return _usePathPointWidth;
377 _usePathPointWidth = state;
382 return _usePathPointColor;
387 _usePathPointColor = state;
392 return _usePathPointAlpha;
397 _usePathPointAlpha = state;
402 return _useVoxelWriteMode;
407 _useVoxelWriteMode = state;
412 return _useVoxelWriteValue;
417 _useVoxelWriteValue = state;
442 unsigned int _uniqueId;
445 std::vector<unsigned int> _memberCSOIds;
457 bool _useTimePointIndex;
461 bool _useVoxelizeState;
463 bool _useEditableState;
465 bool _useSeedPointStyle;
466 bool _useSeedPointSize;
467 bool _useSeedPointColor;
468 bool _useSeedPointAlpha;
470 bool _usePathPointStyle;
471 bool _usePathPointWidth;
472 bool _usePathPointColor;
473 bool _usePathPointAlpha;
475 bool _useVoxelWriteMode;
476 bool _useVoxelWriteValue;
479 bool _hasValidWorldBoundingBox;
483 boost::unordered_map<size_t, CSOBoundingBox> _voxelBoundingBoxCache;
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
This class comprises some attributes that are common for a CSO and a CSOGroup.
The CSOBoundingBox defines an axis-parallel bounding box with double precision.
This handles rules like the maximum number of CSOs in a CSOGroup and applies them.
A CSOGroup comprises a number of CSOs, which themselves can be in a number of different CSOGroups.
CSOGroup(const CSOGroup &group, int groupId=-1, CSOList *csoList=nullptr)
Copy constructor.
CSOGroup(CSOList *csoList)
Constructor; takes a pointer to the embracing CSOList as an argument.
void setPathPointWidth(float width)
Sets the width of the path points.
void _addReferenceToCSO(const CSO &cso)
void setSeedPointColor(const Vector3 &color)
Sets the color of the seed points.
void setSeedPointSize(float size)
Sets the size of the seed points.
void setUseSeedPointStyle(bool state)
Sets whether this CSOGroup overrides the seed point style of its CSOs.
bool getUseSeedPointColor() const
Returns whether this CSOGroup overrides the seed point color of its CSOs.
void setSeedPointAlpha(float alpha)
Sets the alpha value of the seed points.
bool getUseVoxelWriteMode() const
Returns whether this CSOGroup overrides the voxel write mode of its CSOs.
float getSeedPointAlpha() const
Returns the alpha value of the seed points.
void setUsePathPointStyle(bool state)
Sets whether this CSOGroup overrides the path point style of its CSOs.
void setId(unsigned int id)
Sets the ID of this CSOGroup.
void setUseVoxelizeState(bool state)
Sets whether this CSOGroup overrides the voxelize state of its CSOs.
void setShowState(bool state)
Sets the 'show' status of this CSOGroup.
void setTimePointIndex(MLint timePointIndex)
Sets the time point index of this CSOGroup.
void setVoxelWriteMode(int mode)
Sets the voxel write mode of this CSOGroup.
bool getEditableState() const
Returns the 'editable' status of this CSOGroup.
void setPathPointAlpha(float alpha)
Sets the alpha value of the path points.
void loadAttributes(std::istream &inStream, short version, bool swapBytes, bool useAscii=false)
Loads attributes from stream.
bool getUseSeedPointStyle() const
Returns whether this CSOGroup overrides the seed point style of its CSOs.
bool getUseEditableState() const
Returns whether this CSOGroup overrides the editable state of its CSOs.
void setUseSeedPointColor(bool state)
Sets whether this CSOGroup overrides the seed point color of its CSOs.
void _removeReferenceToCSO(const CSO &cso)
Removes a reference to a CSO from this CSOGroup.
float getSeedPointSize() const
Returns the size of the seed points.
int getSeedPointStyle() const
Returns the style of the seed points.
CSO * getCSOAt(unsigned int index) const
Returns a pointer to the CSO at the specified index. Beware: no index check.
bool isSelected() const
Returns whether this CSOGroup is selected in its enclosing CSOList.
void setPathPointColor(const Vector3 &color)
Sets the color of the path points.
unsigned int numCSOs() const
Returns the number of CSOs in this CSOGroup.
bool contains(const CSO *cso) const
Returns whether this CSOGroup contains the specified CSO.
float getPathPointAlpha() const
Returns the alpha value of the path points.
bool getUseShowState() const
Returns whether this CSOGroup overrides the show state of its CSOs.
void setUserData(const std::string &name, Variant value)
void setUsePathPointAlpha(bool state)
Sets whether this CSOGroup overrides the path point alpha of its CSOs.
unsigned int getId() const
void setUseVoxelWriteMode(bool state)
Sets whether this CSOGroup overrides the voxel write mode of its CSOs.
unsigned int getCSOIdAt(unsigned int index) const
Returns the ID of an associated CSO at the specified index. Beware: no index check.
void setUseSeedPointSize(bool state)
Sets whether this CSOGroup overrides the seed point size of its CSOs.
void setPathPointStyle(int style)
Sets the path point style as an int.
const std::string & getDescription() const
Returns the CSOGroup description.
bool getUsePathPointStyle() const
Returns whether this CSOGroup overrides the path point style of its CSOs.
bool addCSO(CSO &cso, bool useUndoRedo=true)
bool getUseTimePointIndex() const
void setUseShowState(bool state)
Sets whether this CSOGroup overrides the show state of its CSOs.
void removeCSO(CSO &cso, bool useUndoRedo=true)
Removes specified CSO from this CSOGroup.
void setUseSeedPointAlpha(bool state)
Sets whether this CSOGroup overrides the seed point alpha of its CSOs.
Variant getUserData(const std::string &name) const
Returns the user data under the specified name or an invalid value if the entry does not exist.
void setDescription(const std::string &description)
Sets the CSOGroup description.
bool getShowState() const
Returns the 'show' status of this CSOGroup.
bool getUsePathPointAlpha() const
Returns whether this CSOGroup overrides the path point alpha of its CSOs.
void setUsePathPointColor(bool state)
Sets whether this CSOGroup overrides the path point color of its CSOs.
bool getVoxelizeState() const
Returns the 'voxelize' status of this CSOGroup.
void setUseEditableState(bool state)
Sets whether this CSOGroup overrides the editable state of its CSOs.
void getUserDataNames(std::vector< std::string > &names) const
Fills the specified vector with the keys/name under which user data are stored for this CSO.
const CSOBoundingBox & getBoundingBox()
bool saveAttributes(std::ostream &outStream, bool useAscii=false)
Saves attributes to stream and returns whether the saving was successful.
bool getUsePathPointColor() const
Returns whether this CSOGroup overrides the path point color of its CSOs.
float getVoxelWriteValue() const
Returns the voxel write value of this CSOGroup.
void setEditableState(bool state)
Sets the 'editable' status of this CSOGroup.
int getVoxelWriteMode() const
Returns the voxel write mode of this CSOGroup.
const Vector3 & getPathPointColor() const
Returns the color of the path points.
void removeAllCSO(bool useUndoRedo=true, bool shouldApplyRemoveFromGroupRule=true)
Removes all CSOs from this CSOGroup.
int getTimePointIndex() const
Returns the time point index of this CSOGroup.
void setSeedPointStyle(int seedPointStyle)
Sets the style of the seed points.
bool getUsePathPointWidth() const
Returns whether this CSOGroup overrides the path point width of its CSOs.
void setVoxelizeState(bool state)
Sets the 'voxelize' status of this CSOGroup.
CSOGroupRules & getRules()
Returns the rules for this CSOGroup.
void setUsePathPointWidth(bool state)
Sets whether this CSOGroup overrides the path point width of its CSOs.
bool getUseVoxelWriteValue() const
Returns whether this CSOGroup overrides the voxel write value of its CSOs.
const Vector3 & getSeedPointColor() const
Returns the color of the seed points.
CSOList * getCSOList() const
Returns a pointer to the embracing CSOList of this CSOGroup.
CSOPathPointsStyle getPathPointStyle() const
Returns the path point style.
const std::string & getLabel() const
Returns the CSOGroup label.
bool getUseSeedPointAlpha() const
Returns whether this CSOGroup overrides the seed point alpha of its CSOs.
float getPathPointWidth() const
Returns the width of the path points.
void setCSOList(CSOList *csoList)
Sets the embracing CSOList for this CSOGroup.
void setUseVoxelWriteValue(bool state)
Sets whether this CSOGroup overrides the voxel write value of its CSOs.
void setLabel(const std::string &label)
bool getUseVoxelizeState() const
Returns whether this CSOGroup overrides the voxelize state of its CSOs.
bool getUseSeedPointSize() const
Returns whether this CSOGroup overrides the seed point size of its CSOs.
void removeUserData(const std::string &name)
Removes a user data entry.
void setPathPointStyle(CSOPathPointsStyle style)
Sets the path point style.
CSOBoundingBox getVoxelBoundingBox(const Matrix4 &worldToVoxelMatrix, size_t hashKey)
Returns the unified voxel bounding box of all contained CSOs.
void setUseTimePointIndex(bool state)
Sets whether the time point index of this CSOGroup should be used.
void groupChanged()
Marks this CSOGroup as changed (e.g., if a CSO has been added, removed, or changed).
void setVoxelWriteValue(float value)
Sets the voxel write value of this CSOGroup.
A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation...
The CSO represents a contour segmentation object.
The Variant class stores different data types.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
MLint64 MLint
A signed ML integer type with at least 64 bits used for index calculations on very large images even ...
CSOPathPointsStyle
Enumeration of line styles (order as StylePalette::LineStyle).