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

#include <xmipp_metadata_program.h>

Inherits XmippProgram.

Inherited by FlipParameters, ProgAddNoise, ProgAngularAssignmentMag, ProgAngularContinuousAssign, ProgAngularContinuousAssign2, ProgAngularDiscreteAssign, ProgAngularSphAlignment, ProgAngularSphAlignmentGpu, ProgArtZernike3D, ProgCenterImage, ProgConvImg, ProgCorrectPhaseFlip2D, ProgCorrectWiener2D, ProgCtfCorrectIdr, ProgCTFEnhancePSD, ProgEliminateByEnergy, ProgFilter, ProgFlexibleAlignment, ProgForwardArtZernike3D, ProgForwardArtZernike3DSubtomos, ProgForwardZernikeImages, ProgForwardZernikeImagesPriors, ProgForwardZernikeSubtomos, ProgHeader, ProgImageResiduals, ProgImageResize, ProgImageSSNR, ProgMask, ProgMorphology, ProgNmaAlignment, ProgNmaAlignmentVol, ProgNormalize, ProgOperate, ProgParallelForwardArtZernike3D, ProgPSDSort, ProgRandomizePhases, ProgSimulateMicroscope, ProgSpiderTranslate, ProgStatistics, ProgSubtomoSubtraction, ProgSubtractProjection, ProgSymmetrize, ProgThreshold, ProgTomoExtractSubvolume, ProgTransformDownsample, ProgTransformGeometry, ProgTransformImageGreyLevels, ProgTransRangeAdjust, ProgVolumeCenter, ProgVolumeCorrectBfactor, ProgVolumeSetAlign, and ProgWindow.

Collaboration diagram for XmippMetadataProgram:
Collaboration graph
[legend]

Public Member Functions

MetaDatagetInputMd ()
 
MetaDataVecgetOutputMd ()
 
 XmippMetadataProgram ()
 Empty constructor. More...
 
virtual int tryRead (int argc, const char **argv, bool reportErrors=true)
 
virtual void init ()
 
virtual void setup (MetaData *md, const FileName &o="", const FileName &oroot="", bool applyGeo=false, MDLabel label=MDL_IMAGE)
 
virtual ~XmippMetadataProgram ()
 
void setMode (WriteModeMetaData _mode)
 
void setupRowOut (const FileName &fnImgIn, const MDRow &rowIn, const FileName &fnImgOut, MDRow &rowOut) const
 Prepare rowout. More...
 
virtual void wait ()
 Wait for the distributor to finish. More...
 
virtual void checkPoint ()
 For very long programs, it may be needed to write checkpoints. More...
 
virtual void run ()
 Run over all images. More...
 
- 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)
 
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 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 Attributes

FileName fn_in
 Filenames of input and output Metadata. More...
 
FileName fn_out
 
FileName baseName
 
FileName pathBaseName
 
FileName oextBaseName
 
bool apply_geo
 Apply geo. More...
 
size_t ndimOut
 Output dimensions. More...
 
size_t zdimOut
 
size_t ydimOut
 
size_t xdimOut
 
DataType datatypeOut
 
size_t mdInSize
 Number of input elements. More...
 
- Public Attributes inherited from XmippProgram
bool doRun
 
bool runWithoutArgs
 
int verbose
 Verbosity level. More...
 
int debug
 

Protected Member Functions

virtual void initComments ()
 
virtual void defineParams ()
 
virtual void readParams ()
 
virtual void preProcess ()
 
virtual void postProcess ()
 
virtual void processImage (const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)=0
 
virtual bool getImageToProcess (size_t &objId, size_t &objIndex)
 
void show () const override
 
virtual void startProcessing ()
 
virtual void finishProcessing ()
 
virtual void writeOutput ()
 
virtual void showProgress ()
 
virtual void defineLabelParam ()
 
- Protected Member Functions inherited from XmippProgram
void defineCommons ()
 

Protected Attributes

WriteModeMetaData mode
 Metadata writing mode: OVERWRITE, APPEND. More...
 
FileName oext
 Output extension and root. More...
 
FileName oroot
 
MDLabel image_label
 MDLabel to be used to read/write images, usually will be MDL_IMAGE. More...
 
bool produces_an_output
 Indicate that a unique final output is produced. More...
 
bool produces_a_metadata
 Indicate that the unique final output file is a Metadata. More...
 
bool each_image_produces_an_output
 Indicate that an output is produced for each image in the input. More...
 
bool allow_apply_geo
 
bool decompose_stacks
 Input Metadata will treat a stack file as a set of images instead of a unique file. More...
 
bool delete_output_stack
 Delete previous output stack file prior to process images. More...
 
bool get_image_info
 Get the input image file dimensions to further operations. More...
 
bool save_metadata_stack
 Save the associated output metadata when output file is a stack. More...
 
bool track_origin
 Include the original input image filename in the output stack. More...
 
bool keep_input_columns
 Keep input metadata columns. More...
 
bool remove_disabled
 Remove disabled images from the input selfile. More...
 
bool allow_time_bar
 Show process time bar. More...
 
bool input_is_metadata
 Input is a metadata. More...
 
bool single_image
 Input is a single image. More...
 
bool input_is_stack
 Input is a stack. More...
 
bool output_is_stack
 Output is a stack. More...
 
bool create_empty_stackfile
 
bool delete_mdIn
 
size_t time_bar_step
 Some time bar related counters. More...
 
size_t time_bar_size
 
size_t time_bar_done
 
- 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
 

Detailed Description

Special class of XmippProgram that performs some operation related with processing images. It can receive a file with images(MetaData) or a single image. The function processImage is virtual here and needs to be implemented by derived classes. Optionally can be implemented preProcess and postProcess to perform some customs actions.

Definition at line 44 of file xmipp_metadata_program.h.

Constructor & Destructor Documentation

◆ XmippMetadataProgram()

XmippMetadataProgram::XmippMetadataProgram ( )

Empty constructor.

Definition at line 32 of file xmipp_metadata_program.cpp.

33 {
34  oroot = oext = fn_out = fn_in = "";
36  apply_geo = false;
37  allow_apply_geo = false;
38  produces_an_output = false;
39  produces_a_metadata = false;
41  allow_time_bar = true;
42  decompose_stacks = true;
43  delete_output_stack = true;
44  get_image_info = true;
45  remove_disabled = true;
47  mdInSize = 0;
48  ndimOut = zdimOut = ydimOut = xdimOut = 0;
50  delete_mdIn = false;
51  //Flags to store metadata when -o is stack
52  save_metadata_stack = false;
53  keep_input_columns = false;
54  track_origin = false;
55  create_empty_stackfile = false;
57  mdIn = nullptr;
58 }
bool delete_output_stack
Delete previous output stack file prior to process images.
size_t mdInSize
Number of input elements.
bool single_image
Input is a single image.
bool get_image_info
Get the input image file dimensions to further operations.
bool input_is_stack
Input is a stack.
bool output_is_stack
Output is a stack.
FileName fn_in
Filenames of input and output Metadata.
bool produces_an_output
Indicate that a unique final output is produced.
MDLabel image_label
MDLabel to be used to read/write images, usually will be MDL_IMAGE.
bool allow_time_bar
Show process time bar.
bool track_origin
Include the original input image filename in the output stack.
bool remove_disabled
Remove disabled images from the input selfile.
bool save_metadata_stack
Save the associated output metadata when output file is a stack.
bool decompose_stacks
Input Metadata will treat a stack file as a set of images instead of a unique file.
bool keep_input_columns
Keep input metadata columns.
bool each_image_produces_an_output
Indicate that an output is produced for each image in the input.
WriteModeMetaData mode
Metadata writing mode: OVERWRITE, APPEND.
size_t ndimOut
Output dimensions.
bool input_is_metadata
Input is a metadata.
Name of an image (std::string)
bool produces_a_metadata
Indicate that the unique final output file is a Metadata.
FileName oext
Output extension and root.

◆ ~XmippMetadataProgram()

XmippMetadataProgram::~XmippMetadataProgram ( )
virtual

Destructor

Definition at line 60 of file xmipp_metadata_program.cpp.

61 {
62  if (delete_mdIn)
63  delete mdIn;
64 }

Member Function Documentation

◆ checkPoint()

void XmippMetadataProgram::checkPoint ( )
virtual

For very long programs, it may be needed to write checkpoints.

Reimplemented in ProgForwardZernikeSubtomos, ProgForwardZernikeImages, ProgForwardZernikeImagesPriors, MpiProgForwardZernikeImagesPriors, MpiProgForwardZernikeImages, and MpiProgForwardZernikeSubtomos.

Definition at line 317 of file xmipp_metadata_program.cpp.

318 {
319 }

◆ defineLabelParam()

void XmippMetadataProgram::defineLabelParam ( )
protectedvirtual

Define the label param

Reimplemented in ProgPSDSort.

Definition at line 133 of file xmipp_metadata_program.cpp.

134 {
135  addParamsLine(" [--label+ <image_label=image>] : Label to be used to read/write images.");
136 }
void addParamsLine(const String &line)

◆ defineParams()

void XmippMetadataProgram::defineParams ( )
protectedvirtual

Function in which the param of each Program are defined.

Reimplemented from XmippProgram.

Reimplemented in ProgMask, ProgNormalize, BasicMpiMetadataProgram< ProgAngularContinuousAssign >, BasicMpiMetadataProgram< ProgPSDSort >, BasicMpiMetadataProgram< ProgEliminateByEnergy >, BasicMpiMetadataProgram< ProgThreshold >, BasicMpiMetadataProgram< ProgCorrectWiener2D >, BasicMpiMetadataProgram< ProgAngularDiscreteAssign >, BasicMpiMetadataProgram< ProgMask >, BasicMpiMetadataProgram< ProgTomoExtractSubvolume >, BasicMpiMetadataProgram< ProgFilter >, BasicMpiMetadataProgram< ProgTransformGeometry >, BasicMpiMetadataProgram< ProgImageSSNR >, BasicMpiMetadataProgram< ProgNormalize >, BasicMpiMetadataProgram< ProgImageResize >, BasicMpiMetadataProgram< ProgCorrectPhaseFlip2D >, BasicMpiMetadataProgram< ProgOperate >, BasicMpiMetadataProgram< ProgSymmetrize >, BasicMpiMetadataProgram< ProgCtfCorrectIdr >, ProgForwardZernikeSubtomos, ProgForwardZernikeImages, ProgForwardZernikeImagesPriors, ProgFlexibleAlignment, ProgParallelForwardArtZernike3D, ProgAngularSphAlignment, ProgAngularSphAlignmentGpu, ProgAngularContinuousAssign2, ProgForwardArtZernike3D, ProgForwardArtZernike3DSubtomos, ProgNmaAlignmentVol, ProgNmaAlignment, ProgSubtractProjection, ProgArtZernike3D, ProgSubtomoSubtraction, ProgAngularDiscreteAssign, ProgTomoExtractSubvolume, ProgPSDSort, ProgSimulateMicroscope, ProgTransformImageGreyLevels, ProgVolumeSetAlign, ProgAngularContinuousAssign, ProgVolumeCorrectBfactor, ProgSymmetrize, ProgCtfCorrectIdr, ProgOperate, ProgConvImg, ProgCTFEnhancePSD, ProgCorrectWiener2D, ProgThreshold, ProgImageResize, ProgTransformDownsample, ProgStatistics, ProgMorphology, ProgTransformGeometry, ProgAngularAssignmentMag, ProgTransRangeAdjust, ProgWindow, ProgEliminateByEnergy, ProgFilter, ProgCorrectPhaseFlip2D, MpiProgAngularAssignmentMag, ProgHeader, ProgImageSSNR, ProgAddNoise, MpiProgAngularSphAlignment, MpiProgForwardZernikeImages, MpiProgForwardZernikeImagesPriors, MpiProgForwardZernikeSubtomos, ProgSpiderTranslate, ProgCenterImage, FlipParameters, ProgImageResiduals, ProgRandomizePhases, ProgVolumeCenter, MpiProgTransformImageGreyLevels, MpiProgAngularContinuousAssign2, MpiProgSubtomoSubtraction, and MpiProgSubtractProjection.

Definition at line 94 of file xmipp_metadata_program.cpp.

