Xmipp  v3.23.11-Nereus
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ProgRecFourierAccel Class Reference

#include <reconstruct_fourier_accel.h>

Inheritance diagram for ProgRecFourierAccel:
Inheritance graph
[legend]
Collaboration diagram for ProgRecFourierAccel:
Collaboration graph
[legend]

Public Member Functions

 ProgRecFourierAccel ()
 
void run ()
 
void finishComputations (const FileName &out_name)
 
virtual void setIO (const FileName &fn_in, const FileName &fn_out)
 
- Public Member Functions inherited from ProgReconsBase
virtual ~ProgReconsBase ()
 
- 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)
 
ParamDefgetParamDef (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 &param, 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 ()
 

Protected Member Functions

void mirrorAndCropTempSpaces ()
 
void forceHermitianSymmetry ()
 
void processWeights ()
 
void createLoadingThread ()
 
void cleanLoadingThread ()
 
void readParams ()
 
void defineParams ()
 
void show ()
 
void produceSideinfo ()
 
void processImages (int firstImageIndex, int lastImageIndex)
 
void releaseTempSpaces ()
 
- Protected Member Functions inherited from XmippProgram
void defineCommons ()
 

Protected Attributes

LoadThreadParams loadThread
 
MetaDataVec SF
 
FileName fn_out
 
FileName fn_in
 
int maxVolumeIndexYZ
 
int maxVolumeIndexX
 
std::complex< float > *** tempVolume
 
float *** tempWeights
 
- Protected Attributes inherited from XmippProgram
int errorCode
 
ProgramDefprogDef
 Program definition and arguments parser. More...
 
std::map< String, CommentListdefaultComments
 
int argc
 Original command line arguments. More...
 
const char ** argv
 

Additional Inherited Members

- Public Attributes inherited from XmippProgram
bool doRun
 
bool runWithoutArgs
 
int verbose
 Verbosity level. More...
 
int debug
 

Detailed Description

Definition at line 99 of file reconstruct_fourier_accel.h.

Constructor & Destructor Documentation

◆ ProgRecFourierAccel()

ProgRecFourierAccel::ProgRecFourierAccel ( )
inline

Definition at line 102 of file reconstruct_fourier_accel.h.

102 : tempVolume(NULL), tempWeights(NULL) {};
std::complex< float > *** tempVolume

Member Function Documentation

◆ cleanLoadingThread()

void ProgRecFourierAccel::cleanLoadingThread ( )
protected

Method will release all resources allocated for loading images

Definition at line 167 of file reconstruct_fourier_accel.cpp.

167  {
168  threadOpCode = EXIT_THREAD;
169  // Waiting for thread to finish
170  barrier_wait( &barrier );
171  pthread_join(*(&loadThread.id), nullptr);
173 }
int barrier_destroy(barrier_t *barrier)
Barrier * barrier
constexpr int EXIT_THREAD
int barrier_wait(barrier_t *barrier)

◆ createLoadingThread()

void ProgRecFourierAccel::createLoadingThread ( )
protected

Method will create thread used for loading images and set all necessary values/variables

Definition at line 158 of file reconstruct_fourier_accel.cpp.

158  {
159  barrier_init( &barrier, 2 ); // two barries - for main and loading thread
160  loadThread.buffer1 = loadThread.buffer2 = nullptr;
161  loadThread.parent = this;
162  loadThread.selFile = &SF;
163  pthread_create( &loadThread.id , nullptr, loadImageThread, (void *)(&loadThread) );
164  threadOpCode = PRELOAD_IMAGE;
165 }
int barrier_init(barrier_t *barrier, int needed)
constexpr int PRELOAD_IMAGE
Barrier * barrier
ProgRecFourierAccel * parent

◆ defineParams()

void ProgRecFourierAccel::defineParams ( )
protectedvirtual

Specify supported command line arguments

Reimplemented from XmippProgram.

Definition at line 55 of file reconstruct_fourier_accel.cpp.

56 {
57  //usage
58  addUsageLine("Generate 3D reconstructions from projections using direct Fourier interpolation with arbitrary geometry.");
59  addUsageLine("Kaisser-windows are used for interpolation in Fourier space.");
60  //params
61  addParamsLine(" -i <md_file> : Metadata file with input projections");
62  addParamsLine(" [-o <volume_file=\"rec_fourier.vol\">] : Filename for output volume");
63  addParamsLine(" [--sym <symfile=c1>] : Enforce symmetry in projections");
64  addParamsLine(" [--padding <proj=2.0> <vol=2.0>] : Padding used for projections and volume");
65  addParamsLine(" [--max_resolution <p=0.5>] : Max resolution (Nyquist=0.5)");
66  addParamsLine(" [--weight] : Use weights stored in the image metadata");
67  addParamsLine(" [--blob <radius=1.9> <order=0> <alpha=15>] : Blob parameters");
68  addParamsLine(" : radius in pixels, order of Bessel function in blob and parameter alpha");
69  addParamsLine(" [--fast] : Do the blobing at the end of the computation.");
70  addParamsLine(" : Gives slightly different results, but is faster.");
71  addParamsLine(" [--useCTF] : Use CTF information if present");
72  addParamsLine(" [--sampling <Ts=1>] : sampling rate of the input images in Angstroms/pixel");
73  addParamsLine(" : It is only used when correcting for the CTF");
74  addParamsLine(" [--phaseFlipped] : Give this flag if images have been already phase flipped");
75  addParamsLine(" [--minCTF <ctf=0.01>] : Minimum value of the CTF that will be inverted");
76  addParamsLine(" : CTF values (in absolute value) below this one will not be corrected");
77  addParamsLine(" [--bufferSize <size=25>] : Number of projection loaded in memory (will be actually 2x as much.");
78  addParamsLine(" : This will require up to 4*size*projSize*projSize*16B, e.g.");
79  addParamsLine(" : 100MB for projection of 256x256 or 400MB for projection of 512x512");
80  addExampleLine("For reconstruct enforcing i3 symmetry and using stored weights:", false);
81  addExampleLine(" xmipp_reconstruct_fourier_accel -i reconstruction.sel --sym i3 --weight");
82 }
void addExampleLine(const char *example, bool verbatim=true)
void addUsageLine(const char *line, bool verbatim=false)
void addParamsLine(const String &line)

◆ finishComputations()

void ProgRecFourierAccel::finishComputations ( const FileName out_name)

Method will take data stored in tempVolume and tempWeights (which should be cropped in X axis), calculate IFFT and store result to final destination.

Definition at line 1002 of file reconstruct_fourier_accel.cpp.

1003 {
1004  if (useFast) {
1005  tempVolume = applyBlob(tempVolume, blob.radius, blobTableSqrt, iDeltaSqrt);
1006  tempWeights = applyBlob(tempWeights, blob.radius, blobTableSqrt, iDeltaSqrt);
1007  }
1008 
1010  processWeights();
1013  allocateVoutFourier(VoutFourier);
1014  convertToExpectedSpace(tempVolume, maxVolumeIndexYZ, VoutFourier);
1016 
1017  // Output volume
1018  Image<double> Vout;
1019  Vout().initZeros(paddedImgSize,paddedImgSize,paddedImgSize);
1020  FourierTransformer transformerVol;
1021  transformerVol.setThreadsNumber(2); // use just main and 'loading' thread
1022  transformerVol.fReal = &(Vout.data);
1023  transformerVol.setFourierAlias(VoutFourier);
1024  transformerVol.recomputePlanR2C();
1025 
1026  transformerVol.inverseFourierTransform();
1027  transformerVol.clear();
1028  CenterFFT(Vout(),false);
1029 
1030  // Correct by the Fourier transform of the blob
1031  Vout().setXmippOrigin();
1032  Vout().selfWindow(FIRST_XMIPP_INDEX(imgSize),FIRST_XMIPP_INDEX(imgSize),
1033  FIRST_XMIPP_INDEX(imgSize),LAST_XMIPP_INDEX(imgSize),
1034  LAST_XMIPP_INDEX(imgSize),LAST_XMIPP_INDEX(imgSize));
1035  double pad_relation= ((double)padding_factor_proj/padding_factor_vol);
1036  pad_relation = (pad_relation * pad_relation * pad_relation);
1037 
1038  MultidimArray<double> &mVout=Vout();
1039  double ipad_relation=1.0/pad_relation;
1040  double meanFactor2=0;
1042  {
1043  double radius=sqrt((double)(k*k+i*i+j*j));
1044  double aux=radius*iDeltaFourier;
1045  double factor = Fourier_blob_table(ROUND(aux));
1046  double factor2=(pow(Sinc(radius/(2*imgSize)),2));
1047  A3D_ELEM(mVout,k,i,j) /= (ipad_relation*factor2*factor);
1048  meanFactor2+=factor2;
1049  }
1050  meanFactor2/=MULTIDIM_SIZE(mVout);
1052  A3D_ELEM(mVout,k,i,j) *= meanFactor2;
1053  Vout.write(out_name);
1054  Vout.clear();
1055 }
std::complex< float > *** tempVolume
void inverseFourierTransform()
Definition: xmipp_fftw.cpp:329
void setThreadsNumber(int tNumber)
Definition: xmipp_fftw.h:119
#define MULTIDIM_SIZE(v)
void sqrt(Image< double > &op)
void setFourierAlias(T &V)
Definition: xmipp_fftw.h:215
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)
#define i
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
MultidimArray< double > * fReal
Definition: xmipp_fftw.h:64
void CenterFFT(MultidimArray< T > &v, bool forward)
Definition: xmipp_fft.h:291
#define A3D_ELEM(V, k, i, j)
MultidimArray< T > data
Definition: xmipp_image.h:55
#define FOR_ALL_ELEMENTS_IN_ARRAY3D(V)
#define ROUND(x)
Definition: xmipp_macros.h:210
#define j
double Sinc(double Argument)
#define FIRST_XMIPP_INDEX(size)
Definition: xmipp_macros.h:439
#define LAST_XMIPP_INDEX(size)
Definition: xmipp_macros.h:448
double radius
Spatial radius in Universal System units.
Definition: blobs.h:115
void clear()
Definition: xmipp_image.h:144

