![]() |
OGS
|
|
A VTK Filter that will create a point cloud with local densities based on pixel values.
Definition at line 23 of file VtkImageDataToPointCloudFilter.h.
#include <VtkImageDataToPointCloudFilter.h>
Public Member Functions | |
| vtkTypeMacro (VtkImageDataToPointCloudFilter, vtkPolyDataAlgorithm) | |
| void | PrintSelf (ostream &os, vtkIndent indent) override |
| Prints information about the filter. | |
| void | useLinearInterpolation () |
| void | useLogarithmicInterpolation (double gamma) |
| vtkGetMacro (IsLinear, bool) | |
| vtkSetMacro (IsLinear, bool) | |
| vtkGetMacro (MinNumberOfPointsPerCell, vtkIdType) | |
| vtkSetMacro (MinNumberOfPointsPerCell, vtkIdType) | |
| vtkGetMacro (MaxNumberOfPointsPerCell, vtkIdType) | |
| vtkSetMacro (MaxNumberOfPointsPerCell, vtkIdType) | |
| vtkGetMacro (Gamma, double) | |
| vtkSetMacro (Gamma, double) | |
| vtkGetMacro (PointScaleFactor, double) | |
| vtkSetMacro (PointScaleFactor, double) | |
| vtkGetMacro (MinValueRange, double) | |
| vtkSetMacro (MinValueRange, double) | |
| vtkGetMacro (MaxValueRange, double) | |
| vtkSetMacro (MaxValueRange, double) | |
| vtkGetMacro (MinHeight, double) | |
| vtkSetMacro (MinHeight, double) | |
| vtkGetMacro (MaxHeight, double) | |
| vtkSetMacro (MaxHeight, double) | |
Static Public Member Functions | |
| static VtkImageDataToPointCloudFilter * | New () |
| Create a new objects (required because of VTKs reference counting) | |
Protected Member Functions | |
| VtkImageDataToPointCloudFilter () | |
| ~VtkImageDataToPointCloudFilter () override=default | |
| int | FillInputPortInformation (int port, vtkInformation *info) override |
| Sets input port to vtkImageData. | |
| int | RequestData (vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override |
| Updates the graphical object. | |
Protected Attributes | |
| double | Gamma {1.0} |
| double | PointScaleFactor {1.0} |
| double | MinValueRange {-1} |
| double | MaxValueRange {-1} |
| double | MinHeight {0} |
| double | MaxHeight {1000} |
| vtkIdType | MinNumberOfPointsPerCell {1} |
| vtkIdType | MaxNumberOfPointsPerCell {20} |
| bool | IsLinear {true} |
Private Member Functions | |
| void | createPoints (vtkSmartPointer< vtkPoints > &points, vtkSmartPointer< vtkCellArray > &cells, std::size_t pnt_idx, std::size_t n_points, MathLib::Point3d const &min_pnt, MathLib::Point3d const &max_pnt) const |
| Creates the point objects based on the parameters set by the user. | |
| double | getRandomNumber (double const &min, double const &max) const |
| Returns a random number in [min, max]. | |
| std::size_t | interpolate (double low, double high, double p, double gamma) const |
|
protecteddefault |
Referenced by New(), and vtkTypeMacro().
|
overrideprotecteddefault |
|
private |
Creates the point objects based on the parameters set by the user.
Definition at line 163 of file VtkImageDataToPointCloudFilter.cpp.
References getRandomNumber().
Referenced by RequestData().
|
overrideprotected |
Sets input port to vtkImageData.
Definition at line 37 of file VtkImageDataToPointCloudFilter.cpp.
|
private |
Returns a random number in [min, max].
Definition at line 183 of file VtkImageDataToPointCloudFilter.cpp.
Referenced by createPoints().
|
private |
Interpolates the required number of points. Using gamma = 1 this is a linear interpolation, for values smaller/greater than 1 the curve becomes logarithmic/exponential, resulting in a smaller/larger difference of point densities given the same input values.
Definition at line 189 of file VtkImageDataToPointCloudFilter.cpp.
References MaxNumberOfPointsPerCell, and MinNumberOfPointsPerCell.
Referenced by RequestData().
|
static |
Create a new objects (required because of VTKs reference counting)
References VtkImageDataToPointCloudFilter().
Referenced by VtkCompositeImageToPointCloudFilter::init(), and main().
|
override |
Prints information about the filter.
Definition at line 32 of file VtkImageDataToPointCloudFilter.cpp.
|
overrideprotected |
Updates the graphical object.
Definition at line 44 of file VtkImageDataToPointCloudFilter.cpp.
References createPoints(), Gamma, interpolate(), IsLinear, MaxHeight, MaxValueRange, MinHeight, and MinValueRange.
|
inline |
Definition at line 34 of file VtkImageDataToPointCloudFilter.h.
|
inline |
Definition at line 35 of file VtkImageDataToPointCloudFilter.h.
| VtkImageDataToPointCloudFilter::vtkGetMacro | ( | MaxNumberOfPointsPerCell | , |
| vtkIdType | ) |
References MaxNumberOfPointsPerCell.
| VtkImageDataToPointCloudFilter::vtkGetMacro | ( | MaxValueRange | , |
| double | ) |
References MaxValueRange.
| VtkImageDataToPointCloudFilter::vtkGetMacro | ( | MinNumberOfPointsPerCell | , |
| vtkIdType | ) |
References MinNumberOfPointsPerCell.
| VtkImageDataToPointCloudFilter::vtkGetMacro | ( | MinValueRange | , |
| double | ) |
References MinValueRange.
| VtkImageDataToPointCloudFilter::vtkGetMacro | ( | PointScaleFactor | , |
| double | ) |
References PointScaleFactor.
| VtkImageDataToPointCloudFilter::vtkSetMacro | ( | MaxNumberOfPointsPerCell | , |
| vtkIdType | ) |
References MaxNumberOfPointsPerCell.
| VtkImageDataToPointCloudFilter::vtkSetMacro | ( | MaxValueRange | , |
| double | ) |
References MaxValueRange.
| VtkImageDataToPointCloudFilter::vtkSetMacro | ( | MinNumberOfPointsPerCell | , |
| vtkIdType | ) |
References MinNumberOfPointsPerCell.
| VtkImageDataToPointCloudFilter::vtkSetMacro | ( | MinValueRange | , |
| double | ) |
References MinValueRange.
| VtkImageDataToPointCloudFilter::vtkSetMacro | ( | PointScaleFactor | , |
| double | ) |
References PointScaleFactor.
| VtkImageDataToPointCloudFilter::vtkTypeMacro | ( | VtkImageDataToPointCloudFilter | , |
| vtkPolyDataAlgorithm | ) |
References VtkImageDataToPointCloudFilter().
|
protected |
Definition at line 79 of file VtkImageDataToPointCloudFilter.h.
Referenced by RequestData(), vtkGetMacro(), and vtkSetMacro().
|
protected |
Definition at line 87 of file VtkImageDataToPointCloudFilter.h.
Referenced by RequestData(), vtkGetMacro(), and vtkSetMacro().
|
protected |
Definition at line 84 of file VtkImageDataToPointCloudFilter.h.
Referenced by RequestData(), vtkGetMacro(), and vtkSetMacro().
|
protected |
Definition at line 86 of file VtkImageDataToPointCloudFilter.h.
Referenced by interpolate(), vtkGetMacro(), and vtkSetMacro().
|
protected |
Definition at line 82 of file VtkImageDataToPointCloudFilter.h.
Referenced by RequestData(), vtkGetMacro(), and vtkSetMacro().
|
protected |
Definition at line 83 of file VtkImageDataToPointCloudFilter.h.
Referenced by RequestData(), vtkGetMacro(), and vtkSetMacro().
|
protected |
Definition at line 85 of file VtkImageDataToPointCloudFilter.h.
Referenced by interpolate(), vtkGetMacro(), and vtkSetMacro().
|
protected |
Definition at line 81 of file VtkImageDataToPointCloudFilter.h.
Referenced by RequestData(), vtkGetMacro(), and vtkSetMacro().
|
protected |
Definition at line 80 of file VtkImageDataToPointCloudFilter.h.
Referenced by vtkGetMacro(), and vtkSetMacro().