Developer documentation
Version 3.0.3-105-gd3941f44
connect.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
18
#ifndef __fixel_filter_connect_h__
19
#define __fixel_filter_connect_h__
20
21
#include "image.h"
22
#include "
fixel/matrix.h
"
23
#include "
fixel/filter/base.h
"
24
25
#define DEFAULT_FIXEL_CONNECT_VALUE_THRESHOLD 0.5
26
#define DEFAULT_FIXEL_CONNECT_CONNECTIVITY_THRESHOLD 0.1
27
28
namespace
MR
29
{
30
namespace
Fixel
31
{
32
namespace
Filter
33
{
34
35
36
53
class
Connect
:
public
Base
54
{ MEMALIGN (
Connect
)
55
56
public
:
57
Connect
(
const
Fixel::Matrix::Reader
&
matrix
,
58
const
float
value_threshold
=
DEFAULT_FIXEL_CONNECT_VALUE_THRESHOLD
,
59
const
float
connectivity_threshold
=
DEFAULT_FIXEL_CONNECT_CONNECTIVITY_THRESHOLD
) :
60
matrix
(
matrix
),
61
value_threshold
(
value_threshold
),
62
connectivity_threshold
(
connectivity_threshold
) { }
63
64
void
operator() (
Image<float>
& input,
Image<float>
& output)
const override
;
65
void
set_value_threshold (
const
float
value
) {
value_threshold
=
value
; }
66
void
set_connectivity_threshold (
const
float
value
) {
connectivity_threshold
=
value
; }
67
68
protected
:
69
Fixel::Matrix::Reader
matrix
;
70
float
value_threshold
,
connectivity_threshold
;
71
};
73
74
75
76
}
77
}
78
}
79
80
81
#endif
MR::Fixel::Filter::Base
Definition:
base.h:39
MR::Fixel::Filter::Connect
Definition:
connect.h:54
MR::Fixel::Filter::Connect::connectivity_threshold
float connectivity_threshold
Definition:
connect.h:70
MR::Fixel::Filter::Connect::matrix
Fixel::Matrix::Reader matrix
Definition:
connect.h:69
MR::Fixel::Filter::Connect::value_threshold
float value_threshold
Definition:
connect.h:70
MR::Fixel::Matrix::Reader
Definition:
matrix.h:194
MR::Image< float >
DEFAULT_FIXEL_CONNECT_CONNECTIVITY_THRESHOLD
#define DEFAULT_FIXEL_CONNECT_CONNECTIVITY_THRESHOLD
Definition:
connect.h:26
DEFAULT_FIXEL_CONNECT_VALUE_THRESHOLD
#define DEFAULT_FIXEL_CONNECT_VALUE_THRESHOLD
Definition:
connect.h:25
MR::Math::SH::value
VectorType::Scalar value(const VectorType &coefs, typename VectorType::Scalar cos_elevation, typename VectorType::Scalar cos_azimuth, typename VectorType::Scalar sin_azimuth, int lmax)
Definition:
SH.h:233
MR
Definition:
base.h:24
base.h
matrix.h
src
fixel
filter
connect.h
Generated on Mon Jul 4 2022 08:00:07 for MRtrix by
1.9.3