MeVisLabToolboxReference
ml::CSOList Class Reference

A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation objects. More...

#include <CSOList.h>

Inheritance diagram for ml::CSOList:
ml::RefCountedBase ml::EventSource ml::Base

List of all members.

Classes

struct  CSONotificationCBData
 This struct combines a function pointer, a user data pointer and a flag for the notification observer mechanism. More...
struct  IndexPair
 Struct holding a pair of indices.

Public Types

enum  NotificationType {
  NOTIFICATION_NONE = 0, NOTIFICATION_CSO_SELECTION = 1, NOTIFICATION_GROUP_SELECTION = 2, NOTIFICATION_CSO_FINISHED = 4,
  NOTIFICATION_GROUP_FINISHED = 8, NOTIFICATION_REPAINT = 16, NOTIFICATION_INTERACTION_INIT = 32, NOTIFICATION_START_NEW_CSO = 64,
  NOTIFICATION_CSO_MOVED = 128, NOTIFICATION_CSO_UNDER_MOUSE_CHANGED = 256
}
typedef std::map< unsigned int,
unsigned int > 
IdToIdMap

Public Member Functions

 CSOList ()
 Standard constructor.
 CSOList (const CSOList &csoList)
 Copy constructor.
void clone (const CSOList &csoList, bool useUndoRedo=false)
 Clones the internal CSOs and CSOGroups of the given CSOList to this one.
void merge (const CSOList &csoList, bool mergeGroupWithSameLabel, IdToIdMap &origToThisGroupIdMap, IdToIdMap &origToThisCSOIdMap, bool useUndoRedo=false)
 Merges the internal CSOs and CSOGroups of the given CSOList to this one.
bool saveTo (std::string &filename, bool binary) const
 Pipes the internal structure of a this list (CSOs and Groups) into the given file.
bool saveTo (std::ostream &outStream, bool binary) const
 Pipes the internal structure of a this list (CSOs and Groups) into the given stream.
bool loadFrom (std::string &filename, std::string &message)
 Reads out the internal structure for this list (CSOs and Groups) from the given file.
bool loadFrom (std::istream &inStream, bool binary, std::string &message)
 Reads out the internal structure for this list (CSOs and Groups) from the given stream.
void addNotificationObserver (csoNotificationCB *callback, void *userData)
 Adds a notification observer to this CSOList.
void removeNotificationObserver (csoNotificationCB *callback, void *userData)
 Removes a notification observer from this CSOList.
void notifyObservers (int notificationFlag)
 Notifies all observers.
void updateDisplays ()
 Updates all connected information/managing modules (not the renderers!).
CSOUndoRedoManagergetUndoRedoManager ()
 Returns a pointer to the undo/redo manager of this CSOList.
CSOManagergetManager ()
 Returns a pointer to the manager of this CSOList.
void setUndoRedoManager (CSOUndoRedoManager *undoRedoManager)
 Sets the internal undo/redo manager.
void setManager (CSOManager *manager)
 Sets the pointer to the internal manager and sets the group default rules.
unsigned int getCurrentCSOId ()
 Returns the current last id (incremented each call) for CSOs.
unsigned int getCurrentGroupId ()
 Returns the current last id (incremented each call) for CSOGroups.
void setCurrentCSOId (unsigned int id)
 Sets the current last id for CSOs. Do not mess with it.
void setCurrentGroupId (unsigned int id)
 Sets the current last id for Groups. Do not mess with it.
bool isSelected (CSO *cso) const
 Returns whether the given CSO is currently selected.
bool isSelected (CSOGroup *group) const
 Returns whether the given CSOGroup is currently selected.
void addSelected (CSO *cso)
 Adds the given CSO to the list of selected CSOs (no double entry).
void addSelected (CSOGroup *group)
 Adds the given CSOGroup to the list of selected CSOGroups (no double entry).
bool setSelected (CSO *cso)
 Sets the given CSO as being selected and deselects all other CSOs.
bool setSelected (CSOGroup *group)
 Set the given CSOGroup as being selected and deselects all other Groups.
void clearSelectedCSOs ()
 Clears all selected CSOs.
void clearSelectedGroups ()
 Clears all selected CSOGroups.
void clearSelectedSeedPoints ()
 Clears all selected seed points in all CSOs.
void removeFromSelection (CSO *cso)
 Removes the given CSO from the list of selected CSOs.
