MeVisLabToolboxReference
ml::CSO Class Reference

The CSO represents a contour segmentation object. More...

#include <CSO.h>

List of all members.

Public Member Functions

 CSO ()
 Standard constructor. The unique id is initialized with 0.
 CSO (CSOList *csoList)
 Constructor takes a pointer to the CSOList this CSO is in; in this method, the unique id is set.
 CSO (const CSO &cso, CSOList *csoList=NULL, int csoId=-1)
 Copy constructor; the unique id is taken from the given CSOList but if the CSOList is NULL, the unique id of the copied CSO is 0.
virtual ~CSO ()
 Standard destructor.
void reverseSeedPointOrder ()
 Reverses the order of all seed points and clears all path points in between.
void resortSeedPointsClockwise ()
void storeInUndoManager ()
 Stores the geometric information of the CSO in the UndoRedo manager.
CSOManagergetManager () const
bool isSelected () const
 Returns whether this CSO is selected in its CSOList. If there is no enclosing CSOList, the method returns false.
bool saveAttributes (std::ostream &outStream, bool useAscii=false)
 Save attributes to stream and returns whether the saving was successful.
void loadAttributes (std::istream &inStream, short version, bool swapBytes, bool useAscii=false)
 Load attributes from stream.
Methods altering the geometry of this CSO.
void applyTransformationMatrix (const Matrix4 &matrix)
 Applies the given 4x4 matrix on all path and seed points.
void moveSeedPointsAndPathPoints (float dx, float dy, float dz, int timepoint)
 Moves all seed points and all path points by the given coordinates offset and timepoint.
void moveSeedPointsAndPathPoints (float dx, float dy, float dz)
 Moves all seed points and all path points by the given coordinates offset.
void setAbsoluteMovement (float fromX, float fromY, float fromZ, float toX, float toY, float toZ, int fromTimePointIndex, int toTimePointIndex)
 Sets the absolute movement for undo/redo.
void moveSingleSeedPoint (CSOSeedPoint *sPoint, float dx, float dy, float dz)
 Moves a certain seed point by the given coordinate offset.
void setAbsoluteSeedPointMovement ()
 Sets the absolute movement of a single seed point for undo/redo.
void setSeedPointsAndPathPoints (const CSO *cso)
 Sets the seed points and the path point of the given CSO.
Methods for adding / removing seed points or path point lists.
CSOSeedPointappendSeedAndPathPoint ()
 Appends a seed point and a path point list to the end of the seed point list and returns a pointer to it.
CSOSeedPointappendSeedAndPathPoint (const Vector3 &position)
 Appends a seed point and a path point list to the end of the seed point list and returns a pointer to it.
CSOPathPointsinsertPathPointsEndStart ()
 Inserts a CSOPathPoint between the ending and the starting seed points and returns a pointer to it.
CSOSeedPointappendSeedPoint ()
 Appends just a seed point to the internal list and returns a pointer to it.
CSOPathPointsappendPathPoints ()
 Appends just a path point list the internal list and returns a pointer to it.
void removeSeedPoint (CSOSeedPoint *sPoint)
 Removes the given seed point from this CSO.
void removeAllSeedAndPathPoints ()
 Removes all seed points and all path point lists from this CSO.
CSOSeedPointinsertSeedPointAt (CSOPathPoints *toBeSplitPath, const Vector3 &toInsertPos)
 Inserts a seed point into the given toBeSplitPath at the given position.
void setInsertRemoveSeedPoint ()
 Triggers the according undo/redo command to be put on the stack.
Methods for seed point and path point lists access.
CSOSeedPointgetSeedPointAt (unsigned int index) const
 Returns a pointer to the seed point at the given index.
CSOSeedPointgetFirstSeedPoint () const
 Returns a pointer to the first seed point of this CSO.
CSOSeedPointgetLastSeedPoint () const
 Returns a pointer to the last seed point of this CSO.
unsigned int numSeedPoints () const
 Returns the number of seed points.
bool getSeedPointIndex (CSOSeedPoint *sPoint, unsigned int &index) const
 Sets the sIndex to the index of the given seed point and returns whether such a seed point exists.
unsigned int numPathPointLists () const
 Returns the number of path point lists.
void fillPathPointCoordinatesFlattened (std::vector< Vector3 > &pathPointCoords) const
 Fills up the given std::vector<Vector3> with all the path point coordinates in order.
void fillPathPointCoordinatesFlattened (std::vector< Vector4 > &pathPointCoordsAndValues) const
 Fills up the given std::vector<Vector4> with all the path point coordinates and values in order.
CSOPathPointsgetPathPointsAt (unsigned int index) const
 Returns the list of path points at a given position.
unsigned int getTotalNumPathPoints () const
 Returns the total number of path points in this CSO; this number may differ from the number of path points obtained by a flattened positions vector.
unsigned int getTotalNumUniquePathPoints () const
 Returns the total number of unique path points in this CSO; this number equals the number of path points obtained by a flattened positions vector.
Methods for handling selected seed points.
void addSelectedSeedPoint (CSOSeedPoint *sPoint)
 Adds the given seed point to the list of selected seed points.
void setSelectedSeedPoint (CSOSeedPoint *sPoint)
 Sets the given seed point as being selected, and deselects all previously selected seed points.
bool isSelectedSeedPoint (CSOSeedPoint *sPoint) const
 Returns whether the given seed point is selected.
void clearSelectedSeedPoints ()
 Clears the list of selected seed points.
