Developer documentation
Version 3.0.3-105-gd3941f44
resampling.h
Go to the documentation of this file.
1/* Copyright (c) 2008-2022 the MRtrix3 contributors.
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 *
7 * Covered Software is provided under this License on an "as is"
8 * basis, without warranty of any kind, either expressed, implied, or
9 * statutory, including, without limitation, warranties that the
10 * Covered Software is free of defects, merchantable, fit for a
11 * particular purpose or non-infringing.
12 * See the Mozilla Public License v. 2.0 for more details.
13 *
14 * For more details, see http://www.mrtrix.org/.
15 */
16
17#ifndef __dwi_tractography_resampling_resampling_h__
18#define __dwi_tractography_resampling_resampling_h__
19
20
21#include "app.h"
22
24
25
26namespace MR {
27 namespace DWI {
28 namespace Tractography {
29 namespace Resampling {
30
31
32
33 extern const App::OptionGroup ResampleOption;
34
35
36 class Base;
38
39 using value_type = float;
41
42 // cubic interpolation (tension = 0.0) looks 'bulgy' between control points
44
45
46 class Base
48 public:
49 Base() { }
50 virtual ~Base() { }
51
52 virtual Base* clone() const = 0;
53 virtual bool operator() (const Streamline<>&, Streamline<>&) const = 0;
54 virtual bool valid () const = 0;
55
56 };
57
58 template <class Derived>
59 class BaseCRTP : public Base
61 public:
62 virtual Base* clone() const {
63 return new Derived(static_cast<Derived const&>(*this));
64 }
65 };
66
67
68
69
70 }
71 }
72 }
73}
74
75#endif
76
77
78
virtual Base * clone() const =0
virtual bool operator()(const Streamline<> &, Streamline<> &) const =0
#define NOMEMALIGN
Definition: memory.h:22
constexpr value_type hermite_tension
Definition: resampling.h:43
const App::OptionGroup ResampleOption
typename Streamline<>::point_type point_type
Definition: resampling.h:40
Definition: base.h:24