Particle Identification and Tracking
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
common_src
include
enum_utils.h
Go to the documentation of this file.
1
//Copyright 2009 Thomas A Caswell
2
//tcaswell@uchicago.edu
3
//http://jfi.uchicago.edu/~tcaswell
4
//
5
//This program is free software; you can redistribute it and/or modify
6
//it under the terms of the GNU General Public License as published by
7
//the Free Software Foundation; either version 3 of the License, or (at
8
//your option) any later version.
9
//
10
//This program is distributed in the hope that it will be useful, but
11
//WITHOUT ANY WARRANTY; without even the implied warranty of
12
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
//General Public License for more details.
14
//
15
//You should have received a copy of the GNU General Public License
16
//along with this program; if not, see <http://www.gnu.org/licenses>.
17
//
18
//Additional permission under GNU GPL version 3 section 7
19
//
20
//If you modify this Program, or any covered work, by linking or
21
//combining it with MATLAB (or a modified version of that library),
22
//containing parts covered by the terms of MATLAB User License, the
23
//licensors of this Program grant you additional permission to convey
24
//the resulting work.
25
26
#ifndef ENUM_UTILS
27
#define ENUM_UTILS
28
29
#include<string>
30
31
namespace
utilities
32
{
33
38
typedef
enum
W_TYPE
{
39
W_MATLAB
= 0,
40
W_TEXT
,
41
W_NING
,
42
W_HDF
,
43
}
W_TYPE
;
44
50
typedef
enum
D_TYPE
{
51
D_INDEX
=0,
// index of particle in case,
52
// (frame,indx) is unique and should
53
// be persistent in wrappers (wrapper)
54
D_XPOS
=1,
// x-position (plu)
55
D_YPOS
=2,
// y-position (plu)
56
D_FRAME
=3,
// frame (wrapper)
57
D_I
=4,
// integrated intensity (plu)
58
D_R2
=5,
// radius of gyration (plu)
59
D_E
=6,
// eccentricity (plu)
60
D_NEXT_INDX
=7,
// index of the next particle in the
61
// track (track)
62
D_PREV_INDX
=8,
// index of the previous particle in
63
// the track (track)
64
D_DX
=9,
// x-shift (plu)
65
D_DY
=10,
// y-shift (plu)
66
D_ORGX
=11,
// original x-position (computed)
67
D_ORGY
=12,
// original y-position (computed)
68
D_ZPOS
=13,
// z-position (link or meta-data)
69
D_TRACKID
=14,
// track id (track)
70
D_S_ORDER_PARAMETER
=15,
// scalar order parameter (computed)
71
D_MULT
=16,
// multiplicity (plu)
72
D_N_SIZE
=17,
// neighborhood size (computed)
73
D_SENTRY
// this entry must remain last, and I
74
// am making assumptions about how the
75
// numbering will work in the compiler
76
77
}
D_TYPE
;
78
79
83
typedef
enum
V_TYPE
84
{
85
V_ERROR
= -1,
// error type
86
V_UINT
= 0,
// unsigned integer
87
V_INT
=1,
// integer
88
V_FLOAT
=2,
// float
89
V_COMPLEX
=3,
// complex
90
V_STRING
=4,
// string
91
V_BOOL
=5,
// bool
92
V_TIME
=6,
// date/time
93
V_GUID
=7,
// guid from MM meta-data
94
95
96
}
V_TYPE
;
100
V_TYPE
v_type
(
D_TYPE
in);
101
102
106
std::string
DT2str_s
(
D_TYPE
in);
110
D_TYPE
str2DT_s
(std::string in);
114
std::string
format_dset_name
(
D_TYPE
type,
int
comp_num);
118
std::string
format_name
(
const
std::string & name ,
int
comp_num);
119
120
124
std::string
VT2str_s
(
V_TYPE
);
125
129
V_TYPE
str2VT_s
(
const
std::string& in);
133
V_TYPE
str2VT_s
(
const
char
*
const
in);
134
135
}
136
137
138
#endif
Generated on Tue Sep 10 2013 17:07:21 for Particle Identification and Tracking by
1.8.4