1 /*=========================================================================
4 Module: $RCSfile: bbvtkMarchingCubes.h,v $
6 Date: $Date: 2008/05/07 07:26:51 $
7 Version: $Revision: 1.6 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*//**
18 * \brief Short description in one line
20 * Long description which
21 * can span multiple lines
25 * \brief Pattern for the definition of a new type of Node (header)
28 * \class bbtk::NodePatern
29 * \brief Pattern for the definition of a new type of Node
35 #ifndef __bbvtkMarchingCubes_h_INCLUDED__
36 #define __bbvtkMarchingCubes_h_INCLUDED__
39 #include "bbtkAtomicBlackBox.h"
40 #include "bbtkVtkBlackBoxMacros.h"
41 #include "vtkMarchingCubes.h"
42 #include "vtkImageData.h"
47 //=======================================================================
48 class /*BBTK_EXPORT*/ MarchingCubes
50 public bbtk::AtomicBlackBox,
51 public vtkMarchingCubes
53 BBTK_VTK_BLACK_BOX_INTERFACE(MarchingCubes,
57 BBTK_DECLARE_VTK_INPUT(In,vtkImageData *);
58 BBTK_DECLARE_VTK_OUTPUT(Out,vtkPolyData *);
60 // For the 'Value' parameter, the standard bbtk macro does not work
61 // as vtk Get/Set accessors have a parameter...
62 // BBTK_DECLARE_VTK_PARAM(vtkMarchingCubes,Value,double);
63 // Hence have to wrap the accessors "by hand" :
64 double bbGetInputValue ()
65 { return vtkMarchingCubes::GetValue(0); }
66 void bbSetInputValue (double d)
67 { vtkMarchingCubes::SetValue(0,d); }
71 //=======================================================================
73 //=======================================================================
74 BBTK_BEGIN_DESCRIBE_BLACK_BOX(MarchingCubes,bbtk::AtomicBlackBox);
75 BBTK_NAME("MarchingCubes");
76 BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
77 BBTK_DESCRIPTION("Extracts an iso-surface of an image using the marching cubes algorithm (bbfication of vtkMarchingCubes)");
78 BBTK_CATEGORY("image;mesh");
80 BBTK_INPUT(MarchingCubes,In,"Image",vtkImageData*,"");
81 BBTK_INPUT(MarchingCubes,Value,"Value of the iso-surface",double,"");
82 BBTK_OUTPUT(MarchingCubes,Out,"Output iso-surface",vtkPolyData*,"");
84 BBTK_END_DESCRIBE_BLACK_BOX(MarchingCubes);
85 //=======================================================================
87 }// EO namespace bbvtk
90 #endif //__bbvtkMarchingCubes_h_INCLUDED__