]> Creatis software - creaMaracasVisu.git/commitdiff
#3547 Bug color layer Z position
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Tue, 23 Jan 2024 17:33:33 +0000 (18:33 +0100)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Tue, 23 Jan 2024 17:33:33 +0000 (18:33 +0100)
bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbg
bbtk/bbs/boxes/Mesh_tool_ApplyExternalMask.bbs
lib/maracasVisuLib/src/interface/wxWindows/widgets/ThresholdImageView/LayerImageBase.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModel.cpp
lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewContour.cpp

index 72e31c6050bd364a9eec2de4f720537cb8d4d244..2682534776202cd78107adb58b8325287ed8d542 100644 (file)
@@ -60,7 +60,7 @@ COMPLEX_PORT
 OutDir
 -306.137122:136.559941:-900.000000
 FIN_COMPLEX_PORT
-BOXES:91
+BOXES:92
 BOX
 wx:LayoutLine:Box08
 ISEXEC:FALSE
@@ -161,7 +161,7 @@ WinTitle:"1.2 Mesh Action"
 FIN_BOX
 BOX
 creaVtk:MeshManager_tool:Box45
-ISEXEC:TRUE
+ISEXEC:FALSE
 -88.859950:-132.940417:-900.000000
 -66.359950:-135.440417:-900.000000
 PORT
@@ -257,7 +257,7 @@ BOX
 creaMaracasVisu:wxVtkBaseView_Info:Box96
 ISEXEC:FALSE
 -6.504018:23.833007:-900.000000
-20.775982:21.333007:-900.000000
+22.535982:21.333007:-900.000000
 FIN_BOX
 BOX
 creaVtk:PolyDataToImageData:Box97
@@ -271,7 +271,7 @@ ISEXEC:FALSE
 -249.465007:-10.302637:-900.000000
 -227.535007:-12.802637:-900.000000
 PORT
-OutputFormat:"VTK_UNSIGNED_CHAR"
+OutputFormat:"VTK_UNSIGNED_SHORT"
 FIN_BOX
 BOX
 vtk:ImageGaussianSmooth:Box99
@@ -338,8 +338,8 @@ FIN_BOX
 BOX
 vtk:MetaImageReader:Box53
 ISEXEC:FALSE
--302.688649:3.843695:-900.000000
--280.228649:1.343695:-900.000000
+-301.463598:2.809397:-900.000000
+-279.003598:0.309397:-900.000000
 FIN_BOX
 BOX
 vtk:BinaryOperations:Box56
@@ -424,8 +424,8 @@ FIN_BOX
 BOX
 wx:LayoutLine:Box77
 ISEXEC:FALSE
--67.183791:-41.497869:-900.000000
--33.863791:-43.997869:-900.000000
+-68.648148:-40.582646:-900.000000
+-35.328148:-43.082646:-900.000000
 PORT
 Orientation:"V"
 PORT
@@ -448,8 +448,8 @@ FIN_BOX
 BOX
 std:ExecSystemCommand:Box94
 ISEXEC:FALSE
--336.489836:22.291022:-900.000000
--313.654836:19.791022:-900.000000
+-334.609987:20.598975:-900.000000
+-311.774987:18.098975:-900.000000
 FIN_BOX
 BOX
 std:ConcatStrings:Box95
@@ -512,8 +512,8 @@ FIN_BOX
 BOX
 vtk:MetaImageWriter:Box108
 ISEXEC:FALSE
--362.600781:40.666646:-900.000000
--340.180781:38.166646:-900.000000
+-365.902639:40.800712:-900.000000
+-343.482639:38.300712:-900.000000
 PORT
 Compression:"true"
 FIN_BOX
@@ -546,22 +546,22 @@ FIN_BOX
 BOX
 std:ConcatStrings:Box115
 ISEXEC:FALSE
--318.626425:46.511085:-900.000000
--295.866425:44.011085:-900.000000
+-326.622146:40.271354:-900.000000
+-303.862146:37.771354:-900.000000
 FIN_BOX
 BOX
 std:ConcatStrings_tool:Box116
 ISEXEC:FALSE
