17#ifndef __gui_mrview_tool_roi_editor_item_h__
18#define __gui_mrview_tool_roi_editor_item_h__
42 constexpr std::array<std::array<GLubyte,3>,6> preset_colours = { {
61 template <
class ImageType>
62 void save (ImageType&&, GLubyte*);
64 bool has_undo () {
return current_undo >= 0; }
65 bool has_redo () {
return current_undo < int(undo_list.size()-1); }
74 float min_brush_size, max_brush_size, brush_size;
80 static int number_of_undos;
81 static int current_preset_colour;
82 static int new_roi_counter;
87 template <
class ImageType>
88 void ROI_Item::save (ImageType&& out, GLubyte* data)
90 for (
auto l =
Loop(out) (out); l; ++l)
91 out.value() = data[out.index(0) + out.size(0) * (out.index(1) + out.size(1)*out.index(2))];
FORCE_INLINE LoopAlongAxes Loop()