50 <<
"Input selfile: " <<
fnIn << std::endl
51 <<
"Output selfile: " <<
fnOut << std::endl
52 <<
"Eliminated selfile: " <<
fnElim << std::endl
53 <<
"Threshold: " <<
threshold << std::endl
56 <<
"Denosing parameter: " <<
denoise << std::endl
63 addUsageLine(
"Eliminates empty particles (false positives from picking)");
64 addParamsLine(
" -i <selfile> : Selfile containing set of input particles");
65 addParamsLine(
" [-o <selfile=\"output.xmd\">] : Output selfile");
66 addParamsLine(
" [-e <selfile=\"eliminated.xmd\">] : Eliminated particles selfile");
67 addParamsLine(
" [-t <float=-1>] : Threshold used by algorithm. Set to -1 for no elimination.");
68 addParamsLine(
" [--addFeatures] : Add the emptiness features to the input particles");
69 addParamsLine(
" [--useDenoising] : Option for turning on denoising method while computing emptiness feature");
70 addParamsLine(
" [-d <int=50>] : Parameter for denoising, higher value means stronger denoising and slower computation");
81 MetaDataVec MDclass, MDclassEl, MDclassT, MDclassElT;
84 std::vector<double> fv;
87 std::size_t extraPath =
fnOut.find_last_of(
"/");
89 FileName fnDone =
fnOut.substr(0, extraPath+1) +
"outTemp.xmd";
90 FileName fnElDone =
fnOut.substr(0, extraPath+1) +
"elimTemp.xmd";
92 std::ifstream ifile1(
fnOut.c_str());
94 std::ifstream ifile2(
fnElim.c_str());
97 for (
size_t objId : SF.
ids())
101 SF.
getRow(row, countItems);
104 I().setXmippOrigin();
113 double ratio = fv.back();
129 if (countItems%100==0)
134 if (MDclass.
size()>0)
136 if (MDclassEl.
size()>0)
138 if (MDclassT.
size()>0)
140 if (MDclassElT.
size()>0)
void init_progress_bar(long total)
int denoise
Param for denoising.
void centerImageTranslationally(MultidimArray< double > &I, CorrelationAux &aux)
double getDoubleParam(const char *param, int arg=0)
void defineParams()
Define input parameters.
void setValue(const MDObject &object) override
bool useDenoising
Turning on denoising.
FileName fnElim
Name of the eliminated particle metadata.
const char * getParam(const char *param, int arg=0)
void progress_bar(long rlen)
int verbose
Verbosity level.
FileName fnIn
Name of the input metadata.
void bandpassFilter(MultidimArray< double > &img, double w1, double w2, double raised_w)
bool addFeatures
Add features.
void readParams()
Read input parameters.
void realGaussianFilter(MultidimArray< double > &img, double sigma)
String formatString(const char *format,...)
bool checkParam(const char *param)
int read(const FileName &name, DataMode datamode=DATA, size_t select_img=ALL_IMAGES, bool mapData=false, int mode=WRITE_READONLY)
float threshold
Threshold for variance of variance.
void addUsageLine(const char *line, bool verbatim=false)
FileName fnOut
Name of the output metadata.
int getIntParam(const char *param, int arg=0)
void addParamsLine(const String &line)