--335.363634:36.374532:-900.000000
--312.813634:33.874532:-900.000000
+-353.094017:28.873216:-900.000000
+-330.544017:26.373216:-900.000000
 PORT
 Type:"1"
 FIN_BOX
 BOX
 std:MultipleInputs:Box117
 ISEXEC:FALSE
--375.858701:14.248506:-900.000000
--353.778701:11.748506:-900.000000
+-373.557684:-2.950613:-900.000000
+-351.477684:-5.450613:-900.000000
 FIN_BOX
 BOX
 std:ConcatStrings:Box120
@@ -580,8 +580,8 @@ FIN_BOX
 BOX
 std:ConcatStrings:Box122
 ISEXEC:FALSE
--318.501310:15.906425:-900.000000
--295.741310:13.406425:-900.000000
+-300.729597:14.356566:-900.000000
+-277.969597:11.856566:-900.000000
 PORT
 In2:"/contour-tmp2-Imge.mhd"
 FIN_BOX
@@ -625,7 +625,7 @@ BOX
 vtk:PolyDataToActor:Box126
 ISEXEC:FALSE
 -267.469800:-109.242377:-900.000000
--241.189800:-111.742377:-900.000000
+-239.429800:-111.742377:-900.000000
 FIN_BOX
 BOX
 std:MultipleInputs:Box127
@@ -692,14 +692,14 @@ FIN_BOX
 BOX
 PackRecalage:AddImageToVector:Box134
 ISEXEC:FALSE
--299.160959:-10.728224:-900.000000
--274.640959:-13.228224:-900.000000
+-292.341581:-6.905239:-900.000000
+-267.821581:-9.405239:-900.000000
 FIN_BOX
 BOX
 vtk:GetVectorVtkImageDataElement:Box135
 ISEXEC:FALSE
--296.347769:-16.354604:-900.000000
--272.402769:-18.854604:-900.000000
+-292.846318:-20.153986:-900.000000
+-268.901318:-22.653986:-900.000000
 PORT
 I:"0"
 FIN_BOX
@@ -747,7 +747,13 @@ ISEXEC:FALSE
 -64.712874:-101.886840:-900.000000
 -31.392874:-104.386840:-900.000000
 FIN_BOX
-CONNECTIONS:140
+BOX
+std:ConcatStrings:Box142
+ISEXEC:FALSE
+-330.398849:13.354404:-900.000000
+-307.638849:10.854404:-900.000000
+FIN_BOX
+CONNECTIONS:142
 CONNECTION
 Box08:Widget:widget:widget
 NumberOfControlPoints:0
@@ -1031,21 +1037,12 @@ CONNECTION
 Box121:BoxChange:Box117:In2
 NumberOfControlPoints:0
 CONNECTION
-Box108:BoxChange:Box117:In6
-NumberOfControlPoints:0
-CONNECTION
-Box108:BoxChange:Box94:BoxExecute
-NumberOfControlPoints:0
-CONNECTION
 Box105:Out:Box122:In1
 NumberOfControlPoints:0
 CONNECTION
 Box122:Out:Box53:In
 NumberOfControlPoints:0
 CONNECTION
-Box94:BoxChange:Box56:BoxExecute
-NumberOfControlPoints:0
-CONNECTION
 Box64:Out:Box123:WxVtkBaseView
 NumberOfControlPoints:0
 CONNECTION
@@ -1088,9 +1085,6 @@ CONNECTION
 Box66:Out:Box128:Renderer
 NumberOfControlPoints:0
 CONNECTION
-Box94:BoxChange:Box53:BoxExecute
-NumberOfControlPoints:0
-CONNECTION
 Box80:BoxChange:Box93:BoxExecute
 NumberOfControlPoints:0
 CONNECTION
