Xmipp
v3.23.11-Nereus
|
#include <movie_alignment_correlation_base.h>
Public Member Functions | |
virtual void | readParams () |
Read argument from command line. More... | |
virtual void | show () |
Show. More... | |
virtual void | defineParams () |
Define parameters. More... | |
void | run () |
Run. 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) |
ParamDef * | getParamDef (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 ¶m, 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 | |
Dimensions | getMovieSizeRaw () |
Dimensions | getMovieSize () |
AlignmentResult< T > | computeAlignment (Matrix1D< T > &bX, Matrix1D< T > &bY, Matrix2D< T > &A, const core::optional< size_t > &refFrame, size_t N, int verbose) |
int | findReferenceImage (size_t N, const Matrix1D< T > &shiftX, const Matrix1D< T > &shiftY) |
void | computeTotalShift (int iref, int j, const Matrix1D< T > &shiftX, const Matrix1D< T > &shiftY, T &totalShiftX, T &totalShiftY) |
MultidimArray< T > | createLPF (T Ts, const Dimensions &dims) |
void | loadFrame (const MetaData &movie, const Image< T > &dark, const Image< T > &igain, size_t objId, Image< T > &out) const |
virtual void | applyShiftsComputeAverage (const MetaData &movie, const Image< T > &dark, const Image< T > &igain, Image< T > &initialMic, size_t &Ninitial, Image< T > &averageMicrograph, size_t &N, const AlignmentResult< T > &globAlignment)=0 |
virtual void | applyShiftsComputeAverage (const MetaData &movie, const Image< T > &dark, const Image< T > &igain, Image< T > &initialMic, size_t &Ninitial, Image< T > &averageMicrograph, size_t &N, const LocalAlignmentResult< T > &alignment)=0 |
virtual AlignmentResult< T > | computeGlobalAlignment (const MetaData &movie, const Image< T > &dark, const Image< T > &igain)=0 |
virtual LocalAlignmentResult< T > | computeLocalAlignment (const MetaData &movie, const Image< T > &dark, const Image< T > &igain, const AlignmentResult< T > &globAlignment)=0 |
virtual void | releaseAll ()=0 |
void | storeResults (const LocalAlignmentResult< T > &alignment) |
float | getPixelResolution (float scaleFactor) const |
float | getScaleFactor () const |
std::pair< size_t, size_t > | getRequestedPatchSize () const |
auto | getBinning () const |
bool | applyBinning () const |
Protected Member Functions inherited from XmippProgram | |
void | defineCommons () |
Protected Attributes | |
int | nfirst |
int | nlast |
float | maxShift |
FileName | fnAligned |
FileName | fnAvg |
int | nfirstSum |
int | nlastSum |
FileName | fnInitialAvg |
std::pair< size_t, size_t > | localAlignPatches |
Dimensions | localAlignmentControlPoints = Dimensions(0) |
Protected Attributes inherited from XmippProgram | |
int | errorCode |
ProgramDef * | progDef |
Program definition and arguments parser. More... | |
std::map< String, CommentList > | defaultComments |
int | argc |
Original command line arguments. More... | |
const char ** | argv |
Static Protected Attributes | |
static constexpr int | solverIterations = 2 |
Additional Inherited Members | |
Public Attributes inherited from XmippProgram | |
bool | doRun |
bool | runWithoutArgs |
int | verbose |
Verbosity level. More... | |
int | debug |
Definition at line 56 of file movie_alignment_correlation_base.h.
|
inlineprotected |
Definition at line 227 of file movie_alignment_correlation_base.h.
|
protectedpure virtual |
This method applies global shifts and can also produce 'average' image (micrograph)
movie | input |
dark | correction to be used |
igain | correction to be used |
initialMic | sum of the unaligned micrographs |
Ninitial | will store number of micrographs used for unaligned sum |
averageMicrograph | sum of the aligned micrographs |
N | will store number of micrographs used for aligned sum |
globAlignment | to apply |
|
protectedpure virtual |
This method applies local shifts and can also produce 'average' image (micrograph)
movie | input |
dark | correction to be used |
igain | correction to be used |
initialMic | sum of the unaligned micrographs |
Ninitial | will store number of micrographs used for unaligned sum |
averageMicrograph | sum of the aligned micrographs |
N | will store number of micrographs used for aligned sum |
alignment | to apply |
|
protected |
Compute alignment of the each frame from frame-to-frame shifts
bX | frame-to-frame shift in X dim |
bY | frame-to-frame shift in Y dim |
A | system matrix to be used |
refFrame | reference frame |
N | no of frames |
verbose | level |
Definition at line 400 of file movie_alignment_correlation_base.cpp.
|
protectedpure virtual |
This method computes global shift of the frames of the movie
movie | to process |
dark | pixel correction |
igain | correction |
|
protectedpure virtual |
This method computes local shift of the frames of the movie
movie | to process |
dark | pixel correction |
igain | correction |
|
protected |
Method to compute sum of shifts of some image in respect to a reference image
iref | index of the reference image |
j | index of the queried image |
shiftX | relative shifts in X dim |
shiftY | relative shifts in Y dim |
totalShiftX | resulting shift in X dim |
totalShiftY | resulting shift in Y dim |
Definition at line 229 of file movie_alignment_correlation_base.cpp.
|
protected |
Method will create a 2D Low Pass Filter of given size
Ts | pixel resolution of the resulting filter |
dims | dimension of the filter (in spatial domain) |
Definition at line 185 of file movie_alignment_correlation_base.cpp.
|
virtual |
Define parameters.
Reimplemented from XmippProgram.
Reimplemented in ProgMovieAlignmentCorrelation< T >, and ProgMovieAlignmentCorrelationGPU< T >.
Definition at line 112 of file movie_alignment_correlation_base.cpp.
|
protected |
Method finds a reference image, i.e. an image which has smallest relative shift to all other images.
N | no of images |
shiftX | relative X shift of each image |
shiftY | relative Y shift of each image |
Definition at line 247 of file movie_alignment_correlation_base.cpp.
|
inlineprotected |
Get binning factor for resulting micrograph / alignend movie
Definition at line 223 of file movie_alignment_correlation_base.h.
|
protected |
Definition at line 357 of file movie_alignment_correlation_base.cpp.
|
protected |
Definition at line 339 of file movie_alignment_correlation_base.cpp.
|
protected |
Returns pixel resolution of the scaled movie
scaleFactor | (<= 1) used to change size of the movie |
Definition at line 180 of file movie_alignment_correlation_base.cpp.
|
inlineprotected |
Returns size of the patch as requested by user
Definition at line 217 of file movie_alignment_correlation_base.h.
|
protected |
Returns scale factor as requested by user
Definition at line 311 of file movie_alignment_correlation_base.cpp.
|
protected |
Method loads a single frame from the movie and apply gain and dark pixel correction
movie | to load from |
dark | pixel correction |
igain | inverse gain correction |
objId | id of the image to load |
out | loaded frame |
Definition at line 155 of file movie_alignment_correlation_base.cpp.
|
virtual |
Read argument from command line.
Reimplemented from XmippProgram.
Reimplemented in ProgMovieAlignmentCorrelation< T >, and ProgMovieAlignmentCorrelationGPU< T >.
Definition at line 33 of file movie_alignment_correlation_base.cpp.
|
protectedpure virtual |
This method releases all resources allocated so far
|
virtual |
Run.
Reimplemented from XmippProgram.
Definition at line 530 of file movie_alignment_correlation_base.cpp.
|
virtual |
Show.
Reimplemented in ProgMovieAlignmentCorrelationGPU< T >.
Definition at line 89 of file movie_alignment_correlation_base.cpp.
|
protected |
Method to store all computed alignment to hard drive
Definition at line 462 of file movie_alignment_correlation_base.cpp.
|
protected |
Aligned movie
Definition at line 320 of file movie_alignment_correlation_base.h.
|
protected |
Aligned micrograph
Definition at line 322 of file movie_alignment_correlation_base.h.
|
protected |
Aligned micrograph
Definition at line 326 of file movie_alignment_correlation_base.h.
|
protected |
Control points used for local alignment
Definition at line 330 of file movie_alignment_correlation_base.h.
|
protected |
Number of patches used for local alignment
Definition at line 328 of file movie_alignment_correlation_base.h.
|
protected |
Max shift in pixels
Definition at line 318 of file movie_alignment_correlation_base.h.
|
protected |
First and last frame (inclusive)
Definition at line 316 of file movie_alignment_correlation_base.h.
|
protected |
First and last frame
Definition at line 324 of file movie_alignment_correlation_base.h.
|
protected |
Definition at line 316 of file movie_alignment_correlation_base.h.
|
protected |
Definition at line 324 of file movie_alignment_correlation_base.h.
|
staticprotected |
Solver iterations
Definition at line 332 of file movie_alignment_correlation_base.h.