]> Creatis software - creaMaracasVisu.git/commitdiff
New Options ShowNPoints_Tools
authoreduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Fri, 5 Sep 2025 09:16:31 +0000 (11:16 +0200)
committereduardo.davila@creatis.insa-lyon.fr <eduardo.davila@creatis.insa-lyon.fr>
Fri, 5 Sep 2025 09:16:31 +0000 (11:16 +0200)
bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.cxx
bbtk/src/bbcreaMaracasVisuShowNPoints_Tools.h
bbtk/src/bbmaracasvisuShowNPoints.cxx
bbtk/src/bbmaracasvisuShowNPoints.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/ModelShowNPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/ViewShowNPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/WidgetShowNPoints.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.h
lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DViewCntrlPanel.cxx

index cf789b82edecb0a0b5067fa83e23640343c2e22a..5ff880d38e0f06cb463db3dd38b530691268b76a 100644 (file)
@@ -817,7 +817,7 @@ void ShowNPoints_Tools::ChangeCurrentPoint()
         printf("PG ShowNPoints_Tools::MovePointInNormal No direction provided, must be 1 or -1");
         return;
     } // if Params
-    int step=bbGetInputParams()[0];
+    int                 step            = bbGetInputParams()[0];
     WidgetShowNPoints   *wsp            = bbGetInputWidgetShowNPoints();
     int                 idControlPoint  = wsp->GetModelShowNPoints()->GetIdCurrentPoint() + step;
     int size=wsp->GetModelShowNPoints()->GetLstPointsSize();
@@ -1153,11 +1153,9 @@ void ShowNPoints_Tools::Process()
         } // if Type
         if (bbGetInputType()==35)
         {
-            printf("EED ShowNPoints_Tools::Process 35  size %d", bbGetInputParamsStr().size() );
             if (bbGetInputParamsStr().size()==1)
             {
-               printf("EED ShowNPoints_Tools::Process 35  s:>%s<", bbGetInputParamsStr()[1].c_str() );
-               std::string label = bbGetInputParamsStr()[1];
+               std::string label = bbGetInputParamsStr()[0];
                bbGetInputWidgetShowNPoints()->OnRenamePoint_( label );
             }
         } // if Type
index 72c1c8c7023986112ce622a7edb67bf4add05af9..3a3291c35cade83b552b109e6256e8fcc00995e4 100644 (file)
@@ -74,7 +74,7 @@ BBTK_CATEGORY("empty");
   BBTK_INPUT(ShowNPoints_Tools,Spacing,"(default [1,1,1] )Spacing",std::vector<double>,"");
   BBTK_INPUT(ShowNPoints_Tools,Mesh,"Mesh en format vtkPolyData ",vtkPolyData*,"");
   BBTK_INPUT(ShowNPoints_Tools,Type,"(default 0) 0:Nothing 1:Auto add poits   5:Add Point  10:Insert Point  20:TrackPoint  30:Set nearest point  35:Set Label to actual point  40:Erase point  50:Deleta all points  100:Insert  group after   110:Delete group  120:Reset collection  200:Tool 3 or 4 points to patch surface - Create Mesh (based on 1 group and 3 or 4 points)   205:Tool 3 or 4 points to volume surface - Create Mesh (based on 1 group and 3 or 4 points)   210: Invert points    220: Move patch center (param is the step ex [-1] or [1])      230: Move point in normal of surface (Params [-1] or [1])       235: ChangeCurrentPoint (Params [-1] or [1])  240: Join all start-end points to the start-end points on selected spline  250: Set Mesh SPC (Params: [0]:Patch [1]:CloseSpline1 [2]:CloseSpline2)   300: Create expanded surface   310: Create wide expanded surface     320: Expand Surface,   330: Widen surface,   340: Expand patch,   400: Separate and Order Splines given a rotation origin,   500:Load collection (ParamStr filenaname.xls   501:Save collection (ParamStr filenaname.xls)",int,"");
