TuttleOFX
1
|
Data Structures | |
struct | Connexity4 |
struct | Connexity8 |
struct | IsUpper |
struct | FloodElement |
A range of pixels in a line to propagate. More... | |
Enumerations | |
enum | EDirection { eDirectionAbove = 0, eDirectionBellow = 1 } |
Functions | |
template<class SIterator , class DIterator , class DPixel , class Test > | |
GIL_FORCEINLINE void | fill_pixels_range_if (SIterator srcBegin, const SIterator &srcEnd, DIterator dstBegin, const DPixel &value, const Test &condition) |
fill all pixels respecting the condition in a range of pixels (on the same line or with an 1d_traversable image). | |
GIL_FORCEINLINE EDirection | invertDirection (const EDirection d) |
template<class Connexity , class StrongTest , class SoftTest , class SView , class DView , template< class > class Allocator> | |
void | flood_fill (const SView &srcView, const Rect< std::ssize_t > &srcRod, DView &dstView, const Rect< std::ssize_t > &dstRod, const Rect< std::ssize_t > &procWindow, const StrongTest &strongTest, const SoftTest &softTest) |
Flood fill an image, with 2 conditions. Fill all pixels respecting the soft condition if connected with a pixel respecting the strong condition. | |
template<class StrongTest , class SoftTest , class SView , class DView > | |
void | flood_fill_bruteForce (const SView &srcView, const Rect< std::ssize_t > &srcRod, DView &dstView, const Rect< std::ssize_t > &dstRod, const Rect< std::ssize_t > &procWindow, const StrongTest &strongTest, const SoftTest &softTest) |
Simplest implementation of flood fill algorithm. |
Definition at line 73 of file floodFill.hpp.
GIL_FORCEINLINE void terry::filter::floodFill::fill_pixels_range_if | ( | SIterator | srcBegin, |
const SIterator & | srcEnd, | ||
DIterator | dstBegin, | ||
const DPixel & | value, | ||
const Test & | condition | ||
) |
fill all pixels respecting the condition
in a range of pixels (on the same line or with an 1d_traversable image).
Definition at line 25 of file floodFill.hpp.
Referenced by flood_fill().
void terry::filter::floodFill::flood_fill | ( | const SView & | srcView, |
const Rect< std::ssize_t > & | srcRod, | ||
DView & | dstView, | ||
const Rect< std::ssize_t > & | dstRod, | ||
const Rect< std::ssize_t > & | procWindow, | ||
const StrongTest & | strongTest, | ||
const SoftTest & | softTest | ||
) |
Flood fill an image, with 2 conditions. Fill all pixels respecting the soft condition if connected with a pixel respecting the strong condition.
[in] | srcView | input image |
[in] | srcRod | input image ROD |
[out] | dstView | input image |
[in] | dstRod | output image ROD |
[in] | procWindow | region to process |
[in] | strongCondition | functor with the strong test |
[in] | softCondition | functor with the soft test |
Definition at line 121 of file floodFill.hpp.
References eDirectionAbove, eDirectionBellow, terry::draw::fill_pixels_range(), fill_pixels_range_if(), invertDirection(), terry::rectanglesIntersection(), terry::Rect< T >::x1, terry::Rect< T >::x2, terry::Rect< T >::y1, and terry::Rect< T >::y2.
void terry::filter::floodFill::flood_fill_bruteForce | ( | const SView & | srcView, |
const Rect< std::ssize_t > & | srcRod, | ||
DView & | dstView, | ||
const Rect< std::ssize_t > & | dstRod, | ||
const Rect< std::ssize_t > & | procWindow, | ||
const StrongTest & | strongTest, | ||
const SoftTest & | softTest | ||
) |
Simplest implementation of flood fill algorithm.
<
Definition at line 490 of file floodFill.hpp.
References tuttle::plugin::merge::copy_pixels(), terry::max_value(), terry::pointInRect(), terry::rectangleReduce(), terry::subimage_view(), terry::translateRegion(), terry::Rect< T >::x1, terry::Rect< T >::x2, terry::Rect< T >::y1, and terry::Rect< T >::y2.
GIL_FORCEINLINE EDirection terry::filter::floodFill::invertDirection | ( | const EDirection | d | ) |
Definition at line 80 of file floodFill.hpp.
References eDirectionAbove, and eDirectionBellow.
Referenced by flood_fill().