1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkImageDivergence.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 =========================================================================*/
15 /**
16  * @class   vtkImageDivergence
17  * @brief   Divergence of a vector field.
18  *
19  * vtkImageDivergence takes a 3D vector field
20  * and creates a scalar field which
21  * which represents the rate of change of the vector field.
22  * The definition of Divergence:
23  * Given V = P(x,y,z), Q(x,y,z), R(x,y,z),
24  * Divergence = dP/dx + dQ/dy + dR/dz.
25 */
26 
27 #ifndef vtkImageDivergence_h
28 #define vtkImageDivergence_h
29 
30 #include "vtkImagingMathModule.h" // For export macro
31 #include "vtkThreadedImageAlgorithm.h"
32 
33 class VTKIMAGINGMATH_EXPORT vtkImageDivergence : public vtkThreadedImageAlgorithm
34 {
35 public:
36   static vtkImageDivergence *New();
37   vtkTypeMacro(vtkImageDivergence,vtkThreadedImageAlgorithm);
38 
39 protected:
40   vtkImageDivergence();
~vtkImageDivergence()41   ~vtkImageDivergence() override {}
42 
43   int RequestUpdateExtent(vtkInformation*,
44                                   vtkInformationVector**,
45                                   vtkInformationVector*) override;
46   int RequestInformation (vtkInformation*,
47                                   vtkInformationVector**,
48                                   vtkInformationVector*) override;
49   void ThreadedExecute (vtkImageData *inData, vtkImageData *outData,
50                        int ext[6], int id) override;
51 
52 private:
53   vtkImageDivergence(const vtkImageDivergence&) = delete;
54   void operator=(const vtkImageDivergence&) = delete;
55 };
56 
57 #endif
58 
59 
60 
61 // VTK-HeaderTest-Exclude: vtkImageDivergence.h
62