From 180e7479a79e0eda35693e68ed04e994dce96096 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Fri, 21 Jan 2022 17:00:38 +0100 Subject: [PATCH] Clean code --- kernel/src/bbtkBlackBox.cxx | 4 ++-- packages/std/src/bbstdVectorFilterDouble.h | 2 +- packages/vtk/src/bbtkStaticLecture.cxx | 5 ----- .../vtk/src/bbvtkSegmentationConnectivity.cxx | 21 ++----------------- 4 files changed, 5 insertions(+), 27 deletions(-) diff --git a/kernel/src/bbtkBlackBox.cxx b/kernel/src/bbtkBlackBox.cxx index ed57b5a..8e233d6 100644 --- a/kernel/src/bbtkBlackBox.cxx +++ b/kernel/src/bbtkBlackBox.cxx @@ -748,9 +748,9 @@ namespace bbtk ( (bbBoxProcessModeIsManual()==true)&&(bbLetRecursiveExecuteManualMode==true) ) ) { - printf("EED BlackBox::bbRecursiveExecute bbProcess start %s \n", bbGetFullName().c_str() ); +// printf("EED BlackBox::bbRecursiveExecute bbProcess start %s \n", bbGetFullName().c_str() ); this->bbProcess(); - printf("EED BlackBox::bbRecursiveExecute bbProcess end %s \n", bbGetFullName().c_str() ); +// printf("EED BlackBox::bbRecursiveExecute bbProcess end %s \n", bbGetFullName().c_str() ); } // Manual analysis //EED ups if ((bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==false)) diff --git a/packages/std/src/bbstdVectorFilterDouble.h b/packages/std/src/bbstdVectorFilterDouble.h index 4aee501..8f2110a 100644 --- a/packages/std/src/bbstdVectorFilterDouble.h +++ b/packages/std/src/bbstdVectorFilterDouble.h @@ -52,7 +52,7 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(VectorFilterDouble,bbtk::AtomicBlackBox); BBTK_AUTHOR("InfoDev"); BBTK_DESCRIPTION("No Description."); BBTK_CATEGORY("empty"); - BBTK_INPUT(VectorFilterDouble,Type,"default (0) 0=Erase duplicated lines, 1=Redimention Vectors, 2=Insert intermediat points,3=Adition, 4=Substraction, 5=Multilication, 6=Division, 7=Connect mesh X1,Y1,Z1,idxs1,X2,X2,X2,idx2, 8=Order All vectors with the logic of In0 , 9=Invert Vectors, 10=Nearest Point in the vector. In3PointXYZ In0LstX In1LstY In2LstZ (Out0-index Out1-PointXYZ)",int,""); + BBTK_INPUT(VectorFilterDouble,Type,"default (0) 0=Erase duplicated lines, 1=Redimention Vectors, 2=Insert intermediat points,3=Adition k1, 4=Substraction k1, 5=Multilication k1, 6=Division k1, 7=Connect mesh X1,Y1,Z1,idxs1,X2,X2,X2,idx2, 8=Order All vectors with the logic of In0 , 9=Invert Vectors, 10=Nearest Point in the vector. In3PointXYZ In0LstX In1LstY In2LstZ (Out0-index Out1-PointXYZ)",int,""); BBTK_INPUT(VectorFilterDouble,k1,"default (0) nothing (Type0), k1=new size vectors (Type 1) , nothing (Type2), k1 = Addition const. (Type 3), k1 = Substraction const. (Type 4), k1 = Multiplication const. (Type 5) , k1 = Division const. (Type 6) , ",double,""); BBTK_INPUT(VectorFilterDouble,In0,"Input vector",std::vector,""); BBTK_INPUT(VectorFilterDouble,In1,"Input vector",std::vector,""); diff --git a/packages/vtk/src/bbtkStaticLecture.cxx b/packages/vtk/src/bbtkStaticLecture.cxx index 583edb3..9068a58 100755 --- a/packages/vtk/src/bbtkStaticLecture.cxx +++ b/packages/vtk/src/bbtkStaticLecture.cxx @@ -31,13 +31,10 @@ int bbtkStaticLecture::GetTypeFormat( std::string formatStr , vtkImageData* image ) { - printf("EED bbtkStaticLecture::GetTypeFormat Start \n"); int outputformat = VTK_UNSIGNED_CHAR; if (formatStr=="SAME") { - printf("EED bbtkStaticLecture::GetTypeFormat 1 image=%p\n",image); if (image!=NULL) outputformat = image->GetScalarType(); - printf("EED bbtkStaticLecture::GetTypeFormat 2 \n"); } else if (formatStr=="VTK_BIT") outputformat = VTK_BIT; // 1 else if (formatStr=="VTK_CHAR") outputformat = VTK_CHAR; // 2 @@ -59,8 +56,6 @@ int bbtkStaticLecture::GetTypeFormat( std::string formatStr , vtkImageData* imag else if (formatStr=="MET_FLOAT") outputformat = VTK_FLOAT; // 10 else if (formatStr=="MET_DOUBLE") outputformat = VTK_DOUBLE; // 11 - printf("EED bbtkStaticLecture::GetTypeFormat outputformat=%d End\n", outputformat); - return outputformat; } diff --git a/packages/vtk/src/bbvtkSegmentationConnectivity.cxx b/packages/vtk/src/bbvtkSegmentationConnectivity.cxx index b5b028d..215516e 100644 --- a/packages/vtk/src/bbvtkSegmentationConnectivity.cxx +++ b/packages/vtk/src/bbvtkSegmentationConnectivity.cxx @@ -128,20 +128,14 @@ namespace bbvtk // -------------------------------------------------------------- void SegmentationConnectivity::DoProcess() { - - printf("EED (%s) SegmentationConnectivity::DoProcess Start \n", bbGetFullName().c_str() ); int x,y,z; int i,numPoints = bbGetInputPositionXYZ().size()/3; int verif = (bbGetInputPositionXYZ().size()-1) % 3; if (( numPoints>=1) && (verif==2) && (bbGetInputIn()!=NULL)) { - printf("EED SegmentationConnectivity::DoProcess 1 format=%s %p\n", bbGetInputOutputFormat().c_str() , bbGetInputIn() ); - printf("EED SegmentationConnectivity::DoProcess 1.1 \n" ); - //EED 2020-01-18 int outputformat = bbtkStaticLecture::GetTypeFormat( bbGetInputOutputFormat() , bbGetInputIn() ); // int outputformat=4; - printf("EED SegmentationConnectivity::DoProcess 2 \n" ); vtkImageData *imagedata = bbGetInputIn(); //EED 2017-01-01 Migration VTK7 #if VTK_MAJOR_VERSION <= 5 @@ -153,7 +147,6 @@ namespace bbvtk // imagedata->SetExtent(imagedata->GetExtent()); thresh2->SetInputData(imagedata); #endif - printf("EED SegmentationConnectivity::DoProcess 3 Threshold= %f %f\n", bbGetInputThresholdMinMax()[0], bbGetInputThresholdMinMax()[1] ); thresh2->ThresholdBetween(bbGetInputThresholdMinMax()[0], bbGetInputThresholdMinMax()[1]); thresh2->Update(); connect2->RemoveAllSeeds (); @@ -167,7 +160,6 @@ namespace bbvtk int maxX = ext[1]-ext[0]+1; int maxY = ext[3]-ext[2]+1; int maxZ = ext[5]-ext[4]+1; - printf("EED SegmentationConnectivity::DoProcess 4 numPoints=%d\n",numPoints ); for (i=0;i=0) || (x=0) || (y=0) || (zAddSeed( x,y,z ); } else { printf("EED WARNNIG! In box: SegmentationConnectivity points list out of range \n"); } // if point inside image } // for i - printf("EED SegmentationConnectivity::DoProcess 4.2 \n" ); connect2->SetOutputConnectedValue( bbGetInputValue() ); - printf("EED SegmentationConnectivity::DoProcess 4.3 \n" ); cast4->SetOutputScalarType( outputformat ); - printf("EED SegmentationConnectivity::DoProcess 4.5 \n" ); connect2->Modified(); - printf("EED SegmentationConnectivity::DoProcess 5 \n" ); connect2->Update(); - cast4->Update(); - printf("EED SegmentationConnectivity::DoProcess 6 \n" ); - bbSetOutputOut(cast4->GetOutput() ); + cast4->Update(); + bbSetOutputOut(cast4->GetOutput() ); } else { printf("EED WARNNIG! In box: SegmentationConnectivity List of points are not coherent. \n"); bbSetOutputOut( NULL ); }// if numPoints verif - - printf("EED SegmentationConnectivity::DoProcess End \n" ); - } }// EO namespace bbvtk -- 2.47.1