Developer documentation
Version 3.0.3-105-gd3941f44
enhance.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 __connectome_enhance_h__
18#define __connectome_enhance_h__
19
20#include <memory>
21#include <stdint.h>
22
23#include "types.h"
24
25#include "connectome/mat2vec.h"
26#include "stats/enhance.h"
27#include "stats/tfce.h"
28
29
30
31namespace MR {
32 namespace Connectome {
33 namespace Enhance {
34
35
36
38
39
40
41 // This should be possible to use for any domain of inference
43 { MEMALIGN (PassThrough)
44 public:
45 PassThrough() { }
46 virtual ~PassThrough() { }
47
48 private:
49 void operator() (in_column_type, out_column_type) const override;
50
51 };
52
53
54
56 { MEMALIGN (NBS)
57 public:
58
59 NBS () = delete;
60 NBS (const node_t i) : threshold (0.0) { initialise (i); }
61 NBS (const node_t i, const value_type t) : threshold (t) { initialise (i); }
62 NBS (const NBS& that) = default;
63 virtual ~NBS() { }
64
65 void set_threshold (const value_type t) { threshold = t; }
66
67 void operator() (in_column_type in, out_column_type out) const override {
68 (*this) (in, threshold, out);
69 }
70
71 void operator() (in_column_type, const value_type, out_column_type) const override;
72
73 protected:
74 std::shared_ptr< vector< vector<size_t> > > adjacency;
76
77 private:
78 void initialise (const node_t);
79
80 };
81
82
83
84 }
85 }
86}
87
88
89#endif
90
std::shared_ptr< vector< vector< size_t > > > adjacency
Definition: enhance.h:74
Math::Stats::matrix_type::ConstColXpr in_column_type
Definition: enhance.h:46
Math::Stats::matrix_type::ColXpr out_column_type
Definition: enhance.h:47
Math::Stats::value_type value_type
Definition: enhance.h:37
uint32_t node_t
Definition: connectome.h:34
MR::default_type value_type
Definition: typedefs.h:33
Definition: base.h:24
#define MEMALIGN(...)
Definition: types.h:185