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