IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 22, 2013, 6:27:11 AM (13 years ago)
Author:
eugene
Message:

renaming psImageSmooth_PreAlloc stuff to psImageSmoothCache; setting up for arbitrary shapes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130904/psLib/src/imageops/psImageConvolve.c

    r35767 r36228  
    780780}
    781781
    782 void psImageSmooth_PreAlloc_DataFree (psImageSmooth_PreAlloc_Data *smdata) {
     782void psImageSmoothCacheDataFree (psImageSmoothCacheData *smdata) {
    783783    psFree (smdata->resultX);
    784784    psFree (smdata->resultY);
     
    786786}
    787787
    788 psImageSmooth_PreAlloc_Data *psImageSmooth_PreAlloc_DataAlloc (psImage *image, double sigma, double Nsigma) {
     788// allocate the psImageSmoothCache data structure, but do not define the kernel
     789psImageSmoothCacheData *psImageSmoothCacheAlloc (psImage *image, double sigma, double Nsigma) {
    789790
    790791    psImageSmooth_PreAlloc_Data *smdata = psAlloc(sizeof(psImageSmooth_PreAlloc_Data));
     
    807808    smdata->Ny = image->numRows;            // Number of rows
    808809
    809     IMAGE_SMOOTH_GAUSS(smdata->kernel, smdata->Nrange, sigma, F32);
     810    // IMAGE_SMOOTH_GAUSS(smdata->kernel, smdata->Nrange, sigma, F32);
    810811       
    811812    // use a temp running buffer for X and Y directions.
     
    819820}
    820821
     822// generate a Gaussian smoothing kernel for supplied sigma.  sigma here does not need to match
     823// that used to allocate the structure, but it is recommended
     824bool psImageSmoothCacheKernel_Gauss (psImageSmoothCacheData *smdata, float sigma) {
     825    // check for NULL structure elements?
     826    IMAGE_SMOOTH_GAUSS(smdata->kernel, smdata->Nrange, sigma, F32);
     827    return true;
     828}
     829
    821830// we can use the same DATA structure on multiple images of the same size
    822 bool psImageSmooth_PreAlloc_F32(psImage *image, psImageSmooth_PreAlloc_Data *smdata)
     831bool psImageSmoothCache_F32(psImage *image, psImageSmoothCacheData *smdata)
    823832{
    824833    PS_ASSERT_IMAGE_NON_NULL(image, false);
     834    PS_ASSERT_KERNEL_NON_NULL(smdata->kernel, false);
    825835    // assert on data type
    826836
Note: See TracChangeset for help on using the changeset viewer.