75 _voxelToWorldMatrix = voxelToWorldMatrix;
80 return _voxelToWorldMatrix;
104 return _boundingBoxV1;
109 return _boundingBoxV2;
114 return _minVoxelValue;
119 return _maxVoxelValue;
125 _csoVoxelSetList = list;
130 return _csoVoxelSetList;
135 return static_cast<unsigned int>(_groupIds.size());
140 return _groupIds[index];
145 _groupIds.push_back(groupId);
154 inline const std::string&
label()
const
206 std::vector<VoxelVector> _sliceVoxels;
207 std::vector<VoxelValueVector> _sliceVoxelValues;
214 std::string _description;
215 std::string _creator;
223 std::vector<int> _groupIds;
233 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 specified 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 specified x and y variables by a voxel position on a specified slice at a specified inde...
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 CSOVoxelSetGroup.
void setUniqueId(int ID)
Sets the unique ID.
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 specified slice at a specified index.
unsigned int numVoxelsOnSliceAt(size_t sliceIndex) const
Returns the number of voxels for the specified slice.
const std::string & description() const
Returns the description.
const VoxelValueVector & getValuesAt(size_t index) const
Returns the list of values at a specified index.
Vector3 getBoundingBoxV2() const
Returns the maximum 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 CSOVoxelSetGroup at the specified index.
Vector3 getVoxelPositionAtSlice(size_t sliceIndex, size_t voxelIndex) const
Returns a voxel position for a specified slice at a specified 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 CSOVoxelSetGroups this is in.
Vector3 getBoundingBoxV1() const
Returns the minimum 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.
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