void removeFromSelection (CSOGroup *group)
 Removes the given CSOGroup from the list of selected CSOGroups.
unsigned int numSelectedCSOs () const
 Returns the number of selected CSOs.
unsigned int numSelectedGroups () const
 Returns the number of selected CSOGroups.
CSOgetSelectedCSOAt (unsigned int index) const
 Returns a pointer to the selected CSO at the given index; no checking!
CSOGroupgetSelectedGroupAt (unsigned int index) const
 Returns a pointer to the selected CSOGroup at the given index; no checking!
Vector3 getCenterOfSelectedCSOs (bool &resultIsValid) const
 Returns the center position of all bounding boxes of all selected CSOs.
Vector3 getCenterOfSelectedGroups (bool &resultIsValid) const
 Returns the center position of all bounding boxes of all CSOs of all selected CSOGroups.
CSOgetCSOCurrentlyUnderMouse () const
 Returns the pointer to the CSO currently under the mouse cursor.
void setCSOCurrentlyUnderMouse (CSO *csoUnderMouse)
 Sets the pointer to the CSO currently under the mouse cursor.
Vector3 getCenterOfSelectedCSOs () const
 /deprecated Returns the center position of all bounding boxes of all selected CSOs.
Vector3 getCenterOfSelectedGroups () const
 /deprecated Returns the center position of all bounding boxes of all CSOs of all selected CSOGroups.
CSOaddCSO (bool useUndoRedo=true)
 Adds a new CSO to the list and returns its pointer.
CSOaddCSO (const std::vector< Vector3 > &seedPositions, bool closed, bool useUndoRedo)
 Adds a new CSO to the list and returns its pointer.
CSOaddCSO (unsigned int numSeedPoints, bool closed, bool useUndoRedo)
 Adds a new CSO to the list and returns its pointer.
CSOaddCSOCopy (CSO *cso, bool useUndoRedo=true, int oldId=-1)
 Adds a copy of the given CSO to the list and returns a pointer to it.
CSOGroupaddGroup (bool useUndoRedo=true)
 Adds a new Group to the list and returns a pointer to it.
CSOGroupaddGroupCopy (CSOGroup *group, bool useUndoRedo=true, int oldId=-1)
 Adds a copy of the given Group to this list and returns a pointer to it.
bool removeCSO (CSO *cso, bool useUndoRedo=true)
 Removes a given CSO from the list and from Groups it is in.
bool removeCSO (unsigned int id, bool useUndoRedo=true)
 Removes a CSO by its id and removes it from all Groups.
bool removeAllCSO (bool useUndoRedo=true)
 Removes all CSOs from the list and from all Groups they are in.
bool removeGroup (CSOGroup *group, bool useUndoRedo=true)
 Removes the given Group and removes the group from all CSOs.
bool removeGroup (unsigned int id, bool useUndoRedo=true)
 Removes a Group by its id and removes it from all CSOs.
bool removeAllGroups (bool useUndoRedo)
 Removes all Groups and all groups from all CSOs.
bool removeAll (bool useUndoRedo=true)
 Removes all CSOs and Groups and resets all else.
CSOgetCSOAt (unsigned int index) const
 Returns a pointer to the CSO at the given position in the internal list.
CSOgetCSOById (unsigned int id) const
 Returns a pointer to the CSO with the given unique id.
CSOgetCSOByLabel (const std::string &label) const
 Returns a pointer to the first CSO with the given label.
unsigned int getCSOIndex (CSO *cso) const
 Returns the index of the given CSO in its list.
unsigned int getCSOIndex (unsigned int id) const
 Returns the index of the CSO with the given id in its list.
bool hasCSO (CSO *cso) const
 Returns whether there is the given CSO in the list.
CSOGroupgetGroupById (unsigned int id) const
 Returns a pointer to a Group with the given id.
CSOGroupgetGroupByLabel (const std::string &label) const
 Returns a pointer to a Group with the given label.
CSOGroupgetGroupAt (unsigned int index) const
 Returns Group at the given index position.
unsigned int getGroupIndex (CSOGroup *group) const
 Returns the index of the given Group in its list.
unsigned int getGroupIndex (unsigned int id) const
 Returns the index of the Group with the given id in its list.
bool hasGroup (CSOGroup *group) const
 Returns whether there is the given CSOGroup in the list.
std::string getUniqueCSOLabel (std::string label, std::string format, bool addIdAlways)
 Returns a unique cso label that includes the given label and combines it with a unique id using the given format.
