Salome HOME
MPV: Merge V1_2d
[modules/visu.git] / src / PIPELINE / VISU_IsoSurfacesPL.cxx
index ecd27659f5064ba8483d24a877f61452aec6dfc9..b6bbb6433a3d70ece89a5f7db1ef39a60b7808bd 100644 (file)
 
 #include <vtkContourFilter.h>
 
-VISU_IsoSurfacesPL* VISU_IsoSurfacesPL::New(){
-  vtkObject* ret = vtkObjectFactory::CreateInstance("VISU_IsoSurfacesPL");
-  if(ret) return (VISU_IsoSurfacesPL*)ret;
-  return new VISU_IsoSurfacesPL;
-} 
+vtkStandardNewMacro(VISU_IsoSurfacesPL);
 
 VISU_IsoSurfacesPL::VISU_IsoSurfacesPL(){
   myContourFilter = vtkContourFilter::New();
+  myCellDataToPointData = vtkCellDataToPointData::New();
 }
 
 VISU_IsoSurfacesPL::~VISU_IsoSurfacesPL(){
+  myContourFilter->UnRegisterAllOutputs();
   myContourFilter->Delete();
+
+  myCellDataToPointData->UnRegisterAllOutputs();
+  myCellDataToPointData->Delete();
 }
 
 void VISU_IsoSurfacesPL::ShallowCopy(VISU_PipeLine *thePipeLine){
@@ -100,7 +101,7 @@ VISU_ScalarMapPL::THook* VISU_IsoSurfacesPL::DoHook(){
 
 
 void VISU_IsoSurfacesPL::Update(){
-  VISU::CellDataToPoint(myContourFilter,myInput,myFieldTransform);
+  VISU::CellDataToPoint(myContourFilter,myCellDataToPointData,myInput,myFieldTransform);
   SetMapScale();
 
   VISU_ScalarMapPL::Update();