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

#include <mpi_reconstruct_wbp.h>

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

Public Member Functions

 ProgMPIRecWbp (int argc, char **argv)
 
 ProgMPIRecWbp (const std::shared_ptr< MpiNode > &node)
 
void defineParams ()
 
void readParams ()
 
void read (int argc, char **argv)
 
void produceSideInfo ()
 Fill arrays with relevant transformation matrices. More...
 
void showProgress ()
 
bool getImageToProcess (size_t &objId) override
 Get 1 image to process. More...
 
void finishProcessing ()
 
- Public Member Functions inherited from ProgRecWbp
void readParams ()
 Read arguments from command line. More...
 
void show ()
 Show. More...
 
void defineParams ()
 Define parameters. More...
 
void run ()
 
void setIO (const FileName &fn_in, const FileName &fn_out)
 
void getAnglesForImage (size_t id, double &rot, double &tilt, double &psi, double &xoff, double &yoff, bool &flip, double &weight)
 Get angles (either from reading the header or from a docfile) More...
 
void getAllMatrices (MetaData &SF)
 Fill array with transformation matrices needed for arbitrary geometry filter. More...
 
void getSampledMatrices (MetaData &SF)
 
void simpleBackprojection (Projection &img, MultidimArray< double > &vol, int diameter)
 
void filterOneImage (Projection &proj, Tabsinc &TSINC)
 
void apply2DFilterArbitraryGeometry ()
 
- 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
 
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 ()
 
- Public Member Functions inherited from MpiMetadataProgram
 MpiMetadataProgram ()
 
 MpiMetadataProgram (const MpiMetadataProgram &)=delete
 
 MpiMetadataProgram (const MpiMetadataProgram &&)=delete
 
 ~MpiMetadataProgram ()
 
MpiMetadataProgramoperator= (const MpiMetadataProgram &)=delete
 
MpiMetadataProgramoperator= (const MpiMetadataProgram &&)=delete
 
void read (int argc, char **argv)
 
void defineParams ()
 
void readParams ()
 
void createTaskDistributor (MetaData &mdIn, size_t blockSize=0)
 
virtual void preProcess ()
 
bool getTaskToProcess (size_t &objId, size_t &objIndex)
 
- Public Member Functions inherited from XmippMpiProgram
void read (int argc, char **argv)
 
virtual int tryRun ()
 

Additional Inherited Members

- Public Attributes inherited from ProgRecWbp
FileName fn_out
 
FileName fn_sym
 
FileName fn_sel
 
MetaDataVec SF
 
double threshold
 
int count_thr
 
int diameter
 
size_t dim
 
int no_mats
 
WBPInfomat_g
 
WBPInfomat_f
 
double sampling
 
bool do_all_matrices
 
bool do_weights
 
SymList SL
 
size_t time_bar_step
 Time bar variables. More...
 
size_t time_bar_size
 
size_t time_bar_done
 
std::unique_ptr< MetaDataVec::id_iteratoriter
 Iterator over input metadata. More...
 
Image< double > reconstructedVolume
 Reconstructed volume. More...
 
- Public Attributes inherited from XmippProgram
bool doRun
 
bool runWithoutArgs
 
int verbose
 Verbosity level. More...
 
int debug
 
- Protected Member Functions inherited from XmippProgram
void defineCommons ()
 
- Protected Member Functions inherited from XmippMpiProgram
void setNode (const std::shared_ptr< MpiNode > &node)
 
- 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
 
- Protected Attributes inherited from MpiMetadataProgram
int blockSize
 
std::vector< size_t > imgsId
 
MpiTaskDistributordistributor =nullptr
 
size_t first
 
size_t last
 
- Protected Attributes inherited from XmippMpiProgram
std::shared_ptr< MpiNodenode
 
size_t nProcs
 
size_t numberOfJobs
 
MPI_Status status
 

Detailed Description

Definition at line 36 of file mpi_reconstruct_wbp.h.

Constructor & Destructor Documentation

◆ ProgMPIRecWbp() [1/2]

ProgMPIRecWbp::ProgMPIRecWbp ( int  argc,
char **  argv 
)

Definition at line 28 of file mpi_reconstruct_wbp.cpp.

