Changeset 14815
- Timestamp:
- 07/04/08 23:18:22 (5 months ago)
- Files:
-
- trunk/gdal/gcore/gdaldataset.cpp (modified) (2 diffs)
- trunk/gdal/gcore/gdalrasterband.cpp (modified) (1 diff)
- trunk/gdal/gcore/overview.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/gdal/gcore/gdaldataset.cpp
r14804 r14815 1172 1172 * This method is the same as the C function GDALBuildOverviews(). 1173 1173 * 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. 1176 1175 * @param nOverviews number of overviews to build. 1177 1176 * @param panOverviewList the list of overview decimation factors to build. … … 1192 1191 * GDALDummyProgress, NULL ); 1193 1192 * </pre> 1193 * 1194 * @see GDALRegenerateOverviews() 1194 1195 */ 1195 1196 trunk/gdal/gcore/gdalrasterband.cpp
r14377 r14815 1976 1976 * from a practical point of view. 1977 1977 * 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. 1980 1979 * @param nOverviews number of overviews to build. 1981 1980 * @param panOverviewList the list of overview decimation factors to build. trunk/gdal/gcore/overview.cpp
r14813 r14815 580 580 /* GDALRegenerateOverviews() */ 581 581 /************************************************************************/ 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 */ 582 605 CPLErr 583 606 GDALRegenerateOverviews( GDALRasterBandH hSrcBand, 584 int nOverview s, GDALRasterBandH *pahOvrBands,607 int nOverviewCount, GDALRasterBandH *pahOvrBands, 585 608 const char * pszResampling, 586 609 GDALProgressFunc pfnProgress, void * pProgressData ) … … 596 619 GDALColorTable* poColorTable = NULL; 597 620 621 if( pfnProgress == NULL ) 622 pfnProgress = GDALDummyProgress; 623 598 624 if (EQUALN(pszResampling,"AVER",4) && 599 625 poSrcBand->GetColorInterpretation() == GCI_PaletteIndex) … … 624 650 /* amount of computation. */ 625 651 /* -------------------------------------------------------------------- */ 626 if( (EQUALN(pszResampling,"AVER",4) || EQUALN(pszResampling,"GAUSS",5)) && nOverview s> 1 )652 if( (EQUALN(pszResampling,"AVER",4) || EQUALN(pszResampling,"GAUSS",5)) && nOverviewCount > 1 ) 627 653 return GDALRegenerateCascadingOverviews( poSrcBand, 628 nOverview s, papoOvrBands,654 nOverviewCount, papoOvrBands, 629 655 pszResampling, 630 656 pfnProgress, … … 734 760 } 735 761 736 for( int iOverview = 0; iOverview < nOverview s; iOverview++ )762 for( int iOverview = 0; iOverview < nOverviewCount; iOverview++ ) 737 763 { 738 764 if( eType == GDT_Float32 ) … … 756 782 { 757 783 GDALOverviewMagnitudeCorrection( (GDALRasterBandH) poSrcBand, 758 nOverview s,784 nOverviewCount, 759 785 (GDALRasterBandH *) papoOvrBands, 760 786 GDALDummyProgress, NULL ); … … 764 790 /* It can be important to flush out data to overviews. */ 765 791 /* -------------------------------------------------------------------- */ 766 for( int iOverview = 0; iOverview < nOverview s; iOverview++ )792 for( int iOverview = 0; iOverview < nOverviewCount; iOverview++ ) 767 793 papoOvrBands[iOverview]->FlushCache(); 768 794
