Functions
core/vidl/vidl_convert.h File Reference

Convert frames to vil_image_views. More...

#include "vidl_frame_sptr.h"
#include "vidl_frame.h"
#include <vil/vil_image_view_base.h>

Go to the source code of this file.

Functions

bool vidl_convert_to_view (const vidl_frame &frame, vil_image_view_base &image, vidl_pixel_color require_color=VIDL_PIXEL_COLOR_UNKNOWN)
 Convert the frame into an image view.
vil_image_view_base_sptr vidl_convert_wrap_in_view (const vidl_frame &frame)
 Wrap the frame buffer in an image view if supported.
bool vidl_convert_frame (const vidl_frame &in_frame, vidl_frame &out_frame)
 Convert the pixel format of a frame.
vidl_frame_sptr vidl_convert_frame (const vidl_frame_sptr &in_frame, vidl_pixel_format format)
 Convert the pixel format of a frame.
vidl_frame_sptr vidl_convert_to_frame (const vil_image_view_base_sptr &image)
 Convert the image view smart pointer to a frame.
vidl_frame_sptr vidl_convert_to_frame (const vil_image_view_base &image)
 Convert the image view to a frame.

Detailed Description

Convert frames to vil_image_views.

Author:
Matt Leotta
Date:
16 Jan 2006

This file contains functions used to convert a vidl_frame_sptr into a vil_image_view.

Definition in file vidl_convert.h.


Function Documentation

bool vidl_convert_frame ( vidl_frame const &  in_frame,
vidl_frame out_frame 
)

Convert the pixel format of a frame.

The in_frame.data() is converted from in_frame.pixel_format() to out_frame.pixel_format() and stored in out_frame.data()

Returns:
false if the output frame data is not the correct size.

The in_frame->data() is converted from in_frame->pixel_format() to out_frame->pixel_format() and stored in out_frame->data()

Returns:
false if the output frame data is not the correct size.

Definition at line 470 of file vidl_convert.cxx.

vidl_frame_sptr vidl_convert_frame ( const vidl_frame_sptr in_frame,
vidl_pixel_format  format 
)

Convert the pixel format of a frame.

Convert in_frame to a format by allocating a new frame buffer

The convert in_frame to a format by allocating a new frame buffer

Definition at line 499 of file vidl_convert.cxx.

vidl_frame_sptr vidl_convert_to_frame ( const vil_image_view_base_sptr image)

Convert the image view smart pointer to a frame.

Will wrap the memory if possible, if not the image is converted to the closest vidl_pixel_format

Convert the image view smart pointer to a frame.

Will wrap the memory if possible, if not the image is converted to the closest vidl_pixel_format

Definition at line 521 of file vidl_convert.cxx.

vidl_frame_sptr vidl_convert_to_frame ( const vil_image_view_base image)

Convert the image view to a frame.

Will wrap the memory if possible, if not the image is converted to the closest vidl_pixel_format

Definition at line 532 of file vidl_convert.cxx.

bool vidl_convert_to_view ( vidl_frame const &  frame,
vil_image_view_base image,
vidl_pixel_color  require_color 
)

Convert the frame into an image view.

possibly converts the pixel data type always create a deep copy of the data

Parameters:
require_colorrestricts the color mode of the output if set to UNKNOWN (default) the input color mode is used

Convert the frame into an image view.

possibly converts the pixel data type always create a deep copy of the data

Definition at line 607 of file vidl_convert.cxx.

vil_image_view_base_sptr vidl_convert_wrap_in_view ( vidl_frame const &  frame)

Wrap the frame buffer in an image view if supported.

Returns a null pointer if not possible

Definition at line 743 of file vidl_convert.cxx.