Maps sequence frame indices to filenames. More...
#include <vul_sequence_filename_map.h>
Public Member Functions | |
| vul_sequence_filename_map () | |
| vul_sequence_filename_map (std::string seq_template, std::vector< int > indices) | |
| vul_sequence_filename_map (std::string seq_template, int start, int end, int step=1) | |
| vul_sequence_filename_map (std::string seq_template, int step=1) | |
| ~vul_sequence_filename_map () | |
| std::string | name (int frame) |
| returns frame name with no extension, e.g. "img.003", "img.003.004". More... | |
| std::string | pair_name (int i, int j) |
| std::string | triplet_name (int i, int j, int k) |
| std::string | image_name (int frame) |
| std::string | get_image_dir () const |
| returns the image directory e.g. "pgm/". More... | |
| std::string | get_image_extension () const |
| returns the image extension e.g. ".pgm". More... | |
| std::string | get_base_name () const |
| returns the base name e.h. "img.". More... | |
| int | get_real_index (int frame) const |
| returns the actually on-disk index corresponding to frame N. More... | |
| std::vector< int > const & | get_real_indices () const |
| int | get_mapped_index (int real) const |
| returns the frame number corresp. to on-disk index N, or -1 if out-of-range. More... | |
| int | get_nviews () const |
| std::ostream & | print (std::ostream &s) const |
| pretty print. More... | |
Protected Member Functions | |
| bool | filter_dirent (char const *name, std::string const &extension) |
| int | extract_index (char const *name) |
| void | parse () |
Protected Attributes | |
| std::string | seq_template_ |
| std::vector< int > | indices_ |
| std::string | basename_ |
| std::string | index_format_ |
| std::string | image_dir_ |
| std::string | image_extension_ |
| int | start_ |
| int | step_ |
| int | end_ |
Maps sequence frame indices to filenames.
vul_sequence_filename_map maps sequence frame indices to filenames. It also performs some disk probing functions to discover the image extension, directories and sequence template if not specified by the user.
The template can have any of the following forms : "pgm/img.%03d.pgm,0:5:100", "pgm/img.####.pgm", "img.###.pgm", "img.###,5:1:20", "img.%02d,:5:" (you get the idea..) If the image directory and/or filename extension are not specified they are automagically determined by probing the current directory for likely candidates.
The vector of indices specifies the mapping from sequence frame-index to filename-index. If not specified, the image directory is probed to determine the sequence start/end frames.
Definition at line 38 of file vul_sequence_filename_map.h.
| vul_sequence_filename_map::vul_sequence_filename_map | ( | ) |
Definition at line 42 of file vul_sequence_filename_map.cxx.
| vul_sequence_filename_map::vul_sequence_filename_map | ( | std::string | seq_template, |
| std::vector< int > | indices | ||
| ) |
Definition at line 47 of file vul_sequence_filename_map.cxx.
| vul_sequence_filename_map::vul_sequence_filename_map | ( | std::string | seq_template, |
| int | start, | ||
| int | end, | ||
| int | step = 1 |
||
| ) |
Definition at line 53 of file vul_sequence_filename_map.cxx.
| vul_sequence_filename_map::vul_sequence_filename_map | ( | std::string | seq_template, |
| int | step = 1 |
||
| ) |
Definition at line 61 of file vul_sequence_filename_map.cxx.
|
default |
|
protected |
Definition at line 344 of file vul_sequence_filename_map.cxx.
|
protected |
Definition at line 330 of file vul_sequence_filename_map.cxx.
|
inline |
returns the base name e.h. "img.".
Definition at line 65 of file vul_sequence_filename_map.h.
|
inline |
returns the image directory e.g. "pgm/".
Definition at line 59 of file vul_sequence_filename_map.h.
|
inline |
returns the image extension e.g. ".pgm".
Definition at line 62 of file vul_sequence_filename_map.h.
| int vul_sequence_filename_map::get_mapped_index | ( | int | real | ) | const |
returns the frame number corresp. to on-disk index N, or -1 if out-of-range.
Definition at line 304 of file vul_sequence_filename_map.cxx.
|
inline |
Definition at line 74 of file vul_sequence_filename_map.h.
|
inline |
returns the actually on-disk index corresponding to frame N.
Definition at line 68 of file vul_sequence_filename_map.h.
|
inline |
Definition at line 69 of file vul_sequence_filename_map.h.
|
inline |
Definition at line 55 of file vul_sequence_filename_map.h.
| std::string vul_sequence_filename_map::name | ( | int | frame | ) |
returns frame name with no extension, e.g. "img.003", "img.003.004".
Definition at line 69 of file vul_sequence_filename_map.cxx.
| std::string vul_sequence_filename_map::pair_name | ( | int | i, |
| int | j | ||
| ) |
Definition at line 75 of file vul_sequence_filename_map.cxx.
|
protected |
Definition at line 89 of file vul_sequence_filename_map.cxx.
| std::ostream & vul_sequence_filename_map::print | ( | std::ostream & | s | ) | const |
pretty print.
Definition at line 316 of file vul_sequence_filename_map.cxx.
| std::string vul_sequence_filename_map::triplet_name | ( | int | i, |
| int | j, | ||
| int | k | ||
| ) |
Definition at line 81 of file vul_sequence_filename_map.cxx.
|
protected |
Definition at line 86 of file vul_sequence_filename_map.h.
|
protected |
Definition at line 92 of file vul_sequence_filename_map.h.
|
protected |
Definition at line 88 of file vul_sequence_filename_map.h.
|
protected |
Definition at line 89 of file vul_sequence_filename_map.h.
|
protected |
Definition at line 87 of file vul_sequence_filename_map.h.
|
protected |
Definition at line 85 of file vul_sequence_filename_map.h.
|
protected |
Definition at line 84 of file vul_sequence_filename_map.h.
|
protected |
Definition at line 90 of file vul_sequence_filename_map.h.
|
protected |
Definition at line 91 of file vul_sequence_filename_map.h.
1.8.15