33 addUsageLine(
"This program takes a set of PDB files at low and high resolution and constructs a dictionary for them.");
38 addParamsLine(
" [--root <root=dictionary>] : Rootname of the dictionary");
58 <<
"Input volume: " <<
fnIn << std::endl
59 <<
"Output volume: " <<
fnOut << std::endl
86 size_t Npatches=0, NcandidatePatches=0;
88 std::vector< size_t > selectedPatchesIdx;
89 std::vector<double> weight;
92 Vhigh().initZeros(mV);
103 double minPatchLow, maxPatchLow, meanPatchLow, stdPatchLow=0;
104 patchLow.
computeStats(meanPatchLow,stdPatchLow,minPatchLow,maxPatchLow);
111 patchLowNormalized=patchLow;
113 patchLowNormalized*=1.0/
norm;
120 if (selectedPatchesIdx.size()>0)
void init_progress_bar(long total)
void extractPatch(const MultidimArray< double > &V, MultidimArray< double > &patch, int k, int i, int j)
void min(Image< double > &op1, const Image< double > &op2)
void resizeNoCopy(const MultidimArray< T1 > &v)
void sqrt(Image< double > &op)
void computeStats(double &avg, double &stddev, T &minval, T &maxval) const
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)
void constructRotationGroup3D()
size_t canonicalOrientation3D(const MultidimArray< double > &patch, MultidimArray< double > &canonicalPatch, Matrix1D< double > &patchSignature)
T norm(const std::vector< T > &v)
ql0001_ & k(htemp+1),(cvec+1),(atemp+1),(bj+1),(bl+1),(bu+1),(x+1),(clamda+1), &iout, infoqp, &zero,(w+1), &lenw,(iw+1), &leniw, &glob_grd.epsmac
#define A3D_ELEM(V, k, i, j)
#define FOR_ALL_ELEMENTS_IN_ARRAY3D(V)
const char * getParam(const char *param, int arg=0)
virtual void readParams()
double approximatePatch(const MultidimArray< double > &lowResolutionPatch, std::vector< size_t > &selectedPatchesIdx, std::vector< double > &weight, Matrix1D< double > &alpha)
void progress_bar(long rlen)
void max(Image< double > &op1, const Image< double > &op2)
void insertPatch(MultidimArray< double > &Vhigh, MultidimArray< double > &weightHigh, const MultidimArray< double > &patchHigh, int k, int i, int j, double R2)
int verbose
Verbosity level.
void selectDictionaryPatches(const MultidimArray< double > &lowResolutionPatch, Matrix1D< double > &lowResolutionPatchSignature, std::vector< size_t > &selectedPatchesIdx, std::vector< double > &weight)
int read(const FileName &name, DataMode datamode=DATA, size_t select_img=ALL_IMAGES, bool mapData=false, int mode=WRITE_READONLY)
void reconstructPatch(size_t idxTransf, std::vector< size_t > &selectedPatchesIdx, Matrix1D< double > &alpha, MultidimArray< double > &highResolutionPatch)
void addUsageLine(const char *line, bool verbatim=false)
void initZeros(const MultidimArray< T1 > &op)
size_t canonicalOrientation2D(const MultidimArray< double > &patch, MultidimArray< double > &canonicalPatch, Matrix1D< double > &patchSignature)
virtual void defineParams()
void addParamsLine(const String &line)