vtkMinMax.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
3 // SPDX-License-Identifier: BSD-3-Clause
21 #ifndef vtkMinMax_h
22 #define vtkMinMax_h
23 
24 #include "vtkPVVTKExtensionsMiscModule.h" // needed for export macro
25 #include "vtkPolyDataAlgorithm.h"
26 
27 class vtkFieldData;
28 class vtkAbstractArray;
30 
32 {
33 public:
34  static vtkMinMax* New();
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
44  {
45  MIN = 0,
46  MAX = 1,
47  SUM = 2
48  };
49 
50  vtkSetClampMacro(Operation, int, MIN, SUM);
51  vtkGetMacro(Operation, int);
52  void SetOperation(const char* op);
53 
55 
59  vtkGetMacro(MismatchOccurred, int);
61 
63 
67  vtkGetStringMacro(FirstPasses);
68  void FlagsForPoints();
69  void FlagsForCells();
71 
72 protected:
73  vtkMinMax();
74  ~vtkMinMax() override;
75 
76  // overridden to allow multiple inputs to port 0
77  int FillInputPortInformation(int port, vtkInformation* info) override;
78 
79  // run the algorithm
80  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
81  vtkInformationVector* outputVector) override;
82 
83  // helper methods to break up the work
84  void OperateOnField(vtkFieldData* id, vtkFieldData* od);
85  void OperateOnArray(vtkAbstractArray* ia, vtkAbstractArray* oa);
86 
87  // choice of operation to perform
88  int Operation;
89 
90  // for keeping track of data initialization on the first value
92  char* CFirstPass;
93  char* PFirstPass;
94  char* FirstPasses;
95 
96  // for deciding what cells and points to ignore
98 
99  // a flag that indicates if values computed could be inaccurate
101 
102 private:
103  vtkMinMax(const vtkMinMax&) = delete;
104  void operator=(const vtkMinMax&) = delete;
105 
106  struct vtkMinMaxWorker;
107 };
108 
109 #endif
Finds the min, max, or sum of all of its input data attributes.
Definition: vtkMinMax.h:31
virtual int FillInputPortInformation(int port, vtkInformation *info)
int Operation
Definition: vtkMinMax.h:88
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
char * CFirstPass
Definition: vtkMinMax.h:92
int ComponentIdx
Definition: vtkMinMax.h:91
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkUnsignedCharArray * GhostArray
Definition: vtkMinMax.h:97
static vtkPolyDataAlgorithm * New()
Operations
Selects the operation to perform on the data.
Definition: vtkMinMax.h:43
#define VTKPVVTKEXTENSIONSMISC_EXPORT
char * FirstPasses
Definition: vtkMinMax.h:94
int MismatchOccurred
Definition: vtkMinMax.h:100
void operator=(const vtkObjectBase &)
char * PFirstPass
Definition: vtkMinMax.h:93