MCPcopy Create free account
hub / github.com/CloudCompare/CloudCompare / process

Method process

qCC/ccCommandRaster.cpp:133–627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

131{}
132
133bool CommandRasterize::process(ccCommandLineInterface &cmd)
134{
135 cmd.print("[RASTERIZE]");
136
137 //look for local options
138 double gridStep = 0;
139 bool outputCloud = false;
140 bool outputRasterZ = false;
141 bool outputRasterSFs = false;
142 bool outputRasterRGB = false;
143 bool outputMesh = false;
144 bool resample = false;
145 double customHeight = std::numeric_limits<double>::quiet_NaN();
146 int vertDir = 2;
147 ccRasterGrid::ProjectionType projectionType = ccRasterGrid::PROJ_AVERAGE_VALUE;
148 ccRasterGrid::ProjectionType sfProjectionType = ccRasterGrid::PROJ_AVERAGE_VALUE;
149 ccRasterGrid::EmptyCellFillOption emptyCellFillStrategy = ccRasterGrid::LEAVE_EMPTY;
150 ccRasterGrid::DelaunayInterpolationParams dInterpParams;
151 ccRasterGrid::KrigingParams krigingParams;
152 {
153 // force auto-guess
154 krigingParams.autoGuess = true;
155 }
156 QString projStdDevSFDesc, sfProjStdDevSFDesc;
157
158 while (!cmd.arguments().empty())
159 {
160 QString argument = cmd.arguments().front();
161 if (ccCommandLineInterface::IsCommand(argument, COMMAND_GRID_OUTPUT_CLOUD))
162 {
163 //local option confirmed, we can move on
164 cmd.arguments().pop_front();
165
166 if (outputMesh)
167 {
168 cmd.warning("Can't output the grid as a mesh AND a cloud at the same time");
169 }
170 else
171 {
172 outputCloud = true;
173 }
174 }
175 else if (ccCommandLineInterface::IsCommand(argument, COMMAND_GRID_OUTPUT_MESH))
176 {
177 //local option confirmed, we can move on
178 cmd.arguments().pop_front();
179
180 if (outputCloud)
181 {
182 cmd.warning("Can't output the grid as a mesh AND a cloud at the same time");
183 }
184 else
185 {
186 outputMesh = true;
187 }
188 }
189 else if (ccCommandLineInterface::IsCommand(argument, COMMAND_GRID_OUTPUT_RASTER_Z))
190 {

Callers 2

startMethod · 0.45

Calls 15

ReadProjectionTypeFunction · 0.85
printMethod · 0.80
warningMethod · 0.80
errorMethod · 0.80
silentModeMethod · 0.80
fillWithMethod · 0.80
fillEmptyCellsMethod · 0.80
backMethod · 0.80
convertToCloudMethod · 0.80
showSFMethod · 0.80

Tested by

no test coverage detected