◆ forceHermitianSymmetry()

void ProgRecFourierAccel::forceHermitianSymmetry ( )
protected

Method will enforce Hermitian symmetry, i.e will remove make sure that the values in temporal space at X=0 are complex conjugate of in respect to center of the space

Definition at line 889 of file reconstruct_fourier_accel.cpp.

889  {
890  int x = 0;
891  for (int z = 0; z <= maxVolumeIndexYZ; z++) {
892  for (int y = 0; y <= maxVolumeIndexYZ/2; y++) {
893  int newPos[3];
894  // mirror against center of the volume, e.g. [0,0,0]->[size,size,size]. It will fit as the input space is one voxel biger
895  newPos[0] = x;
896  newPos[1] = maxVolumeIndexYZ - y;
897  newPos[2] = maxVolumeIndexYZ - z;
898  std::complex<float> tmp1 = 0.5f * (tempVolume[newPos[2]][newPos[1]][newPos[0]] + conj(tempVolume[z][y][x]));
899  float tmp2 = 0.5f * (tempWeights[newPos[2]][newPos[1]][newPos[0]] + tempWeights[z][y][x]);
900 
901  tempVolume[newPos[2]][newPos[1]][newPos[0]] = tmp1;
902  tempVolume[z][y][x] = conj(tmp1);
903  tempWeights[newPos[2]][newPos[1]][newPos[0]] = tempWeights[z][y][x] = tmp2;
904  }
905  }
906 }
std::complex< float > *** tempVolume
alglib::complex conj(const alglib::complex &z)
Definition: ap.cpp:4988
static double * y
doublereal * x
double z

