imglib / imglib2-roi

Regions of interest (ROIs) and labelings for ImgLib2
Other
8 stars 8 forks source link

Iterator over integer-valued line. #41

Closed tinevez closed 5 years ago

tinevez commented 5 years ago

An iterable over a quasi Bresenham line.

It will iterate exactly once over all the integer locations on a line between in proper order from the specified start to the specified end points, included.

This implementation uses floating-point logic instead of the pure integer logic of Bresenham line (Wikipedia) but the results are quasi identical and the performance penalty small.

tinevez commented 5 years ago

Done!

ctrueden commented 5 years ago

@tpietzsch @awalter17 Any reason this cannot be merged now?

stelfrich commented 5 years ago

This would be so nice to have! Just the other week I had to hack together a Bresenham implementation, while this was sitting here the whole time.. 😞

tpietzsch commented 5 years ago

Thank you @tinevez! (And thank you @stelfrich for bumping this again. Sorry for taking so long.)