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:
Collaboration diagram for ccVolumeCalcTool:

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 ccPointCloudConvertGridToCloud (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...
 
ccPointCloudconvertGridToCloud (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...
 
ccPointCloudconvertGridToCloud (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

ccGenericPointCloudm_cloud1
 First associated cloud. More...
 
ccGenericPointCloudm_cloud2
 Second associated cloud. More...
 
ReportInfo m_lastReport
 Last report. More...
 
- Protected Attributes inherited from cc2Point5DimEditor
ccRasterGrid m_grid
 Raster grid. More...
 
ccBoundingBoxEditorDlgm_bbEditorDlg
 Associated dialog. More...
 
ccPointCloudm_rasterCloud
 'Raster' cloud More...
 

Detailed Description

Volume calculation tool (dialog)

Definition at line 24 of file ecvVolumeCalcTool.h.

Constructor & Destructor Documentation

◆ ccVolumeCalcTool()

◆ ~ccVolumeCalcTool()

ccVolumeCalcTool::~ccVolumeCalcTool ( )

Destructor.

Definition at line 157 of file ecvVolumeCalcTool.cpp.

Member Function Documentation

◆ ceilFillEmptyCellStrategyChanged

void ccVolumeCalcTool::ceilFillEmptyCellStrategyChanged ( int  )
protectedslot

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

Definition at line 246 of file ecvVolumeCalcTool.cpp.

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

Referenced by ccVolumeCalcTool(), and ceilSourceChanged().

◆ ceilSourceChanged

void ccVolumeCalcTool::ceilSourceChanged ( int  )
protectedslot

Ceil source changed.

Definition at line 180 of file ecvVolumeCalcTool.cpp.

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

void ccVolumeCalcTool::exportGridAsCloud ( ) const
protectedslot

◆ exportToClipboard

void ccVolumeCalcTool::exportToClipboard ( ) const
protectedslot

Exports info to clipboard.

Definition at line 810 of file ecvVolumeCalcTool.cpp.

Referenced by ccVolumeCalcTool().

◆ getGridStep()

double ccVolumeCalcTool::getGridStep ( ) const
overridevirtual

Returns projection grid step.

Implements cc2Point5DimEditor.

Definition at line 216 of file ecvVolumeCalcTool.cpp.

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.

Definition at line 220 of file ecvVolumeCalcTool.cpp.

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.

Definition at line 256 of file ecvVolumeCalcTool.cpp.

References gridIsUpToDate().

Referenced by ccVolumeCalcTool().

◆ groundFillEmptyCellStrategyChanged

void ccVolumeCalcTool::groundFillEmptyCellStrategyChanged ( int  )
protectedslot

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

Definition at line 236 of file ecvVolumeCalcTool.cpp.

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

Referenced by ccVolumeCalcTool(), and groundSourceChanged().

◆ groundSourceChanged

void ccVolumeCalcTool::groundSourceChanged ( int  )
protectedslot

Ground source changed.

Definition at line 174 of file ecvVolumeCalcTool.cpp.

References groundFillEmptyCellStrategyChanged().

Referenced by ccVolumeCalcTool().

◆ loadSettings()

void ccVolumeCalcTool::loadSettings ( )
protected

Load persistent settings.

Definition at line 274 of file ecvVolumeCalcTool.cpp.

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.

Definition at line 231 of file ecvVolumeCalcTool.cpp.

References gridIsUpToDate(), and updateGridInfo().

Referenced by ccVolumeCalcTool().

◆ saveSettings

void ccVolumeCalcTool::saveSettings ( )
protectedslot

Save persistent settings and 'accept' dialog.

Definition at line 320 of file ecvVolumeCalcTool.cpp.

References ecvPS::VolumeCalculation().

Referenced by saveSettingsAndAccept().

◆ saveSettingsAndAccept

void ccVolumeCalcTool::saveSettingsAndAccept ( )
protectedslot

Accepts the dialog and save settings.

Definition at line 315 of file ecvVolumeCalcTool.cpp.

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.

Definition at line 227 of file ecvVolumeCalcTool.cpp.

References gridIsUpToDate().

◆ showGridBoxEditor

bool ccVolumeCalcTool::showGridBoxEditor ( )
overrideprotectedvirtualslot

Definition at line 203 of file ecvVolumeCalcTool.cpp.

References cc2Point5DimEditor::showGridBoxEditor(), and updateGridInfo().

Referenced by ccVolumeCalcTool().

◆ swapRoles

void ccVolumeCalcTool::swapRoles ( )
protectedslot

Swap roles.

Definition at line 185 of file ecvVolumeCalcTool.cpp.

References gridIsUpToDate().

Referenced by ccVolumeCalcTool().

◆ updateGrid()

◆ updateGridAndDisplay

◆ updateGridInfo

void ccVolumeCalcTool::updateGridInfo ( )
protectedslot

Updates the gid info.

Definition at line 212 of file ecvVolumeCalcTool.cpp.

References cc2Point5DimEditor::getGridSizeAsString().

Referenced by ccVolumeCalcTool(), projectionDirChanged(), and showGridBoxEditor().

Member Data Documentation

◆ m_cloud1

ccGenericPointCloud* ccVolumeCalcTool::m_cloud1
protected

First associated cloud.

Definition at line 157 of file ecvVolumeCalcTool.h.

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

◆ m_cloud2

ccGenericPointCloud* ccVolumeCalcTool::m_cloud2
protected

Second associated cloud.

Definition at line 159 of file ecvVolumeCalcTool.h.

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

◆ m_lastReport

ReportInfo ccVolumeCalcTool::m_lastReport
protected

Last report.

Only valid if clipboardPushButton is enabled

Definition at line 164 of file ecvVolumeCalcTool.h.

Referenced by outputReport(), and setDisplayedNumberPrecision().


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