◆ mirrorAndCropTempSpaces()

void ProgRecFourierAccel::mirrorAndCropTempSpaces ( )
protected

Method will take temp spaces (containing complex conjugate values in the 'right X side'), transfer them to 'left X side' and remove the 'right X side'. As a result, the X dimension of the temp spaces will be half of the original.

Definition at line 853 of file reconstruct_fourier_accel.cpp.

853  {
854  maxVolumeIndexX = maxVolumeIndexYZ/2; // just half of the space is necessary, the rest is complex conjugate
855  mirrorAndCrop(tempWeights, &identity<float>);
856  mirrorAndCrop(tempVolume, &conjugate);
857 }
std::complex< float > *** tempVolume

◆ processImages()

void ProgRecFourierAccel::processImages ( int  firstImageIndex,
int  lastImageIndex 
)
protected

Method will initialize temporal storage (if necessary), processes images in given interval (including boundary indexes) and store results in temporal storage (

See also
tempVolume and tempWeights)

Definition at line 969 of file reconstruct_fourier_accel.cpp.

970 {
971  int loops = ceil((lastImageIndex-firstImageIndex+1)/(float)bufferSize);
972 
973  // the +1 is to prevent outOfBound reading when mirroring the result (later)
974  if (nullptr == tempVolume) {
976  }
977  if (nullptr == tempWeights) {
979  }
980 
981  int startLoadIndex = firstImageIndex;
982 
983  loadImages(startLoadIndex, std::min(lastImageIndex+1, startLoadIndex+bufferSize));
984  barrier_wait( &barrier );
985  for(int i = 0; i < loops; i++) {
986  swapLoadBuffers();
987  startLoadIndex += bufferSize;
988  loadImages(startLoadIndex, std::min(lastImageIndex+1, startLoadIndex+bufferSize));
989  processBuffer(loadThread.buffer2);
990  barrier_wait( &barrier );
991  }
992  delete[] loadThread.buffer1;
993  delete[] loadThread.buffer2;
994  loadThread.buffer1 = loadThread.buffer2 = nullptr;
995 }
void min(Image< double > &op1, const Image< double > &op2)
std::complex< float > *** tempVolume
#define i
Barrier * barrier
int barrier_wait(barrier_t *barrier)

