ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ccVolumeCalcTool Class Reference

Volume calculation tool (dialog) More...

#include <ecvVolumeCalcTool.h>

Inheritance diagram for ccVolumeCalcTool:
[legend]
Collaboration diagram for ccVolumeCalcTool:
[legend]

Classes

struct  ReportInfo
 Report info. More...
 

Public Member Functions

 ccVolumeCalcTool (ccGenericPointCloud *cloud1, ccGenericPointCloud *cloud2, QWidget *parent=0)
 Default constructor. More...
 
 ~ccVolumeCalcTool ()
 Destructor. More...
 
virtual double getGridStep () const override
 Returns projection grid step. More...
 
virtual unsigned char getProjectionDimension () const override
 Returns projection dimension. More...
 
virtual ccRasterGrid::ProjectionType getTypeOfProjection () const override
 Returns type of projection. More...
 
- Public Member Functions inherited from cc2Point5DimEditor
 cc2Point5DimEditor ()
 Default constructor. More...
 
virtual ~cc2Point5DimEditor ()
 Destructor. More...
 

Static Public Member Functions

static bool ComputeVolume (ccRasterGrid &grid, ccGenericPointCloud *ground, ccGenericPointCloud *ceil, const ccBBox &gridBox, unsigned char vertDim, double gridStep, unsigned gridWidth, unsigned gridHeight, ccRasterGrid::ProjectionType projectionType, ccRasterGrid::EmptyCellFillOption groundEmptyCellFillStrategy, ccRasterGrid::EmptyCellFillOption ceilEmptyCellFillStrategy, ccVolumeCalcTool::ReportInfo &reportInfo, double groundHeight, double ceilHeight, QWidget *parentWidget=0)
 Static accessor. More...
 
static ccPointCloud * ConvertGridToCloud (ccRasterGrid &grid, const ccBBox &gridBox, unsigned char vertDim, bool exportToOriginalCS)
 Converts a (volume) grid to a point cloud. More...
 

Protected Slots

void saveSettingsAndAccept ()
 Accepts the dialog and save settings. More...
 
void saveSettings ()
 Save persistent settings and 'accept' dialog. More...
 
void projectionDirChanged (int)
 Called when the projection direction changes. More...
 
void sfProjectionTypeChanged (int)
 Called when the SF projection type changes. More...
 
virtual bool showGridBoxEditor () override
 
void groundFillEmptyCellStrategyChanged (int)
 Called when the (ground) empty cell filling strategy changes. More...
 
void ceilFillEmptyCellStrategyChanged (int)
 Called when the (ceil) empty cell filling strategy changes. More...
 
void gridOptionChanged ()
 Called when the an option of the grid generation has changed. More...
 
void updateGridInfo ()
 Updates the gid info. More...
 
void updateGridAndDisplay ()
 Update the grid and the 2D display. More...
 
void swapRoles ()
 Swap roles. More...
 
void groundSourceChanged (int)
 Ground source changed. More...
 
void ceilSourceChanged (int)
 Ceil source changed. More...
 
void exportToClipboard () const
 Exports info to clipboard. More...
 
void exportGridAsCloud () const
 Exports the grid as a point cloud. More...
 
void setDisplayedNumberPrecision (int)
 Sets the displayed number precision. More...
 

Protected Member Functions

virtual void gridIsUpToDate (bool state) override
 Declares whether the grid is up-to-date or not. More...
 
void loadSettings ()
 Load persistent settings. More...
 
bool updateGrid ()
 Updates the grid. More...
 
ccPointCloud * convertGridToCloud (bool exportToOriginalCS) const
 Converts the grid to a point cloud. More...
 
void outputReport (const ReportInfo &info)
 Outputs the report. More...
 
- Protected Member Functions inherited from cc2Point5DimEditor
virtual ccBBox getCustomBBox () const
 Returns custom bbox. More...
 
virtual void update2DDisplayZoom (ccBBox &box)
 Updates the 2D display zoom. More...
 
