A vil_image_resource to a frame of a vidl_istream. More...
#include <vidl_istream_image_resource.h>
Public Member Functions | |
vidl_istream_image_resource (const vidl_istream_sptr &stream, int frame, unsigned int ni, unsigned int nj, unsigned int np, vil_pixel_format format) | |
vidl_istream_image_resource (const vidl_istream_sptr &stream, int frame) | |
vidl_istream_image_resource (const vidl_istream_sptr &stream) | |
~vidl_istream_image_resource () | |
virtual unsigned | nplanes () const |
Dimensions. | |
virtual unsigned | ni () const |
virtual unsigned | nj () const |
virtual enum vil_pixel_format | pixel_format () const |
virtual vil_image_view_base_sptr | get_copy_view (unsigned i0, unsigned ni, unsigned j0, unsigned nj) const |
Create a read/write view of a copy of this data. | |
virtual bool | put_view (const vil_image_view_base &im, unsigned i0, unsigned j0) |
Put the data in this view back into the image source. | |
bool | get_property (char const *tag, void *prop=0) const |
virtual vil_image_view_base_sptr | get_view (unsigned i0, unsigned n_i, unsigned j0, unsigned n_j) const |
vil_image_view_base_sptr | get_view () const |
vil_image_view_base_sptr | get_copy_view () const |
virtual bool | put_view (const vil_image_view_base &im) |
virtual bool | view_fits (const vil_image_view_base &im, unsigned i0, unsigned j0) |
virtual char const * | file_format () const |
vil_image_resource_sptr | vil_convolve_1d (const vil_image_resource_sptr &src_im, const destT, const kernelT *kernel, int k_lo, int k_hi, const accumT, vil_convolve_boundary_option start_option, vil_convolve_boundary_option end_option) |
vil_image_resource_sptr | vil_correlate_1d (const vil_image_resource_sptr &src_im, const destT, const kernelT *kernel, vcl_ptrdiff_t k_lo, vcl_ptrdiff_t k_hi, const accumT, vil_convolve_boundary_option start_option, vil_convolve_boundary_option end_option) |
vil_image_resource_sptr | vil_clamp (const vil_image_resource_sptr &src, double low, double hi) |
bool | vil_copy_deep (const vil_image_resource_sptr &src, vil_image_resource_sptr &dest) |
vil_image_resource_sptr | vil_crop (const vil_image_resource_sptr &src, unsigned i0, unsigned n_i, unsigned j0, unsigned n_j) |
vil_image_resource_sptr | vil_decimate (const vil_image_resource_sptr &src, unsigned i_factor, unsigned j_factor=0) |
vil_image_resource_sptr | vil_flip_lr (const vil_image_resource_sptr &src) |
vil_image_resource_sptr | vil_flip_ud (const vil_image_resource_sptr &src) |
vil_image_resource_sptr | vil_load_image_resource (char const *filename, bool verbose=true) |
vil_image_resource_sptr | vil_load_image_resource_raw (vil_stream *, bool verbose=true) |
vil_image_resource_sptr | vil_load_image_resource_raw (char const *, bool verbose=true) |
vil_image_resource_sptr | vil_load_image_resource_plugin (char const *) |
vil_image_resource_sptr | vil_new_image_resource (unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format) |
vil_image_resource_sptr | vil_new_image_resource (unsigned ni, unsigned nj, vil_image_resource_sptr const &prototype) |
vil_image_resource_sptr | vil_new_image_resource (vil_stream *os, unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format, char const *file_format) |
vil_image_resource_sptr | vil_new_image_resource (char const *filename, unsigned ni, unsigned nj, vil_image_resource_sptr const &prototype, char const *file_format) |
vil_image_resource_sptr | vil_new_image_resource (char const *filename, unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format, char const *file_format) |
vil_image_resource_sptr | vil_new_image_resource (vil_stream *os, unsigned ni, unsigned nj, vil_image_resource_sptr const &prototype, char const *file_format) |
vil_image_resource_sptr | vil_new_image_resource (char const *filename, unsigned ni, unsigned nj, unsigned nplanes, vil_image_resource_sptr const &prototype, char const *format=0) |
vil_image_resource_sptr | vil_new_image_resource (vil_stream *os, unsigned ni, unsigned nj, unsigned nplanes, vil_image_resource_sptr const &prototype, char const *file_format=0) |
vil_image_resource_sptr | vil_new_image_resource_interleaved (unsigned ni, unsigned nj, unsigned nplanes, vil_pixel_format format) |
vil_image_resource_sptr | vil_new_image_resource_of_view (vil_image_view_base const &view) |
vil_image_resource_sptr | vil_plane (const vil_image_resource_sptr &src, unsigned p) |
bool | vil_save_image_resource (const vil_image_resource_sptr &ir, char const *filename, char const *file_format) |
bool | vil_save_image_resource (const vil_image_resource_sptr &ir, char const *filename) |
vil_image_resource_sptr | vil_transpose (const vil_image_resource_sptr &src) |
Protected Member Functions | |
void | ref () |
void | unref () |
Protected Attributes | |
vcl_atomic_count | reference_count_ |
Private Member Functions | |
bool | find_image_properties () |
try to find the image format and size from the current frame. | |
vil_image_view_base_sptr | create_empty_view () const |
create an empty image of the appropriate type and size. | |
Private Attributes | |
vidl_istream_sptr | istream_ |
int | frame_number_ |
unsigned int | ni_ |
unsigned int | nj_ |
unsigned int | np_ |
vil_pixel_format | format_ |
Friends | |
friend class | vil_smart_ptr |
A vil_image_resource to a frame of a vidl_istream.
With this class you can create image resources to several frames of an open vidl istream. When get_view is called the stream is seeked to the relevant frame number and the frame is decoded and converted to an image view. The stream must be seekable unless views are requested in sequential order. The stream is closed when all image resources using it are destroyed.
Definition at line 29 of file vidl_istream_image_resource.h.
vidl_istream_image_resource::vidl_istream_image_resource | ( | const vidl_istream_sptr & | stream, |
int | frame, | ||
unsigned int | ni, | ||
unsigned int | nj, | ||
unsigned int | np, | ||
vil_pixel_format | format | ||
) |
Definition at line 19 of file vidl_istream_image_resource.cxx.
vidl_istream_image_resource::vidl_istream_image_resource | ( | const vidl_istream_sptr & | stream, |
int | frame | ||
) |
Definition at line 53 of file vidl_istream_image_resource.cxx.
vidl_istream_image_resource::vidl_istream_image_resource | ( | const vidl_istream_sptr & | stream | ) |
Definition at line 64 of file vidl_istream_image_resource.cxx.
vidl_istream_image_resource::~vidl_istream_image_resource | ( | ) |
Definition at line 75 of file vidl_istream_image_resource.cxx.
vil_image_view_base_sptr vidl_istream_image_resource::create_empty_view | ( | ) | const [private] |
create an empty image of the appropriate type and size.
Definition at line 197 of file vidl_istream_image_resource.cxx.
bool vidl_istream_image_resource::find_image_properties | ( | ) | [private] |
try to find the image format and size from the current frame.
Definition at line 32 of file vidl_istream_image_resource.cxx.
vil_image_view_base_sptr vidl_istream_image_resource::get_copy_view | ( | unsigned | i0, |
unsigned | ni, | ||
unsigned | j0, | ||
unsigned | nj | ||
) | const [virtual] |
Create a read/write view of a copy of this data.
Implements vil_image_resource.
Definition at line 116 of file vidl_istream_image_resource.cxx.
bool vidl_istream_image_resource::get_property | ( | char const * | tag, |
void * | prop = 0 |
||
) | const [virtual] |
Implements vil_image_resource.
Definition at line 109 of file vidl_istream_image_resource.cxx.
unsigned vidl_istream_image_resource::ni | ( | ) | const [virtual] |
Implements vil_image_resource.
Definition at line 88 of file vidl_istream_image_resource.cxx.
unsigned vidl_istream_image_resource::nj | ( | ) | const [virtual] |
Implements vil_image_resource.
Definition at line 95 of file vidl_istream_image_resource.cxx.
unsigned vidl_istream_image_resource::nplanes | ( | ) | const [virtual] |
Dimensions.
Implements vil_image_resource.
Definition at line 81 of file vidl_istream_image_resource.cxx.
enum vil_pixel_format vidl_istream_image_resource::pixel_format | ( | ) | const [virtual] |
Implements vil_image_resource.
Definition at line 102 of file vidl_istream_image_resource.cxx.
bool vidl_istream_image_resource::put_view | ( | const vil_image_view_base & | im, |
unsigned | i0, | ||
unsigned | j0 | ||
) | [virtual] |
Put the data in this view back into the image source.
Implements vil_image_resource.
Definition at line 187 of file vidl_istream_image_resource.cxx.
Definition at line 36 of file vidl_istream_image_resource.h.
int vidl_istream_image_resource::frame_number_ [private] |
Definition at line 32 of file vidl_istream_image_resource.h.
Definition at line 31 of file vidl_istream_image_resource.h.
unsigned int vidl_istream_image_resource::ni_ [private] |
Definition at line 33 of file vidl_istream_image_resource.h.
unsigned int vidl_istream_image_resource::nj_ [private] |
Definition at line 34 of file vidl_istream_image_resource.h.
unsigned int vidl_istream_image_resource::np_ [private] |
Definition at line 35 of file vidl_istream_image_resource.h.