Classes | Functions
core/vil/vil_crop.h File Reference
#include <vil/vil_image_resource.h>
#include <vil/vil_image_view.h>
#include <vcl_cassert.h>

Go to the source code of this file.

Classes

class  vil_crop_image_resource
 A generic_image adaptor that behaves like a cropped version of its input. More...

Functions

template<class T >
vil_image_view< T > vil_crop (const vil_image_view< T > &im, unsigned i0, unsigned n_i, unsigned j0, unsigned n_j)
 Create a view which is a cropped version of src.
vil_image_resource_sptr vil_crop (const vil_image_resource_sptr &src, unsigned i0, unsigned n_i, unsigned j0, unsigned n_j)
 Crop to a region of src.

Detailed Description

Author:
Ian Scott.

Definition in file vil_crop.h.


Function Documentation

template<class T >
vil_image_view< T > vil_crop ( const vil_image_view< T > &  im,
unsigned  i0,
unsigned  n_i,
unsigned  j0,
unsigned  n_j 
) [inline]

Create a view which is a cropped version of src.

Doesn't modify underlying data. O(1).

Returns:
an n_i x n_j window of im with offset (i0,j0)

Definition at line 21 of file vil_crop.h.

vil_image_resource_sptr vil_crop ( const vil_image_resource_sptr src,
unsigned  i0,
unsigned  n_i,
unsigned  j0,
unsigned  n_j 
)

Crop to a region of src.

Definition at line 15 of file vil_crop.cxx.