]> Creatis software - bbtk.git/blob - packages/vtk/src/bbvtkMarchingCubes.h
3e7c4a6cc9f18ae44449626fa4dd421a55a51fcf
[bbtk.git] / packages / vtk / src / bbvtkMarchingCubes.h
1 /*
2  # ---------------------------------------------------------------------
3  #
4  # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5  #                        pour la SantÈ)
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
9  #
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.
16  #
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
21  #  liability.
22  #
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  # ------------------------------------------------------------------------ */
26
27
28 /*=========================================================================
29   Program:   bbtk
30   Module:    $RCSfile: bbvtkMarchingCubes.h,v $
31   Language:  C++
32   Date:      $Date: 2012/11/16 08:51:58 $
33   Version:   $Revision: 1.10 $
34 =========================================================================*/
35
36 /**
37  * \brief Short description in one line
38  * 
39  * Long description which 
40  * can span multiple lines
41  */
42 /**
43  * \file 
44  * \brief Pattern for the definition of a new type of Node (header)
45  */
46 /**
47  * \class bbtk::NodePatern 
48  * \brief Pattern for the definition of a new type of Node 
49  */
50
51
52 #ifdef _USE_VTK_
53
54 #ifndef __bbvtkMarchingCubes_h_INCLUDED__
55 #define __bbvtkMarchingCubes_h_INCLUDED__
56
57
58 #include "bbtkAtomicBlackBox.h"
59 #include "vtkVersion.h"
60
61 #include "bbtkVtkBlackBoxMacros.h"
62 #include "vtkMarchingCubes.h"
63 #include "vtkImageData.h"
64
65 namespace bbvtk
66 {
67
68    //=======================================================================
69   class /*BBTK_EXPORT*/ MarchingCubes
70     : 
71     public bbtk::AtomicBlackBox 
72 //    ,public vtkMarchingCubes
73   {
74     BBTK_VTK_BLACK_BOX_INTERFACE(MarchingCubes,
75                                  bbtk::AtomicBlackBox,
76                                  vtkMarchingCubes);
77
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 *);
84
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" :
89           
90          /* 
91     double bbGetInputValue ()
92        { return vtkMarchingCubes::GetValue(0); }
93     void bbSetInputValue (double d)     
94        { // vtkMarchingCubes::SetValue(0,d);
95                    
96                    mVtkObject->SetValue(0,1000.0);
97
98                    std::cout <<  "EED MarchingCubes::bbSetInputValue " << d << std::endl;
99            
100            }
101 */
102           
103           
104   // BBTK_VTK_PROCESS();
105           BBTK_PROCESS(Process);
106           void Process();
107
108   };
109   //=======================================================================
110   
111   //=======================================================================
112   BBTK_BEGIN_DESCRIBE_BLACK_BOX(MarchingCubes,bbtk::AtomicBlackBox);
113   BBTK_NAME("MarchingCubes");
114   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
115   BBTK_DESCRIPTION("Extracts an iso-surface of an image using the marching cubes algorithm (bbfication of vtkMarchingCubes)");
116   BBTK_CATEGORY("image;mesh");
117
118   BBTK_INPUT(MarchingCubes,Active,"Active true/false (default true)",bool,"");
119   BBTK_INPUT(MarchingCubes,In,"Image",vtkImageData*,"");
120   BBTK_INPUT(MarchingCubes,Value,"Value of the iso-surface",double,"");
121   BBTK_INPUT(MarchingCubes,ComputeNormalsOn,"Set the computation of normals",bool,"");
122   BBTK_INPUT(MarchingCubes,ComputeScalarsOn,"Set the computation of scalars",bool,"");
123   BBTK_OUTPUT(MarchingCubes,Out,"Output iso-surface",vtkPolyData*,"");
124   
125   BBTK_END_DESCRIBE_BLACK_BOX(MarchingCubes);
126   //=======================================================================
127
128 }// EO namespace bbvtk
129
130
131 #endif  //__bbvtkMarchingCubes_h_INCLUDED__
132
133 #endif //_USE_VTK_
134