95 {
96  processDefaultComment("-i","-i <input_file>");
97  addParamsLine("alias --input;");
98  addParamsLine(" [--mode+ <mode=overwrite>] : Metadata writing mode.");
99  addParamsLine(" where <mode>");
100  addParamsLine(" overwrite : Replace the content of the file with the Metadata");
101  addParamsLine(" append : Write the Metadata as a new block, removing the old one");
103 
105  produces_an_output = true;
106 
108  {
109  processDefaultComment("-o","[-o <output_file=\"\">]");
110  addParamsLine(" alias --output;");
111  processDefaultComment("--oroot","[--oroot <root=\"\">]");
112  }
113  else if (produces_an_output)
114  {
115  processDefaultComment("-o","[-o <output_file=\"\">]");
116  addParamsLine(" alias --output;");
117  }
118 
119  addParamsLine(" [--save_metadata_stack+ <output_md=\"\">] : Create a metadata when the output (-o) is an stack");
120  addParamsLine(" : if --oroot is used, the metadata can be saved in -o param.");
121  addParamsLine(" : if output_md is empty, the name of the stack will be used, changing the extension to xmd.");
122  addParamsLine(" [--track_origin+] : Store the original image filename in the output ");
123  addParamsLine(" : metadata in column imageOriginal.");
124  addParamsLine(" [--keep_input_columns+] : Preserve the columns from the input metadata.");
125  addParamsLine(" : Some of the column values can be changed by the program.");
126 
127  if (allow_apply_geo)
128  {
129  addParamsLine(" [--dont_apply_geo] : for 2D-images: do not apply transformation stored in metadata");
130  }
131 }//function defineParams
void processDefaultComment(const char *param, const char *left)
bool produces_an_output
Indicate that a unique final output is produced.
bool each_image_produces_an_output
Indicate that an output is produced for each image in the input.
bool produces_a_metadata
Indicate that the unique final output file is a Metadata.
void addParamsLine(const String &line)

◆ finishProcessing()

void XmippMetadataProgram::finishProcessing ( )
protectedvirtual

Reimplemented in BasicMpiMetadataProgram< ProgAngularContinuousAssign >, BasicMpiMetadataProgram< ProgPSDSort >, BasicMpiMetadataProgram< ProgEliminateByEnergy >, BasicMpiMetadataProgram< ProgThreshold >, BasicMpiMetadataProgram< ProgCorrectWiener2D >, BasicMpiMetadataProgram< ProgAngularDiscreteAssign >, BasicMpiMetadataProgram< ProgMask >, BasicMpiMetadataProgram< ProgTomoExtractSubvolume >, BasicMpiMetadataProgram< ProgFilter >, BasicMpiMetadataProgram< ProgTransformGeometry >, BasicMpiMetadataProgram< ProgImageSSNR >, BasicMpiMetadataProgram< ProgNormalize >, BasicMpiMetadataProgram< ProgImageResize >, BasicMpiMetadataProgram< ProgCorrectPhaseFlip2D >, BasicMpiMetadataProgram< ProgOperate >, BasicMpiMetadataProgram< ProgSymmetrize >, BasicMpiMetadataProgram< ProgCtfCorrectIdr >, ProgHeader, ProgForwardZernikeSubtomos, ProgForwardZernikeImages, ProgForwardZernikeImagesPriors, ProgAngularSphAlignment, ProgFlexibleAlignment, ProgAngularSphAlignmentGpu, ProgForwardArtZernike3DSubtomos, ProgParallelForwardArtZernike3D, ProgForwardArtZernike3D, ProgNmaAlignment, ProgNmaAlignmentVol, MpiProgAngularSphAlignment, MpiProgAngularContinuousAssign2, MpiProgForwardZernikeImagesPriors, MpiProgForwardZernikeImages, MpiProgForwardZernikeSubtomos, MpiProgNMA, ProgVolumeSetAlign, MpiProgTransformImageGreyLevels, ProgConvImg, ProgEliminateByEnergy, MpiProgAngularAssignmentMag, MpiProgSubtomoSubtraction, and MpiProgSubtractProjection.

Definition at line 269 of file xmipp_metadata_program.cpp.

270 {
273  writeOutput();
274 }
bool single_image
Input is a single image.
void progress_bar(long rlen)
int verbose
Verbosity level.
bool allow_time_bar
Show process time bar.

◆ getImageToProcess()

bool XmippMetadataProgram::getImageToProcess ( size_t &  objId,
size_t &  objIndex 
)
protectedvirtual

Reimplemented in BasicMpiMetadataProgram< ProgAngularContinuousAssign >, BasicMpiMetadataProgram< ProgPSDSort >, BasicMpiMetadataProgram< ProgEliminateByEnergy >, BasicMpiMetadataProgram< ProgThreshold >, BasicMpiMetadataProgram< ProgCorrectWiener2D >, BasicMpiMetadataProgram< ProgAngularDiscreteAssign >, BasicMpiMetadataProgram< ProgMask >, BasicMpiMetadataProgram< ProgTomoExtractSubvolume >, BasicMpiMetadataProgram< ProgFilter >, BasicMpiMetadataProgram< ProgTransformGeometry >, BasicMpiMetadataProgram< ProgImageSSNR >, BasicMpiMetadataProgram< ProgNormalize >, BasicMpiMetadataProgram< ProgImageResize >, BasicMpiMetadataProgram< ProgCorrectPhaseFlip2D >, BasicMpiMetadataProgram< ProgOperate >, BasicMpiMetadataProgram< ProgSymmetrize >, BasicMpiMetadataProgram< ProgCtfCorrectIdr >, MpiProgAngularContinuousAssign2, MpiProgAngularSphAlignment, MpiProgForwardZernikeImages, MpiProgForwardZernikeImagesPriors, MpiProgForwardZernikeSubtomos, MpiProgTransformImageGreyLevels, MpiProgNMA, MpiProgAngularAssignmentMag, MpiProgSubtomoSubtraction, and MpiProgSubtractProjection.

Definition at line 321 of file xmipp_metadata_program.cpp.

322 {
323  if (nullptr == iter) {
324  iter = std::unique_ptr<MetaData::id_iterator>(new MetaData::id_iterator(mdIn->ids().begin()));
325  iterIndex = 0;
326  time_bar_done = 0;
327  } else {
328  if (*iter == mdIn->ids().end()) {
329  throw std::logic_error("Iterating behind the end of the metadata");
330  }
331  ++iterIndex;
332  ++(*iter);
333  }
334  bool isValid = *iter != mdIn->ids().end();
335  if (isValid) {
336  ++time_bar_done;
337  objId = **iter;
338  objIndex = iterIndex;
339  }
340  return isValid;
341 }
virtual IdIteratorProxy< false > ids()
idIterator< false > id_iterator

◆ getInputMd()

MetaData* XmippMetadataProgram::getInputMd ( )
inline

The input metadata should not be used if there is a very very special case you can use this function

Definition at line 58 of file xmipp_metadata_program.h.

58 { return mdIn; }

◆ getOutputMd()

MetaDataVec& XmippMetadataProgram::getOutputMd ( )
inline

Definition at line 59 of file xmipp_metadata_program.h.

59 { return mdOut; }

◆ init()

