Xmipp
v3.23.11-Nereus
|
#include <pdb_construct_dictionary.h>
Public Member Functions | |
virtual void | defineParams () |
virtual void | readParams () |
virtual void | show () |
virtual void | run ()=0 |
void | extractPatch (const MultidimArray< double > &V, MultidimArray< double > &patch, int k, int i, int j) |
void | insertPatch (MultidimArray< double > &Vhigh, MultidimArray< double > &weightHigh, const MultidimArray< double > &patchHigh, int k, int i, int j, double R2) |
void | constructRotationGroup2D () |
void | constructRotationGroup3D () |
void | constructRotationGroup () |
size_t | canonicalOrientation2D (const MultidimArray< double > &patch, MultidimArray< double > &canonicalPatch, Matrix1D< double > &patchSignature) |
size_t | canonicalOrientation3D (const MultidimArray< double > &patch, MultidimArray< double > &canonicalPatch, Matrix1D< double > &patchSignature) |
bool | notInDictionary (const MultidimArray< double > &candidatePatch, MultidimArray< double > &canonicalPatch, Matrix1D< double > &canonicalSignature, size_t &canonicalIdx) |
void | selectDictionaryPatches (const MultidimArray< double > &lowResolutionPatch, Matrix1D< double > &lowResolutionPatchSignature, std::vector< size_t > &selectedPatchesIdx, std::vector< double > &weight) |
double | approximatePatch (const MultidimArray< double > &lowResolutionPatch, std::vector< size_t > &selectedPatchesIdx, std::vector< double > &weight, Matrix1D< double > &alpha) |
void | reconstructPatch (size_t idxTransf, std::vector< size_t > &selectedPatchesIdx, Matrix1D< double > &alpha, MultidimArray< double > &highResolutionPatch) |
void | loadDictionaries () |
void | saveDictionaries () const |
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 | fnRoot |
int | patchSize |
double | stdThreshold |
double | angleThreshold |
double | lambda |
int | iterations |
int | mode |
std::vector< MultidimArray< double > > | dictionaryLow |
std::vector< MultidimArray< double > > | dictionaryHigh |
std::vector< Matrix1D< double > > | dictionarySignature |
std::vector< Matrix2D< double > > | rotationGroup |
MultidimArray< double > | auxPatch |
Matrix1D< double > | auxSignature |
Matrix2D< double > | Ui |
Matrix2D< double > | UitUi |
Matrix1D< double > | wi |
Matrix1D< double > | v1 |
Matrix1D< double > | v2 |
Matrix1D< double > | y |
Matrix1D< double > | yp |
Matrix1D< double > | Uity |
int | patchSize_2 |
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 |
Generic class to handle PDB Low and High resolution dictionary
Definition at line 38 of file pdb_construct_dictionary.h.
double ProgPDBDictionary::approximatePatch | ( | const MultidimArray< double > & | lowResolutionPatch, |
std::vector< size_t > & | selectedPatchesIdx, | ||
std::vector< double > & | weight, | ||
Matrix1D< double > & | alpha | ||
) |
Approximate patch. It returns the R2 of the approximation.
Definition at line 215 of file pdb_construct_dictionary.cpp.
size_t ProgPDBDictionary::canonicalOrientation2D | ( | const MultidimArray< double > & | patch, |
MultidimArray< double > & | canonicalPatch, | ||
Matrix1D< double > & | patchSignature | ||
) |
Orient canonically a patch
Definition at line 467 of file pdb_construct_dictionary.cpp.
size_t ProgPDBDictionary::canonicalOrientation3D | ( | const MultidimArray< double > & | patch, |
MultidimArray< double > & | canonicalPatch, | ||
Matrix1D< double > & | patchSignature | ||
) |
Orient canonically a patch
Definition at line 506 of file pdb_construct_dictionary.cpp.
void ProgPDBDictionary::constructRotationGroup | ( | ) |
Construct rotation group
Definition at line 439 of file pdb_construct_dictionary.cpp.
void ProgPDBDictionary::constructRotationGroup2D | ( | ) |
Construct rotation group 2D
Definition at line 389 of file pdb_construct_dictionary.cpp.
void ProgPDBDictionary::constructRotationGroup3D | ( | ) |
Construct rotation group 3D
Definition at line 410 of file pdb_construct_dictionary.cpp.
|
virtual |
Function in which the param of each Program are defined.
Reimplemented from XmippProgram.
Reimplemented in ProgConstructPDBDictionary, and ProgRestoreWithPDBDictionary.
Definition at line 35 of file pdb_construct_dictionary.cpp.
void ProgPDBDictionary::extractPatch | ( | const MultidimArray< double > & | V, |
MultidimArray< double > & | patch, | ||
int | k, | ||
int | i, | ||
int | j | ||
) |
Extract Patch from volume
Definition at line 323 of file pdb_construct_dictionary.cpp.
void ProgPDBDictionary::insertPatch | ( | MultidimArray< double > & | Vhigh, |
MultidimArray< double > & | weightHigh, | ||
const MultidimArray< double > & | patchHigh, | ||
int | k, | ||
int | i, | ||
int | j, | ||
double | R2 | ||
) |
Insert Patch into volume
Definition at line 347 of file pdb_construct_dictionary.cpp.
void ProgPDBDictionary::loadDictionaries | ( | ) |
Load dictionaries
Definition at line 265 of file pdb_construct_dictionary.cpp.
bool ProgPDBDictionary::notInDictionary | ( | const MultidimArray< double > & | candidatePatch, |
MultidimArray< double > & | canonicalPatch, | ||
Matrix1D< double > & | canonicalSignature, | ||
size_t & | canonicalIdx | ||
) |
True if the patch is not already in the low resolution dictionary
Definition at line 74 of file pdb_construct_dictionary.cpp.
|
virtual |
Function in which each program will read parameters that it need. If some error occurs the usage will be printed out.
Reimplemented from XmippProgram.
Reimplemented in ProgConstructPDBDictionary, and ProgRestoreWithPDBDictionary.
Definition at line 45 of file pdb_construct_dictionary.cpp.
void ProgPDBDictionary::reconstructPatch | ( | size_t | idxTransf, |
std::vector< size_t > & | selectedPatchesIdx, | ||
Matrix1D< double > & | alpha, | ||
MultidimArray< double > & | highResolutionPatch | ||
) |
Reconstruct patch
Definition at line 252 of file pdb_construct_dictionary.cpp.
|
pure virtual |
This function will be start running the program. it also should be implemented by derived classes.
Reimplemented from XmippProgram.
Implemented in ProgConstructPDBDictionary, and ProgRestoreWithPDBDictionary.
void ProgPDBDictionary::saveDictionaries | ( | ) | const |
Save dictionaries
Definition at line 296 of file pdb_construct_dictionary.cpp.
void ProgPDBDictionary::selectDictionaryPatches | ( | const MultidimArray< double > & | lowResolutionPatch, |
Matrix1D< double > & | lowResolutionPatchSignature, | ||
std::vector< size_t > & | selectedPatchesIdx, | ||
std::vector< double > & | weight | ||
) |
Select dictionary patches for a low resolution patch
Definition at line 103 of file pdb_construct_dictionary.cpp.
|
virtual |
Reimplemented in ProgConstructPDBDictionary, and ProgRestoreWithPDBDictionary.
Definition at line 62 of file pdb_construct_dictionary.cpp.
double ProgPDBDictionary::angleThreshold |
Definition at line 50 of file pdb_construct_dictionary.h.
MultidimArray<double> ProgPDBDictionary::auxPatch |
Auxiliary patch
Definition at line 72 of file pdb_construct_dictionary.h.
Matrix1D<double> ProgPDBDictionary::auxSignature |
Signature
Definition at line 75 of file pdb_construct_dictionary.h.
std::vector< MultidimArray<double> > ProgPDBDictionary::dictionaryHigh |
Definition at line 63 of file pdb_construct_dictionary.h.
std::vector< MultidimArray<double> > ProgPDBDictionary::dictionaryLow |
Low resolution and high resolution dictionary
Definition at line 63 of file pdb_construct_dictionary.h.
std::vector< Matrix1D<double> > ProgPDBDictionary::dictionarySignature |
Signature dictionary
Definition at line 66 of file pdb_construct_dictionary.h.
FileName ProgPDBDictionary::fnRoot |
Dictionary rootname
Definition at line 42 of file pdb_construct_dictionary.h.
int ProgPDBDictionary::iterations |
Definition at line 56 of file pdb_construct_dictionary.h.
double ProgPDBDictionary::lambda |
Definition at line 53 of file pdb_construct_dictionary.h.
int ProgPDBDictionary::mode |
Definition at line 59 of file pdb_construct_dictionary.h.
int ProgPDBDictionary::patchSize |
Patch is of size size x size x size
Definition at line 45 of file pdb_construct_dictionary.h.
int ProgPDBDictionary::patchSize_2 |
Definition at line 80 of file pdb_construct_dictionary.h.
std::vector< Matrix2D<double> > ProgPDBDictionary::rotationGroup |
Rotation group
Definition at line 69 of file pdb_construct_dictionary.h.
double ProgPDBDictionary::stdThreshold |
A patch is candidate if its standard deviation is at least this factor of the total standard deviation
Definition at line 48 of file pdb_construct_dictionary.h.
Matrix2D<double> ProgPDBDictionary::Ui |
Definition at line 78 of file pdb_construct_dictionary.h.
Matrix2D<double> ProgPDBDictionary::UitUi |
Definition at line 78 of file pdb_construct_dictionary.h.
Matrix1D<double> ProgPDBDictionary::Uity |
Definition at line 79 of file pdb_construct_dictionary.h.
Matrix1D<double> ProgPDBDictionary::v1 |
Definition at line 79 of file pdb_construct_dictionary.h.
Matrix1D<double> ProgPDBDictionary::v2 |
Definition at line 79 of file pdb_construct_dictionary.h.
Matrix1D<double> ProgPDBDictionary::wi |
Definition at line 79 of file pdb_construct_dictionary.h.
Matrix1D<double> ProgPDBDictionary::y |
Definition at line 79 of file pdb_construct_dictionary.h.
Matrix1D<double> ProgPDBDictionary::yp |
Definition at line 79 of file pdb_construct_dictionary.h.