Xmipp  v3.23.11-Nereus
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ProgPSFXrCreate Class Reference
Inheritance diagram for ProgPSFXrCreate:
Inheritance graph
[legend]
Collaboration diagram for ProgPSFXrCreate:
Collaboration graph
[legend]

Public Member Functions

void run ()
 
- 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 defineParams ()
 
void readParams ()
 
- Protected Member Functions inherited from XmippProgram
void defineCommons ()
 

Protected Attributes

FileName fnParam
 Filename with the Microscope Parameters. More...
 
FileName fnPSF
 
int nThr
 Number of threads;. More...
 
XRayPSF psf
 PSF. More...
 
- 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 29 of file xray_psf_create.cpp.

Member Function Documentation

◆ defineParams()

void ProgPSFXrCreate::defineParams ( )
inlineprotectedvirtual

Function in which the param of each Program are defined.

Reimplemented from XmippProgram.

Definition at line 40 of file xray_psf_create.cpp.

41  {
42  //Usage
43  addUsageLine("Create a volume with the 3D PSF of an X-ray microscope.");
44  addUsageLine("A param file can be passed or directly setting the microscope parameters.");
45  addUsageLine("The program generates a PSF volume file and its associated info file.");
46  //See Also
47  addParamsLine("[-i <psf_param_file>] : XRay-Microscope parameters file.");
48  addParamsLine(" alias --input;");
49  addParamsLine("[-o <output_name_file>] : Name for output files. It creates a PSF volume file and a PSF parameters file.");
50  addParamsLine(" alias --output;");
51  psf.defineParams(this);
52  // Examples
53  addExampleLine("The parameters are in a file",false);
54  addExampleLine("xmipp_xray_psf_create -i psf560.xmd -o psf560.vol");
55  addExampleLine("The parameters are given in the command line",false);
56  addExampleLine("xmipp_xray_psf_create -o psf900.vol -lambda 2.5 -zones 900");
57  addExampleLine("In the following link you can find an example of X-ray microscope parameters file:",false);
58  addExampleLine(" ",false);
59  addExampleLine("http://sourceforge.net/p/testxmipp/code/ci/3.0/tree/input/xray_psf.xmd",false);
60  }
XRayPSF psf
PSF.
static void defineParams(XmippProgram *program)
Definition: psf_xr.cpp:45
void addExampleLine(const char *example, bool verbatim=true)
void addUsageLine(const char *line, bool verbatim=false)
void addParamsLine(const String &line)

◆ readParams()

void ProgPSFXrCreate::readParams ( )
inlineprotectedvirtual

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 62 of file xray_psf_create.cpp.

63  {
65 
66  if (checkParam("-i"))
67  {
68  fnParam = getParam("-i");
69  /* This forces always the creation of the PSF Volume file, even if the input already includes the
70  name of a volume in the "image" label
71  */
72  psf.read(fnParam, false);
73  }
74  else
75  psf.readParams(this);
76 
77  if (checkParam("-o"))
78  fnPSF = getParam("-o");
79  else
80  fnPSF = fnParam;
81  }
XRayPSF psf
PSF.
FileName fnParam
Filename with the Microscope Parameters.
const char * getParam(const char *param, int arg=0)
void read(const FileName &fn, bool readVolume=true)
Definition: psf_xr.cpp:82
void readParams(XmippProgram *program)
Definition: psf_xr.cpp:64
int verbose
Switch to control verbose mode.
Definition: psf_xr.h:212
int verbose
Verbosity level.
bool checkParam(const char *param)

◆ run()

void ProgPSFXrCreate::run ( )
inlinevirtual

This function will be start running the program. it also should be implemented by derived classes.

Reimplemented from XmippProgram.

Definition at line 85 of file xray_psf_create.cpp.

86  {
87  psf.generatePSF();
88  psf.write(fnPSF);
89  }
XRayPSF psf
PSF.
void generatePSF()
Generate the 3D Point Spread Function (PSF) according to Microscope parameters.
Definition: psf_xr.cpp:525
void write(const FileName &fn)
Definition: psf_xr.cpp:184

Member Data Documentation

◆ fnParam

FileName ProgPSFXrCreate::fnParam
protected

Filename with the Microscope Parameters.

Definition at line 34 of file xray_psf_create.cpp.

◆ fnPSF

FileName ProgPSFXrCreate::fnPSF
protected

Definition at line 34 of file xray_psf_create.cpp.

◆ nThr

int ProgPSFXrCreate::nThr
protected

Number of threads;.

Definition at line 36 of file xray_psf_create.cpp.

◆ psf

XRayPSF ProgPSFXrCreate::psf
protected

PSF.

Definition at line 38 of file xray_psf_create.cpp.


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