From: Eduardo DAVILA Date: Mon, 2 Jan 2023 16:25:22 +0000 (+0100) Subject: Clean code X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=1f02c907e7c2de4566fcd051941e35d93a614dcd;p=bbtk.git Clean code --- diff --git a/packages/vtk/src/bbvtkImageGaussianSmooth.xml b/packages/vtk/src/bbvtkImageGaussianSmooth.xml index 9daabbd..780c20a 100644 --- a/packages/vtk/src/bbvtkImageGaussianSmooth.xml +++ b/packages/vtk/src/bbvtkImageGaussianSmooth.xml @@ -20,11 +20,18 @@
-    bbGetVtkObject()->SetStandardDeviation(bbGetInputStdDevX(), 
+    bbGetVtkObject()->SetStandardDeviation(bbGetInputStdDevX(),
                      			bbGetInputStdDevY(), 
                      			bbGetInputStdDevZ());
     bbGetVtkObject()->Modified();
     bbGetVtkObject()->Update();
+    if (bbGetInputIn()==NULL)
+    {
+        printf("EED ImageGaussianSmooth  This mechanism is not working, try to use box ImageGaussianSmooth2.\n");
+        bbSetOutputOut(NULL);
+    } else {
+        bbSetOutputOut( bbGetVtkObject()->GetOutput() );
+    }
 
diff --git a/packages/vtk/src/bbvtkMarchingCubes.cxx b/packages/vtk/src/bbvtkMarchingCubes.cxx index 48272ac..c82ca61 100644 --- a/packages/vtk/src/bbvtkMarchingCubes.cxx +++ b/packages/vtk/src/bbvtkMarchingCubes.cxx @@ -56,21 +56,18 @@ namespace bbvtk if (bbGetInputActive()==true) { bbGetVtkObject()->SetValue(0, bbGetInputValue() ); - if(bbGetInputComputeNormalsOn()) { bbGetVtkObject()->ComputeNormalsOn(); }else { bbGetVtkObject()->ComputeNormalsOff(); }// if Normals - if(bbGetInputComputeScalarsOn()) { bbGetVtkObject()->ComputeScalarsOn(); }else{ bbGetVtkObject()->ComputeScalarsOff(); }// if Scalars - bbGetVtkObject()->Update(); } // Active } @@ -97,10 +94,7 @@ namespace bbvtk BBTK_VTK_FINALIZE_PROCESSING(); } - } // EO namespace bbvtk - - #endif //_USE_VTK_ diff --git a/packages/vtk/src/bbvtkMarchingCubes.h b/packages/vtk/src/bbvtkMarchingCubes.h index 4c235f9..011834a 100644 --- a/packages/vtk/src/bbvtkMarchingCubes.h +++ b/packages/vtk/src/bbvtkMarchingCubes.h @@ -116,7 +116,7 @@ namespace bbvtk BBTK_INPUT(MarchingCubes,Active,"Active true/false (default true)",bool,""); BBTK_INPUT(MarchingCubes,In,"Image",vtkImageData*,""); - BBTK_INPUT(MarchingCubes,Value,"Value of the iso-surface",double,""); + BBTK_INPUT(MarchingCubes,Value,"(default 400) Value of the iso-surface",double,""); BBTK_INPUT(MarchingCubes,ComputeNormalsOn,"Set the computation of normals",bool,""); BBTK_INPUT(MarchingCubes,ComputeScalarsOn,"Set the computation of scalars",bool,""); BBTK_OUTPUT(MarchingCubes,Out,"Output iso-surface",vtkPolyData*,"");