Developer documentation
Version 3.0.3-105-gd3941f44
worker.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_editing_worker_h__
18#define __dwi_tractography_editing_worker_h__
19
20
21#include <string>
22
23#include "types.h"
24
28
29
30
31namespace MR {
32 namespace DWI {
33 namespace Tractography {
34 namespace Editing {
35
36
37
38
39 class Worker
40 { MEMALIGN(Worker)
41
42 public:
43 Worker (Tractography::Properties& p, const bool inv, const bool end) :
44 properties (p),
45 inverse (inv),
46 ends_only (end),
47 thresholds (p),
48 include_visitation (properties.include, properties.ordered_include) { }
49
50 Worker (const Worker& that) :
51 properties (that.properties),
52 inverse (that.inverse),
53 ends_only (that.ends_only),
54 thresholds (that.thresholds),
55 include_visitation (properties.include, properties.ordered_include) { }
56
57
58 bool operator() (Streamline<>&, Streamline<>&) const;
59
60
61 private:
62 const Tractography::Properties& properties;
63 const bool inverse, ends_only;
64
65 class Thresholds
67 public:
68 Thresholds (Tractography::Properties&);
69 Thresholds (const Thresholds&);
70 bool operator() (const Streamline<>&) const;
71 private:
72 float max_length, min_length;
73 float max_weight, min_weight;
74 float step_size;
75 } thresholds;
76
77 mutable IncludeROIVisitation include_visitation;
78
79 };
80
81
82
83
84 }
85 }
86 }
87}
88
89#endif
#define NOMEMALIGN
Definition: memory.h:22
mat4 inv(const mat4 &a)
Definition: base.h:24