]> Creatis software - creaMaracasVisu.git/commitdiff
#3418 creaMaracasVisu Feature New Normal - ManualPaint_model with openmp
authorEduardo DAVILA <davila@localhost.localdomain>
Sat, 2 May 2020 15:02:42 +0000 (17:02 +0200)
committerEduardo DAVILA <davila@localhost.localdomain>
Sat, 2 May 2020 15:02:42 +0000 (17:02 +0200)
bbtk/bbs/boxes/SegmentationConnectivityEED.bbg
bbtk/bbs/boxes/SegmentationConnectivityEED.bbs
bbtk/src/bbcreaMaracasVisuManualPaint_Model.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualPaint/FillFilter.cpp

index 9847142c435c932c82ba63dc7ead6d317fc9efbb..2ad7d13fbc3d8cc85af237f93872f34917b0f1b3 100644 (file)
@@ -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
index 60889b34fa12dbbd767c8519e5ae28ef1b437a7f..9a8a5905f5275577a41578c9a774cf9f77011ce3 100644 (file)
@@ -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
index 19945fbdfae42f69833c6d9afb40ba3f5623b452..b9c230335036086654d0138b978f45afeffcc977 100644 (file)
@@ -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<size; index++)
                                {
index 5b6d3d71aaac84ef7ac49039fb500df3928a4e4d..700613f061f4723d6305835ecd1ec796fdc21925 100644 (file)
@@ -358,7 +358,7 @@ void FillFilter::FillToolLoop(int px, int py, int pz)
                                        if (isInRange) 
                                        {
                                                auxGrayLevelValidationFill =    (tmpiglfill  != _graylevel)     && 
-                                                                                                               (tmpiglfill2 != _graylevel)     && 
+                                                                                                               (tmpiglfill2 != _graylevel)     &&  // <<<<<<<<< xxxxxxxxxxxxxxxxxxxxxx
                                                                                                                (tmpiglfill  >= grayLBFMTOL)    && 
                                                                                                                (tmpiglfill  <= grayLBFPTOL)    && 
                                                                                                                (_tmpDistfill <= distbasefill) ; //DFCH