18#include <vtkDataSetAlgorithm.h>
19#include <vtkGlyph3D.h>
20#include <vtkPointData.h>
21#include <vtkSphereSource.h>
24 vtkAlgorithm* inputAlgorithm)
40 std::size_t nPoints =
static_cast<vtkDataSetAlgorithm*
>(
_inputAlgorithm)
43 ->GetNumberOfTuples();
44 int phi(10 -
static_cast<std::size_t
>(nPoints / 2000.0));
58 (*_algorithmUserProperties)[
"Radius"] = default_radius;
60 (*_algorithmUserProperties)[
"PhiResolution"] = phi;
61 (*_algorithmUserProperties)[
"ThetaResolution"] = theta;
63 vtkGlyph3D* glyphFilter = vtkGlyph3D::New();
70 glyphFilter->SetScaleModeToDataScalingOff();
72 glyphFilter->SetScaleFactor(1.0);
73 glyphFilter->SetSourceConnection(
_glyphSource->GetOutputPort());
89 if (name.compare(
"Radius") == 0)
93 else if (name.compare(
"PhiResolution") == 0)
97 else if (name.compare(
"ThetaResolution") == 0)
101 else if (name.compare(
"ScaleMode") == 0)
105 else if (name.compare(
"ScaleFactor") == 0)
108 ->SetScaleFactor(value.toDouble());
110 else if (name.compare(
"ColorMode") == 0)
114 else if (name.compare(
"VectorMode") == 0)
117 ->SetVectorMode(value.toInt());
119 else if (name.compare(
"Orient") == 0)
Definition of the VtkCompositePointToGlyphFilter class.
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
int _outputDataObjectType
double GetInitialRadius() const
Calculates a 1/200th of the largest extension of the bounding box (this is used as default radius for...
vtkAlgorithm * _inputAlgorithm
vtkSphereSource * _glyphSource
void SetUserProperty(QString name, QVariant value) override
Sets a user property. This should be implemented by subclasses.
VtkCompositePointToGlyphFilter(vtkAlgorithm *inputAlgorithm)
~VtkCompositePointToGlyphFilter() override