◆ processWeights()

void ProgRecFourierAccel::processWeights ( )
protected

Method will in effect do the point-wise division of tempVolume and tempWeights (i.e. correct Fourier coefficients by proper weight)

Definition at line 908 of file reconstruct_fourier_accel.cpp.

908  {
909  // Get a first approximation of the reconstruction
910  float corr2D_3D=pow(padding_factor_proj,2.)/
911  (imgSize* pow(padding_factor_vol,3.));
912  for (int z = 0; z <= maxVolumeIndexYZ; z++) {
913  for (int y = 0; y <= maxVolumeIndexYZ; y++) {
914  for (int x = 0; x <= maxVolumeIndexX; x++) {
915  float weight = tempWeights[z][y][x];
916 
917  if (weight > ACCURACY)
918  tempVolume[z][y][x] *= corr2D_3D / weight;
919  else
920  tempVolume[z][y][x] = 0;
921  }
922  }
923  }
924 }
std::complex< float > *** tempVolume
static double * y
doublereal * x
#define ACCURACY
double z

◆ produceSideinfo()

void ProgRecFourierAccel::produceSideinfo ( )
protected

Method will fill other help structures and variables

Definition at line 175 of file reconstruct_fourier_accel.cpp.

176 {
177  // Translate the maximum resolution to digital frequency
178  // maxResolution=sampling_rate/maxResolution;
179  maxResolutionSqr=maxResolution*maxResolution;
180 
181  // Read the input images
182  SF.read(fn_in);
183  SF.removeDisabled();
184 
185  // Ask for memory for the output volume and its Fourier transform
186  size_t objId = SF.firstRowId();
187  FileName fnImg;
188  SF.getValue(MDL_IMAGE,fnImg,objId);
189  Image<double> I;
190  I.read(fnImg, HEADER);
191  int Ydim=YSIZE(I());
192  int Xdim=XSIZE(I());
193  if (Ydim!=Xdim)
194  REPORT_ERROR(ERR_MULTIDIM_SIZE,"This algorithm only works for squared images");
195  imgSize=Xdim;
196  paddedImgSize = Xdim*padding_factor_vol;
197  auto conserveRows = (size_t) ceil((double) paddedImgSize * maxResolution * 2.0);
198  conserveRows = (size_t) ceil((double) conserveRows / 2.0);
199  maxVolumeIndexX = maxVolumeIndexYZ = 2 * conserveRows;
200 
201  // Build a table of blob values
202  Fourier_blob_table.resize(BLOB_TABLE_SIZE_SQRT);
203 
204  struct blobtype blobFourier,blobnormalized;
205  blobFourier=blob;
206  blobFourier.radius/=(padding_factor_vol*Xdim);
207  blobnormalized=blob;
208  blobnormalized.radius/=((double)padding_factor_proj/padding_factor_vol);
209  double deltaSqrt = (blob.radius*blob.radius) /(BLOB_TABLE_SIZE_SQRT-1);
210  double deltaFourier = (sqrt(3.)*Xdim/2.)/(BLOB_TABLE_SIZE_SQRT-1);
211 
212  // The interpolation kernel must integrate to 1
213  double iw0 = 1.0 / blob_Fourier_val(0.0, blobnormalized);
214  double padXdim3 = padding_factor_vol * Xdim;
215  padXdim3 = padXdim3 * padXdim3 * padXdim3;
216  double blobTableSize = blob.radius*sqrt(1./ (BLOB_TABLE_SIZE_SQRT-1));
217  for (int i = 0; i < BLOB_TABLE_SIZE_SQRT; i++)
218  {
219  //use a r*r sample instead of r
220  //DIRECT_VEC_ELEM(blob_table,i) = blob_val(delta*i, blob) *iw0;
221  blobTableSqrt[i] = blob_val(blobTableSize*sqrt((double)i), blob) *iw0;
222  //***
223  //DIRECT_VEC_ELEM(fourierBlobTableSqrt,i) =
224  // blob_Fourier_val(fourierBlobTableSize*sqrt(i), blobFourier)*padXdim3 *iw0;
225  VEC_ELEM(Fourier_blob_table,i) =
226  blob_Fourier_val(deltaFourier*i, blobFourier)*padXdim3 *iw0;
227  //#define DEBUG
228 #ifdef DEBUG
229 
230  std::cout << VEC_ELEM(Fourier_blob_table,i)
231  << " " << VEC_ELEM(fourierBlobTableSqrt,i)
232  << std::endl;
233 #endif
234  #undef DEBUG
235 
236  }
237  //iDelta = 1/delta;
238  iDeltaSqrt = 1/deltaSqrt;
239  iDeltaFourier = 1/deltaFourier;
240 
241  // Get symmetries
242  Matrix2D<double> Identity(3,3);
243  Identity.initIdentity();
244  R_repository.push_back(Identity);
245  if (fn_sym != "")
246  {
247  SymList SL;
248  SL.readSymmetryFile(fn_sym);
249  for (int isym = 0; isym < SL.symsNo(); isym++)
250  {
251  Matrix2D<double> L(4, 4), R(4, 4);
252  SL.getMatrices(isym, L, R);
253  R.resize(3, 3);
254  R_repository.push_back(R);
255  }
256  }
257 }
#define YSIZE(v)
#define VEC_ELEM(v, i)
Definition: matrix1d.h:245
void getMatrices(int i, Matrix2D< double > &L, Matrix2D< double > &R, bool homogeneous=true) const
Definition: symmetries.cpp:348
void read(const FileName &inFile, const std::vector< MDLabel > *desiredLabels=nullptr, bool decomposeStack=true) override
#define REPORT_ERROR(nerr, ErrormMsg)
Definition: xmipp_error.h:211
void sqrt(Image< double > &op)
int readSymmetryFile(FileName fn_sym, double accuracy=SYM_ACCURACY)
Definition: symmetries.cpp:33
Incorrect MultidimArray size.
Definition: xmipp_error.h:174
int symsNo() const
Definition: symmetries.h:268
#define i
#define BLOB_TABLE_SIZE_SQRT
size_t firstRowId() const override
void resize(size_t Xdim, bool copy=true)
Definition: matrix1d.h:410
#define XSIZE(v)
#define blob_Fourier_val(w, blob)
Definition: blobs.h:174
bool getValue(MDObject &mdValueOut, size_t id) const override
virtual void removeDisabled()
int read(const FileName &name, DataMode datamode=DATA, size_t select_img=ALL_IMAGES, bool mapData=false, int mode=WRITE_READONLY)
#define blob_val(r, blob)
Definition: blobs.h:139
double radius
Spatial radius in Universal System units.
Definition: blobs.h:115
Name of an image (std::string)

