getStep( const Box2i &dw , bool reduceTime)
{

    // limit to approximately 2,000,000 pixels in fast mode
    if (reduceTime)
    {
        size_t pixelCount = (dw.max.y - dw.min.y + 1);
        pixelCount *= (dw.max.x - dw.min.x + 1);
        return  max( 1 , static_cast<int>(pixelCount / 2000000) );
    }
    else
    {
        return 1;
    }

}
getStep( const Box2i &dw , bool reduceTime)
{

     
    if (reduceTime)
    {
        size_t pixelCount = (dw.max.y - dw.min.y + 1);
        pixelCount *= (dw.max.x - dw.min.x + 1);
        return  max( 1 , static_cast<int>(pixelCount / 2000000) );
    }
    else
    {
        return 1;
    }

}