From: eduardo.davila@creatis.insa-lyon.fr Date: Mon, 18 Nov 2024 13:14:11 +0000 (+0100) Subject: #3568 ReadCreaContourFile return empty list if the file not exists, after second... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=4e5062e18a2a225fef91f9b8c0bcdc7d8d785002;p=creaMaracasVisu.git #3568 ReadCreaContourFile return empty list if the file not exists, after second execution --- diff --git a/bbtk/src/bbcreaMaracasVisuReadCreaContourFile.cxx b/bbtk/src/bbcreaMaracasVisuReadCreaContourFile.cxx index 7e37121..a22888e 100644 --- a/bbtk/src/bbcreaMaracasVisuReadCreaContourFile.cxx +++ b/bbtk/src/bbcreaMaracasVisuReadCreaContourFile.cxx @@ -29,6 +29,12 @@ void ReadCreaContourFile::Process() // bbSetOutputOut( bbGetInputIn() ); // std::cout << "Output value = " < LstX; + std::vector LstY; + std::vector LstZ; + std::vector LstIndexs; + if (bbGetInputFileNameRoi().compare("")==0) { printf("EED Warnning! ReadCreaContourFile::Process FileNameRoi EMPTY\n"); @@ -49,13 +55,6 @@ void ReadCreaContourFile::Process() double x,y,z,zz; int TypeModel; int NumberOfControlPoints; - - - std::vector LstX; - std::vector LstY; - std::vector LstZ; - std::vector LstIndexs; - fscanf(ff,"%s",tmp); // version fscanf(ff,"%s",tmp); // fscanf(ff,"%s",tmp); // ImageDimensions @@ -114,19 +113,18 @@ void ReadCreaContourFile::Process() } // for i NumberOfContours fclose(ff); - bbSetOutputLstX( LstX ); - bbSetOutputLstY( LstY ); - bbSetOutputLstZ( LstZ ); - bbSetOutputLstIndexs( LstIndexs ); - } else { printf("EED Warnning! ReadCreaContourFile::Process %s is not a creaContour .roi file\n",bbGetInputFileNameRoi().c_str() ); } // if --CreaContour-- } // if ff } // if FileNameRoi - + bbSetOutputLstX( LstX ); + bbSetOutputLstY( LstY ); + bbSetOutputLstZ( LstZ ); + bbSetOutputLstIndexs( LstIndexs ); } -//===== + +//===== // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost) //===== void ReadCreaContourFile::bbUserSetDefaultValues()