void XmippMetadataProgram::init ( void  )
virtual

Initialization of variables should be done here

Reimplemented in ProgConvImg.

Definition at line 72 of file xmipp_metadata_program.cpp.

73 {}

◆ initComments()

void XmippMetadataProgram::initComments ( )
protectedvirtual

Initialize comments for -v, ...

Reimplemented from XmippProgram.

Definition at line 75 of file xmipp_metadata_program.cpp.

76 {
78 
79  CommentList comments;
80  comments.addComment("Input file: metadata, stack, volume or image.");
81  defaultComments["-i"]=comments;
82 
83  comments.clear();
84  comments.addComment("Output file: metadata, stack, volume or image.");
85  defaultComments["-o"]=comments;
86 
87  comments.clear();
88  comments.addComment("Rootname of output individual images.");
89  comments.addComment("Output image format can be set adding extension after rootname as \":ext\".");
90  defaultComments["--oroot"]=comments;
91 }
virtual void initComments()
void addComment(const String &comment, int visible=0, bool wikiVerbatim=false)
std::map< String, CommentList > defaultComments
Definition: xmipp_program.h:83

◆ postProcess()

void XmippMetadataProgram::postProcess ( )
protectedvirtual

◆ preProcess()

void XmippMetadataProgram::preProcess ( )
protectedvirtual

Reimplemented in ProgMask, ProgNormalize, ProgWindow, BasicMpiMetadataProgram< ProgAngularContinuousAssign >, BasicMpiMetadataProgram< ProgPSDSort >, BasicMpiMetadataProgram< ProgEliminateByEnergy >, BasicMpiMetadataProgram< ProgThreshold >, BasicMpiMetadataProgram< ProgCorrectWiener2D >, BasicMpiMetadataProgram< ProgAngularDiscreteAssign >, BasicMpiMetadataProgram< ProgMask >, BasicMpiMetadataProgram< ProgTomoExtractSubvolume >, BasicMpiMetadataProgram< ProgFilter >, BasicMpiMetadataProgram< ProgTransformGeometry >, BasicMpiMetadataProgram< ProgImageSSNR >, BasicMpiMetadataProgram< ProgNormalize >, BasicMpiMetadataProgram< ProgImageResize >, BasicMpiMetadataProgram< ProgCorrectPhaseFlip2D >, BasicMpiMetadataProgram< ProgOperate >, BasicMpiMetadataProgram< ProgSymmetrize >, BasicMpiMetadataProgram< ProgCtfCorrectIdr >, ProgFlexibleAlignment, ProgForwardZernikeSubtomos, ProgNmaAlignment, ProgForwardZernikeImages, ProgForwardZernikeImagesPriors, ProgNmaAlignmentVol, ProgAngularContinuousAssign2, ProgParallelForwardArtZernike3D, ProgAngularSphAlignment, ProgAngularSphAlignmentGpu, ProgForwardArtZernike3D, ProgForwardArtZernike3DSubtomos, ProgSubtractProjection, ProgArtZernike3D, ProgSubtomoSubtraction, ProgAngularDiscreteAssign, ProgTomoExtractSubvolume, ProgStatistics, ProgSimulateMicroscope, ProgSpiderTranslate, ProgVolumeSetAlign, ProgTransformImageGreyLevels, ProgAngularContinuousAssign, ProgSymmetrize, ProgConvImg, ProgCtfCorrectIdr, MpiProgForwardZernikeImages, MpiProgForwardZernikeImagesPriors, MpiProgForwardZernikeSubtomos, ProgImageResize, ProgTransformDownsample, ProgTransformGeometry, ProgAngularAssignmentMag, MpiProgTransformImageGreyLevels, ProgFilter, MpiProgAngularContinuousAssign2, MpiProgAngularAssignmentMag, ProgImageSSNR, ProgImageResiduals, MpiProgSubtomoSubtraction, and MpiProgSubtractProjection.

Definition at line 245 of file xmipp_metadata_program.cpp.

246 {}

◆ processImage()

virtual void XmippMetadataProgram::processImage ( const FileName fnImg,
const FileName fnImgOut,
const MDRow rowIn,
MDRow rowOut 
)
protectedpure virtual

◆ readParams()

void XmippMetadataProgram::readParams ( )
protectedvirtual

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

Reimplemented from XmippProgram.

Reimplemented in ProgMask, ProgNormalize, BasicMpiMetadataProgram< ProgAngularContinuousAssign >, BasicMpiMetadataProgram< ProgPSDSort >, BasicMpiMetadataProgram< ProgEliminateByEnergy >, BasicMpiMetadataProgram< ProgThreshold >, BasicMpiMetadataProgram< ProgCorrectWiener2D >, BasicMpiMetadataProgram< ProgAngularDiscreteAssign >, BasicMpiMetadataProgram< ProgMask >, BasicMpiMetadataProgram< ProgTomoExtractSubvolume >, BasicMpiMetadataProgram< ProgFilter >, BasicMpiMetadataProgram< ProgTransformGeometry >, BasicMpiMetadataProgram< ProgImageSSNR >, BasicMpiMetadataProgram< ProgNormalize >, BasicMpiMetadataProgram< ProgImageResize >, BasicMpiMetadataProgram< ProgCorrectPhaseFlip2D >, BasicMpiMetadataProgram< ProgOperate >, BasicMpiMetadataProgram< ProgSymmetrize >, BasicMpiMetadataProgram< ProgCtfCorrectIdr >, ProgForwardZernikeSubtomos, ProgFlexibleAlignment, ProgForwardZernikeImages, ProgWindow, ProgForwardZernikeImagesPriors, ProgParallelForwardArtZernike3D, ProgAngularSphAlignment, ProgNmaAlignmentVol, ProgAngularSphAlignmentGpu, ProgAngularContinuousAssign2, ProgForwardArtZernike3D, ProgForwardArtZernike3DSubtomos, ProgNmaAlignment, ProgSubtractProjection, ProgArtZernike3D, ProgSubtomoSubtraction, ProgAngularDiscreteAssign, ProgTomoExtractSubvolume, ProgMorphology, ProgPSDSort, ProgVolumeSetAlign, ProgSimulateMicroscope, ProgTransformImageGreyLevels, ProgHeader, ProgStatistics, ProgVolumeCorrectBfactor, ProgOperate, ProgConvImg, ProgAngularContinuousAssign, ProgSymmetrize, ProgTransRangeAdjust, ProgAddNoise, ProgCTFEnhancePSD, ProgCtfCorrectIdr, ProgCorrectWiener2D, ProgImageResize, ProgThreshold, ProgCenterImage, ProgSpiderTranslate, ProgTransformDownsample, ProgTransformGeometry, ProgAngularAssignmentMag, ProgRandomizePhases, FlipParameters, ProgFilter, ProgVolumeCenter, MpiProgAngularSphAlignment, MpiProgForwardZernikeImages, MpiProgForwardZernikeImagesPriors, MpiProgForwardZernikeSubtomos, ProgEliminateByEnergy, MpiProgAngularAssignmentMag, ProgCorrectPhaseFlip2D, ProgImageSSNR, MpiProgTransformImageGreyLevels, MpiProgAngularContinuousAssign2, ProgImageResiduals, MpiProgSubtomoSubtraction, and MpiProgSubtractProjection.

