1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // SALOME VTKViewer : build VTK viewer into Salome desktop
26 #ifndef VISU_GaussMergeFilter_H
27 #define VISU_GaussMergeFilter_H
29 #include "VISU_Convertor.hxx"
31 //#include <vtkDataSetAlgorithm.h>
32 #include <vtkPointSetAlgorithm.h>
40 //------------------------------------------------------------------------------
41 class VISU_CONVERTOR_EXPORT VISU_GaussMergeFilter : public vtkPointSetAlgorithm
44 static VISU_GaussMergeFilter *New();
45 vtkTypeMacro(VISU_GaussMergeFilter, vtkPointSetAlgorithm);
48 // Specify object from which to extract geometry information.
49 void SetGeometry(vtkDataSet *input);
50 vtkDataSet *GetGeometry();
53 // Specify object from which to extract scalar information.
54 void SetScalars(vtkDataSet *);
55 vtkDataSet *GetScalars();
58 // Set / get the object from which to extract vector information.
59 void SetVectors(vtkDataSet *);
60 vtkDataSet *GetVectors();
63 // Set / get the object from which to extract normal information.
64 void SetNormals(vtkDataSet *);
65 vtkDataSet *GetNormals();
68 // Set / get the object from which to extract texture coordinates
70 void SetTCoords(vtkDataSet *);
71 vtkDataSet *GetTCoords();
74 // Set / get the object from which to extract tensor data.
75 void SetTensors(vtkDataSet *);
76 vtkDataSet *GetTensors();
79 // Set the object from which to extract a field and the name
81 void AddField(const char* name, vtkDataSet* input);
84 // Removes all previously added fields
88 // Defines whether to perform merging of data with the geometry according to
89 // the ids of the cell or not
91 SetMergingInputs(bool theIsMergingInputs);
97 SetGaussPtsIDMapper(const VISU::PGaussPtsIDMapper& theGaussPtsIDMapper);
99 const VISU::PGaussPtsIDMapper&
100 GetGaussPtsIDMapper();
103 VISU_GaussMergeFilter();
104 ~VISU_GaussMergeFilter();
108 RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
111 RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
114 FillInputPortInformation(int port, vtkInformation *info);
117 FillOutputPortInformation(int port, vtkInformation *info);
119 VISU::TFieldList* FieldList;
120 bool myIsMergingInputs;
122 VISU::PGaussPtsIDMapper myGaussPtsIDMapper;
125 ExecuteGauss(vtkUnstructuredGrid* theInput,
126 vtkPolyData* theOutput);
129 VISU_GaussMergeFilter(const VISU_GaussMergeFilter&); // Not implemented.
130 void operator=(const VISU_GaussMergeFilter&); // Not implemented.