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 
56 class VTKPVVTKEXTENSIONSFILTERSGENERAL_EXPORT vtkPVGlyphFilter : public vtkPolyDataAlgorithm
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
vtkPVGlyphFilter::VectorScaleMode
VectorScaleMode
Definition: vtkPVGlyphFilter.h:59
vtkPVGlyphFilter::Seed
int Seed
Definition: vtkPVGlyphFilter.h:244
vtkObjectBase::operator=
void operator=(const vtkObjectBase &)
vtkPVGlyphFilter::Stride
int Stride
Definition: vtkPVGlyphFilter.h:245
vtkPVGlyphFilter::MaximumNumberOfSamplePoints
int MaximumNumberOfSamplePoints
Definition: vtkPVGlyphFilter.h:243
vtkPVGlyphFilter::SetSourceConnection
void SetSourceConnection(vtkAlgorithmOutput *algOutput)
Specify a source object at a specified table location.
Definition: vtkPVGlyphFilter.h:85
vtkIdType
int vtkIdType
vtkInformationVector
vtkPVGlyphFilter::SourceTransform
vtkTransform * SourceTransform
Definition: vtkPVGlyphFilter.h:240
vtkPolyDataAlgorithm::RequestUpdateExtent
virtual int RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkPolyDataAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkPVGlyphFilter::Controller
vtkMultiProcessController * Controller
Definition: vtkPVGlyphFilter.h:246
vtkDataArray
vtkTransform
vtkPVGlyphFilter
extended API for vtkGlyph3D for better control over glyph placement.
Definition: vtkPVGlyphFilter.h:56
vtkPVGlyphFilter::EVERY_NTH_POINT
@ EVERY_NTH_POINT
Definition: vtkPVGlyphFilter.h:68
vtkMTimeType
vtkTypeUInt64 vtkMTimeType
vtkPolyDataAlgorithm.h
vtkPolyDataAlgorithm::FillOutputPortInformation
virtual int FillOutputPortInformation(int port, vtkInformation *info)
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkObject::GetMTime
virtual vtkMTimeType GetMTime()
vtkPolyDataAlgorithm::ProcessRequest
virtual int ProcessRequest(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
vtkMultiProcessController
vtkPVGlyphFilter::SPATIALLY_UNIFORM_INVERSE_TRANSFORM_SAMPLING_SURFACE
@ SPATIALLY_UNIFORM_INVERSE_TRANSFORM_SAMPLING_SURFACE
Definition: vtkPVGlyphFilter.h:70
vtkPVGlyphFilter::SCALE_BY_MAGNITUDE
@ SCALE_BY_MAGNITUDE
Definition: vtkPVGlyphFilter.h:61
vtkPVGlyphFilter::ScaleFactor
double ScaleFactor
Definition: vtkPVGlyphFilter.h:241
vtkIndent
vtkPVGlyphFilter::ALL_POINTS
@ ALL_POINTS
Definition: vtkPVGlyphFilter.h:67
vtkDataSet
vtkInformation
vtkPVGlyphFilter::OutputPointsPrecision
int OutputPointsPrecision
Definition: vtkPVGlyphFilter.h:247
vtkPVGlyphFilter::VectorScaleMode
int VectorScaleMode
Definition: vtkPVGlyphFilter.h:239
vtkAlgorithmOutput
vtkPVGlyphFilter::SPATIALLY_UNIFORM_DISTRIBUTION
@ SPATIALLY_UNIFORM_DISTRIBUTION
Definition: vtkPVGlyphFilter.h:69
vtkPolyData
vtkPVGlyphFilter::GlyphModeType
GlyphModeType
Definition: vtkPVGlyphFilter.h:65
vtkPVGlyphFilter::GlyphMode
int GlyphMode
Definition: vtkPVGlyphFilter.h:242
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE