59 addParamsLine(
" abs_below <th> : Absolute value below a threshold");
62 addParamsLine(
" --substitute <substitutionMode=value> : Substitute selected pixels by");
64 addParamsLine(
" binarize : Selected are set to 0, non-selected to 1");
69 addExampleLine(
"xmipp_transform_threshold -i volume.vol -o volumeThresholded.vol --select below 0.01 --substitute value 0");
70 addExampleLine(
"Generate a binary mask based on a threshold and apply it",
false);
71 addExampleLine(
"xmipp_transform_threshold -i volume.vol -o mask.vol --select below 0.5 --substitute binarize");
73 addExampleLine(
"xmipp_transform_mask -i volume.vol -o volumeMasked.vol --mask mask.vol");
84 <<
"Threshold: " <<
threshold << std::endl
87 std::cout <<
"New value: " <<
newValue << std::endl;
90 std::cout <<
"Noise average: " <<
noiseAvg << std::endl;
91 std::cout <<
"Noise std.dev.: " <<
noiseStddev << std::endl;
103 double substituteValue=0.0;
119 substituteValue+=pixval;
130 substituteValue+=pixval;
141 substituteValue+=pixval;
double getDoubleParam(const char *param, int arg=0)
void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)
Process image or volume.
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)
String substitutionMethod
void addSeeAlsoLine(const char *seeAlso)
const char * getParam(const char *param, int arg=0)
#define FOR_ALL_DIRECT_ELEMENTS_IN_MULTIDIMARRAY(v)
#define DIRECT_MULTIDIM_ELEM(v, n)
void addExampleLine(const char *example, bool verbatim=true)
int verbose
Verbosity level.
int read(const FileName &name, DataMode datamode=DATA, size_t select_img=ALL_IMAGES, bool mapData=false, int mode=WRITE_READONLY)
void addUsageLine(const char *line, bool verbatim=false)
void addParamsLine(const String &line)