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

Various type conversion functions for vimt_image objects. More...

#include <vimt/vimt_image_2d_of.h>
#include <vil/vil_convert.h>

Go to the source code of this file.

Functions

template<class srcT , class destT >
void vimt_convert_cast (const vimt_image_2d_of< srcT > &src_im, vimt_image_2d_of< destT > &dest_im)
 Converts by applying a cast.
template<class srcT , class destT >
void vimt_convert_round (const vimt_image_2d_of< srcT > &src_im, vimt_image_2d_of< destT > &dest_im)
 Converts by rounding.
template<class srcT >
void vimt_convert_stretch_range (const vimt_image_2d_of< srcT > &src_im, vimt_image_2d_of< vxl_byte > &dest_im)
 Convert src to byte image dest by stretching to range [0,255].

Detailed Description

Various type conversion functions for vimt_image objects.

Author:
Tim Cootes Note: There is a general rule that we should not duplicate vil classes or functions with trivial wrappers in vimt. These conversion functions break that rule because they are used so frequently.

Definition in file vimt_convert.h.


Function Documentation

template<class srcT , class destT >
void vimt_convert_cast ( const vimt_image_2d_of< srcT > &  src_im,
vimt_image_2d_of< destT > &  dest_im 
)

Converts by applying a cast.

If the two pixel types are the same, the destination may only be a shallow copy of the source.

Definition at line 21 of file vimt_convert.h.

template<class srcT , class destT >
void vimt_convert_round ( const vimt_image_2d_of< srcT > &  src_im,
vimt_image_2d_of< destT > &  dest_im 
)

Converts by rounding.

If the two pixel types are the same, the destination may only be a shallow copy of the source.

Definition at line 32 of file vimt_convert.h.

template<class srcT >
void vimt_convert_stretch_range ( const vimt_image_2d_of< srcT > &  src_im,
vimt_image_2d_of< vxl_byte > &  dest_im 
)

Convert src to byte image dest by stretching to range [0,255].

Definition at line 41 of file vimt_convert.h.