Developer documentation
Version 3.0.3-105-gd3941f44
fixel.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_fixel_h__
18#define __gui_mrview_tool_fixel_h__
19
21#include "gui/projection.h"
25
26
27namespace MR
28{
29 namespace GUI
30 {
31 namespace MRView
32 {
33 namespace Tool
34 {
36 { MEMALIGN (Fixel)
37 Q_OBJECT
38
39 public:
40 class Model;
41
42 Fixel (Dock* parent);
43
44 virtual ~Fixel () {}
45
46 void draw (const Projection& transform, bool is_3D, int, int) override;
47 void draw_colourbars () override;
48 size_t visible_number_colourbars () override;
49 void render_fixel_colourbar (const Tool::BaseFixel& fixel) override;
50
51 static void add_commandline_options (MR::App::OptionList& options);
52 virtual bool process_commandline_option (const MR::App::ParsedOption& opt) override;
53
54 void selected_colourmap (size_t index, const ColourMapButton&) override;
55 void selected_custom_colour (const QColor& colour, const ColourMapButton&) override;
56 void toggle_show_colour_bar (bool, const ColourMapButton&) override;
57 void toggle_invert_colourmap (bool, const ColourMapButton&) override;
58 void reset_colourmap (const ColourMapButton&) override;
59
60 bool is_locked_to_grid () const { return lock_to_grid->isChecked(); }
61 bool is_cropped_to_slab () const { return crop_to_slice->isChecked(); }
62 bool is_bidirectional () const { return bidirectional->isChecked(); }
63
64 QPushButton* hide_all_button;
65 bool not_3D;
66 float line_opacity;
67 Model* fixel_list_model;
68 QListView* fixel_list_view;
69
70
71 private slots:
72 void fixel_open_slot ();
73 void fixel_close_slot ();
74 void toggle_shown_slot (const QModelIndex&, const QModelIndex&);
75 void hide_all_slot ();
76 void on_checkbox_slot (bool is_checked);
77 void opacity_slot (int opacity);
78 void line_thickness_slot (int thickness);
79 void length_multiplier_slot ();
80 void length_type_slot (int);
81 void threshold_type_slot (int);
82 void selection_changed_slot (const QItemSelection &, const QItemSelection &);
83 void colour_changed_slot (int);
84 void on_set_scaling_slot ();
85 void on_set_tracking_slot (bool is_checked);
86 void threshold_lower_changed (int unused);
87 void threshold_upper_changed (int unused);
88 void threshold_lower_value_changed ();
89 void threshold_upper_value_changed ();
90
91 protected:
93
97
102
106
109
110
112 void dropEvent (QDropEvent* event) override;
113
114 private:
115 void update_gui_controls ();
116 void update_gui_scaling_controls (bool reload_scaling_types = true);
117 void update_gui_colour_controls (bool reload_colour_types = true);
118 void update_gui_threshold_controls (bool reload_threshold_types = true);
119 void update_gui_tracking_controls ();
120 };
121 }
122 }
123 }
124}
125
126#endif
127
128
129
130
a class to hold the list of option groups
Definition: app.h:139
object storing information about option parsed from command-line
Definition: app.h:286
AdjustButton * threshold_lower
Definition: fixel.h:99
QGroupBox * colourmap_option_group
Definition: fixel.h:94
QCheckBox * lock_to_grid
Definition: fixel.h:101
ComboBoxWithErrorMsg * length_combobox
Definition: fixel.h:103
QCheckBox * threshold_upper_box
Definition: fixel.h:100
QCheckBox * bidirectional
Definition: fixel.h:101
QSlider * line_thickness_slider
Definition: fixel.h:107
QCheckBox * crop_to_slice
Definition: fixel.h:101
ComboBoxWithErrorMsg * colour_combobox
Definition: fixel.h:92
AdjustButton * max_value
Definition: fixel.h:98
void add_images(vector< std::string > &list)
AdjustButton * threshold_upper
Definition: fixel.h:99
QCheckBox * threshold_lower_box
Definition: fixel.h:100
QAction * show_colour_bar
Definition: fixel.h:95
void dropEvent(QDropEvent *event) override
AdjustButton * min_value
Definition: fixel.h:98
ComboBoxWithErrorMsg * threshold_combobox
Definition: fixel.h:104
QCheckBox * track_main_volume
Definition: fixel.h:101
AdjustButton * length_multiplier
Definition: fixel.h:105
ColourMapButton * colourmap_button
Definition: fixel.h:96
Definition: base.h:24
size_t index
#define MEMALIGN(...)
Definition: types.h:185