29 {
30  this->read(argc, argv);
31 }
int argc
Original command line arguments.
Definition: xmipp_program.h:86
const char ** argv
Definition: xmipp_program.h:87
void read(int argc, char **argv)

◆ ProgMPIRecWbp() [2/2]

ProgMPIRecWbp::ProgMPIRecWbp ( const std::shared_ptr< MpiNode > &  node)

Definition at line 32 of file mpi_reconstruct_wbp.cpp.

33 {
34  this->setNode(node);
35 }
std::shared_ptr< MpiNode > node
Definition: xmipp_mpi.h:164
void setNode(const std::shared_ptr< MpiNode > &node)
Definition: xmipp_mpi.cpp:256

Member Function Documentation

◆ defineParams()

void ProgMPIRecWbp::defineParams ( )
virtual

Function in which the param of each Program are defined.

Reimplemented from XmippProgram.

Definition at line 36 of file mpi_reconstruct_wbp.cpp.

37 {
40 }
void defineParams()
Define parameters.

◆ finishProcessing()

void ProgMPIRecWbp::finishProcessing ( )
virtual

finishProcessing

Reimplemented from MpiMetadataProgram.

Definition at line 69 of file mpi_reconstruct_wbp.cpp.

70 {
73  MPI_Allreduce(MULTIDIM_ARRAY(reconstructedVolume()), MULTIDIM_ARRAY(aux),
74  MULTIDIM_SIZE(aux), MPI_DOUBLE, MPI_SUM, MPI_COMM_WORLD);
75  int iaux;
76  MPI_Allreduce(&count_thr, &iaux, 1, MPI_INT, MPI_SUM, MPI_COMM_WORLD);
77 
78  if (node->isMaster())
79  {
80  reconstructedVolume()=aux;
81  count_thr=iaux;
83  }
84 }
Image< double > reconstructedVolume
Reconstructed volume.
#define MULTIDIM_SIZE(v)
void resizeNoCopy(const MultidimArray< T1 > &v)
#define MULTIDIM_ARRAY(v)
std::shared_ptr< MpiNode > node
Definition: xmipp_mpi.h:164
virtual void finishProcessing()

◆ getImageToProcess()

bool ProgMPIRecWbp::getImageToProcess ( size_t &  objId)
overridevirtual

Get 1 image to process.

Reimplemented from ProgRecWbp.

Definition at line 64 of file mpi_reconstruct_wbp.cpp.

65 {
66  size_t tmp;
67  return getTaskToProcess(objId, tmp);
68 }
bool getTaskToProcess(size_t &objId, size_t &objIndex)
Definition: xmipp_mpi.cpp:316

◆ produceSideInfo()

void ProgMPIRecWbp::produceSideInfo ( )
virtual

Fill arrays with relevant transformation matrices.

Reimplemented from ProgRecWbp.

Definition at line 51 of file mpi_reconstruct_wbp.cpp.

52 {
55 }
virtual void produceSideInfo()
Fill arrays with relevant transformation matrices.
void createTaskDistributor(MetaData &mdIn, size_t blockSize=0)
Definition: xmipp_mpi.cpp:302
MetaDataVec SF

◆ read()

void ProgMPIRecWbp::read ( int  argc,
char **  argv 
)

Definition at line 46 of file mpi_reconstruct_wbp.cpp.

47 {
49  ProgRecWbp::read(argc, (const char **)argv);
50 }
virtual void read(int argc, const char **argv, bool reportErrors=true)
int argc
Original command line arguments.
Definition: xmipp_program.h:86
void read(int argc, char **argv)
Definition: xmipp_mpi.cpp:284
const char ** argv
Definition: xmipp_program.h:87

◆ readParams()

void ProgMPIRecWbp::readParams ( )
virtual

Function in which each program will read parameters that it need. If some error occurs the usage will be printed out.

Reimplemented from XmippProgram.

Definition at line 41 of file mpi_reconstruct_wbp.cpp.

42 {
45 }
void readParams()
Read arguments from command line.

◆ showProgress()

void ProgMPIRecWbp::showProgress ( )
virtual

Show progress

Reimplemented from ProgRecWbp.

Definition at line 56 of file mpi_reconstruct_wbp.cpp.

57 {
58  if ( verbose > 0 )
59  {
62  }
63 }
void progress_bar(long rlen)
int verbose
Verbosity level.
size_t time_bar_done

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