-  BBTK_INPUT(ShowNPoints_Tools, Params,"Optional params for the tools, required for 200: normal and direction, 320: centroid and direction, 330: normal and direction, 340: centroid and direction,    400: reference point", std::vector<double>,"");
+  BBTK_INPUT(ShowNPoints_Tools, Params,"Optional params for the tools, (type:200): normal and direction, (type:235):step, (type:320): centroid and direction, (type:330): normal and direction, (type:340): centroid and direction,    (type:400): reference point", std::vector<double>,"");
 BBTK_INPUT(ShowNPoints_Tools, ParamsStr,"Optional params for the tools, required for 35:New Label  500:filename.xls", std::vector<std::string>,"");
 
   BBTK_OUTPUT(ShowNPoints_Tools, Out, "Output", std::vector<double>, "");
index 4e25288cc3b24b150cbdb5f9ef879627a00267ff..af3c51d62862e2d02f6bf01b9a8999f66e64623c 100644 (file)
@@ -79,7 +79,8 @@ void WidgetShowNPointsBox::SetOutputBox()
     mbbShowNPoints->bbSetOutputlstPointsZ( GetLstPointsZ() );
     mbbShowNPoints->bbSetOutputlstLabels( GetLstLabels() );
     mbbShowNPoints->bbSetOutputlstIndexs( GetLstIndexs() );
-    mbbShowNPoints->bbSetOutputlstSelectedIndexs( GetLstSelectedIndexs() );
+    mbbShowNPoints->bbSetOutputlstSelectedIndexs( GetLstSelectedIndexs() );             // Get id Current Collection
+    mbbShowNPoints->bbSetOutputlstSelectedIdCurrentPoints( GetLstCurrentPoints() );     // Get id Current Point
     //    mbbShowNPoints->bbSetOutputlstPointsX( GetModelShowNPoints()->GetLstPointsX() );
     //    mbbShowNPoints->bbSetOutputlstPointsY( GetModelShowNPoints()->GetLstPointsY() );
     //    mbbShowNPoints->bbSetOutputlstPointsZ( GetModelShowNPoints()->GetLstPointsZ() );
@@ -127,12 +128,14 @@ void ShowNPoints::Process()
         } // if onshowwidget
         _mwxwidget->AutoAddPoints();
         _mwxwidget->TrackingPoint();
-        bbSetOutputlstPointsX( _mwxwidget->GetLstPointsX()               );
-        bbSetOutputlstPointsY( _mwxwidget->GetLstPointsY()               );
-        bbSetOutputlstPointsZ( _mwxwidget->GetLstPointsZ()               );
-        bbSetOutputlstLabels( _mwxwidget->GetLstLabels()                 );
-        bbSetOutputlstIndexs( _mwxwidget->GetLstIndexs()                 );
-        bbSetOutputlstSelectedIndexs( _mwxwidget->GetLstSelectedIndexs() );
+        bbSetOutputlstPointsX( _mwxwidget->GetLstPointsX()                          );
+        bbSetOutputlstPointsY( _mwxwidget->GetLstPointsY()                          );
+        bbSetOutputlstPointsZ( _mwxwidget->GetLstPointsZ()                          );
+        bbSetOutputlstLabels( _mwxwidget->GetLstLabels()                            );
+        bbSetOutputlstIndexs( _mwxwidget->GetLstIndexs()                            );
+        bbSetOutputlstSelectedIndexs( _mwxwidget->GetLstSelectedIndexs()            );  // Get id Current Collection
+        bbSetOutputlstSelectedIdCurrentPoints( _mwxwidget->GetLstCurrentPoints()    );  // Get id Current Point
+
         bbSetOutputWidgetShowNPoints( (WidgetShowNPoints*)_mwxwidget );
     } // mwxwidget
 }
index ac2fd8318c6c16b8c466db99f4e53e7463657110..529999074fb88f122b3a46a2c8b19a7108259f98 100644 (file)
@@ -80,6 +80,10 @@ class /*BBTK_EXPORT*/ ShowNPoints
   BBTK_DECLARE_OUTPUT( lstLabels        , std::vector<std::string>  );
   BBTK_DECLARE_OUTPUT( lstIndexs        , std::vector<int>          );
   BBTK_DECLARE_OUTPUT( lstSelectedIndexs, std::vector<int>          );
