[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

vigra/utilities.hxx |

    00001 /************************************************************************/
    00002 /*                                                                      */
    00003 /*               Copyright 1998-2002 by Ullrich Koethe                  */
    00004 /*                                                                      */
    00005 /*    This file is part of the VIGRA computer vision library.           */
    00006 /*    The VIGRA Website is                                              */
    00007 /*        http://hci.iwr.uni-heidelberg.de/vigra/                       */
    00008 /*    Please direct questions, bug reports, and contributions to        */
    00009 /*        ullrich.koethe@iwr.uni-heidelberg.de    or                    */
    00010 /*        vigra@informatik.uni-hamburg.de                               */
    00011 /*                                                                      */
    00012 /*    Permission is hereby granted, free of charge, to any person       */
    00013 /*    obtaining a copy of this software and associated documentation    */
    00014 /*    files (the "Software"), to deal in the Software without           */
    00015 /*    restriction, including without limitation the rights to use,      */
    00016 /*    copy, modify, merge, publish, distribute, sublicense, and/or      */
    00017 /*    sell copies of the Software, and to permit persons to whom the    */
    00018 /*    Software is furnished to do so, subject to the following          */
    00019 /*    conditions:                                                       */
    00020 /*                                                                      */
    00021 /*    The above copyright notice and this permission notice shall be    */
    00022 /*    included in all copies or substantial portions of the             */
    00023 /*    Software.                                                         */
    00024 /*                                                                      */
    00025 /*    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND    */
    00026 /*    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES   */
    00027 /*    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND          */
    00028 /*    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT       */
    00029 /*    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,      */
    00030 /*    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING      */
    00031 /*    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR     */
    00032 /*    OTHER DEALINGS IN THE SOFTWARE.                                   */
    00033 /*                                                                      */
    00034 /************************************************************************/
    00035
    00036
    00037 #ifndef VIGRA_BASICS_HXX
    00038 #define VIGRA_BASICS_HXX
    00039
    00040 #include "config.hxx"
    00041 #include "error.hxx"
    00042 #include "metaprogramming.hxx"
    00043 #include "tuple.hxx"
    00044 #include "diff2d.hxx"
    00045 #include "mathutil.hxx"
    00046 #include <string>
    00047 #include <sstream>
    00048
    00049 namespace vigra {
    00050
    00051 /** Convert a value to a string. Available for integral and floating point types
    00052     and void *.
    00053 */
    00054 doxygen_overloaded_function(template <class T> std::string asString(T t))
    00055
    00056 #define VIGRA_AS_STRING(T) \
    00057 inline std::string asString(T t) \
    00058 { \
    00059     std::stringstream s; \
    00060     s << t; \
    00061     return s.str(); \
    00062 }
    00063
    00064 VIGRA_AS_STRING(bool)
    00065 VIGRA_AS_STRING(signed char)
    00066 VIGRA_AS_STRING(unsigned char)
    00067 VIGRA_AS_STRING(signed short)
    00068 VIGRA_AS_STRING(unsigned short)
    00069 VIGRA_AS_STRING(signed long)
    00070 VIGRA_AS_STRING(unsigned long)
    00071 VIGRA_AS_STRING(signed long long)
    00072 VIGRA_AS_STRING(unsigned long long)
    00073 VIGRA_AS_STRING(signed int)
    00074 VIGRA_AS_STRING(unsigned int)
    00075 VIGRA_AS_STRING(float)
    00076 VIGRA_AS_STRING(double)
    00077 VIGRA_AS_STRING(long double)
    00078 VIGRA_AS_STRING(void *)
    00079
    00080 #undef VIGRA_AS_STRING
    00081
    00082
    00083 } // namespace std
    00084
    00085 /*! \page Utilities Utilities
    00086     Basic helper functionality needed throughout.
    00087
    00088     <UL style="list-style-image:url(documents/bullet.gif)">
    00089     <LI> \ref vigra::ArrayVector
    00090          <BR>&nbsp;&nbsp;&nbsp;<em>replacement for std::vector (always uses consecutive memory)</em>
    00091     <LI> \ref RangesAndPoints
    00092          <BR>&nbsp;&nbsp;&nbsp;<em>2-D and N-D positions, extents, and boxes</em>
    00093     <LI> \ref PixelNeighborhood
    00094          <BR>&nbsp;&nbsp;&nbsp;<em>4- and 8-neighborhood definitions and circulators</em>
    00095     <LI> \ref VoxelNeighborhood
    00096          <BR>&nbsp;&nbsp;&nbsp;<em>6- and 26-neighborhood definitions and circulators</em>
    00097     <LI> \ref vigra::IteratorAdaptor
    00098          <BR>&nbsp;&nbsp;&nbsp;<em>Quickly create STL-compatible 1D iterator adaptors</em>
    00099     <LI> \ref TupleTypes
    00100          <BR>&nbsp;&nbsp;&nbsp;<em>pair, triple, tuple4, tuple5</em>
    00101     <LI> \ref MathConstants
    00102          <BR>&nbsp;&nbsp;&nbsp;<em>M_PI, M_SQRT2</em>
    00103     </UL>
    00104 */
    00105
    00106 #endif // VIGRA_BASICS_HXX

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.7.1 (3 Dec 2010)