From cf87bb498ccc24b1fb1aa2104957e0cb1afad2f2 Mon Sep 17 00:00:00 2001 From: Eduardo DAVILA Date: Sat, 2 May 2020 17:02:42 +0200 Subject: [PATCH] #3418 creaMaracasVisu Feature New Normal - ManualPaint_model with openmp --- .../bbs/boxes/SegmentationConnectivityEED.bbg | 38 +++++++++---------- .../bbs/boxes/SegmentationConnectivityEED.bbs | 2 +- .../bbcreaMaracasVisuManualPaint_Model.cxx | 10 +---- .../widgets/manualPaint/FillFilter.cpp | 2 +- 4 files changed, 23 insertions(+), 29 deletions(-) diff --git a/bbtk/bbs/boxes/SegmentationConnectivityEED.bbg b/bbtk/bbs/boxes/SegmentationConnectivityEED.bbg index 9847142..2ad7d13 100644 --- a/bbtk/bbs/boxes/SegmentationConnectivityEED.bbg +++ b/bbtk/bbs/boxes/SegmentationConnectivityEED.bbg @@ -41,7 +41,7 @@ BOX creaMaracasVisu:ViewerNV:Box01 ISEXEC:FALSE -218.034362:-37.747977:-900.000000 --154.314362:-47.747977:-900.000000 +-84.884281:-47.747977:-900.000000 PORT nTypeView:"6 1 2 0" FIN_BOX @@ -55,7 +55,7 @@ BOX wx:LayoutTab:Box09 ISEXEC:FALSE -72.239823:-322.710201:-900.000000 --14.679823:-332.710201:-900.000000 +-35.989823:-332.710201:-900.000000 FIN_BOX BOX vtk:SegmentationConnectivity:Box12 @@ -69,7 +69,7 @@ BOX creaMaracasVisu:ColorLayerImageView:Box13 ISEXEC:FALSE -310.837483:-180.661458:-900.000000 --240.957483:-190.661458:-900.000000 +-90.404412:-190.661458:-900.000000 PORT TypeControlsInterface:"2" PORT @@ -81,7 +81,7 @@ BOX wx:LayoutSplit:Box14 ISEXEC:FALSE -141.472047:-363.326153:-900.000000 --102.392047:-373.326153:-900.000000 +-99.748519:-373.326153:-900.000000 PORT Orientation:"H" FIN_BOX @@ -103,7 +103,7 @@ BOX creaMaracasVisu:ColorLayerImageView:Box17 ISEXEC:FALSE -182.971774:-213.746563:-900.000000 --113.091774:-223.746563:-900.000000 +-74.153795:-223.746563:-900.000000 PORT TypeControlsInterface:"2" PORT @@ -115,7 +115,7 @@ BOX wx:LayoutLine:Box18 ISEXEC:FALSE -198.282340:-320.226258:-900.000000 --140.722340:-330.226258:-900.000000 +-88.505122:-330.226258:-900.000000 FIN_BOX BOX vtk:SegmentationConnectivity:Box19 @@ -149,7 +149,7 @@ ISEXEC:FALSE PORT DistanceFill:"7" PORT -GrayLevel:"200" +GrayLevel:"255" PORT ToleranceFill:"5000" FIN_BOX @@ -163,7 +163,7 @@ BOX creaMaracasVisu:ColorLayerImageView:Box24 ISEXEC:FALSE -93.549175:-238.721391:-900.000000 --23.669175:-248.721391:-900.000000 +-45.624175:-248.721391:-900.000000 PORT TypeControlsInterface:"2" PORT @@ -175,7 +175,7 @@ BOX creaMaracasVisu:ColorLayerImageView:Box25 ISEXEC:FALSE -46.164510:-259.315564:-900.000000 -23.715490:-269.315564:-900.000000 +1.760490:-269.315564:-900.000000 PORT TypeControlsInterface:"2" PORT @@ -271,7 +271,7 @@ BOX creaMaracasVisu:ColorLayerImageView:Box54 ISEXEC:FALSE -251.332481:-197.397418:-900.000000 --181.452481:-207.397418:-900.000000 +-82.913893:-207.397418:-900.000000 PORT TypeControlsInterface:"2" PORT @@ -283,13 +283,13 @@ BOX wx:LayoutLine:Box41 ISEXEC:FALSE -293.553421:-290.492249:-900.000000 --235.993421:-300.492249:-900.000000 +-100.566127:-300.492249:-900.000000 FIN_BOX BOX wx:OutputText:Box48 ISEXEC:FALSE -301.854860:-243.823607:-900.000000 --265.079860:-253.823607:-900.000000 +-126.221791:-253.823607:-900.000000 PORT Title:"Depth" FIN_BOX @@ -297,7 +297,7 @@ BOX wx:OutputText:Box52 ISEXEC:FALSE -276.517436:-256.409984:-900.000000 --239.742436:-266.409984:-900.000000 +-123.047842:-266.409984:-900.000000 PORT Title:"Seed" FIN_BOX @@ -305,7 +305,7 @@ BOX wx:OutputText:Box53 ISEXEC:FALSE -254.551016:-271.243698:-900.000000 --217.776016:-281.243698:-900.000000 +-120.254767:-281.243698:-900.000000 PORT Title:"Seed" FIN_BOX @@ -313,31 +313,31 @@ BOX wx:LayoutTab:Box55 ISEXEC:FALSE -318.814935:-219.886716:-900.000000 --261.254935:-229.886716:-900.000000 +-103.740076:-229.886716:-900.000000 FIN_BOX BOX wx:LayoutTab:Box56 ISEXEC:FALSE -239.842490:-236.699818:-900.000000 --182.282490:-246.699818:-900.000000 +-93.710398:-246.699818:-900.000000 FIN_BOX BOX wx:LayoutTab:Box57 ISEXEC:FALSE -190.058428:-253.036375:-900.000000 --132.498428:-263.036375:-900.000000 +-87.489458:-263.036375:-900.000000 FIN_BOX BOX wx:LayoutTab:Box58 ISEXEC:FALSE -130.743465:-271.398247:-900.000000 --73.183465:-281.398247:-900.000000 +-79.871981:-281.398247:-900.000000 FIN_BOX BOX wx:LayoutTab:Box59 ISEXEC:FALSE -78.100132:-279.871812:-900.000000 --20.540132:-289.871812:-900.000000 +-41.850132:-289.871812:-900.000000 FIN_BOX BOX vtk:BinaryOperations:Box60 diff --git a/bbtk/bbs/boxes/SegmentationConnectivityEED.bbs b/bbtk/bbs/boxes/SegmentationConnectivityEED.bbs index 60889b3..9a8a590 100644 --- a/bbtk/bbs/boxes/SegmentationConnectivityEED.bbs +++ b/bbtk/bbs/boxes/SegmentationConnectivityEED.bbs @@ -62,7 +62,7 @@ new creaVtk:ImageContinuousDilate3D Box21 new creaMaracasVisu:ManualPaint_Model Box22 set Box22.DistanceFill "7" - set Box22.GrayLevel "200" + set Box22.GrayLevel "255" set Box22.ToleranceFill "5000" new std:ConcatStrings Box23 diff --git a/bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx b/bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx index 19945fb..b9c2303 100644 --- a/bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx +++ b/bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx @@ -131,7 +131,6 @@ printf("EED ManualPaint_Model::LstPointOMPAnalice End\n"); void ManualPaint_Model::Process() { -printf("EED ManualPaint_Model::Process Start\n"); /* Notas 0. Quitar comentarion ByLstPoints openmp 1. Falta openmp ByImagePoints @@ -145,16 +144,12 @@ printf("EED ManualPaint_Model::Process Start\n"); */ if (bbGetInputActive()==true) { -printf("EED ManualPaint_Model::Process 1\n"); if (bbGetInputImage()!=NULL) { -printf("EED ManualPaint_Model::Process 2\n"); manualpaintmodel->SetActive( bbGetInputActive() ); manualpaintmodel->SetTool( bbGetInputTool() ); manualpaintmodel->Set2D3D( bbGetInput2D3D() ); -printf("EED ManualPaint_Model::Process 2.1\n"); manualpaintmodel->SetImages( bbGetInputImage(),bbGetInputImage2() ); -printf("EED ManualPaint_Model::Process 2.2\n"); manualpaintmodel->SetGrayLevel( bbGetInputGrayLevel() ); manualpaintmodel->SetDirection( bbGetInputDirection() ); manualpaintmodel->SetBrushSize( bbGetInputBrushSize() ); @@ -165,13 +160,12 @@ printf("EED ManualPaint_Model::Process 2.2\n"); manualpaintmodel->SetRangeMax( bbGetInputRange()[1] ); if (bbGetInputPoint().size()==3) { -printf("EED ManualPaint_Model::Process 3\n"); manualpaintmodel->PaintImage( bbGetInputPoint()[0] , bbGetInputPoint()[1] , bbGetInputPoint()[2] ); manualpaintmodel->SetUndoImage(); + manualpaintmodel->Copy_GeneralAuxFill_to_Results(); } // if Points if ( bbGetInputByLstPointsX().size()!=0 ) { -printf("EED ManualPaint_Model::Process 4\n"); //-- Alternativa con openmp -- // LstPointOMPAnalice(); @@ -239,7 +233,7 @@ long int k3omp=(double)(size-1)*0.4; long int k4omp=(double)(size-1)*0.6; long int k5omp=(double)(size-1)*0.8; long int k6omp=(double)(size-1)*1.0; -printf("EED ManualPaint_Model::Process ByImagePoints (with openmp) size=%d\n",size); +printf("EED ManualPaint_Model::Process ByImagePoints (with openmp) size=%d GrayLevel=%f\n",size,(double)bbGetInputGrayLevel()); #pragma omp parallel for for (index=0; index= grayLBFMTOL) && (tmpiglfill <= grayLBFPTOL) && (_tmpDistfill <= distbasefill) ; //DFCH -- 2.47.1