Definition at line 138 of file xmipp_metadata_program.cpp.

139 {
140  fn_in = getParam("-i");
141  mode = metadataModeConvert(getParam("--mode"));
142 
143  if (produces_an_output)
144  fn_out = checkParam("-o") ? getParam("-o") : "";
145 
147  {
148  fn_out = checkParam("-o") ? getParam("-o") : "";
149  oroot = getParam("--oroot");
150  }
151 
152  if (allow_apply_geo)
153  apply_geo = !checkParam("--dont_apply_geo");
154 
155  // The following flags are an "advanced" options to allow save metadata
156  // when the -o is an stack, each program can define its default value
157  // that's why the || construct before checkParam call
158  save_metadata_stack = save_metadata_stack || checkParam("--save_metadata_stack");
159  track_origin = track_origin || checkParam("--track_origin");
160  keep_input_columns = keep_input_columns || checkParam("--keep_input_columns");
161 
162  MetaData * md = new MetaDataVec();
163  md->read(fn_in, NULL, decompose_stacks);
164  delete_mdIn = true; // Only delete mdIn when called directly from command line
165 
166  setup(md, fn_out, oroot, apply_geo, MDL::str2Label(getParam("--label")));
167 }//function readParams
WriteModeMetaData metadataModeConvert(String mode)
static MDLabel str2Label(const String &labelName)
FileName fn_in
Filenames of input and output Metadata.
const char * getParam(const char *param, int arg=0)
virtual void setup(MetaData *md, const FileName &o="", const FileName &oroot="", bool applyGeo=false, MDLabel label=MDL_IMAGE)
bool produces_an_output
Indicate that a unique final output is produced.
bool track_origin
Include the original input image filename in the output stack.
bool save_metadata_stack
Save the associated output metadata when output file is a stack.
bool decompose_stacks
Input Metadata will treat a stack file as a set of images instead of a unique file.
bool keep_input_columns
Keep input metadata columns.
bool checkParam(const char *param)
bool each_image_produces_an_output
Indicate that an output is produced for each image in the input.
WriteModeMetaData mode
Metadata writing mode: OVERWRITE, APPEND.
virtual void read(const FileName &inFile, const std::vector< MDLabel > *desiredLabels=nullptr, bool decomposeStack=true)=0

◆ run()

void XmippMetadataProgram::run ( )
virtual

Run over all images.

When nor -o neither –oroot is passed and want to overwrite input metadata

Reimplemented from XmippProgram.

Definition at line 343 of file xmipp_metadata_program.cpp.

344 {
345  FileName fnImg, fnImgOut, fullBaseName;
346  mdOut.clear(); //this allows multiple runs of the same Program object
347 
348  //Perform particular preprocessing
349  preProcess();
350 
351  startProcessing();
352 
353  if (!oroot.empty())
354  {
355  if (oext.empty())
357  oextBaseName = oext;
358  fullBaseName = oroot.removeFileFormat();
359  baseName = fullBaseName.getBaseName();
360  pathBaseName = fullBaseName.getDir();
361  }
362 
363  size_t objId;
364  size_t objIndex;
365  while (getImageToProcess(objId, objIndex))
366  {
367  ++objIndex; //increment for composing starting at 1
368  auto rowIn = mdIn->getRow(objId);
369  rowIn->getValue(image_label, fnImg);
370 
371  if (fnImg.empty())
372  break;
373 
374  fnImgOut = fnImg;
375 
376  MDRowVec rowOut;
377 
379  {
380  if (!oroot.empty()) // Compose out name to save as independent images
381  {
382  if (oext.empty()) // If oext is still empty, then use ext of indep input images
383  {
384  if (input_is_stack)
385  oextBaseName = "spi";
386  else
387  oextBaseName = fnImg.getFileFormat();
388  }
389 
390  if (!baseName.empty() )
391  fnImgOut.compose(fullBaseName, objIndex, oextBaseName);
392  else if (fnImg.isInStack())
393  fnImgOut.compose(pathBaseName + (fnImg.withoutExtension()).getDecomposedFileName(), objIndex, oextBaseName);
394  else
395  fnImgOut = pathBaseName + fnImg.withoutExtension()+ "." + oextBaseName;
396  }
397  else if (!fn_out.empty() )
398  {
399  if (single_image)
400  fnImgOut = fn_out;
401  else
402  fnImgOut.compose(objIndex, fn_out); // Compose out name to save as stacks
403  }
404  else
405  fnImgOut = fnImg;
406  setupRowOut(fnImg, *rowIn.get(), fnImgOut, rowOut);
407  }
408  else if (produces_a_metadata)
409  setupRowOut(fnImg, *rowIn.get(), fnImgOut, rowOut);
410 
411  processImage(fnImg, fnImgOut, *rowIn.get(), rowOut);
412 
414  mdOut.addRow(rowOut);
415 
416  checkPoint();
417  showProgress();
418  }
419  wait();
420 
421  /* Generate name to save mdOut when output are independent images. It uses as prefix
422  * the dirBaseName in order not overwriting files when repeating same command on
423  * different directories. If baseName is set it is used, otherwise, input name is used.
424  * Then, the suffix _oext is added.*/
425  if (fn_out.empty() )
426  {
427  if (!oroot.empty())
428  {
429  if (!baseName.empty() )
430  fn_out = findAndReplace(pathBaseName,"/","_") + baseName + "_" + oextBaseName + ".xmd";
431  else
432  fn_out = findAndReplace(pathBaseName,"/","_") + fn_in.getBaseName() + "_" + oextBaseName + ".xmd";
433  }
434  else if (input_is_metadata)
435  fn_out = fn_in;
436  }
437 
439 
440  postProcess();
441 
442  /* Reset the default values of the program in case
443  * to be reused.*/
444  init();
445 }
FileName removeFileFormat() const
void compose(const String &str, const size_t no, const String &ext="")
bool single_image
Input is a single image.
bool input_is_stack
Input is a stack.
size_t addRow(const MDRow &row) override
void clear() override
FileName fn_in
Filenames of input and output Metadata.
virtual void wait()
Wait for the distributor to finish.
String findAndReplace(const String &tInput, const String &tFind, const String &tReplace)
void setupRowOut(const FileName &fnImgIn, const MDRow &rowIn, const FileName &fnImgOut, MDRow &rowOut) const
Prepare rowout.
virtual std::unique_ptr< MDRow > getRow(size_t id)=0
MDLabel image_label
MDLabel to be used to read/write images, usually will be MDL_IMAGE.
virtual void processImage(const FileName &fnImg, const FileName &fnImgOut, const MDRow &rowIn, MDRow &rowOut)=0
virtual void checkPoint()
For very long programs, it may be needed to write checkpoints.
FileName withoutExtension() const
String getFileFormat() const
FileName getDir() const
bool each_image_produces_an_output
Indicate that an output is produced for each image in the input.
virtual bool getImageToProcess(size_t &objId, size_t &objIndex)
bool input_is_metadata
Input is a metadata.
FileName getBaseName() const
bool produces_a_metadata
Indicate that the unique final output file is a Metadata.
bool isInStack() const
FileName oext
Output extension and root.

