00001 /*========================================================================= 00002 Program: bbtk 00003 Module: $RCSfile: bbvtkMarchingCubes.h,v $ 00004 Language: C++ 00005 Date: $Date: 2008/10/17 08:18:30 $ 00006 Version: $Revision: 1.7 $ 00007 =========================================================================*/ 00008 00009 /* --------------------------------------------------------------------- 00010 00011 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale) 00012 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux 00013 * 00014 * This software is governed by the CeCILL-B license under French law and 00015 * abiding by the rules of distribution of free software. You can use, 00016 * modify and/ or redistribute the software under the terms of the CeCILL-B 00017 * license as circulated by CEA, CNRS and INRIA at the following URL 00018 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 00019 * or in the file LICENSE.txt. 00020 * 00021 * As a counterpart to the access to the source code and rights to copy, 00022 * modify and redistribute granted by the license, users are provided only 00023 * with a limited warranty and the software's author, the holder of the 00024 * economic rights, and the successive licensors have only limited 00025 * liability. 00026 * 00027 * The fact that you are presently reading this means that you have had 00028 * knowledge of the CeCILL-B license and that you accept its terms. 00029 * ------------------------------------------------------------------------ */ 00030 00047 #ifdef _USE_VTK_ 00048 00049 #ifndef __bbvtkMarchingCubes_h_INCLUDED__ 00050 #define __bbvtkMarchingCubes_h_INCLUDED__ 00051 00052 00053 #include "bbtkAtomicBlackBox.h" 00054 #include "bbtkVtkBlackBoxMacros.h" 00055 #include "vtkMarchingCubes.h" 00056 #include "vtkImageData.h" 00057 00058 namespace bbvtk 00059 { 00060 00061 //======================================================================= 00062 class /*BBTK_EXPORT*/ MarchingCubes 00063 : 00064 public bbtk::AtomicBlackBox, 00065 public vtkMarchingCubes 00066 { 00067 BBTK_VTK_BLACK_BOX_INTERFACE(MarchingCubes, 00068 bbtk::AtomicBlackBox, 00069 vtkMarchingCubes); 00070 00071 BBTK_DECLARE_VTK_INPUT(In,vtkImageData *); 00072 BBTK_DECLARE_VTK_OUTPUT(Out,vtkPolyData *); 00073 00074 // For the 'Value' parameter, the standard bbtk macro does not work 00075 // as vtk Get/Set accessors have a parameter... 00076 // BBTK_DECLARE_VTK_PARAM(vtkMarchingCubes,Value,double); 00077 // Hence have to wrap the accessors "by hand" : 00078 double bbGetInputValue () 00079 { return vtkMarchingCubes::GetValue(0); } 00080 void bbSetInputValue (double d) 00081 { vtkMarchingCubes::SetValue(0,d); } 00082 00083 BBTK_VTK_PROCESS(); 00084 }; 00085 //======================================================================= 00086 00087 //======================================================================= 00088 BBTK_BEGIN_DESCRIBE_BLACK_BOX(MarchingCubes,bbtk::AtomicBlackBox); 00089 BBTK_NAME("MarchingCubes"); 00090 BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr"); 00091 BBTK_DESCRIPTION("Extracts an iso-surface of an image using the marching cubes algorithm (bbfication of vtkMarchingCubes)"); 00092 BBTK_CATEGORY("image;mesh"); 00093 00094 BBTK_INPUT(MarchingCubes,In,"Image",vtkImageData*,""); 00095 BBTK_INPUT(MarchingCubes,Value,"Value of the iso-surface",double,""); 00096 BBTK_OUTPUT(MarchingCubes,Out,"Output iso-surface",vtkPolyData*,""); 00097 00098 BBTK_END_DESCRIBE_BLACK_BOX(MarchingCubes); 00099 //======================================================================= 00100 00101 }// EO namespace bbvtk 00102 00103 00104 #endif //__bbvtkMarchingCubes_h_INCLUDED__ 00105 00106 #endif //_USE_VTK_ 00107
1.5.6