OGS
VtkImageDataToSurfacePointsFilter.h
Go to the documentation of this file.
1
11#pragma once
12
13#include <vtkPolyDataAlgorithm.h>
14
15#include "GeoLib/Raster.h"
17
18class vtkInformation;
19class vtkInformationVector;
20
23class VtkImageDataToSurfacePointsFilter : public vtkPolyDataAlgorithm
24{
25public:
28
30
32 void PrintSelf(ostream& os, vtkIndent indent) override;
33
36
37protected:
40
42 int FillInputPortInformation(int port, vtkInformation* info) override;
43
45 int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
46 vtkInformationVector* outputVector) override;
47
48private:
50 void createPointSurface(vtkSmartPointer<vtkPoints>& points,
51 vtkSmartPointer<vtkCellArray>& cells,
52 std::size_t pnt_idx,
53 MathLib::Point3d const& min_pnt,
54 MathLib::Point3d const& max_pnt,
55 GeoLib::Raster const& raster);
56
58 double getRandomNumber(double const& min, double const& max) const;
59
60 vtkIdType PointsPerPixel{20};
61};
Definition of the GeoLib::Raster class.
Definition of the VtkAlgorithmProperties class.
Class Raster is used for managing raster data.
Definition Raster.h:49
vtkSetMacro(PointsPerPixel, vtkIdType)
int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Updates the graphical object.
vtkGetMacro(PointsPerPixel, vtkIdType)
void createPointSurface(vtkSmartPointer< vtkPoints > &points, vtkSmartPointer< vtkCellArray > &cells, std::size_t pnt_idx, MathLib::Point3d const &min_pnt, MathLib::Point3d const &max_pnt, GeoLib::Raster const &raster)
Creates the point objects based on the parameters set by the user.
~VtkImageDataToSurfacePointsFilter() override=default
void PrintSelf(ostream &os, vtkIndent indent) override
Prints information about itself.
static VtkImageDataToSurfacePointsFilter * New()
Create a new objects (required because of VTKs reference counting)
int FillInputPortInformation(int port, vtkInformation *info) override
Sets input port to vtkImageData.
vtkTypeMacro(VtkImageDataToSurfacePointsFilter, vtkPolyDataAlgorithm)
double getRandomNumber(double const &min, double const &max) const
Returns a random number in [min, max].