I’d like to draw cross hairs in an image. Currently I’m using 4 LineIterators. Is there a way to reuse one iterator and specify new start and end indices for each of the four lines?
You could construct and assign a line iterator 4 times, e.g.:
using LineIteratorType = ...;
LineIteratorType it = LineIteratorType(image, firstIndex1, lastIndex1);
//iterate!
it = LineIteratorType(image, firstIndex2, lastIndex2); //reuse the it variable
I am not sure how much of an improvement this is over simply using 4 different iterator variables.
That is what I’ve been looking for, thank you.