unsigned int getNumSelectedSeedPoints () const
 Returns the number of selected seed points.
CSOSeedPointgetSelectedSeedPointAt (unsigned int index) const
 Returns a pointer to a selected seed point at the given index.
Methods for handling grouping.
void addGroup (CSOGroup *group)
 Adds a group to this CSO.
void addGroup (unsigned int groupId)
 Adds a group to this CSO by its Id.
bool isInGroup (CSOGroup *group) const
 Returns whether this CSO is in the given Group.
bool isInSameGroupsAs (CSO *cso) const
bool isInGroup (unsigned int groupId) const
 Returns whether this CSO is in the group with the given ID.
unsigned int numGroups () const
 Returns the number of groups this CSO is in.
CSOGroupgetGroupAt (unsigned int index) const
 Returns the group at the specified index. If the index is out of bounds, NULL is returned.
unsigned int getGroupIdAt (unsigned int index) const
 Returns a group id at the specified index.
void removeGroup (CSOGroup *group)
 Removes the given group from the internal list.
void removeAllGroups ()
 Removes all groups from this CSO.
Methods for setting / getting type information.
void setType (const std::string &type)
 Sets the type of the CSO. This is set by the Processor, which generates this CSO.
const std::string & getType () const
 Returns the type of the CSO. This is set by the Processor, which generated this CSO.
void setSubType (const std::string &subtype)
 Sets the subtype of the CSO. This is set by the Processor, which generates this CSO.
const std::string & getSubType () const
 Returns the type of the CSO. This is set by the Processor, which generated this CSO.
void setCreatorId (int id)
 Sets the creator ID of the CSO. This is set by the Processor, which generates this CSO.
int getCreatorId () const
 Returns the creator ID of the CSO. This is set by the Processor, which generated this CSO.
Methods setting / reading out the user data values.
void setUserData (const std::string &name, Variant value)
 Sets or adds a user data value under the given name.
Variant getUserData (const std::string &name) const
 Returns the user data under the given name or an invalid value if the entry does not exist.
void getUserDataNames (std::vector< std::string > &names) const
 Fills the given vector with the keys/name under which user data are stored for this CSO.
void removeUserData (const std::string &name)
 Removes a user data entry.
Methods for handling geometric aspects of this CSO.
const CSOBoundingBoxgetWorldBoundingBox () const
 Returns the bounding box of this contour in world coordinates.
const CSOBoundingBoxgetVoxelBoundingBox (const Matrix4 &worldToVoxelMatrix) const
 Returns the bounding box of this contour in voxel coordinates computed by the given (image) matrix.
const CSOBoundingBoxgetVoxelBoundingBoxSeedPoints (const Matrix4 &worldToVoxelMatrix) const
 Returns the bounding box of the seed points of this CSO in voxel coordinates computed by the given (image) matrix.
void setWorldToVoxelMatrix (const Matrix4 &mat)
 Sets the internal matrix to the world-to-voxel matrix of the image this CSO was generated on.
const Matrix4getWorldToVoxelMatrix () const
 Returns the world-to-voxel matrix of the image this CSO was generated on.
bool isInPlane ()
 Returns the plane status (do all seed points lie in a plane?). If the method returns 'true', the plane normal is also valid.
bool isInPlane (Vector3 &planeNormal)
 Returns the plane status and fills the argument vector with the plane normal (only valid if all seed points lie in a plane).
const Vector3getPlaneNormal () const
 Returns the plane normal. Only valid, if isInPlane returns 'true'.
void computePlaneNormal ()
 Forces to recompute the plane normal (status).
void setIsInPlane (bool status)
 Sets the plane normal status for this CSO.
void setPlaneNormal (const Vector3 &planeNormal)
 Sets the plane normal which becomes valid by this.
void invalidatePlaneNormal ()
 Invalidates the plane normal.
float getLength () const
 Returns the length of this CSO (this is sum of the the euclidean distances between all successive path points).
double getArea () const
 Returns the area of this CSO (this value is only meaningful if all points lie in a plane)
void invalidateArea ()
 Invalidates the internal area flag, so it can be recomputed.
void setIsClosed (bool isClosed)
 Sets the closed state of this contour.
bool isClosed () const
 Returns whether the CSO is closed.
bool isPoint () const
 Returns whether the CSO is just a point.
void setIsFinished (bool isFinished)
 Sets the finished status of this contour. Note that the finished status is set to 'true' if the contour is set to isClosed = true.
bool getIsFinished () const
 Returns the finished status of this contour.
void setNeedsInterpolation (bool needsInterpolation)
 Sets if this CSO needs interpolation.
bool getNeedsInterpolation () const
 Returns whether this CSO needs interpolation.
void determineNeedsInterpolation ()
 Determines by investigating the CSO's seed points if this CSO needs interpolation and sets this state to the CSO's internal variable.
void setNeedInterpolationAllSeedPoints (bool needsInterpolation)
 Sets the need for interpolation to all member seed points.
void setNeedInterpolation (CSOSeedPoint *seedPoint)
 Sets the need of being interpolated to the given seed point and to the CSO's state.
void pathChanged ()
 Sets any pre-computed values depending on the exact path to invalid.
Maintenance methods.
void setCSOList (CSOList *csoList)
 Sets the internal pointer to the embracing CSOList.
CSOListgetCSOList () const
 Returns the internal pointer to the embracing CSOList.
unsigned int getId () const
 Returns the unique ID of this CSO.
Methods for handling various states.
void setLabel (const std::string &label)
 Sets the label of this CSO.
