Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regular merge of master hotfixes to dev #2673

Merged
merged 28 commits into from
Jul 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9978009
mrview: change option name -orientationlabel to avoid conflict with -…
jdtournier Jan 19, 2023
88bbc2e
Merge branch 'master' into mrview_orientationlabel_option
jdtournier Jan 19, 2023
52f5bb5
Docs update for #2569 / –9978009d
Lestropie Jan 19, 2023
7562fa6
Merge pull request #2569 from MRtrix3/mrview_orientationlabel_option
Lestropie Jan 20, 2023
eea0db9
Revert "mrview: change option name -orientationlabel to avoid conflic…
jdtournier Feb 3, 2023
6ce49ca
Merge pull request #2581 from MRtrix3/revert_mrview_rename_orientatio…
Lestropie Feb 6, 2023
d357c0d
Update GitHub Actions workflow for merge queue
jdtournier Feb 17, 2023
3166003
Merge pull request #2588 from MRtrix3/update_CI_for_github_merge_queue
jdtournier Feb 17, 2023
f409720
Add file ".git-blame-ignore-revs"
Lestropie Mar 1, 2023
68a6634
.git-blame-ignore-revs: Final addition and instructions
Lestropie Mar 1, 2023
7daaa53
.git-blame-ignore-revs: Add 2013 copyright update commits
Lestropie Mar 1, 2023
e4b3530
VTK surface format changes
Lestropie Mar 3, 2023
260d9c9
Merge pull request #2592 from MRtrix3/git_blame_ignore_revs
jdtournier Mar 3, 2023
11d3bf2
VTK load: Change terminal message RE endianness
Lestropie Mar 5, 2023
2fa95de
VTK: Change binary output to single-precision
Lestropie Mar 6, 2023
95696c5
meshconvert: Updated tests for endianness support
Lestropie Mar 6, 2023
c49eb0d
Fixes to pass CI tests for VTK changes (#2594)
Lestropie Mar 6, 2023
5489889
Merge pull request #2594 from MRtrix3/vtk_endianness
jdtournier Mar 8, 2023
380105f
App::get_matches(): Fix buffer overrun
Lestropie May 10, 2023
a5e5ae8
Merge pull request #2629 from MRtrix3/get_matches_fix_take2
jdtournier May 15, 2023
7fe277c
Mesh::load_vtk() always open files in binary mode
jdtournier Jun 13, 2023
1320438
Merge pull request #2656 from MRtrix3/master_mesh_vtk_binary_handling
Lestropie Jun 28, 2023
924fc68
mrview: fix handling of colour mapping for track scalar files
jdtournier Jun 29, 2023
ad39dc8
mrview: remove unnecessary functionality in colourmap_menu.h/cpp
jdtournier Jun 29, 2023
5a0f40c
Merge pull request #2667 from MRtrix3/mrview_fix_tsf_custom_colour
bjeurissen Jul 1, 2023
2ac2e7b
tcksift2: Fix check for allocation of memory for weights vector
Lestropie Jul 4, 2023
8a19272
Merge pull request #2672 from MRtrix3/tcksift2_saveweights_take2
jdtournier Jul 4, 2023
1aefe89
Merge branch 'master' into master_to_dev
Lestropie Jul 6, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
# .git-blame-ignore-revs
# If you want this file to be utilised whener you utilise "git blame" on your local instance of the repository,
# run the following command from its root directory:
# git config blame.ignoreRevsFile .git-blame-ignore-revs

9268f0874fc8b2c3af0a090b8084bd91707a115e
#Author: Daan Christiaens <[email protected]>
#Date: Fri Dec 11 14:41:03 2015 +0100
# Update copyright header in all source files, as discussed in #9 and #31.

3024a116078eabd3b1353fc8329a73144632c86c
#Author: Thijs Dhollander <[email protected]>
#Date: Thu Nov 22 17:01:59 2018 +1100
# Copyright message update for next release (probably 2019-ish)
# Also updated the warranty statement: it appears this was still a formulation left over from the previous GPL license. The new formulation comes directly from the MPL 2.0, but is also more comprehensive; I'm more comfortable with having this more comprehensive. Furthermore, apart from it apparently being quite important to have a warranty statement at the top of source code files, it's apparently also of little value if it's not either very comprehensive, or it also directly refers to the license where the full text can be found. Hence, I added that as a sentence.
# Finally, also of note (and TODO) would be to add the copyright statement and a copy of the license somewhere on our (mrtrix.org) website. The final link is otherwise relatively useless in the context of the copyright and license statement.

6c6c553ed9e9004ca8495ece436fec4db465d82b
#Author: Thijs Dhollander <[email protected]>
#Date: Wed Dec 13 15:09:37 2017 +1100
# Copyright update for upcoming RC which will probably end up around New Year's
# Also includes a change of mention of MRtrix to MRtrix3, in line with the phrase MRtrix3 developers, which was already in there/
# Also includes removal of 2 .s, because they hindered clickability of the links in certain environments.

654b7281c953f1068142d1f8a152f786862d8876
#Author: Thijs Dhollander <[email protected]>
#Date: Wed Jan 25 17:57:11 2017 +1100
# header files

b623e418e36de6884511d9c233b04392ecce89bb
#Author: Thijs Dhollander <[email protected]>
#Date: Wed Jan 25 17:06:35 2017 +1100
# Copyright for 2017 in headers

95b144df3d9eb837fae08129cc292c3fb8490eac
#Author: Robert Smith <[email protected]>
#Date: Tue Oct 8 14:33:10 2019 +1100
# Add copyright notice to non-CPP files
# Also includes some line ending conversions and indentation changes.

be9a46286a9053fd1c1951fe5394206a95b61bfa
#Author: MRtrixBot <[email protected]>
#Date: Thu May 14 11:30:13 2020 +1000
# Initial commit of "update_copyright" changes

5e3112eae6ba4027aba854b3385f032c67dbfedf
#Author: MRtrixBot <[email protected]>
#Date: Mon Feb 7 16:48:14 2022 +0000
# update copyright notice and corresponding docs

e8edf6d946822c8ec23d077c2b1e9eef471b2539
#Author: MRtrixBot <[email protected]>
#Date: Tue Jan 3 13:41:40 2023 +0100
# Update copyright notice

74ff7cf0b76e2c9595b1341a7e4a49fa5491ce2f
#Author: MRtrixBot <[email protected]>
#Date: Wed Jan 6 12:50:54 2021 +0000
# Update copyright notice

65b3ea5e549f3f66a9e3c5d9ebdabb2a9bb462b4
#Author: Thijs Dhollander <[email protected]>
#Date: Thu Nov 22 17:30:36 2018 +1100
# Fixed typo in copyright/warranty statement.

729dd6cfc1a773f0f16592b8533c6e9d89d03ac3
#Author: Thijs Dhollander <[email protected]>
#Date: Mon May 15 10:33:05 2017 +1000
# copyright update and cleanup

76ad4fbb3ea60ea56ec94e3debfce1b7a35a9535
#Author: rtabbara <[email protected]>
#Date: Thu Feb 18 11:55:53 2016 +1100
# User docs: Update commands list with new copyright

6552f6ebe4f9fda441255063230ef9f8d9912591
#Author: J-Donald Tournier <[email protected]>
#Date: Wed Feb 5 12:50:53 2020 +0000
# remove carriage returns

811361d3af3ecfec03e20c2ee0f342634810a9c2
#Author: Thijs Dhollander <[email protected]>
#Date: Tue May 9 09:09:51 2017 +1000
# docs update

1eb36099870a0fffbc307ac40523dd8b6e35436f
#Author: Thijs Dhollander <[email protected]>
#Date: Thu Feb 2 12:26:20 2017 +1100
# standardise number of blank lines between copyright header and the rest of a file (was getting a bit out of hand for some files; now it's 2 blank lines for all)

e8edf6d946822c8ec23d077c2b1e9eef471b2539
#Author: MRtrixBot <[email protected]>
#Date: Tue Jan 3 13:41:40 2023 +0100
# Update copyright notice

aad44d847ac48d02bb7f8badf801dbfaa0ccdac0
#Author: MRtrixBot <[email protected]>
#Date: Tue Jan 3 13:42:58 2023 +0100
# Update Copyright notice in command docs
8 changes: 5 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ name: checks
on:
pull_request:
types: [opened, synchronize]
branches:
- master
- dev
branches: [ master, dev ]
merge_group:
types: [checks_requested]
branches: [ master ]




Expand Down
2 changes: 1 addition & 1 deletion core/app.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ namespace MR
inline void get_matches (vector<const Option*>& candidates, const OptionGroup& group, const std::string& stub)
{
for (size_t i = 0; i < group.size(); ++i) {
if (stub.compare (0, stub.size(), group[i].id, stub.size()) == 0)
if (stub.compare (0, stub.size(), std::string(group[i].id), 0, stub.size()) == 0)
candidates.push_back (&group[i]);
}
}
Expand Down
15 changes: 9 additions & 6 deletions src/dwi/tractography/SIFT2/tckfactor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,19 +374,22 @@ namespace MR {
{
if (size_t(coefficients.size()) != contributions.size())
throw Exception ("Cannot output weighting factors if they have not first been estimated!");
decltype(coefficients) weights;
try {
decltype(coefficients) weights (coefficients.size());
for (SIFT::track_t i = 0; i != num_tracks(); ++i)
weights[i] = (coefficients[i] == min_coeff || !std::isfinite(coefficients[i])) ?
0.0 :
std::exp (coefficients[i]);
save_vector (weights, path);
weights.resize (coefficients.size());
} catch (...) {
WARN ("Unable to assign memory for output factor file: \"" + Path::basename(path) + "\" not created");
return;
}
for (SIFT::track_t i = 0; i != num_tracks(); ++i)
weights[i] = (coefficients[i] == min_coeff || !std::isfinite(coefficients[i])) ?
0.0 :
std::exp (coefficients[i]);
save_vector (weights, path);
}



void TckFactor::output_coefficients (const std::string& path) const
{
save_vector (coefficients, path);
Expand Down
16 changes: 11 additions & 5 deletions src/gui/mrview/colourmap_button.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ void ColourMapButton::init_special_colour_menu_items(bool create_shortcuts)

void ColourMapButton::init_customise_state_menu_items()
{
auto show_colour_bar = colourmap_menu->addAction(tr("Show colour bar"), this, SLOT(show_colour_bar_slot(bool)));
show_colour_bar->setCheckable(true);
show_colour_bar->setChecked(true);
addAction(show_colour_bar);
show_colour_bar_action = colourmap_menu->addAction(tr("Show colour bar"), this, SLOT(show_colour_bar_slot(bool)));
show_colour_bar_action->setCheckable(true);
show_colour_bar_action->setChecked(true);
addAction(show_colour_bar_action);

invert_scale_action = colourmap_menu->addAction(tr("Invert"), this, SLOT(invert_colourmap_slot(bool)));
invert_scale_action->setCheckable(true);
Expand Down Expand Up @@ -163,12 +163,18 @@ void ColourMapButton::set_colourmap_index(size_t index)
}
}

void ColourMapButton::set_scale_inverted(bool yesno)
void ColourMapButton::set_scale_inverted (bool yesno)
{
assert (invert_scale_action != nullptr);
invert_scale_action->setChecked (yesno);
}

void ColourMapButton::set_show_colourbar (bool yesno)
{
assert (invert_scale_action != nullptr);
show_colour_bar_action->setChecked (yesno);
}


void ColourMapButton::set_fixed_colour()
{
Expand Down
18 changes: 10 additions & 8 deletions src/gui/mrview/colourmap_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,25 @@ class ColourMapButton;
class ColourMapButtonObserver
{
public:
virtual void selected_colourmap(size_t, const ColourMapButton&) {}
virtual void selected_custom_colour(const QColor&, const ColourMapButton&) {}
virtual void toggle_show_colour_bar(bool, const ColourMapButton&) {}
virtual void toggle_invert_colourmap(bool, const ColourMapButton&) {}
virtual void reset_colourmap(const ColourMapButton&) {}
virtual void selected_colourmap (size_t, const ColourMapButton&) {}
virtual void selected_custom_colour (const QColor&, const ColourMapButton&) {}
virtual void toggle_show_colour_bar (bool, const ColourMapButton&) {}
virtual void toggle_invert_colourmap (bool, const ColourMapButton&) {}
virtual void reset_colourmap (const ColourMapButton&) {}
};


class ColourMapButton : public QToolButton
{
Q_OBJECT
public:
ColourMapButton(QWidget* parent, ColourMapButtonObserver& obs,
ColourMapButton (QWidget* parent, ColourMapButtonObserver& obs,
bool use_shortcuts = false,
bool use_special_colourmaps = true,
bool use_customise_state_items = true);
void set_colourmap_index(size_t index);
void set_scale_inverted(bool yesno);
void set_colourmap_index (size_t index);
void set_scale_inverted (bool yesno);
void set_show_colourbar (bool yesno);
void set_fixed_colour();
vector<QAction*> colourmap_actions;
void open_menu (const QPoint& p) { colourmap_menu->exec (p); }
Expand All @@ -71,6 +72,7 @@ class ColourMapButton : public QToolButton
QMenu* colourmap_menu;
QAction* custom_colour_action;
QAction* invert_scale_action;
QAction* show_colour_bar_action;

size_t fixed_colour_index;

Expand Down
67 changes: 0 additions & 67 deletions src/gui/mrview/colourmap_menu.cpp

This file was deleted.

49 changes: 0 additions & 49 deletions src/gui/mrview/colourmap_menu.h

This file was deleted.

8 changes: 7 additions & 1 deletion src/gui/mrview/displayable.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,10 +138,16 @@ namespace MR
flags_ = cmap;
}

void set_colour (std::array<GLubyte,3> &c) {
void set_colour (const std::array<GLubyte,3> &c) {
colour = c;
}

void set_colour (const QColor &c) {
colour[0] = c.red();
colour[1] = c.green();
colour[2] = c.blue();
}

void set_use_discard_lower (bool yesno) {
if (!discard_lower_enabled()) return;
set_bit (DiscardLower, yesno);
Expand Down
2 changes: 1 addition & 1 deletion src/gui/mrview/tool/overlay.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ namespace MR
if (colourmap_index == -2)
colourmap_index = overlay->colourmap;
else
colourmap_index = -1;
colourmap_index = -1;
}
num_inverted += overlay->scale_inverted();
rate += overlay->scaling_rate();
Expand Down
Loading