Defines | Functions
core/vil/vil_decimate.cxx File Reference
#include "vil_decimate.h"
#include <vcl_cassert.h>
#include <vil/vil_copy.h>
#include <vil/vil_crop.h>
#include <vil/vil_exception.h>

Go to the source code of this file.

Defines

#define macro(F, T)
#define macro(F, T)

Functions

vil_image_resource_sptr vil_decimate (const vil_image_resource_sptr &src, unsigned i_factor, unsigned j_factor)
 decimate to a region of src.
vil_image_view_base_sptr vil_decimate (const vil_image_view_base_sptr im, unsigned i_factor, unsigned j_factor)

Detailed Description

Author:
Ian Scott.
    Modifications
     23 Oct.2003 - Peter Vanroose - Added support for 64-bit int pixels
   

Definition in file vil_decimate.cxx.


Define Documentation

#define macro (   F,
 
)
Value:
case F : { \
      vil_image_view<T > view(ni,nj,src_->nplanes()); \
      for (unsigned j = 0; j < nj; ++j) \
        for (unsigned i = 0; i < ni; ++i) { \
          vil_image_view<T > pixel=src_->get_view((i+i0)*i_factor_,1,(j+j0)*j_factor_,1); \
          assert ((bool)pixel); \
          vil_copy_to_window(pixel, view, i, j); } \
      return new vil_image_view<T >(view); }
#define macro (   F,
 
)
Value:
case F : \
    return new vil_image_view<T >(vil_decimate(static_cast<vil_image_view<T >&>(*im), \
                                  i_factor, j_factor));

Function Documentation

vil_image_resource_sptr vil_decimate ( const vil_image_resource_sptr src,
unsigned  i_factor,
unsigned  j_factor 
)

decimate to a region of src.

Definition at line 23 of file vil_decimate.cxx.

vil_image_view_base_sptr vil_decimate ( const vil_image_view_base_sptr  im,
unsigned  i_factor,
unsigned  j_factor 
)

Definition at line 114 of file vil_decimate.cxx.