+/*# ---------------------------------------------------------------------
+#
+# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
+# pour la Sant�)
+# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
+# Previous Authors : Laurent Guigues, Jean-Pierre Roux
+# CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
+#
+# This software is governed by the CeCILL-B license under French law and
+# abiding by the rules of distribution of free software. You can use,
+# modify and/ or redistribute the software under the terms of the CeCILL-B
+# license as circulated by CEA, CNRS and INRIA at the following URL
+# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
+# or in the file LICENSE.txt.
+#
+# As a counterpart to the access to the source code and rights to copy,
+# modify and redistribute granted by the license, users are provided only
+# with a limited warranty and the software's author, the holder of the
+# economic rights, and the successive licensors have only limited
+# liability.
+#
+# The fact that you are presently reading this means that you have had
+# knowledge of the CeCILL-B license and that you accept its terms.
+# ------------------------------------------------------------------------ */
+
#ifdef _USE_VTK_
#ifdef _USE_ITK_
_contprop->appendContour(&KeyContourX,&KeyContourY,&KeyContourZ);
//_contprop->GetContour(bbGetInputSlice(),&OutContourX,&OutContourY,&OutContourZ);
_contprop->GetControlPoints(bbGetInputSlice(),&OutContourX,&OutContourY,&OutContourZ);
- printf("\n Size OutContourX = %d",OutContourX.size());
+ printf("\n Size OutContourX = %d",(int)(OutContourX.size()));
}
}
bbSetOutputControlPointZ( &OutContourZ );
bbSetOutputImagePropg( _imagedata );
}
+
+
//------------------------------------------------------------
-void ContourToControlPoints::bbUserConstructor()
+void ContourToControlPoints::bbUserSetDefaultValues()
{
bbSetInputSampling(5.0);
bbSetInputSlice(0);
bbSetInputOption(1);
bbSetInputLoadContour(0);
+ _contprop = NULL;
+ _propgdata = NULL;
+ _imagedata = NULL;
+ _ext2D = NULL;
+
+ _fd = NULL;
+ pos = 0;
+}
+
+
+ //-----------------------------------------------------------------
+ void ContourToControlPoints::bbUserInitializeProcessing()
+ {
_contprop = new ContourPropagation();
_propgdata = new PropContour();
_imagedata = vtkImageData::New();
_ext2D = new ExtractControlPoints2D();
- _fd = NULL;
- pos = 0;
- //it = NULL; // JPRx
- //bool inic = false; // JPRx
-}
-//------------------------------------------------------------
-void ContourToControlPoints::bbUserCopyConstructor()
-{
-}
-//------------------------------------------------------------
-void ContourToControlPoints::bbUserDestructor()
-{
-}
+ }
+
+ //-----------------------------------------------------------------
+ void ContourToControlPoints::bbUserFinalizeProcessing()
+ {
+ if (_contprop!=NULL) delete _contprop;
+ if (_propgdata!=NULL) delete _propgdata;
+ if (_imagedata!=NULL) _imagedata->Delete();
+ if (_ext2D!=NULL) delete _ext2D;
+
+ _contprop = NULL;
+ _propgdata = NULL;
+ _imagedata = NULL;
+ _ext2D = NULL;
+ }
+
+ //-----------------------------------------------------------------
+
+
}
// EO namespace bbcreaMaracasVisu