Skip to content

Commit c3e6507

Browse files
committed
Restore compilation following merging master to dev ##3255
In particular this includes resolving #3215 and #2755.
1 parent 34dfece commit c3e6507

File tree

7 files changed

+20
-9
lines changed

7 files changed

+20
-9
lines changed

cpp/core/algo/threaded_loop.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,10 @@ template <class OuterLoopType> struct ThreadedLoopRunOuter {
337337
};
338338

339339
MutexProtected<Shared> shared = {iterator, outer_loop(iterator)};
340-
340+
auto get_iterator = [](MutexProtected<Shared> &shared) {
341+
auto guard = shared.lock();
342+
return guard->iterator;
343+
};
341344
struct PerThread {
342345
MutexProtected<Shared> &shared;
343346
Iterator pos;
@@ -351,7 +354,7 @@ template <class OuterLoopType> struct ThreadedLoopRunOuter {
351354
while (shared.lock()->next(pos))
352355
func(pos);
353356
}
354-
} loop_thread = {shared, shared.iterator, functor};
357+
} loop_thread = {shared, get_iterator(shared), functor};
355358

356359
auto threads = Thread::run(Thread::multi(loop_thread), "loop threads");
357360

cpp/core/dwi/tractography/SIFT/output.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
#pragma once
1818

19+
#include <vector>
20+
1921
#include "header.h"
2022
#include "image.h"
2123

@@ -204,7 +206,7 @@ template <class Fixel> void ModelBase<Fixel>::output_scatterplot(std::string_vie
204206
out << "# " << App::command_history_string << "\n";
205207
const default_type current_mu = mu();
206208
out << "#Fibre density,Track density (unscaled),Track density (scaled),Weight,\n";
207-
typename vector<Fixel>::const_iterator i = fixels.begin(); // Skip first null fixel in DWI::Fixel_map<>
209+
typename std::vector<Fixel>::const_iterator i = fixels.begin(); // Skip first null fixel in DWI::Fixel_map<>
208210
for (++i; i != fixels.end(); ++i)
209211
out << str(i->get_FOD()) << "," << str(i->get_TD()) << "," << str(i->get_TD() * current_mu) << ","
210212
<< str(i->get_weight()) << ",\n";

cpp/core/dwi/tractography/SIFT2/tckfactor.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
* For more details, see http://www.mrtrix.org/.
1515
*/
1616

17+
#include <vector>
18+
1719
#include "header.h"
1820
#include "image.h"
1921

@@ -58,7 +60,7 @@ void TckFactor::remove_excluded_fixels(const float min_td_frac) {
5860
const double cf = calc_cost_function();
5961
SIFT::track_t excluded_count = 0, zero_TD_count = 0;
6062
double zero_TD_cf_sum = 0.0, excluded_cf_sum = 0.0;
61-
vector<Fixel>::iterator i = fixels.begin(); // SKip first fixel, which is an intentional null in DWI::Fixel_map<>
63+
std::vector<Fixel>::iterator i = fixels.begin(); // SKip first fixel, which is an intentional null in DWI::Fixel_map<>
6264
for (++i; i != fixels.end(); ++i) {
6365
if (!i->get_orig_TD()) {
6466
++zero_TD_count;

cpp/gui/mrview/mode/slice.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
#include "mrview/mode/slice.h"
1818

19+
#include "mrview/tool/roi_editor/item.h"
1920
#include "opengl/transformation.h"
2021

2122
namespace MR::GUI::MRView::Mode {

cpp/gui/mrview/tool/fixel/base_fixel.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
#include <cstdint>
2020
#include <unordered_map>
21+
#include <vector>
2122

2223
#include "header.h"
2324
#include "image.h"
@@ -264,15 +265,14 @@ class BaseFixel : public Displayable {
264265
GL::VertexBuffer regular_grid_threshold_buffer;
265266

266267
// Index buffer for rendering slabs
267-
vector<uint32_t> element_indices;
268+
std::vector<uint32_t> element_indices;
268269

269270
float voxel_size_length_multipler;
270271
float user_line_length_multiplier;
271272
float line_thickness;
272273
};
273274

274275
// Wrapper to generically store fixel data
275-
276276
template <typename ImageType> class FixelType : public BaseFixel {
277277
public:
278278
FixelType(std::string_view filename, Fixel &fixel_tool)
@@ -289,4 +289,5 @@ template <typename ImageType> class FixelType : public BaseFixel {
289289

290290
using FixelImage4DType = MR::Image<float>;
291291
using FixelIndexImageType = MR::Image<uint32_t>;
292+
292293
} // namespace MR::GUI::MRView::Tool

cpp/gui/mrview/tool/tractography/tractogram.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ void Tractogram::load_tracks_onto_GPU(std::vector<Eigen::Vector3f> &buffer,
909909
num_tracks_per_buffer.push_back(tck_count);
910910

911911
// Build an index buffer for this chunk of tracks
912-
vector<uint32_t> chunk_indices;
912+
std::vector<uint32_t> chunk_indices;
913913
for (size_t t = 0; t < sizes.size(); ++t) {
914914
const GLint start = starts[t];
915915
const GLint n = sizes[t];

cpp/gui/mrview/tool/tractography/tractogram.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
#pragma once
1818

19+
#include <vector>
20+
1921
#include "dwi/tractography/properties.h"
2022
#include "mrview/displayable.h"
2123
#include "mrview/tool/tractography/tractography.h"
@@ -141,8 +143,8 @@ class Tractogram : public Displayable {
141143
std::vector<size_t> num_tracks_per_buffer;
142144

143145
// EBOs and indices for chunks of tracks
144-
vector<GLuint> element_buffers;
145-
vector<GLsizei> element_counts;
146+
std::vector<GLuint> element_buffers;
147+
std::vector<GLsizei> element_counts;
146148

147149
GLint sample_stride;
148150
bool vao_dirty;

0 commit comments

Comments
 (0)