SuPReMo
0.1.1
Loading...
Searching...
No Matches
motion-lib
MathAdditions.h
1
// ====================================================================================================
2
//
3
// SuPReMo: Surrogate Parameterised Respiratory Motion Model
4
// An implementation of the generalised motion modelling and image registration framework
5
//
6
// Copyright (c) University College London (UCL). All rights reserved.
7
//
8
// This software is distributed WITHOUT ANY WARRANTY; without even
9
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
10
// PURPOSE.
11
//
12
// See LICENSE.txt in the top level directory for details.
13
//
14
// ====================================================================================================
15
16
17
#pragma once
18
19
#include <math.h>
20
21
// Functions dedicated to replace reg_math macros
22
template
<
typename
T>
23
inline
int
nmm_floorInt(
const
T& val )
24
{
25
// This is how it should be
26
return
static_cast<
int
>
(floor( val ));
27
}
28
29
30
31
// #define nmm_floorInt( a ) ((a) > 0 ? (int)(a) : (int)((a)-1))