◆ readParams()

void ProgRecFourierAccel::readParams ( )
protectedvirtual

Read arguments from command line

Reimplemented from XmippProgram.

Definition at line 85 of file reconstruct_fourier_accel.cpp.

86 {
87  fn_in = getParam("-i");
88  fn_out = getParam("-o");
89  fn_sym = getParam("--sym");
90  do_weights = checkParam("--weight");
91  padding_factor_proj = getDoubleParam("--padding", 0);
92  padding_factor_vol = getDoubleParam("--padding", 1);
93  blob.radius = getDoubleParam("--blob", 0);
94  blob.order = getIntParam("--blob", 1);
95  blob.alpha = getDoubleParam("--blob", 2);
96  useFast = checkParam("--fast");
97  maxResolution = getDoubleParam("--max_resolution");
98  useCTF = checkParam("--useCTF");
99  isPhaseFlipped = checkParam("--phaseFlipped");
100  minCTF = getDoubleParam("--minCTF");
101  if (useCTF)
102  iTs = 1 / getDoubleParam("--sampling");
103  bufferSize = getIntParam("--bufferSize");
104 }
double alpha
Smoothness parameter.
Definition: blobs.h:121
double getDoubleParam(const char *param, int arg=0)
const char * getParam(const char *param, int arg=0)
int order
Derivation order and Bessel function order.
Definition: blobs.h:118
bool checkParam(const char *param)
int getIntParam(const char *param, int arg=0)
double radius
Spatial radius in Universal System units.
Definition: blobs.h:115

