2 # ---------------------------------------------------------------------
4 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
6 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
10 # This software is governed by the CeCILL-B license under French law and
11 # abiding by the rules of distribution of free software. You can use,
12 # modify and/ or redistribute the software under the terms of the CeCILL-B
13 # license as circulated by CEA, CNRS and INRIA at the following URL
14 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15 # or in the file LICENSE.txt.
17 # As a counterpart to the access to the source code and rights to copy,
18 # modify and redistribute granted by the license, users are provided only
19 # with a limited warranty and the software's author, the holder of the
20 # economic rights, and the successive licensors have only limited
23 # The fact that you are presently reading this means that you have had
24 # knowledge of the CeCILL-B license and that you accept its terms.
25 # ------------------------------------------------------------------------ */
28 /*=========================================================================
30 Module: $RCSfile: bbvtkMarchingCubes.h,v $
32 Date: $Date: 2012/11/16 08:51:58 $
33 Version: $Revision: 1.10 $
34 =========================================================================*/
37 * \brief Short description in one line
39 * Long description which
40 * can span multiple lines
44 * \brief Pattern for the definition of a new type of Node (header)
47 * \class bbtk::NodePatern
48 * \brief Pattern for the definition of a new type of Node
54 #ifndef __bbvtkMarchingCubes_h_INCLUDED__
55 #define __bbvtkMarchingCubes_h_INCLUDED__
58 #include "bbtkAtomicBlackBox.h"
59 #include "vtkVersion.h"
61 #include "bbtkVtkBlackBoxMacros.h"
62 #include "vtkMarchingCubes.h"
63 #include "vtkImageData.h"
68 //=======================================================================
69 class /*BBTK_EXPORT*/ MarchingCubes
71 public bbtk::AtomicBlackBox
72 // ,public vtkMarchingCubes
74 BBTK_VTK_BLACK_BOX_INTERFACE(MarchingCubes,
78 BBTK_DECLARE_INPUT(Active,bool);
79 BBTK_DECLARE_VTK_INPUT(In,vtkImageData *);
80 BBTK_DECLARE_INPUT(Value,double);
81 BBTK_DECLARE_INPUT(ComputeNormalsOn,bool);
82 BBTK_DECLARE_INPUT(ComputeScalarsOn,bool);
83 BBTK_DECLARE_VTK_OUTPUT(Out,vtkPolyData *);
85 // For the 'Value' parameter, the standard bbtk macro does not work
86 // as vtk Get/Set accessors have a parameter...
87 // BBTK_DECLARE_VTK_PARAM(vtkMarchingCubes,Value,double);
88 // Hence have to wrap the accessors "by hand" :
91 double bbGetInputValue ()
92 { return vtkMarchingCubes::GetValue(0); }
93 void bbSetInputValue (double d)
94 { // vtkMarchingCubes::SetValue(0,d);
96 mVtkObject->SetValue(0,1000.0);
98 std::cout << "EED MarchingCubes::bbSetInputValue " << d << std::endl;
103 // BBTK_VTK_PROCESS();
104 BBTK_PROCESS(Process);
108 //=======================================================================
110 //=======================================================================
111 BBTK_BEGIN_DESCRIBE_BLACK_BOX(MarchingCubes,bbtk::AtomicBlackBox);
112 BBTK_NAME("MarchingCubes");
113 BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
114 BBTK_DESCRIPTION("Extracts an iso-surface of an image using the marching cubes algorithm (bbfication of vtkMarchingCubes) (C++,Python)");
115 BBTK_CATEGORY("image;mesh");
117 BBTK_INPUT(MarchingCubes,Active,"Active true/false (default true)",bool,"");
118 BBTK_INPUT(MarchingCubes,In,"Image",vtkImageData*,"");
119 BBTK_INPUT(MarchingCubes,Value,"(default 400) Value of the iso-surface",double,"");
120 BBTK_INPUT(MarchingCubes,ComputeNormalsOn,"Set the computation of normals",bool,"");
121 BBTK_INPUT(MarchingCubes,ComputeScalarsOn,"Set the computation of scalars",bool,"");
122 BBTK_OUTPUT(MarchingCubes,Out,"Output iso-surface",vtkPolyData*,"");
124 BBTK_END_DESCRIBE_BLACK_BOX(MarchingCubes);
125 //=======================================================================
127 }// EO namespace bbvtk
130 #endif //__bbvtkMarchingCubes_h_INCLUDED__