Developer documentation
Version 3.0.3-105-gd3941f44
item.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 __gui_mrview_tool_odf_item_h__
18#define __gui_mrview_tool_odf_item_h__
19
20#include <memory>
21
22#include "dwi/shells.h"
23
24#include "dwi/directions/set.h"
25#include "gui/dwi/renderer.h"
28
29namespace MR
30{
31
32 class Header;
33
34 namespace GUI
35 {
36 namespace MRView
37 {
38 namespace Tool
39 {
40
41
42
44 public:
45 ODF_Item (MR::Header&& H, const odf_type_t type, const float scale, const bool hide_negative, const bool color_by_direction);
46
47 bool valid() const;
48
49 MRView::Image image;
50 odf_type_t odf_type;
51 int lmax;
52 float scale;
53 bool hide_negative, color_by_direction;
54
55 class DixelPlugin
56 { MEMALIGN(DixelPlugin)
57 public:
58 enum dir_t { DW_SCHEME, HEADER, INTERNAL, NONE, FILE };
59
60 DixelPlugin (const MR::Header&);
61
62 void set_shell (size_t index);
63 void set_header();
64 void set_internal (const size_t n);
65 void set_none();
66 void set_from_file (const std::string& path);
67
68 Eigen::VectorXf get_shell_data (const Eigen::VectorXf& values) const;
69
70 size_t num_DW_shells() const;
71
72 dir_t dir_type;
73 Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic> header_dirs;
74 Eigen::Matrix<double, Eigen::Dynamic, 4> grad;
75 std::unique_ptr<MR::DWI::Shells> shells;
76 size_t shell_index;
77 std::unique_ptr<MR::DWI::Directions::Set> dirs;
78
79 };
80 std::unique_ptr<DixelPlugin> dixel;
81 };
82
83
84
85 }
86 }
87 }
88}
89
90#endif
91
92
93
94
95
Definition: base.h:24
Eigen::MatrixXd H
size_t index
#define MEMALIGN(...)
Definition: types.h:185