00001 //=========================================================================== 00002 // The Level-Set Segmentation Library (LSSEG) 00003 // 00004 // 00005 // Copyright (C) 2000-2005 SINTEF ICT, Applied Mathematics, Norway. 00006 // 00007 // This program is free software; you can redistribute it and/or 00008 // modify it under the terms of the GNU General Public License 00009 // as published by the Free Software Foundation version 2 of the License. 00010 // 00011 // This program is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 // GNU General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU General Public License 00017 // along with this program; if not, write to the Free Software 00018 // Foundation, Inc., 00019 // 59 Temple Place - Suite 330, 00020 // Boston, MA 02111-1307, USA. 00021 // 00022 // Contact information: e-mail: tor.dokken@sintef.no 00023 // SINTEF ICT, Department of Applied Mathematics, 00024 // P.O. Box 124 Blindern, 00025 // 0314 Oslo, Norway. 00026 // 00027 // 00028 // Other licenses are also available for this software, notably licenses 00029 // for: 00030 // - Building commercial software. 00031 // - Building software whose source code you wish to keep private. 00032 // 00033 //=========================================================================== 00034 //=========================================================================== 00035 // 00036 // File: LIC.h 00037 // 00038 // Created: Mon Apr 24 17:21:25 2006 00039 // 00040 // Author: Odd A. Andersen <Odd.Andersen@sintef.no> 00041 // 00042 // Revision: $Id: LIC.h,v 1.7 2006/11/20 03:56:25 oan Exp $ 00043 // 00044 // Description: line integral convolution 00048 //=========================================================================== 00049 00050 #ifndef _LIC_H 00051 #define _LIC_H 00052 00053 #include "Image.h" 00054 00055 namespace lsseg { 00056 00057 //=========================================================================== 00084 void LIC_2D_FS(const Image<double>& src, 00085 const Image<double>& vec, 00086 Image<double>& target, 00087 double (*kernel_func)(double), 00088 const double dl = 0.8, // steplength 00089 const double L = 10); // total length along which to integrate 00090 //=========================================================================== 00091 00092 00093 //=========================================================================== 00120 void LIC_3D_FS(const Image<double>& src, 00121 const Image<double>& vec, 00122 Image<double>& target, 00123 double (*kernel_func)(double), 00124 const double dl = 0.8, // steplength 00125 const double L = 10); // total length along which to integrate 00126 //=========================================================================== 00127 00128 00129 // NB: The below two functions were written along the lines of the paper 00130 // "Imaging Vector Fields Using Line Integral Convolution" (Cabral). However, 00131 // even though the adaptive steplength is likely to allow for a more accurate 00132 // tracing of stream lines, there have been cases where the tracing "gets stuck" 00133 // in a cycle of 4 cells. A quick fix for this has not been found. Moreover, 00134 // the accuracy of the steplength might not be needed for our purposes, which is 00135 // smoothing of images. Therefore, the above two functions should be used instead. 00136 // The two functions below are however kept for future reference. 00137 // NB! The vector field is here specified directly by its x, y, and z coordinate ('vec') 00138 //=========================================================================== 00139 00140 00141 00142 //=========================================================================== 00174 void LIC_2D(const Image<double>& src, 00175 const Image<double>& vec, 00176 Image<double>& target, 00177 double (*kernel_func)(double), 00178 const double L = 10); // parametric length in each direction 00179 //=========================================================================== 00180 00181 00182 //=========================================================================== 00214 void LIC_3D(const Image<double>& src, 00215 const Image<double>& vec, 00216 Image<double>& target, 00217 double (*kernel_func)(double), 00218 const double L = 10); // parametric length in each direction 00219 //=========================================================================== 00220 00221 } // end namespace lsseg 00222 00223 #endif // _LIC_H