My Project
template/trackpoint.hh
Go to the documentation of this file.
1
/* -*- mia-c++ -*-
2
*
3
* This file is part of MIA - a toolbox for medical image analysis
4
* Copyright (c) Leipzig, Madrid 1999-2017 Gert Wollny
5
*
6
* MIA is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with MIA; if not, see <http://www.gnu.org/licenses/>.
18
*
19
*/
20
21
#ifndef mia_template_trackpoint_hh
22
#define mia_template_trackpoint_hh
23
24
#include <istream>
25
#include <ostream>
26
27
#include <
mia/core/import_handler.hh
>
28
29
NS_MIA_BEGIN
30
40
template
<
typename
Transformation>
41
class
EXPORT_HANDLER
TTrackPoint
42
{
43
public
:
44
typedef
typename
Transformation::Vector
Vector
;
45
46
47
TTrackPoint
();
48
58
TTrackPoint
(
int
id
,
float
time,
const
Vector
& pos,
const
std::string& reserved);
59
66
bool
read(std::string& is);
67
72
void
print(std::ostream& os)
const
;
73
79
void
move(
float
timestep,
const
Transformation
& t);
80
81
83
const
Vector
& get_pos()
const
;
84
86
int
get_id()
const
;
87
89
float
get_time()
const
;
90
92
const
std::string& get_reserved()
const
;
93
100
static
std::vector< TTrackPoint > load_trackpoints(
const
std::string& in_filename);
101
102
private
:
103
int
m_id;
104
float
m_time;
105
Vector
m_pos;
106
std::string m_reserved;
107
};
108
109
template
<
typename
Transformation>
110
std::ostream&
operator <<
(std::ostream& os,
const
TTrackPoint<Transformation>
& tp)
111
{
112
tp.
print
(os);
113
return
os;
114
}
115
116
117
NS_MIA_END
118
119
120
121
#endif
TTrackPoint::Vector
Transformation::Vector Vector
Definition:
template/trackpoint.hh:44
NS_MIA_BEGIN
#define NS_MIA_BEGIN
conveniance define to start the mia namespace
Definition:
defines.hh:33
import_handler.hh
Transformation
generic base class for transformations
Definition:
transformation.hh:44
NS_MIA_END
#define NS_MIA_END
conveniance define to end the mia namespace
Definition:
defines.hh:36
EXPORT_HANDLER
#define EXPORT_HANDLER
Definition:
core/cost.hh:32
TTrackPoint
Class to track pixel movement based on a transformation.
Definition:
template/trackpoint.hh:41
TTrackPoint::print
void print(std::ostream &os) const
operator<<
std::ostream & operator<<(std::ostream &os, const TTrackPoint< Transformation > &tp)
Definition:
template/trackpoint.hh:110
mia
template
trackpoint.hh
Generated by
1.8.17