const std::string & getLabel () const
 Returns the label of this CSO.
void setDescription (std::string description)
 Sets the description of this CSO.
const std::string & getDescription () const
 Returns the description of this CSO.
void setTimePointIndex (int index)
 Sets the time point index of this CSO.
int getTimePointIndex () const
 Returns the time point index of this CSO.
void setShowState (bool state)
 Sets the 'show' status of this CSO.
bool getShowState () const
 Returns the 'show' status of this CSO.
void setVoxelizeState (bool state)
 Sets the 'voxelize' state of this CSO.
bool getVoxelizeState () const
 Returns the 'voxelize' state of this CSO.
void setEditableState (bool state)
 Sets the 'editable' state of this CSO.
bool getEditableState () const
 Returns the 'editable' state of this CSO.
void setPathPointStyle (CSOLineStyle style)
 Sets the style of the path points.
void setPathPointStyle (int style)
 Sets the style of the path points as an int.
CSOLineStyle getPathPointStyle () const
 Returns the style of the path points.
void setPathPointWidth (float width)
 Sets the width of the path points.
float getPathPointWidth () const
 Returns the width of the path points.
void setPathPointColor (const Vector3 &color)
 Sets the color of the path points.
Vector3 getPathPointColor () const
 Returns the color of the path points.
void setPathPointAlpha (float alpha)
 Sets the alpha value of the path points.
float getPathPointAlpha () const
 Returns the alpha value of the path points.
void setSeedPointStyle (int style)
 Sets the style of the seed points.
int getSeedPointStyle () const
 Returns the style of the seed points.
void setSeedPointSize (float size)
 Sets the size of the seed points.
float getSeedPointSize () const
 Returns the size of the seed points.
void setSeedPointColor (const Vector3 &color)
 Sets the color of the seed points.
Vector3 getSeedPointColor () const
 Returns the color of the seed points.
void setSeedPointAlpha (float alpha)
 Sets the alpha value of the seed points.
float getSeedPointAlpha () const
 Returns the alpha value of the seed points.
void setVoxelWriteMode (int mode)
 Sets the voxel write mode of this CSO.
int getVoxelWriteMode () const
 Returns the voxel write mode of this CSO.
void setVoxelWriteValue (float value)
 Sets the voxel write value of this CSO.
float getVoxelWriteValue () const
 Returns the voxel write value of this CSO.
void setAllValuesTo (float value)
 Sets all position values to the given value.
Private set / get methods handle internal states (are not overwritten by CSOGroups).
int getPrivateTimePointIndex () const
 Returns the private attribute 'timePointIndex'.
bool getPrivateShowState () const
 Returns the private attribute 'showState'.
bool getPrivateVoxelizeState () const
 Returns the private attribute 'voxelizeState'.
bool getPrivateEditableState () const
 Returns the private attribute 'editableState'.
int getPrivatePathPointStyle () const
 Returns the private attribute 'path point style'.
float getPrivatePathPointWidth () const
 Returns the private attribute 'path point width'.
Vector3 getPrivatePathPointColor () const
 Returns the private attribute 'path point color'.
float getPrivatePathPointAlpha () const
 Returns the private attribute 'path point alpha'.
int getPrivateSeedPointStyle () const
 Returns the private attribute 'seed point style'.
float getPrivateSeedPointSize () const
 Returns the private attribute 'seed point size'.
Vector3 getPrivateSeedPointColor () const
 Returns the private attribute 'seed point color'.
float getPrivateSeedPointAlpha () const
 Returns the private attribute 'seed point alpha'.
int getPrivateVoxelWriteMode () const
 Returns the private attribute 'voxelWriteMode'.
float getPrivateVoxelWriteValue () const
 Returns the private attribute 'voxelWriteValue'.
void setPrivateIsFinished (bool isFinished)
 Sets the 'isFinished' flag without any side effects.
void setPrivateIsClosed (bool isClosedP)
 Sets the 'isClosed' flag without any side effects.
void setPrivateIsInPlane (bool isInPlaneP)
 Sets the 'isInPlane' flag without any side effects.
void setPrivateBoundingBox (const CSOBoundingBox &bb)
 Sets the bounding box of this CSO.
void setPrivatePlaneNormal (const Vector3 &normal)
 Sets the plane normal of this CSO.
void setId (unsigned int newId)
 Sets the unique ID of this CSO.
void moveSeedPoints (float dx, float dy, float dz, int timepoint)
 /deprecated Use moveSeedPointsAndPathPoints() instead.
void setLineStyle (CSOLineStyle style)
 /deprecated Use setPathPointStyle() instead.
CSOLineStyle getLineStyle () const
 /deprecated Use getPathPointStyle() instead.
void setColor (const Vector3 &color)
 /deprecated Use setPathPointColor() instead.
Vector3 getColor () const
 /deprecated Use getPathPointColor() instead.
void setAlpha (float alpha)
 /deprecated Use setPathPointAlpha() instead.
float getAlpha () const
 /deprecated Use getPathPointAlpha() instead.
void setLineWidth (float width)
 /deprecated Use setPathPointWidth() instead.
float getLineWidth () const
 /deprecated Use getPathPointWidth() instead.
void setMarkerMode (int mode)
 /deprecated Use setSeedPointStyle() instead.
int getMarkerMode () const
 /deprecated Use getSeedPointStyle() instead.
void setMarkerColor (const Vector3 &color)
 /deprecated Use setSeedPointColor() instead.
Vector3 getMarkerColor () const
 /deprecated Use getSeedPointColor() instead.
