34 addUsageLine(
"Deform a PDB according to a list of SPH deformation coefficients");
36 addParamsLine(
"--clnm <metadata_file> : List of deformation coefficients");
38 addExampleLine(
"xmipp_apply_deform_sph -i input.vol -o volume_deformed.vol --clnm coefficients.txt");
53 <<
"Volume: " << fn_vol << std::endl
54 <<
"Coefficient list: " << fn_sph << std::endl
55 <<
"Output: " << fn_out << std::endl
64 VI().setXmippOrigin();
66 VO().setXmippOrigin();
73 size_t idxY0=(clnm.size())/3;
77 double Rmax=basisParams[2];
78 double Rmax2=Rmax*Rmax;
79 double iRmax=1.0/Rmax;
99 for (
size_t idx=0; idx<idxY0; idx++)
108 gx += clnm[idx] *zsph;
109 gy += clnm[idx+idxY0] *zsph;
110 gz += clnm[idx+idxZ0] *zsph;
128 for(
int i = 0;
i < N; ++
i)
137 std::stringstream iss(s);
139 std::vector<double> v;
140 while (iss >> number)
148 auto vecSize = (int)((clnm.size())/3);
153 for (
int h=0; h<=basisParams[1]; h++)
155 int totalSPH = 2*h+1;
157 for (
int l=h; l<=basisParams[0]; l+=2)
159 for (
int m=0;
m<totalSPH;
m++)
__host__ __device__ float2 floor(const float2 v)
void sqrt(Image< double > &op)
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)
ql0001_ & k(htemp+1),(cvec+1),(atemp+1),(bj+1),(bl+1),(bu+1),(x+1),(clamda+1), &iout, infoqp, &zero,(w+1), &lenw,(iw+1), &leniw, &glob_grd.epsmac
#define A3D_ELEM(V, k, i, j)
const char * getParam(const char *param, int arg=0)
void addExampleLine(const char *example, bool verbatim=true)
T interpolatedElement3D(double x, double y, double z, T outside_value=(T) 0) const
int verbose
Verbosity level.
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)
void addParamsLine(const String &line)