cvd/brezenham.h

00001 /*                       
00002     This file is part of the CVD Library.
00003 
00004     Copyright (C) 2005 The Authors
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Lesser General Public
00008     License as published by the Free Software Foundation; either
00009     version 2.1 of the License, or (at your option) any later version.
00010 
00011     This library 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 GNU
00014     Lesser General Public License for more details.
00015 
00016     You should have received a copy of the GNU Lesser General Public
00017     License along with this library; if not, write to the Free Software
00018     Foundation, Inc., 
00019     51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020 */
00021 #ifndef __BREZENHAM_H
00022 #define __BREZENHAM_H
00023 
00024 #include <TooN/TooN.h>
00025 #include <cvd/image_ref.h>
00026 
00027 namespace CVD {
00028 
00029 
00037 class Brezenham {
00038  public:
00041   Brezenham(TooN::Vector<2> dir);
00042 
00044   ImageRef step();
00045 
00046  private:
00047   double residual;
00048   double val1;
00049   double val2;
00050   ImageRef step1;
00051   ImageRef step2;
00052 };
00053 
00054 
00061 class Brezenham8 {
00062  public:
00065   Brezenham8(TooN::Vector<2> dir);
00066 
00068   ImageRef step();
00069 
00074   ImageRef sideways() {return my_sideways;}
00075 
00076  private:
00077   double residual;
00078   double val1;
00079   double val2;
00080   ImageRef step1;
00081   ImageRef step2;
00082   ImageRef my_sideways;
00083 };
00084 
00085 }
00086 
00087 #endif

Generated on Wed Feb 18 10:23:00 2009 for CVD by  doxygen 1.5.3