Developer documentation
Version 3.0.3-105-gd3941f44
shared.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_act_shared_h__
18
#define __dwi_tractography_act_shared_h__
19
20
#include "
memory.h
"
21
#include "
dwi/tractography/ACT/gmwmi.h
"
22
23
24
namespace
MR
25
{
26
namespace
DWI
27
{
28
namespace
Tractography
29
{
30
namespace
ACT
31
{
32
33
34
class
ACT_Shared_additions
{ MEMALIGN(
ACT_Shared_additions
)
35
36
public
:
37
ACT_Shared_additions
(
const
std::string& path,
Properties
& property_set) :
38
voxel (
Image<float>::open
(path)),
39
bt (
false
)
40
{
41
verify_5TT_image
(voxel);
42
property_set.set (bt,
"backtrack"
);
43
if
(property_set.find (
"crop_at_gmwmi"
) != property_set.end())
44
gmwmi_finder.reset (
new
GMWMI_finder
(voxel));
45
}
46
47
48
bool
backtrack()
const
{
return
bt; }
49
50
bool
crop_at_gmwmi()
const
{
return
bool (gmwmi_finder); }
51
void
crop_at_gmwmi (
vector<Eigen::Vector3f>
& tck)
const
52
{
53
assert (gmwmi_finder);
54
tck.back() = gmwmi_finder->find_interface (tck,
true
);
55
}
56
57
58
private
:
59
Image<float>
voxel;
60
bool
bt;
61
62
std::unique_ptr<GMWMI_finder> gmwmi_finder;
63
64
65
protected
:
66
friend
class
ACT_Method_additions
;
67
68
};
69
70
71
}
72
}
73
}
74
}
75
76
#endif
gmwmi.h
MR::DWI::Tractography::ACT::ACT_Method_additions
Definition:
method.h:45
MR::DWI::Tractography::ACT::ACT_Shared_additions
Definition:
shared.h:34
MR::DWI::Tractography::ACT::GMWMI_finder
Definition:
gmwmi.h:51
MR::DWI::Tractography::Properties
Definition:
properties.h:45
MR::Image
functions and classes related to image data input/output
Definition:
image.h:41
MR::vector< Eigen::Vector3f >
memory.h
MR::DWI::Tractography::ACT::verify_5TT_image
void verify_5TT_image(const Header &)
MR
Definition:
base.h:24
src
dwi
tractography
ACT
shared.h
Generated on Mon Jul 4 2022 08:00:07 for MRtrix by
1.9.3