]> Creatis software - bbtk.git/commitdiff
Clean code
authorEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Mon, 26 Jul 2021 13:36:44 +0000 (15:36 +0200)
committerEduardo DAVILA <eduardo.davila@creatis.insa-lyon.fr>
Mon, 26 Jul 2021 13:36:44 +0000 (15:36 +0200)
packages/vtk/src/bbvtkTransform.cxx
packages/wx/src/bbwxRadioButton.cxx

index 57c9c1fe45e3be75adeb69811b4815ccf3a4242e..1c6b3357f01ee34bf315f3193352c9aaaafdf533 100644 (file)
@@ -86,31 +86,26 @@ namespace bbvtk
        // --------------------------------------------------------------       
   void Transform::Process()
   {
-       printf("EED Transform::Process Start\n ");
-
          bbUserInitializeProcessing();
          if (bbGetInputIn()!=NULL)
       {
                  result->Concatenate( bbGetInputIn()->GetMatrix() );
-      }
-
+      } // if In
          if ((bbGetInputTranslate().size()>=3) && (bbGetInputSpacing().size()>=3))
       {
                  double tx = bbGetInputTranslate()[0] * bbGetInputSpacing()[0];
                  double ty = bbGetInputTranslate()[1] * bbGetInputSpacing()[1];
                  double tz = bbGetInputTranslate()[2] * bbGetInputSpacing()[2];
                  result->Translate(tx,ty,tz);
-      }
-
+      }  // if translate spacing  size >=3
          if (bbGetInputScale().size()>=3)
       {
                  result->Scale(bbGetInputScale()[0], bbGetInputScale()[1], bbGetInputScale()[2]);
-      }
-
+      }  // if scale size >=3
          if (bbGetInputRotateWXYZ().size()>=4)
       {
                  result->RotateWXYZ(bbGetInputRotateWXYZ()[0],bbGetInputRotateWXYZ()[1], bbGetInputRotateWXYZ()[2], bbGetInputRotateWXYZ()[3]);
-      }
+      } // if rotation size >=4
  
          if (bbGetInputInverse()==false)
          {
@@ -122,7 +117,6 @@ namespace bbvtk
                resultInverse->SetMatrix( matrix );
                bbSetOutputOut(resultInverse);
          }  // if Inverse
-         printf("EED Transform::Process End\n ");
   }
   
 }// EO namespace bbvtk
index 779a2817c7cc56560c3fd26ceadf31a75c15df8e..375092be431d940e54e2b1ca3ff70daca73d049c 100644 (file)
@@ -90,64 +90,6 @@ namespace bbwx
     mBox(box)
   {
 
-/*
-    MAX_RADIOBUTTON = lstIn.size();
-    wxPanel *panel     = this;
-    int i;
-    long style=wxRB_GROUP;
-    for (i=0;i<MAX_RADIOBUTTON; i++)
-    {
-          if ( lstIn[i]!=_T(""))
-          {
-    //---------------------------------------------------------------------
-    // 1) Creation of the components of the widget
-    // Any top level sub-widget must have the panel returned by panel
-    // for parent
-             mwxRadioButton[i] = new wxRadioButton( panel, -1, lstIn[i],wxDefaultPosition, wxDefaultSize, style);
-             style=0;
-             if (In==i)
-             {
-                     mwxRadioButton[i]->SetValue(true);
-             } else {
-                     mwxRadioButton[i]->SetValue(false);
-             }
-              Connect( mwxRadioButton[i]->GetId(),  
-                   wxEVT_COMMAND_RADIOBUTTON_SELECTED, 
-                  (wxObjectEventFunction) 
-                  (void (wxPanel::*)(wxEvent&))
-                  &RadioButtonWidget::OnRadioButton ); 
-          } else {
-              mwxRadioButton[i]=NULL;
-          } // if
-    } // for 
-    
-    //---------------------------------------------------------------------
-    // 2) Insertion of the components in the window
-    
-    // We use a FlexGridSizer
-
-//EED 2018-04-18
-//    wxFlexGridSizer *sizer   = new wxFlexGridSizer(1);
-    sizer      = new wxFlexGridSizer(1);
-
-    if (title!=_T(""))
-    {
-          sizer->Add( new wxStaticText(panel,-1, title ) ); 
-    }
-    for (i=0;i<MAX_RADIOBUTTON; i++)
-    {
-       if (mwxRadioButton[i]!=NULL)
-       {
-          sizer->Add( mwxRadioButton[i],1,wxGROW ); 
-       }
-    }
-    sizer->AddGrowableCol(0);
-    panel->SetSizer(sizer);
-
-//    panel->SetAutoLayout(true);
-//    panel->Layout();
-*/
-
   }
   //-------------------------------------------------------------------------
   
@@ -329,7 +271,6 @@ namespace bbwx
 
     RadioButtonWidget *w = new RadioButtonWidget(
                          this,
-//                         bbGetWxParent(),
                                                 parent,        
                          bbGetInputIn() ,
                          bbtk::std2wx(bbGetInputTitle()),