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 #ifndef VTKVIEWER_SHRINKFILTER_H 00024 #define VTKVIEWER_SHRINKFILTER_H 00025 00026 #include "VTKViewer.h" 00027 00028 #include <vtkShrinkFilter.h> 00029 00030 #include <vector> 00031 00032 #ifdef WIN32 00033 #pragma warning ( disable:4251 ) 00034 #endif 00035 00039 class VTKVIEWER_EXPORT VTKViewer_ShrinkFilter : public vtkShrinkFilter 00040 { 00041 public: 00043 static VTKViewer_ShrinkFilter *New(); 00044 vtkTypeRevisionMacro(VTKViewer_ShrinkFilter, vtkShrinkFilter); 00045 00046 void SetStoreMapping(int theStoreMapping); 00048 int GetStoreMapping(){ return myStoreMapping;} 00049 00050 virtual vtkIdType GetNodeObjId(int theVtkID); 00052 virtual vtkIdType GetElemObjId(int theVtkID) { return theVtkID;} 00053 00054 protected: 00055 VTKViewer_ShrinkFilter(); 00056 ~VTKViewer_ShrinkFilter(); 00057 00058 virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *); 00060 void UnstructuredGridExecute(); 00061 00062 private: 00063 int myStoreMapping; 00064 typedef std::vector<vtkIdType> TVectorId; 00065 TVectorId myVTK2ObjIds; 00066 }; 00067 00068 #ifdef WIN32 00069 #pragma warning ( default:4251 ) 00070 #endif 00071 00072 #endif