void setMarkerAlpha (float alpha)
 /deprecated Use setSeedPointAlpha() instead.
float getMarkerAlpha () const
 /deprecated Use getSeedPointAlpha() instead.
void setMarkerSize (float size)
 /deprecated Use setSeedPointSize() instead.
float getMarkerSize () const
 /deprecated Use getSeedPointSize() instead.
CSOLineStyle getPrivateLineStyle () const
 /deprecated Use getPrivatePathPointStyle() instead.
Vector3 getPrivateColor () const
 /deprecated Use getPrivatePathPointColor() instead.
float getPrivateAlpha () const
 /deprecated Use getPrivatePathPointAlpha() instead.
float getPrivateLineWidth () const
 /deprecated Use getPrivatePathPointWidth() instead.
int getPrivateMarkerMode () const
 /deprecated Use getPrivateSeedPointStyle() instead.
Vector3 getPrivateMarkerColor () const
 /deprecated Use getPrivateSeedPointColor() instead.
float getPrivateMarkerAlpha () const
 /deprecated Use getPrivateSeedPointAlpha() instead.
float getPrivateMarkerSize () const
 /deprecated Use getPrivateSeedPointSize() instead.

Detailed Description

The CSO represents a contour segmentation object.

It consists of a number of seed points and a number of path point lists whose points connect the seed points. The CSO has also a pointer to its embracing CSOList, and can be in a number of CSOGroups.

Definition at line 38 of file CSO.h.


Constructor & Destructor Documentation

ml::CSO::CSO ( )

Standard constructor. The unique id is initialized with 0.

ml::CSO::CSO ( CSOList csoList)

Constructor takes a pointer to the CSOList this CSO is in; in this method, the unique id is set.

ml::CSO::CSO ( const CSO cso,
CSOList csoList = NULL,
int  csoId = -1 
)

Copy constructor; the unique id is taken from the given CSOList but if the CSOList is NULL, the unique id of the copied CSO is 0.

If copied CSO should be in another csoList, provide a pointer to it.

virtual ml::CSO::~CSO ( ) [virtual]

Standard destructor.


Member Function Documentation

void ml::CSO::addGroup ( CSOGroup group)

Adds a group to this CSO.

void ml::CSO::addGroup ( unsigned int  groupId)

Adds a group to this CSO by its Id.

void ml::CSO::addSelectedSeedPoint ( CSOSeedPoint sPoint)

Adds the given seed point to the list of selected seed points.

CSOPathPoints* ml::CSO::appendPathPoints ( )

Appends just a path point list the internal list and returns a pointer to it.

CSOSeedPoint* ml::CSO::appendSeedAndPathPoint ( )

Appends a seed point and a path point list to the end of the seed point list and returns a pointer to it.

CSOSeedPoint* ml::CSO::appendSeedAndPathPoint ( const Vector3 position)

Appends a seed point and a path point list to the end of the seed point list and returns a pointer to it.

CSOSeedPoint* ml::CSO::appendSeedPoint ( )

Appends just a seed point to the internal list and returns a pointer to it.

void ml::CSO::applyTransformationMatrix ( const Matrix4 matrix)

Applies the given 4x4 matrix on all path and seed points.

void ml::CSO::clearSelectedSeedPoints ( )

Clears the list of selected seed points.

void ml::CSO::computePlaneNormal ( ) [inline]

Forces to recompute the plane normal (status).

Definition at line 247 of file CSO.h.

void ml::CSO::determineNeedsInterpolation ( )

Determines by investigating the CSO's seed points if this CSO needs interpolation and sets this state to the CSO's internal variable.

void ml::CSO::fillPathPointCoordinatesFlattened ( std::vector< Vector3 > &  pathPointCoords) const

Fills up the given std::vector<Vector3> with all the path point coordinates in order.

void ml::CSO::fillPathPointCoordinatesFlattened ( std::vector< Vector4 > &  pathPointCoordsAndValues) const

Fills up the given std::vector<Vector4> with all the path point coordinates and values in order.

float ml::CSO::getAlpha ( ) const [inline]

/deprecated Use getPathPointAlpha() instead.

Definition at line 459 of file CSO.h.

double ml::CSO::getArea ( ) const [inline]

Returns the area of this CSO (this value is only meaningful if all points lie in a plane)

Definition at line 257 of file CSO.h.

Vector3 ml::CSO::getColor ( ) const [inline]

/deprecated Use getPathPointColor() instead.

Definition at line 453 of file CSO.h.

int ml::CSO::getCreatorId ( ) const [inline]

Returns the creator ID of the CSO. This is set by the Processor, which generated this CSO.

Definition at line 209 of file CSO.h.

CSOList* ml::CSO::getCSOList ( ) const [inline]

Returns the internal pointer to the embracing CSOList.

Definition at line 297 of file CSO.h.

const std::string& ml::CSO::getDescription ( ) const [inline]

Returns the description of this CSO.

Definition at line 313 of file CSO.h.

bool ml::CSO::getEditableState ( ) const

Returns the 'editable' state of this CSO.

CSOSeedPoint* ml::CSO::getFirstSeedPoint ( ) const [inline]

Returns a pointer to the first seed point of this CSO.

Definition at line 124 of file CSO.h.

CSOGroup* ml::CSO::getGroupAt ( unsigned int  index) const

Returns the group at the specified index. If the index is out of bounds, NULL is returned.

unsigned int ml::CSO::getGroupIdAt ( unsigned int  index) const [inline]

Returns a group id at the specified index.

For performance reasons it is not checked whether the index is valid.

Definition at line 187 of file CSO.h.

unsigned int ml::CSO::getId ( void  ) const [inline]

Returns the unique ID of this CSO.

Definition at line 299 of file CSO.h.

bool ml::CSO::getIsFinished ( ) const [inline]

Returns the finished status of this contour.

Definition at line 273 of file CSO.h.

const std::string& ml::CSO::getLabel ( ) const [inline]

Returns the label of this CSO.

Definition at line 309 of file CSO.h.

CSOSeedPoint* ml::CSO::getLastSeedPoint ( ) const [inline]

Returns a pointer to the last seed point of this CSO.

Definition at line 126 of file CSO.h.

float ml::CSO::getLength ( ) const

Returns the length of this CSO (this is sum of the the euclidean distances between all successive path points).

CSOLineStyle ml::CSO::getLineStyle ( ) const [inline]

/deprecated Use getPathPointStyle() instead.

Definition at line 447 of file CSO.h.

float ml::CSO::getLineWidth ( ) const [inline]

/deprecated Use getPathPointWidth() instead.

Definition at line 465 of file CSO.h.

CSOManager* ml::CSO::getManager ( ) const
float ml::CSO::getMarkerAlpha ( ) const [inline]

/deprecated Use getSeedPointAlpha() instead.

Definition at line 483 of file CSO.h.

Vector3 ml::CSO::getMarkerColor ( ) const [inline]

/deprecated Use getSeedPointColor() instead.

Definition at line 477 of file CSO.h.

int ml::CSO::getMarkerMode ( ) const [inline]

/deprecated Use getSeedPointStyle() instead.

Definition at line 471 of file CSO.h.

float ml::CSO::getMarkerSize ( ) const [inline]

/deprecated Use getSeedPointSize() instead.

Definition at line 489 of file CSO.h.

bool ml::CSO::getNeedsInterpolation ( ) const [inline]

Returns whether this CSO needs interpolation.

Definition at line 277 of file CSO.h.

unsigned int ml::CSO::getNumSelectedSeedPoints ( ) const

Returns the number of selected seed points.

float ml::CSO::getPathPointAlpha ( ) const

Returns the alpha value of the path points.

Vector3 ml::CSO::getPathPointColor ( ) const

Returns the color of the path points.

CSOPathPoints* ml::CSO::getPathPointsAt ( unsigned int  index) const [inline]

Returns the list of path points at a given position.

For performance reasons it is not checked if the index is valid.

Definition at line 139 of file CSO.h.

CSOLineStyle ml::CSO::getPathPointStyle ( ) const

Returns the style of the path points.

float ml::CSO::getPathPointWidth ( ) const

Returns the width of the path points.

const Vector3& ml::CSO::getPlaneNormal ( ) const [inline]

Returns the plane normal. Only valid, if isInPlane returns 'true'.

Definition at line 245 of file CSO.h.

float ml::CSO::getPrivateAlpha ( ) const [inline]

/deprecated Use getPrivatePathPointAlpha() instead.

Definition at line 498 of file CSO.h.

Vector3 ml::CSO::getPrivateColor ( ) const [inline]

/deprecated Use getPrivatePathPointColor() instead.

Definition at line 495 of file CSO.h.

bool ml::CSO::getPrivateEditableState ( ) const [inline]

Returns the private attribute 'editableState'.

Definition at line 390 of file CSO.h.

CSOLineStyle ml::CSO::getPrivateLineStyle ( ) const [inline]

/deprecated Use getPrivatePathPointStyle() instead.

Definition at line 492 of file CSO.h.

float ml::CSO::getPrivateLineWidth ( ) const [inline]

/deprecated Use getPrivatePathPointWidth() instead.

Definition at line 501 of file CSO.h.

float ml::CSO::getPrivateMarkerAlpha ( ) const [inline]

/deprecated Use getPrivateSeedPointAlpha() instead.

Definition at line 510 of file CSO.h.

Vector3 ml::CSO::getPrivateMarkerColor ( ) const [inline]

/deprecated Use getPrivateSeedPointColor() instead.

Definition at line 507 of file CSO.h.

int ml::CSO::getPrivateMarkerMode ( ) const [inline]

/deprecated Use getPrivateSeedPointStyle() instead.

Definition at line 504 of file CSO.h.

float ml::CSO::getPrivateMarkerSize ( ) const [inline]

/deprecated Use getPrivateSeedPointSize() instead.

Definition at line 513 of file CSO.h.

float ml::CSO::getPrivatePathPointAlpha ( ) const [inline]

Returns the private attribute 'path point alpha'.

Definition at line 398 of file CSO.h.

Vector3 ml::CSO::getPrivatePathPointColor ( ) const [inline]

Returns the private attribute 'path point color'.

Definition at line 396 of file CSO.h.

int ml::CSO::getPrivatePathPointStyle ( ) const [inline]

Returns the private attribute 'path point style'.

Definition at line 392 of file CSO.h.

float ml::CSO::getPrivatePathPointWidth ( ) const [inline]

Returns the private attribute 'path point width'.

Definition at line 394 of file CSO.h.

float ml::CSO::getPrivateSeedPointAlpha ( ) const [inline]

Returns the private attribute 'seed point alpha'.

Definition at line 406 of file CSO.h.

Vector3 ml::CSO::getPrivateSeedPointColor ( ) const [inline]

Returns the private attribute 'seed point color'.

Definition at line 404 of file CSO.h.

