]> Creatis software - bbtk.git/blobdiff - packages/vtk/src/bbvtkMarchingCubes.cxx
#3008 BBTK Feature New Normal - Active option in box vtk::IsoSurfaceExtractor
[bbtk.git] / packages / vtk / src / bbvtkMarchingCubes.cxx
index 972c72f5d696c03abccfd0a0af810c98c9fa12a7..83f9b4d0eec2a8a3614255c86df2adde1c059270 100644 (file)
@@ -53,23 +53,33 @@ namespace bbvtk
 
        void MarchingCubes::Process()
        {
-               bbGetVtkObject()->SetValue(0, bbGetInputValue() );
-               if(bbGetInputComputeNormalsOn())
-                       bbGetVtkObject()->ComputeNormalsOn();
-               else
-                       bbGetVtkObject()->ComputeNormalsOff();
-
-               if(bbGetInputComputeScalarsOn())
-                       bbGetVtkObject()->ComputeScalarsOn();
-               else
-                       bbGetVtkObject()->ComputeScalarsOff();
-               bbGetVtkObject()->Update();             
+               if (bbGetInputActive()==true)
+               {
+                       bbGetVtkObject()->SetValue(0, bbGetInputValue() );
+
+                       if(bbGetInputComputeNormalsOn()) 
+                       {
+                               bbGetVtkObject()->ComputeNormalsOn();
+                       }else {
+                               bbGetVtkObject()->ComputeNormalsOff();
+                       }
+
+                       if(bbGetInputComputeScalarsOn())
+                       {
+                               bbGetVtkObject()->ComputeScalarsOn();
+                       }else{
+                               bbGetVtkObject()->ComputeScalarsOff();
+                       }
+
+                       bbGetVtkObject()->Update();             
+               }
        }
        
        //-----------------------------------------------------------------     
        void MarchingCubes::bbUserSetDefaultValues()
        {
                 BBTK_VTK_SET_DEFAULT_VALUES();
+               bbSetInputActive(true);
                bbSetInputValue(400);
                bbSetInputComputeNormalsOn(true);
                bbSetInputComputeScalarsOn(true);