vtkPVGlyphFilter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVGlyphFilter.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
59 #ifndef vtkPVGlyphFilter_h
60 #define vtkPVGlyphFilter_h
61 
62 #include "vtkPVVTKExtensionsFiltersGeneralModule.h" //needed for exports
63 #include "vtkPolyDataAlgorithm.h"
64 
66 class vtkTransform;
67 
69 {
70 public:
72  {
74  SCALE_BY_COMPONENTS
75  };
76 
78  {
83  SPATIALLY_UNIFORM_INVERSE_TRANSFORM_SAMPLING_VOLUME
84  };
85 
87  void PrintSelf(ostream& os, vtkIndent indent) override;
88  static vtkPVGlyphFilter* New();
89 
91 
96  void SetSourceConnection(int id, vtkAlgorithmOutput* algOutput);
98  {
99  this->SetSourceConnection(0, algOutput);
100  }
102 
104 
108  void SetController(vtkMultiProcessController*);
109  vtkGetObjectMacro(Controller, vtkMultiProcessController);
111 
113 
118  vtkSetClampMacro(VectorScaleMode, int, SCALE_BY_MAGNITUDE, SCALE_BY_COMPONENTS);
119  vtkGetMacro(VectorScaleMode, int);
120 
122 
127  void SetSourceTransform(vtkTransform*);
128  vtkGetObjectMacro(SourceTransform, vtkTransform);
130 
134  vtkMTimeType GetMTime() override;
135 
137 
142  vtkSetMacro(OutputPointsPrecision, int);
143  vtkGetMacro(OutputPointsPrecision, int);
145 
147 
152  vtkSetMacro(ScaleFactor, double);
153  vtkGetMacro(ScaleFactor, double);
154 
156 
159  vtkSetClampMacro(GlyphMode, int, ALL_POINTS, SPATIALLY_UNIFORM_INVERSE_TRANSFORM_SAMPLING_VOLUME);
160  vtkGetMacro(GlyphMode, int);
162 
164 
168  vtkSetClampMacro(Stride, int, 1, VTK_INT_MAX);
169  vtkGetMacro(Stride, int);
171 
173 
176  vtkSetMacro(Seed, int);
177  vtkGetMacro(Seed, int);
179 
181 
185  vtkSetClampMacro(MaximumNumberOfSamplePoints, int, 1, VTK_INT_MAX);
186  vtkGetMacro(MaximumNumberOfSamplePoints, int);
188 
193 
194 protected:
196  ~vtkPVGlyphFilter() override;
197 
198  // Standard Pipeline methods
201  virtual int RequestDataObject(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
202  int FillInputPortInformation(int, vtkInformation*) override;
203  int FillOutputPortInformation(int, vtkInformation*) override;
204 
210  virtual int IsPointVisible(unsigned int index, vtkDataSet* ds, vtkIdType ptId, bool cellCenters);
211 
215  bool IsInputArrayToProcessValid(vtkDataSet* input);
216 
220  vtkPolyData* GetSource(int idx, vtkInformationVector* sourceInfo);
221 
225  bool UseCellCenters(vtkDataSet* input);
226 
230  bool NeedsScalars();
231 
235  bool NeedsVectors();
236 
238 
244  virtual bool Execute(
245  unsigned int index, vtkDataSet* input, vtkInformationVector* sourceVector, vtkPolyData* output);
246  virtual bool Execute(unsigned int index, vtkDataSet* input, vtkInformationVector* sourceVector,
247  vtkPolyData* output, vtkDataArray* inSScalars, vtkDataArray* inVectors,
248  bool cellCenters = false);
250 
253  double ScaleFactor;
256  int Seed;
257  int Stride;
260 
261 private:
262  vtkPVGlyphFilter(const vtkPVGlyphFilter&) = delete;
263  void operator=(const vtkPVGlyphFilter&) = delete;
264 
265  class vtkInternals;
266  vtkInternals* Internals;
267 };
268 
269 #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