+  BBTK_DECLARE_OUTPUT( lstSelectedIdCurrentPoints, std::vector<int>    );
+
+    
+    
   BBTK_DECLARE_OUTPUT( WidgetShowNPoints, WidgetShowNPoints*        );
   BBTK_PROCESS(Process);
   void Process();
@@ -115,13 +119,14 @@ BBTK_BEGIN_DESCRIBE_BLACK_BOX(ShowNPoints,bbtk::WxBlackBox);
   BBTK_INPUT(ShowNPoints,InitLstIndexs,"Initial lst of indexs sizes",std::vector<int>,"");
   BBTK_INPUT(ShowNPoints,Type,"Type of the widget. 0(default): N-points, 1:Just one point, 2:Add/DeleteAll points, 3:As 0 with out save/load option, 4 Multiple NPoints",int,"");
 
-  BBTK_OUTPUT(ShowNPoints , lstPointsX          , " list of points X "      , std::vector<double> ,""       );
-  BBTK_OUTPUT(ShowNPoints , lstPointsY          , " list of points Y "      , std::vector<double> ,""       );
-  BBTK_OUTPUT(ShowNPoints , lstPointsZ          , " list of points Z "      , std::vector<double> ,""       );
-  BBTK_OUTPUT(ShowNPoints , lstLabels           , " list of labels "        , std::vector<std::string> ,""  );
-  BBTK_OUTPUT(ShowNPoints , lstIndexs           , " list of index sizes "   , std::vector<int> ,""          );
-  BBTK_OUTPUT(ShowNPoints , lstSelectedIndexs   , " list of points Z "      , std::vector<int> ,""          );
-  BBTK_OUTPUT(ShowNPoints , WidgetShowNPoints   , " WidgetShowNPoints "     , WidgetShowNPoints* ,""        );
+  BBTK_OUTPUT(ShowNPoints , lstPointsX                  , " list of points X "          , std::vector<double> ,""       );
+  BBTK_OUTPUT(ShowNPoints , lstPointsY                  , " list of points Y "          , std::vector<double> ,""       );
+  BBTK_OUTPUT(ShowNPoints , lstPointsZ                  , " list of points Z "          , std::vector<double> ,""       );
+  BBTK_OUTPUT(ShowNPoints , lstLabels                   , " list of labels "            , std::vector<std::string> ,""  );
+  BBTK_OUTPUT(ShowNPoints , lstIndexs                   , " list of index sizes "       , std::vector<int> ,""          );
+  BBTK_OUTPUT(ShowNPoints , lstSelectedIndexs           , " list id Current Collection ", std::vector<int> ,""          );
+  BBTK_OUTPUT(ShowNPoints , lstSelectedIdCurrentPoints  , " list of id Current Points"  , std::vector<int> ,""          );
+  BBTK_OUTPUT(ShowNPoints , WidgetShowNPoints           , " WidgetShowNPoints "         , WidgetShowNPoints* ,""        );
 
 BBTK_END_DESCRIBE_BLACK_BOX(ShowNPoints);
 }
