/*========================================================================= Program: bbtk Module: $RCSfile: bbvtkIsoSurfaceExtractor.h,v $ Language: C++ Date: $Date: 2008/05/09 10:39:47 $ Version: $Revision: 1.8 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the above copyright notices for more information. =========================================================================*//** * \brief Short description in one line * * Long description which * can span multiple lines */ /** * \file * \brief Pattern for the definition of a new type of Node (header) */ /** * \class bbtk::NodePatern * \brief Pattern for the definition of a new type of Node */ #ifdef _USE_VTK_ #ifndef __vtkIsoSurfaceExtractor_h__ #define __vtkIsoSurfaceExtractor_h__ #include "vtkImageData.h" #include "vtkRenderer.h" #include "vtkMarchingCubes.h" #include "vtkPolyDataMapper.h" #include "vtkProp3D.h" #include "vtkActor.h" #include #include "bbtkAtomicBlackBox.h" namespace bbvtk { class /*BBTK_EXPORT*/ IsoSurfaceExtractor : public bbtk::AtomicBlackBox { bool firsttime; vtkMarchingCubes *marchingcubes; vtkPolyDataMapper *polydatamapper; vtkActor *vtkactor; BBTK_BLACK_BOX_INTERFACE(IsoSurfaceExtractor,bbtk::AtomicBlackBox); BBTK_DECLARE_INPUT(In,vtkImageData *); // BBTK_DECLARE_INPUT(InVtkObject,vtkObject *); BBTK_DECLARE_INPUT(Isovalue,double); BBTK_DECLARE_INPUT(Opacity,double); BBTK_DECLARE_INPUT(Colour,std::vector); BBTK_DECLARE_INPUT(Renderer,vtkRenderer *); BBTK_DECLARE_OUTPUT(Out,vtkProp3D *); BBTK_PROCESS(DoProcess); void DoProcess(); protected: virtual void bbUserConstructor(); virtual void bbUserCopyConstructor(); virtual void bbUserDestructor(); void Init(); }; BBTK_BEGIN_DESCRIBE_BLACK_BOX(IsoSurfaceExtractor,bbtk::AtomicBlackBox); BBTK_NAME("IsoSurfaceExtractor"); BBTK_AUTHOR("eduardo.davila / laurent.guigues at creatis.insa-lyon.fr"); 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)"); typedef std::vector vectorcolour; BBTK_CATEGORY("3D object creator"); BBTK_INPUT(IsoSurfaceExtractor,In,"Input image",vtkImageData*,""); // BBTK_INPUT(IsoSurfaceExtractor,InVtkObject,"Image vtkObject",vtkObject*); BBTK_INPUT(IsoSurfaceExtractor,Isovalue,"Isovalue",double,""); BBTK_INPUT(IsoSurfaceExtractor,Opacity,"Opacity",double,""); BBTK_INPUT(IsoSurfaceExtractor,Colour,"r g b",vectorcolour,"colour"); BBTK_INPUT(IsoSurfaceExtractor,Renderer,"3D scene in which to insert the surface",vtkRenderer*,""); BBTK_OUTPUT(IsoSurfaceExtractor,Out,"Extracted iso-surface",vtkProp3D *,""); BBTK_END_DESCRIBE_BLACK_BOX(IsoSurfaceExtractor); }// EO namespace bbtk #endif //__IsoSurfaceExtractor_h__ #endif //_USE_VTK_