float ml::CSO::getPrivateSeedPointSize ( ) const [inline]

Returns the private attribute 'seed point size'.

Definition at line 402 of file CSO.h.

int ml::CSO::getPrivateSeedPointStyle ( ) const [inline]

Returns the private attribute 'seed point style'.

Definition at line 400 of file CSO.h.

bool ml::CSO::getPrivateShowState ( ) const [inline]

Returns the private attribute 'showState'.

Definition at line 386 of file CSO.h.

int ml::CSO::getPrivateTimePointIndex ( ) const [inline]

Returns the private attribute 'timePointIndex'.

Definition at line 384 of file CSO.h.

bool ml::CSO::getPrivateVoxelizeState ( ) const [inline]

Returns the private attribute 'voxelizeState'.

Definition at line 388 of file CSO.h.

int ml::CSO::getPrivateVoxelWriteMode ( ) const [inline]

Returns the private attribute 'voxelWriteMode'.

Definition at line 409 of file CSO.h.

float ml::CSO::getPrivateVoxelWriteValue ( ) const [inline]

Returns the private attribute 'voxelWriteValue'.

Definition at line 411 of file CSO.h.

float ml::CSO::getSeedPointAlpha ( ) const

Returns the alpha value of the seed points.

CSOSeedPoint* ml::CSO::getSeedPointAt ( unsigned int  index) const

Returns a pointer to the seed point at the given index.

Vector3 ml::CSO::getSeedPointColor ( ) const

Returns the color of the seed points.

bool ml::CSO::getSeedPointIndex ( CSOSeedPoint sPoint,
unsigned int &  index 
) const

Sets the sIndex to the index of the given seed point and returns whether such a seed point exists.

float ml::CSO::getSeedPointSize ( ) const

Returns the size of the seed points.

int ml::CSO::getSeedPointStyle ( ) const

Returns the style of the seed points.

CSOSeedPoint* ml::CSO::getSelectedSeedPointAt ( unsigned int  index) const

Returns a pointer to a selected seed point at the given index.

bool ml::CSO::getShowState ( ) const

Returns the 'show' status of this CSO.

const std::string& ml::CSO::getSubType ( ) const [inline]

Returns the type of the CSO. This is set by the Processor, which generated this CSO.

Definition at line 205 of file CSO.h.

int ml::CSO::getTimePointIndex ( ) const

Returns the time point index of this CSO.

unsigned int ml::CSO::getTotalNumPathPoints ( ) const

Returns the total number of path points in this CSO; this number may differ from the number of path points obtained by a flattened positions vector.

unsigned int ml::CSO::getTotalNumUniquePathPoints ( ) const

Returns the total number of unique path points in this CSO; this number equals the number of path points obtained by a flattened positions vector.

const std::string& ml::CSO::getType ( ) const [inline]

Returns the type of the CSO. This is set by the Processor, which generated this CSO.

Definition at line 201 of file CSO.h.

Variant ml::CSO::getUserData ( const std::string &  name) const [inline]

Returns the user data under the given name or an invalid value if the entry does not exist.

Definition at line 219 of file CSO.h.

void ml::CSO::getUserDataNames ( std::vector< std::string > &  names) const [inline]

Fills the given vector with the keys/name under which user data are stored for this CSO.

Definition at line 221 of file CSO.h.

const CSOBoundingBox& ml::CSO::getVoxelBoundingBox ( const Matrix4 worldToVoxelMatrix) const

Returns the bounding box of this contour in voxel coordinates computed by the given (image) matrix.

const CSOBoundingBox& ml::CSO::getVoxelBoundingBoxSeedPoints ( const Matrix4 worldToVoxelMatrix) const

Returns the bounding box of the seed points of this CSO in voxel coordinates computed by the given (image) matrix.

bool ml::CSO::getVoxelizeState ( ) const

Returns the 'voxelize' state of this CSO.

int ml::CSO::getVoxelWriteMode ( ) const

Returns the voxel write mode of this CSO.

float ml::CSO::getVoxelWriteValue ( ) const

Returns the voxel write value of this CSO.

const CSOBoundingBox& ml::CSO::getWorldBoundingBox ( ) const

Returns the bounding box of this contour in world coordinates.

const Matrix4& ml::CSO::getWorldToVoxelMatrix ( ) const

Returns the world-to-voxel matrix of the image this CSO was generated on.

CSOPathPoints* ml::CSO::insertPathPointsEndStart ( )

Inserts a CSOPathPoint between the ending and the starting seed points and returns a pointer to it.

CSOSeedPoint* ml::CSO::insertSeedPointAt ( CSOPathPoints toBeSplitPath,
const Vector3 toInsertPos 
)

Inserts a seed point into the given toBeSplitPath at the given position.

void ml::CSO::invalidateArea ( ) [inline]

Invalidates the internal area flag, so it can be recomputed.

Definition at line 259 of file CSO.h.

void ml::CSO::invalidatePlaneNormal ( ) [inline]

Invalidates the plane normal.

Definition at line 253 of file CSO.h.

bool ml::CSO::isClosed ( ) const [inline]

Returns whether the CSO is closed.

Definition at line 267 of file CSO.h.

bool ml::CSO::isInGroup ( unsigned int  groupId) const

Returns whether this CSO is in the group with the given ID.

bool ml::CSO::isInGroup ( CSOGroup group) const

Returns whether this CSO is in the given Group.

bool ml::CSO::isInPlane ( Vector3 planeNormal)

Returns the plane status and fills the argument vector with the plane normal (only valid if all seed points lie in a plane).