index a36b10836c740bfaffdc2b596f8e10c80bf5b1fa..0bfb9cca3f78e15a98abb67dae806319c5cc9341 100644 (file)
@@ -417,7 +417,8 @@ std::vector<double> ModelShowNPoints::GetPointById( int id )
 //------------------------------------------------------------------------     
 int ModelShowNPoints::RenamePoint(std::string label)
 {
-       int id=IdInsidePoint();
+    int id = GetIdCurrentPoint();
+//     int id = IdInsidePoint();
        if (id>=0)
        {
                std::string strLabel = CleanSpaces( label );
index 909184803f2278104fc84cf213ef068619524309..80f127ad10bad71a59e05ddf591114cd36947843 100644 (file)
@@ -99,6 +99,7 @@ void ViewShowNPoints::AddVtkPoint()
     renderer->AddActor( sphereActor );
     // Actor
     vtkTextActor3D *textActor = vtkTextActor3D::New();
+    textActor->SetOrientation(0,180,180);
 //    textActor->SetInput( strLabel.c_str()  );
     renderer->AddActor( textActor );
     lstActorsText.push_back(textActor);
index b326037984ac4f29c9f46861a4f00e839d091c8a..a4b66bd6b968818c2a51b1a70fff5cbfcbb3fb2c 100644 (file)
@@ -637,6 +637,7 @@ void WidgetShowNPoints::AddPoint(double x, double y, double z, std::string label
     //AddVtkPoint();
     //RefreshPoint(lstActorsSphere.size()-1);
     GetViewShowNPoints()->AddPoint();
+    GetViewShowNPoints()->RefreshPoints();
 }
 
 //------------------------------------------------------------------------
@@ -2105,6 +2106,14 @@ std::vector<int> WidgetShowNPoints::GetLstSelectedIndexs()
     return lstSelectedIndexs;
 }
 
+//------------------------------------------------------------------------
+std::vector<int> WidgetShowNPoints::GetLstCurrentPoints()
+{
+    std::vector<int> lstCurrentPoints;
+    lstCurrentPoints.push_back( GetModelShowNPoints()->GetIdCurrentPoint() );
+    return lstCurrentPoints;
+}
+
 //------------------------------------------------------------------------
 int WidgetShowNPoints::GetLstModelShowNPointsSize()
 {
index 251130fff8baf14afc1495473baab52a30c23da1..2c633a251665351cf8e4371ab4e295b562c5a2bd 100644 (file)
@@ -133,7 +133,8 @@ class WidgetShowNPoints : public wxPanel
     std::vector<double>         GetLstPointsZ();
     std::vector<std::string>    GetLstLabels();
     std::vector<int>            GetLstIndexs();
-    std::vector<int>            GetLstSelectedIndexs();
+    std::vector<int>            GetLstSelectedIndexs();   // Get id Current Collection
+    std::vector<int>            GetLstCurrentPoints();    // Get id Current point
 
 
   protected:
index 3a909de3e32323b397a4f242d743982781e8e83c..8b86511f47e02390e0900ef5f1f6b84a9e45def8 100644 (file)
@@ -42,6 +42,7 @@
 #include "vtkInteractorStyleBaseView.h"
 #include <vtkImageReslice.h>
 #include "vtkTexture.h"
+#include "vtkTextProperty.h"
 
 
 
@@ -182,7 +183,56 @@ void wxVtkMPR3DView::Configure()
        if(imageData){
                if(_pointWidget==NULL)
                {
-                       _pointWidget = vtkPointWidget::New();
+                       _pointWidget    = vtkPointWidget::New();
+            _text_x1        = vtkTextActor3D::New();
+            _text_x2        = vtkTextActor3D::New();
+            _text_y1        = vtkTextActor3D::New();
+            _text_y2        = vtkTextActor3D::New();
+            _text_z1        = vtkTextActor3D::New();
+            _text_z2        = vtkTextActor3D::New();
+            _text_x1->SetInput( "S" );
+            _text_x2->SetInput( "S" );
+            _text_y1->SetInput( "C" );
+            _text_y2->SetInput( "C" );
+            _text_z1->SetInput( "A" );
+            _text_z2->SetInput( "A" );
+            _text_x1->SetOrientation(0,180,180);
+            _text_y1->SetOrientation(0,180,180);
+            _text_z1->SetOrientation(0,180,180);
+            _text_x2->SetOrientation(0,180,180);
+            _text_y2->SetOrientation(0,180,180);
+            _text_z2->SetOrientation(0,180,180);
+            _text_x1->GetTextProperty()->ShadowOff();
+            _text_x2->GetTextProperty()->ShadowOff();
+            _text_y1->GetTextProperty()->ShadowOff();
+            _text_y2->GetTextProperty()->ShadowOff();
+            _text_z1->GetTextProperty()->ShadowOff();
+            _text_z2->GetTextProperty()->ShadowOff();
+            _text_x1->GetTextProperty()->SetFontFamilyToArial();
+            _text_x2->GetTextProperty()->SetFontFamilyToArial();
+            _text_y1->GetTextProperty()->SetFontFamilyToArial();
+            _text_y2->GetTextProperty()->SetFontFamilyToArial();
+            _text_z1->GetTextProperty()->SetFontFamilyToArial();
+            _text_z2->GetTextProperty()->SetFontFamilyToArial();
+
+            _text_x1->GetTextProperty()->SetOpacity(0);
+            _text_x2->GetTextProperty()->SetOpacity(0);
+            _text_y1->GetTextProperty()->SetOpacity(0);
+            _text_y2->GetTextProperty()->SetOpacity(0);
+            _text_z1->GetTextProperty()->SetOpacity(0);
+            _text_z2->GetTextProperty()->SetOpacity(0);
+            _text_x1->GetTextProperty()->SetFontSize(10);
+            _text_x2->GetTextProperty()->SetFontSize(10);
+            _text_y1->GetTextProperty()->SetFontSize(10);
+            _text_y2->GetTextProperty()->SetFontSize(10);
+            _text_z1->GetTextProperty()->SetFontSize(10);
+            _text_z2->GetTextProperty()->SetFontSize(10);
+            _wxvtk3Dbaseview->GetRenderer()->AddActor( _text_x1 );
+            _wxvtk3Dbaseview->GetRenderer()->AddActor( _text_x2 );
+            _wxvtk3Dbaseview->GetRenderer()->AddActor( _text_y1 );
+            _wxvtk3Dbaseview->GetRenderer()->AddActor( _text_y2 );
+            _wxvtk3Dbaseview->GetRenderer()->AddActor( _text_z1 );
+            _wxvtk3Dbaseview->GetRenderer()->AddActor( _text_z2 );
                }
 //EED 2017-01-01 Migration VTK7
 #if VTK_MAJOR_VERSION <= 5
@@ -212,10 +262,10 @@ void wxVtkMPR3DView::Configure()
                _planeWidget->SetRepresentationToOutline();
                int dim[3];
                imageData->GetDimensions(dim);
-               int px=(dim[0]/2);
-               int py=(dim[1]/2);
-               int pz=(dim[2]/2);
-               int dd=20;
+               int px = (dim[0]/2);
+               int py = (dim[1]/2);
+               int pz = (dim[2]/2);
+               int dd = 20;
                _planeWidget->PlaceWidget( px-dd , px+dd , py-dd , py+dd , pz-dd , pz+dd );
                if(_vtkplane==NULL)
                {
@@ -529,11 +579,13 @@ void wxVtkMPR3DView::Refresh()   // virtual
 //-------------------------------------------------------------------
 void wxVtkMPR3DView::RefreshView()   // virtual
 {
+    int dim[3];
        double spc[3];
        vtkImageData *image = GetVtkMPR3DDataViewer()->GetVtkMPRBaseData()->GetImageData();
        if(image)
        {
                image->GetSpacing(spc);
+        image->GetDimensions(dim);
        }else{
                spc[0] = 0;
                spc[1] = 0;
@@ -592,6 +644,15 @@ void wxVtkMPR3DView::RefreshView()   // virtual
                _pointWidget->PlaceWidget();
 
                _pointWidget->SetPosition( x,y,z );
+        
+        _text_x1->SetPosition( 0-4              , y+5               , z                 );   // sagital
+        _text_y1->SetPosition( x-4              , 0                 , z                 );    // coronal
+        _text_z1->SetPosition( x-4              , y+5               , -1                );    // axial
+
+        _text_x2->SetPosition( dim[0]*spc[0]    , y+5               , z                 );  // sagital
+        _text_y2->SetPosition( x-4              , dim[1]*spc[1]+10  , z                 );  // coronal
+        _text_z2->SetPosition( x-4              , y+5               , dim[2]*spc[2]+1   );  // axial
+
                double in[3];
                double normal[3];
                vtkTransform *transform = GetVtkMPR3DDataViewer ()->GetVtkMPRBaseData()->GetTransformOrientation();
@@ -702,8 +763,21 @@ void wxVtkMPR3DView::VisiblePointWidget( bool visible )
                if (visible==true)
                {
                        _pointWidget->On();
+            _text_x1->GetTextProperty()->SetOpacity(1);
+            _text_x2->GetTextProperty()->SetOpacity(1);
+            _text_y1->GetTextProperty()->SetOpacity(1);
+            _text_y2->GetTextProperty()->SetOpacity(1);
+            _text_z1->GetTextProperty()->SetOpacity(1);
+            _text_z2->GetTextProperty()->SetOpacity(1);
+
                } else {
                        _pointWidget->Off();
+            _text_x1->GetTextProperty()->SetOpacity(0);
+            _text_x2->GetTextProperty()->SetOpacity(0);
+            _text_y1->GetTextProperty()->SetOpacity(0);
+            _text_y2->GetTextProperty()->SetOpacity(0);
+            _text_z1->GetTextProperty()->SetOpacity(0);
+            _text_z2->GetTextProperty()->SetOpacity(0);
                } // visible
        } // _pointWidget
 }
index 6c4b9066ec844411f048a26c4a8c7e99020c1272..9a632fc79b5b934567b8a975808e047bd2d5e97d 100644 (file)
@@ -35,7 +35,7 @@
 #include "vtkPointWidget.h"
 #include "vtkImagePlaneWidget.h"
 #include "vtkImageChangeInformation.h"
-
+#include "vtkTextActor3D.h"
 
 //class vtkmyPWCallback_3DPointWidget;
 class wxVtkMPR3DViewCntrlPanel;
@@ -97,6 +97,13 @@ private:
 
        // Point Widget (3D)
        vtkPointWidget                                  *_pointWidget;
+    vtkTextActor3D                  *_text_x1;
+    vtkTextActor3D                  *_text_x2;
+    vtkTextActor3D                  *_text_y1;
+    vtkTextActor3D                  *_text_y2;
+    vtkTextActor3D                  *_text_z1;
+    vtkTextActor3D                  *_text_z2;
+
        //vtkmyPWCallback_3DPointWidget *_myCallback;
        vtkProbeFilter                                  *_probe;
        vtkPolyDataMapper                               *_contourMapper;
index ec5f41221fcd8d37e19a93af532743a9d80a633b..042e552bfbf3994cc8d3813725e79837e8ff20b2 100644 (file)
@@ -69,6 +69,9 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
     _positionY                  = new wxSlider(panelSlice,-1,0,0,1, wxDefaultPosition, wxSize(2000,35), wxSL_HORIZONTAL | wxSL_LABELS);
     _positionZ                  = new wxSlider(panelSlice,-1,0,0,1, wxDefaultPosition, wxSize(2000,35), wxSL_HORIZONTAL | wxSL_LABELS);
 
+    _ckBoxXYZ                    = new wxCheckBox(panelSlice,-1,_T("3D Axis  "));
+    _ckBoxFixAxis2D                = new wxCheckBox(panelSlice,-1,_T("2D Fix Axis"));
+    
     _ckBoxX                     = new wxCheckBox(panelConfig,-1,_T("X CL  "));  // X   plano YZ
        _ckBoxY                                         = new wxCheckBox(panelConfig,-1,_T("Y CL  "));  // Y   plano XZ
     _ckBoxZ                     = new wxCheckBox(panelConfig,-1,_T("Z CL  "));  // Z   plano XY
@@ -76,8 +79,6 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
     _ckBoxY->SetValue(false);
     _ckBoxZ->SetValue(false);
 
-    _ckBoxXYZ                                  = new wxCheckBox(panelConfig,-1,_T("3D Axis  "));
-       _ckBoxFixAxis2D                         = new wxCheckBox(panelConfig,-1,_T("2D Fix Axis"));
     _opacityAxis                               = new wxSlider(panelConfig,-1,99,0,100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_LABELS);
        _ckBoxPlane                                     = new wxCheckBox(panelConfig,-1,_T("Plane"));
 ////EED 05Nov2012      _ckBox_BW_Color_Plane           = new wxCheckBox(panel,-1,_T("GL/Color"));
@@ -181,13 +182,24 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
        if(align)
        {
                sizerSlice       = new wxFlexGridSizer(4);
-               sizerH4 = new wxFlexGridSizer(2);
+               sizerH4      = new wxFlexGridSizer(2);
         sizerH4->Add( _ckFreePlaneX                             ,1, wxALL|wxEXPAND                      , 0);
         sizerH4->Add( _positionX                                ,1,    wxGROW                           , 0);
         sizerH4->Add( _ckFreePlaneY                             ,1, wxALL|wxEXPAND                      , 0);
         sizerH4->Add( _positionY                                ,1,    wxGROW                           , 0);
         sizerH4->Add( _ckFreePlaneZ                             ,1, wxALL|wxEXPAND                      , 0);
         sizerH4->Add( _positionZ                                ,1,    wxGROW                           , 0);
+        
+        sizerH5a = new wxFlexGridSizer(3);
+        sizerH5a->Add( new wxStaticText(panelSlice, -1,_T(" ")) ,1, wxALL|wxEXPAND                      , 0);
+        sizerH5a->Add( _ckBoxXYZ                                ,1, wxALL|wxEXPAND                      , 0);
+        sizerH5a->Add( _ckBoxFixAxis2D                          ,1, wxALL|wxEXPAND                      , 0);
+
+        sizerH4->Add( new wxStaticText(panelSlice, -1,_T(" ")) ,1, wxALL|wxEXPAND                       , 0);
+        sizerH4->Add( new wxStaticText(panelSlice, -1,_T(" ")) ,1, wxALL|wxEXPAND                       , 0);
+        sizerH4->Add( new wxStaticText(panelSlice, -1,_T(" ")) ,1, wxALL|wxEXPAND                       , 0);
+        sizerH4->Add( sizerH5a                                  ,1, wxALL|wxEXPAND                      , 0);
+
         sizerSlice->Add( sizerH4,  1, wxGROW,    2);
 
         
@@ -196,9 +208,6 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
         sizerH8->Add( _ckBoxX                                     ,0,    wxALIGN_CENTER_VERTICAL|wxSHAPED    , 0);
         sizerH8->Add( _ckBoxZ                                     ,0,    wxALIGN_CENTER_VERTICAL|wxSHAPED    , 0);
         sizerH8->Add( _ckBoxY                                     ,0,    wxALIGN_CENTER_VERTICAL|wxSHAPED    , 0);
-        sizerH5a = new wxFlexGridSizer(3);
-               sizerH5a->Add( _ckBoxXYZ                                                                ,1, wxALL|wxEXPAND                                              , 0);
-               sizerH5a->Add( _ckBoxFixAxis2D                                                  ,1, wxALL|wxEXPAND                                              , 0);
         
                sizerH5 = new wxFlexGridSizer(1);
                sizerH5->Add( _ckBoxPlane                                                               , 1, wxALL|wxEXPAND                                             , 0);
@@ -221,7 +230,7 @@ wxVtkMPR3DViewCntrlPanel::wxVtkMPR3DViewCntrlPanel(wxWindow *parent, wxVtkMPR3DV
                sizerH6->Add( panelH7                                                                   , 1, wxALL|wxEXPAND                                             , 0);
         sizerH6->Add( new wxStaticText(panelConfig, -1,_T(" ")) , 1, wxALL|wxEXPAND                     , 0);
         sizerH6->Add( _ckBoxInterpolate                         ,1, wxALL|wxEXPAND                      , 0);
-        sizerH6->Add( sizerH5a                                  ,1, wxALL|wxEXPAND                      , 0);
+//        sizerH6->Add( sizerH5a                                  ,1, wxALL|wxEXPAND                      , 0);
 
                sizerConfig->Add( sizerH5,  1, wxALL|wxEXPAND,2);
                sizerConfig->Add( sizerH6,  1, wxALL|wxEXPAND,2);