MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
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
23
24
25// Forward declaration.
26class CSOVoxelSet;
27class CSOVoxelSetList;
28
29
31
33{
34
35public:
42
43 /* METHODS */
44
47 {
48 _csoVoxelSetList = list;
49 }
51 void addCSOVoxelSetId(int id)
52 {
53 _csoVoxelSetIds.push_back(id);
54 }
56 int voxelSetIdAt(size_t index)
57 {
58 return _csoVoxelSetIds[index];
59 }
62 {
63 return static_cast<int>(_csoVoxelSetIds.size());
64 }
66 int csoVoxelSetAt(unsigned int index)
67 {
68 return _csoVoxelSetIds[index];
69 }
72 {
73 return (std::find(_csoVoxelSetIds.begin(), _csoVoxelSetIds.end(), id) != _csoVoxelSetIds.end());
74 }
75
77 void setLabel(const std::string& label)
78 {
79 _label = label;
80 }
82 const std::string& label() const
83 {
84 return _label;
85 }
86
88 void setDescription(const std::string& description)
89 {
90 _description = description;
91 }
93 const std::string& description() const
94 {
95 return _description;
96 }
97
99 void setCSOVoxelSetList(CSOVoxelSetList* csoVoxelSetList)
100 {
101 _csoVoxelSetList = csoVoxelSetList;
102 }
105 {
106 return _csoVoxelSetList;
107 }
108
110 void setUniqueId(int id)
111 {
112 _uniqueId = id;
113 }
115 int uniqueId() const
116 {
117 return _uniqueId;
118 }
119
120
121protected:
122private:
123 /* MEMBER VARIABLES */
124
125 std::vector<int> _csoVoxelSetIds;
126 CSOVoxelSetList* _csoVoxelSetList;
127 int _uniqueId;
128 std::string _label;
129 std::string _description;
130};
131
133
#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 CSOVoxelSetGroup.
int uniqueId() const
Returns the unique ID of this CSOVoxelSetGroup.
bool hasCSOVoxelSetWithId(int id)
Returns true if the specified CSOVoxelSet ID exists in this CSOVoxelSetGroup.
const std::string & description() const
Returns the description of this CSOVoxelSetGroup.
virtual ~CSOVoxelSetGroup()
Standard destructor.
int numCSOVoxelSet()
Returns the number of associated CSOVoxelSets.
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 specified index.
void addCSOVoxelSetId(int id)
Adds an ID of a CSOVoxelSet.
CSOVoxelSetGroup()
Standard constructor. The unique ID is initialized with 0.
const std::string & label() const
Returns the label of this CSOVoxelSetGroup.
void setCSOVoxelSetList(CSOVoxelSetList *csoVoxelSetList)
Sets the pointer to the embracing CSOVoxelSetList.
int voxelSetIdAt(size_t index)
Returns the ID of the voxel set at the specified index.
CSOVoxelSetList * csoVoxelSetList() const
Returns the pointer to the embracing CSOVoxelSetList.
void setDescription(const std::string &description)
Sets the description of this CSOVoxelSetGroup.
void setUniqueId(int id)
Sets the unique ID of this CSOVoxelSetGroup.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.