std::string getUniqueGroupLabel (std::string label, std::string format, bool addIdAlways)
 Returns a unique group label that includes the given label and combines it with a unique id using the given format.
void resetUniqueCSOLabelIdMap ()
 Resets the data structure that is used to determine unique ids for getUniqueCSOLabel.
void resetUniqueGroupLabelIdMap ()
 Resets the data structure that is used to determine unique ids for getUniqueCSOLabel Afterwards, unique ids are still generated.
void combineCSOandGroup (CSO *cso, CSOGroup *group, bool useUndoRedo=true)
 Combines the given CSO with the given Group.
void breakCSOandGroup (CSO *cso, CSOGroup *group, bool useUndoRedo=true)
 Breaks the combination of the given CSO and the given Group.
void breakCSOfromAllGroups (CSO *cso, bool useUndoRedo=true)
 Breaks all combinations of the given CSO and any Group.
void breakAllCSOsFromGroup (CSOGroup *group, bool useUndoRedo=true)
 Breaks all combinations of the given Group and any CSO.
unsigned int numCSO () const
 Returns the number of CSOs in the list.
unsigned int numGroups () const
 Returns the number of CSOGroups.
void undo ()
 Performs an undo of the last modification.
void redo ()
 Performs a redo of the last undone modification.
void enableUndoRedoManager ()
 Enables the undo/redo mechanism.
void disableUndoRedoManager ()
 Enables the undo/redo mechanism.
void enableRepaintObserver ()
 Enables the repaint observer mechanism.
void disableRepaintObserver ()
 Disables the repaint observer mechanism.
void enableFinishedObserver ()
 Enables the finished observer mechanism.
void disableFinishedObserver ()
 Disables the finished observer mechanism.
void enableInteractionObserver ()
 Enables the interaction observer mechanism.
void disableInteractionObserver ()
 Disables the interaction observer mechanism.
void enableSelectionObserver ()
 Enables the selection observer mechanism.
void disableSelectionObserver ()
 Disables the selection observer mechanism.
void enableStartNewCSOObserver ()
 Enables the 'start new CSO' observer mechanism.
void disableStartNewCSOObserver ()
 Disables the 'start new CSO' observer mechanism.
void enableCSOMovedObserver ()
 Enables the 'CSO moved' observer mechanism.
void disableCSOMovedObserver ()
 Disables the 'CSO moved' observer mechanism.
void enableCSOCurrentlyUnderMouseObserver ()
 Enables the 'CSO currently under mouse' observer mechanism.
void disableCSOCurrentlyUnderMouseObserver ()
 Disables the 'CSO currently under mouse' observer mechanism.
bool isUndoRedoManagerEnabled () const
 Returns 'true' if the undo/redo mechanism is enabled, 'false' otherwise.
void openUndoRedoGroup ()
 Opens a undo/redo group. All undoable commands after this are grouped together.
void closeUndoRedoGroup ()
 Closes a undo/redo group. All undoable commands before this are grouped together.
bool isRepaintNotificationEnabled () const
 Returns whether the repaint notification is enabled.
bool isFinishedNotificationEnabled () const
 Returns whether the finished notification is enabled.
bool isInteractionInitNotificationEnabled () const
 Returns whether the interaction init notification is enabled.
bool isSelectionNotificationEnabled () const
 Returns whether the selection notification is enabled.
bool isStartNewCSONotificationEnabled () const
 Returns whether the 'start new CSO' notification is enabled.
bool isCSOMovedNotificationEnabled () const
 Returns whether the 'CSO moved' notification is enabled.
bool isCSOCurrentlyUnderMouseNotificationEnabled () const
 Returns whether the 'CSO currently under mouse' notification is enabled.
CSOListRulesgetRules ()
 Return the rules for this CSOList.
virtual void addStateToTree (TreeNode *) const
 Attaches the object state as children of the given parent node.
virtual void readStateFromTree (TreeNode *)
 Reads the object state from the children of the given parent node.
 ML_SET_ADDSTATE_VERSION (1)
virtual CSOListdeepCopy () const
 Create a deep copy of the CSOList.

Static Public Member Functions

static void removeNotificationObserverFromAllCSOLists (csoNotificationCB *callback, void *userData)
 Removes a certain notification observer from all CSOLists.
