defines.hh
Go to the documentation of this file.
/* -*- mia-c++ -*-
*
* This file is part of MIA - a toolbox for medical image analysis
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
*
* MIA is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef mia_core_defines_hh
#define mia_core_defines_hh
#include <mia/core/gsl_defines.hh>
#define NS_MIA_BEGIN namespace mia {
#define NS_MIA_END }
#define NS_MIA_USE using namespace mia;
#define NS_BEGIN(NS) namespace NS {
#define NS_END }
#define NS_USE(NS) using namespace NS
/*
The mia namespace is the general namespace of this library.
Currently, only plug-ins have additional namespace to avoid name clashes
between dynamically loaded modules that might have been developed outside
this source package.
*/
NS_MIA_BEGIN
enum EInterpolation {
ip_nn,
ip_linear,
ip_bspline0,
ip_bspline1,
ip_bspline2,
ip_bspline3,
ip_bspline4,
ip_bspline5,
ip_omoms3,
ip_unknown
};
enum EInterpolationFactory {
ipf_spline,
ipf_unknown
};
NS_MIA_END
#define MIA_MODULE_SUFFIX "mia"
#ifndef __GNUC__
// remove the __attribute__ syntax if the compiler is not GCC compatible
# define __attribute__(x)
# define MIA_PARAM_UNUSED(x) x
#endif
#ifndef MIA_PARAM_UNUSED
#define MIA_PARAM_UNUSED(x) x __attribute__((unused))
#endif
#ifdef miacore_EXPORTS
# define EXPORT_CORE DO_EXPORT
#else
# define EXPORT_CORE DO_IMPORT
#endif
#define EXPORT DO_EXPORT
#ifdef WIN32
#ifdef _DEBUG
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#endif
#ifdef _MSC_VER
#pragma warning(disable: 4251) // class needs to have dll interface to be used ...
#pragma warning(disable: 4231) // nonstandard extension used "extern" before explicit template instanciation
#pragma warning(disable: 4275) // non-dll class used as base
#pragma warning(disable: 4244) // warning about int->float conversion
#pragma warning(disable: 4305) // truncation from double to float
#pragma warning(disable: 4800) // performance warning about forcing value to true or false
#endif
#endif
#ifdef miacore_EXPORTS
# ifdef VSTREAM
# undef VSTREAM
# endif
# define VSTREAM "MIA-CORE"
#endif
NS_MIA_BEGIN
EXPORT_CORE extern char const *get_revision();
NS_MIA_END
#endif
get_revision
EXPORT_CORE char const * get_revision()
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition defines.hh:33
EXPORT_CORE
#define EXPORT_CORE
Macro to manage Visual C++ style dllimport/dllexport.
Definition defines.hh:101
EInterpolationFactory
EInterpolationFactory
Enumerate for the types of possible interpolator factories.
Definition defines.hh:76
ipf_spline
@ ipf_spline
Definition defines.hh:77
ipf_unknown
@ ipf_unknown
Definition defines.hh:78
EInterpolation
EInterpolation
some constants for interpoation types
Definition defines.hh:62
ip_bspline3
@ ip_bspline3
Definition defines.hh:68
ip_bspline5
@ ip_bspline5
Definition defines.hh:70
ip_bspline4
@ ip_bspline4
Definition defines.hh:69
ip_bspline2
@ ip_bspline2
Definition defines.hh:67
ip_bspline1
@ ip_bspline1
Definition defines.hh:66
ip_omoms3
@ ip_omoms3
Definition defines.hh:71
ip_nn
@ ip_nn
Definition defines.hh:63
ip_unknown
@ ip_unknown
Definition defines.hh:72
ip_bspline0
@ ip_bspline0
Definition defines.hh:65
ip_linear
@ ip_linear
Definition defines.hh:64
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition defines.hh:36
gsl_defines.hh