qCC version 2.13.alpha (Qt) - 31 May 2022
Main CloudCompare application (GUI & command line)
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
ccGraphicalSegmentationTool Class Reference

Graphical segmentation mechanism (with polyline) More...

#include <ccGraphicalSegmentationTool.h>

Inheritance diagram for ccGraphicalSegmentationTool:
Inheritance graph
[legend]
Collaboration diagram for ccGraphicalSegmentationTool:
Collaboration graph
[legend]

Public Member Functions

 ccGraphicalSegmentationTool (QWidget *parent)
 Default constructor.
 
virtual ~ccGraphicalSegmentationTool ()
 Destructor.
 
bool addEntity (ccHObject *anObject, bool silent=false)
 Adds an entity (and/or its children) to the 'to be segmented' pool. More...
 
unsigned getNumberOfValidEntities () const
 Returns the number of entites currently in the the 'to be segmented' pool.
 
const ccPolyline * getPolyLine () const
 Get a pointer to the polyline that has been segmented.
 
QSet< ccHObject * > & entities ()
 Returns the active 'to be segmented' set.
 
const QSet< ccHObject * > & entities () const
 Returns the active 'to be segmented' set (const version)
 
virtual bool linkWith (ccGLWindow *win) override
 
virtual bool start () override
 
virtual void stop (bool accepted) override
 
bool deleteHiddenParts () const
 Returns whether hidden parts should be delete after segmentation.
 
void removeAllEntities (bool unallocateVisibilityArrays)
 Remove entities from the 'to be segmented' pool. More...
 
bool applySegmentation (ccMainAppInterface *app, ccHObject::Container &newEntities)
 Apply segmentation and update the database (helper)
 

Protected Types

enum  ProcessStates {
  POLYLINE = 1 , RECTANGLE = 2 , PAUSED = 32 , STARTED = 64 ,
  RUNNING = 128
}
 Process states.
 

Protected Member Functions

void segmentIn ()
 
void segmentOut ()
 
void segment (bool keepPointsInside, ScalarType classificationValue=CCCoreLib::NAN_VALUE)
 
void reset ()
 
void apply ()
 
void applyAndDelete ()
 
void cancel ()
 
void addPointToPolyline (int x, int y)
 
void addPointToPolylineExt (int x, int y, bool allowClicksOutside)
 
void closePolyLine (int x=0, int y=0)
 
void closeRectangle ()
 
void updatePolyLine (int x, int y, Qt::MouseButtons buttons)
 
void run ()
 
void stopRunning ()
 
void pauseSegmentationMode (bool)
 
void setClassificationValue ()
 
void doSetPolylineSelection ()
 
void doSetRectangularSelection ()
 
void doActionUseExistingPolyline ()
 
void doExportSegmentationPolyline ()
 
void onShortcutTriggered (int)
 To capture overridden shortcuts (pause button, etc.)
 
void prepareEntityForRemoval (ccHObject *entity, bool unallocateVisibilityArrays)
 Prepare entity before removal.
 
void allowPolylineExport (bool state)
 Whether to allow or not to exort the current segmentation polyline.
 

Protected Attributes

QSet< ccHObject * > m_toSegment
 Set of entities to be segmented.
 
bool m_somethingHasChanged
 Whether something has changed or not (for proper 'cancel')
 
unsigned m_state
 Current process state.
 
ccPolyline * m_segmentationPoly
 Segmentation polyline.
 
ccPointCloud * m_polyVertices
 Segmentation polyline vertices.
 
bool m_rectangularSelection
 Selection mode.
 
bool m_deleteHiddenParts
 Whether to delete hidden parts after segmentation.
 

Detailed Description

Graphical segmentation mechanism (with polyline)

Member Function Documentation

◆ addEntity()

bool ccGraphicalSegmentationTool::addEntity ( ccHObject *  anObject,
bool  silent = false 
)

Adds an entity (and/or its children) to the 'to be segmented' pool.

Warning: some entities may be rejected if they are locked, or can't be segmented this way.

Returns
whether entity has been added to the pool or not

◆ removeAllEntities()

void ccGraphicalSegmentationTool::removeAllEntities ( bool  unallocateVisibilityArrays)

Remove entities from the 'to be segmented' pool.

Warning
'unallocateVisibilityArray' will be called on all point clouds prior to be removed from the pool.

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