111 inline unsigned int numGroups()
const {
return static_cast<unsigned int>(_groupIds.size()); }
113 inline int groupIdAt(
size_t index)
const {
return _groupIds[index]; }
120 inline const std::string&
label()
const {
return _label; }
124 inline const std::string&
creator()
const {
return _creator; }
132 inline const std::string&
description()
const {
return _description; }
147 std::vector<VoxelVector> _sliceVoxels;
148 std::vector<VoxelValueVector> _sliceVoxelValues;
155 std::string _description;
156 std::string _creator;
164 std::vector<int> _groupIds;
174 void _sortToSlices(
const std::vector<Vector3>& positions,
const std::vector<MLdouble>& values);
#define MLCSO_EXPORT
Defines export symbols for classes, so they can be used in other DLLs.
The CSOVoxelSet represents a contour segmentation object in discrete voxel coordinates.
void setCSOVoxelSetList(CSOVoxelSetList *list)
Sets the CSOVoxelSetList pointer.
CSOVoxelSet()
Standard constructor. The unique id is initialized with 0.
const VoxelVector & getPositionsAt(size_t index) const
Returns the list of positions at a given index.
void setCreator(const std::string &creatorArg)
Sets the creator.
void getVoxelPositionAtSlice(size_t sliceIndex, size_t voxelIndex, int &x, int &y)
Fills up the given x and y variables by a voxel position on a certain slice at a certain index.
MLdouble getMinVoxelValue() const
Returns the minimum voxel value.
Vector3 getVoxelPositionOfTotal(size_t index) const
Returns a voxel position regardless of its slice.
void addVoxelValuePositions(const std::vector< VoxelPosition > &positions, const std::vector< MLdouble > &values)
Adds a vector of positions at once (MLint).
void addCSOVoxelSetGroupId(int groupId)
Adds an id of a Group.
const std::string & creator() const
Returns the creator.
bool getVoxelValueAtSlice(size_t sliceIndex, size_t voxelIndex, double &val) const
Returns a voxel value for a given slice at a given index.
unsigned int numVoxelsOnSliceAt(size_t sliceIndex) const
Returns the number of voxels for the given slice.
const std::string & description() const
Returns the description.
const VoxelValueVector & getValuesAt(size_t index) const
Returns the list of values at a given index.
Vector3 getBoundingBoxV2() const
Returns the max bounding box corner.
void addVoxelValuePositions(const std::vector< Vector3 > &positions, const std::vector< MLdouble > &values)
Adds a vector of positions at once (double).
int timepoint() const
Returns the timepoint.
void setDescription(const std::string &descriptionArg)
Sets the description.
int groupIdAt(size_t index) const
Returns the id of a Group at the given index.
Vector3 getVoxelPositionAtSlice(size_t sliceIndex, size_t voxelIndex) const
Returns a voxel position for a given slice at a given index.
unsigned int endingSlice() const
Returns the ending slice.
MLdouble getMaxVoxelValue() const
Returns the maximum voxel value.
CSOVoxelSetList * csoVoxelSetList() const
Returns the CSOVoxelSetList pointer.
unsigned int numGroups() const
Returns the number of Groups this is in.
Vector3 getBoundingBoxV1() const
Returns the min bounding box corner.
void setLabel(const std::string &labelArg)
Sets the label.
int uniqueId() const
Returns the unique id.
virtual ~CSOVoxelSet()
Standard destructor.
double getVoxelValueOfTotal(size_t index) const
Returns a voxel value regardless of its slice.
const std::string & label() const
Returns the label.
void setUniqueId(int id)
Sets the unique id.
size_t numTotalVoxels() const
Returns the number of total voxel positions.
size_t numSlices() const
Returns the number of slices the voxels are spread over.
const Matrix4 & getVoxelToWorldMatrix() const
Returns the voxel-to-world matrix.
void setVoxelToWorldMatrix(const Matrix4 &voxelToWorldMatrix)
Sets the voxel-to-world matrix.
unsigned int startingSlice() const
Returns the starting slice.
void setTimepoint(int timepointArg)
Sets the timepoint.
CSOVoxelSet(const CSOVoxelSet &csoVoxelSet)
Copy constructor; the unique id is initialized with 0.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
std::vector< MLdouble > VoxelValueVector
std::vector< Vector3 > VoxelVector