Xmipp  v3.23.11-Nereus
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ProgPhantomCreate Class Reference
Inheritance diagram for ProgPhantomCreate:
Inheritance graph
[legend]
Collaboration diagram for ProgPhantomCreate:
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 fn_phantom
 
FileName fn_vol
 
Phantom phantom
 
Image< double > vol
 
- 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 30 of file phantom_create_main.cpp.

Member Function Documentation

◆ defineParams()

void ProgPhantomCreate::defineParams ( )
inlineprotectedvirtual

Function in which the param of each Program are defined.

Reimplemented from XmippProgram.

Definition at line 38 of file phantom_create_main.cpp.

39  {
40  addParamsLine("-i <description_file> : Input file with the mathematical features");
41  addParamsLine("-o <output_file> : Output volume in voxels");
42  addUsageLine("Create phantom volume from a feature description file with two Metadatas.");
43  addUsageLine("+You may define a mathematical phantom from its geometrical features");
44  addUsageLine("+(cubes, cylinders, ...) and translate it into a voxel volume with this program.");
45  addUsageLine("+ File format can be found in this [[https://web.archive.org/web/20180813105422/http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/FileFormats#Phantom_metadata_file][link]].");
46  addExampleLine("xmipp_phantom_create -i phantom.descr -o phantom.vol");
47  addExampleLine("++In the following link you can find an example of phantom description file:",false);
48  addExampleLine("++",false);
49  addExampleLine("++https://web.archive.org/web/20180813105422/http://xmipp.cnb.csic.es/twiki/bin/view/Xmipp/FileFormats#Phantom_metadata_file",false);
50  }
void addExampleLine(const char *example, bool verbatim=true)
void addUsageLine(const char *line, bool verbatim=false)
void addParamsLine(const String &line)

◆ readParams()

void ProgPhantomCreate::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 52 of file phantom_create_main.cpp.

53  {
54  fn_phantom = getParam("-i");
55  fn_vol = getParam("-o");
56  }
const char * getParam(const char *param, int arg=0)

◆ run()

void ProgPhantomCreate::run ( )
inlinevirtual

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

Reimplemented from XmippProgram.

Definition at line 59 of file phantom_create_main.cpp.

60  {
62  phantom.draw_in(vol());
63  vol.write(fn_vol);
64  }
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)
void draw_in(MultidimArray< double > &V)
Definition: phantom.cpp:2432
void read(const FileName &fn_phantom, bool apply_scale=true)
Definition: phantom.cpp:2088

Member Data Documentation

◆ fn_phantom

FileName ProgPhantomCreate::fn_phantom
protected

Definition at line 33 of file phantom_create_main.cpp.

◆ fn_vol

FileName ProgPhantomCreate::fn_vol
protected

Definition at line 34 of file phantom_create_main.cpp.

◆ phantom

Phantom ProgPhantomCreate::phantom
protected

Definition at line 35 of file phantom_create_main.cpp.

◆ vol

Image<double> ProgPhantomCreate::vol
protected

Definition at line 36 of file phantom_create_main.cpp.


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