Functions
contrib/mul/vimt/vimt_crop.h File Reference

Create windows into vimt_images. More...

#include <vimt/vimt_image_2d_of.h>
#include <vil/vil_crop.h>
#include <vcl_cmath.h>
#include <vcl_cassert.h>

Go to the source code of this file.

Functions

template<class T >
vimt_image_2d_of< T > vimt_crop (const vimt_image_2d_of< T > &im, unsigned x0, unsigned nx, unsigned y0, unsigned ny)
 Create windowed view of given image.
template<class T >
vimt_image_2d_of< T > vimt_crop (const vimt_image_2d_of< T > &im, const vgl_box_2d< double > &bbox)
 Create windowed view of given image by specifying a bounding box in world co-ords.

Detailed Description

Create windows into vimt_images.

Author:
Tim Cootes, Ian Scott

Definition in file vimt_crop.h.


Function Documentation

template<class T >
vimt_image_2d_of<T> vimt_crop ( const vimt_image_2d_of< T > &  im,
unsigned  x0,
unsigned  nx,
unsigned  y0,
unsigned  ny 
)

Create windowed view of given image.

The parameters should be in image co-ords. The world2im transform is set to match so this appears identical to im when addressed in world co-ords. O(1).

Definition at line 20 of file vimt_crop.h.

template<class T >
vimt_image_2d_of<T> vimt_crop ( const vimt_image_2d_of< T > &  im,
const vgl_box_2d< double > &  bbox 
)

Create windowed view of given image by specifying a bounding box in world co-ords.

The world2im transform is set so that this appears identical to im when addressed in world co-ords.

Parameters:
imThe input image.
bboxBounding box of desired crop region in world coords.
Returns:
A cropped view of the original image.
Note:
The crop region may be expanded slightly as required to fit the voxel grid.
If the crop region extends outside the image, it is truncated to fit the image.

Definition at line 38 of file vimt_crop.h.