latest version v1.9 - last update 10 Apr 2010 |
00001 /* 00002 * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 00003 * Lehrstuhl fuer Technische Informatik, RWTH-Aachen, Germany 00004 * 00005 * This file is part of the LTI-Computer Vision Library (LTI-Lib) 00006 * 00007 * The LTI-Lib is free software; you can redistribute it and/or 00008 * modify it under the terms of the GNU Lesser General Public License (LGPL) 00009 * as published by the Free Software Foundation; either version 2.1 of 00010 * the License, or (at your option) any later version. 00011 * 00012 * The LTI-Lib is distributed in the hope that it will be 00013 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty 00014 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU Lesser General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU Lesser General Public 00018 * License along with the LTI-Lib; see the file LICENSE. If 00019 * not, write to the Free Software Foundation, Inc., 59 Temple Place - 00020 * Suite 330, Boston, MA 02111-1307, USA. 00021 */ 00022 00023 00024 /*---------------------------------------------------------------- 00025 * project ....: LTI Digital Image/Signal Processing Library 00026 * file .......: ltiTypes.h 00027 * authors ....: Pablo Alvarado 00028 * organization: LTI, RWTH Aachen 00029 * creation ...: 31.3.99 00030 * revisions ..: $Id: ltiTypes.h,v 1.5 2006/02/07 18:10:59 ltilib Exp $ 00031 */ 00032 00033 #ifndef _LTI_TYPES_H 00034 #define _LTI_TYPES_H 00035 00036 #include "ltiConfig.h" 00037 00038 /** 00039 * @file ltiTypes.h 00040 * This file contains the definitions of the basic types used in the LTI-Lib. 00041 * 00042 * Some types are redefined to compensate the lack of specification in 00043 * the C++ Standard about the byte length of the standard types int, 00044 * char, float, etc. In this way an uint32 uses always four bytes, 00045 * uint16 uses two bytes and so on. 00046 * 00047 * The defined basic types are: 00048 * - lti::ubyte (1 byte unsigned) 00049 * - lti::byte (1 byte signed) 00050 * - lti::uint16 (2 byte unsigned) 00051 * - lti::int16 (2 byte signed) 00052 * - lti::uint32 (4 byte unsigned) 00053 * - lti::int32 (4 byte signed) 00054 * - lti::uint64 (8 byte unsigned) 00055 * - lti::int64 (8 byte signed) 00056 * - lti::sreal (4 byte floating point) 00057 * - lti::dreal (8 byte floating point) 00058 */ 00059 00060 namespace lti { 00061 /** 00062 * 8-bit unsigned type (0..255) 00063 */ 00064 typedef unsigned _LTI_BYTE ubyte; 00065 00066 /** 00067 * 8-bit signed type (-128..127) 00068 */ 00069 typedef signed _LTI_BYTE byte; 00070 00071 /** 00072 * 16-bit unsigned type (0..65535) 00073 */ 00074 typedef unsigned _LTI_WORD16 uint16; 00075 00076 /** 00077 * 16-bit signed type (-32768..32767) 00078 */ 00079 typedef signed _LTI_WORD16 int16; 00080 00081 /** 00082 * 32-bit unsigned type (0..(2^32)-1) 00083 */ 00084 typedef unsigned _LTI_WORD32 uint32; 00085 00086 /** 00087 * 32-bit signed type (-(2^31)..(2^31-1)) 00088 */ 00089 typedef signed _LTI_WORD32 int32; 00090 00091 /** 00092 * 64-bit unsigned type (0..(2^64)-1) 00093 */ 00094 typedef unsigned _LTI_WORD64 uint64; 00095 00096 /** 00097 * 64-bit signed type (-(2^63)..(2^63-1)) 00098 */ 00099 typedef signed _LTI_WORD64 int64; 00100 00101 /** 00102 * 32-bit floating point type 00103 */ 00104 typedef float sreal; 00105 00106 /** 00107 * 64-bit floating point type 00108 */ 00109 typedef double dreal; 00110 00111 const int32 MinInt32 = -0x7fffffff; 00112 const int32 MaxInt32 = +0x7fffffff; 00113 00114 const int32 MinInt24 = -0x00800000; 00115 const int32 MaxInt24 = +0x007fffff; 00116 00117 } 00118 00119 #endif