Xmipp  v3.23.11-Nereus
subtract_projection.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  *
3  * Authors: Estrella Fernandez Gimenez (me.fernandez@cnb.csic.es)
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 "subtract_projection.h"
27  #include "core/transformations.h"
28  #include "core/metadata_extension.h"
29  #include "core/multidim_array.h"
32  #include "core/xmipp_image_base.h"
33  #include "core/xmipp_fft.h"
34  #include "core/xmipp_fftw.h"
36  #include "data/projection.h"
37  #include "data/mask.h"
38  #include "data/filters.h"
39  #include "data/morphology.h"
40  #include <iostream>
41  #include <string>
42  #include <sstream>
43  #include "data/image_operate.h"
44  #include <iostream>
45  #include <cstdlib>
46  #include <vector>
47  #include <utility>
48 
49 
50  // Empty constructor =======================================================
52 {
53  produces_a_metadata = true;
55  keep_input_columns = true;
56  save_metadata_stack = true;
57  remove_disabled = false;
58  projector = nullptr;
59  projectorMask = nullptr;
60  rank = 0;
61 }
62 
64 {
65  delete projector;
66  delete projectorMask;
67 }
68 
69  // Read arguments ==========================================================
71  {
73  fnVolR = getParam("--ref");
74  fnMask=getParam("--mask");
75  sigma=getIntParam("--sigma");
76  sampling = getDoubleParam("--sampling");
77  padFourier = getDoubleParam("--padding");
78  maxResol = getDoubleParam("--max_resolution");
79  limitfreq = getIntParam("--limit_freq");
80  cirmaskrad = getDoubleParam("--cirmaskrad");
81  fnProj = getParam("--save");
82  nonNegative = checkParam("--nonNegative");
83  boost = checkParam("--boost");
84  subtract = checkParam("--subtract");
85  }
86 
87  // Show ====================================================================
89  if (!verbose)
90  return;
91  std::cout
92  << "Input particles:\t" << fnParticles << std::endl
93  << "Reference volume:\t" << fnVolR << std::endl
94  << "Mask of the region to keep:\t" << fnMask << std::endl
95  << "Sigma of low pass filter:\t" << sigma << std::endl
96  << "Sampling rate:\t" << sampling << std::endl
97  << "Padding factor:\t" << padFourier << std::endl
98  << "Max. Resolution:\t" << maxResol << std::endl
99  << "Limit frequency:\t" << limitfreq << std::endl
100  << "Output particles:\t" << fnOut << std::endl;
101  }
102 
103  // usage ===================================================================
105  {
106  //Usage
107  addUsageLine("This program computes the subtraction between particles and a reference");
108  addUsageLine(" volume, by computing its projections with the same angles that input particles have.");
109  addUsageLine(" Then, each particle and the correspondent projection of the reference volume are numerically");
110  addUsageLine(" adjusted and subtracted using a mask which denotes the region to keep or subtract.");
111  //Parameters
113  addParamsLine("--ref <volume>\t: Reference volume to subtract");
114  addParamsLine("[--mask <mask=\"\">]\t: 3D mask for region to keep, no mask implies subtraction of whole images");
115  addParamsLine("[--sampling <sampling=1>]\t: Sampling rate (A/pixel)");
116  addParamsLine("[--max_resolution <f=4>]\t: Maximum resolution (A)");
117  addParamsLine("[--fmask_width <w=40>]\t: Extra width of final mask (A). -1 means no masking.");
118  addParamsLine("[--padding <p=2>]\t: Padding factor for Fourier projector");
119  addParamsLine("[--sigma <s=2>]\t: Decay of the filter (sigma) to smooth the mask transition");
120  addParamsLine("[--limit_freq <l=0>]\t: Limit frequency (= 1) or not (= 0) in adjustment process");
121  addParamsLine("[--nonNegative]\t: Ignore particles with negative beta0 or R2");
122  addParamsLine("[--boost]\t: Perform a boosting of original particles");
123  addParamsLine("[--cirmaskrad <c=-1.0>]\t: Radius of the circular mask");
124  addParamsLine("[--save <structure=\"\">]\t: Path for saving intermediate files");
125  addParamsLine("[--subtract]\t: The mask contains the region to SUBTRACT");
126  addExampleLine("A typical use is:",false);
127  addExampleLine("xmipp_subtract_projection -i input_particles.xmd --ref input_map.mrc --mask mask_vol.mrc "
128  "-o output_particles --sampling 1 --fmask_width 40 --max_resolution 4");
129  }
130 
132  r.getValueOrDefault(MDL_IMAGE, fnImgI, "no_filename");
133  I.read(fnImgI);
134  I().setXmippOrigin();
135  }
136 
137  void ProgSubtractProjection::writeParticle(MDRow &rowOut, FileName fnImgOut, Image<double> &img, double R2a, double b0save, double b1save) {
138  img.write(fnImgOut);
139  rowOut.setValue(MDL_IMAGE, fnImgOut);
140  rowOut.setValue(MDL_SUBTRACTION_R2, R2a);
141  rowOut.setValue(MDL_SUBTRACTION_BETA0, b0save);
142  rowOut.setValue(MDL_SUBTRACTION_BETA1, b1save);
143  if (nonNegative && (disable || R2a < 0))
144  {
145  rowOut.setValue(MDL_ENABLED, -1);
146  }
147  }
148 
150  if (fnM.isEmpty())
151  {
152  m().initZeros((int)XSIZE(V()),(int)YSIZE(V()),(int)ZSIZE(V()));
153  im = m;
155  DIRECT_MULTIDIM_ELEM(im(),n) += 1;
156  }
157  else
158  {
159  m.read(fnM);
160  m().setXmippOrigin();
161  im = m;
162  if (!subtract)
163  {
165  DIRECT_MULTIDIM_ELEM(im(),n) = (DIRECT_MULTIDIM_ELEM(m(),n)*(-1))+1;
166  }
167  }
168  }
169 
171  double maxMaskVol;
172  double minMaskVol;
174  mm.computeDoubleMinMax(minMaskVol, maxMaskVol);
176  DIRECT_MULTIDIM_ELEM(mm,n) = (DIRECT_MULTIDIM_ELEM(mm,n)>0.1*maxMaskVol) ? 1:0;
177  return m;
178  }
179 
181  PmaskI = m;
182  MultidimArray<double> &mPmaskI=PmaskI();
184  DIRECT_MULTIDIM_ELEM(mPmaskI,n) = (DIRECT_MULTIDIM_ELEM(mPmaskI,n)*(-1))+1;
185  return PmaskI;
186  }
187 
190  ctf.readFromMdRow(r);
191  ctf.Tm = sampling;
194  FilterCTF.ctf.enable_CTFnoise = false;
195  FilterCTF.ctf = ctf;
196  // Padding before apply CTF
197  MultidimArray <double> &mpad = padp();
198  mpad.setXmippOrigin();
199  MultidimArray<double> &mproj = proj();
200  mproj.setXmippOrigin();
201  mproj.window(mpad,STARTINGY(mproj)*(int)padFourier, STARTINGX(mproj)*(int)padFourier, FINISHINGY(mproj)*(int)padFourier, FINISHINGX(mproj)*(int)padFourier);
202  FilterCTF.generateMask(mpad);
203  FilterCTF.applyMaskSpace(mpad);
204  //Crop to restore original size
205  mpad.window(mproj,STARTINGY(mproj), STARTINGX(mproj), FINISHINGY(mproj), FINISHINGX(mproj));
206  }
207  return proj;
208  }
209 
210 void ProgSubtractProjection::processParticle(const MDRow &rowprocess, int sizeImg, FourierTransformer &transformerPf, FourierTransformer &transformerIf) {
211  readParticle(rowprocess);
215  roffset.initZeros(2);
216  rowprocess.getValueOrDefault(MDL_SHIFT_X, roffset(0), 0);
217  rowprocess.getValueOrDefault(MDL_SHIFT_Y, roffset(1), 0);
218  roffset *= -1;
220  selfTranslate(xmipp_transformation::LINEAR, P(), roffset, xmipp_transformation::WRAP);
221  Pctf = applyCTF(rowprocess, P);
222  MultidimArray<double> &mPctf = Pctf();
225  transformerPf.FourierTransform(Pctf(), PFourier, false);
226  transformerIf.FourierTransform(I(), IFourier, false);
227 }
228 
230 const MultidimArray<double> &InvM, FourierTransformer &transformerImgiM) {
231  ImgiM().initZeros(Img);
232  ImgiM().setXmippOrigin();
235  transformerImgiM.FourierTransform(ImgiM(),ImgiMFourier,false);
236  return ImgiMFourier;
237 }
238 
239  double ProgSubtractProjection::evaluateFitting(const MultidimArray< std::complex<double> > &y,
240  const MultidimArray< std::complex<double> > &yp) const{
241  double sumY = 0;
242  double sumY2 = 0;
243  double sumE2 = 0;
245  double realyn = real(DIRECT_MULTIDIM_ELEM(y, n));
246  double imagyn = imag(DIRECT_MULTIDIM_ELEM(y, n));
247  double ereal = realyn - real(DIRECT_MULTIDIM_ELEM(yp, n));
248  double eimag = imagyn - imag(DIRECT_MULTIDIM_ELEM(yp, n));
249  sumE2 += ereal*ereal + eimag*eimag;
250  sumY += realyn + imagyn;
251  sumY2 += realyn*realyn + imagyn*imagyn;
252  }
253  auto meanY = sumY / (2.0*(double)MULTIDIM_SIZE(y));
254  auto varY = sumY2 / (2.0*(double)MULTIDIM_SIZE(y)) - meanY*meanY;
255  auto R2 = 1.0 - (sumE2/(2.0*(double)MULTIDIM_SIZE(y))) / varY;
256  return R2;
257  }
258 
259 Matrix1D<double> ProgSubtractProjection::checkBestModel(MultidimArray< std::complex<double> > &PFourierf, const MultidimArray< std::complex<double> > &PFourierf0,
260  const MultidimArray< std::complex<double> > &PFourierf1, const MultidimArray< std::complex<double> > &IFourierf) const {
261  // Compute R2 coefficient for order 0 model (R20) and order 1 model (R21)
262  auto N = 2.0*(double)MULTIDIM_SIZE(PFourierf);
263  double R20adj = evaluateFitting(IFourierf, PFourierf0); // adjusted R2 for an order 0 model = R2
264  double R21 = evaluateFitting(IFourierf, PFourierf1);
265  double R21adj = 1.0 - (1.0 - R21) * (N - 1.0) / (N - 2.0); // adjusted R2 for an order 1 model -> p = 2
266  //Decide best fitting
267  Matrix1D<double> R2(2);
268  if (R21adj > R20adj) { // Order 1: T(w) = b01 + b1*wi
269  PFourierf = PFourierf1;
270  R2(0) = R21adj;
271  R2(1) = 1;
272  }
273  else { // Order 0: T(w) = b00
274  PFourierf = PFourierf0;
275  R2(0) = R20adj;
276  R2(1) = 0;
277  }
278  return R2;
279 }
280 
282  // Read input volume, mask and particles metadata
283  show();
284  V.read(fnVolR);
285  V().setXmippOrigin();
286 
287  // Create 2D circular mask to avoid edge artifacts after wrapping
288  size_t Xdim;
289  size_t Ydim;
290  size_t Zdim;
291  size_t Ndim;
292  V.getDimensions(Xdim, Ydim, Zdim, Ndim);
293  cirmask().initZeros((int)Ydim, (int)Xdim);
294  cirmask().setXmippOrigin();
295  if (cirmaskrad == -1.0)
296  cirmaskrad = (double)XSIZE(V())/2;
298  cirmask.write(formatString("%s/cirmask.mrc", fnProj.c_str()));
299 
300  // Create mock image of same size as particles (and referencce volume) to get
301  I().initZeros((int)Ydim, (int)Xdim);
302  I().initConstant(1);
304 
305  // Initialize Gaussian LPF to smooth mask
308  FilterG.w1=sigma;
309 
310  // Construct frequencies image
312  Matrix1D<double> w(2);
313  double cutFreq = sampling/maxResol;
314  for (int i=0; i<YSIZE(wi); i++) {
316  for (int j=0; j<XSIZE(wi); j++) {
318  DIRECT_A2D_ELEM(wi,i,j) = (int)round((sqrt(YY(w)*YY(w) + XX(w)*XX(w))) * (int)XSIZE(IFourier)); // indexes
319  }
320  }
321  if (limitfreq == 0)
322  maxwiIdx = (int)XSIZE(wi);
323  else
324  DIGFREQ2FFT_IDX(cutFreq, (int)YSIZE(IFourier), maxwiIdx)
325 
326  if (rank==0)
327  {
328  // Read or create mask keep and compute inverse of mask keep (mask subtract)
329  createMask(fnMask, vM, ivM);
332  // Initialize Fourier projectors
333  std::cout << "-------Initializing projectors-------" << std::endl;
336  std::cout << "-------Projectors initialized-------" << std::endl;
337  }
338  else
339  {
342  }
343  }
344 
345 void ProgSubtractProjection::processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)
346  {
347  // Initialize aux variable
348  disable = false;
349  // Project volume and process projections
350  const auto sizeI = (int)XSIZE(I());
351  processParticle(rowIn, sizeI, transformerP, transformerI);
352  // Build projected and final masks
353  if (fnMask.isEmpty()) { // If there is no provided mask
354  M().initZeros(P());
355  // inverse mask (iM) is all 1s
356  iM = invertMask(M);
357  }
358  else { // If a mask has been provided
360  // Apply binarization, shift and gaussian filter to the projected mask
361  M = binarizeMask(Pmask);
362  selfTranslate(xmipp_transformation::LINEAR, M(), roffset, xmipp_transformation::DONT_WRAP);
364  if (subtract) // If the mask contains the part to SUBTRACT: iM = input mask
365  iM = M;
366  else // If the mask contains the part to KEEP: iM = INVERSE of original mask
367  iM = invertMask(M);
368  }
369 
370  // Compute estimation images: IiM = I*iM and PiM = P*iM
373 
374  // Estimate transformation with model of order 0: T(w) = beta00 and model of order 1: T(w) = beta01 + beta1*w
376  num0.initZeros(maxwiIdx+1);
378  den0.initZeros(maxwiIdx+1);
379  Matrix2D<double> A1;
380  A1.initZeros(2,2);
381  Matrix1D<double> b1;
382  b1.initZeros(2);
384  int win = DIRECT_MULTIDIM_ELEM(wi, n);
385  if (win < maxwiIdx)
386  {
387  double realPiMFourier = real(DIRECT_MULTIDIM_ELEM(PiMFourier,n));
388  double imagPiMFourier = imag(DIRECT_MULTIDIM_ELEM(PiMFourier,n));
389  DIRECT_MULTIDIM_ELEM(num0,win) += real(DIRECT_MULTIDIM_ELEM(IiMFourier,n)) * realPiMFourier
390  + imag(DIRECT_MULTIDIM_ELEM(IiMFourier,n)) * imagPiMFourier;
391  DIRECT_MULTIDIM_ELEM(den0,win) += realPiMFourier*realPiMFourier + imagPiMFourier*imagPiMFourier;
392  A1(0,0) += realPiMFourier*realPiMFourier + imagPiMFourier*imagPiMFourier;
393  A1(0,1) += win*(realPiMFourier + imagPiMFourier);
394  A1(1,1) += 2*win;
395  b1(0) += real(DIRECT_MULTIDIM_ELEM(IiMFourier,n)) * realPiMFourier + imag(DIRECT_MULTIDIM_ELEM(IiMFourier,n)) * imagPiMFourier;
396  b1(1) += win*(real(DIRECT_MULTIDIM_ELEM(IiMFourier,n))+imag(DIRECT_MULTIDIM_ELEM(IiMFourier,n)));
397  }
398  }
399  A1(1,0) = A1(0,1);
400 
401  // Compute beta00 from order 0 model
402  double beta00 = num0.sum()/den0.sum();
403  if (nonNegative && beta00 < 0)
404  {
405  disable = true;
406  }
407  // Apply adjustment order 0: PFourier0 = T(w) * PFourier = beta00 * PFourier
410  DIRECT_MULTIDIM_ELEM(PFourier0,n) *= beta00;
411  PFourier0(0,0) = IiMFourier(0,0);
412 
413  // Compute beta01 and beta1 from order 1 model
415  h.A = A1;
416  h.b = b1;
417  Matrix1D<double> betas1;
418  solveLinearSystem(h,betas1);
419  double beta01 = betas1(0);
420  double beta1 = betas1(1);
421 
422  // Apply adjustment order 1: PFourier1 = T(w) * PFourier = (beta01 + beta1*w) * PFourier
426  PFourier1(0,0) = IiMFourier(0,0);
427 
428  // Check best model
430  double beta0save;
431  double beta1save;
432  if (R2adj(1) == 0)
433  {
434  beta0save = beta00;
435  beta1save = 0;
436  }
437  else
438  {
439  beta0save = beta01;
440  beta1save = beta1;
441  }
442 
443  // Create empty new image for output particle
444  MultidimArray<double> &mIdiff=Idiff();
445  mIdiff.initZeros(I());
446  mIdiff.setXmippOrigin();
447 
448  if (boost) // Boosting of original particles
449  {
450  if (R2adj(1) == 0)
451  {
453  DIRECT_MULTIDIM_ELEM(IFourier,n) /= beta00;
454  }
455  else if (R2adj(1) == 1)
456  {
459  }
461  }
462  else // Subtraction
463  {
464  // Recover adjusted projection (P) in real space
466  mIdiff.initZeros(I());
467  mIdiff.setXmippOrigin();
470  }
471  writeParticle(rowOut, fnImgOut, Idiff, R2adj(0), beta0save, beta1save);
472 }
473 
475 {
477 }
void readParams() override
Read argument from command line.
Rotation angle of an image (double,degrees)
#define YSIZE(v)
Defocus U (Angstroms)
FourierProjector * projectorMask
MultidimArray< std::complex< double > > PiMFourier
MultidimArray< std::complex< double > > IiMFourier
Image< double > binarizeMask(Projection &) const
double getDoubleParam(const char *param, int arg=0)
CTFDescription ctf
MultidimArray< std::complex< double > > PFourier1
void inverseFourierTransform()
Definition: xmipp_fftw.cpp:329
#define FINISHINGX(v)
FourierTransformer transformerI
#define MULTIDIM_SIZE(v)
FourierTransformer transformerP
void show() const override
Show.
void writeParticle(MDRow &rowOut, FileName, Image< double > &, double, double, double)
Matrix1D< double > checkBestModel(MultidimArray< std::complex< double > > &, const MultidimArray< std::complex< double > > &, const MultidimArray< std::complex< double > > &, const MultidimArray< std::complex< double > > &) const
void sqrt(Image< double > &op)
Tilting angle of an image (double,degrees)
static double * y
double evaluateFitting(const MultidimArray< std::complex< double > > &, const MultidimArray< std::complex< double > > &) const
Shift for the image in the X axis (double)
#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)
Special label to be used when gathering MDs in MpiMetadataPrograms.
Matrix1D< double > roffset
doublereal * w
MultidimArray< std::complex< double > > ImgiMFourier
Name for the CTF Model (std::string)
void write(const FileName &outFile, WriteModeMetaData mode=MD_OVERWRITE) const
#define DIGFREQ2FFT_IDX(freq, size, idx)
Definition: xmipp_fft.h:61
FourierProjector * projector
#define STARTINGX(v)
MultidimArray< std::complex< double > > computeEstimationImage(const MultidimArray< double > &, const MultidimArray< double > &, FourierTransformer &)
#define i
FourierTransformer transformerIiM
Is this image enabled? (int [-1 or 1])
return mm
#define STARTINGY(v)
Matrix1D< double > b
void window(MultidimArray< T1 > &result, int n0, int z0, int y0, int x0, int nF, int zF, int yF, int xF, T1 init_value=0) const
const char * getParam(const char *param, int arg=0)
#define XX(v)
Definition: matrix1d.h:85
void selfTranslate(int SplineDegree, MultidimArray< T > &V1, const Matrix1D< double > &v, bool wrap=xmipp_transformation::WRAP, T outside=0)
#define CTF
Matrix2D< double > A
R2 coefficient of subtracted particle.
MultidimArray< int > wi
#define XSIZE(v)
void computeDoubleMinMax(double &minval, double &maxval) const
#define FOR_ALL_DIRECT_ELEMENTS_IN_MULTIDIMARRAY(v)
double Tm
Sampling rate (A/pixel)
Definition: ctf.h:240
Image< double > applyCTF(const MDRow &, Projection &)
#define ZSIZE(v)
#define DIRECT_MULTIDIM_ELEM(v, n)
void addExampleLine(const char *example, bool verbatim=true)
void projectVolume(FourierProjector &projector, Projection &P, int Ydim, int Xdim, double rot, double tilt, double psi, const MultidimArray< double > *ctf)
void readFromMdRow(const MDRow &row, bool disable_if_not_K=true)
Definition: ctf.cpp:1172
int verbose
Verbosity level.
void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut) override
~ProgSubtractProjection()
Destructor.
void initZeros()
Definition: matrix1d.h:592
void solveLinearSystem(PseudoInverseHelper &h, Matrix1D< double > &result)
void FourierTransform(T &v, T1 &V, bool getCopy=true)
Definition: xmipp_fftw.h:166
__device__ float FFT_IDX2DIGFREQ(int idx, int size)
void createMask(const FileName &, Image< double > &, Image< double > &)
Processing methods.
#define j
#define YY(v)
Definition: matrix1d.h:93
int m
const T & getValueOrDefault(MDLabel label, const T &def) const
bool remove_disabled
Remove disabled images from the input selfile.
Beta 0 coefficient of adjusted model for subtract particle.
void setValue(MDLabel label, const T &d, bool addLabel=true)
#define FINISHINGY(v)
const MultidimArray< double > * ctfImage
int round(double x)
Definition: ap.cpp:7245
void readParticle(const MDRow &rowIn)
Read and write methods.
virtual bool containsLabel(MDLabel label) const =0
bool isEmpty() const
bool save_metadata_stack
Save the associated output metadata when output file is a stack.
ProgSubtractProjection()
Empty constructor.
void produceSideInfo()
Produce Side information.
Definition: ctf.cpp:1392
void processParticle(const MDRow &rowIn, int, FourierTransformer &, FourierTransformer &)
MultidimArray< std::complex< double > > PFourier
String formatString(const char *format,...)
void initZeros()
Definition: matrix2d.h:626
bool keep_input_columns
Keep input metadata columns.
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 defineParams() override
Define parameters.
#define REALGAUSSIAN
bool each_image_produces_an_output
Indicate that an output is produced for each image in the input.
Shift for the image in the Y axis (double)
void addUsageLine(const char *line, bool verbatim=false)
void initZeros(const MultidimArray< T1 > &op)
FourierTransformer transformerPiM
bool enable_CTFnoise
Enable CTFnoise part.
Definition: ctf.h:273
void RaisedCosineMask(MultidimArray< double > &mask, double r1, double r2, int mode, double x0, double y0, double z0)
Definition: mask.cpp:36
int getIntParam(const char *param, int arg=0)
void generateMask(MultidimArray< double > &v)
Image< double > invertMask(const Image< double > &)
int * n
Name of an image (std::string)
bool produces_a_metadata
Indicate that the unique final output file is a Metadata.
MultidimArray< std::complex< double > > IFourier
double sum() const
#define LOWPASS
void addParamsLine(const String &line)
MultidimArray< std::complex< double > > PFourier0
void applyMaskSpace(MultidimArray< double > &v)
Beta 1 coefficient of adjusted model for subtract particle.
void getDimensions(size_t &Xdim, size_t &Ydim, size_t &Zdim, size_t &Ndim) const