1 // SALOME FILTER : interactive object for VISU entities implementation
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SALOME_PassThroughFilter.cxx
25 // Author : Laurent CORNABE with help of Nicolas REJNERI
29 #include "SALOME_PassThroughFilter.h"
31 #include <vtkCellData.h>
32 #include <vtkDataSet.h>
33 #include <vtkObjectFactory.h>
34 #include <vtkPointData.h>
37 vtkCxxRevisionMacro(SALOME_PassThroughFilter, "$Revision$");
38 vtkStandardNewMacro(SALOME_PassThroughFilter);
40 void SALOME_PassThroughFilter::Execute()
42 vtkDataSet *input = static_cast<vtkDataSet*>(this->GetInput());
43 vtkDataSet *output = static_cast<vtkDataSet*>(this->GetOutput());
45 // This has to be here because it initialized all field datas.
46 output->CopyStructure( input );
48 // Pass all. (data object's field data is passed by the
49 // superclass after this method)
50 output->GetPointData()->PassData( input->GetPointData() );
51 output->GetCellData()->PassData( input->GetCellData() );
55 void SALOME_PassThroughFilter::PrintSelf(ostream& os, vtkIndent indent)
57 this->Superclass::PrintSelf(os,indent);