static void alignSeedPathLinks (CSO *cso)
 Aligns seed point positions with path point lists of a given CSO by a squared distance sum criterion.

Static Public Attributes

static const char * sVoxelWriteModeStrings [4]
 Strings for voxel write mode enumerations.
static const char * sLineStyleModeStrings [5]
 Strings for line style enumerations.
static const char * sSeedPointStyleStrings [3]
 Strings for marker mode enumerations.

Protected Member Functions

virtual ~CSOList ()
 The CSOList destructor is protected since the CSOList ownership is managed by the CSOListPtr intrusive smart pointer.

Detailed Description

A CSOList comprises a number of CSOs and CSOGroups and is the central object for contour segmentation objects.

The CSOList is derived from Base and can be used as a data structure in a MeVisLab network. The CSOList has also a CSOUndoRedoManager as a member. The CSOList ownership is managed via smart pointers, make sure to use a CSOListPtr so manage newly created CSOList objects.

Definition at line 51 of file CSOList.h.


Member Typedef Documentation

typedef std::map<unsigned int, unsigned int> ml::CSOList::IdToIdMap

Definition at line 81 of file CSOList.h.


Member Enumeration Documentation

Enumerator:
NOTIFICATION_NONE 

Flag for the observer mechanism, signalizing no notification at all.

NOTIFICATION_CSO_SELECTION 

Flag for the observer mechanism, should be set if a CSO selection changes.

NOTIFICATION_GROUP_SELECTION 

Flag for the observer mechanism, should be set if a CSOGroup selection changes.

NOTIFICATION_CSO_FINISHED 

Flag for the observer mechanism, should be set if a CSO action is finished.

NOTIFICATION_GROUP_FINISHED 

Flag for the observer mechanism, should be set if a CSOGroup action is finished.

NOTIFICATION_REPAINT 

Flag for the observer mechanism, should be set if a repaint should occur.

NOTIFICATION_INTERACTION_INIT 

Flag for the observer mechanism, should be set if the interaction must be initialized.

NOTIFICATION_START_NEW_CSO 

Flag for the observer mechanism, signalizing that the generation of a new CSO has been started.

NOTIFICATION_CSO_MOVED 

Flag for the observer mechanism, should be set if a CSO was moved.

NOTIFICATION_CSO_UNDER_MOUSE_CHANGED 

Flag for the observer mechanism, should be set if the CSO under the mouse cursor changes.

Definition at line 443 of file CSOList.h.


Constructor & Destructor Documentation

ml::CSOList::CSOList ( )

Standard constructor.

ml::CSOList::CSOList ( const CSOList csoList)

Copy constructor.

virtual ml::CSOList::~CSOList ( ) [protected, virtual]

The CSOList destructor is protected since the CSOList ownership is managed by the CSOListPtr intrusive smart pointer.

If you encounter code that tries to delete a CSOList object, you will very likely need to change the usage of a CSOList* to a CSOListPtr and replace the delete call with a NULL assignment.


Member Function Documentation

CSO* ml::CSOList::addCSO ( bool  useUndoRedo = true)

Adds a new CSO to the list and returns its pointer.

CSO* ml::CSOList::addCSO ( const std::vector< Vector3 > &  seedPositions,
bool  closed,
bool  useUndoRedo 
)

Adds a new CSO to the list and returns its pointer.

The given positions are used as seed point positions.

CSO* ml::CSOList::addCSO ( unsigned int  numSeedPoints,
bool  closed,
bool  useUndoRedo 
)

Adds a new CSO to the list and returns its pointer.

The resulting CSO has as many seed points as stated.

CSO* ml::CSOList::addCSOCopy ( CSO cso,
bool  useUndoRedo = true,
int  oldId = -1 
)

Adds a copy of the given CSO to the list and returns a pointer to it.

CSOGroup* ml::CSOList::addGroup ( bool  useUndoRedo = true)

Adds a new Group to the list and returns a pointer to it.

CSOGroup* ml::CSOList::addGroupCopy ( CSOGroup group,
bool  useUndoRedo = true,
int  oldId = -1 
)

Adds a copy of the given Group to this list and returns a pointer to it.

Note that this method does not set the 'this' pointer as a new CSOList.

void ml::CSOList::addNotificationObserver ( csoNotificationCB callback,
void *  userData 
)

Adds a notification observer to this CSOList.

void ml::CSOList::addSelected ( CSO cso)

Adds the given CSO to the list of selected CSOs (no double entry).

