vtkPVGlyphFilter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
47 #ifndef vtkPVGlyphFilter_h
48 #define vtkPVGlyphFilter_h
49 
50 #include "vtkPVVTKExtensionsFiltersGeneralModule.h" //needed for exports
51 #include "vtkPolyDataAlgorithm.h"
52 
54 class vtkTransform;
55 
57 {
58 public:
60  {
62  SCALE_BY_COMPONENTS
63  };
64 
66  {
71  SPATIALLY_UNIFORM_INVERSE_TRANSFORM_SAMPLING_VOLUME
72  };
73 
75  void PrintSelf(ostream& os, vtkIndent indent) override;
76  static vtkPVGlyphFilter* New();
77 
79 
84  void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
86  {
87  this->SetSourceConnection(0, algOutput);
88  }
90 
92 
96  void SetController(vtkMultiProcessController*);
97  vtkGetObjectMacro(Controller, vtkMultiProcessController);
99 
101 
105  vtkSetClampMacro(VectorScaleMode, int, SCALE_BY_MAGNITUDE, SCALE_BY_COMPONENTS);
107  vtkGetMacro(VectorScaleMode, int);
108 
110 
115  void SetSourceTransform(vtkTransform*);
116  vtkGetObjectMacro(SourceTransform, vtkTransform);
118 
122  vtkMTimeType GetMTime() override;
123 
125 
130  vtkSetMacro(OutputPointsPrecision, int);
131  vtkGetMacro(OutputPointsPrecision, int);
133 
135 
139  vtkSetMacro(ScaleFactor, double);
141  vtkGetMacro(ScaleFactor, double);
142 
144 
147  vtkSetClampMacro(GlyphMode, int, ALL_POINTS, SPATIALLY_UNIFORM_INVERSE_TRANSFORM_SAMPLING_VOLUME);
148  vtkGetMacro(GlyphMode, int);
150 
152 
156  vtkSetClampMacro(Stride, int, 1, VTK_INT_MAX);
157  vtkGetMacro(Stride, int);
159 
161 
164  vtkSetMacro(Seed, int);
165  vtkGetMacro(Seed, int);
167 
169 
173  vtkSetClampMacro(MaximumNumberOfSamplePoints, int, 1, VTK_INT_MAX);
174  vtkGetMacro(MaximumNumberOfSamplePoints, int);
176 
181 
182 protected:
184  ~vtkPVGlyphFilter() override;
185 
186  // Standard Pipeline methods
189  virtual int RequestDataObject(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
190  int FillInputPortInformation(int, vtkInformation*) override;
191  int FillOutputPortInformation(int, vtkInformation*) override;
192 
198  virtual int IsPointVisible(unsigned int index, vtkDataSet* ds, vtkIdType ptId, bool cellCenters);
199 
203  bool IsInputArrayToProcessValid(vtkDataSet* input);
204 
208  vtkPolyData* GetSource(int idx, vtkInformationVector* sourceInfo);
209 
213  bool UseCellCenters(vtkDataSet* input);
214 
218  bool NeedsScalars();
219 
223  bool NeedsVectors();
224 
226 
232  virtual bool Execute(
233  unsigned int index, vtkDataSet* input, vtkInformationVector* sourceVector, vtkPolyData* output);
234  virtual bool Execute(unsigned int index, vtkDataSet* input, vtkInformationVector* sourceVector,
235  vtkPolyData* output, vtkDataArray* inSScalars, vtkDataArray* inVectors,
236  bool cellCenters = false);
238 
241  double ScaleFactor;
244  int Seed;
245  int Stride;
248 
249 private:
250  vtkPVGlyphFilter(const vtkPVGlyphFilter&) = delete;
251  void operator=(const vtkPVGlyphFilter&) = delete;
252 
253  class vtkInternals;
254  vtkInternals* Internals;
255 };
256 
257 #endif
virtual int FillInputPortInformation(int port, vtkInformation *info)
virtual int FillOutputPortInformation(int port, vtkInformation *info)
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
#define VTK_INT_MAX
int vtkIdType
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkTypeUInt64 vtkMTimeType
static vtkPolyDataAlgorithm * New()
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
virtual vtkMTimeType GetMTime()
vtkMultiProcessController * Controller
#define VTKPVVTKEXTENSIONSFILTERSGENERAL_EXPORT
extended API for vtkGlyph3D for better control over glyph placement.
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify a source object at a specified table location.
index
void operator=(const vtkObjectBase &)
vtkTransform * SourceTransform