33 addParamsLine(
" [--patchSize <n=50>] : Patch size for the variance filter");
34 addParamsLine(
" [-o <coordinates>] : Output coordinates (if not passed, " 35 "the input is overwritten)");
53 <<
"Input Coordinates: " <<
fnInCoord << std::endl
54 <<
"Input Micrograph: " <<
fnInMic << std::endl
55 <<
"Output coordinates: " <<
fnOut << std::endl
56 <<
"Patch size: " <<
patchSize << std::endl
91 std::cout <<
" Gini Coeff: " << giniV << std::endl
92 <<
"(" <<
fnInMic <<
")" << std::endl;
96 std::vector<Particle_coords> &allCoords=mic.
coords;
97 std::vector<double> varValue;
98 for (
size_t i=0;
i<allCoords.size(); ++
i)
106 int imax = allCoords.
size();
108 for (
int i = 0;
i < imax;
i++)
109 if (allCoords[
i].valid && allCoords[
i].cost > 0
110 && allCoords[
i].label == 0)
double giniCoeff(MultidimArray< double > &I, int varKernelSize)
void read_coordinates(int label, const FileName &fn_coords)
virtual void readParams()
#define DIRECT_A2D_ELEM(v, i, j)
void write(const FileName &name="", size_t select_img=ALL_IMAGES, bool isStack=false, int mode=WRITE_OVERWRITE, CastWriteMode castMode=CW_CAST, int _swapWrite=0)
std::vector< Particle_coords > coords
int add_label(const std::string &label)
void open_micrograph(const FileName &fn_micrograph)
const char * getParam(const char *param, int arg=0)
virtual void defineParams()
int verbose
Verbosity level.
FileName withoutExtension() const
void selfNormalizeInterval(double minPerc=0.25, double maxPerc=0.75, int Npix=1000)
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)
int getIntParam(const char *param, int arg=0)
void addParamsLine(const String &line)