mrdebug.h

Go to the documentation of this file.
00001 /*
00002 ############################################################################
00003 
00004 #
00005 
00006 # Copyright (c) 2000 The Interventional Centre, Rikshospitalet, Oslo,
00007 
00008 # Norway. All rights reserved.  This software was developed by the
00009 
00010 # Interventional Centre, at Rikshospitalet, University of Oslo.  All
00011 
00012 # advertising materials mentioning features or use of this software
00013 
00014 # must display the following acknowledgement: This product includes
00015 
00016 # software developed by the Interventional Centre, Rikshospitalet,
00017 
00018 # University of Oslo, Norway.
00019 
00020 # 
00021 
00022 # Redistribution and use in source and binary forms, with or without
00023 
00024 # modification, are permitted provided that the following conditions
00025 
00026 # are met:
00027 
00028 # 
00029 
00030 # 1. Redistributions of source code must retain the above copyright
00031 
00032 #    notice, this list of conditions and the following disclaimer.
00033 
00034 # 2. Redistributions in binary form must reproduce the above copyright
00035 
00036 #    notice, this list of conditions and the following disclaimer in
00037 
00038 #    the documentation and/or other materials provided with the
00039 
00040 #    distribution.
00041 
00042 # 3. All advertising materials mentioning features or use of this
00043 
00044 #    software must display the following acknowledgement: This product
00045 
00046 #    includes software developed by the Interventional Centre,
00047 
00048 #    Rikshospitalet, University of Oslo, Norway.
00049 
00050 # 4. Any scientific publication made using this software should
00051 
00052 #    include the following acknowledgement: The program IVSDX
00053 
00054 #    developed by The Interventional Centre, Rikshospitalet,
00055 
00056 #    University of Oslo, Norway was used.
00057 
00058 # 5. Neither the name of the University nor the names of its
00059 
00060 #    contributors may be used to endorse or promote products derived
00061 
00062 #    from this software without specific prior written permission.
00063 
00064 #
00065 
00066 # THIS SOFTWARE IS PROVIDED BY THE INTERVENTIONAL CENTRE,
00067 
00068 # RIKSHOSPITALET ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
00069 
00070 # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
00071 
00072 # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
00073 
00074 # DISCLAIMED. IN NO EVENT SHALL THE INTERVENTIONAL CENTRE,
00075 
00076 # RIKSHOSPITALT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
00077 
00078 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
00079 
00080 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
00081 
00082 # USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
00083 
00084 # ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
00085 
00086 # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
00087 
00088 # OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
00089 
00090 # SUCH DAMAGE.
00091 
00092 #
00093 
00094 ############################################################################
00095 */
00096 #ifndef _mrdebug_h_
00097 #define _mrdebug_h_
00098 
00099 #ifndef MAXFLOAT
00100 #define MAXFLOAT 3.402823466e+38f
00101 #endif
00102 
00103 typedef enum {
00104   MR_NONE    = 0,
00105   MR_FATAL   = 1,
00106   MR_ERROR   = 2,
00107   MR_WARNING = 3,
00108   MR_INFO    = 4,
00109   MR_DEBUG   = 5,
00110   MR_DEBUG2  = 6,
00111   MR_DEBUG3  = 7,
00112   MR_ALL     = 9
00113 } MRDebugLevel;
00114 
00115 class mr_debug
00116 {
00117  public:
00118 
00119 static void mr_debug_set_level(MRDebugLevel level);
00120 static MRDebugLevel mr_debug_get_level();
00121 static int mr_printf(MRDebugLevel level, char *format, ...);
00122 static float mr_debug_timer(int id, int interval, int stop, 
00123                      float *meanval, float *maxval, float *minval);
00124 
00125 
00126 static MRDebugLevel mr_debug_level;
00127 };
00128 
00129 
00130 #endif

Generated on Wed Feb 28 15:18:49 2007 for NaviTrack by  doxygen 1.4.6