MeVisLab Toolbox Reference
CSOVoxelSetGroup.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2010, 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 
15 
16 #pragma once
17 
18 
19 #include "MLCSOIncludes.h"
20 
21 
22 ML_START_NAMESPACE
23 
24 
25 // Forward declaration.
26 class CSOVoxelSet;
27 class CSOVoxelSetList;
28 
29 
31 
33 {
34 
35 public:
36 
40  CSOVoxelSetGroup(const CSOVoxelSetGroup &csoVoxelSetGroup);
42  virtual ~CSOVoxelSetGroup();
43 
44  /* METHODS */
45 
47  void setVoxelSetList(CSOVoxelSetList* list) { _csoVoxelSetList = list; }
49  void addCSOVoxelSetId(int id) { _csoVoxelSetIds.push_back(id); }
51  int voxelSetIdAt(size_t index) { return _csoVoxelSetIds[index]; }
53  int numCSOVoxelSet() { return static_cast<int>(_csoVoxelSetIds.size()); }
55  int csoVoxelSetAt(unsigned int index) { return _csoVoxelSetIds[index]; }
57  bool hasCSOVoxelSetWithId(int id) { return (std::find(_csoVoxelSetIds.begin(), _csoVoxelSetIds.end(), id) != _csoVoxelSetIds.end() ); }
58 
60  void setLabel(const std::string& label) { _label = label; }
62  const std::string& label() const { return _label; }
63 
65  void setDescription(const std::string& description) { _description = description; }
67  const std::string& description() const { return _description; }
68 
70  void setCSOVoxelSetList(CSOVoxelSetList* csoVoxelSetList) { _csoVoxelSetList = csoVoxelSetList; }
72  CSOVoxelSetList* csoVoxelSetList() const { return _csoVoxelSetList; }
73 
75  void setUniqueId(int id) { _uniqueId = id; }
77  int uniqueId() const { return _uniqueId; }
78 
79 
80 protected:
81 
82 private:
83 
84  /* MEMBER VARIABLES */
85 
86  std::vector<int> _csoVoxelSetIds;
87  CSOVoxelSetList* _csoVoxelSetList;
88  int _uniqueId;
89  std::string _label;
90  std::string _description;
91 };
92 
94 
95 ML_END_NAMESPACE
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
Definition: MLCSOSystem.h:23
void setLabel(const std::string &label)
Sets the label of this group.
int uniqueId() const
Returns the unique id of this Group.
bool hasCSOVoxelSetWithId(int id)
Returns true if the given CSOVoxelSet ID exists in this group.
virtual ~CSOVoxelSetGroup()
Standard destructor.
int numCSOVoxelSet()
Returns the number of associated CSOVoxelSets.
const std::string & label() const
Returns the label of this group.
CSOVoxelSetGroup(const CSOVoxelSetGroup &csoVoxelSetGroup)
Copy constructor; the unique id is initialized with 0.
void setVoxelSetList(CSOVoxelSetList *list)
Sets the pointer to the host CSOVoxelSetList.
int csoVoxelSetAt(unsigned int index)
Returns the id of a CSOVoxelSet at the given index.
void addCSOVoxelSetId(int id)
Adds an id of a CSOVoxelSet.
CSOVoxelSetGroup()
Standard constructor. The unique id is initialized with 0.
const std::string & description() const
Returns the description of this group.
void setCSOVoxelSetList(CSOVoxelSetList *csoVoxelSetList)
Sets the pointer to the embracing CSOVoxelSetList.
CSOVoxelSetList * csoVoxelSetList() const
Returns the pointer to the embracing CSOVoxelSetList.
int voxelSetIdAt(size_t index)
Returns the id of the voxel set at the given index.
void setDescription(const std::string &description)
Sets the description of this group.
void setUniqueId(int id)
Set the unique id of this Group.