Developer documentation
Version 3.0.3-105-gd3941f44
initialiser.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 __registration_transform_initialiser_h__
18#define __registration_transform_initialiser_h__
19
20#include "image.h"
21#include "transform.h"
24
25namespace MR
26{
27 namespace Registration
28 {
29 namespace Transform
30 {
31 namespace Init
32 {
35 struct TranslationInit { MEMALIGN(TranslationInit)
36 bool unmasked1;
37 bool unmasked2;
38 TranslationInit () :
39 unmasked1 (false),
40 unmasked2 (false) {} // TODO config parsing
41 };
42
44 bool unmasked1;
49 size_t directions;
53 size_t iterations;
55 iterations (10000) {}
56 };
59 angles (5),
60 scale (0.15),
61 directions (250),
62 run_global (false),
63 translation_extent (0.05) {
64 angles[0] = 2.0 / 180.0 * Math::pi;
65 angles[1] = 5.0 / 180.0 * Math::pi;
66 angles[2] = 10.0 / 180.0 * Math::pi;
67 angles[3] = 15.0 / 180.0 * Math::pi;
68 angles[4] = 20.0 / 180.0 * Math::pi;
69 }
70 };
73 unmasked1 (false),
74 unmasked2 (false) { } // TODO config parsing
75 };
76 TranslationInit init_translation;
78 };
79
80 extern void set_centre_via_mass (
87 const vector<MultiContrastSetting>& contrast_settings);
88
90 const Image<default_type>& im1,
91 const Image<default_type>& im2,
92 const Image<default_type>& mask1,
93 const Image<default_type>& mask2,
96
98 const Image<default_type>& im1,
99 const Image<default_type>& im2,
100 const Image<default_type>& mask1,
101 const Image<default_type>& mask2,
104
108 Image<default_type>& mask1,
109 Image<default_type>& mask2,
112 const vector<MultiContrastSetting>& contrast_settings);
113
117 Image<default_type>& mask1,
118 Image<default_type>& mask2,
121
122
126 Image<default_type>& mask1,
127 Image<default_type>& mask2,
130 const vector<MultiContrastSetting>& contrast_settings);
131
135 Image<default_type>& mask1,
136 Image<default_type>& mask2,
139 const vector<MultiContrastSetting>& contrast_settings);
140 }
141 }
142 }
143}
144
145#endif
constexpr double pi
Definition: math.h:40
void init(int argc, const char *const *argv)
initialise MRtrix and parse command-line arguments
void initialise_using_image_moments(Image< default_type > &im1, Image< default_type > &im2, Image< default_type > &mask1, Image< default_type > &mask2, Registration::Transform::Base &transform, Registration::Transform::Init::LinearInitialisationParams &init, const vector< MultiContrastSetting > &contrast_settings)
void initialise_using_rotation_search(Image< default_type > &im1, Image< default_type > &im2, Image< default_type > &mask1, Image< default_type > &mask2, Registration::Transform::Base &transform, Registration::Transform::Init::LinearInitialisationParams &init, const vector< MultiContrastSetting > &contrast_settings)
void initialise_using_image_mass(Image< default_type > &im1, Image< default_type > &im2, Image< default_type > &mask1, Image< default_type > &mask2, Registration::Transform::Base &transform, Registration::Transform::Init::LinearInitialisationParams &init, const vector< MultiContrastSetting > &contrast_settings)
void set_centre_via_image_centres(const Image< default_type > &im1, const Image< default_type > &im2, const Image< default_type > &mask1, const Image< default_type > &mask2, Registration::Transform::Base &transform, Registration::Transform::Init::LinearInitialisationParams &init)
void initialise_using_image_centres(const Image< default_type > &im1, const Image< default_type > &im2, const Image< default_type > &mask1, const Image< default_type > &mask2, Registration::Transform::Base &transform, Registration::Transform::Init::LinearInitialisationParams &init)
void initialise_using_FOD(Image< default_type > &im1, Image< default_type > &im2, Image< default_type > &mask1, Image< default_type > &mask2, Registration::Transform::Base &transform, Registration::Transform::Init::LinearInitialisationParams &init)
void set_centre_via_mass(Image< default_type > &im1, Image< default_type > &im2, Image< default_type > &mask1, Image< default_type > &mask2, Registration::Transform::Base &transform, Registration::Transform::Init::LinearInitialisationParams &init, const vector< MultiContrastSetting > &contrast_settings)
Definition: base.h:24
double default_type
the default type used throughout MRtrix
Definition: types.h:228
MEMALIGN(LinearInitialisationParams) struct TranslationInit
Definition: initialiser.h:34