OGS
VtkCompositeImageToSurfacePointsFilter.cpp
Go to the documentation of this file.
1
12
13#include <vtkPointData.h>
14#include <vtkSmartPointer.h>
15
16#include <QMap>
17#include <QString>
18#include <QVariant>
19
21
23 vtkAlgorithm* inputAlgorithm)
24 : VtkCompositeFilter(inputAlgorithm)
25{
26 init();
27}
28
30{
31 _inputDataObjectType = VTK_IMAGE_DATA;
32 _outputDataObjectType = VTK_POLY_DATA;
33
34 VtkImageDataToSurfacePointsFilter* point_cloud_filter =
36 point_cloud_filter->SetInputConnection(_inputAlgorithm->GetOutputPort());
37 _inputAlgorithm->Update();
38
39 (*_algorithmUserProperties)["Points per pixel"] =
40 static_cast<int>(point_cloud_filter->GetPointsPerPixel());
41 point_cloud_filter->Update();
42 _outputAlgorithm = point_cloud_filter;
43}
44
46 QVariant value)
47{
49 if ((name == "Points per pixel") && (value.toInt() > 0))
50 {
52 ->SetPointsPerPixel(static_cast<vtkIdType>(value.toInt()));
53 }
54}
55
57 QString name, QList<QVariant> values)
58{
59 Q_UNUSED(name);
60 Q_UNUSED(values);
61}
virtual void SetUserProperty(QString name, QVariant value)
Sets a user property. This should be implemented by subclasses.
Is used to combine several filter in one VtkVisPipelineItem. You can use vtk filter and custom filter...
vtkAlgorithm * _outputAlgorithm
vtkAlgorithm * _inputAlgorithm
void SetUserProperty(QString name, QVariant value) override
Sets a user property. This should be implemented by subclasses.
void SetUserVectorProperty(QString name, QList< QVariant > values) override
Sets a vector user property. This should be implemented by subclasses.
static VtkImageDataToSurfacePointsFilter * New()
Create a new objects (required because of VTKs reference counting)