Xmipp
v3.23.11-Nereus
|
#include <image_peak_high_contrast.h>
Public Member Functions | |
void | readParams () |
void | defineParams () |
void | writeOutputCoordinates () |
void | preprocessVolume (MultidimArray< double > &inputTomo) |
void | getHighContrastCoordinates (MultidimArray< double > &volFiltered) |
void | clusterHCC () |
void | centerCoordinates (MultidimArray< double > volFiltered) |
void | removeDuplicatedCoordinates () |
void | filterCoordinatesByCorrelation (MultidimArray< double > volFiltered) |
void | generateSideInfo () |
bool | filterLabeledRegions (std::vector< int > coordinatesPerLabelX, std::vector< int > coordinatesPerLabelY, double centroX, double centroY) const |
std::vector< size_t > | getCoordinatesInSliceIndex (size_t slice) |
void | radialAverage (MultidimArray< float > &feature, MultidimArray< float > &radialAverage, size_t numSlices) const |
void | mahalanobisDistance (std::vector< MultidimArray< float >> &setOfFeatures_RA, MultidimArray< double > &mahalanobisDistance_List) const |
void | run () |
Public Member Functions inherited from XmippProgram | |
const char * | getParam (const char *param, int arg=0) |
const char * | getParam (const char *param, const char *subparam, int arg=0) |
int | getIntParam (const char *param, int arg=0) |
int | getIntParam (const char *param, const char *subparam, int arg=0) |
double | getDoubleParam (const char *param, int arg=0) |
double | getDoubleParam (const char *param, const char *subparam, int arg=0) |
float | getFloatParam (const char *param, int arg=0) |
float | getFloatParam (const char *param, const char *subparam, int arg=0) |
void | getListParam (const char *param, StringVector &list) |
int | getCountParam (const char *param) |
bool | checkParam (const char *param) |
bool | existsParam (const char *param) |
void | addParamsLine (const String &line) |
void | addParamsLine (const char *line) |
ParamDef * | getParamDef (const char *param) const |
virtual void | quit (int exit_code=0) const |
virtual int | tryRun () |
void | initProgress (size_t total, size_t stepBin=60) |
void | setProgress (size_t value=0) |
void | endProgress () |
void | processDefaultComment (const char *param, const char *left) |
void | setDefaultComment (const char *param, const char *comment) |
virtual void | initComments () |
void | setProgramName (const char *name) |
void | addUsageLine (const char *line, bool verbatim=false) |
void | clearUsage () |
void | addExampleLine (const char *example, bool verbatim=true) |
void | addSeeAlsoLine (const char *seeAlso) |
void | addKeywords (const char *keywords) |
const char * | name () const |
virtual void | usage (int verb=0) const |
virtual void | usage (const String ¶m, int verb=2) |
int | version () const |
virtual void | show () const |
virtual void | read (int argc, const char **argv, bool reportErrors=true) |
virtual void | read (int argc, char **argv, bool reportErrors=true) |
void | read (const String &argumentsLine) |
XmippProgram () | |
XmippProgram (int argc, const char **argv) | |
virtual | ~XmippProgram () |
Public Attributes | |
FileName | fnVol |
FileName | fnOut |
double | fiducialSize |
double | samplingRate |
int | boxSize |
int | numberSampSlices |
double | sdThr |
int | numberOfCoordinatesThr |
double | mirrorCorrelationThr |
double | mahalanobisDistanceThr |
bool | relaxedMode |
int | relaxedModeThr = 0 |
double | fiducialSizePx |
FourierTransformer | transformer |
Image< double > | V |
Public Attributes inherited from XmippProgram | |
bool | doRun |
bool | runWithoutArgs |
int | verbose |
Verbosity level. More... | |
int | debug |
Additional Inherited Members | |
Protected Member Functions inherited from XmippProgram | |
void | defineCommons () |
Protected Attributes inherited from XmippProgram | |
int | errorCode |
ProgramDef * | progDef |
Program definition and arguments parser. More... | |
std::map< String, CommentList > | defaultComments |
int | argc |
Original command line arguments. More... | |
const char ** | argv |
Definition at line 62 of file image_peak_high_contrast.h.
void ProgImagePeakHighContrast::centerCoordinates | ( | MultidimArray< double > | volFiltered | ) |
Center the obtained coordinates from clustering. Shift coordinates to keep the fiducial centered by calculating the maximum correlation between the peaked feature and its mirror.
Definition at line 705 of file image_peak_high_contrast.cpp.
void ProgImagePeakHighContrast::clusterHCC | ( | ) |
Smoothing and filtering the input volume. Use a votting system remove those coodinates that are not cosistent through different slices, cluster those coordinates that survived the votting, and averga those coordinates belonging to the same cluster.
Definition at line 483 of file image_peak_high_contrast.cpp.
|
virtual |
Define input program parameters.
Reimplemented from XmippProgram.
Definition at line 55 of file image_peak_high_contrast.cpp.
void ProgImagePeakHighContrast::filterCoordinatesByCorrelation | ( | MultidimArray< double > | volFiltered | ) |
Filter coordinates by the correlation. Calculate the dot product between each feature and its mirror, and compare to a correlation threshold.
Definition at line 1054 of file image_peak_high_contrast.cpp.
bool ProgImagePeakHighContrast::filterLabeledRegions | ( | std::vector< int > | coordinatesPerLabelX, |
std::vector< int > | coordinatesPerLabelY, | ||
double | centroX, | ||
double | centroY | ||
) | const |
Filter labeled regions. Util method to remove those labeles regions based on their size (minimum number of points that should contain) and shape (present a globular structure, as expected from a gold bead).
Definition at line 1412 of file image_peak_high_contrast.cpp.
void ProgImagePeakHighContrast::generateSideInfo | ( | ) |
Calculate global parameters used through the program.
Definition at line 1398 of file image_peak_high_contrast.cpp.
std::vector< size_t > ProgImagePeakHighContrast::getCoordinatesInSliceIndex | ( | size_t | slice | ) |
Get index coordinates from slice. Return the index in the 3D coordinates vector of those coordinates belonging to the specified slice.
Definition at line 1482 of file image_peak_high_contrast.cpp.
void ProgImagePeakHighContrast::getHighContrastCoordinates | ( | MultidimArray< double > & | volFiltered | ) |
Peak high contrast coordinates in a volume. Detect coordinates with an outlier value, generate a binary map to posterior label it, and filter the labeled regions depending on size and shape. Keep
Definition at line 316 of file image_peak_high_contrast.cpp.
void ProgImagePeakHighContrast::mahalanobisDistance | ( | std::vector< MultidimArray< float >> & | setOfFeatures_RA, |
MultidimArray< double > & | mahalanobisDistance_List | ||
) | const |
Definition at line 1571 of file image_peak_high_contrast.cpp.
void ProgImagePeakHighContrast::preprocessVolume | ( | MultidimArray< double > & | inputTomo | ) |
Proprocessing of the input volume. Slice averaging (5 slices), bandpass filtering at the gold bead size, and apply laplacian.
Definition at line 100 of file image_peak_high_contrast.cpp.
void ProgImagePeakHighContrast::radialAverage | ( | MultidimArray< float > & | feature, |
MultidimArray< float > & | radialAverage, | ||
size_t | numSlices | ||
) | const |
Calculate the radial average of the numSlices slices centered in the feature volume (Z direction).
Definition at line 1506 of file image_peak_high_contrast.cpp.
|
virtual |
Read input program parameters.
Reimplemented from XmippProgram.
Definition at line 33 of file image_peak_high_contrast.cpp.
void ProgImagePeakHighContrast::removeDuplicatedCoordinates | ( | ) |
Remove duplicated coordinates. Iteratively, merge those coordinates referred to the same high contrast feature based on a minimum distance threshold (the fiducial size).
Definition at line 898 of file image_peak_high_contrast.cpp.
|
virtual |
Run main program.
Reimplemented from XmippProgram.
Definition at line 1333 of file image_peak_high_contrast.cpp.
void ProgImagePeakHighContrast::writeOutputCoordinates | ( | ) |
Write output coordinates metadata.
Definition at line 72 of file image_peak_high_contrast.cpp.
int ProgImagePeakHighContrast::boxSize |
Box size
Definition at line 77 of file image_peak_high_contrast.h.
double ProgImagePeakHighContrast::fiducialSize |
Fiducial size in angstroms
Definition at line 71 of file image_peak_high_contrast.h.
double ProgImagePeakHighContrast::fiducialSizePx |
Fiducial size in pixels
Definition at line 93 of file image_peak_high_contrast.h.
FileName ProgImagePeakHighContrast::fnOut |
Definition at line 68 of file image_peak_high_contrast.h.
FileName ProgImagePeakHighContrast::fnVol |
Filenames
Definition at line 67 of file image_peak_high_contrast.h.
double ProgImagePeakHighContrast::mahalanobisDistanceThr |
Definition at line 86 of file image_peak_high_contrast.h.
double ProgImagePeakHighContrast::mirrorCorrelationThr |
Definition at line 85 of file image_peak_high_contrast.h.
int ProgImagePeakHighContrast::numberOfCoordinatesThr |
Definition at line 84 of file image_peak_high_contrast.h.
int ProgImagePeakHighContrast::numberSampSlices |
Number of samplig slices to calculate mean and SD of the tomogram
Definition at line 80 of file image_peak_high_contrast.h.
bool ProgImagePeakHighContrast::relaxedMode |
Params to use relaxed mode
Definition at line 89 of file image_peak_high_contrast.h.
int ProgImagePeakHighContrast::relaxedModeThr = 0 |
Definition at line 90 of file image_peak_high_contrast.h.
double ProgImagePeakHighContrast::samplingRate |
Sampling rate
Definition at line 74 of file image_peak_high_contrast.h.
double ProgImagePeakHighContrast::sdThr |
Thresholds
Definition at line 83 of file image_peak_high_contrast.h.
FourierTransformer ProgImagePeakHighContrast::transformer |
Centralized Fourier transformer
Definition at line 96 of file image_peak_high_contrast.h.
Image<double> ProgImagePeakHighContrast::V |
Centralized Image for handlign tomogram
Definition at line 99 of file image_peak_high_contrast.h.