From 31b557c339a6fc1b95eb6cd7012af9a2fe59e45d Mon Sep 17 00:00:00 2001 From: Ricardo A Corredor Date: Fri, 4 Jan 2013 15:00:55 +0100 Subject: [PATCH] Adds parameters to vtkMarchingCubes bbox --- packages/vtk/src/bbvtkMarchingCubes.cxx | 11 +++++++++++ packages/vtk/src/bbvtkMarchingCubes.h | 4 ++++ 2 files changed, 15 insertions(+) diff --git a/packages/vtk/src/bbvtkMarchingCubes.cxx b/packages/vtk/src/bbvtkMarchingCubes.cxx index ebadda0..972c72f 100644 --- a/packages/vtk/src/bbvtkMarchingCubes.cxx +++ b/packages/vtk/src/bbvtkMarchingCubes.cxx @@ -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); } //----------------------------------------------------------------- diff --git a/packages/vtk/src/bbvtkMarchingCubes.h b/packages/vtk/src/bbvtkMarchingCubes.h index 083e34b..e2f440c 100644 --- a/packages/vtk/src/bbvtkMarchingCubes.h +++ b/packages/vtk/src/bbvtkMarchingCubes.h @@ -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); -- 2.47.1