112 int handleWidth=3,
bool visualizeCenter=
false,
113 bool visualizeHovering=
true,
114 bool showOffsetText=
false,
115 bool showSizeText=
false,
116 bool showCenterText=
false,
117 bool showMetaData=
false,
178 bool allHovered()
const;
180 bool allDragged()
const;
182 bool anyDragged()
const;
209 void callCallbacks();
214 void registerCallback(
const std::string &
id,
Callback cb);
215 void unregisterCallback(
const std::string &
id);
234 const Options &getOptions()
const;
237 void clearAllRects();
243 void clearRectAt(
int x,
int y,
bool all=
false);
251 void setMaxRects(
int maxRects);
254 void setMinDim(
int minDim);
257 int getNumRects()
const;
264 std::vector<utils::Rect> getRects()
const;
273 std::vector<utils::Rect> getAllRectsAt(
int x,
int y)
const;
276 int getMinDim()
const;
279 int getMaxRects()
const;
282 const utils::Any &getMetaData(
int index)
const;
285 const utils::Any &getMetaDataAt(
int x,
int y)
const;
294 void bringToFront(
int idx);
297 void bringToBack(
int idx);
The General Function Template.
Definition: Function.h:284
Cummulative Options structure.
Definition: DefineRectanglesMouseHandler.h:105
int xStepping
can be set to force a given stepping for defined rectangles (x-direction)
Definition: DefineRectanglesMouseHandler.h:134
undocument this line if you encounter any issues!
Definition: Any.h:37
core::Color4D centerColor
edge color used for the center visualization
Definition: DefineRectanglesMouseHandler.h:123
utils::Any meta
this can be used to attach meta data to rectangles
Definition: DefineRectanglesMouseHandler.h:194
std::map< std::string, Callback > callbacks
Definition: DefineRectanglesMouseHandler.h:208
nothing is currently done with this edge
Definition: DefineRectanglesMouseHandler.h:155
State
Edge states.
Definition: DefineRectanglesMouseHandler.h:154
core::Color4D edgeColor
edge color for rect visualization
Definition: DefineRectanglesMouseHandler.h:121
core::Color4D fillColor
fill color for rect visualization (set alpha to 0 to have no fill)
Definition: DefineRectanglesMouseHandler.h:122
utils::Point currCurr
used for the currently defined rectangle
Definition: DefineRectanglesMouseHandler.h:202
static const Rect null
null Rect is w=0, h=0, x=0, y=0
Definition: Rect.h:99
this edge is currently hovered (mouse over/not dragged)
Definition: DefineRectanglesMouseHandler.h:156
bool visualizeCenter
if true, the center of each rectangle is visualized
Definition: DefineRectanglesMouseHandler.h:126
ICLQt_API ImgROI data(ImgQ &r)
creates full ROI ROI-struct
int handleWidth
handle width (amount of pixels, you can be of an edge and still drag it)
Definition: DefineRectanglesMouseHandler.h:125
int yStepping
can be set to force a given stepping for defined rectangles (x-direction)
Definition: DefineRectanglesMouseHandler.h:135
std::vector< DefinedRect > rects
list of defined rectanges
Definition: DefineRectanglesMouseHandler.h:200
Top edge.
Definition: DefineRectanglesMouseHandler.h:148
Internally used utils::Rect structure.
Definition: DefineRectanglesMouseHandler.h:142
DefinedRect * draggedRect
use if any rectangle is currently moved or manipulated
Definition: DefineRectanglesMouseHandler.h:203
Utility mouse handler implementation that allows to define rectangles via drag and drop.
Definition: DefineRectanglesMouseHandler.h:102
MouseEvent Handler.
Definition: MouseHandler.h:92
int lineWidth
linewidth for visualization
Definition: DefineRectanglesMouseHandler.h:132
utils::Point allDragOffs
Internal help variable for smooth shifting of the whole rectangle.
Definition: DefineRectanglesMouseHandler.h:164
bool showCenterText
if true, the rects center is shown (as text)
Definition: DefineRectanglesMouseHandler.h:130
#define ICLQt_API
Definition: CompatMacros.h:178
Bottom edge.
Definition: DefineRectanglesMouseHandler.h:150
Point class of the ICL used e.g. for the Images ROI offset.
Definition: Point.h:58
Provided by interface MouseGrabber.
Definition: MouseEvent.h:86
utils::Function< void, const std::vector< utils::Rect > & > Callback
Definition: DefineRectanglesMouseHandler.h:207
utils::Point currBegin
used for the currently defined rectangle
Definition: DefineRectanglesMouseHandler.h:201
bool showOffsetText
if true, the rects upper left pixel's coordinates are shown (as text)
Definition: DefineRectanglesMouseHandler.h:128
core::Color4D metaColor
text color for visualization of meta-data
Definition: DefineRectanglesMouseHandler.h:124
bool showMetaData
if true, the meta data is shown as (as text)
Definition: DefineRectanglesMouseHandler.h:131
DefineRectanglesMouseHandler::Options * options
a pointer to the parent DefineRectanglesMouseHandler's Option structure
Definition: DefineRectanglesMouseHandler.h:167
int minDim
minimum dimension of rectangles
Definition: DefineRectanglesMouseHandler.h:199
ICLQt_API void rect(ImgQ &image, int x, int y, int w, int h, int rounding=0)
draws a rect into an image
Interface for objects, that can be locked using an internal mutex.
Definition: Lockable.h:41
bool visualizeHovering
if true, the rects boundary are drawn thicker if they are hovered
Definition: DefineRectanglesMouseHandler.h:127
Rectangle class of the ICL used e.g. for the Images ROI-rect.
Definition: Rect.h:95
Options options
options structure
Definition: DefineRectanglesMouseHandler.h:204
Edge
Edges.
Definition: DefineRectanglesMouseHandler.h:147
Simple generic data type implementation that uses a string based data representation.
Definition: Any.h:109
float textSize
text size used for all texts (note: if this is negative, it's defined in image pixels)
Definition: DefineRectanglesMouseHandler.h:133
Right edge.
Definition: DefineRectanglesMouseHandler.h:149
bool showSizeText
if true, the rects size is shown (as text)
Definition: DefineRectanglesMouseHandler.h:129
int maxRects
maximum count of rectangles
Definition: DefineRectanglesMouseHandler.h:198
bool canDeleteRects
defines whether rectangles can be deleted using right click
Definition: DefineRectanglesMouseHandler.h:136