Salome HOME
Copyright update 2022
[modules/paravis.git] / src / Plugins / TableReader / plugin / TableTo3DModule / vtkTableTo3D.h
1 // Copyright (C) 2010-2022  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef __vtkTableTo3D_h
21 #define __vtkTableTo3D_h
22
23 #include <vtkPolyDataAlgorithm.h>
24
25 #define TABLETO3D_SURFACE 0
26 #define TABLETO3D_CONTOUR 1
27
28 class VTK_EXPORT vtkTableTo3D : public vtkPolyDataAlgorithm
29 {
30 public:
31   static vtkTableTo3D* New();
32   vtkTypeMacro(vtkTableTo3D, vtkPolyDataAlgorithm);
33   void PrintSelf(ostream& os, vtkIndent indent) override;
34
35   // Description:
36   // Specify value to scale diplacement.
37   vtkSetMacro(ScaleFactor, double);
38   vtkGetMacro(ScaleFactor, double);
39
40   // Description:
41   // When set to true, the filter will compute optimus scale factor,
42   // the value of ScaleFactor variable will be ignored.
43   vtkSetMacro(UseOptimusScale, bool);
44   vtkGetMacro(UseOptimusScale, bool);
45   vtkBooleanMacro(UseOptimusScale, bool);
46
47   // Description:
48   // Specify type of presentation: surface of contour.
49   vtkSetClampMacro(PresentationType, int, TABLETO3D_SURFACE, TABLETO3D_CONTOUR);
50   vtkGetMacro(PresentationType, int);
51
52   // Description:
53   // Specify number of contours for contour presentation type.
54   vtkSetMacro(NumberOfContours, int);
55   vtkGetMacro(NumberOfContours, int);
56
57 protected:
58   vtkTableTo3D();
59   ~vtkTableTo3D() override;
60
61   // Description:
62   // Overridden to specify that input must be a vtkTable.
63   int FillInputPortInformation(int, vtkInformation*) override;
64
65   // Description:
66   // Convert input vtkTable to vtkPolyData.
67   int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
68
69   double ScaleFactor;
70   bool UseOptimusScale;
71   int PresentationType;
72   int NumberOfContours;
73
74 private:
75   vtkTableTo3D(const vtkTableTo3D&) = delete;
76   void operator=(const vtkTableTo3D&) = delete;
77 };
78
79 #endif