62 <<
"Reference volume: " <<
fnVol << std::endl
63 <<
"Max. Resolution: " <<
maxResol << std::endl
64 <<
"Max. Gray Scale: " <<
maxA << std::endl
65 <<
"Max. Gray Shift: " <<
maxB << std::endl
66 <<
"Sampling: " <<
Ts << std::endl
67 <<
"Max. Radius: " <<
Rmax << std::endl
68 <<
"Padding factor: " <<
pad << std::endl
79 defaultComments[
"-o"].addComment(
"Stack of images prepared for 3D reconstruction");
82 addParamsLine(
" [--max_resolution <f=4>] : Maximum resolution (A)");
83 addParamsLine(
" [--max_gray_scale <a=0.05>] : Maximum gray scale change");
84 addParamsLine(
" [--max_gray_shift <b=0.05>] : Maximum gray shift change as a factor of the image standard deviation");
85 addParamsLine(
" [--sampling <Ts=1>] : Sampling rate (A/pixel)");
86 addParamsLine(
" [--Rmax <R=-1>] : Maximum radius (px). -1=Half of volume size");
121 if (fabs(a-1)>prm->
maxA)
159 double rot, tilt,
psi;
164 double olda=1.0, oldb=0.0;
171 I().setXmippOrigin();
182 std::cout <<
"P: ";
P().printStats(); std::cout << std::endl;
183 save.
write(
"PPPprojection.xmp");
185 std::cout <<
"I: ";
I().printStats(); std::cout << std::endl;
186 save.
write(
"PPPexperimental.xmp");
188 std::cout <<
"P-I init: "; save().printStats(); std::cout << std::endl;
189 save.
write(
"PPPdiffInit.xmp");
193 steps.initConstant(1);
196 double costAB=-1, costBA=-1;
249 std::cerr << XE.what() << std::endl;
250 std::cerr <<
"Warning: Cannot refine " << fnImg << std::endl;
258 save.
write(
"PPPexperimentalCorrected.xmp");
259 std::cout <<
"I corrected: ";
I().printStats(); std::cout << std::endl;
261 std::cout <<
"P-I final: "; save().printStats(); std::cout << std::endl;
262 save.
write(
"PPPdiff.xmp");
263 std::cout << fnImgOut <<
" rewritten\n";
264 std::cout <<
"Press any key" << std::endl;
265 char c; std::cin >>
c;
double getDoubleParam(const char *param, int arg=0)
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)
T & getValue(MDLabel label)
const char * getParam(const char *param, int arg=0)
#define FOR_ALL_DIRECT_ELEMENTS_IN_MULTIDIMARRAY(v)
#define DIRECT_MULTIDIM_ELEM(v, n)
void projectVolume(FourierProjector &projector, Projection &P, int Ydim, int Xdim, double rot, double tilt, double psi, const MultidimArray< double > *ctf)
int verbose
Verbosity level.
void setValue(MDLabel label, const T &d, bool addLabel=true)
void generate_mask(bool apply_geo=false)
virtual bool containsLabel(MDLabel label) const =0
#define BINARY_CIRCULAR_MASK
double psi(const double x)
int read(const FileName &name, DataMode datamode=DATA, size_t select_img=ALL_IMAGES, bool mapData=false, int mode=WRITE_READONLY)
void addUsageLine(const char *line, bool verbatim=false)
const MultidimArray< int > & get_binary_mask() const
int getIntParam(const char *param, int arg=0)
void addParamsLine(const String &line)
void applyMaskSpace(MultidimArray< double > &v)
std::map< String, CommentList > defaultComments