◆ setMode()

void XmippMetadataProgram::setMode ( WriteModeMetaData  _mode)
inline

Definition at line 173 of file xmipp_metadata_program.h.

174  {
175  mode = _mode;
176  }
WriteModeMetaData mode
Metadata writing mode: OVERWRITE, APPEND.

◆ setup()

void XmippMetadataProgram::setup ( MetaData md,
const FileName o = "",
const FileName oroot = "",
bool  applyGeo = false,
MDLabel  label = MDL_IMAGE 
)
virtual

Setup of common XmippMetadataProgram arguments to be called from another program.

Definition at line 169 of file xmipp_metadata_program.cpp.

171 {
172  this->mdIn = md;
173  this->fn_out = out;
174  this->oroot = oroot;
175  this->image_label = image_label;
176  this->doRun = true;
177  this->iter = nullptr;
178 
179  if (remove_disabled)
180  mdIn->removeDisabled();
181 
182  if (mdIn->isEmpty())
183  REPORT_ERROR(ERR_MD_NOOBJ, "Empty input Metadata.");
184 
185  mdInSize = mdIn->size();
186 
187  if (mdIn->isMetadataFile)
188  input_is_metadata = true;
189  else
190  {
191  if (mdInSize == 1)
192  single_image = true;
193  else
194  input_is_stack = true;
195  }
196 
197  String labelStr = MDL::label2Str(image_label);
198 
199  if (image_label == MDL_UNDEFINED)
200  REPORT_ERROR(ERR_MD_BADLABEL, formatString("Unknown image label '%s'.", labelStr.c_str()));
201 
202  if (!mdIn->containsLabel(image_label))
204  formatString("Image label '%s' is missing. See option --label.", labelStr.c_str()));
205 
206  /* Output is stack if, given a filename in fn_out, mdIn has multiple images.
207  * In case no output name is given, then input is overwritten and we have to
208  * check if it is stack. */
209  output_is_stack = mdInSize > 1 && oroot.empty() && (!fn_out.empty() || input_is_stack);
210 
211  /* Save metadata related to output stack only if required,
212  * and output is a stack.*/
213  //save_metadata_stack = save_metadata_stack && output_is_stack;
214 
215  // Only delete output stack in case we are not overwriting input
217  !(fn_out.empty() && oroot.empty()) : false;
218 
219  // If the output is a stack, create empty stack file in advance to avoid concurrent access to the header
221 
222  // if create, then we need to read the dimensions of the input stack
225 
226  apply_geo = applyGeo;
227  // if input is volume do not apply geo
228  if (zdimOut > 1)
229  apply_geo = false;
230 }//function setup
bool delete_output_stack
Delete previous output stack file prior to process images.
size_t mdInSize
Number of input elements.
#define REPORT_ERROR(nerr, ErrormMsg)
Definition: xmipp_error.h:211
No exist requested object.
Definition: xmipp_error.h:156
virtual bool containsLabel(const MDLabel label) const =0
Unexpected label.
Definition: xmipp_error.h:157
bool single_image
Input is a single image.
bool get_image_info
Get the input image file dimensions to further operations.
bool isMetadataFile
bool input_is_stack
Input is a stack.
bool output_is_stack
Output is a stack.
void getImageInfo(const MetaData &md, size_t &Xdim, size_t &Ydim, size_t &Zdim, size_t &Ndim, DataType &datatype, MDLabel image_label)
virtual bool isEmpty() const
Missing expected label.
Definition: xmipp_error.h:158
virtual size_t size() const =0
MDLabel image_label
MDLabel to be used to read/write images, usually will be MDL_IMAGE.
bool remove_disabled
Remove disabled images from the input selfile.
virtual void removeDisabled()
std::string String
Definition: xmipp_strings.h:34
String formatString(const char *format,...)
static String label2Str(const MDLabel &label)
bool each_image_produces_an_output
Indicate that an output is produced for each image in the input.
size_t ndimOut
Output dimensions.
bool input_is_metadata
Input is a metadata.

◆ setupRowOut()

void XmippMetadataProgram::setupRowOut ( const FileName fnImgIn,
const MDRow rowIn,
const FileName fnImgOut,
MDRow rowOut 
) const

Prepare rowout.

Definition at line 298 of file xmipp_metadata_program.cpp.

299 {
300  rowOut.clear();
301  if (keep_input_columns) {
302  for (const MDObject* col : rowIn)
303  rowOut.setValue(*col);
304  }
305  rowOut.setValue(image_label, fnImgOut);
306  rowOut.setValue(MDL_ENABLED, 1);
307 
308  if (track_origin)
309  rowOut.setValue(MDL_IMAGE_ORIGINAL, fnImgIn);
310 }
Is this image enabled? (int [-1 or 1])
Name of an image from which MDL_IMAGE is coming from.
virtual void clear()=0
MDLabel image_label
MDLabel to be used to read/write images, usually will be MDL_IMAGE.
bool track_origin
Include the original input image filename in the output stack.
void setValue(MDLabel label, const T &d, bool addLabel=true)
bool keep_input_columns
Keep input metadata columns.

◆ show()

void XmippMetadataProgram::show ( ) const
overrideprotectedvirtual

Show parameters

Reimplemented from XmippProgram.

Definition at line 232 of file xmipp_metadata_program.cpp.

233 {
234  if (verbose==0)
235  return;
236  std::cout << "Input File: " << fn_in << std::endl;
237  if (apply_geo)
238  std::cout << "Reading geometrical transformations stored in metadata" << std::endl;
239  if (!fn_out.empty())
240  std::cout << "Output File: " << fn_out << std::endl;
241  if (!oroot.empty())
242  std::cout << "Output Root: " << oroot << std::endl;
243 }
FileName fn_in
Filenames of input and output Metadata.
int verbose
Verbosity level.

◆ showProgress()

void XmippMetadataProgram::showProgress ( )
protectedvirtual

Reimplemented in BasicMpiMetadataProgram< ProgAngularContinuousAssign >, BasicMpiMetadataProgram< ProgPSDSort >, BasicMpiMetadataProgram< ProgEliminateByEnergy >, BasicMpiMetadataProgram< ProgThreshold >, BasicMpiMetadataProgram< ProgCorrectWiener2D >, BasicMpiMetadataProgram< ProgAngularDiscreteAssign >, BasicMpiMetadataProgram< ProgMask >, BasicMpiMetadataProgram< ProgTomoExtractSubvolume >, BasicMpiMetadataProgram< ProgFilter >, BasicMpiMetadataProgram< ProgTransformGeometry >, BasicMpiMetadataProgram< ProgImageSSNR >, BasicMpiMetadataProgram< ProgNormalize >, BasicMpiMetadataProgram< ProgImageResize >, BasicMpiMetadataProgram< ProgCorrectPhaseFlip2D >, BasicMpiMetadataProgram< ProgOperate >, BasicMpiMetadataProgram< ProgSymmetrize >, BasicMpiMetadataProgram< ProgCtfCorrectIdr >, MpiProgAngularContinuousAssign2, MpiProgTransformImageGreyLevels, MpiProgNMA, MpiProgAngularSphAlignment, MpiProgForwardZernikeImages, MpiProgForwardZernikeImagesPriors, MpiProgForwardZernikeSubtomos, MpiProgAngularAssignmentMag, MpiProgSubtomoSubtraction, and MpiProgSubtractProjection.

Definition at line 292 of file xmipp_metadata_program.cpp.

293 {
296 }
bool single_image
Input is a single image.
void progress_bar(long rlen)
int verbose
Verbosity level.
bool allow_time_bar
Show process time bar.
size_t time_bar_step
Some time bar related counters.

◆ startProcessing()

void XmippMetadataProgram::startProcessing ( )
protectedvirtual

Do some stuff before starting processing in a parallel environment usually this only be executed by master.

Reimplemented in BasicMpiMetadataProgram< ProgAngularContinuousAssign >, BasicMpiMetadataProgram< ProgPSDSort >, BasicMpiMetadataProgram< ProgEliminateByEnergy >, BasicMpiMetadataProgram< ProgThreshold >, BasicMpiMetadataProgram< ProgCorrectWiener2D >, BasicMpiMetadataProgram< ProgAngularDiscreteAssign >, BasicMpiMetadataProgram< ProgMask >, BasicMpiMetadataProgram< ProgTomoExtractSubvolume >, BasicMpiMetadataProgram< ProgFilter >, BasicMpiMetadataProgram< ProgTransformGeometry >, BasicMpiMetadataProgram< ProgImageSSNR >, BasicMpiMetadataProgram< ProgNormalize >, BasicMpiMetadataProgram< ProgImageResize >, BasicMpiMetadataProgram< ProgCorrectPhaseFlip2D >, BasicMpiMetadataProgram< ProgOperate >, BasicMpiMetadataProgram< ProgSymmetrize >, BasicMpiMetadataProgram< ProgCtfCorrectIdr >, ProgAngularContinuousAssign2, MpiProgAngularContinuousAssign2, MpiProgAngularSphAlignment, MpiProgForwardZernikeImages, MpiProgForwardZernikeImagesPriors, MpiProgForwardZernikeSubtomos, MpiProgNMA, MpiProgTransformImageGreyLevels, MpiProgAngularAssignmentMag, MpiProgSubtomoSubtraction, and MpiProgSubtractProjection.

Definition at line 251 of file xmipp_metadata_program.cpp.

252 {
254  fn_out.deleteFile();
255 
258 
259  //Show some info
260  show();
261  // Initialize progress bar
265  time_bar_step = CEIL((double)time_bar_size / 60.0);
266  time_bar_done = 0;
267 }
void init_progress_bar(long total)
bool delete_output_stack
Delete previous output stack file prior to process images.
size_t mdInSize
Number of input elements.
bool single_image
Input is a single image.
#define CEIL(x)
Definition: xmipp_macros.h:225
void createEmptyFile(const FileName &filename, int xdim, int ydim, int Zdim, size_t select_img, bool isStack, int mode, int _swapWrite, const MDRowVec *md)
int verbose
Verbosity level.
void deleteFile() const
bool allow_time_bar
Show process time bar.
void show() const override
size_t time_bar_step
Some time bar related counters.

◆ tryRead()

int XmippMetadataProgram::tryRead ( int  argc,
const char **  argv,
bool  reportErrors = true 
)
virtual

Call the read function inside a try/catch block The function will return the error code when 0 means success and a value greater than 0 represents the error type

Definition at line 66 of file xmipp_metadata_program.cpp.

67 {
68  this->read( argc, argv, reportErrors );
69  return errorCode;
70 }
virtual void read(int argc, const char **argv, bool reportErrors=true)
int argc
Original command line arguments.
Definition: xmipp_program.h:86
const char ** argv
Definition: xmipp_program.h:87

◆ wait()

void XmippMetadataProgram::wait ( )
virtual

◆ writeOutput()

void XmippMetadataProgram::writeOutput ( )
protectedvirtual

Definition at line 276 of file xmipp_metadata_program.cpp.

277 {
278  if (!single_image && !mdOut.isEmpty() && !fn_out.empty())
279  {
280  if (produces_an_output || produces_a_metadata || !oroot.empty()) // Out as independent images
281  mdOut.write(fn_out.replaceExtension("xmd"));
282  else if (save_metadata_stack) // Output is stack and also save its associated metadata
283  {
284  FileName outFileName = getParam("--save_metadata_stack");
285  if (outFileName.empty())
286  outFileName = fn_out.replaceExtension("xmd");
287  mdOut.write(outFileName);
288  }
289  }
290 }
FileName replaceExtension(const String &newExt) const
void write(const FileName &outFile, WriteModeMetaData mode=MD_OVERWRITE) const
bool single_image
Input is a single image.
bool isEmpty() const override
const char * getParam(const char *param, int arg=0)
bool produces_an_output
Indicate that a unique final output is produced.
bool save_metadata_stack
Save the associated output metadata when output file is a stack.
bool produces_a_metadata
Indicate that the unique final output file is a Metadata.

Member Data Documentation

◆ allow_apply_geo

bool XmippMetadataProgram::allow_apply_geo
protected

Provide the program with the param –dont_apply_geo to allow the user deciding whether or not applying the transformation info as stored in the input metadata

Definition at line 93 of file xmipp_metadata_program.h.

◆ allow_time_bar

bool XmippMetadataProgram::allow_time_bar
protected

Show process time bar.

Definition at line 109 of file xmipp_metadata_program.h.

◆ apply_geo

bool XmippMetadataProgram::apply_geo

Apply geo.

Definition at line 66 of file xmipp_metadata_program.h.

◆ baseName

FileName XmippMetadataProgram::baseName

Definition at line 64 of file xmipp_metadata_program.h.

◆ create_empty_stackfile

bool XmippMetadataProgram::create_empty_stackfile
protected

Definition at line 121 of file xmipp_metadata_program.h.

◆ datatypeOut

DataType XmippMetadataProgram::datatypeOut

Definition at line 69 of file xmipp_metadata_program.h.

◆ decompose_stacks

bool XmippMetadataProgram::decompose_stacks
protected

Input Metadata will treat a stack file as a set of images instead of a unique file.

Definition at line 95 of file xmipp_metadata_program.h.

◆ delete_mdIn

bool XmippMetadataProgram::delete_mdIn
protected

Definition at line 123 of file xmipp_metadata_program.h.

◆ delete_output_stack

bool XmippMetadataProgram::delete_output_stack
protected

Delete previous output stack file prior to process images.

Definition at line 97 of file xmipp_metadata_program.h.

◆ each_image_produces_an_output

bool XmippMetadataProgram::each_image_produces_an_output
protected

Indicate that an output is produced for each image in the input.

Definition at line 90 of file xmipp_metadata_program.h.

◆ fn_in

FileName XmippMetadataProgram::fn_in

Filenames of input and output Metadata.

Definition at line 64 of file xmipp_metadata_program.h.

◆ fn_out

FileName XmippMetadataProgram::fn_out

Definition at line 64 of file xmipp_metadata_program.h.

◆ get_image_info

bool XmippMetadataProgram::get_image_info
protected

Get the input image file dimensions to further operations.

Definition at line 99 of file xmipp_metadata_program.h.

◆ image_label

MDLabel XmippMetadataProgram::image_label
protected

MDLabel to be used to read/write images, usually will be MDL_IMAGE.

Definition at line 80 of file xmipp_metadata_program.h.

◆ input_is_metadata

bool XmippMetadataProgram::input_is_metadata
protected

Input is a metadata.

Definition at line 113 of file xmipp_metadata_program.h.

◆ input_is_stack

bool XmippMetadataProgram::input_is_stack
protected

Input is a stack.

Definition at line 117 of file xmipp_metadata_program.h.

◆ keep_input_columns

bool XmippMetadataProgram::keep_input_columns
protected

Keep input metadata columns.

Definition at line 105 of file xmipp_metadata_program.h.

◆ mdInSize

size_t XmippMetadataProgram::mdInSize

Number of input elements.

Definition at line 71 of file xmipp_metadata_program.h.

◆ mode

WriteModeMetaData XmippMetadataProgram::mode
protected

Metadata writing mode: OVERWRITE, APPEND.

Definition at line 75 of file xmipp_metadata_program.h.

◆ ndimOut

size_t XmippMetadataProgram::ndimOut

Output dimensions.

Definition at line 68 of file xmipp_metadata_program.h.

◆ oext

FileName XmippMetadataProgram::oext
protected

Output extension and root.

Definition at line 78 of file xmipp_metadata_program.h.

◆ oextBaseName

FileName XmippMetadataProgram::oextBaseName

Definition at line 64 of file xmipp_metadata_program.h.

◆ oroot

FileName XmippMetadataProgram::oroot
protected

Definition at line 78 of file xmipp_metadata_program.h.

◆ output_is_stack

bool XmippMetadataProgram::output_is_stack
protected

Output is a stack.

Definition at line 119 of file xmipp_metadata_program.h.

◆ pathBaseName

FileName XmippMetadataProgram::pathBaseName

Definition at line 64 of file xmipp_metadata_program.h.

◆ produces_a_metadata

bool XmippMetadataProgram::produces_a_metadata
protected

Indicate that the unique final output file is a Metadata.

Definition at line 88 of file xmipp_metadata_program.h.

◆ produces_an_output

bool XmippMetadataProgram::produces_an_output
protected

Indicate that a unique final output is produced.

Definition at line 86 of file xmipp_metadata_program.h.

◆ remove_disabled

bool XmippMetadataProgram::remove_disabled
protected

Remove disabled images from the input selfile.

Definition at line 107 of file xmipp_metadata_program.h.

◆ save_metadata_stack

bool XmippMetadataProgram::save_metadata_stack
protected

Save the associated output metadata when output file is a stack.

Definition at line 101 of file xmipp_metadata_program.h.

◆ single_image

bool XmippMetadataProgram::single_image
protected

Input is a single image.

Definition at line 115 of file xmipp_metadata_program.h.

◆ time_bar_done

size_t XmippMetadataProgram::time_bar_done
protected

Definition at line 126 of file xmipp_metadata_program.h.

◆ time_bar_size

size_t XmippMetadataProgram::time_bar_size
protected

Definition at line 126 of file xmipp_metadata_program.h.

◆ time_bar_step

size_t XmippMetadataProgram::time_bar_step
protected

Some time bar related counters.

Definition at line 126 of file xmipp_metadata_program.h.

◆ track_origin

bool XmippMetadataProgram::track_origin
protected

Include the original input image filename in the output stack.

Definition at line 103 of file xmipp_metadata_program.h.

◆ xdimOut

size_t XmippMetadataProgram::xdimOut

Definition at line 68 of file xmipp_metadata_program.h.

◆ ydimOut

size_t XmippMetadataProgram::ydimOut

Definition at line 68 of file xmipp_metadata_program.h.

◆ zdimOut

size_t XmippMetadataProgram::zdimOut

Definition at line 68 of file xmipp_metadata_program.h.


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