1 /*=========================================================================
2 
3   Program:   Visualization Toolkit
4   Module:    vtkThreadedSynchronizedTemplatesCutter3D.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   vtkThreadedSynchronizedTemplatesCutter3D
17  * @brief   generate cut surface from structured points
18  *
19  *
20  * vtkThreadedSynchronizedTemplatesCutter3D is an implementation of the
21  * synchronized template algorithm.
22  *
23  * @sa
24  * vtkContourFilter vtkSynchronizedTemplates3D vtkThreadedSynchronizedTemplates3D vtkSynchronizedTemplatesCutter3D
25 */
26 
27 #ifndef vtkThreadedSynchronizedTemplatesCutter3D_h
28 #define vtkThreadedSynchronizedTemplatesCutter3D_h
29 
30 #include "vtkFiltersSMPModule.h" // For export macro
31 #include "vtkThreadedSynchronizedTemplates3D.h"
32 
33 class vtkImplicitFunction;
34 
35 #if !defined(VTK_LEGACY_REMOVE)
36 class VTKFILTERSSMP_EXPORT vtkThreadedSynchronizedTemplatesCutter3D : public vtkThreadedSynchronizedTemplates3D
37 {
38 public:
39   static vtkThreadedSynchronizedTemplatesCutter3D *New();
40 
41   vtkTypeMacro(vtkThreadedSynchronizedTemplatesCutter3D,vtkThreadedSynchronizedTemplates3D);
42   void PrintSelf(ostream& os, vtkIndent indent) override;
43 
44   /**
45    * Needed by templated functions.
46    */
47   void ThreadedExecute(vtkImageData *data, vtkInformation *outInfo, int);
48 
49   //@{
50   /**
51    * Specify the implicit function to perform the cutting.
52    */
53   virtual void SetCutFunction(vtkImplicitFunction*);
54   vtkGetObjectMacro(CutFunction,vtkImplicitFunction);
55   //@}
56 
57   //@{
58   /**
59    * Set/get the desired precision for the output types. See the documentation
60    * for the vtkAlgorithm::DesiredOutputPrecision enum for an explanation of
61    * the available precision settings.
62    */
63   vtkSetClampMacro(OutputPointsPrecision, int, SINGLE_PRECISION, DEFAULT_PRECISION);
64   vtkGetMacro(OutputPointsPrecision, int);
65   //@}
66 
67   /**
68    * Override GetMTime because we delegate to vtkContourValues and refer to
69    * vtkImplicitFunction.
70    */
71   vtkMTimeType GetMTime() override;
72 
73 protected:
74   vtkThreadedSynchronizedTemplatesCutter3D();
75   ~vtkThreadedSynchronizedTemplatesCutter3D() override;
76 
77   vtkImplicitFunction *CutFunction;
78   int OutputPointsPrecision;
79 
80   int RequestData(vtkInformation *,
81                           vtkInformationVector **,
82                           vtkInformationVector *) override;
83 
84   int FillOutputPortInformation(int port, vtkInformation* info) override;
85 private:
86   vtkThreadedSynchronizedTemplatesCutter3D(const vtkThreadedSynchronizedTemplatesCutter3D&) = delete;
87   void operator=(const vtkThreadedSynchronizedTemplatesCutter3D&) = delete;
88 };
89 
90 #endif //VTK_LEGACY_REMOVE
91 #endif
92