![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <LasSaveDialog.h>


Public Slots | |
| void | handleSelectedVersionChange (const QString &) |
| void | handleSelectedPointFormatChange (int index) |
| When the user changes the point format, we need to update the scalar field form. More... | |
| void | handleComboBoxChange (int index) |
| void | addExtraScalarFieldCard () |
Public Member Functions | |
| LasSaveDialog (ccPointCloud *cloud, QWidget *parent=nullptr) | |
| void | setVersionAndPointFormat (const LasDetails::LasVersion versionAndFmt) |
| void | setOptimalScale (const CCVector3d &scale, bool autoCheck=false) |
| Set scale that would offer the user the best precision. More... | |
| void | setOriginalScale (const CCVector3d &scale, bool canUseScale, bool autoCheck=true) |
| void | setExtraScalarFields (const std::vector< LasExtraScalarField > &extraScalarFields) |
| Set the extra LAS scalar fields saved from the original file. More... | |
| uint8_t | selectedPointFormat () const |
| Returns the point format currently selected. More... | |
| void | selectedVersion (uint8_t &versionMajor, uint8_t &versionMinor) const |
| Returns the version currently selected. More... | |
| CCVector3d | chosenScale () const |
| Returns the currently selected scale. More... | |
| bool | shouldSaveRGB () const |
| Returns whether the user wants to save RGB. More... | |
| bool | shouldSaveWaveform () const |
| Returns whether the user wants to save the Waveforms. More... | |
| std::vector< LasScalarField > | fieldsToSave () const |
| std::vector< LasExtraScalarField > | extraFieldsToSave () const |
This dialog is responsible for presenting to the user the different options when saving a point cloud to a LAS/LAZ file.
Definition at line 47 of file LasSaveDialog.h.
|
explicit |
Definition at line 74 of file LasSaveDialog.cpp.
References addExtraScalarFieldCard(), LasDetails::AvailableVersions(), cloudViewer::PointCloudTpl< T >::getNumberOfScalarFields(), cloudViewer::PointCloudTpl< T >::getScalarFieldName(), handleSelectedPointFormatChange(), and handleSelectedVersionChange().
|
slot |
| CCVector3d LasSaveDialog::chosenScale | ( | ) | const |
Returns the currently selected scale.
Definition at line 499 of file LasSaveDialog.cpp.
References Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by LasIOFilter::saveToFile().
| std::vector< LasExtraScalarField > LasSaveDialog::extraFieldsToSave | ( | ) | const |
Definition at line 557 of file LasSaveDialog.cpp.
References CVLog::Error().
Referenced by LasIOFilter::saveToFile().
| std::vector< LasScalarField > LasSaveDialog::fieldsToSave | ( | ) | const |
Returns the vector of LAS scalar fields the user wants to save.
Each LAS scalar fields is mapped to an existing point cloud's ccScalarField. The mapping is done by us and the user.
Definition at line 521 of file LasSaveDialog.cpp.
References fields, cloudViewer::PointCloudTpl< T >::getScalarField(), cloudViewer::PointCloudTpl< T >::getScalarFieldIndexByName(), LasScalarField::IdFromName(), name, and selectedPointFormat().
Referenced by LasIOFilter::saveToFile().
|
slot |
When the user changes the ccScalarField it wants to save in the particular LAS field, we check that the values are in range. If they are not we display a small warning
Definition at line 170 of file LasSaveDialog.cpp.
References cloudViewer::ScalarField::getMax(), cloudViewer::ScalarField::getMin(), cloudViewer::PointCloudTpl< T >::getScalarField(), cloudViewer::PointCloudTpl< T >::getScalarFieldIndexByName(), LasScalarField::IdFromName(), LasScalarField::Range::max, LasScalarField::Range::min, selectedPointFormat(), and LasScalarField::ValueRange().
Referenced by handleSelectedPointFormatChange().
|
slot |
When the user changes the point format, we need to update the scalar field form.
Definition at line 237 of file LasSaveDialog.cpp.
References LasScalarField::ForPointFormat(), handleComboBoxChange(), ccPointCloud::hasColors(), ccPointCloud::hasFWF(), LasDetails::HasRGB(), LasDetails::HasWaveform(), LasScalarField::name(), LasDetails::PointFormatsAvailableForVersion(), and selectedPointFormat().
Referenced by handleSelectedVersionChange(), and LasSaveDialog().
|
slot |
When the selected version changes, we need to update the combo box of point format to match the ones supported by the version
Definition at line 147 of file LasSaveDialog.cpp.
References handleSelectedPointFormatChange(), LasDetails::PointFormatsAvailableForVersion(), and version.
Referenced by LasSaveDialog().
| uint8_t LasSaveDialog::selectedPointFormat | ( | ) | const |
Returns the point format currently selected.
Definition at line 466 of file LasSaveDialog.cpp.
References min().
Referenced by fieldsToSave(), handleComboBoxChange(), handleSelectedPointFormatChange(), and LasIOFilter::saveToFile().
| void LasSaveDialog::selectedVersion | ( | uint8_t & | versionMajor, |
| uint8_t & | versionMinor | ||
| ) | const |
Returns the version currently selected.
Definition at line 471 of file LasSaveDialog.cpp.
References min(), and qtCompatSplitRefChar().
Referenced by LasIOFilter::saveToFile().
| void LasSaveDialog::setExtraScalarFields | ( | const std::vector< LasExtraScalarField > & | extraScalarFields | ) |
Set the extra LAS scalar fields saved from the original file.
Definition at line 451 of file LasSaveDialog.cpp.
Referenced by LasIOFilter::saveToFile().
| void LasSaveDialog::setOptimalScale | ( | const CCVector3d & | scale, |
| bool | autoCheck = false |
||
| ) |
Set scale that would offer the user the best precision.
Definition at line 419 of file LasSaveDialog.cpp.
References Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by LasIOFilter::saveToFile().
| void LasSaveDialog::setOriginalScale | ( | const CCVector3d & | scale, |
| bool | canUseScale, | ||
| bool | autoCheck = true |
||
| ) |
Set the scale that was used in the original file to save comes from.
Definition at line 432 of file LasSaveDialog.cpp.
References Tuple3Tpl< Type >::x, Tuple3Tpl< Type >::y, and Tuple3Tpl< Type >::z.
Referenced by LasIOFilter::saveToFile().
| void LasSaveDialog::setVersionAndPointFormat | ( | const LasDetails::LasVersion | versionAndFmt | ) |
Definition at line 402 of file LasSaveDialog.cpp.
References LasDetails::LasVersion::minorVersion, and LasDetails::LasVersion::pointFormat.
Referenced by LasIOFilter::saveToFile().
| bool LasSaveDialog::shouldSaveRGB | ( | ) | const |
Returns whether the user wants to save RGB.
Definition at line 489 of file LasSaveDialog.cpp.
Referenced by LasIOFilter::saveToFile().
| bool LasSaveDialog::shouldSaveWaveform | ( | ) | const |
Returns whether the user wants to save the Waveforms.
Definition at line 494 of file LasSaveDialog.cpp.
Referenced by LasIOFilter::saveToFile().