]> Creatis software - bbtk.git/commitdiff
Adds parameters to vtkMarchingCubes bbox
authorRicardo A Corredor <Ricardo.Corredor@creatis.insa-lyon.fr>
Fri, 4 Jan 2013 14:00:55 +0000 (15:00 +0100)
committerRicardo A Corredor <Ricardo.Corredor@creatis.insa-lyon.fr>
Fri, 4 Jan 2013 14:00:55 +0000 (15:00 +0100)
packages/vtk/src/bbvtkMarchingCubes.cxx
packages/vtk/src/bbvtkMarchingCubes.h

index ebadda0e286a5e67c68cb5a38d9b8f83f21ea33f..972c72f5d696c03abccfd0a0af810c98c9fa12a7 100644 (file)
@@ -54,6 +54,15 @@ 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();             
        }
        
@@ -62,6 +71,8 @@ namespace bbvtk
        {
                 BBTK_VTK_SET_DEFAULT_VALUES();
                bbSetInputValue(400);
+               bbSetInputComputeNormalsOn(true);
+               bbSetInputComputeScalarsOn(true);
        }
        
        //-----------------------------------------------------------------     
index 083e34b4245228244107c1a1919e8714f9266771..e2f440c0b3ac90ea31a41d1225883dc5113ea369 100644 (file)
@@ -75,6 +75,8 @@ namespace bbvtk
 
     BBTK_DECLARE_VTK_INPUT(In,vtkImageData *);
        BBTK_DECLARE_INPUT(Value,double);
+       BBTK_DECLARE_INPUT(ComputeNormalsOn,bool);
+       BBTK_DECLARE_INPUT(ComputeScalarsOff,bool);
     BBTK_DECLARE_VTK_OUTPUT(Out,vtkPolyData *);
 
     // For the 'Value' parameter, the standard bbtk macro does not work 
@@ -112,6 +114,8 @@ namespace bbvtk
 
   BBTK_INPUT(MarchingCubes,In,"Image",vtkImageData*,"");
   BBTK_INPUT(MarchingCubes,Value,"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*,"");
   
   BBTK_END_DESCRIBE_BLACK_BOX(MarchingCubes);