bool ml::CSO::isInPlane ( ) [inline]

Returns the plane status (do all seed points lie in a plane?). If the method returns 'true', the plane normal is also valid.

Definition at line 241 of file CSO.h.

References isInPlane().

Referenced by isInPlane().

bool ml::CSO::isInSameGroupsAs ( CSO cso) const
bool ml::CSO::isPoint ( ) const

Returns whether the CSO is just a point.

bool ml::CSO::isSelected ( ) const

Returns whether this CSO is selected in its CSOList. If there is no enclosing CSOList, the method returns false.

bool ml::CSO::isSelectedSeedPoint ( CSOSeedPoint sPoint) const

Returns whether the given seed point is selected.

void ml::CSO::loadAttributes ( std::istream &  inStream,
short  version,
bool  swapBytes,
bool  useAscii = false 
)

Load attributes from stream.

void ml::CSO::moveSeedPoints ( float  dx,
float  dy,
float  dz,
int  timepoint 
) [inline]

/deprecated Use moveSeedPointsAndPathPoints() instead.

Definition at line 439 of file CSO.h.

void ml::CSO::moveSeedPointsAndPathPoints ( float  dx,
float  dy,
float  dz 
)

Moves all seed points and all path points by the given coordinates offset.

void ml::CSO::moveSeedPointsAndPathPoints ( float  dx,
float  dy,
float  dz,
int  timepoint 
)

Moves all seed points and all path points by the given coordinates offset and timepoint.

void ml::CSO::moveSingleSeedPoint ( CSOSeedPoint sPoint,
float  dx,
float  dy,
float  dz 
)

Moves a certain seed point by the given coordinate offset.

unsigned int ml::CSO::numGroups ( ) const [inline]

Returns the number of groups this CSO is in.

Definition at line 182 of file CSO.h.

unsigned int ml::CSO::numPathPointLists ( ) const [inline]

Returns the number of path point lists.

Definition at line 132 of file CSO.h.

unsigned int ml::CSO::numSeedPoints ( ) const [inline]

Returns the number of seed points.

Definition at line 128 of file CSO.h.

void ml::CSO::pathChanged ( )

Sets any pre-computed values depending on the exact path to invalid.

void ml::CSO::removeAllGroups ( )

Removes all groups from this CSO.

void ml::CSO::removeAllSeedAndPathPoints ( )

Removes all seed points and all path point lists from this CSO.

void ml::CSO::removeGroup ( CSOGroup group)

Removes the given group from the internal list.

void ml::CSO::removeSeedPoint ( CSOSeedPoint sPoint)

Removes the given seed point from this CSO.

void ml::CSO::removeUserData ( const std::string &  name) [inline]

Removes a user data entry.

Definition at line 223 of file CSO.h.

void ml::CSO::resortSeedPointsClockwise ( )
Deprecated:
calls reverseSeedPointOrder
void ml::CSO::reverseSeedPointOrder ( )

Reverses the order of all seed points and clears all path points in between.

bool ml::CSO::saveAttributes ( std::ostream &  outStream,
bool  useAscii = false 
)

Save attributes to stream and returns whether the saving was successful.

void ml::CSO::setAbsoluteMovement ( float  fromX,
float  fromY,
float  fromZ,
float  toX,
float  toY,
float  toZ,
int  fromTimePointIndex,
int  toTimePointIndex 
)

Sets the absolute movement for undo/redo.

void ml::CSO::setAbsoluteSeedPointMovement ( )

Sets the absolute movement of a single seed point for undo/redo.

void ml::CSO::setAllValuesTo ( float  value)

Sets all position values to the given value.

void ml::CSO::setAlpha ( float  alpha) [inline]

/deprecated Use setPathPointAlpha() instead.

Definition at line 456 of file CSO.h.

void ml::CSO::setColor ( const Vector3 color) [inline]

/deprecated Use setPathPointColor() instead.

Definition at line 450 of file CSO.h.

void ml::CSO::setCreatorId ( int  id) [inline]

Sets the creator ID of the CSO. This is set by the Processor, which generates this CSO.

Definition at line 207 of file CSO.h.

void ml::CSO::setCSOList ( CSOList csoList)

Sets the internal pointer to the embracing CSOList.

Note that this method does not alter this CSO's unique id, so it may become invalid (not unique) in the new CSOList.

void ml::CSO::setDescription ( std::string  description)

Sets the description of this CSO.

void ml::CSO::setEditableState ( bool  state)

Sets the 'editable' state of this CSO.

void ml::CSO::setId ( unsigned int  newId) [inline]

Sets the unique ID of this CSO.

The internal unique id counter of the CSOList is not incremented. If the manually given id is unique, the CSO can still be retrieved by 'getCSOById' from the CSOList.

Definition at line 426 of file CSO.h.

void ml::CSO::setInsertRemoveSeedPoint ( )

Triggers the according undo/redo command to be put on the stack.

void ml::CSO::setIsClosed ( bool  isClosed)

Sets the closed state of this contour.

Besides setting the closed state, the method also inserts a new CSOPathPoint list between the last and the first seed point, as well as connecting those via pointers. If you just want to set the closed state without any side effects, use the method setPrivateIsClosed().

void ml::CSO::setIsFinished ( bool  isFinished) [inline]

Sets the finished status of this contour. Note that the finished status is set to 'true' if the contour is set to isClosed = true.

Definition at line 271 of file CSO.h.

void ml::CSO::setIsInPlane ( bool  status) [inline]

Sets the plane normal status for this CSO.

Definition at line 249 of file CSO.h.

void ml::CSO::setLabel ( const std::string &  label)

Sets the label of this CSO.

void ml::CSO::setLineStyle ( CSOLineStyle  style) [inline]

/deprecated Use setPathPointStyle() instead.

Definition at line 444 of file CSO.h.

void ml::CSO::setLineWidth ( float  width) [inline]

/deprecated Use setPathPointWidth() instead.

Definition at line 462 of file CSO.h.

void ml::CSO::setMarkerAlpha ( float  alpha) [inline]

/deprecated Use setSeedPointAlpha() instead.

Definition at line 480 of file CSO.h.

void ml::CSO::setMarkerColor ( const Vector3 color) [inline]

/deprecated Use setSeedPointColor() instead.

Definition at line 474 of file CSO.h.

void ml::CSO::setMarkerMode ( int  mode) [inline]

/deprecated Use setSeedPointStyle() instead.

Definition at line 468 of file CSO.h.

void ml::CSO::setMarkerSize ( float  size) [inline]

/deprecated Use setSeedPointSize() instead.

Definition at line 486 of file CSO.h.

void ml::CSO::setNeedInterpolation ( CSOSeedPoint seedPoint) [inline]

Sets the need of being interpolated to the given seed point and to the CSO's state.

Definition at line 283 of file CSO.h.

References ml::CSOSeedPoint::setNeedsInterpolation().

void ml::CSO::setNeedInterpolationAllSeedPoints ( bool  needsInterpolation)

Sets the need for interpolation to all member seed points.

void ml::CSO::setNeedsInterpolation ( bool  needsInterpolation) [inline]

Sets if this CSO needs interpolation.

Definition at line 275 of file CSO.h.

void ml::CSO::setPathPointAlpha ( float  alpha)

Sets the alpha value of the path points.

void ml::CSO::setPathPointColor ( const Vector3 color)

Sets the color of the path points.

void ml::CSO::setPathPointStyle ( CSOLineStyle  style)

Sets the style of the path points.

void ml::CSO::setPathPointStyle ( int  style) [inline]

Sets the style of the path points as an int.

Definition at line 334 of file CSO.h.

References setPathPointStyle().

Referenced by setPathPointStyle().

void ml::CSO::setPathPointWidth ( float  width)

Sets the width of the path points.

void ml::CSO::setPlaneNormal ( const Vector3 planeNormal) [inline]

Sets the plane normal which becomes valid by this.

Definition at line 251 of file CSO.h.

void ml::CSO::setPrivateBoundingBox ( const CSOBoundingBox bb) [inline]

Sets the bounding box of this CSO.

Definition at line 421 of file CSO.h.

void ml::CSO::setPrivateIsClosed ( bool  isClosedP) [inline]

Sets the 'isClosed' flag without any side effects.

Definition at line 417 of file CSO.h.

void ml::CSO::setPrivateIsFinished ( bool  isFinished) [inline]

Sets the 'isFinished' flag without any side effects.

Definition at line 415 of file CSO.h.

void ml::CSO::setPrivateIsInPlane ( bool  isInPlaneP) [inline]

Sets the 'isInPlane' flag without any side effects.

Definition at line 419 of file CSO.h.

void ml::CSO::setPrivatePlaneNormal ( const Vector3 normal) [inline]

Sets the plane normal of this CSO.

Definition at line 423 of file CSO.h.

void ml::CSO::setSeedPointAlpha ( float  alpha)

Sets the alpha value of the seed points.

void ml::CSO::setSeedPointColor ( const Vector3 color)

Sets the color of the seed points.

void ml::CSO::setSeedPointsAndPathPoints ( const CSO cso)

Sets the seed points and the path point of the given CSO.

void ml::CSO::setSeedPointSize ( float  size)

Sets the size of the seed points.

void ml::CSO::setSeedPointStyle ( int  style)

Sets the style of the seed points.

void ml::CSO::setSelectedSeedPoint ( CSOSeedPoint sPoint)

Sets the given seed point as being selected, and deselects all previously selected seed points.

void ml::CSO::setShowState ( bool  state)

Sets the 'show' status of this CSO.

void ml::CSO::setSubType ( const std::string &  subtype) [inline]

Sets the subtype of the CSO. This is set by the Processor, which generates this CSO.

Definition at line 203 of file CSO.h.

void ml::CSO::setTimePointIndex ( int  index)

Sets the time point index of this CSO.

void ml::CSO::setType ( const std::string &  type) [inline]

Sets the type of the CSO. This is set by the Processor, which generates this CSO.

Definition at line 199 of file CSO.h.

void ml::CSO::setUserData ( const std::string &  name,
Variant  value 
) [inline]

Sets or adds a user data value under the given name.

Definition at line 217 of file CSO.h.

void ml::CSO::setVoxelizeState ( bool  state)

Sets the 'voxelize' state of this CSO.

void ml::CSO::setVoxelWriteMode ( int  mode)

Sets the voxel write mode of this CSO.

void ml::CSO::setVoxelWriteValue ( float  value)

Sets the voxel write value of this CSO.

void ml::CSO::setWorldToVoxelMatrix ( const Matrix4 mat)

Sets the internal matrix to the world-to-voxel matrix of the image this CSO was generated on.

void ml::CSO::storeInUndoManager ( ) [inline]

Stores the geometric information of the CSO in the UndoRedo manager.

Definition at line 68 of file CSO.h.


The documentation for this class was generated from the following file: