54 <<
"Input metadata file: " <<
fnSel << std::endl
55 <<
"Reference: " <<
fnRef << std::endl
56 <<
"Output metadata: " <<
fnOut << std::endl
57 <<
"Output basis stack: " <<
fnOutBasis << std::endl
58 <<
"PCA dimension: " <<
NPCA << std::endl
59 <<
"Iterations: " <<
Niter << std::endl
61 <<
"Don't mask: " <<
dontMask << std::endl
68 addUsageLine(
"Score the images in a cluster according to their PCA projection");
69 addUsageLine(
"It is assumed that the cluster is aligned as is the case of the output of CL2D or ML2D");
70 addParamsLine(
" -i <metadatafile> : metadata file with images assigned to the cluster");
72 addParamsLine(
" [--ref <img=\"\">] : if an image is provided, differences are computed with respect to it");
73 addParamsLine(
" [--basis <stackName>] : write the average (image 1), standard deviation (image 2)");
78 addParamsLine(
" : Set to -1 if you don't want to filter images");
80 addExampleLine(
"xmipp_classify_analyze_cluster -i images.sel --ref referenceImage.xmp -o sortedImages.xmd --basis basis.stk");
101 bool subtractRef=
false;
107 Iref().setXmippOrigin();
132 std::cerr <<
"Processing cluster ...\n";
145 for (
size_t objId :
SFin.
ids())
151 I().setXmippOrigin();
157 ImirrorAligned=Ialigned;
160 alignImages(mIref,Ialigned,M,xmipp_transformation::WRAP,aux,aux2,aux3);
161 alignImages(mIref,ImirrorAligned,M,xmipp_transformation::WRAP,aux,aux2,aux3);
217 for (
size_t n=0;
n<N;
n++)
void init_progress_bar(long total)
#define A2D_ELEM(v, i, j)
void resize(size_t Ndim, size_t Zdim, size_t Ydim, size_t Xdim, bool copy=true)
void addVector(const MultidimArray< float > &_v)
Add vector.
double getDoubleParam(const char *param, int arg=0)
#define DIRECT_NZYX_ELEM(v, l, k, i, j)
double alignImages(const MultidimArray< double > &Iref, const AlignmentTransforms &IrefTransforms, MultidimArray< double > &I, Matrix2D< double > &M, bool wrap, AlignmentAux &aux, CorrelationAux &aux2, RotationalCorrelationAux &aux3)
#define REPORT_ERROR(nerr, ErrormMsg)
#define FOR_ALL_DIRECT_ELEMENTS_IN_ARRAY2D(m)
void BinaryCircularMask(MultidimArray< int > &mask, double radius, int mode, double x0, double y0, double z0)
#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)
double correlationIndex(const MultidimArray< T > &x, const MultidimArray< T > &y, const MultidimArray< int > *mask=NULL, MultidimArray< double > *Contributions=NULL)
Incorrect MultidimArray size.
int readApplyGeo(const FileName &name, const MDRow &row, const ApplyGeoParams ¶ms=DefaultApplyGeoParams)
#define FOR_ALL_ELEMENTS_IN_ARRAY2D(m)
void produceSideInfo(MDLabel image_label=MDL_IMAGE)
Produce side info.
const char * getParam(const char *param, int arg=0)
void evaluateZScore(int NPCA, int Niter, bool trained=false, const char *filename="temp.txt", int numdesc=0)
PCAMahalanobisAnalyzer pcaAnalyzer
void produceBasis(MultidimArray< double > &basis)
Produce basis.
void progress_bar(long rlen)
void reserve(int newSize)
Resize.
void addExampleLine(const char *example, bool verbatim=true)
std::vector< MultidimArray< double > > PCAbasis
int verbose
Verbosity level.
MultidimArray< int > mask
double getSortedZscore(int n)
void readParams()
Read argument from command line.
void defineParams()
Define parameters.
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)
void addUsageLine(const char *line, bool verbatim=false)
void initZeros(const MultidimArray< T1 > &op)
int getIntParam(const char *param, int arg=0)
void addParamsLine(const String &line)
#define IMGPIXEL(I, i, j)