src
paraview-5.12
VTKExtensions
Misc
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
;
29
class
vtkUnsignedCharArray
;
30
31
class
VTKPVVTKEXTENSIONSMISC_EXPORT
vtkMinMax
:
public
vtkPolyDataAlgorithm
32
{
33
public
:
34
static
vtkMinMax
*
New
();
35
vtkTypeMacro(
vtkMinMax
,
vtkPolyDataAlgorithm
);
36
void
PrintSelf
(ostream& os,
vtkIndent
indent)
override
;
37
43
enum
Operations
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
// temp for debugging
73
const
char
*
Name
;
74
vtkIdType
Idx
;
75
76
protected
:
77
vtkMinMax
();
78
~
vtkMinMax
()
override
;
79
80
// overridden to allow multiple inputs to port 0
81
int
FillInputPortInformation
(
int
port,
vtkInformation
* info)
override
;
82
83
// run the algorithm
84
int
RequestData
(
vtkInformation
* request,
vtkInformationVector
** inputVector,
85
vtkInformationVector
* outputVector)
override
;
86
87
// helper methods to break up the work
88
void
OperateOnField(
vtkFieldData
*
id
,
vtkFieldData
* od);
89
void
OperateOnArray(
vtkAbstractArray
* ia,
vtkAbstractArray
* oa);
90
91
// choice of operation to perform
92
int
Operation
;
93
94
// for keeping track of data initialization on the first value
95
int
ComponentIdx
;
96
char
*
CFirstPass
;
97
char
*
PFirstPass
;
98
char
*
FirstPasses
;
99
100
// for deciding what cells and points to ignore
101
vtkUnsignedCharArray
*
GhostArray
;
102
103
// a flag that indicates if values computed could be inaccurate
104
int
MismatchOccurred
;
105
106
private
:
107
vtkMinMax
(
const
vtkMinMax
&) =
delete
;
108
void
operator=
(
const
vtkMinMax
&) =
delete
;
109
};
110
111
#endif
vtkObjectBase::operator=
void operator=(const vtkObjectBase &)
vtkMinMax
Finds the min, max, or sum of all of its input data attributes.
Definition:
vtkMinMax.h:31
vtkMinMax::Idx
vtkIdType Idx
Definition:
vtkMinMax.h:74
vtkIdType
int vtkIdType
vtkInformationVector
vtkUnsignedCharArray
vtkFieldData
vtkMinMax::Operation
int Operation
Definition:
vtkMinMax.h:92
vtkPolyDataAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkMinMax::PFirstPass
char * PFirstPass
Definition:
vtkMinMax.h:97
vtkMinMax::CFirstPass
char * CFirstPass
Definition:
vtkMinMax.h:96
vtkMinMax::ComponentIdx
int ComponentIdx
Definition:
vtkMinMax.h:95
vtkPolyDataAlgorithm.h
vtkPolyDataAlgorithm::RequestData
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
vtkMinMax::MismatchOccurred
int MismatchOccurred
Definition:
vtkMinMax.h:104
vtkIndent
vtkMinMax::Operations
Operations
Selects the operation to perform on the data.
Definition:
vtkMinMax.h:43
vtkMinMax::FirstPasses
char * FirstPasses
Definition:
vtkMinMax.h:98
vtkAbstractArray
vtkInformation
vtkMinMax::Name
const char * Name
Definition:
vtkMinMax.h:73
vtkMinMax::GhostArray
vtkUnsignedCharArray * GhostArray
Definition:
vtkMinMax.h:101
vtkPolyDataAlgorithm::New
static vtkPolyDataAlgorithm * New()
vtkPolyDataAlgorithm
vtkPolyDataAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Generated by
1.8.17 on Wed Mar 27 2024