vtkMinMax.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMinMax.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
32 #ifndef vtkMinMax_h
33 #define vtkMinMax_h
34 
35 #include "vtkPVVTKExtensionsMiscModule.h" // needed for export macro
36 #include "vtkPolyDataAlgorithm.h"
37 
38 class vtkFieldData;
39 class vtkAbstractArray;
41 
43 {
44 public:
45  static vtkMinMax* New();
47  void PrintSelf(ostream& os, vtkIndent indent) override;
48 
55  {
56  MIN = 0,
57  MAX = 1,
58  SUM = 2
59  };
60 
61  vtkSetClampMacro(Operation, int, MIN, SUM);
62  vtkGetMacro(Operation, int);
63  void SetOperation(const char* op);
64 
66 
70  vtkGetMacro(MismatchOccurred, int);
72 
74 
78  vtkGetStringMacro(FirstPasses);
79  void FlagsForPoints();
80  void FlagsForCells();
82 
83  // temp for debugging
84  const char* Name;
86 
87 protected:
88  vtkMinMax();
89  ~vtkMinMax() override;
90 
91  // overridden to allow multiple inputs to port 0
92  int FillInputPortInformation(int port, vtkInformation* info) override;
93 
94  // run the algorithm
95  int RequestData(vtkInformation* request, vtkInformationVector** inputVector,
96  vtkInformationVector* outputVector) override;
97 
98  // helper methods to break up the work
99  void OperateOnField(vtkFieldData* id, vtkFieldData* od);
100  void OperateOnArray(vtkAbstractArray* ia, vtkAbstractArray* oa);
101 
102  // choice of operation to perform
104 
105  // for keeping track of data initialization on the first value
107  char* CFirstPass;
108  char* PFirstPass;
109  char* FirstPasses;
110 
111  // for deciding what cells and points to ignore
113 
114  // a flag that indicates if values computed could be inaccurate
116 
117 private:
118  vtkMinMax(const vtkMinMax&) = delete;
119  void operator=(const vtkMinMax&) = delete;
120 };
121 
122 #endif
Finds the min, max, or sum of all of its input data attributes.
Definition: vtkMinMax.h:42
virtual int FillInputPortInformation(int port, vtkInformation *info)
int Operation
Definition: vtkMinMax.h:103
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
int vtkIdType
char * CFirstPass
Definition: vtkMinMax.h:107
int ComponentIdx
Definition: vtkMinMax.h:106
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkUnsignedCharArray * GhostArray
Definition: vtkMinMax.h:112
static vtkPolyDataAlgorithm * New()
Operations
Selects the operation to perform on the data.
Definition: vtkMinMax.h:54
#define VTKPVVTKEXTENSIONSMISC_EXPORT
char * FirstPasses
Definition: vtkMinMax.h:109
int MismatchOccurred
Definition: vtkMinMax.h:115
const char * Name
Definition: vtkMinMax.h:84
void operator=(const vtkObjectBase &)
vtkIdType Idx
Definition: vtkMinMax.h:85
char * PFirstPass
Definition: vtkMinMax.h:108