ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
ecvRasterizeTool.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <ui_rasterizeDlg.h>
11 
12 // Local
13 #include "ecv2.5DimEditor.h"
14 
15 // Qt
16 #include <QString>
17 
19 class ccPointCloud;
20 class ccPolyline;
21 
23 class ccRasterizeTool : public QDialog,
24  public cc2Point5DimEditor,
25  public Ui::RasterizeToolDialog {
26  Q_OBJECT
27 
28 public:
30  ccRasterizeTool(ccGenericPointCloud* cloud, QWidget* parent = 0);
31 
34 
35 public: // raster export
37  struct ExportBands {
38  bool height = true;
39  bool rgb = false;
40  bool density = false;
41  bool visibleSF = false;
42  bool allSFs = false;
43  };
44 
46  static bool ExportGeoTiff(
47  QString outputFilename,
48  const ExportBands& exportBands,
49  ccRasterGrid::EmptyCellFillOption fillEmptyCellsStrategy,
50  const ccRasterGrid& grid,
51  const ccBBox& gridBBox,
52  unsigned char Z,
53  double customHeightForEmptyCells =
54  std::numeric_limits<double>::quiet_NaN(),
55  ccGenericPointCloud* originCloud = 0,
56  int visibleSfIndex = -1);
57 
58 protected slots:
59 
61  ccPointCloud* generateCloud(bool autoExport = true) const;
62 
64  void generateRaster() const;
65 
67  void generateMesh() const;
68 
70  void exportContourLines();
71 
73  void generateContours();
74 
76  void generateHillshade();
77 
79  void removeContourLines();
80 
82  void testAndAccept();
84  void testAndReject();
85 
87  void saveSettings();
88 
90  void activeLayerChanged(int, bool autoRedraw = true);
91 
93  void projectionDirChanged(int);
94 
96  void projectionTypeChanged(int);
97 
99  void resampleOptionToggled(bool);
100 
102  void sfProjectionTypeChanged(int);
103 
104  // Inherited from cc2Point5DimEditor
105  virtual bool showGridBoxEditor() override;
106 
109 
111  void gridOptionChanged();
112 
114  void updateGridInfo();
115 
117  void updateGridAndDisplay();
118 
120  virtual void generateImage() const;
121 
123  virtual void generateASCIIMatrix() const;
124 
125 protected: // standard methods
126  // Inherited from cc2Point5DimEditor
127  virtual double getGridStep() const override;
128  virtual unsigned char getProjectionDimension() const override;
129  virtual ccRasterGrid::ProjectionType getTypeOfProjection() const override;
130 
132  double getCustomHeightForEmptyCells() const;
133 
136  double& emptyCellsHeight,
137  double& minHeight,
138  double& maxHeight) const;
139 
142  bool exportAsSF(ccRasterGrid::ExportableFields field) const;
143 
146  bool resampleOriginalCloud() const;
147 
150 
151  // Inherited from cc2Point5DimEditor
152  virtual void gridIsUpToDate(bool state) override;
153 
155  void loadSettings();
156 
158  bool updateGrid(bool interpolateSF = false);
159 
161  bool canClose();
162 
164  void addNewContour(ccPolyline* poly, double height, unsigned subIndex);
165 
166 protected: // raster grid related stuff
169  const std::vector<ccRasterGrid::ExportableFields>& exportedFields,
170  bool interpolateSF,
171  bool interpolateColors,
172  bool copyHillshadeSF,
173  QString activeSFName,
174  bool exportToOriginalCS) const;
175 
176 protected: // members
178  enum LayerType { LAYER_HEIGHT = 0, LAYER_RGB = 1, LAYER_SF = 2 };
179 
182 
184  std::vector<ccPolyline*> m_contourLines;
185 };
ImageFileFilter::GetSaveFilename
static QString GetSaveFilename(const QString &dialogTitle, const QString &baseName, const QString &imageSavePath, QWidget *parentWidget=nullptr)
Helper: select an output image filename.
Definition: ImageFileFilter.cpp:74
ccPointCloud::addScalarField
int addScalarField(const char *uniqueName) override
Creates a new scalar field and registers it.
Definition: ecvPointCloud.cpp:4210
ccPointCloud::hasColors
bool hasColors() const override
Returns whether colors are enabled or not.
Definition: ecvPointCloud.cpp:1689
ccRasterizeTool::loadSettings
void loadSettings()
Load persistent settings.
Definition: ecvRasterizeTool.cpp:400
ccRasterGrid::FILL_MINIMUM_HEIGHT
@ FILL_MINIMUM_HEIGHT
Definition: ecvRasterGrid.h:139
ccRasterGrid::PER_CELL_VALUE
@ PER_CELL_VALUE
Definition: ecvRasterGrid.h:80
M_PI
constexpr double M_PI
Pi.
Definition: CVConst.h:19
cc2Point5DimEditor::convertGridToCloud
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.
Definition: ecv2.5DimEditor.cpp:174
cloudViewer::ReferenceCloud::reserve
virtual bool reserve(unsigned n)
Reserves some memory for hosting the point references.
Definition: ReferenceCloud.cpp:51
ccColorScalesManager::GREY
@ GREY
Definition: ecvColorScalesManager.h:32
ccPointCloud::invalidateBoundingBox
void invalidateBoundingBox() override
Invalidates bounding box.
Definition: ecvPointCloud.cpp:1706
ccRasterCell::h
double h
Height value.
Definition: ecvRasterGrid.h:35
cloudViewer::NormalizedProgress::oneStep
bool oneStep()
Increments total progress value of a single unit.
Definition: NormalizedProgress.cpp:99
x
normal_z x
Definition: my_point_types.h:165
ccScalarField::computeMinAndMax
void computeMinAndMax() override
Determines the min and max values.
Definition: ecvScalarField.cpp:145
ecvColor::darkGrey
constexpr Rgb darkGrey(MAX/2, MAX/2, MAX/2)
ecv2.5DimEditor.h
ccEntityAction::interpolateColors
bool interpolateColors(const ccHObject::Container &selectedEntities, QWidget *parent)
Interpolate colors from on entity and transfer them to another one.
Definition: ecvEntityAction.cpp:292
Tuple3Tpl::x
Type x
Definition: CVGeom.h:137
cloudViewer::ReferenceCloud::size
unsigned size() const override
Returns the number of points.
Definition: ReferenceCloud.h:41
cloudViewer::GenericCloud::size
virtual unsigned size() const =0
Returns the number of points.
ccRasterizeTool::ExportBands::height
bool height
Definition: ecvRasterizeTool.h:38
ccRasterGrid::PER_CELL_MIN_VALUE
@ PER_CELL_MIN_VALUE
Definition: ecvRasterGrid.h:82
ccHObject::getParent
ccHObject * getParent() const
Returns parent object.
Definition: ecvHObject.h:245
cc2Point5DimEditor::m_grid
ccRasterGrid m_grid
Raster grid.
Definition: ecv2.5DimEditor.h:87
ccRasterizeTool::generateContours
void generateContours()
Generates a contour plot.
Definition: ecvRasterizeTool.cpp:1680
cloudViewer::ScalarField::getValue
ScalarType & getValue(std::size_t index)
Definition: ScalarField.h:92
ccRasterizeTool::m_cloud
ccGenericPointCloud * m_cloud
Associated cloud.
Definition: ecvRasterizeTool.h:181
ccObject::setMetaData
void setMetaData(const QString &key, const QVariant &data)
Sets a meta-data element.
Definition: ecvObject.cpp:216
ccRasterizeTool::LAYER_SF
@ LAYER_SF
Definition: ecvRasterizeTool.h:178
ccColorScale::Shared
QSharedPointer< ccColorScale > Shared
Shared pointer type.
Definition: ecvColorScale.h:74
ccRasterizeTool::LAYER_HEIGHT
@ LAYER_HEIGHT
Definition: ecvRasterizeTool.h:178
nProgress
cloudViewer::NormalizedProgress * nProgress
Definition: qCanupoTools.cpp:42
ccScalarField::getColor
const ecvColor::Rgb * getColor(ScalarType value) const
Definition: ecvScalarField.h:139
ccObject::setName
virtual void setName(const QString &name)
Sets object name.
Definition: ecvObject.h:75
ccRasterizeTool::convertGridToCloud
ccPointCloud * convertGridToCloud(const std::vector< ccRasterGrid::ExportableFields > &exportedFields, bool interpolateSF, bool interpolateColors, bool copyHillshadeSF, QString activeSFName, bool exportToOriginalCS) const
Converts the grid to a cloud with scalar field(s)
Definition: ecvRasterizeTool.cpp:558
ccColorScalesManager::GetDefaultScale
static ccColorScale::Shared GetDefaultScale(DEFAULT_SCALES scale=BGYR)
Returns a pre-defined color scale (static shortcut)
Definition: ecvColorScalesManager.h:61
ccObject::isA
bool isA(CV_CLASS_ENUM type) const
Definition: ecvObject.h:131
ccBBox
Bounding box structure.
Definition: ecvBBox.h:25
ccRasterizeTool::canClose
bool canClose()
Tests if the dialog can be safely closed.
Definition: ecvRasterizeTool.cpp:486
cloudViewer::PointCloudTpl::getNumberOfScalarFields
unsigned getNumberOfScalarFields() const
Returns the number of associated (and active) scalar fields.
Definition: PointCloudTpl.h:345
cc2Point5DimEditor::getGridSizeAsString
virtual QString getGridSizeAsString() const
Returns the grid size as a string.
Definition: ecv2.5DimEditor.cpp:109
ccShiftedObject::setGlobalScale
virtual void setGlobalScale(double scale)
Definition: ecvShiftedObject.cpp:33
ecvColor::lightGrey
constexpr Rgb lightGrey(static_cast< ColorCompType >(MAX *0.8), static_cast< ColorCompType >(MAX *0.8), static_cast< ColorCompType >(MAX *0.8))
CVLog::Print
static bool Print(const char *format,...)
Prints out a formatted message in console.
Definition: CVLog.cpp:113
CV_TYPES::POINT_CLOUD
@ POINT_CLOUD
Definition: CVTypes.h:104
ccRasterizeTool::testAndAccept
void testAndAccept()
Accepts the dialog (if some conditions are met) and save settings.
Definition: ecvRasterizeTool.cpp:499
ecvProgressDialog::start
virtual void start() override
Definition: ecvProgressDialog.cpp:70
ccRasterizeTool::saveSettings
void saveSettings()
Save persistent settings and 'accept' dialog.
Definition: ecvRasterizeTool.cpp:512
cloudViewer::PointCloudTpl::getPoint
const CCVector3 * getPoint(unsigned index) const override
Definition: PointCloudTpl.h:143
ecvDisplayTools.h
ccRasterizeTool::getGridStep
virtual double getGridStep() const override
Returns projection grid step.
Definition: ecvRasterizeTool.cpp:210
ccObject::getMetaData
QVariant getMetaData(const QString &key) const
Returns a given associated meta data.
Definition: ecvObject.cpp:208
ccRasterGrid::fillWith
bool fillWith(ccGenericPointCloud *cloud, unsigned char projectionDimension, ProjectionType projectionType, bool interpolateEmptyCells, ProjectionType sfInterpolation=INVALID_PROJECTION_TYPE, ecvProgressDialog *progressDialog=nullptr)
Fills the grid with a point cloud.
Definition: ecvRasterGrid.cpp:146
ccRasterizeTool::activeLayerChanged
void activeLayerChanged(int, bool autoRedraw=true)
Called when the active layer changes.
Definition: ecvRasterizeTool.cpp:273
ccRasterGrid::rows
std::vector< Row > rows
All cells.
Definition: ecvRasterGrid.h:193
cloudViewer::PointCloudTpl::size
unsigned size() const override
Definition: PointCloudTpl.h:38
ccPointCloud
A 3D cloud and its associated features (color, normals, scalar fields, etc.)
Definition: ecvPointCloud.h:146
ccRasterGrid::PER_CELL_VALUE_RANGE
@ PER_CELL_VALUE_RANGE
Definition: ecvRasterGrid.h:86
cloudViewer::DELAUNAY_2D_AXIS_ALIGNED
@ DELAUNAY_2D_AXIS_ALIGNED
Definition: PointProjectionTools.h:23
cloudViewer::ScalarField
A simple scalar field (to be associated to a point cloud)
Definition: ScalarField.h:25
ccRasterGrid::PER_CELL_MAX_VALUE
@ PER_CELL_MAX_VALUE
Definition: ecvRasterGrid.h:83
ecvColor::RgbTpl::r
Type r
Definition: ecvColorTypes.h:54
CVLog::PrintDebug
static bool PrintDebug(const char *format,...)
Same as Print, but works only in Debug mode.
Definition: CVLog.cpp:153
ccRasterGrid
Raster grid type.
Definition: ecvRasterGrid.h:53
ccRasterizeTool::m_contourLines
std::vector< ccPolyline * > m_contourLines
Contour lines.
Definition: ecvRasterizeTool.h:184
ccRasterCell
Raster grid cell.
Definition: ecvRasterGrid.h:22
color
math::float4 color
Definition: LineSetBuffers.cpp:46
ccHObject::getDisplayBB_recursive
virtual ccBBox getDisplayBB_recursive(bool relative)
Returns the bounding-box of this entity and it's children WHEN DISPLAYED.
Definition: ecvHObject.cpp:817
cloudViewer::PointCloudTpl::getScalarFieldIndexByName
int getScalarFieldIndexByName(const char *name) const
Returns the index of a scalar field represented by its name.
Definition: PointCloudTpl.h:375
ccObject::isEnabled
virtual bool isEnabled() const
Returns whether the object is enabled or not.
Definition: ecvObject.h:97
ecvDisplayTools::AddToOwnDB
static void AddToOwnDB(ccHObject *obj, bool noDependency=true)
Adds an entity to window own DB.
Definition: ecvDisplayTools.cpp:2093
MainWindow::TheInstance
static MainWindow * TheInstance()
Returns the unique instance of this object.
Definition: MainWindow.cpp:2037
ccRasterGrid::PROJ_MAXIMUM_VALUE
@ PROJ_MAXIMUM_VALUE
Definition: ecvRasterGrid.h:115
ccRasterizeTool::exportAsSF
bool exportAsSF(ccRasterGrid::ExportableFields field) const
Definition: ecvRasterizeTool.cpp:214
MainWindow::addToDB
void addToDB(const QStringList &filenames, QString fileFilter=QString(), bool displayDialog=true)
Definition: MainWindow.cpp:2152
ccDrawableObject::hasScalarFields
virtual bool hasScalarFields() const
Returns whether one or more scalar fields are instantiated.
Definition: ecvDrawableObject.h:105
ccPointCloud::setCurrentDisplayedScalarField
void setCurrentDisplayedScalarField(int index)
Sets the currently displayed scalar field.
Definition: ecvPointCloud.cpp:3227
cloudViewer::PointCloudTpl::getScalarField
ScalarField * getScalarField(int index) const
Returns a pointer to a specific scalar field.
Definition: PointCloudTpl.h:354
ccRasterGrid::FILL_MAXIMUM_HEIGHT
@ FILL_MAXIMUM_HEIGHT
Definition: ecvRasterGrid.h:140
ccEntityAction::interpolateSFs
bool interpolateSFs(const ccHObject::Container &selectedEntities, ecvMainAppInterface *app)
Interpolate scalar fields from on entity and transfer them to another one.
Definition: ecvEntityAction.cpp:352
ccRasterizeTool::getCustomHeightForEmptyCells
double getCustomHeightForEmptyCells() const
Returns user defined height for empty cells.
Definition: ecvRasterizeTool.cpp:355
ccRasterizeTool::gridIsUpToDate
virtual void gridIsUpToDate(bool state) override
Declares whether the grid is up-to-date or not.
Definition: ecvRasterizeTool.cpp:544
ecvFileUtils::defaultDocPath
QString defaultDocPath()
Shortcut for getting the documents location path.
Definition: ecvFileUtils.h:30
CVLog::Error
static bool Error(const char *format,...)
Display an error dialog with formatted message.
Definition: CVLog.cpp:143
ccRasterizeTool::generateImage
virtual void generateImage() const
Exports the grid as an image.
Definition: ecvRasterizeTool.cpp:2144
ccRasterizeTool::generateASCIIMatrix
virtual void generateASCIIMatrix() const
Exports the grid as an ASCII matrix.
Definition: ecvRasterizeTool.cpp:2275
cloudViewer::ScalarField::fill
void fill(ScalarType fillValue=0)
Fills the array with a particular value.
Definition: ScalarField.h:77
ccRasterizeTool::ExportBands
Bands to be exported.
Definition: ecvRasterizeTool.h:37
ccDrawableObject::showColors
virtual void showColors(bool state)
Sets colors visibility.
Definition: ecvDrawableObject.h:84
cloudViewer::ReferenceCloud::addPointIndex
virtual bool addPointIndex(unsigned globalIndex)
Point global index insertion mechanism.
Definition: ReferenceCloud.cpp:84
slots
#define slots
Definition: PythonPlugin.cpp:25
ecvDisplayTools::GetMainWindow
static QMainWindow * GetMainWindow()
Definition: ecvDisplayTools.h:679
ccRasterizeTool::ExportBands::allSFs
bool allSFs
Definition: ecvRasterizeTool.h:42
size
int size
Definition: FileIOFactory.cpp:130
height
int height
Definition: FileIOFactory.cpp:143
ccShiftedObject::getGlobalShift
virtual const CCVector3d & getGlobalShift() const
Returns the shift applied to original coordinates.
Definition: ecvShiftedObject.h:46
cloudViewer::ScalarField::getMin
ScalarType getMin() const
Returns the minimum value.
Definition: ScalarField.h:72
y
normal_z y
Definition: my_point_types.h:168
cc2Point5DimEditor
2.5D data editor (generic interface)
Definition: ecv2.5DimEditor.h:21
cc2Point5DimEditor::getGridSize
virtual bool getGridSize(unsigned &width, unsigned &height) const
Returns the grid size.
Definition: ecv2.5DimEditor.cpp:94
ccRasterizeTool::getTypeOfSFInterpolation
ccRasterGrid::ProjectionType getTypeOfSFInterpolation() const
Returns type of SF interpolation.
Definition: ecvRasterizeTool.cpp:375
ccPolyline::setWidth
void setWidth(PointCoordinateType width)
Sets the width of the line.
Definition: ecvPolyline.cpp:282
ccGenericPointCloud
A 3D cloud interface with associated features (color, normals, octree, etc.)
Definition: ecvGenericPointCloud.h:45
cloudViewer::ScalarField::reserveSafe
bool reserveSafe(std::size_t count)
Reserves memory (no exception thrown)
Definition: ScalarField.cpp:71
ccRasterGrid::minHeight
double minHeight
Min height (computed on the NON-EMPTY or INTERPOLATED cells)
Definition: ecvRasterGrid.h:211
Vector3Tpl< double >
ccRasterizeTool::exportContourLines
void exportContourLines()
Exports the (already generated) contour lines.
Definition: ecvRasterizeTool.cpp:2044
cloudViewer::ScalarField::ValidValue
static bool ValidValue(ScalarType value)
Returns whether a scalar value is valid or not.
Definition: ScalarField.h:61
cloudViewer::ScalarField::getName
const char * getName() const
Returns scalar field name.
Definition: ScalarField.h:43
ccRasterizeTool::projectionTypeChanged
void projectionTypeChanged(int)
Called when the projection type changes.
Definition: ecvRasterizeTool.cpp:254
Isolines::isContourClosed
bool isContourClosed(int contour) const
Returns whether a given contour is closed or not.
Definition: ecvIsolines.h:110
ccRasterizeTool::fillEmptyCellStrategyChanged
void fillEmptyCellStrategyChanged(int)
Called when the empty cell filling strategy changes.
Definition: ecvRasterizeTool.cpp:341
ccRasterGrid::init
bool init(unsigned w, unsigned h, double gridStep, const CCVector3d &minCorner)
Initializes / resets the grid.
Definition: ecvRasterGrid.cpp:123
ccRasterizeTool::LAYER_RGB
@ LAYER_RGB
Definition: ecvRasterizeTool.h:178
ecvGenericPointCloud.h
ccRasterizeTool::generateMesh
void generateMesh() const
Exports the grid as a mesh.
Definition: ecvRasterizeTool.cpp:870
ccRasterGrid::validCellCount
unsigned validCellCount
Number of VALID cells.
Definition: ecvRasterGrid.h:219
ccRasterGrid::scalarFields
std::vector< SF > scalarFields
Associated scalar fields.
Definition: ecvRasterGrid.h:199
Ui
Definition: sfEditDlg.h:16
MainWindow
Definition: MainWindow.h:117
ecvColor::RgbTpl::g
Type g
Definition: ecvColorTypes.h:54
ccRasterGrid::hasColors
bool hasColors
Whether the (average) colors are available or not.
Definition: ecvRasterGrid.h:222
ccRasterizeTool::showGridBoxEditor
virtual bool showGridBoxEditor() override
Definition: ecvRasterizeTool.cpp:197
ccRasterizeTool::generateRaster
void generateRaster() const
Exports the grid as a raster.
Definition: ecvRasterizeTool.cpp:933
ccRasterizeTool::ExportBands::visibleSF
bool visibleSF
Definition: ecvRasterizeTool.h:41
cloudViewer::ReferenceCloud::invalidateBoundingBox
void invalidateBoundingBox()
Invalidates the bounding-box.
Definition: ReferenceCloud.h:227
cloudViewer::BoundingBoxTpl::isValid
bool isValid() const
Returns whether bounding box is valid or not.
Definition: BoundingBox.h:203
ccPointCloud::reserve
bool reserve(unsigned numberOfPoints) override
Reserves memory for all the active features.
Definition: ecvPointCloud.cpp:1452
ccRasterizeTool::getProjectionDimension
virtual unsigned char getProjectionDimension() const override
Returns projection dimension.
Definition: ecvRasterizeTool.cpp:240
ecvFileUtils.h
ecvRasterizeTool.h
CCShareable::release
virtual void release()
Decrease counter and deletes object when 0.
Definition: CVShareable.cpp:35
ecvProgressDialog
Graphical progress indicator (thread-safe)
Definition: ecvProgressDialog.h:27
cloudViewer::ScalarField::getMax
ScalarType getMax() const
Returns the maximum value.
Definition: ScalarField.h:74
ccRasterGrid::PER_CELL_COUNT
@ PER_CELL_COUNT
Definition: ecvRasterGrid.h:81
ecvMesh.h
ccRasterGrid::height
unsigned height
Number of rows.
Definition: ecvRasterGrid.h:204
ccRasterizeTool
Rasterize tool (dialog)
Definition: ecvRasterizeTool.h:23
ecvScalarField.h
ecvProgressDialog::setMethodTitle
virtual void setMethodTitle(const char *methodTitle) override
Notifies the algorithm title.
Definition: ecvProgressDialog.h:49
ccRasterGrid::EmptyCellFillOption
EmptyCellFillOption
Option for handling empty cells.
Definition: ecvRasterGrid.h:137
ccRasterizeTool::testAndReject
void testAndReject()
Rejects the dialog (if some conditions are met)
Definition: ecvRasterizeTool.cpp:506
ecvProgressDialog.h
ecvPersistentSettings.h
ccDrawableObject::colorsShown
virtual bool colorsShown() const
Returns whether colors are shown or not.
Definition: ecvDrawableObject.h:82
ccRasterGrid::GetDefaultFieldName
static QString GetDefaultFieldName(ExportableFields field)
Returns the default name of a given field.
Definition: ecvRasterGrid.cpp:44
cloudViewer::PointProjectionTools
Definition: PointProjectionTools.h:34
ccRasterizeTool::getTypeOfProjection
virtual ccRasterGrid::ProjectionType getTypeOfProjection() const override
Returns type of projection.
Definition: ecvRasterizeTool.cpp:359
cloudViewer::utility::floor
MiniVec< float, N > floor(const MiniVec< float, N > &a)
Definition: MiniVec.h:75
ccDrawableObject::showSF
virtual void showSF(bool state)
Sets active scalarfield visibility.
Definition: ecvDrawableObject.h:108
ccRasterizeTool::resampleOptionToggled
void resampleOptionToggled(bool)
Called when the 'resampled' option changes.
Definition: ecvRasterizeTool.cpp:247
ccRasterizeTool::generateHillshade
void generateHillshade()
Generates hillshade.
Definition: ecvRasterizeTool.cpp:1408
ccRasterGrid::FILL_AVERAGE_HEIGHT
@ FILL_AVERAGE_HEIGHT
Definition: ecvRasterGrid.h:142
ccRasterizeTool::ExportBands::rgb
bool rgb
Definition: ecvRasterizeTool.h:39
ccDrawableObject::setVisible
virtual void setVisible(bool state)
Sets entity visibility.
Definition: ecvDrawableObject.h:40
ccRasterGrid::maxHeight
double maxHeight
Max height (computed on the NON-EMPTY or INTERPOLATED cells)
Definition: ecvRasterGrid.h:213
ccRasterGrid::ExportableFields
ExportableFields
Exportable fields.
Definition: ecvRasterGrid.h:79
cloudViewer::GenericIndexedMesh
A generic mesh with index-based vertex access.
Definition: GenericIndexedMesh.h:37
Tuple3Tpl::z
Type z
Definition: CVGeom.h:137
cloudViewer::Polyline::setClosed
void setClosed(bool state)
Sets whether the polyline is closed or not.
Definition: Polyline.h:29
ccScalarField::setColorScale
void setColorScale(ccColorScale::Shared scale)
Sets associated color scale.
Definition: ecvScalarField.cpp:108
ecvColor::RgbTpl::b
Type b
Definition: ecvColorTypes.h:54
ccPolyline::setGlobalShift
virtual void setGlobalShift(const CCVector3d &shift) override
Sets shift applied to original coordinates (information storage only)
Definition: ecvPolyline.cpp:568
ccRasterGrid::LEAVE_EMPTY
@ LEAVE_EMPTY
Definition: ecvRasterGrid.h:138
ccRasterizeTool::removeContourLines
void removeContourLines()
Removes all displayed contour lines.
Definition: ecvRasterizeTool.cpp:182
ccRasterizeTool::LayerType
LayerType
Layer types.
Definition: ecvRasterizeTool.h:178
cloudViewer::DegreesToRadians
float DegreesToRadians(int degrees)
Convert degrees to radians.
Definition: CVMath.h:98
ccRasterizeTool::addNewContour
void addNewContour(ccPolyline *poly, double height, unsigned subIndex)
Adds a new contour line.
Definition: ecvRasterizeTool.cpp:1644
cc2Point5DimEditor::m_rasterCloud
ccPointCloud * m_rasterCloud
'Raster' cloud
Definition: ecv2.5DimEditor.h:93
ecvIsolines.h
ccScalarField::Range::min
ScalarType min() const
Definition: ecvScalarField.h:42
Isolines::getContourLength
int getContourLength(int contour) const
Returns the length of a given contour.
Definition: ecvIsolines.h:105
ccRasterGrid::Row
std::vector< ccRasterCell > Row
Row.
Definition: ecvRasterGrid.h:190
for
for(size_t i=0;i< 36;++i)
Definition: essential_matrix_poly.h:14
MainWindow.h
cloudViewer::GenericIndexedCloud::getPoint
virtual const CCVector3 * getPoint(unsigned index) const =0
Returns the ith point.
ccPolyline::MetaKeyConstAltitude
static QString MetaKeyConstAltitude()
Meta data key: contour plot constant altitude (for contour plots, etc.)
Definition: ecvPolyline.h:224
ccRasterGrid::FILL_CUSTOM_HEIGHT
@ FILL_CUSTOM_HEIGHT
Definition: ecvRasterGrid.h:141
ccRasterGrid::PROJ_AVERAGE_VALUE
@ PROJ_AVERAGE_VALUE
Definition: ecvRasterGrid.h:114
cc2Point5DimEditor::update2DDisplayZoom
virtual void update2DDisplayZoom(ccBBox &box)
Updates the 2D display zoom.
Definition: ecv2.5DimEditor.cpp:122
HILLSHADE_FIELD_NAME
static const char HILLSHADE_FIELD_NAME[]
Definition: ecvRasterizeTool.cpp:42
ccDrawableObject::sfShown
virtual bool sfShown() const
Returns whether active scalar field is visible.
Definition: ecvDrawableObject.h:117
CVLog::Warning
static bool Warning(const char *format,...)
Prints out a formatted warning message in console.
Definition: CVLog.cpp:133
ecvColorScalesManager.h
ccRasterizeTool::ccRasterizeTool
ccRasterizeTool(ccGenericPointCloud *cloud, QWidget *parent=0)
Default constructor.
Definition: ecvRasterizeTool.cpp:44
ecvProgressDialog::setInfo
virtual void setInfo(const char *infoStr) override
Notifies some information about the ongoing process.
Definition: ecvProgressDialog.h:52
ccRasterizeTool::~ccRasterizeTool
~ccRasterizeTool()
Destructor.
Definition: ecvRasterizeTool.cpp:180
Isolines::getContourY
double getContourY(int contour, int v) const
Definition: ecvIsolines.h:801
ccScalarField::getColorScale
const ccColorScale::Shared & getColorScale() const
Returns associated color scale.
Definition: ecvScalarField.h:186
ecvColor::RgbTpl
RGB color structure.
Definition: ecvColorTypes.h:49
cloudViewer::PointProjectionTools::computeTriangulation
static GenericIndexedMesh * computeTriangulation(GenericIndexedCloudPersist *cloud, TRIANGULATION_TYPES type, PointCoordinateType maxEdgeLength, unsigned char dim, std::string &outputErrorStr)
Applys a geometrical transformation to a single point.
Definition: PointProjectionTools.cpp:275
Isolines
Definition: ecvIsolines.h:55
ccPointCloud::getCurrentDisplayedScalarField
ccScalarField * getCurrentDisplayedScalarField() const
Returns the currently displayed scalar (or 0 if none)
Definition: ecvPointCloud.cpp:3218
ccMesh
Triangular mesh.
Definition: ecvMesh.h:35
ccRasterGrid::isValid
bool isValid() const
Returns whether the grid is 'valid' or not.
Definition: ecvRasterGrid.h:165
ccShiftedObject::getGlobalScale
virtual double getGlobalScale() const
Returns the scale applied to original coordinates.
Definition: ecvShiftedObject.h:53
NAN_VALUE
constexpr ScalarType NAN_VALUE
NaN as a ScalarType value.
Definition: CVConst.h:76
ccShiftedObject::setGlobalShift
virtual void setGlobalShift(double x, double y, double z)
Sets shift applied to original coordinates (information storage only)
Definition: ecvShiftedObject.h:33
ecvDisplayTools::RemoveFromOwnDB
static void RemoveFromOwnDB(ccHObject *obj)
Removes an entity from window own DB.
Definition: ecvDisplayTools.cpp:2108
ccRasterGrid::PER_CELL_AVG_VALUE
@ PER_CELL_AVG_VALUE
Definition: ecvRasterGrid.h:84
ccDrawableObject::hasColors
virtual bool hasColors() const
Returns whether colors are enabled or not.
Definition: ecvDrawableObject.h:80
ccHObject
Hierarchical CLOUDVIEWER Object.
Definition: ecvHObject.h:25
Tuple3Tpl::y
Type y
Definition: CVGeom.h:137
ecvDisplayTools::RedrawDisplay
static void RedrawDisplay(bool only2D=false, bool forceRedraw=true)
Definition: ecvDisplayTools.cpp:2883
ccObject::getName
virtual QString getName() const
Returns object name.
Definition: ecvObject.h:72
ccScalarField::Range::max
ScalarType max() const
Definition: ecvScalarField.h:45
ccRasterizeTool::projectionDirChanged
void projectionDirChanged(int)
Called when the projection direction changes.
Definition: ecvRasterizeTool.cpp:268
ccRasterGrid::gridStep
double gridStep
Grid step ('pixel' size)
Definition: ecvRasterGrid.h:206
cloudViewer::BoundingBoxTpl::maxCorner
const Vector3Tpl< T > & maxCorner() const
Returns max corner (const)
Definition: BoundingBox.h:156
ecvPolyline.h
ccPolyline::setGlobalScale
virtual void setGlobalScale(double scale) override
Definition: ecvPolyline.cpp:578
cloudViewer::ScalarField::setValue
void setValue(std::size_t index, ScalarType value)
Definition: ScalarField.h:96
ccRasterizeTool::updateGrid
bool updateGrid(bool interpolateSF=false)
Updates the grid.
Definition: ecvRasterizeTool.cpp:696
Isolines::setThreshold
void setThreshold(T t)
Sets isoline value to trace.
Definition: ecvIsolines.h:91
ccRasterizeTool::sfProjectionTypeChanged
void sfProjectionTypeChanged(int)
Called when the SF projection type changes.
Definition: ecvRasterizeTool.cpp:264
ccGenericPointCloud::getOwnBB
ccBBox getOwnBB(bool withGLFeatures=false) override
Returns the entity's own bounding-box.
Definition: ecvGenericPointCloud.cpp:139
cloudViewer::PointCloudTpl::addPoint
void addPoint(const CCVector3 &P)
Adds a 3D point to the database.
Definition: PointCloudTpl.h:246
ccRasterGrid::PER_CELL_VALUE_STD_DEV
@ PER_CELL_VALUE_STD_DEV
Definition: ecvRasterGrid.h:85
Isolines::find
int find(const T *in)
Find isolines.
Definition: ecvIsolines.h:94
X
void * X
Definition: SmallVector.cpp:45
ccScalarField::Range
Scalar field range structure.
Definition: ecvScalarField.h:36
cloudViewer::NormalizedProgress
Definition: GenericProgressCallback.h:78
PointCoordinateType
float PointCoordinateType
Type of the coordinates of a (N-D) point.
Definition: CVTypes.h:16
ccRasterizeTool::resampleOriginalCloud
bool resampleOriginalCloud() const
Definition: ecvRasterizeTool.cpp:235
ecvPS::HeightGridGeneration
static const QString HeightGridGeneration()
Definition: ecvPersistentSettings.h:69
Tuple3Tpl::u
Type u[3]
Definition: CVGeom.h:139
ccRasterizeTool::ExportBands::density
bool density
Definition: ecvRasterizeTool.h:40
ccScalarField::Range::range
ScalarType range() const
Definition: ecvScalarField.h:46
ccRasterizeTool::updateGridAndDisplay
void updateGridAndDisplay()
Update the grid and the 2D display.
Definition: ecvRasterizeTool.cpp:632
ccRasterizeTool::ExportGeoTiff
static bool ExportGeoTiff(QString outputFilename, const ExportBands &exportBands, ccRasterGrid::EmptyCellFillOption fillEmptyCellsStrategy, const ccRasterGrid &grid, const ccBBox &gridBBox, unsigned char Z, double customHeightForEmptyCells=std::numeric_limits< double >::quiet_NaN(), ccGenericPointCloud *originCloud=0, int visibleSfIndex=-1)
Exports a raster grid as a geotiff file.
Definition: ecvRasterizeTool.cpp:1038
cc2Point5DimEditor::showGridBoxEditor
virtual bool showGridBoxEditor()
Show grid box editor and update.
Definition: ecv2.5DimEditor.cpp:41
cc2Point5DimEditor::getFillEmptyCellsStrategy
ccRasterGrid::EmptyCellFillOption getFillEmptyCellsStrategy(QComboBox *comboBox) const
Returns the empty cell strategy (for a given combo-box)
Definition: ecv2.5DimEditor.cpp:198
ccRasterizeTool::updateGridInfo
void updateGridInfo()
Updates the gid info.
Definition: ecvRasterizeTool.cpp:206
ccHObject::addChild
virtual bool addChild(ccHObject *child, int dependencyFlags=DP_PARENT_OF_OTHER, int insertIndex=-1)
Adds a child.
Definition: ecvHObject.cpp:534
Isolines::createOnePixelBorder
void createOnePixelBorder(T *in, T borderval) const
Creates a single pixel, 0-valued border around the grid.
Definition: ecvIsolines.h:135
cloudViewer::ReferenceCloud::getAssociatedCloud
virtual GenericIndexedCloudPersist * getAssociatedCloud()
Returns the associated (source) cloud.
Definition: ReferenceCloud.h:206
ccObject::setEnabled
virtual void setEnabled(bool state)
Sets the "enabled" property.
Definition: ecvObject.h:102
cc2Point5DimEditor::create2DView
void create2DView(QFrame *parentFrame)
Creates the 2D view.
Definition: ecv2.5DimEditor.cpp:63
cloudViewer::LessThanEpsilon
bool LessThanEpsilon(float x)
Test a floating point number against our epsilon (a very small number).
Definition: CVMath.h:23
Vector3Tpl< double >::fromArray
static Vector3Tpl fromArray(const int a[3])
Constructor from an int array.
Definition: CVGeom.h:268
ccRasterizeTool::generateCloud
ccPointCloud * generateCloud(bool autoExport=true) const
Exports the grid as a cloud.
Definition: ecvRasterizeTool.cpp:804
ecvPointCloud.h
cloudViewer::ScalarField::currentSize
unsigned currentSize() const
Definition: ScalarField.h:100
ccScalarField::displayRange
const Range & displayRange() const
Access to the range of displayed values.
Definition: ecvScalarField.h:108
ccRasterizeTool::getFillEmptyCellsStrategyExt
ccRasterGrid::EmptyCellFillOption getFillEmptyCellsStrategyExt(double &emptyCellsHeight, double &minHeight, double &maxHeight) const
Returns strategy for empty cell filling (extended version)
Definition: ecvRasterizeTool.cpp:2099
ccRasterizeTool::gridOptionChanged
void gridOptionChanged()
Called when the an option of the grid generation has changed.
Definition: ecvRasterizeTool.cpp:353
ecvCommon.h
ccScalarField
A scalar field associated to display-related parameters.
Definition: ecvScalarField.h:19
cc2Point5DimEditor::getCustomBBox
virtual ccBBox getCustomBBox() const
Returns custom bbox.
Definition: ecv2.5DimEditor.cpp:118
Isolines::getContourX
double getContourX(int contour, int v) const
Definition: ecvIsolines.h:796
ccRasterGrid::INTERPOLATE_DELAUNAY
@ INTERPOLATE_DELAUNAY
Definition: ecvRasterGrid.h:143
ccRasterGrid::ProjectionType
ProjectionType
Types of projection.
Definition: ecvRasterGrid.h:112
ccPolyline::setColor
void setColor(const ecvColor::Rgb &col)
Sets the polyline color.
Definition: ecvPolyline.h:81
ccRasterGrid::INVALID_PROJECTION_TYPE
@ INVALID_PROJECTION_TYPE
Definition: ecvRasterGrid.h:118
ccRasterGrid::meanHeight
double meanHeight
Average height (computed on the NON-EMPTY or INTERPOLATED cells)
Definition: ecvRasterGrid.h:215
cloudViewer::BoundingBoxTpl::minCorner
const Vector3Tpl< T > & minCorner() const
Returns min corner (const)
Definition: BoundingBox.h:154
ccPolyline
Colored polyline.
Definition: ecvPolyline.h:23
cc2Point5DimEditor::createBoundingBoxEditor
void createBoundingBoxEditor(const ccBBox &gridBBox, QWidget *parent)
Creates the bounding-box editor.
Definition: ecv2.5DimEditor.cpp:55
ccRasterGrid::width
unsigned width
Number of columns.
Definition: ecvRasterGrid.h:202
ccRasterGrid::PROJ_MINIMUM_VALUE
@ PROJ_MINIMUM_VALUE
Definition: ecvRasterGrid.h:113