virtual bool showGridBoxEditor ()
 Show grid box editor and update. More...
 
virtual QString getGridSizeAsString () const
 Returns the grid size as a string. More...
 
virtual bool getGridSize (unsigned &width, unsigned &height) const
 Returns the grid size. More...
 
void createBoundingBoxEditor (const ccBBox &gridBBox, QWidget *parent)
 Creates the bounding-box editor. More...
 
void create2DView (QFrame *parentFrame)
 Creates the 2D view. More...
 
ccRasterGrid::EmptyCellFillOption getFillEmptyCellsStrategy (QComboBox *comboBox) const
 Returns the empty cell strategy (for a given combo-box) More...
 
ccPointCloud * convertGridToCloud (const std::vector< ccRasterGrid::ExportableFields > &exportedFields, bool interpolateSF, bool interpolateColors, bool resampleInputCloudXY, bool resampleInputCloudZ, ccGenericPointCloud *inputCloud, bool fillEmptyCells, double emptyCellsHeight, bool exportToOriginalCS) const
 Shortcut to ccRasterGrid::convertToCloud. More...
 

Protected Attributes

ccGenericPointCloud * m_cloud1
 First associated cloud. More...
 
ccGenericPointCloud * m_cloud2
 Second associated cloud. More...
 
ReportInfo m_lastReport
 Last report. More...
 
- Protected Attributes inherited from cc2Point5DimEditor
ccRasterGrid m_grid
 Raster grid. More...
 
ccBoundingBoxEditorDlg * m_bbEditorDlg
 Associated dialog. More...
 
ccPointCloud * m_rasterCloud
 'Raster' cloud More...
 

Detailed Description

Volume calculation tool (dialog)

Constructor & Destructor Documentation

◆ ccVolumeCalcTool()

◆ ~ccVolumeCalcTool()

ccVolumeCalcTool::~ccVolumeCalcTool ( )

Destructor.

Member Function Documentation

◆ ceilFillEmptyCellStrategyChanged

void ccVolumeCalcTool::ceilFillEmptyCellStrategyChanged ( int  )
protectedslot

Called when the (ceil) empty cell filling strategy changes.

References ccRasterGrid::FILL_CUSTOM_HEIGHT, cc2Point5DimEditor::getFillEmptyCellsStrategy(), and gridIsUpToDate().

Referenced by ccVolumeCalcTool(), and ceilSourceChanged().

◆ ceilSourceChanged

void ccVolumeCalcTool::ceilSourceChanged ( int  )
protectedslot

Ceil source changed.

References ceilFillEmptyCellStrategyChanged().

Referenced by ccVolumeCalcTool().

◆ ComputeVolume()

bool ccVolumeCalcTool::ComputeVolume ( ccRasterGrid &  grid,
ccGenericPointCloud *  ground,
ccGenericPointCloud *  ceil,
const ccBBox &  gridBox,
unsigned char  vertDim,
double  gridStep,
unsigned  gridWidth,
unsigned  gridHeight,
ccRasterGrid::ProjectionType  projectionType,
ccRasterGrid::EmptyCellFillOption  groundEmptyCellFillStrategy,
ccRasterGrid::EmptyCellFillOption  ceilEmptyCellFillStrategy,
ccVolumeCalcTool::ReportInfo &  reportInfo,
double  groundHeight = std::numeric_limits<double>::quiet_NaN(),
double  ceilHeight = std::numeric_limits<double>::quiet_NaN(),
QWidget *  parentWidget = 0 
)
static

◆ convertGridToCloud()

◆ ConvertGridToCloud()

◆ exportGridAsCloud

◆ exportToClipboard

void ccVolumeCalcTool::exportToClipboard ( ) const
protectedslot

Exports info to clipboard.

Referenced by ccVolumeCalcTool().

◆ getGridStep()

double ccVolumeCalcTool::getGridStep ( ) const
overridevirtual

Returns projection grid step.

Implements cc2Point5DimEditor.

Referenced by updateGrid().

◆ getProjectionDimension()

unsigned char ccVolumeCalcTool::getProjectionDimension ( ) const
overridevirtual

Returns projection dimension.

Returns
dimension as int (0: X, 1: Y, 2:Z)

Implements cc2Point5DimEditor.

Referenced by updateGrid().

◆ getTypeOfProjection()

ccRasterGrid::ProjectionType ccVolumeCalcTool::getTypeOfProjection ( ) const
overridevirtual

◆ gridIsUpToDate()

void ccVolumeCalcTool::gridIsUpToDate ( bool  state)
overrideprotectedvirtual

◆ gridOptionChanged

void ccVolumeCalcTool::gridOptionChanged ( )
protectedslot

Called when the an option of the grid generation has changed.

References gridIsUpToDate().

Referenced by ccVolumeCalcTool().

◆ groundFillEmptyCellStrategyChanged

void ccVolumeCalcTool::groundFillEmptyCellStrategyChanged ( int  )
protectedslot

Called when the (ground) empty cell filling strategy changes.

References ccRasterGrid::FILL_CUSTOM_HEIGHT, cc2Point5DimEditor::getFillEmptyCellsStrategy(), and gridIsUpToDate().

Referenced by ccVolumeCalcTool(), and groundSourceChanged().

◆ groundSourceChanged

void ccVolumeCalcTool::groundSourceChanged ( int  )
protectedslot

Ground source changed.

References groundFillEmptyCellStrategyChanged().

Referenced by ccVolumeCalcTool().

◆ loadSettings()

void ccVolumeCalcTool::loadSettings ( )
protected

Load persistent settings.

References ecvPS::VolumeCalculation().

Referenced by ccVolumeCalcTool().

◆ outputReport()

void ccVolumeCalcTool::outputReport ( const ReportInfo &  info)
protected

◆ projectionDirChanged

void ccVolumeCalcTool::projectionDirChanged ( int  dir)
protectedslot

Called when the projection direction changes.

References gridIsUpToDate(), and updateGridInfo().

Referenced by ccVolumeCalcTool().

◆ saveSettings

void ccVolumeCalcTool::saveSettings ( )
protectedslot

Save persistent settings and 'accept' dialog.

References ecvPS::VolumeCalculation().

Referenced by saveSettingsAndAccept().

◆ saveSettingsAndAccept

void ccVolumeCalcTool::saveSettingsAndAccept ( )
protectedslot

Accepts the dialog and save settings.

References saveSettings().

Referenced by ccVolumeCalcTool().

◆ setDisplayedNumberPrecision

void ccVolumeCalcTool::setDisplayedNumberPrecision ( int  precision)
protectedslot

◆ sfProjectionTypeChanged

void ccVolumeCalcTool::sfProjectionTypeChanged ( int  index)
protectedslot

Called when the SF projection type changes.

References gridIsUpToDate().

◆ showGridBoxEditor

bool ccVolumeCalcTool::showGridBoxEditor ( )
overrideprotectedvirtualslot

◆ swapRoles

void ccVolumeCalcTool::swapRoles ( )
protectedslot

Swap roles.

References gridIsUpToDate().

Referenced by ccVolumeCalcTool().

◆ updateGrid()

◆ updateGridAndDisplay

◆ updateGridInfo

void ccVolumeCalcTool::updateGridInfo ( )
protectedslot

Member Data Documentation

◆ m_cloud1

ccGenericPointCloud* ccVolumeCalcTool::m_cloud1
protected

First associated cloud.

Referenced by ccVolumeCalcTool(), exportGridAsCloud(), and updateGrid().

◆ m_cloud2

ccGenericPointCloud* ccVolumeCalcTool::m_cloud2
protected

Second associated cloud.

Referenced by ccVolumeCalcTool(), exportGridAsCloud(), and updateGrid().

◆ m_lastReport

ReportInfo ccVolumeCalcTool::m_lastReport
protected

Last report.

Only valid if clipboardPushButton is enabled

Referenced by outputReport(), and setDisplayedNumberPrecision().


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