Commit 7e3c8301 authored by Stéphane Albert's avatar Stéphane Albert
Browse files

ENH: Added otb::GDALOverviewsBuilder IsBypassEnabled flag, set & get.

parent e4b5e5c3
......@@ -117,6 +117,10 @@ public:
void SetResamplingMethod( GDALResampling );
void SetBypassEnabled( bool );
bool IsBypassEnabled() const;
unsigned int GetWidth() const;
unsigned int GetHeight() const;
......@@ -173,6 +177,7 @@ private:
GDALResampling m_ResamplingMethod;
GDALCompression m_CompressionMethod;
GDALFormat m_Format;
bool m_IsBypassEnabled : 1;
}; // end of GDALOverviewsBuilder
......
......@@ -109,7 +109,8 @@ GDALOverviewsBuilder
m_ResolutionFactor( 2 ),
m_ResamplingMethod( GDAL_RESAMPLING_NEAREST ),
m_CompressionMethod( GDAL_COMPRESSION_NONE ),
m_Format( GDAL_FORMAT_GEOTIFF )
m_Format( GDAL_FORMAT_GEOTIFF ),
m_IsBypassEnabled( false )
{
Superclass::SetNumberOfRequiredInputs(0);
Superclass::SetNumberOfRequiredOutputs(0);
......@@ -203,6 +204,22 @@ GDALOverviewsBuilder
}
}
/***************************************************************************/
void
GDALOverviewsBuilder
::SetBypassEnabled( bool isEnabled )
{
m_IsBypassEnabled = isEnabled;;
}
/***************************************************************************/
bool
GDALOverviewsBuilder
::IsBypassEnabled() const
{
return m_IsBypassEnabled;
}
/***************************************************************************/
unsigned int
GDALOverviewsBuilder
......@@ -389,7 +406,9 @@ GDALOverviewsBuilder
*/
/***************************************************************************/
void GDALOverviewsBuilder::Update()
void
GDALOverviewsBuilder
::Update()
{
// typedef itk::SmartPointer<GDALDatasetWrapper> GDALDatasetWrapperPointer;
// GDALDatasetWrapperPointer wrappedDataset =
......@@ -411,6 +430,9 @@ void GDALOverviewsBuilder::Update()
);
}
if( m_IsBypassEnabled )
return;
// Build the overviews list from nb of resolution desired
std::vector< int > ovwlist;
unsigned int factor = 1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment