7#include <vtkDataSetAlgorithm.h>
9#include <vtkPointData.h>
10#include <vtkSphereSource.h>
13 vtkAlgorithm* inputAlgorithm)
29 std::size_t nPoints =
static_cast<vtkDataSetAlgorithm*
>(
_inputAlgorithm)
32 ->GetNumberOfTuples();
33 int phi(10 -
static_cast<std::size_t
>(nPoints / 2000.0));
47 (*_algorithmUserProperties)[
"Radius"] = default_radius;
49 (*_algorithmUserProperties)[
"PhiResolution"] = phi;
50 (*_algorithmUserProperties)[
"ThetaResolution"] = theta;
52 vtkGlyph3D* glyphFilter = vtkGlyph3D::New();
59 glyphFilter->SetScaleModeToDataScalingOff();
61 glyphFilter->SetScaleFactor(1.0);
62 glyphFilter->SetSourceConnection(
_glyphSource->GetOutputPort());
78 if (name.compare(
"Radius") == 0)
82 else if (name.compare(
"PhiResolution") == 0)
86 else if (name.compare(
"ThetaResolution") == 0)
90 else if (name.compare(
"ScaleMode") == 0)
94 else if (name.compare(
"ScaleFactor") == 0)
97 ->SetScaleFactor(value.toDouble());
99 else if (name.compare(
"ColorMode") == 0)
103 else if (name.compare(
"VectorMode") == 0)
106 ->SetVectorMode(value.toInt());
108 else if (name.compare(
"Orient") == 0)
virtual void SetUserProperty(QString name, QVariant value)
Sets a user property. This should be implemented by subclasses.
vtkAlgorithm * _outputAlgorithm
int _outputDataObjectType
VtkCompositeFilter(vtkAlgorithm *inputAlgorithm)
Constructor.
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