Version: 6.3.1

src/CONVERTOR/VISU_GaussMergeFilter.hxx

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 //  SALOME VTKViewer : build VTK viewer into Salome desktop
00021 //  File   : 
00022 //  Author : 
00023 //  Module : SALOME
00024 //  $Header: /home/server/cvs/VISU/VISU_SRC/src/CONVERTOR/VISU_GaussMergeFilter.hxx,v 1.3.2.1.6.1.8.1 2011-06-02 06:00:16 vsr Exp $
00025 //
00026 #ifndef VISU_GaussMergeFilter_H
00027 #define VISU_GaussMergeFilter_H
00028 
00029 #include "VISU_Convertor.hxx"
00030 
00031 //#include <vtkDataSetAlgorithm.h>
00032 #include <vtkPointSetAlgorithm.h>
00033 
00034 namespace VISU
00035 {
00036   class TFieldList;
00037 }
00038 
00039 
00040 //------------------------------------------------------------------------------
00041 class VISU_CONVERTOR_EXPORT VISU_GaussMergeFilter : public vtkPointSetAlgorithm
00042 {
00043 public:
00044   static VISU_GaussMergeFilter *New();
00045   vtkTypeMacro(VISU_GaussMergeFilter, vtkPointSetAlgorithm);
00046 
00047   // Description:
00048   // Specify object from which to extract geometry information.
00049   void SetGeometry(vtkDataSet *input);
00050   vtkDataSet *GetGeometry();
00051 
00052   // Description:
00053   // Specify object from which to extract scalar information.
00054   void SetScalars(vtkDataSet *);
00055   vtkDataSet *GetScalars();
00056 
00057   // Description:
00058   // Set / get the object from which to extract vector information.
00059   void SetVectors(vtkDataSet *);
00060   vtkDataSet *GetVectors();
00061 
00062   // Description:
00063   // Set / get the object from which to extract normal information.
00064   void SetNormals(vtkDataSet *);
00065   vtkDataSet *GetNormals();
00066   
00067   // Description:
00068   // Set / get the object from which to extract texture coordinates
00069   // information.
00070   void SetTCoords(vtkDataSet *);
00071   vtkDataSet *GetTCoords();
00072 
00073   // Description:
00074   // Set / get the object from which to extract tensor data.
00075   void SetTensors(vtkDataSet *);
00076   vtkDataSet *GetTensors();
00077 
00078   // Description:
00079   // Set the object from which to extract a field and the name
00080   // of the field
00081   void AddField(const char* name, vtkDataSet* input);
00082 
00083   // Description:
00084   // Removes all previously added fields
00085   void RemoveFields();
00086 
00087   // Description:
00088   // Defines whether to perform merging of data with the geometry according to
00089   // the ids of the cell or not
00090   void
00091   SetMergingInputs(bool theIsMergingInputs);
00092   
00093   bool
00094   IsMergingInputs();
00095 
00096   void 
00097   SetGaussPtsIDMapper(const VISU::PGaussPtsIDMapper& theGaussPtsIDMapper);
00098 
00099   const VISU::PGaussPtsIDMapper&  
00100   GetGaussPtsIDMapper();
00101   
00102 protected:
00103   VISU_GaussMergeFilter();
00104   ~VISU_GaussMergeFilter();
00105 
00106   virtual
00107   int
00108   RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00109 
00110   int
00111   RequestUpdateExtent(vtkInformation *, vtkInformationVector **, vtkInformationVector *);
00112 
00113   int
00114   FillInputPortInformation(int port, vtkInformation *info);
00115 
00116   int
00117   FillOutputPortInformation(int port, vtkInformation *info);
00118 
00119   VISU::TFieldList* FieldList;
00120   bool myIsMergingInputs;
00121 
00122   VISU::PGaussPtsIDMapper myGaussPtsIDMapper;
00123 
00124   bool
00125   ExecuteGauss(vtkUnstructuredGrid* theInput,
00126                vtkPolyData*         theOutput);
00127   
00128 private:
00129   VISU_GaussMergeFilter(const VISU_GaussMergeFilter&);  // Not implemented.
00130   void operator=(const VISU_GaussMergeFilter&);  // Not implemented.
00131 };
00132 
00133 #endif
00134 
00135 
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS