]> Creatis software - bbtk.git/commitdiff
Clean code
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 22 Aug 2023 11:54:36 +0000 (13:54 +0200)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Tue, 22 Aug 2023 11:54:36 +0000 (13:54 +0200)
kernel/src/bbtkBlackBox.cxx
packages/itkvtk/src/bbitkvtkGeodesicMeshDeformation.cxx
packages/itkvtk/src/bbitkvtkGeodesicMeshDeformation.h
packages/vtk/src/bbvtkPolyDataToActor.cxx
packages/vtk/src/bbvtkUpdateRender.cxx

index b753c6f835dda85fe47d14a49a3cb9c8da5c1944..3e22573fec8928118d7ee5debb1cbf4f62a9cc0e 100644 (file)
@@ -748,15 +748,15 @@ namespace bbtk
                         )
                        {
                 
-printf("EED BlackBox::bbRecursiveExecute bbProcess start %s \n", bbGetFullName().c_str() );
-auto start = std::chrono::high_resolution_clock::now();
+//printf("EED BlackBox::bbRecursiveExecute bbProcess start %s \n", bbGetFullName().c_str() );
+//auto start = std::chrono::high_resolution_clock::now();
 
                 this->bbProcess();
                 
-auto stop       = std::chrono::high_resolution_clock::now();
-auto duration   = duration_cast<std::chrono::microseconds>(stop - start);
-printf("EED BlackBox::bbRecursiveExecute bbProcess time= %ld  %s \n", duration.count() , bbGetFullName().c_str() );
-printf("EED BlackBox::bbRecursiveExecute bbProcess end %s \n", bbGetFullName().c_str() );
+//auto stop       = std::chrono::high_resolution_clock::now();
+//auto duration   = duration_cast<std::chrono::microseconds>(stop - start);
+//printf("EED BlackBox::bbRecursiveExecute bbProcess time= %ld  %s \n", duration.count() , bbGetFullName().c_str() );
+//printf("EED BlackBox::bbRecursiveExecute bbProcess end %s \n", bbGetFullName().c_str() );
 
                    } // Manual analysis
                  
index 98559509fcff7fbd279be8b342c6a87be2b9c03e..c845f2394d93d864c717d97871c9f8aba2578554 100644 (file)
@@ -25,11 +25,12 @@ void GeodesicMeshDeformation::Process()
 //      (the one provided in the attribute 'name' of the tag 'input')
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
-    std::vector<double> lstCenter = bbGetInputCenter();
-    double  s           = bbGetInputS();
-    bool    ok          = false;
-    bool       pdChanged   = false;
-    using MeshType      = itk::QuadEdgeMesh<double, 3>;
+        
+    std::vector<double> lstCenter   = bbGetInputCenter();
+    double              s           = bbGetInputS();
+    bool                ok          = false;
+    bool                   pdChanged   = false;
+    using               MeshType    = itk::QuadEdgeMesh<double, 3>;
     std::vector<double> deformInfo;
        bbSetOutputOut(deformInfo);
        //std::vector<double> displacementVector;
@@ -50,7 +51,7 @@ void GeodesicMeshDeformation::Process()
                */
                using PointType = MeshType::PointType;
                //polydataBack
-               polydata = bbGetInputIn();
+               polydata        = bbGetInputIn();
                
                //points = points of input polydata
                vtkPoints* points=bbGetInputIn()->GetPoints();
@@ -226,14 +227,14 @@ void GeodesicMeshDeformation::Process()
                        bbGetInputIn()->Modified();
                        }// if ffmFilter != NULL
         } // if distance_x y z  != 0
-    } // In != NULL    ok    active
+    } // In != NULL    ok    active    
 }
+
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
 void GeodesicMeshDeformation::bbUserSetDefaultValues()
 {
-
 //  SET HERE THE DEFAULT INPUT/OUTPUT VALUES OF YOUR BOX 
 //    Here we initialize the input 'In' to 0
        bbSetInputActive(true);
@@ -253,38 +254,35 @@ void GeodesicMeshDeformation::bbUserSetDefaultValues()
        backLstCenter.push_back(0);
        backLstCenter.push_back(0);
        backLstCenter.push_back(0);
-       polydata = NULL;
-       quadEdgeMesh = NULL;
-       sCurrent = 0;
-       fmmFilter = NULL;
-       firstTime = true;
+       polydata        = NULL;
+       quadEdgeMesh    = NULL;
+       sCurrent        = 0;
+       fmmFilter       = NULL;
+       firstTime       = true;
 }
+
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
 void GeodesicMeshDeformation::bbUserInitializeProcessing()
 {
-
 //  THE INITIALIZATION METHOD BODY :
 //    Here does nothing 
 //    but this is where you should allocate the internal/output pointers 
-//    if any 
-
-  
+//    if any
 }
+
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
 //===== 
 void GeodesicMeshDeformation::bbUserFinalizeProcessing()
 {
-
 //  THE FINALIZATION METHOD BODY :
 //    Here does nothing 
 //    but this is where you should desallocate the internal/output pointers 
 //    if any
-  
 }
