Xmipp
v3.23.11-Nereus
|
#include <fstream>
#include <stdio.h>
#include <string.h>
#include <algorithm>
#include <core/xmipp_funcs.h>
#include "selfile.h"
#include <core/xmipp_image.h>
Go to the source code of this file.
Functions | |
bool | operator< (const SelLine &l1, const SelLine &l2) |
std::ostream & | operator<< (std::ostream &o, const SelLine &SFL) |
std::istream & | operator>> (std::istream &o, SelLine &SFL) |
std::ostream & | operator<< (std::ostream &o, const SelFile &SF) |
std::vector< SelLine >::iterator | find (std::vector< SelLine > &text, const std::string &img_name) |
SelFile | compare (SelFile &SF1, SelFile &SF2, const int mode) |
Compare two selection files.
The result is another selection file. At the beginning of it there is information about the number of active and discarded images on both input selection files, about the number of matching files (a file is said to match if it is active in both selection files), the number of active files which are only in the first selection file, and the number of active files which are only in the second. Then goes the list of matching files, the list of files only in SF1 and the list of files only in SF2. There are comments enough to know where things start and finish, and what the numbers are at the beginning. If a file is active in a file and discarded in the other, then it is said to match and it is kept as active, a preceding comment warns of this situation.
if mode<0, output file will contain all information if mode=0, output will be selfile with overlapping images if mode=1, output will be selfile with images only in file 1 if mode=2, output will be selfile with images only in file 2
Definition at line 872 of file selfile.cpp.
Definition at line 553 of file selfile.cpp.
Lesser than. l1 is lesser than l2 if line_type(l1)<line_type(l2) or if they are equal if the text of l1 is lesser than the text of l2. The order of the line types are NOT_CONSIDERED, NOT_ASSIGNED, DATALINE, COMMENT
Definition at line 49 of file selfile.cpp.
std::ostream& operator<< | ( | std::ostream & | o, |
const SelLine & | SFL | ||
) |
Show a SelLine.
Definition at line 59 of file selfile.cpp.
std::ostream& operator<< | ( | std::ostream & | o, |
const SelFile & | SF | ||
) |
Show a selection file.
Shows all the lines either they are comments, active images or discarded images. A new line is printed at the end.
Definition at line 145 of file selfile.cpp.
std::istream& operator>> | ( | std::istream & | o, |
SelLine & | SFL | ||
) |
Read a Selection Line.
An exception is thrown if the line doesn't meet the SelFile specifications.
Definition at line 75 of file selfile.cpp.