void ml::CSOList::addSelected ( CSOGroup group)

Adds the given CSOGroup to the list of selected CSOGroups (no double entry).

virtual void ml::CSOList::addStateToTree ( TreeNode ) const [virtual]

Attaches the object state as children of the given parent node.

Reimplemented from ml::Base.

static void ml::CSOList::alignSeedPathLinks ( CSO cso) [static]

Aligns seed point positions with path point lists of a given CSO by a squared distance sum criterion.

void ml::CSOList::breakAllCSOsFromGroup ( CSOGroup group,
bool  useUndoRedo = true 
)

Breaks all combinations of the given Group and any CSO.

void ml::CSOList::breakCSOandGroup ( CSO cso,
CSOGroup group,
bool  useUndoRedo = true 
)

Breaks the combination of the given CSO and the given Group.

void ml::CSOList::breakCSOfromAllGroups ( CSO cso,
bool  useUndoRedo = true 
)

Breaks all combinations of the given CSO and any Group.

void ml::CSOList::clearSelectedCSOs ( ) [inline]

Clears all selected CSOs.

Definition at line 168 of file CSOList.h.

void ml::CSOList::clearSelectedGroups ( ) [inline]

Clears all selected CSOGroups.

Definition at line 172 of file CSOList.h.

void ml::CSOList::clearSelectedSeedPoints ( )

Clears all selected seed points in all CSOs.

void ml::CSOList::clone ( const CSOList csoList,
bool  useUndoRedo = false 
)

Clones the internal CSOs and CSOGroups of the given CSOList to this one.

void ml::CSOList::closeUndoRedoGroup ( )

Closes a undo/redo group. All undoable commands before this are grouped together.

void ml::CSOList::combineCSOandGroup ( CSO cso,
CSOGroup group,
bool  useUndoRedo = true 
)

Combines the given CSO with the given Group.

virtual CSOList* ml::CSOList::deepCopy ( ) const [inline, virtual]

Create a deep copy of the CSOList.

Reimplemented from ml::Base.

Definition at line 481 of file CSOList.h.

void ml::CSOList::disableCSOCurrentlyUnderMouseObserver ( ) [inline]

Disables the 'CSO currently under mouse' observer mechanism.

Definition at line 401 of file CSOList.h.

void ml::CSOList::disableCSOMovedObserver ( ) [inline]

Disables the 'CSO moved' observer mechanism.

Definition at line 396 of file CSOList.h.

void ml::CSOList::disableFinishedObserver ( ) [inline]

Disables the finished observer mechanism.

Definition at line 376 of file CSOList.h.

void ml::CSOList::disableInteractionObserver ( ) [inline]

Disables the interaction observer mechanism.

Definition at line 381 of file CSOList.h.

void ml::CSOList::disableRepaintObserver ( ) [inline]

Disables the repaint observer mechanism.

Definition at line 371 of file CSOList.h.

void ml::CSOList::disableSelectionObserver ( ) [inline]

Disables the selection observer mechanism.

Definition at line 386 of file CSOList.h.

void ml::CSOList::disableStartNewCSOObserver ( ) [inline]

Disables the 'start new CSO' observer mechanism.

Definition at line 391 of file CSOList.h.

void ml::CSOList::disableUndoRedoManager ( )

Enables the undo/redo mechanism.

void ml::CSOList::enableCSOCurrentlyUnderMouseObserver ( ) [inline]

Enables the 'CSO currently under mouse' observer mechanism.

Definition at line 399 of file CSOList.h.

void ml::CSOList::enableCSOMovedObserver ( ) [inline]

Enables the 'CSO moved' observer mechanism.

Definition at line 394 of file CSOList.h.

void ml::CSOList::enableFinishedObserver ( ) [inline]

Enables the finished observer mechanism.

Definition at line 374 of file CSOList.h.

void ml::CSOList::enableInteractionObserver ( ) [inline]

Enables the interaction observer mechanism.

Definition at line 379 of file CSOList.h.

void ml::CSOList::enableRepaintObserver ( ) [inline]

Enables the repaint observer mechanism.

Definition at line 369 of file CSOList.h.

void ml::CSOList::enableSelectionObserver ( ) [inline]

Enables the selection observer mechanism.

Definition at line 384 of file CSOList.h.

void ml::CSOList::enableStartNewCSOObserver ( ) [inline]

Enables the 'start new CSO' observer mechanism.

