17#ifndef __gui_mrview_tool_tractogram_h__
18#define __gui_mrview_tool_tractogram_h__
58 void load_end_colours();
59 void load_intensity_track_scalars (
const std::string&);
60 void load_threshold_track_scalars (
const std::string&);
61 void erase_colour_data();
62 void erase_intensity_scalar_data ();
63 void erase_threshold_scalar_data ();
72 void set_colour (
float c[3]) { colour = { c[0], c[1], c[2] }; }
74 float get_threshold_rate()
const {
75 switch (threshold_type) {
83 float get_threshold_min()
const {
return threshold_min; }
84 float get_threshold_max()
const {
return threshold_max; }
87 static constexpr float default_line_thickness = 2e-3f;
88 static constexpr float default_point_size = 4e-3f;
90 bool scalarfile_by_direction;
92 bool should_update_stride;
93 Eigen::Array3f colour;
96 std::string intensity_scalar_filename;
97 std::string threshold_scalar_filename;
99 class Shader :
public Displayable::Shader {
MEMALIGN(Shader)
102 do_crop_to_slab (
false),
103 use_lighting (
false),
106 geometry_type (Tractogram::default_tract_geom) { }
107 std::string vertex_shader_source (
const Displayable&)
override;
108 std::string fragment_shader_source (
const Displayable&)
override;
109 std::string geometry_shader_source (
const Displayable&)
override;
110 virtual bool need_update (
const Displayable&)
const override;
113 bool do_crop_to_slab, use_lighting;
124 static const int track_padding = 6;
127 const std::string filename;
155 float threshold_min, threshold_max;
165 void load_intensity_scalars_onto_GPU (
vector<float>& buffer,
size_t& tck_count);
166 void load_threshold_scalars_onto_GPU (
vector<float>& buffer,
size_t& tck_count);
168 void render_streamlines ();
170 void update_stride ();
173 void on_FOV_changed() {
174 should_update_stride =
true;
virtual void render_tractogram_colourbar(const Tool::Tractogram &)
constexpr default_type NaN