/home/oan/prosjekt/gotools/segmentation/gpl_distro/lsseg_1.0_gpl/include/cimg_dependent.h

Go to the documentation of this file.
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: cimg_dependent.h                                                    
00037 //                                                                           
00038 // Created: Tue Oct 25 13:22:40 2005                                         
00039 //                                                                           
00040 // Author: Odd A. Andersen <Odd.Andersen@sintef.no>
00041 //                                                                           
00042 // Revision: $Id: cimg_dependent.h,v 1.16 2006/11/25 20:08:24 oan Exp $
00043 //                                                                           
00044 // Description:
00060 //===========================================================================
00061 
00062 #ifndef _CIMG_DEPENDENT_H
00063 #define _CIMG_DEPENDENT_H
00064 
00065 #include "Image.h"
00066 
00067 namespace lsseg {
00068 
00070 struct Pimpl; // class implementation
00072 
00084 void load_image(const char* name, Image<double>& target, bool convert_to_greyscale = false);
00085 
00097 void load_image(const char* name, Image<int>& target, bool convert_to_greyscale = false);
00098 
00104 void save_image(const char* name, const Image<double>& target);
00105 
00112 void display_image(const Image<double>& img, int z = 0);
00113 
00114 
00115 // display and continue program (at the moment, causes memory leak)
00121 void permanent_display(const Image<double>& img);
00122 
00128 void blur_image(Image<double>& img, double rho);
00129 
00136 void blur_1D(double* data, unsigned int data_size, double rho);
00137 
00142 void gaussian_noise(Image<double>& img, double sigma = 0);
00143 
00149 //void display_distribution(const Image<double>& img); @@@
00150 
00151 //===========================================================================
00165 class UpdatableImage
00166 //===========================================================================
00167 {
00168 public:
00174     UpdatableImage(const Image<double>& img, const char* name = 0);
00175 
00177     ~UpdatableImage();
00178 
00186     void update(const Image<double>& img, bool reshape = false);
00187 
00200     void interact(); // user interaction until user leaves control
00201 
00206     void connect(UpdatableImage& rhs);
00207 private:
00210     Pimpl* p_;
00211 };
00212 
00213 }; // end namespace lsseg
00214 
00215 #endif // _CIMG_DEPENDENT_H
00216 

Generated on Tue Nov 28 18:35:47 2006 for lsseg by  doxygen 1.4.7