]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkPiecewiseFunction.cxx
.
[bbtk.git] / packages / vtk / src / bbvtkPiecewiseFunction.cxx
index 67e2198b27915814e5d5d4e1a27387468e913bfb..c62709b18c867c45d706d4ae99bac63c9e6447ce 100644 (file)
@@ -2,8 +2,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbvtkPiecewiseFunction.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/12/16 12:48:10 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2009/05/15 14:58:01 $
+  Version:   $Revision: 1.2 $
 =========================================================================*/
 
 /* ---------------------------------------------------------------------
@@ -49,12 +49,9 @@ namespace bbvtk
    BBTK_BLACK_BOX_IMPLEMENTATION(PiecewiseFunction,bbtk::AtomicBlackBox);
 
 
-
-
-
-   void PiecewiseFunction::bbUserConstructor() 
+       //---------------------------------------------------------------------
+   void PiecewiseFunction::bbUserSetDefaultValues() 
    { 
-     Init();
      // Identity function
      std::vector<float> x,y;
      x.push_back(0);
@@ -63,20 +60,24 @@ namespace bbvtk
      y.push_back(1);
      bbSetInputX(x);
      bbSetInputY(y);
-   }
-   void PiecewiseFunction::bbUserCopyConstructor(bbtk::BlackBox::Pointer) 
-   { 
-     Init();
+        bbSetOutputOut(0);
    }
 
-   void PiecewiseFunction::Init() 
+       
+       //---------------------------------------------------------------------
+   void PiecewiseFunction::bbUserInitializeProcessing() 
    { 
      bbSetOutputOut(vtkPiecewiseFunction::New());
    }
 
-   void PiecewiseFunction::bbUserDestructor() 
+       //---------------------------------------------------------------------
+   void PiecewiseFunction::bbUserFinalizeProcessing() 
    { 
-     bbGetOutputOut()->Delete();
+          if (bbGetOutputOut()!=NULL)
+          {
+                  bbGetOutputOut()->Delete();
+                  bbSetOutputOut(0);
+          }
    }
 //---------------------------------------------------------------------