Public Member Functions | Protected Attributes | Private Attributes
vidl_memory_chunk_frame Class Reference

A frame buffer that wraps a vil_memory_chunk. More...

#include <vidl_frame.h>

Inheritance diagram for vidl_memory_chunk_frame:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 vidl_memory_chunk_frame ()
 Constructor.
 vidl_memory_chunk_frame (unsigned ni, unsigned nj, vidl_pixel_format fmt, const vil_memory_chunk_sptr &memory)
 Constructor - from a vil_memory_chunk_sptr.
 vidl_memory_chunk_frame (const vil_image_view_base &image, vidl_pixel_format fmt=VIDL_PIXEL_FORMAT_UNKNOWN)
 Constructor - from a vil_image_view.
const vil_memory_chunk_sptrmemory_chunk () const
 Return the memory chunk.
virtual ~vidl_memory_chunk_frame ()
 Destructor.
virtual void invalidate ()
 Make the buffer invalid (data()==0 and size()==0).
virtual void * data ()
 Return a pointer to the first element of data.
virtual const void * data () const
virtual unsigned long size () const
 The size of the buffer in bytes.
unsigned ni () const
 Width.
unsigned nj () const
 Height.
vidl_pixel_format pixel_format () const
 Return the pixel format.
void ref ()
 Increment reference count.
void unref ()
 Decrement reference count.
int ref_count () const
 Number of objects referring to this data.

Protected Attributes

unsigned ni_
 frame width.
unsigned nj_
 frame height.
vidl_pixel_format format_
 frame pixel format.

Private Attributes

vil_memory_chunk_sptr memory_

Detailed Description

A frame buffer that wraps a vil_memory_chunk.

This is useful when the frame actually came from a vil_image

Definition at line 117 of file vidl_frame.h.


Constructor & Destructor Documentation

vidl_memory_chunk_frame::vidl_memory_chunk_frame ( ) [inline]

Constructor.

Definition at line 121 of file vidl_frame.h.

vidl_memory_chunk_frame::vidl_memory_chunk_frame ( unsigned  ni,
unsigned  nj,
vidl_pixel_format  fmt,
const vil_memory_chunk_sptr memory 
) [inline]

Constructor - from a vil_memory_chunk_sptr.

Definition at line 124 of file vidl_frame.h.

vidl_memory_chunk_frame::vidl_memory_chunk_frame ( const vil_image_view_base image,
vidl_pixel_format  fmt = VIDL_PIXEL_FORMAT_UNKNOWN 
)

Constructor - from a vil_image_view.

return an invalid frame if the image format can not be wrapped

Parameters:
fmtif not UNKNOWN, requires this pixel or fails

return an invalid frame if the image format can not be wrapped

Definition at line 34 of file vidl_frame.cxx.

virtual vidl_memory_chunk_frame::~vidl_memory_chunk_frame ( ) [inline, virtual]

Destructor.

Definition at line 139 of file vidl_frame.h.


Member Function Documentation

virtual void* vidl_memory_chunk_frame::data ( ) [inline, virtual]

Return a pointer to the first element of data.

Implements vidl_frame.

Definition at line 145 of file vidl_frame.h.

virtual const void* vidl_memory_chunk_frame::data ( ) const [inline, virtual]

Implements vidl_frame.

Definition at line 146 of file vidl_frame.h.

virtual void vidl_memory_chunk_frame::invalidate ( ) [inline, virtual]

Make the buffer invalid (data()==0 and size()==0).

Reimplemented from vidl_frame.

Definition at line 142 of file vidl_frame.h.

const vil_memory_chunk_sptr& vidl_memory_chunk_frame::memory_chunk ( ) const [inline]

Return the memory chunk.

used in recreating a vil_image_view

Definition at line 136 of file vidl_frame.h.

unsigned vidl_frame::ni ( ) const [inline, inherited]

Width.

Definition at line 43 of file vidl_frame.h.

unsigned vidl_frame::nj ( ) const [inline, inherited]

Height.

Definition at line 46 of file vidl_frame.h.

vidl_pixel_format vidl_frame::pixel_format ( ) const [inline, inherited]

Return the pixel format.

Definition at line 49 of file vidl_frame.h.

void vidl_frame::ref ( ) [inline, inherited]

Increment reference count.

Definition at line 72 of file vidl_frame.h.

int vidl_frame::ref_count ( ) const [inline, inherited]

Number of objects referring to this data.

Definition at line 78 of file vidl_frame.h.

virtual unsigned long vidl_memory_chunk_frame::size ( ) const [inline, virtual]

The size of the buffer in bytes.

Implements vidl_frame.

Definition at line 149 of file vidl_frame.h.

void vidl_frame::unref ( ) [inherited]

Decrement reference count.

Definition at line 19 of file vidl_frame.cxx.


Member Data Documentation

vidl_pixel_format vidl_frame::format_ [protected, inherited]

frame pixel format.

Definition at line 65 of file vidl_frame.h.

Definition at line 152 of file vidl_frame.h.

unsigned vidl_frame::ni_ [protected, inherited]

frame width.

Definition at line 61 of file vidl_frame.h.

unsigned vidl_frame::nj_ [protected, inherited]

frame height.

Definition at line 63 of file vidl_frame.h.


The documentation for this class was generated from the following files: