Salome HOME
Fix for Bug IPAL8945
[modules/visu.git] / src / CONVERTOR / VISU_MergeFilter.hxx
1 //  SALOME VTKViewer : build VTK viewer into Salome desktop
2 //
3 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
5 // 
6 //  This library is free software; you can redistribute it and/or 
7 //  modify it under the terms of the GNU Lesser General Public 
8 //  License as published by the Free Software Foundation; either 
9 //  version 2.1 of the License. 
10 // 
11 //  This library is distributed in the hope that it will be useful, 
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
14 //  Lesser General Public License for more details. 
15 // 
16 //  You should have received a copy of the GNU Lesser General Public 
17 //  License along with this library; if not, write to the Free Software 
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
19 // 
20 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : 
25 //  Author : 
26 //  Module : SALOME
27 //  $Header$
28
29 #ifndef VISU_MergeFilter_H
30 #define VISU_MergeFilter_H
31
32 #include <vtkDataSetToDataSetFilter.h>
33
34 namespace VISU
35 {
36   class TFieldList;
37 }
38
39 // Following class was redefined in order to fix VTK bug 
40 //  (see code for more details)
41
42 class VISU_MergeFilter : public vtkDataSetToDataSetFilter
43 {
44 public:
45   static VISU_MergeFilter *New();
46   vtkTypeMacro(VISU_MergeFilter,vtkDataSetToDataSetFilter);
47
48   // Description:
49   // Specify object from which to extract geometry information.
50   void SetGeometry(vtkDataSet *input) {this->SetInput(input);};
51   vtkDataSet *GetGeometry() {return this->GetInput();};
52
53   // Description:
54   // Specify object from which to extract scalar information.
55   void SetScalars(vtkDataSet *);
56   vtkDataSet *GetScalars();
57
58   // Description:
59   // Set / get the object from which to extract vector information.
60   void SetVectors(vtkDataSet *);
61   vtkDataSet *GetVectors();
62
63   // Description:
64   // Set / get the object from which to extract normal information.
65   void SetNormals(vtkDataSet *);
66   vtkDataSet *GetNormals();
67   
68   // Description:
69   // Set / get the object from which to extract texture coordinates
70   // information.
71   void SetTCoords(vtkDataSet *);
72   vtkDataSet *GetTCoords();
73
74   // Description:
75   // Set / get the object from which to extract tensor data.
76   void SetTensors(vtkDataSet *);
77   vtkDataSet *GetTensors();
78
79   // Description:
80   // Set the object from which to extract a field and the name
81   // of the field
82   void AddField(const char* name, vtkDataSet* input);
83
84 protected:
85   VISU_MergeFilter();
86   ~VISU_MergeFilter();
87
88   // Usual data generation method
89   void Execute();
90
91   VISU::TFieldList* FieldList;
92 private:
93   VISU_MergeFilter(const VISU_MergeFilter&);  // Not implemented.
94   void operator=(const VISU_MergeFilter&);  // Not implemented.
95 };
96
97 #endif
98
99