50 <<
"Input images: " <<
fn_in << std::endl
51 <<
"Reference volume: " <<
fn_vol << std::endl
52 <<
"Output rootname: " <<
fn_oroot << std::endl
53 <<
"Symmetry: " <<
fn_sym << std::endl
55 <<
"Maximum distance: " <<
maxDist << std::endl
62 addUsageLine(
"Separate projections according to a volume");
63 addParamsLine(
" -i <metadata> : Metadata with the images to separate. Make sure they have an angular assignment");
65 addParamsLine(
" [--oroot <rootname=split>] : Rootname for the output files");
66 addParamsLine(
" [--sym <symmetry_file=c1>] : Symmetry file if any");
67 addParamsLine(
" :+The definition of the symmetry is described at [[transform_symmetrize_v3][transform_symmetrize]]");
68 addParamsLine(
" [--angSampling <a=5>] : Angular sampling in degrees");
69 addParamsLine(
" [--maxDist <a=10>] : Maximum angular distance in degrees");
70 addExampleLine(
"xmipp_metadata_split_3D -i projections.sel --vol volume.vol --oroot split");
81 for (
size_t objId : mdIn.
ids())
90 double angle=acos(
dotProduct(projectionDir,projectionDir2));
101 std::vector<MDLabel> groupBy;
110 std::vector<double> cc;
114 double ccMedian=cc[cc.size()/2];
115 for (
size_t objId : mdNeighbours.
ids())
130 std::cerr <<
"Generating projections ..." << std::endl;
131 String cmd=
formatString(
"xmipp_angular_project_library -i %s -o %s_gallery.stk --sampling_rate %f --sym %s --method fourier 1 0.25 bspline --compute_neighbors --angular_distance -1 --experimental_images %s -v 0",
133 if (system(cmd.c_str())!=0)
147 size_t maxRef=0, refno;
148 for (
size_t objId :
mdIn.
ids())
158 std::vector<FileName> fnNeighbours;
162 std::vector<size_t> refs;
163 std::vector<double> upperHalf;
165 std::cerr <<
"Classifying projections ...\n";
180 if (mdNeighbours.
size()>0)
187 size_t imax=refs.size();
188 for (
size_t i=0; i<imax; ++
i)
198 for (
auto& row :
mdIn)
208 mdUpper.write(
fn_oroot+
"_upper.xmd");
209 mdLower.write(
fn_oroot+
"_lower.xmd");
Just to locate unclassified errors.
void init_progress_bar(long total)
double getDoubleParam(const char *param, int arg=0)
#define REPORT_ERROR(nerr, ErrormMsg)
void Euler_direction(double alpha, double beta, double gamma, Matrix1D< double > &v)
const char * getParam(const char *param, int arg=0)
void progress_bar(long rlen)
void addExampleLine(const char *example, bool verbatim=true)
int verbose
Verbosity level.
void sort(struct DCEL_T *dcel)
T dotProduct(const Matrix1D< T > &v1, const Matrix1D< T > &v2)
String formatString(const char *format,...)
void addUsageLine(const char *line, bool verbatim=false)
void addParamsLine(const String &line)