The Machine Perception Toolbox

[Introduction]- [News]- [Download]- [Screenshots]- [Manual (pdf)]- [Forums]- [API Reference]- [Repository ]

 

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

roi.cc

Go to the documentation of this file.
00001 /*
00002  * roi.cc
00003  *
00004  * Copyright (c) 2002 Machine Perception Laboratory
00005  * University of California San Diego.
00006  * Please read the disclaimer and notes about redistribution
00007  * at the end of this file.
00008  *
00009  * Authors: Ian Fasel
00010  */
00011 
00012 #include "roi.h"
00013 
00014 ROI::ROI(int min_x, int max_x, int min_y, int max_y, int min_scale, int max_scale) :
00015           m_min_x(min_x), m_max_x(max_x), m_min_y(min_y), m_max_y(max_y),
00016            m_min_scale(min_scale), m_max_scale(max_scale){}
00017 
00018 void ROI::reset(){
00019   m_min_x=MIN_RANGE; m_max_x=MAX_RANGE; m_min_y=MIN_RANGE; m_max_y=MAX_RANGE; m_min_scale=MIN_RANGE; m_max_scale=MAX_RANGE;}
00020 
00021 ROI& ROI::operator=(const ROI &roi){
00022   if(&roi != this){
00023     m_min_x = roi.m_min_x; m_max_x = roi.m_max_x; m_min_y = roi.m_min_y; m_max_y = roi.m_max_y;
00024     m_min_scale = roi.m_min_scale; m_max_scale = roi.m_max_scale; m_limit_scale = roi.m_limit_scale;
00025     vmin_x = roi.vmin_x; vmin_y = roi.vmin_y; vmax_x = roi.vmax_x; vmax_y=roi.vmax_y;
00026   }
00027   return *this;
00028 }
00029 
00030 
00031 //#ifndef WIN32
00032 ostream& operator<< (ostream& s, const ROI& roi){
00033   s << "ROI: (";
00034   s << "minx=" << roi.m_min_x << ", maxx=" << roi.m_max_x << ", ";
00035   s << "miny=" << roi.m_min_y << ", maxy=" << roi.m_max_y << ", ";
00036   s << "minscale=" << roi.m_min_scale << ", maxscale=" << roi.m_max_scale;
00037   s << ")";
00038   //  for(unsigned int i=0; i< roi.vmin_x.size(); ++ i){
00039   //  s << endl << "At scale " << i << ": ";
00040   //  s << "minx=" << roi.vmin_x[i] << ", maxx=" << roi.vmax_x[i] << ", ";
00041   //  s << "miny=" << roi.vmin_y[i] << ", maxy=" << roi.vmax_y[i] << ", ";
00042   // }
00043   return s;
00044 }
00045 //#endif
00046 
00047 /*
00048  *
00049  * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
00050  * 
00051  *    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
00052  *    2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
00053  *    3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
00054  * 
00055  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
00056  * 
00057  */

Generated on Mon Nov 8 17:07:51 2004 for MPT by  doxygen 1.3.9.1