]> Creatis software - creaMaracasVisu.git/commitdiff
#3530 Bug Opacity lines with planes (some special carts graphics)
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 27 Jul 2023 14:16:20 +0000 (16:16 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Thu, 27 Jul 2023 14:16:20 +0000 (16:16 +0200)
bbtk/bbs/boxes/MeshContours.bbg
bbtk/bbs/boxes/MeshContours_Widget.bbg
bbtk/bbs/boxes/MeshContours_Widget.bbs
bbtk/bbs/boxes/Mesh_Application.bbg
bbtk/bbs/boxes/Mesh_Application.bbs
bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg
bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBaseContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewPoint.cpp

index 2a16b4053c9d87ceaae281f7eed95e6327d11890..88a19e37076e9c9536012eae76e12d27ac927945 100644 (file)
@@ -91,7 +91,7 @@ BOX
 vtk:ImageVtkProperties:Box26
 ISEXEC:FALSE
 -131.630613:-71.885173:-900.000000
--109.095613:-74.385173:-900.000000
+16.720000:-74.385173:-900.000000
 FIN_BOX
 BOX
 std:MathOperationVector:Box27
@@ -137,7 +137,7 @@ BOX
 creaVtk:Plane:Box33
 ISEXEC:FALSE
 -88.686880:-131.539384:-900.000000
--67.521880:-134.039384:-900.000000
+8.680000:-134.039384:-900.000000
 PORT
 Normal:"0 1 0"
 FIN_BOX
@@ -145,7 +145,7 @@ BOX
 vtk:PolyDataToActor:Box34
 ISEXEC:FALSE
 -95.567784:-153.601058:-900.000000
--69.287784:-156.101058:-900.000000
+26.280000:-156.101058:-900.000000
 PORT
 Colour:"1 1 1"
 PORT
@@ -157,13 +157,13 @@ BOX
 creaMaracasVisu:wxVtkBaseView_Info:Box35
 ISEXEC:FALSE
 -139.080784:-47.612451:-900.000000
--111.800784:-50.112451:-900.000000
+27.280000:-50.112451:-900.000000
 FIN_BOX
 BOX
 std:MagicBox:Box36
 ISEXEC:FALSE
 -200.267056:-23.399171:-900.000000
--178.667056:-25.899171:-900.000000
+8.680000:-25.899171:-900.000000
 FIN_BOX
 BOX
 std:MagicBox:Box38
@@ -175,25 +175,25 @@ BOX
 creaMaracasVisu:wxVtkBaseView_Info:Box39
 ISEXEC:FALSE
 -103.447021:-49.610017:-900.000000
--76.167021:-52.110017:-900.000000
+27.280000:-52.110017:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:wxVtkBaseView_Info:Box40
 ISEXEC:FALSE
 -69.513133:-46.919231:-900.000000
--42.233133:-49.419231:-900.000000
+27.280000:-49.419231:-900.000000
 FIN_BOX
 BOX
 creaMaracasVisu:wxVtkBaseView_Info:Box44
 ISEXEC:FALSE
 -11.979547:-46.964556:-900.000000
-15.300453:-49.464556:-900.000000
+27.280000:-49.464556:-900.000000
 FIN_BOX
 BOX
 vtk:PolyDataToActor:Box48
 ISEXEC:FALSE
 -15.713558:-152.281987:-900.000000
-10.566442:-154.781987:-900.000000
+26.280000:-154.781987:-900.000000
 PORT
 Colour:"1 1 1"
 PORT
@@ -205,7 +205,7 @@ BOX
 vtk:PolyDataToActor:Box49
 ISEXEC:FALSE
 -7.268940:-159.136559:-900.000000
-19.011060:-161.636559:-900.000000
+26.280000:-161.636559:-900.000000
 PORT
 Colour:"1 1 1"
 PORT
@@ -217,7 +217,7 @@ BOX
 vtk:PolyDataToActor:Box50
 ISEXEC:FALSE
 -2.705157:-164.548716:-900.000000
-23.574843:-167.048716:-900.000000
+26.280000:-167.048716:-900.000000
 PORT
 Colour:"1 1 1"
 PORT
@@ -229,7 +229,7 @@ BOX
 std:MultipleInputs:Box55
 ISEXEC:FALSE
 -191.492204:-71.150959:-900.000000
--169.522204:-73.650959:-900.000000
+21.000000:-73.650959:-900.000000
 FIN_BOX
 BOX
 vtk:UpdateRender:Box57
@@ -243,7 +243,7 @@ BOX
 vtk:UpdateRender:Box58
 ISEXEC:FALSE
 -73.806243:-181.922347:-900.000000
--51.781243:-184.422347:-900.000000
+8.680000:-184.422347:-900.000000
 PORT
 Active:"true"
 FIN_BOX
@@ -251,7 +251,7 @@ BOX
 vtk:UpdateRender:Box59
 ISEXEC:FALSE
 -170.765522:-180.588872:-900.000000
--148.740522:-183.088872:-900.000000
+8.680000:-183.088872:-900.000000
 PORT
 Active:"true"
 FIN_BOX
@@ -259,7 +259,7 @@ BOX
 vtk:UpdateRender:Box60
 ISEXEC:FALSE
 -253.791671:-181.469186:-900.000000
--231.766671:-183.969186:-900.000000
+8.680000:-183.969186:-900.000000
 PORT
 Active:"true"
 FIN_BOX
@@ -285,19 +285,19 @@ BOX
 std:MagicBox:Box46
 ISEXEC:FALSE
 -167.099860:-23.964075:-900.000000
--145.499860:-26.464075:-900.000000
+8.680000:-26.464075:-900.000000
 FIN_BOX
 BOX
 std:MagicBox:Box47
 ISEXEC:FALSE
 -38.591456:-70.028246:-900.000000
--16.991456:-72.528246:-900.000000
+8.680000:-72.528246:-900.000000
 FIN_BOX
 BOX
 std:MagicBox:Box51
 ISEXEC:FALSE
 -64.634469:-27.918927:-900.000000
--43.034469:-30.418927:-900.000000
+8.680000:-30.418927:-900.000000
 FIN_BOX
 CONNECTIONS:78
 CONNECTION
index 771c2a686e4abb5dd1f72d78915874e1d516b050..fe0003a0d2789a10ab382ab8327cd1c172cb5924 100644 (file)
@@ -117,7 +117,7 @@ ISEXEC:FALSE
 -86.401462:-4.075584:-900.000000
 -63.641462:-6.575584:-900.000000
 PORT
-In1:"1"
+In1:"0.99999"
 FIN_BOX
 CONNECTIONS:23
 CONNECTION
index b4874357462919f1f29f976f0d92f26428727193..abd2f338bc4a3c8e3635507c62028b0af2127897 100644 (file)
@@ -34,7 +34,7 @@ new creaMaracasVisu:MeshContours Box53
 new std:MagicBox Box08
 
 new std:ConcatStrings Box09
-  set Box09.In1 "1"
+  set Box09.In1 "0.99999"
 
 
 connect Box38.Out Box53.polydata
index 3ffc1f56ec5aa058df24c8430de6f3573e2c919c..1cdd1ff9e12a0f9b613ddff85108b8c13007cfb8 100644 (file)
@@ -64,7 +64,7 @@ COMPLEX_PORT
 OutDir_ExMa
 334.933146:91.638847:-900.000000
 FIN_COMPLEX_PORT
-BOXES:87
+BOXES:88
 BOX
 creaMaracasVisu:ImageChangeInformation:Box07
 ISEXEC:FALSE
@@ -134,8 +134,8 @@ FIN_BOX
 BOX
 wx:LayoutLine:Box22
 ISEXEC:FALSE
--93.245472:-123.374840:-900.000000
--59.925472:-125.874840:-900.000000
+-93.245472:-124.500159:-900.000000
+-59.925472:-127.000159:-900.000000
 PORT
 Orientation:"V"
 FIN_BOX
@@ -753,7 +753,13 @@ ISEXEC:FALSE
 PORT
 Orientation:"H"
 FIN_BOX
-CONNECTIONS:230
+BOX
+creaMaracasVisu:FreePlane:Box117
+ISEXEC:FALSE
+93.494064:-6.191633:-900.000000
+115.189064:-8.691633:-900.000000
+FIN_BOX
+CONNECTIONS:236
 CONNECTION
 Box08:MeshBase:Box15:polydata
 NumberOfControlPoints:0
@@ -1444,4 +1450,22 @@ NumberOfControlPoints:0
 CONNECTION
 Box92:Widget:Box116:Widget6
 NumberOfControlPoints:0
+CONNECTION
+Box117:widgetOut:Box22:Widget5
+NumberOfControlPoints:0
+CONNECTION
+Box64:Out:Box117:possiblePoint
+NumberOfControlPoints:0
+CONNECTION
+Box65:Out:Box117:render
+NumberOfControlPoints:0
+CONNECTION
+Box67:Out:Box117:wxvtkbaseview1
+NumberOfControlPoints:0
+CONNECTION
+Box68:Out:Box117:wxvtkbaseview2
+NumberOfControlPoints:0
+CONNECTION
+Box69:Out:Box117:wxvtkbaseview3
+NumberOfControlPoints:0
 APP_END
index e4946d2156ab4717196f6332e5387fda5e70aa3f..aa9f371a5c7b150e5f2aa4d290d30c222e6ce0e2 100644 (file)
@@ -275,6 +275,8 @@ new wx:LayoutLine Box115
 new wx:LayoutLine Box116
   set Box116.Orientation "H"
 
+new creaMaracasVisu:FreePlane Box117
+
 
 connect Box08.MeshBase Box15.polydata
 connect Box08.MeshTemp Box10.mesh
@@ -493,6 +495,12 @@ connect Box79.Widget Box116.Widget4
 connect Box116.Widget Box97.Widget2
 connect Box115.Widget Box97.Widget4
 connect Box92.Widget Box116.Widget6
+connect Box117.widgetOut Box22.Widget5
+connect Box64.Out Box117.possiblePoint
+connect Box65.Out Box117.render
+connect Box67.Out Box117.wxvtkbaseview1
+connect Box68.Out Box117.wxvtkbaseview2
+connect Box69.Out Box117.wxvtkbaseview3
 
 # Complex input ports
 input MeshIn Box56.In " "
index fa4c0a6e5520861c31d372dec5197ce0545b2859..973332821c3a58d4e05b57041c97033d791e49de 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.5 BBG BlackBox Diagram file
-# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg
+# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbg
 # ----------------------------------
 
 APP_START
@@ -72,7 +72,7 @@ COMPLEX_PORT
 meshmanagermodel
 -150.374274:130.740991:-900.000000
 FIN_COMPLEX_PORT
-BOXES:87
+BOXES:88
 BOX
 creaMaracasVisu:ShowNPoints:showNpoints
 ISEXEC:FALSE
@@ -132,8 +132,8 @@ FIN_BOX
 BOX
 creaMaracasVisu:ManualContourModel_Box:Box29
 ISEXEC:FALSE
-71.026075:11.070274:-900.000000
-95.546075:8.570274:-900.000000
+52.918677:14.139324:-900.000000
+77.438677:11.639324:-900.000000
 PORT
 NbPoints:"40"
 FIN_BOX
@@ -281,7 +281,7 @@ In2:"100"
 FIN_BOX
 BOX
 creaMaracasVisu:PolyDataToActor_Widget:Box37
-ISEXEC:FALSE
+ISEXEC:TRUE
 -67.388857:-39.476785:-900.000000
 -44.368857:-41.976785:-900.000000
 PORT
@@ -781,7 +781,15 @@ ISEXEC:FALSE
 -270.119436:-70.500638:-900.000000
 -248.339436:-73.000638:-900.000000
 FIN_BOX
-CONNECTIONS:172
+BOX
+std:VectorFilterDouble:Box140
+ISEXEC:FALSE
+91.473998:30.841320:-900.000000
+117.753998:28.341320:-900.000000
+PORT
+Type:"14"
+FIN_BOX
+CONNECTIONS:177
 CONNECTION
 Box06:LstContourPointsX:Box04:LstX
 NumberOfControlPoints:0
@@ -801,9 +809,6 @@ CONNECTION
 Box30:BoxChange:Box31:In4
 NumberOfControlPoints:0
 CONNECTION
-showNpoints:lstIndexs:Box29:LstIndexsIn
-NumberOfControlPoints:0
-CONNECTION
 Box29:LstContourPointsX:Box30:lstPointX
 NumberOfControlPoints:0
 CONNECTION
@@ -846,15 +851,6 @@ CONNECTION
 Box70:Out2:Box06:LstControlPointsZ
 NumberOfControlPoints:0
 CONNECTION
-Box70:Out0:Box29:LstControlPointsX
-NumberOfControlPoints:0
-CONNECTION
-Box70:Out1:Box29:LstControlPointsY
-NumberOfControlPoints:0
-CONNECTION
-Box70:Out2:Box29:LstControlPointsZ
-NumberOfControlPoints:0
-CONNECTION
 Box78:Out:Box77:Operation
 NumberOfControlPoints:0
 CONNECTION
@@ -1298,4 +1294,31 @@ NumberOfControlPoints:0
 CONNECTION
 Box134:Widget:Box123:Widget9
 NumberOfControlPoints:0
+CONNECTION
+Box70:Out0:Box140:In0
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out1:Box140:In1
+NumberOfControlPoints:0
+CONNECTION
+Box70:Out2:Box140:In2
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstIndexs:Box140:In3
+NumberOfControlPoints:0
+CONNECTION
+showNpoints:lstSelectedIndexs:Box140:k1
+NumberOfControlPoints:0
+CONNECTION
+Box140:Out0:Box29:LstControlPointsX
+NumberOfControlPoints:0
+CONNECTION
+Box140:Out1:Box29:LstControlPointsY
+NumberOfControlPoints:0
+CONNECTION
+Box140:Out2:Box29:LstControlPointsZ
+NumberOfControlPoints:0
+CONNECTION
+Box140:Out3:Box29:LstIndexsIn
+NumberOfControlPoints:0
 APP_END
index 4f95771dbe7103d43aaaaaf45cb41a0f8a854872..bfb4f1ad2eb30a055b139b9774d327763b2d8003 100644 (file)
@@ -1,6 +1,6 @@
 # ----------------------------------
 # - BBTKGEditor v 1.5 BBS BlackBox Script (Complex Box)
-# - /home/garzon/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs
+# - /Users/davila/Creatis/C23/creatools_source/creaMaracasVisu/bbtk/bbs/boxes/Mesh_tool_ApplySurface.bbs
 # ----------------------------------
 
 include std
@@ -285,6 +285,9 @@ new wx:OutputText Box137
 
 new wx:OutputText Box139
 
+new std:VectorFilterDouble Box140
+  set Box140.Type "14"
+
 
 connect Box06.LstContourPointsX Box04.LstX
 connect showNpoints.lstIndexs Box06.LstIndexsIn
@@ -292,7 +295,6 @@ connect Box06.LstContourPointsY Box04.LstY
 connect Box06.LstContourPointsZ Box04.LstZ
 connect Box06.LstIndexsOut Box04.LstIndexs
 connect Box30.BoxChange Box31.In4
-connect showNpoints.lstIndexs Box29.LstIndexsIn
 connect Box29.LstContourPointsX Box30.lstPointX
 connect Box29.LstContourPointsY Box30.lstPointY
 connect Box29.LstContourPointsZ Box30.lstPointZ
@@ -307,9 +309,6 @@ connect showNpoints.lstPointsZ Box70.In2
 connect Box70.Out0 Box06.LstControlPointsX
 connect Box70.Out1 Box06.LstControlPointsY
 connect Box70.Out2 Box06.LstControlPointsZ
-connect Box70.Out0 Box29.LstControlPointsX
-connect Box70.Out1 Box29.LstControlPointsY
-connect Box70.Out2 Box29.LstControlPointsZ
 connect Box78.Out Box77.Operation
 connect Box66.Out Box11.Renderer
 connect Box66.Out Box30.Renderer
@@ -443,6 +442,15 @@ connect Box139.Widget Box125.Widget9
 connect Box137.Widget Box135.Widget9
 connect Box129.Widget Box126.Widget9
 connect Box134.Widget Box123.Widget9
+connect Box70.Out0 Box140.In0
+connect Box70.Out1 Box140.In1
+connect Box70.Out2 Box140.In2
+connect showNpoints.lstIndexs Box140.In3
+connect showNpoints.lstSelectedIndexs Box140.k1
+connect Box140.Out0 Box29.LstControlPointsX
+connect Box140.Out1 Box29.LstControlPointsY
+connect Box140.Out2 Box29.LstControlPointsZ
+connect Box140.Out3 Box29.LstIndexsIn
 
 # Complex input ports
 input point showNpoints.In " "
@@ -463,5 +471,6 @@ output interactorStyleMaracas2 Box57.InteractorStyleMaracas2 " "
 output interactorStyleMaracas3 Box57.InteractorStyleMaracas3 " "
 output interactorStyleMaracas4 Box57.InteractorStyleMaracas4 " "
 
+exec Box37
 
 endefine
index 58198eef1edbc9d72a39225f21f0233a5b166916..b5b93b431c101905787bbadcf1d4774fbe8046f0 100644 (file)
@@ -307,6 +307,11 @@ void manualViewBaseContour::ConstructVTKObjects()
        // lines->Delete();  //do not delete lines ??
 
        _contourVtkActor        =       vtkActor::New();
+    
+//EED 2023-07-27
+//    _contourVtkActor->GetProperty()->SetOpacity(1.0);
+    _contourVtkActor->GetProperty()->SetOpacity(0.9999);
+
     _bboxMapper                        =       vtkPolyDataMapper::New();
     _bboxMapper->ScalarVisibilityOff( );
 
@@ -957,9 +962,12 @@ void manualViewBaseContour::SetVisible(bool ok)
        double opacity;
        if (ok==true)
        {
-               opacity=1;
+// EED 2023-07-27
+//         opacity = 1;
+        opacity = 0.9999;
+               opacity = 0.4;
        } else {
-               opacity=0.5;
+               opacity = 0.5;
        }
        vtkActor *actor;
        int i,size=_lstViewPoints.size();
index 50754a1c391b1438be723570534c80ae8fc96843..01332860ca390e243d586844c50681b3158ac54d 100644 (file)
@@ -209,18 +209,16 @@ void manualViewContour::RefreshText()  // virtual
                        gcvt ( this->_manContModel->GetPathSize( spcP ), 5, text );
                        strcat(resultText,text);
                        strcat(resultText,"p");
-
 //CMRU 19-08-09 ----------------------------------
                        strcat(resultText," ");
                        strcat(resultText,label.c_str());
-
                        strcpy(resultText2,"L= ");
                        gcvt ( this->_manContModel->GetPathSize( _spc ), 5, text );
                        strcat(resultText2,text);
                        strcat(resultText2,"u");
-
 //------------------------------------------------
                }
+        
                if (size>2)
                {
                        if (_manContModel->IfCloseContour()==true)
index ca17755e25093e7b65bd8f89bbfcdcaadd2ae73f..6cfdf16f9afbc50662efc85eefc642849b4afe38 100644 (file)
@@ -155,6 +155,11 @@ vtkActor* manualViewPoint::CreateVtkPointActor()
 //     lines->Delete();  //do not delete lines ??
 
        _pointVtkActor  =       vtkActor::New();
+    
+    //EED 2023-07-27
+    //    _contourVtkActor->GetProperty()->SetOpacity(1.0);
+    _pointVtkActor->GetProperty()->SetOpacity(0.9999);
+
     _bboxMapper                =       vtkPolyDataMapper::New();