]> Creatis software - bbtk.git/commitdiff
Clean code
authorEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 5 Jan 2022 10:07:41 +0000 (11:07 +0100)
committerEduardo DAVILA <davila@creatis.insa-lyon.fr>
Wed, 5 Jan 2022 10:07:41 +0000 (11:07 +0100)
kernel/src/bbtkBlackBox.cxx
packages/vtk/src/bbvtkMetaImageWriter.cxx

index 4b000f0e65acf32f76f242175a99c702252436b0..8e233d6ae997c9fede454c1599c81cf3442c5991 100644 (file)
@@ -748,9 +748,9 @@ namespace bbtk
                           ( (bbBoxProcessModeIsManual()==true)&&(bbLetRecursiveExecuteManualMode==true) ) 
                         )
                        {
-//printf("EED BlackBox::bbRecursiveExecute bbProcess start %s \n", bbGetFullName().c_str() );
+// printf("EED BlackBox::bbRecursiveExecute bbProcess start %s \n", bbGetFullName().c_str() );
                                this->bbProcess();              
-//printf("EED BlackBox::bbRecursiveExecute bbProcess end %s \n", bbGetFullName().c_str() );
+// printf("EED BlackBox::bbRecursiveExecute bbProcess end %s \n", bbGetFullName().c_str() );
                    } // Manual analysis
                  
 //EED ups                      if ((bbBoxProcessModeIsManual()==true) && (bbLetRecursiveExecuteManualMode==false))
index f17001ef72b3135a56044875f53de0fb55e75fde..17bef1515754ff66102962c1fc199e43a6462e05 100644 (file)
@@ -30,12 +30,12 @@ void MetaImageWriter::Save_mhdb( std::string filename  , vtkImageData* img ,int
        int elementType=img->GetScalarType();
        
        img->GetExtent(ext);
-       dim[0]=ext[1]-ext[0]+1;
-       dim[1]=ext[3]-ext[2]+1;
-       dim[2]=ext[5]-ext[4]+1; 
-       int bsx=ceil((double)dim[0]/(double)sizeB);
-       int bsy=ceil((double)dim[1]/(double)sizeB);
-       int bsz=ceil((double)dim[2]/(double)sizeB);
+       dim[0]  = ext[1]-ext[0]+1;
+       dim[1]  = ext[3]-ext[2]+1;
+       dim[2]  = ext[5]-ext[4]+1;
+       int bsx = ceil((double)dim[0]/(double)sizeB);
+       int bsy = ceil((double)dim[1]/(double)sizeB);
+       int bsz = ceil((double)dim[2]/(double)sizeB);
        int voi[6];
        std::string filenameBlock;      
        std::string filenameBlockVti;   
@@ -61,12 +61,12 @@ void MetaImageWriter::Save_mhdb( std::string filename  , vtkImageData* img ,int
                {
                        for (k=0;k<bsz;k++)
                        {
-                               voi[0]=i*sizeB;
-                               voi[1]=voi[0]+(sizeB-1);
-                               voi[2]=j*sizeB;
-                               voi[3]=voi[2]+(sizeB-1);
-                               voi[4]=k*sizeB;
-                               voi[5]=voi[4]+(sizeB-1);
+                               voi[0]  = i*sizeB;
+                               voi[1]  = voi[0]+(sizeB-1);
+                               voi[2]  = j*sizeB;
+                               voi[3]  = voi[2]+(sizeB-1);
+                               voi[4]  = k*sizeB;
+                               voi[5]  = voi[4]+(sizeB-1);
                                if (voi[1]>=dim[0]) { voi[1]=dim[0]-1; } 
                                if (voi[3]>=dim[1]) { voi[3]=dim[1]-1; } 
                                if (voi[5]>=dim[2]) { voi[5]=dim[2]-1; } 
@@ -95,7 +95,7 @@ void MetaImageWriter::Save_mhdb( std::string filename  , vtkImageData* img ,int
                                writer->SetInputData( bbGetInputIn() );
                                writer->Write();
 */
-                               
+    
                                extract->Delete();
                        } // for k
                } // for j
@@ -109,9 +109,6 @@ void MetaImageWriter::Save_mhdb( std::string filename  , vtkImageData* img ,int
 //===== 
 void MetaImageWriter::Process()
 {
-
-printf("EED vtkMetaImageWriter::Process  START\n");  
-
 // THE MAIN PROCESSING METHOD BODY
 //   Here we simply set the input 'In' value to the output 'Out'
 //   And print out the output value
@@ -156,8 +153,8 @@ printf("EED vtkMetaImageWriter::Process  START\n");
                                 w->Delete();
                } // .mhdb
        } // bbGetInputIn()!=NULL
-printf("EED vtkMetaImageWriter::Process  END\n");  
 }
+
 //===== 
 // 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)
 //===== 
@@ -169,32 +166,29 @@ void MetaImageWriter::bbUserSetDefaultValues()
    bbSetInputCompression(false);
    bbSetInputSizeBlock(20);  
 }
+
 //===== 
 // 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 MetaImageWriter::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 MetaImageWriter::bbUserFinalizeProcessing()
 {
-
 //  THE FINALIZATION METHOD BODY :
 //    Here does nothing 
 //    but this is where you should desallocate the internal/output pointers 
 //    if any
-  
-}
 }
-// EO namespace bbvtk
+
+} // EO namespace bbvtk