Definition at line 389 of file CSOList.h.

void ml::CSOList::enableUndoRedoManager ( ) [inline]

Enables the undo/redo mechanism.

Definition at line 362 of file CSOList.h.

Vector3 ml::CSOList::getCenterOfSelectedCSOs ( bool &  resultIsValid) const

Returns the center position of all bounding boxes of all selected CSOs.

'resultIsValid' is false if there are no selected CSOs available.

Vector3 ml::CSOList::getCenterOfSelectedCSOs ( ) const [inline]

/deprecated Returns the center position of all bounding boxes of all selected CSOs.

Definition at line 220 of file CSOList.h.

References CSO_DEBUG.

Vector3 ml::CSOList::getCenterOfSelectedGroups ( bool &  resultIsValid) const

Returns the center position of all bounding boxes of all CSOs of all selected CSOGroups.

'resultIsValid' is false if there are no selected groups available.

Vector3 ml::CSOList::getCenterOfSelectedGroups ( ) const [inline]

/deprecated Returns the center position of all bounding boxes of all CSOs of all selected CSOGroups.

Definition at line 227 of file CSOList.h.

References CSO_DEBUG.

CSO* ml::CSOList::getCSOAt ( unsigned int  index) const

Returns a pointer to the CSO at the given position in the internal list.

CSO* ml::CSOList::getCSOById ( unsigned int  id) const

Returns a pointer to the CSO with the given unique id.

Returns NULL if no such CSO is stored in the list.

CSO* ml::CSOList::getCSOByLabel ( const std::string &  label) const

Returns a pointer to the first CSO with the given label.

Returns NULL if no such CSO is stored in the list.

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

Returns the pointer to the CSO currently under the mouse cursor.

Definition at line 213 of file CSOList.h.

unsigned int ml::CSOList::getCSOIndex ( CSO cso) const

Returns the index of the given CSO in its list.

unsigned int ml::CSOList::getCSOIndex ( unsigned int  id) const

Returns the index of the CSO with the given id in its list.

unsigned int ml::CSOList::getCurrentCSOId ( )

Returns the current last id (incremented each call) for CSOs.

If there are no CSOs in the list, this id is set back to 0.

unsigned int ml::CSOList::getCurrentGroupId ( )

Returns the current last id (incremented each call) for CSOGroups.

If there are no CSOGroups in the list, this id is set back to 0.

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

Returns Group at the given index position.

CSOGroup* ml::CSOList::getGroupById ( unsigned int  id) const

Returns a pointer to a Group with the given id.

CSOGroup* ml::CSOList::getGroupByLabel ( const std::string &  label) const

Returns a pointer to a Group with the given label.

unsigned int ml::CSOList::getGroupIndex ( unsigned int  id) const

Returns the index of the Group with the given id in its list.

unsigned int ml::CSOList::getGroupIndex ( CSOGroup group) const

Returns the index of the given Group in its list.

CSOManager* ml::CSOList::getManager ( ) [inline]

Returns a pointer to the manager of this CSOList.

Definition at line 128 of file CSOList.h.

CSOListRules& ml::CSOList::getRules ( ) [inline]

Return the rules for this CSOList.

Definition at line 469 of file CSOList.h.

CSO* ml::CSOList::getSelectedCSOAt ( unsigned int  index) const [inline]

Returns a pointer to the selected CSO at the given index; no checking!

Definition at line 189 of file CSOList.h.

CSOGroup* ml::CSOList::getSelectedGroupAt ( unsigned int  index) const [inline]

Returns a pointer to the selected CSOGroup at the given index; no checking!

Definition at line 197 of file CSOList.h.

CSOUndoRedoManager* ml::CSOList::getUndoRedoManager ( ) [inline]

Returns a pointer to the undo/redo manager of this CSOList.

Definition at line 126 of file CSOList.h.

std::string ml::CSOList::getUniqueCSOLabel ( std::string  label,
std::string  format,
bool  addIdAlways 
)

Returns a unique cso label that includes the given label and combines it with a unique id using the given format.

If the given label itself is unique, an id is only added if addIdAlways is true.

std::string ml::CSOList::getUniqueGroupLabel ( std::string  label,
std::string  format,
bool  addIdAlways 
)

Returns a unique group label that includes the given label and combines it with a unique id using the given format.

If the given label itself is unique, an id is only added if addIdAlways is true.

bool ml::CSOList::hasCSO ( CSO cso) const

Returns whether there is the given CSO in the list.

bool ml::CSOList::hasGroup ( CSOGroup group) const

Returns whether there is the given CSOGroup in the list.

bool ml::CSOList::isCSOCurrentlyUnderMouseNotificationEnabled ( ) const [inline]

Returns whether the 'CSO currently under mouse' notification is enabled.

Definition at line 427 of file CSOList.h.

bool ml::CSOList::isCSOMovedNotificationEnabled ( ) const [inline]

Returns whether the 'CSO moved' notification is enabled.

Definition at line 425 of file CSOList.h.

bool ml::CSOList::isFinishedNotificationEnabled ( ) const [inline]

Returns whether the finished notification is enabled.

Definition at line 417 of file CSOList.h.

bool ml::CSOList::isInteractionInitNotificationEnabled ( ) const [inline]

Returns whether the interaction init notification is enabled.

Definition at line 419 of file CSOList.h.

bool ml::CSOList::isRepaintNotificationEnabled ( ) const [inline]

Returns whether the repaint notification is enabled.

Definition at line 415 of file CSOList.h.

bool ml::CSOList::isSelected ( CSOGroup group) const

Returns whether the given CSOGroup is currently selected.

bool ml::CSOList::isSelected ( CSO cso) const

Returns whether the given CSO is currently selected.

bool ml::CSOList::isSelectionNotificationEnabled ( ) const [inline]

Returns whether the selection notification is enabled.

Definition at line 421 of file CSOList.h.

bool ml::CSOList::isStartNewCSONotificationEnabled ( ) const [inline]

Returns whether the 'start new CSO' notification is enabled.

Definition at line 423 of file CSOList.h.

bool ml::CSOList::isUndoRedoManagerEnabled ( ) const [inline]

Returns 'true' if the undo/redo mechanism is enabled, 'false' otherwise.

Definition at line 406 of file CSOList.h.

bool ml::CSOList::loadFrom ( std::string &  filename,
std::string &  message 
)

Reads out the internal structure for this list (CSOs and Groups) from the given file.

Returns whether the operation was successful. A given message string is filled.

bool ml::CSOList::loadFrom ( std::istream &  inStream,
bool  binary,
std::string &  message 
)

Reads out the internal structure for this list (CSOs and Groups) from the given stream.

Returns whether the operation was successful. A given message string is filled.

void ml::CSOList::merge ( const CSOList csoList,
bool  mergeGroupWithSameLabel,
IdToIdMap origToThisGroupIdMap,
IdToIdMap origToThisCSOIdMap,
bool  useUndoRedo = false 
)

Merges the internal CSOs and CSOGroups of the given CSOList to this one.

ml::CSOList::ML_SET_ADDSTATE_VERSION ( )
void ml::CSOList::notifyObservers ( int  notificationFlag)

Notifies all observers.

unsigned int ml::CSOList::numCSO ( ) const

Returns the number of CSOs in the list.

unsigned int ml::CSOList::numGroups ( ) const

Returns the number of CSOGroups.

unsigned int ml::CSOList::numSelectedCSOs ( ) const [inline]

Returns the number of selected CSOs.

Definition at line 184 of file CSOList.h.

unsigned int ml::CSOList::numSelectedGroups ( ) const [inline]

Returns the number of selected CSOGroups.

Definition at line 186 of file CSOList.h.

void ml::CSOList::openUndoRedoGroup ( )

Opens a undo/redo group. All undoable commands after this are grouped together.

virtual void ml::CSOList::readStateFromTree ( TreeNode ) [virtual]

Reads the object state from the children of the given parent node.

Reimplemented from ml::Base.

void ml::CSOList::redo ( )

Performs a redo of the last undone modification.

bool ml::CSOList::removeAll ( bool  useUndoRedo = true)

Removes all CSOs and Groups and resets all else.

Returns whether the operation was successful.

bool ml::CSOList::removeAllCSO ( bool  useUndoRedo = true)

Removes all CSOs from the list and from all Groups they are in.

Returns whether the operation was successful.

bool ml::CSOList::removeAllGroups ( bool  useUndoRedo)

Removes all Groups and all groups from all CSOs.

Returns the operation was successful.

bool ml::CSOList::removeCSO ( CSO cso,
bool  useUndoRedo = true 
)

Removes a given CSO from the list and from Groups it is in.