@@ -1168,4 +1162,22 @@ NumberOfControlPoints:0
 CONNECTION
 Box95:Out:Box101:In1
 NumberOfControlPoints:0
+CONNECTION
+Box108:BoxChange:Box117:In7
+NumberOfControlPoints:0
+CONNECTION
+Box94:BoxChange:Box117:In8
+NumberOfControlPoints:0
+CONNECTION
+Box142:BoxChange:Box53:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box142:BoxChange:Box56:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box94:BoxChange:Box142:BoxExecute
+NumberOfControlPoints:0
+CONNECTION
+Box86:BoxChange:Box115:BoxExecute
+NumberOfControlPoints:0
 APP_END
index c3351a91aedf8f5a9eb9a9a1d198a0964b60e98f..13879d9c797e2680ccea5546c596eafe168f0b3b 100644 (file)
@@ -93,7 +93,7 @@ new creaMaracasVisu:wxVtkBaseView_Info Box96
 new creaVtk:PolyDataToImageData Box97
 
 new vtk:CreateImage Box98
-  set Box98.OutputFormat "VTK_UNSIGNED_CHAR"
+  set Box98.OutputFormat "VTK_UNSIGNED_SHORT"
 
 new vtk:ImageGaussianSmooth Box99
   set Box99.StdDevX "1"
@@ -271,6 +271,8 @@ new wx:OutputText Box140
 
 new wx:LayoutTab Box141
 
+new std:ConcatStrings Box142
+
 
 connect Box66.Out Box11.Renderer
 connect Box35.Out Box68.In
@@ -354,11 +356,8 @@ connect Box120.Box_ConcatStrings Box121.Box_ConcatString
 connect Box120.Out Box108.Filename
 connect Box116.BoxChange Box117.In5
 connect Box121.BoxChange Box117.In2
-connect Box108.BoxChange Box117.In6
-connect Box108.BoxChange Box94.BoxExecute
 connect Box105.Out Box122.In1
 connect Box122.Out Box53.In
-connect Box94.BoxChange Box56.BoxExecute
 connect Box64.Out Box123.WxVtkBaseView
 connect Box65.Out Box123.WxVtkBaseView1
 connect Box69.Out Box123.WxVtkBaseView2
@@ -373,7 +372,6 @@ connect Box124.BoxChange Box127.In2
 connect Box127.BoxChange Box123.BoxExecute
 connect Box126.BoxChange Box128.BoxExecute
 connect Box66.Out Box128.Renderer
-connect Box94.BoxChange Box53.BoxExecute
 connect Box80.BoxChange Box93.BoxExecute
 connect Box129.Out Box130.In
 connect Box130.Out Box131.In
@@ -400,6 +398,12 @@ connect Box137.Widget Box141.Widget2
 connect Box141.Widget Box79.Widget7
 connect Box139.Widget Box141.Widget4
 connect Box95.Out Box101.In1
+connect Box108.BoxChange Box117.In7
+connect Box94.BoxChange Box117.In8
+connect Box142.BoxChange Box53.BoxExecute
+connect Box142.BoxChange Box56.BoxExecute
+connect Box94.BoxChange Box142.BoxExecute
+connect Box86.BoxChange Box115.BoxExecute
 
 # Complex input ports
 input mesh Box67.In " "
@@ -417,6 +421,5 @@ input OutDir Box105.In1 " "
 # Complex output ports
 output widget Box08.Widget " "
 
-exec Box45
 
 endefine
index 3831807b3c21cfc20ddc8b954c54ae232011942e..bb46f4b06c7c66072f2325205401034024c829fb 100644 (file)
@@ -178,18 +178,18 @@ void LayerImageBase::SetImage(vtkImageData* image)
        int     dimensionOriginalLayer[3];
        int     dimBase[6];
 
