Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions src/xmipp/libraries/reconstruction/angular_project_library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,9 @@ void ProgAngularProjectLibrary::project_angle_vector (int my_init, int my_end, b
FileName fn_proj;
int mySize;
int numberStepsPsi = 1;
const auto numberOfRotTilt = my_end-my_init+1;

mySize=my_end-my_init+1;
mySize=numberOfRotTilt;
if (psi_sampling < 360)
{
numberStepsPsi = (int) (359.99999/psi_sampling);
Expand All @@ -207,11 +208,6 @@ void ProgAngularProjectLibrary::project_angle_vector (int my_init, int my_end, b

if (verbose)
init_progress_bar(mySize);
int myCounter=0;

for (double mypsi=0;mypsi<360;mypsi += psi_sampling)
for (int i=0;i<my_init;i++)
myCounter++;
// if (shears && XSIZE(inputVol())!=0 && VShears==NULL)
// VShears=new RealShearsInfo(inputVol());
if (projType == SHEARS && XSIZE(inputVol())!=0 && Vshears==nullptr)
Expand All @@ -222,16 +218,19 @@ void ProgAngularProjectLibrary::project_angle_vector (int my_init, int my_end, b
maxFrequency,
BSplineDeg);

for (double mypsi=0;mypsi<360;mypsi += psi_sampling)
for (std::size_t psiIndex = 0; psiIndex < numberStepsPsi; ++psiIndex)
{
for (int i=my_init;i<=my_end;i++)
double mypsi = psiIndex * psi_sampling;
for (std::size_t i = 0; i < numberOfRotTilt; ++i)
{
const auto index = my_init + i;
const auto n = psiIndex*numberOfRotTilt + i;
if (verbose)
progress_bar(i-my_init);

double psi= mypsi+ZZ(mysampling.no_redundant_sampling_points_angles[i]);
double tilt= YY(mysampling.no_redundant_sampling_points_angles[i]);
double rot= XX(mysampling.no_redundant_sampling_points_angles[i]);
progress_bar(n);
double psi= mypsi+ZZ(mysampling.no_redundant_sampling_points_angles[index]);
double tilt= YY(mysampling.no_redundant_sampling_points_angles[index]);
double rot= XX(mysampling.no_redundant_sampling_points_angles[index]);

// if (shears)
// projectVolume(*VShears, P, Ydim, Xdim, rot,tilt,psi);
Expand All @@ -247,9 +246,10 @@ void ProgAngularProjectLibrary::project_angle_vector (int my_init, int my_end, b

P.setEulerAngles(rot,tilt,psi);
P.setDataMode(_DATA_ALL);
P.write(output_file,(size_t) (numberStepsPsi * i + mypsi +1),true,WRITE_REPLACE);
P.write(output_file, (n + 1), true, WRITE_REPLACE);
}
}

if (verbose)
progress_bar(mySize);
}
Expand Down