Changeset 14815

Show
Ignore:
Timestamp:
07/04/08 23:18:22 (5 months ago)
Author:
warmerdam
Message:

improve overview generation documentation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/gdal/gcore/gdaldataset.cpp

    r14804 r14815  
    11721172 * This method is the same as the C function GDALBuildOverviews(). 
    11731173 * 
    1174  * @param pszResampling one of "NEAREST", "AVERAGE" or "MODE" controlling 
    1175  * the downsampling method applied. 
     1174 * @param pszResampling one of "NEAREST", "AVERAGE", "AVERAGE_MAGPHASE",  or "GAUSS" controlling the downsampling method applied. 
    11761175 * @param nOverviews number of overviews to build.  
    11771176 * @param panOverviewList the list of overview decimation factors to build.  
     
    11921191 *                              GDALDummyProgress, NULL ); 
    11931192 * </pre> 
     1193 * 
     1194 * @see GDALRegenerateOverviews() 
    11941195 */ 
    11951196 
  • trunk/gdal/gcore/gdalrasterband.cpp

    r14377 r14815  
    19761976 * from a practical point of view.  
    19771977 * 
    1978  * @param pszResampling one of "NEAREST", "AVERAGE" or "MODE" controlling 
    1979  * the downsampling method applied. 
     1978 * @param pszResampling one of "NEAREST", "AVERAGE", "AVERAGE_MAGPHASE",  or "GAUSS" controlling the downsampling method applied. 
    19801979 * @param nOverviews number of overviews to build.  
    19811980 * @param panOverviewList the list of overview decimation factors to build.  
  • trunk/gdal/gcore/overview.cpp

    r14813 r14815  
    580580/*                      GDALRegenerateOverviews()                       */ 
    581581/************************************************************************/ 
     582 
     583/** 
     584 * Generate downsampled overviews. 
     585 * 
     586 * This function will generate one or more overview images from a base 
     587 * image using the requested downsampling algorithm.  It's primary use 
     588 * is for generating overviews via GDALDataset::BuildOverviews(), but it 
     589 * can also be used to generate downsampled images in one file from another 
     590 * outside the overview architecture. 
     591 * 
     592 * The output bands need to exist in advance.  
     593 * 
     594 * The full set of resampling algorithms is documented in  
     595 * GDALDataset::BuildOverviews(). 
     596 * 
     597 * @param hSrcBand the source (base level) band.  
     598 * @param nOverviewCount the number of downsampled bands being generated. 
     599 * @param pahOvrBands the list of downsampled bands to be generated. 
     600 * @param pszResampling Resampling algorithm (eg. "AVERAGE").  
     601 * @param pfnProgress progress report function. 
     602 * @param pProgressData progress function callback data. 
     603 * @return CE_None on success or CE_Failure on failure. 
     604 */ 
    582605CPLErr  
    583606GDALRegenerateOverviews( GDALRasterBandH hSrcBand, 
    584                          int nOverviews, GDALRasterBandH *pahOvrBands,  
     607                         int nOverviewCount, GDALRasterBandH *pahOvrBands,  
    585608                         const char * pszResampling,  
    586609                         GDALProgressFunc pfnProgress, void * pProgressData ) 
     
    596619    GDALColorTable* poColorTable = NULL; 
    597620 
     621    if( pfnProgress == NULL ) 
     622        pfnProgress = GDALDummyProgress; 
     623 
    598624    if (EQUALN(pszResampling,"AVER",4) && 
    599625        poSrcBand->GetColorInterpretation() == GCI_PaletteIndex) 
     
    624650/*      amount of computation.                                          */ 
    625651/* -------------------------------------------------------------------- */ 
    626     if( (EQUALN(pszResampling,"AVER",4) || EQUALN(pszResampling,"GAUSS",5)) && nOverviews > 1 ) 
     652    if( (EQUALN(pszResampling,"AVER",4) || EQUALN(pszResampling,"GAUSS",5)) && nOverviewCount > 1 ) 
    627653        return GDALRegenerateCascadingOverviews( poSrcBand,  
    628                                                  nOverviews, papoOvrBands, 
     654                                                 nOverviewCount, papoOvrBands, 
    629655                                                 pszResampling,  
    630656                                                 pfnProgress, 
     
    734760        } 
    735761         
    736         for( int iOverview = 0; iOverview < nOverviews; iOverview++ ) 
     762        for( int iOverview = 0; iOverview < nOverviewCount; iOverview++ ) 
    737763        { 
    738764            if( eType == GDT_Float32 ) 
     
    756782    { 
    757783        GDALOverviewMagnitudeCorrection( (GDALRasterBandH) poSrcBand,  
    758                                          nOverviews,  
     784                                         nOverviewCount,  
    759785                                         (GDALRasterBandH *) papoOvrBands, 
    760786                                         GDALDummyProgress, NULL ); 
     
    764790/*      It can be important to flush out data to overviews.             */ 
    765791/* -------------------------------------------------------------------- */ 
    766     for( int iOverview = 0; iOverview < nOverviews; iOverview++ ) 
     792    for( int iOverview = 0; iOverview < nOverviewCount; iOverview++ ) 
    767793        papoOvrBands[iOverview]->FlushCache(); 
    768794