-}
-// EO namespace bbitkvtk
+
+}// EO namespace bbitkvtk
 
 
index e5a325d2d17fa1b9eddae4625fc1e76d0aeb96c5..b8475e92210f2d870b8be5c0aa0f3cd2bd7c5251 100644 (file)
@@ -55,24 +55,27 @@ class bbitkvtk_EXPORT GeodesicMeshDeformation
 };
 
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(GeodesicMeshDeformation,bbtk::AtomicBlackBox);
-BBTK_NAME("GeodesicMeshDeformation");
-BBTK_AUTHOR("InfoDev");
-BBTK_DESCRIPTION("No Description.");
-BBTK_CATEGORY("empty");
-BBTK_INPUT(GeodesicMeshDeformation,Active,"(default true) true/false",bool,"");
-BBTK_INPUT(GeodesicMeshDeformation,TypeIn,"(default 0) 0:Direction  1:Center",int,"");
-BBTK_INPUT(GeodesicMeshDeformation,In,"vtk PolyData",vtkPolyData*,"");
-BBTK_INPUT(GeodesicMeshDeformation,EdgeId,"Edge Id",long,"");
-BBTK_INPUT(GeodesicMeshDeformation,S,"Deformation",double,"");
-BBTK_INPUT(GeodesicMeshDeformation,Center,"[X,Y,Z]",std::vector<double>,"");
-BBTK_INPUT(GeodesicMeshDeformation,Direction,"(default [1,0,0])   [X,Y,Z]",std::vector<double>,"");
-BBTK_OUTPUT(GeodesicMeshDeformation,Out,"double vector output, for output information for other tools",std::vector<double>,"");
+    BBTK_NAME("GeodesicMeshDeformation");
+    BBTK_AUTHOR("InfoDev");
+    BBTK_DESCRIPTION("No Description.");
+    BBTK_CATEGORY("empty");
+
+    BBTK_INPUT(GeodesicMeshDeformation,Active,"(default true) true/false",bool,"");
+    BBTK_INPUT(GeodesicMeshDeformation,TypeIn,"(default 0) 0:Direction  1:Center",int,"");
+    BBTK_INPUT(GeodesicMeshDeformation,In,"vtk PolyData",vtkPolyData*,"");
+    BBTK_INPUT(GeodesicMeshDeformation,EdgeId,"Edge Id",long,"");
+    BBTK_INPUT(GeodesicMeshDeformation,S,"Deformation",double,"");
+    BBTK_INPUT(GeodesicMeshDeformation,Center,"[X,Y,Z]",std::vector<double>,"");
+    BBTK_INPUT(GeodesicMeshDeformation,Direction,"(default [1,0,0])   [X,Y,Z]",std::vector<double>,"");
+
+    BBTK_OUTPUT(GeodesicMeshDeformation,Out,"double vector output, for output information for other tools",std::vector<double>,"");
+
 BBTK_END_DESCRIBE_BLACK_BOX(GeodesicMeshDeformation);
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)
-//===== 
-}
-// EO namespace bbitkvtk
+//=====
+
+}// EO namespace bbitkvtk
 
 #endif // __bbitkvtkGeodesicMeshDeformation_h_INCLUDED__
 
index 4fbdafc40b38ce3055a7b7358269179e1621cb6b..da92f3b281a8ae671ce1a1c48cfa23f0d6053d60 100644 (file)
@@ -223,26 +223,6 @@ printf("EED WARNNING!  PolyDataToActor::DoProcess  which is the default values o
              bbSetOutputOut( vtkactor );
             
             
-/*  /  >>>>
- AAAAA
-            vtkArrowSource *arrow = vtkArrowSource::New();
-            vtkPolyDataNormals *normals = vtkPolyDataNormals::New();
-            normals->SetInputData( bbGetInputIn() );
-            vtkGlyph3D *glyph = vtkGlyph3D::New();
-            glyph->SetInputData(normals->GetOutput() );
-            glyph->SetSourceData(arrow->GetOutput() );
-            glyph->SetVectorModeToUseNormal();
-            glyph->SetScaleModeToScaleByVector();
-            glyph->SetScaleFactor(10);
-            vtkPolyDataMapper *mapper2 = vtkPolyDataMapper::New();
-            mapper2->SetInputData( glyph->GetOutput() );
-            vtkActor *actor2 = vtkActor::New();
-            actor2->SetMapper(mapper2);
-            actor2->GetProperty()->SetColor(1, 0, 0);
-*/
-
-            
-            
              // Interface Update
              if ((actorAdded==false) && (bbGetInputRenderer()!=NULL ))
              {
index ad773c2ff97e0210cf317177051093413ec263aa..fb58558ccb6c27dc3f3814fd4b44194f972f8231 100644 (file)
@@ -39,12 +39,7 @@ void UpdateRender::Process()
     {
         if (bbGetInputRenderer()!=NULL)
         {
-printf("EED UpdateRender::Process  Ojo -----------\n");
             bbGetInputRenderer()->GetRenderWindow()->Render();
-            
-//EED 4 nov 2015 Estelle
-//                     bbGetInputRenderer()->GradientBackgroundOff();
-//                     bbGetInputRenderer()->SetBackground( 0 , 0 , 0 );
         } // Renderer
     } // if Active
 }