aimsdata 6.0.0
Neuroimaging data handling
general.h
Go to the documentation of this file.
1/* This software and supporting documentation are distributed by
2 * Institut Federatif de Recherche 49
3 * CEA/NeuroSpin, Batiment 145,
4 * 91191 Gif-sur-Yvette cedex
5 * France
6 *
7 * This software is governed by the CeCILL-B license under
8 * French law and abiding by the rules of distribution of free software.
9 * You can use, modify and/or redistribute the software under the
10 * terms of the CeCILL-B license as circulated by CEA, CNRS
11 * and INRIA at the following URL "http://www.cecill.info".
12 *
13 * As a counterpart to the access to the source code and rights to copy,
14 * modify and redistribute granted by the license, users are provided only
15 * with a limited warranty and the software's author, the holder of the
16 * economic rights, and the successive licensors have only limited
17 * liability.
18 *
19 * In this respect, the user's attention is drawn to the risks associated
20 * with loading, using, modifying and/or developing or reproducing the
21 * software by the user in light of its specific status of free software,
22 * that may mean that it is complicated to manipulate, and that also
23 * therefore means that it is reserved for developers and experienced
24 * professionals having in-depth computer knowledge. Users are therefore
25 * encouraged to load and test the software's suitability as regards their
26 * requirements in conditions enabling the security of their systems and/or
27 * data to be ensured and, more generally, to use and operate it in the
28 * same conditions as regards security.
29 *
30 * The fact that you are presently reading this means that you have had
31 * knowledge of the CeCILL-B license and that you accept its terms.
32 */
33
34/*
35 * General definitions
36 */
37#ifndef AIMS_DEF_GENERAL_H
38#define AIMS_DEF_GENERAL_H
39
41#include <cartobase/type/types.h>
42//#include <soma-io/allocator/allocator.h>
44
45namespace aims
46{
47 std::string aimsVersion();
48}
49
50// ABCD in ASCII
51#define AIMS_MAGIC_NUMBER 0x41424344
52
53// Ignore __attribute__ on non-GCC compilers
54#if !(defined(__GNUC__) || defined(__attribute__))
55#define __attribute__(a) /* nothing */
56#endif
57
71
72
84
85
89
106
107
108
111
112AIMSDATA_API void AimsScanNflush(char **str,char *strRef);
114AIMSDATA_API void AimsError(const std::string& message) __attribute__((__noreturn__));
116AIMSDATA_API void AimsWarning(const std::string& message);
118
119
120
125AIMSDATA_API int AimsSpaceLevelOf (const std::string& filename);
127AIMSDATA_API int AimsFileDimXOf (const std::string& filename);
129AIMSDATA_API int AimsFileDimYOf (const std::string& filename);
131AIMSDATA_API int AimsFileDimZOf (const std::string& filename);
133AIMSDATA_API int AimsFileDimTOf (const std::string& filename);
135AIMSDATA_API bool AimsIsComplexData (const std::string& filename);
137AIMSDATA_API bool AimsIsPoint2dData (const std::string& filename);
139AIMSDATA_API bool AimsIsPoint3dData (const std::string& filename);
141
142
143#endif
144
145// mode:C++
#define AIMSDATA_API
#define __attribute__(a)
AIMSDATA_API double AimsMaxValOf(int type)
Return the maximum value of a AIMS_XXXX data.
AIMSDATA_API double AimsMinValOf(int type)
Return the minimum value of a AIMS_XXXX data.
AIMSDATA_API int AimsFileDimYOf(const std::string &filename)
Return the Y dimension of a text file.
AimsDisplayFormalism
Display formalism.
Definition general.h:65
@ AIMS_IMAGE_FORMALISM
Image formalism.
Definition general.h:69
@ AIMS_MATH_FORMALISM
Mathematical formalism.
Definition general.h:67
AIMSDATA_API int AimsFileDimZOf(const std::string &filename)
Return the Z dimension of a text file.
AIMSDATA_API int AimsFileDimTOf(const std::string &filename)
Return the T dimension of a text file.
AIMSDATA_API bool AimsIsPoint2dData(const std::string &filename)
Return true if the file contains 2D point data.
AIMSDATA_API void AimsWarning(const std::string &message)
Give a warning message on display.
AIMSDATA_API bool AimsIsComplexData(const std::string &filename)
Return true if the file contains complex data.
AIMSDATA_API bool AimsIsPoint3dData(const std::string &filename)
Return true if the file contains 3D point data.
AIMSDATA_API int AimsSpaceLevelOf(const std::string &filename)
Return the dimemsion of the space data (1D, 2D, 3D or 4D)
AIMSDATA_API void AimsError(const std::string &message) __attribute__((__noreturn__))
Give an error message on display.
AIMSDATA_API void AimsClear(void)
Clear the screen.
AIMSDATA_API void AimsScanNflush(char **str, char *strRef)
Read the next word from *str, put it in strRef and move *str behind the word.
AIMSDATA_API std::string AimsStringTypeOf(int type)
Send a string containing AIMS_XXXX.
AIMSDATA_API bool AimsIsComplexType(int type)
Return True if AIMS_XXXX is complex.
AIMSDATA_API int AimsNCompOf(int type)
Return the number of components of AIMS_XXXX.
AIMSDATA_API void AimsPrintVersion(void)
Print A.I.M.S. version.
AimsBasicType
The 5 basic types of data.
Definition general.h:77
@ AIMS_SCALAR
Definition general.h:78
@ AIMS_VOLUME
Definition general.h:81
@ AIMS_VECTOR
Definition general.h:79
@ AIMS_SEQVOL
Definition general.h:82
@ AIMS_MATRIX
Definition general.h:80
AIMSDATA_API bool AimsIsSignedType(int type)
Return True if AIMS_XXXX is signed.
AIMSDATA_API bool AimsIsScientificNumberChar(int c)
AIMSDATA_API int AimsFileDimXOf(const std::string &filename)
Return the X dimension of a text file.
The class for EcatSino data write operation.
std::string aimsVersion()