◆ releaseTempSpaces()

void ProgRecFourierAccel::releaseTempSpaces ( )
protected

Method will release temporal spaces for weights and Fourier coefs.

Definition at line 997 of file reconstruct_fourier_accel.cpp.

◆ run()

void ProgRecFourierAccel::run ( )
virtual

Run the image processing. Method will load data, process them and store result to final destination.

Reimplemented from XmippProgram.

Definition at line 139 of file reconstruct_fourier_accel.cpp.

140 {
141  show();
142  produceSideinfo();
143  // Process all images in the selfile
144  if (verbose) {
146  }
147  // Create loading thread stuff
149  //Computing interpolated volume
150  processImages(0, SF.size() - 1);
151  // remove complex conjugate of the intermediate result
153  //Saving the volume
156 }
void init_progress_bar(long total)
size_t size() const override
void finishComputations(const FileName &out_name)
void processImages(int firstImageIndex, int lastImageIndex)
int verbose
Verbosity level.

◆ setIO()

void ProgRecFourierAccel::setIO ( const FileName fn_in,
const FileName fn_out 
)
virtual

Functions of common reconstruction interface

Implements ProgReconsBase.

Definition at line 1057 of file reconstruct_fourier_accel.cpp.

1058 {
1059  this->fn_in = fn_in;
1060  this->fn_out = fn_out;
1061 }

