Manages patch files. More...
#include <PatchFile.h>
Classes | |
struct | Patch |
A single patch. More... | |
Static Public Member Functions | |
static void | readFile (const std::string &filename, std::vector< std::vector< int > > &visibility, bool use_weak_list=false) |
static void | readFile (const std::string &filename, std::vector< Patch > &patches) |
static void | saveFile (const std::string &filename, const std::vector< Patch > &patches) |
Static Protected Member Functions | |
static int | getNumberOfPoints (const std::string &filename) |
static int | parseInt (const std::string &s) |
static void | readVisibilityIndices (std::fstream &f, std::vector< std::vector< int > > &visibility, int pt_idx) |
Manages patch files.
Definition at line 36 of file PatchFile.h.
int PatchFile::getNumberOfPoints | ( | const std::string & | filename | ) | [static, protected] |
Reads the header of the given filename and returns the number of points it contains
filename |
Definition at line 221 of file PatchFile.cpp.
int PatchFile::parseInt | ( | const std::string & | s | ) | [static, protected] |
Returns the integer represented by the string s
s |
Definition at line 211 of file PatchFile.cpp.
void PatchFile::readFile | ( | const std::string & | filename, |
std::vector< std::vector< int > > & | visibility, | ||
bool | use_weak_list = false |
||
) | [static] |
Reads a patch file and returns the visibility info of each file
filename | |
visibility | visibility[i]= list of point indices seen in the i-th img |
use_weak_list | if true, those points which are likely to be visible but do not have texture consistency are also considered as visible |
Definition at line 137 of file PatchFile.cpp.
void PatchFile::readFile | ( | const std::string & | filename, |
std::vector< Patch > & | patches | ||
) | [static] |
Reads the patchs of a patch file
filename | |
patches |
Definition at line 36 of file PatchFile.cpp.
void PatchFile::readVisibilityIndices | ( | std::fstream & | f, |
std::vector< std::vector< int > > & | visibility, | ||
int | pt_idx | ||
) | [static, protected] |
Reads a list of indices from f and updates the visibility vector accordingly
f | fstream in a line with the number of indices in the next line |
visibility | |
pt_idx | index of the current 3d point |
Definition at line 183 of file PatchFile.cpp.
void PatchFile::saveFile | ( | const std::string & | filename, |
const std::vector< Patch > & | patches | ||
) | [static] |
Saves the patches into filename
filename | |
patches |
Definition at line 95 of file PatchFile.cpp.