Xmipp  v3.23.11-Nereus
angular_accuracy_pca.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * Authors: Javier Vargas (jvargas@cnb.csic.es)
3  *
4  *
5  * Unidad de Bioinformatica of Centro Nacional de Biotecnologia , CSIC
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 2 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
20  * 02111-1307 USA
21  *
22  * All comments concerning this program package may be sent to the
23  * e-mail address 'xmipp@cnb.csic.es'
24  ***************************************************************************/
25 
26 #include "angular_accuracy_pca.h"
27 #include "core/metadata_sql.h"
28 #include "core/transformations.h"
29 #include "data/projection.h"
31 
33 {
34  rank=0;
35  Nprocessors=1;
36 }
37 
39 {
40  fnPhantom = getParam("-i");
41  fnNeighbours = getParam("--i2");
42  fnOut = getParam("-o");
43  fnOutQ = fnOut.getDir()+"/validationAlignabilityAccuracy.xmd";
44  newXdim = getIntParam("--dim");
45  newYdim = newXdim;
46 
47  std::cout << newXdim << std::endl;
48 
49 }
50 
52 {
53  addUsageLine("Determine the angular determination accuracy of a set of particles and a 3D reconstruction ");
54  addParamsLine(" [ -i <volume_file> ] : Voxel volume");
55  addParamsLine(" [--i2 <md_file=\"\">] : Metadata file with neighbour projections");
56  addParamsLine(" [ -o <md_file=\"\">] : Metadata file with obtained weights");
57  addParamsLine(" [--dim <d=-1>] : Scale images to this size if they are larger.");
58  addParamsLine(" : Set to -1 for no rescaling");
59 }
60 
62 {
63  MetaDataVec md;
64  StringVector blocks;
66 
68  phantomVol().setXmippOrigin();
69 
70  size_t numPCAs;
71 
72  if (rank==0)
73  init_progress_bar(blocks.size());
74 
75  for (size_t i = 0; i < blocks.size(); ++i)
76  {
77  if ((i+1)%Nprocessors==rank)
78  {
79  md.read((String) blocks[i].c_str()+'@'+fnNeighbours);
80 
81  if (md.size() <= 1)
82  continue;
83 
84  else if ( md.size() > 20 )
85  numPCAs = 3;
86  else if ( (md.size() >= 5) & (md.size() < 20) )
87  numPCAs = 2;
88  else
89  numPCAs = 1;
90 
91  obtainPCAs(md,numPCAs);
92 
93  for (auto& row : md)
94  mdPartial.addRow(dynamic_cast<MDRowVec&>(row));
95 
96  if (rank==0)
97  progress_bar(i+1);
98  }
99  }
100 
101  synchronize();
102  gatherResults();
103 
104  if (rank == 0)
105  {
106  double pcaResidualProj,pcaResidualExp,pcaResidual,Zscore,temp,qResidualProj,qResidualExp,qZscore;
107 
108  qResidualProj = 0;
109  qResidualExp = 0;
110  qZscore = 0;
111 
112  String expression;
113  size_t maxIdx;
114  MDRowSql row;
115  MetaDataDb MDSort, tempMd, MDOut, MDOutQ;
116  MDSort.sort(mdPartial,MDL_ITEM_ID,true,-1,0);
117  MDSort.getValue(MDL_ITEM_ID,maxIdx,MDSort.lastRowId());
118 
119  for (size_t i=0; i<=maxIdx;i++)
120  {
121  expression = formatString("itemId == %lu",i);
122  tempMd.importObjects(MDSort, MDExpression(expression));
123 
124  if (tempMd.size() <= 0)
125  continue;
126 
127  pcaResidualProj = -1e3;
128  pcaResidualExp = -1e3;
129  pcaResidual = -1e3;
130  Zscore = -1e3;
131 
132  row = tempMd.getRowSql(tempMd.firstRowId());
133 
134  for (size_t objId : tempMd.ids())
135  {
136  tempMd.getValue(MDL_SCORE_BY_PCA_RESIDUAL_PROJ, temp, objId);
137  if (temp > pcaResidualProj)
138  pcaResidualProj=temp;
139 
140  tempMd.getValue(MDL_SCORE_BY_PCA_RESIDUAL_EXP, temp, objId);
141  if (temp > pcaResidualExp)
142  pcaResidualExp=temp;
143 
144  tempMd.getValue(MDL_SCORE_BY_PCA_RESIDUAL, temp, objId);
145  if (temp > pcaResidual)
146  pcaResidual=temp;
147 
148  tempMd.getValue(MDL_SCORE_BY_ZSCORE, temp, objId);
149  if (temp > Zscore)
150  Zscore=temp;
151  }
152 
153  qResidualProj += pcaResidualProj;
154  qResidualExp += pcaResidualExp;
155  qZscore += Zscore;
156 
157  row.setValue(MDL_SCORE_BY_PCA_RESIDUAL_PROJ,pcaResidualProj);
158  row.setValue(MDL_SCORE_BY_PCA_RESIDUAL_EXP,pcaResidualExp);
159  row.setValue(MDL_SCORE_BY_PCA_RESIDUAL,pcaResidual);
160  row.setValue(MDL_SCORE_BY_ZSCORE,Zscore);
161  MDOut.addRow(row);
162  row.clear();
163  }
164 
165  MDOut.write(fnOut);
166 
167  qResidualProj /= MDOut.size();
168  qResidualExp /= MDOut.size();
169  qZscore /= MDOut.size();
170 
172  row.setValue(MDL_SCORE_BY_PCA_RESIDUAL_PROJ,qResidualProj);
173  row.setValue(MDL_SCORE_BY_PCA_RESIDUAL_EXP,qResidualExp);
174  row.setValue(MDL_SCORE_BY_ZSCORE,qZscore);
175 
176  MDOutQ.addRow(row);
177  MDOutQ.write(fnOutQ);
178  progress_bar(blocks.size());
179  }
180 }
181 
183 {
184  size_t numIter = 200;
185  pca.clear();
186  size_t imgno;
187  Image<double> img;
188  double rot, tilt, psi;
189  double shiftX, shiftY;
190  bool mirror;
191  size_t Xdim, Ydim, Zdim, Ndim;
192  phantomVol().getDimensions(Xdim,Ydim,Zdim,Ndim);
193 
194  if ( newXdim == -1 )
195  {
196  newXdim = Xdim;
197  newYdim = Ydim;
198  }
199 
200  Matrix2D<double> proj;;
201  imgno = 0;
202  Projection P;
203  FileName image;
206  Matrix2D<double> E, Trans(3,3);
207  Matrix1D<double> opt_offsets(2);
208 
209 #ifdef DEBUG
210  for (size_t objId : SF.ids())
211  {
212  int enabled;
213  SF.getValue(MDL_ENABLED, enabled, objId);
214  if ( (enabled==-1) )
215  {
216  imgno++;
217  continue;
218  }
219 
220  SF.getValue(MDL_ANGLE_ROT, rot, objId);
221  SF.getValue(MDL_ANGLE_TILT, tilt, objId);
222  SF.getValue(MDL_ANGLE_PSI, psi, objId);
223  SF.getValue(MDL_FLIP, mirror, objId);
224 
225  if (mirror)
226  {
227  double newrot;
228  double newtilt;
229  double newpsi;
230  Euler_mirrorY(rot,tilt,psi,newrot,newtilt,newpsi);
231  rot = newrot;
232  tilt = newtilt;
233  psi = newpsi;
234  }
235 
236  projectVolume(phantomVol(), P, Ydim, Xdim, rot, tilt, psi);
237 
238  Euler_angles2matrix(rot, tilt, psi, E, false);
239  double angle = atan2(MAT_ELEM(E,0,1),MAT_ELEM(E,0,0));
240  selfRotate(LINEAR, P(),-(angle*180)/3.14159 , WRAP);
241  typeCast(P(), temp);
243  temp.resize(newXdim*newYdim);
244  temp.statisticsAdjust(0.f,1.f);
245  pca.addVector(temp);
246  imgno++;
247 
248  #ifdef DEBUG
249  {
250  {
251  size_t val;
252  SF.getValue(MDL_ITEM_ID,val, objId);
253  {
254  std::cout << E << std::endl;
255  std::cout << (angle*180)/3.14159 << std::endl;
256  P.write("kk_proj.tif");
257  SF.getValue(MDL_ANGLE_PSI,psi, objId);
258  std::cout << rot << " " << tilt << " " << psi << std::endl;
259  char c;
260  std::getchar();
261  }
262  }
263  }
264  #endif
265 
266  }
267  pca.subtractAvg();
268  avg = pca.avg;
269  pca.learnPCABasis(numPCAs,numIter);
270  //pca.projectOnPCABasis(projRef);
271  pca.v.clear();
272 
273 #endif
274 
275  imgno = 0;
276  FileName f;
277 
278  for (size_t objId : SF.ids())
279  {
280  int enabled;
281  SF.getValue(MDL_ENABLED, enabled, objId);
282  SF.getValue(MDL_SHIFT_X, shiftX, objId);
283  SF.getValue(MDL_SHIFT_Y, shiftY, objId);
284  SF.getValue(MDL_FLIP, mirror, objId);
285 
286  if ( enabled==-1 )
287  {
288  imgno++;
289  continue;
290  }
291 
292  //geo2TransformationMatrix(input, Trans);
293  //ApplyGeoParams params;
294  //params.only_apply_shifts = true;
295  //img.readApplyGeo(SF,objId,params);
296 
297  SF.getValue(MDL_IMAGE, f, objId);
298  img.read(f);
299  SF.getValue(MDL_ANGLE_ROT, rot, objId);
300  SF.getValue(MDL_ANGLE_TILT, tilt, objId);
301  SF.getValue(MDL_ANGLE_PSI, psi, objId);
302 
303  if (mirror)
304  {
305  double newrot;
306  double newtilt;
307  double newpsi;
308  Euler_mirrorY(rot,tilt,psi,newrot,newtilt,newpsi);
309  rot = newrot;
310  tilt = newtilt;
311  psi = newpsi;
312  }
313 
314  Euler_angles2matrix(rot, tilt, psi, E, false);
315  double angle = atan2(MAT_ELEM(E,0,1),MAT_ELEM(E,0,0));
316  angle=-(angle*180)/3.14159;
317  rotation2DMatrix(angle, Trans, true);
318  dMij(Trans, 0, 2) = shiftX;
319  dMij(Trans, 1, 2) = shiftY;
320 
321  selfApplyGeometry(xmipp_transformation::BSPLINE3, img(), Trans, xmipp_transformation::IS_NOT_INV, xmipp_transformation::WRAP);
322 
323 #ifdef DEBUG
324  {
325  std::cout << MAT_ELEM(Trans,0,0) << " " << MAT_ELEM(Trans,0,1) << " " << MAT_ELEM(Trans,0,2) << " " << MAT_ELEM(Trans,1,0) << " " << MAT_ELEM(Trans,1,1) << " " << MAT_ELEM(Trans,1,2) << " " << MAT_ELEM(Trans,2,0) << " " << MAT_ELEM(Trans,2,1) << " " << MAT_ELEM(Trans,2,2) << " " << std::endl;
326  std::cout << MAT_ELEM(E,0,0) << " " << MAT_ELEM(E,0,1) << " " << MAT_ELEM(E,0,2) << " " << MAT_ELEM(E,1,0) << " " << MAT_ELEM(E,1,1) << " " << MAT_ELEM(E,1,2) << " " << MAT_ELEM(E,2,0) << " " << MAT_ELEM(E,2,1) << " " << MAT_ELEM(E,2,2) << " " << std::endl;
327  size_t val;
328  SF.getValue(MDL_ITEM_ID, val, objId);
329  if (true)
330  {
331  SF.getValue(MDL_IMAGE, f, objId);
332  std::cout << f << std::endl;
333  img.write("kk_exp.tif");
334 
335  char c;
336  std::getchar();
337 
338  }
339  }
340 #endif
341 
342  typeCast(img(), temp);
344  temp.resize(newXdim*newYdim);
345  temp.statisticsAdjust(0.f,1.f);
346  pca.addVector(temp);
347  imgno++;
348  }
349 
350  pca.subtractAvg();
351  pca.learnPCABasis(numPCAs,numIter);
352  pca.projectOnPCABasis(proj);
353 
354  std::vector< MultidimArray<float> > recons(SF.size());
355  for(int n=0; n<SF.size(); n++)
357 
358  pca.reconsFromPCA(proj,recons);
359  pca.evaluateZScore(numPCAs,numIter, false);
360 
361  imgno = 0;
362  Image<float> imgRes;
363  double R2_Proj,R2_Exp;
364  R2_Proj=0;
365  R2_Exp=0;
366 
368  ROI.resizeNoCopy(newYdim,newXdim);
369  ROI.setXmippOrigin();
371  {
372  double temp = std::sqrt(i*i+j*j);
373  if ( temp < (newXdim/2))
374  A2D_ELEM(ROI,i,j)= 1;
375  else
376  A2D_ELEM(ROI,i,j)= 0;
377  }
378 
379  ROI.resize(newYdim*newXdim);
380  ROI.setXmippOrigin();
381 
382  for (size_t objId : SF.ids())
383  {
384  int enabled;
385  SF.getValue(MDL_ENABLED, enabled, objId);
386  if ( enabled==-1 )
387  {
388  imgno++;
389  continue;
390  }
391 
392  //Projected Image
393  SF.getValue(MDL_ANGLE_ROT, rot, objId);
394  SF.getValue(MDL_ANGLE_TILT, tilt, objId);
395  SF.getValue(MDL_ANGLE_PSI, psi, objId);
396  SF.getValue(MDL_FLIP, mirror, objId);
397 
398  if (mirror)
399  {
400  double newrot;
401  double newtilt;
402  double newpsi;
403  Euler_mirrorY(rot,tilt,psi,newrot,newtilt,newpsi);
404  rot = newrot;
405  tilt = newtilt;
406  psi = newpsi;
407  }
408 
409  projectVolume(phantomVol(), P, Ydim, Xdim, rot, tilt, psi);
410  Euler_angles2matrix(rot, tilt, psi, E, false);
411  double angle = atan2(MAT_ELEM(E,0,1),MAT_ELEM(E,0,0));
412  angle = -(angle*180)/3.14159;
413  selfRotate(xmipp_transformation::LINEAR, P(),angle , xmipp_transformation::WRAP);
414  typeCast(P(), temp);
415  selfScaleToSize(xmipp_transformation::LINEAR,temp,newXdim,newYdim,1);
416  temp.resize(newXdim*newYdim);
417  temp.statisticsAdjust(0.f,1.f);
418  temp.setXmippOrigin();
419 
420  //Reconstructed Image
421  recons[imgno].statisticsAdjust(0.f,1.f);
422  recons[imgno].resize(newYdim*newXdim);
423  recons[imgno].setXmippOrigin();
424 
425  R2_Proj = correlationIndex(temp,recons[imgno],&ROI);
426 
427  SF.getValue(MDL_SHIFT_X, shiftX, objId);
428  SF.getValue(MDL_SHIFT_Y, shiftY, objId);
429 
430  SF.getValue(MDL_IMAGE, f, objId);
431  img.read(f);
432 
433  rotation2DMatrix(angle, Trans, true);
434  dMij(Trans, 0, 2) = shiftX;
435  dMij(Trans, 1, 2) = shiftY;
436  selfApplyGeometry(xmipp_transformation::BSPLINE3, img(), Trans, xmipp_transformation::IS_NOT_INV, xmipp_transformation::WRAP);
437 
438  typeCast(img(), temp);
439  selfScaleToSize(xmipp_transformation::LINEAR,temp,newXdim,newYdim,1);
440  temp.resize(newXdim*newYdim);
441  temp.statisticsAdjust(0.f,1.f);
442  temp.setXmippOrigin();
443 
444  R2_Exp = correlationIndex(temp,recons[imgno],&ROI);
445 
446  SF.setValue(MDL_SCORE_BY_PCA_RESIDUAL_PROJ,R2_Proj,objId);
447  SF.setValue(MDL_SCORE_BY_PCA_RESIDUAL_EXP,R2_Exp,objId);
448  SF.setValue(MDL_SCORE_BY_PCA_RESIDUAL,R2_Proj*R2_Exp,objId);
449  SF.setValue(MDL_SCORE_BY_ZSCORE, exp(-A1D_ELEM(pca.Zscore,imgno)),objId);
450 
451  #ifdef DEBUG
452  {
453  size_t val;
454  SF.getValue(MDL_ITEM_ID,val,objId);
455  if (true)
456  {
457  Image<float> imgRecons;
458  Image<double> imgAvg;
459  SF.getValue(MDL_IMAGE,f,objId);
460 
461  img.write("kk_exp0.tif");
462  apply_binary_mask(ROI,temp,imgRecons());
463  imgRecons().resize(newYdim,newXdim);
464  imgRecons.write("kk_exp.tif");
465 
466  recons[imgno].statisticsAdjust(0.f,1.f);
467  apply_binary_mask(ROI,recons[imgno],imgRecons());
468  imgRecons().resize(newYdim,newXdim);
469  imgRecons.write("kk_reconstructed.tif");
470 
471  imgAvg()=pca.avg;
472  imgAvg().resize(newYdim,newXdim);
473  imgAvg.write("kk_average.tif");
474 
475  //Projected Image
476  SF.getValue(MDL_ANGLE_ROT,rot,objId);
477  SF.getValue(MDL_ANGLE_TILT,tilt,objId);
478  SF.getValue(MDL_ANGLE_PSI,psi,objId);
479  SF.getValue(MDL_FLIP,mirror,objId);
480 
481  if (mirror)
482  {
483  double newrot;
484  double newtilt;
485  double newpsi;
486  Euler_mirrorY(rot,tilt,psi,newrot,newtilt,newpsi);
487  rot = newrot;
488  tilt = newtilt;
489  psi = newpsi;
490  }
491 
492  projectVolume(phantomVol(), P, Ydim, Xdim, rot, tilt, psi);
493  Euler_angles2matrix(rot, tilt, psi, E, false);
494  double angle = atan2(MAT_ELEM(E,0,1),MAT_ELEM(E,0,0));
495  selfRotate(LINEAR, P(),-(angle*180)/3.14159 , WRAP);
496  P.write("kk_proj.tif");
497 
498  //std::cout << exp(-R2_Proj) << " " << exp(-R2_Exp) << std::endl;
499  std::cout << R2_Proj << " " << R2_Exp << " " << R2_Proj*R2_Exp << std::endl;
500 
501  for(int i=0; i<numPCAs;i++)
502  {
503  std::cout << "proj " << MAT_ELEM(proj,i,imgno) << " " << "projRef " << MAT_ELEM(proj,i,imgno) << std::endl;
504 
505  }
506 
507  char c;
508  std::getchar();
509 
510  }
511 
512  }
513 
514 #endif
515 
516  imgno++;
517  }
518 
519  recons.clear();
520  img.clear();
521  temp.clear();
522  imgRes.clear();
523  pca.clear();
524 
525 }
void selfApplyGeometry(int Splinedegree, MultidimArray< std::complex< double > > &V1, const Matrix2D< double > &A, bool inv, bool wrap, std::complex< double > outside)
void init_progress_bar(long total)
Rotation angle of an image (double,degrees)
#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.
Definition: basic_pca.h:100
void read(const FileName &inFile, const std::vector< MDLabel > *desiredLabels=nullptr, bool decomposeStack=true) override
void apply_binary_mask(const MultidimArray< int > &mask, const MultidimArray< T > &m_in, MultidimArray< T > &m_out, T subs_val=(T) 0)
Definition: mask.h:857
void Euler_angles2matrix(T alpha, T beta, T gamma, Matrix2D< T > &A, bool homogeneous)
Definition: geometry.cpp:624
doublereal * c
void clear() override
void projectOnPCABasis(Matrix2D< double > &CtY)
Project on basis.
Definition: basic_pca.cpp:119
void resizeNoCopy(const MultidimArray< T1 > &v)
void sqrt(Image< double > &op)
bool getValue(MDObject &mdValueOut, size_t id) const override
Tilting angle of an image (double,degrees)
Shift for the image in the X axis (double)
virtual void synchronize()
Synchronize with other processors.
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)
std::vector< MultidimArray< float > > v
Definition: basic_pca.h:66
double correlationIndex(const MultidimArray< T > &x, const MultidimArray< T > &y, const MultidimArray< int > *mask=NULL, MultidimArray< double > *Contributions=NULL)
void Euler_mirrorY(double rot, double tilt, double psi, double &newrot, double &newtilt, double &newpsi)
Definition: geometry.cpp:1011
#define A1D_ELEM(v, i)
void subtractAvg()
Subtract average.
Definition: basic_pca.cpp:33
Special label to be used when gathering MDs in MpiMetadataPrograms.
virtual IdIteratorProxy< false > ids()
void selfRotate(int SplineDegree, MultidimArray< T > &V1, double ang, char axis='Z', bool wrap=xmipp_transformation::DONT_WRAP, T outside=0)
void getBlocksInMetaDataFile(const FileName &inFile, StringVector &blockList)
std::vector< String > StringVector
Definition: xmipp_strings.h:35
virtual bool getValue(MDObject &mdValueOut, size_t id) const =0
size_t size() const override
#define i
Is this image enabled? (int [-1 or 1])
void selfScaleToSize(int SplineDegree, MultidimArrayGeneric &V1, int Xdim, int Ydim, int Zdim)
Unique identifier for items inside a list or set (std::size_t)
#define FOR_ALL_ELEMENTS_IN_ARRAY2D(m)
#define MAT_ELEM(m, i, j)
Definition: matrix2d.h:116
MultidimArray< double > Zscore
Definition: basic_pca.h:75
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)
Definition: basic_pca.cpp:384
size_t addRow(const MDRow &row) override
double * f
void setValue(const MDObject &object) override
#define dMij(m, i, j)
Definition: matrix2d.h:139
Flip the image? (bool)
void progress_bar(long rlen)
void projectVolume(FourierProjector &projector, Projection &P, int Ydim, int Xdim, double rot, double tilt, double psi, const MultidimArray< double > *ctf)
virtual void gatherResults()
Gather alignment.
void write(const FileName &outFile, WriteModeMetaData mode=MD_OVERWRITE) const override
virtual size_t size() const =0
size_t size() const override
void rotation2DMatrix(T ang, Matrix2D< T > &result, bool homogeneous)
#define j
void importObjects(const MetaData &md, const std::vector< size_t > &objectsToAdd, bool doClear=true) override
size_t firstRowId() const override
bool setValue(const MDLabel label, const T &valueIn, size_t id)
void sort(MetaDataDb &MDin, const MDLabel sortLabel, bool asc=true, int limit=-1, int offset=0)
void reconsFromPCA(const Matrix2D< double > &CtY, std::vector< MultidimArray< float > > &recons)
Reconstruct from PCA basis.
Definition: basic_pca.cpp:153
void typeCast(const Matrix1D< T1 > &v1, Matrix1D< T2 > &v2)
Definition: matrix1d.h:1227
size_t lastRowId() const override
std::string String
Definition: xmipp_strings.h:34
double psi(const double x)
void clear()
Clear.
Definition: basic_pca.h:84
String formatString(const char *format,...)
FileName getDir() const
void learnPCABasis(size_t NPCA, size_t Niter)
Learn basis.
Definition: basic_pca.cpp:170
int read(const FileName &name, DataMode datamode=DATA, size_t select_img=ALL_IMAGES, bool mapData=false, int mode=WRITE_READONLY)
MultidimArray< double > avg
Definition: basic_pca.h:72
Shift for the image in the Y axis (double)
void addUsageLine(const char *line, bool verbatim=false)
void obtainPCAs(MetaData &SF, size_t numPCAs)
int getIntParam(const char *param, int arg=0)
MDRowSql getRowSql(size_t id)
int * n
Name of an image (std::string)
void clear()
Definition: xmipp_image.h:144
void addParamsLine(const String &line)
void statisticsAdjust(U avgF, U stddevF)
void getDimensions(size_t &Xdim, size_t &Ydim, size_t &Zdim, size_t &Ndim) const
PCAMahalanobisAnalyzer pca