-       ext[0]=0;
-       ext[1]=0;
-       ext[2]=0;
-       ext[3]=0;
-       ext[4]=0;
-       ext[5]=0;
-       spcBase[0]=0;
-       spcBase[1]=0;
-       spcBase[2]=0;
-       spcBase[3]=0;
-       spcBase[4]=0;
-       spcBase[5]=0;
+       ext[0]      = 0;
+       ext[1]      = 0;
+       ext[2]      = 0;
+       ext[3]      = 0;
+       ext[4]      = 0;
+       ext[5]      = 0;
+       spcBase[0]  = 0;
+       spcBase[1]  = 0;
+       spcBase[2]  = 0;
+       spcBase[3]  = 0;
+       spcBase[4]  = 0;
+       spcBase[5]  = 0;
 
        _image = image;
 
@@ -444,13 +444,10 @@ void LayerImageBase::onThreshold()
                double x=GetX();
                double y=GetY();
                double z=GetZ();
-
                x = x*_spcBase[0];
                y = y*_spcBase[1];
                z = z*_spcBase[2];
-
                CleanXYZ(x,y,z);
-
                vtkCamera *camera = _baseView->GetRenderer()->GetActiveCamera();
                int directionViewer=0;
                if (camera->GetParallelProjection()==1)
@@ -493,7 +490,7 @@ void LayerImageBase::onThreshold()
                                }
                                if (directionViewer==2)
                                {
-                                       _thresholdActor->SetPosition( 0,0, -900-1 );
+                                       _thresholdActor->SetPosition( 0,0, -900+100 );
                                }
                        } // _thresholdActor
 
index 2600a4af1db28da824c1f05ecd701b69dbf09d3b..3d194cf312d164ec858474f1a44bfdf264961f91 100644 (file)
@@ -176,7 +176,6 @@ void manualContourModel::DeleteAllPoints()
 
 void manualContourModel::MovePoint(int i,double dx,double dy,double dz)
 {
-printf("EED manualContourModel::MovePoint %p \n", this);
        manualPoint *mp=_lstPoints[i];
        double x=mp->GetX()+dx;
        double y=mp->GetY()+dy;
@@ -490,12 +489,12 @@ double manualContourModel::GetPathArea(double *spc)
                        GetSpline_i_Point(i,&x1,&y1,&z1);
                        GetSpline_i_Point(j,&x2,&y2,&z2);
 //----------------------------------------------------------------
-                       x1=spc[0]*x1;
-                       y1=spc[1]*y1;
-                       z1=spc[2]*z1;
-                       x2=spc[0]*x2;
-                       y2=spc[1]*y2;
-                       z2=spc[2]*z2;
+                       x1 = spc[0]*x1;
+                       y1 = spc[1]*y1;
+                       z1 = spc[2]*z1;
+                       x2 = spc[0]*x2;
+                       y2 = spc[1]*y2;
+                       z2 = spc[2]*z2;
                        area += (x1 * y2 ) - ( x2 * y1 );
                        if (z1!=z2)
                        {
index 0563710a9da1ca691704d3065ae5b41e7070bf07..960b70bda6aafdca76fd55368602f59738361cb7 100644 (file)
@@ -117,9 +117,9 @@ void manualViewContour::RefreshContour() // virtual
                        _maxX   = xx;
                        _maxY   = yy;
                        _pts->SetPoint(0 , xx , yy , zz  );
-                       xx=mpB->GetX() * _spc[0];
-                       yy=mpB->GetY() * _spc[1];
-                       zz=mpB->GetZ() * _spc[2];
+                       xx = mpB->GetX() * _spc[0];
+                       yy = mpB->GetY() * _spc[1];
+                       zz = mpB->GetZ() * _spc[2];
                        if (xx<_minX) _minX=xx;
                        if (yy<_minY) _minY=yy;
                        if (xx>_maxX) _maxX=xx;
@@ -157,7 +157,6 @@ void manualViewContour::RefreshContour() // virtual
                                        yy = y*_spc[1];
                                        zz = z*_spc[2];
                                        _pts->SetPoint(i,xx,yy,zz );
-
                            //EED 27 Juin 2012
                                        //Boundaring box
                                        if (xx < _minX) { _minX = xx; }