Xmipp
v3.23.11-Nereus
xmippCore
core
xmipp_datatype.h
Go to the documentation of this file.
1
/***************************************************************************
2
* Authors: Joaquin Oton (joton@cnb.csic.es)
3
*
4
*
5
* Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6
*
7
* This program is free software; you can redistribute it and/or modify
8
* it under the terms of the GNU General Public License as published by
9
* the Free Software Foundation; either version 2 of the License, or
10
* (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, write to the Free Software
19
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20
* 02111-1307 USA
21
*
22
* All comments concerning this program package may be sent to the
23
* e-mail address 'xmipp@cnb.csic.es'
24
***************************************************************************/
25
26
#ifndef CORE_DATATYPE_H_
27
#define CORE_DATATYPE_H_
28
29
#include <string>
30
38
typedef
enum
39
{
40
DT_Default
= -1,
// For writing purposes
41
DT_Unknown
= 0,
// Undefined data type
42
DT_UChar
= 1,
// Unsigned character or byte type
43
DT_SChar
= 2,
// Signed character (for CCP4)
44
DT_UShort
= 3,
// Unsigned integer (2-byte)
45
DT_Short
= 4,
// Signed integer (2-byte)
46
DT_UInt
= 5,
// Unsigned integer (4-byte)
47
DT_Int
= 6,
// Signed integer (4-byte)
48
DT_ULong
= 7,
// Unsigned integer (4 or 8 byte, depending on system)
49
DT_Long
= 8,
// Signed integer (4 or 8 byte, depending on system)
50
DT_Float
= 9,
// Floating point (4-byte)
51
DT_Double
= 10,
// DT_Double precision floating point (8-byte)
52
DT_CShort
= 11,
// Complex two-byte integer (4-byte)
53
DT_CInt
= 12,
// Complex integer (8-byte)
54
DT_CFloat
= 13,
// Complex floating point (8-byte)
55
DT_CDouble
= 14,
// Complex floating point (16-byte)
56
DT_Bool
= 15,
// Boolean (1-byte?)
57
DT_UHalfByte
= 16,
// For 4-bit format (e.g. mrc 4bit file)
58
DT_HalfFloat
= 17,
// Half precision floating point (2-byte)
59
DT_LastEntry
= 18
// This must be the last entry
60
}
DataType
;
61
62
64
size_t
gettypesize
(
DataType
type
);
65
67
DataType
str2Datatype
(
const
std::string & str);
68
70
std::string
datatype2Str
(
DataType
datatype);
71
73
std::string
datatype2StrLong
(
DataType
datatype);
74
76
#endif
/* DATATYPE_H_ */
datatype2Str
std::string datatype2Str(DataType datatype)
Definition:
xmipp_datatype.cpp:131
DT_LastEntry
Definition:
xmipp_datatype.h:59
DT_UHalfByte
Definition:
xmipp_datatype.h:57
DT_HalfFloat
Definition:
xmipp_datatype.h:58
DT_Short
Definition:
xmipp_datatype.h:45
DT_Default
Definition:
xmipp_datatype.h:40
type
viol type
Definition:
numerical_recipes.cpp:5198
DT_CInt
Definition:
xmipp_datatype.h:53
DT_CShort
Definition:
xmipp_datatype.h:52
DT_Unknown
Definition:
xmipp_datatype.h:41
DT_ULong
Definition:
xmipp_datatype.h:48
DT_Float
Definition:
xmipp_datatype.h:50
DataType
DataType
Definition:
xmipp_datatype.h:38
datatype2StrLong
std::string datatype2StrLong(DataType datatype)
Definition:
xmipp_datatype.cpp:172
DT_CFloat
Definition:
xmipp_datatype.h:54
str2Datatype
DataType str2Datatype(const std::string &str)
Definition:
xmipp_datatype.cpp:88
DT_Bool
Definition:
xmipp_datatype.h:56
DT_UInt
Definition:
xmipp_datatype.h:46
DT_Double
Definition:
xmipp_datatype.h:51
DT_Long
Definition:
xmipp_datatype.h:49
DT_UChar
Definition:
xmipp_datatype.h:42
DT_Int
Definition:
xmipp_datatype.h:47
DT_SChar
Definition:
xmipp_datatype.h:43
DT_UShort
Definition:
xmipp_datatype.h:44
DT_CDouble
Definition:
xmipp_datatype.h:55
gettypesize
size_t gettypesize(DataType type)
Returns memory size of datatype.
Definition:
xmipp_datatype.cpp:33
Generated by
1.8.13