Returns whether a CSO has been removed.

bool ml::CSOList::removeCSO ( unsigned int  id,
bool  useUndoRedo = true 
)

Removes a CSO by its id and removes it from all Groups.

Returns whether a CSO has been removed.

void ml::CSOList::removeFromSelection ( CSO cso)

Removes the given CSO from the list of selected CSOs.

void ml::CSOList::removeFromSelection ( CSOGroup group)

Removes the given CSOGroup from the list of selected CSOGroups.

bool ml::CSOList::removeGroup ( unsigned int  id,
bool  useUndoRedo = true 
)

Removes a Group by its id and removes it from all CSOs.

Returns whether the group has been removed.

bool ml::CSOList::removeGroup ( CSOGroup group,
bool  useUndoRedo = true 
)

Removes the given Group and removes the group from all CSOs.

Returns whether the CSOGroup has been removed.

void ml::CSOList::removeNotificationObserver ( csoNotificationCB callback,
void *  userData 
)

Removes a notification observer from this CSOList.

static void ml::CSOList::removeNotificationObserverFromAllCSOLists ( csoNotificationCB callback,
void *  userData 
) [static]

Removes a certain notification observer from all CSOLists.

void ml::CSOList::resetUniqueCSOLabelIdMap ( ) [inline]

Resets the data structure that is used to determine unique ids for getUniqueCSOLabel.

Afterwards, unique ids are still generated. However these ids do not start with the highest previously assigned id. Instead, the first unused id is used. This behavior is identical to id assignment after loading of a stored CSOList.

Definition at line 322 of file CSOList.h.

void ml::CSOList::resetUniqueGroupLabelIdMap ( ) [inline]

Resets the data structure that is used to determine unique ids for getUniqueCSOLabel Afterwards, unique ids are still generated.

However these ids do not start with the highest previously assigned id. Instead, the first unused id is used. This behavior is identical to id assignment after loading of a stored CSOList.

Definition at line 330 of file CSOList.h.

bool ml::CSOList::saveTo ( std::string &  filename,
bool  binary 
) const

Pipes the internal structure of a this list (CSOs and Groups) into the given file.

Returns whether the operation was successful.

bool ml::CSOList::saveTo ( std::ostream &  outStream,
bool  binary 
) const

Pipes the internal structure of a this list (CSOs and Groups) into the given stream.

Returns whether the operation was successful.

void ml::CSOList::setCSOCurrentlyUnderMouse ( CSO csoUnderMouse) [inline]

Sets the pointer to the CSO currently under the mouse cursor.

At the moment, only the SoView2DCSOEditor sets this pointer. You might break networks if you fool around with this.

Definition at line 216 of file CSOList.h.

void ml::CSOList::setCurrentCSOId ( unsigned int  id) [inline]

Sets the current last id for CSOs. Do not mess with it.

Definition at line 144 of file CSOList.h.

void ml::CSOList::setCurrentGroupId ( unsigned int  id) [inline]

Sets the current last id for Groups. Do not mess with it.

Definition at line 146 of file CSOList.h.

void ml::CSOList::setManager ( CSOManager manager)

Sets the pointer to the internal manager and sets the group default rules.

bool ml::CSOList::setSelected ( CSOGroup group)

Set the given CSOGroup as being selected and deselects all other Groups.

Returns 'true' if the selection has actually been changed, 'false' otherwise.

bool ml::CSOList::setSelected ( CSO cso)

Sets the given CSO as being selected and deselects all other CSOs.

Returns 'true' if the selection has actually been changed, 'false' otherwise.

void ml::CSOList::setUndoRedoManager ( CSOUndoRedoManager undoRedoManager) [inline]

Sets the internal undo/redo manager.

Definition at line 131 of file CSOList.h.

void ml::CSOList::undo ( )

Performs an undo of the last modification.

void ml::CSOList::updateDisplays ( )

Updates all connected information/managing modules (not the renderers!).


Member Data Documentation

const char* ml::CSOList::sLineStyleModeStrings[5] [static]

Strings for line style enumerations.

Definition at line 439 of file CSOList.h.

const char* ml::CSOList::sSeedPointStyleStrings[3] [static]

Strings for marker mode enumerations.

Definition at line 441 of file CSOList.h.

const char* ml::CSOList::sVoxelWriteModeStrings[4] [static]

Strings for voxel write mode enumerations.

Definition at line 437 of file CSOList.h.


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