Developer documentation
Version 3.0.3-105-gd3941f44
tractography.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_tractography_h__
18#define __gui_mrview_tool_tractography_h__
19
21#include "gui/color_button.h"
22#include "gui/projection.h"
26
27namespace MR
28{
29 namespace GUI
30 {
31 namespace GL {
32 class Lighting;
33 }
34
35 class LightingDock;
36
37 namespace MRView
38 {
39 namespace Tool
40 {
41
42 extern const char* tractogram_geometry_types[];
43
44 class Tractography : public Base
46 Q_OBJECT
47
48 public:
49
50 class Model;
51
52 Tractography (Dock* parent);
53
54 virtual ~Tractography ();
55
56 void draw (const Projection& transform, bool is_3D, int axis, int slice) override;
57 void draw_colourbars () override;
58 size_t visible_number_colourbars () override;
59 bool crop_to_slab () const { return (do_crop_to_slab && not_3D); }
60
61 static void add_commandline_options (MR::App::OptionList& options);
62 virtual bool process_commandline_option (const MR::App::ParsedOption& opt) override;
63
64 QPushButton* hide_all_button;
65 bool do_crop_to_slab;
66 bool use_lighting;
67 bool use_threshold_scalarfile;
68 bool not_3D;
69 float slab_thickness;
70 float line_opacity;
71 Model* tractogram_list_model;
72 QListView* tractogram_list_view;
73
74 GL::Lighting* lighting;
75
76
77 private slots:
78 void tractogram_open_slot ();
79 void tractogram_close_slot ();
80 void toggle_shown_slot (const QModelIndex&, const QModelIndex&);
81 void hide_all_slot ();
82 void on_slab_thickness_slot ();
83 void on_crop_to_slab_slot (bool is_checked);
84 void on_use_lighting_slot (bool is_checked);
85 void on_lighting_settings ();
86 void opacity_slot (int opacity);
87 void line_thickness_slot (int thickness);
88 void right_click_menu_slot (const QPoint& pos);
89 void colour_track_by_direction_slot ();
90 void colour_track_by_ends_slot ();
91 void randomise_track_colour_slot ();
92 void set_track_colour_slot ();
93 void colour_by_scalar_file_slot ();
94 void colour_mode_selection_slot (int);
95 void colour_button_slot();
96 void geom_type_selection_slot (int);
97 void selection_changed_slot (const QItemSelection &, const QItemSelection &);
98
99 protected:
102
105
107
110
113
114 QGroupBox* slab_group_box;
116 QPushButton* lighting_button;
117
119
120 void dropEvent (QDropEvent* event) override;
127 };
128 }
129 }
130 }
131}
132
133#endif
134
135
136
137
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
ComboBoxWithErrorMsg * colour_combobox
Definition: tractography.h:103
void dropEvent(QDropEvent *event) override
ComboBoxWithErrorMsg * geom_type_combobox
Definition: tractography.h:106
TrackScalarFileOptions * scalar_file_options
Definition: tractography.h:111
void add_tractogram(vector< std::string > &list)
bool process_commandline_option_tsf_option(const MR::App::ParsedOption &, uint, vector< default_type > &range)
const char * tractogram_geometry_types[]
const uint32_t Lighting
Definition: displayable.h:44
Definition: base.h:24
int axis
#define MEMALIGN(...)
Definition: types.h:185