◆ show()

void ProgRecFourierAccel::show ( )
protected

Show basic info to standard output

Definition at line 107 of file reconstruct_fourier_accel.cpp.

108 {
109  if (verbose > 0)
110  {
111  std::cout << " =====================================================================" << std::endl;
112  std::cout << " Direct 3D reconstruction method using Kaiser windows as interpolators" << std::endl;
113  std::cout << " =====================================================================" << std::endl;
114  std::cout << " Input selfile : " << fn_in << std::endl;
115  std::cout << " padding_factor_proj : " << padding_factor_proj << std::endl;
116  std::cout << " padding_factor_vol : " << padding_factor_vol << std::endl;
117  std::cout << " Output volume : " << fn_out << std::endl;
118  if (fn_sym != "")
119  std::cout << " Symmetry file for projections : " << fn_sym << std::endl;
120  if (do_weights)
121  std::cout << " Use weights stored in the image headers or doc file" << std::endl;
122  else
123  std::cout << " Do NOT use weights" << std::endl;
124  if (useCTF)
125  std::cout << "Using CTF information" << std::endl
126  << "Sampling rate: " << 1 / iTs << std::endl
127  << "Phase flipped: " << isPhaseFlipped << std::endl
128  << "Minimum CTF: " << minCTF << std::endl;
129  std::cout << "\n Interpolation Function"
130  << "\n blrad : " << blob.radius
131  << "\n blord : " << blob.order
132  << "\n blalpha : " << blob.alpha
133  << "\n max_resolution : " << maxResolution
134  << "\n -----------------------------------------------------------------" << std::endl;
135  }
136 }
double alpha
Smoothness parameter.
Definition: blobs.h:121
int verbose
Verbosity level.
int order
Derivation order and Bessel function order.
Definition: blobs.h:118
double radius
Spatial radius in Universal System units.
Definition: blobs.h:115

Member Data Documentation

◆ fn_in

FileName ProgRecFourierAccel::fn_in
protected

Input file name

Definition at line 132 of file reconstruct_fourier_accel.h.

◆ fn_out

FileName ProgRecFourierAccel::fn_out
protected

Output file name

Definition at line 129 of file reconstruct_fourier_accel.h.

◆ loadThread

LoadThreadParams ProgRecFourierAccel::loadThread
protected

Thread used for loading input data

Definition at line 123 of file reconstruct_fourier_accel.h.

◆ maxVolumeIndexX

int ProgRecFourierAccel::maxVolumeIndexX
protected

maximal index in the temporal volumes, X axis

Definition at line 138 of file reconstruct_fourier_accel.h.

◆ maxVolumeIndexYZ

int ProgRecFourierAccel::maxVolumeIndexYZ
protected

maximal index in the temporal volumes, Y and Z axis

Definition at line 135 of file reconstruct_fourier_accel.h.

◆ SF

MetaDataVec ProgRecFourierAccel::SF
protected

SelFile containing all projections

Definition at line 126 of file reconstruct_fourier_accel.h.

◆ tempVolume

std::complex<float>*** ProgRecFourierAccel::tempVolume
protected

3D volume holding the cropped (without high frequencies) Fourier space. Lowest frequencies are in the center, i.e. Fourier space creates a sphere within a cube.

Definition at line 146 of file reconstruct_fourier_accel.h.

◆ tempWeights

float*** ProgRecFourierAccel::tempWeights
protected

3D volume holding the weights of the Fourier coefficients stored in tempVolume.

Definition at line 152 of file reconstruct_fourier_accel.h.


The documentation for this class was generated from the following files: