NDEVR
API Documentation
CSF.h
1/*--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: NDEVR
28File: NDEVRPCH
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/Buffer.h>
35#include <NDEVR/GeometryFilter.h>
36#include <NDEVR/GeometrySurfacing.h>
37#include <NDEVR/ProgressInfo.h>
38namespace NDEVR
39{
40 class InfoPipe;
41 class Cloth;
45 struct CSFParams
46 {
47 // refer to the website:http://ramm.bnu.edu.cn/projects/CSF/ for the setting of these parameters
48 CSFParams(LogPtr pipe);
52 fltp04 time_step = 0.65f;
58 bool use_colors = false;
59 bool allow_steep_slopes = false;
60 bool fill_holes = false;
61 };
62
65 class CSFFilter final : public GeometryFilter, public GeometrySurfacing
66 {
67 public:
68 CSF_API CSFFilter();
69 CSF_API bool runFilter(GeometryFilterParameters& parameters) override;
70 CSF_API bool runSurfacing(GeometrySurfacingParameters& parameters) override;
71 CSF_API bool runSurfacing(const CSFParams& parms, GeometrySurfacingParameters& parameters);
73 CSF_API Buffer<SurfacingDescription> defaultSurfacingArguments() override;
74 CSF_API static void ComputeNormals(GeometrySurfacingParameters& parameters, bool use_default_params = true);
75 protected:
76 Cloth runClothOperations(const CSFParams& params, const Bounds<3, fltp04>& bounds);
77 void setupParameters(CSFParams& param, const GenericOptionGroup& parameters);
78 void setupOptions(GenericOptionGroup& parameters, const CSFParams& params);
79 Cloth createCloth(const CSFParams& params, const Bounds<3, fltp04>& bounds) const;
80 };
81
84 class TwoSidedCSFFilter final : public GeometrySurfacing
85 {
86 public:
87 CSF_API TwoSidedCSFFilter();
88 CSF_API bool runSurfacing(GeometrySurfacingParameters& parameters) override;
89 CSF_API Buffer<SurfacingDescription> defaultSurfacingArguments() override;
90 };
91}
A specification of upper and lower bounds in N-dimensions.
Definition Bounds.hpp:54
The equivelent of std::vector but with a bit more control.
Definition Buffer.hpp:58
Filters using the CSF logic for determining bare-earth.
Definition CSF.h:66
The data and operations for performing bare earth using Cloth simulation.
Definition Cloth.h:69
Stores a groups of GenericOptions that can be used to group them.
virtual bool runFilter(GeometryFilterParameters &parameters)=0
Executes this filter on the given parameters, modifying the filtered flags.
GeometryFilter(const TranslatedString &name, const StringView &id)
Constructs a GeometryFilter with the given display name and identifier.
virtual Buffer< FilterDescription > defaultFilterArguments()
Returns the default set of FilterDescription arguments for this filter.
A light-weight base class for Log that allows processes to update, without the need for additional in...
A light-weight wrapper that will be a no-op if there is not a valid log reference,...
Used with InfoPipe to signal that the system will be using progress.
Filters data into a top and bottom half based on the CSF surfacing logic.
Definition CSF.h:85
The primary namespace for the NDEVR SDK.
float fltp04
Defines an alias representing a 4 byte floating-point number Bit layout is as follows: -Sign: 1 bit a...
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
Contains parameters for performing a Cloth surfacing operation.
Definition CSF.h:46
fltp04 cloth_resolution
Resolution of the cloth grid.
Definition CSF.h:54
Buffer< RGBColor > colors
Input point cloud colors.
Definition CSF.h:50
bool allow_steep_slopes
Whether to allow steep slope classification.
Definition CSF.h:59
ProgressInfo progress
Progress reporting for the operation.
Definition CSF.h:57
bool fill_holes
Whether to fill holes in the cloth surface.
Definition CSF.h:60
fltp04 max_height_dev
Maximum height deviation for ground classification.
Definition CSF.h:53
Buffer< bool > filtered
Output: whether each point is classified as ground.
Definition CSF.h:51
uint04 iterations
Maximum number of simulation iterations.
Definition CSF.h:56
fltp04 time_step
Time step for cloth simulation.
Definition CSF.h:52
bool use_colors
Whether to use colors in the simulation.
Definition CSF.h:58
Buffer< Vertex< 3, fltp04 > > positions
Input point cloud positions.
Definition CSF.h:49
uint04 rigidness
Rigidity of the cloth (constraint iterations).
Definition CSF.h:55
Stores a groups of options for performing GeometryFilter operations.