forked from RTKConsortium/PCT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpctMostLikelyPathFunction.h
68 lines (52 loc) · 2.12 KB
/
pctMostLikelyPathFunction.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#ifndef __pctMostLikelyPathFunction_h
#define __pctMostLikelyPathFunction_h
#include <itkNumericTraits.h>
#include <vector>
#include <itkImageBase.h>
//#define MLP_TIMING
#ifdef MLP_TIMING
# include <itkTimeProbe.h>
#endif
namespace pct
{
/** \class MostLikelyPathFunction
* \brief Base class for computing the most likely path of a proton.
*
* \ingroup Functions
*/
template <class TCoordRep = double>
class ITK_EXPORT MostLikelyPathFunction :
public itk::LightObject
{
public:
/** Standard class typedefs. */
typedef MostLikelyPathFunction Self;
typedef itk::LightObject Superclass;
typedef itk::SmartPointer<Self> Pointer;
typedef itk::SmartPointer<const Self> ConstPointer;
/** Useful defines. */
typedef itk::Vector<TCoordRep, 3> VectorType;
/** Init the mlp parameters from the input and output directions and positions. */
virtual void Init(const VectorType posIn, const VectorType posOut, const VectorType dirIn, const VectorType dirOut) = 0;
/** Init with additional parameters to consider tracker uncertainties */
virtual void InitUncertain(const VectorType posIn, const VectorType posOut, const VectorType dirIn, const VectorType dirOut, double dEntry, double dExit, double m_TrackerResolution, double m_TrackerPairSpacing, double m_MaterialBudget) = 0;
/** Evaluate the coordinates (x,y) at depth z. */
virtual void Evaluate( const TCoordRep z, TCoordRep &x, TCoordRep&y, TCoordRep &dx, TCoordRep&dy ) = 0;
/** Vectorised version of the above method. Implement dummy in derived class if not applicable for the type of MLP */
// NK: maybe explicit <double> should be replaced with <TCoordRep>
virtual void Evaluate( std::vector<double> u, std::vector<double> &x, std::vector<double> &y ) = 0;
#ifdef MLP_TIMING
/** Print timing information */
virtual void PrintTiming(std::ostream& os){}
#endif
protected:
/// Constructor
MostLikelyPathFunction(){}
/// Destructor
~MostLikelyPathFunction(){}
private:
MostLikelyPathFunction( const Self& ); //purposely not implemented
void operator=( const Self& ); //purposely not implemented
};
} // namespace pct
#endif