1 /*=========================================================================
4 Module: $RCSfile: bbvtkIsoSurfaceExtractor.h,v $
6 Date: $Date: 2008/04/24 14:11:31 $
7 Version: $Revision: 1.7 $
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
36 #ifndef __vtkIsoSurfaceExtractor_h__
37 #define __vtkIsoSurfaceExtractor_h__
39 #include "vtkImageData.h"
40 #include "vtkRenderer.h"
41 #include "vtkMarchingCubes.h"
42 #include "vtkPolyDataMapper.h"
43 #include "vtkProp3D.h"
47 #include "bbtkAtomicBlackBox.h"
52 class /*BBTK_EXPORT*/ IsoSurfaceExtractor
54 public bbtk::AtomicBlackBox
57 vtkMarchingCubes *marchingcubes;
58 vtkPolyDataMapper *polydatamapper;
62 BBTK_BLACK_BOX_INTERFACE(IsoSurfaceExtractor,bbtk::AtomicBlackBox);
64 BBTK_DECLARE_INPUT(In,vtkImageData *);
65 // BBTK_DECLARE_INPUT(InVtkObject,vtkObject *);
66 BBTK_DECLARE_INPUT(Isovalue,double);
67 BBTK_DECLARE_INPUT(Opacity,double);
68 BBTK_DECLARE_INPUT(Colour,std::vector<double>);
69 BBTK_DECLARE_INPUT(Renderer,vtkRenderer *);
70 BBTK_DECLARE_OUTPUT(Out,vtkProp3D *);
72 BBTK_PROCESS(DoProcess);
76 virtual void bbUserConstructor();
77 virtual void bbUserCopyConstructor();
81 BBTK_BEGIN_DESCRIBE_BLACK_BOX(IsoSurfaceExtractor,bbtk::AtomicBlackBox);
82 BBTK_NAME("IsoSurfaceExtractor");
83 BBTK_AUTHOR("eduardo.davila / laurent.guigues at creatis.insa-lyon.fr");
84 BBTK_DESCRIPTION("Extracts an iso-surface of a 3D image and creates a vtkProp3D object to insert into a 3D scene (e.g. a Viewer3D)");
85 typedef std::vector<double> vectorcolour;
86 BBTK_CATEGORY("3D object creator");
87 BBTK_INPUT(IsoSurfaceExtractor,In,"Input image",vtkImageData*,"");
88 // BBTK_INPUT(IsoSurfaceExtractor,InVtkObject,"Image vtkObject",vtkObject*);
90 BBTK_INPUT(IsoSurfaceExtractor,Isovalue,"Isovalue",double,"");
91 BBTK_INPUT(IsoSurfaceExtractor,Opacity,"Opacity",double,"");
92 BBTK_INPUT(IsoSurfaceExtractor,Colour,"r g b",vectorcolour,"colour");
93 BBTK_INPUT(IsoSurfaceExtractor,Renderer,"3D scene in which to insert the surface",vtkRenderer*,"");
94 BBTK_OUTPUT(IsoSurfaceExtractor,Out,"Extracted iso-surface",vtkProp3D *,"");
96 BBTK_END_DESCRIBE_BLACK_BOX(IsoSurfaceExtractor);
101 #endif //__IsoSurfaceExtractor_h__