Skip to content
Snippets Groups Projects
Commit 076008fd authored by Mark Jenkinson's avatar Mark Jenkinson
Browse files

Put back in the multiplication by 100 to get percentages

parent ba5a84b6
No related branches found
No related tags found
No related merge requests found
...@@ -64,27 +64,27 @@ int do_work(int argc, char* argv[]) ...@@ -64,27 +64,27 @@ int do_work(int argc, char* argv[])
xpd.addvolume((tmp[0]+tmp[1])*0.5f); xpd.addvolume((tmp[0]+tmp[1])*0.5f);
tmp=lrzgrad(fw[0],mask); tmp=lrzgrad(fw[0],mask);
xpd.addvolume((tmp[0]+tmp[1])*0.5f); xpd.addvolume((tmp[0]+tmp[1])*0.5f);
xpd[0]/=fw.xdim(); xpd[0]*=100.0/fw.xdim();
xpd[1]/=fw.ydim(); xpd[1]*=100.0/fw.ydim();
xpd[2]/=fw.zdim(); xpd[2]*=100.0/fw.zdim();
tmp=lrxgrad(fw[1],mask); tmp=lrxgrad(fw[1],mask);
ypd.addvolume((tmp[0]+tmp[1])*0.5f); ypd.addvolume((tmp[0]+tmp[1])*0.5f);
tmp=lrygrad(fw[1],mask); tmp=lrygrad(fw[1],mask);
ypd.addvolume((tmp[0]+tmp[1])*0.5f); ypd.addvolume((tmp[0]+tmp[1])*0.5f);
tmp=lrzgrad(fw[1],mask); tmp=lrzgrad(fw[1],mask);
ypd.addvolume((tmp[0]+tmp[1])*0.5f); ypd.addvolume((tmp[0]+tmp[1])*0.5f);
ypd[0]/=fw.xdim(); ypd[0]*=100.0/fw.xdim();
ypd[1]/=fw.ydim(); ypd[1]*=100.0/fw.ydim();
ypd[2]/=fw.zdim(); ypd[2]*=100.0/fw.zdim();
tmp=lrxgrad(fw[2],mask); tmp=lrxgrad(fw[2],mask);
zpd.addvolume((tmp[0]+tmp[1])*0.5f); zpd.addvolume((tmp[0]+tmp[1])*0.5f);
tmp=lrygrad(fw[2],mask); tmp=lrygrad(fw[2],mask);
zpd.addvolume((tmp[0]+tmp[1])*0.5f); zpd.addvolume((tmp[0]+tmp[1])*0.5f);
tmp=lrzgrad(fw[2],mask); tmp=lrzgrad(fw[2],mask);
zpd.addvolume((tmp[0]+tmp[1])*0.5f); zpd.addvolume((tmp[0]+tmp[1])*0.5f);
zpd[0]/=fw.xdim(); zpd[0]*=100.0/fw.xdim();
zpd[1]/=fw.ydim(); zpd[1]*=100.0/fw.ydim();
zpd[2]/=fw.zdim(); zpd[2]*=100.0/fw.zdim();
string bname=fslbasename(outname.value()); string bname=fslbasename(outname.value());
save_volume4D(xpd,bname+"_x"); save_volume4D(xpd,bname+"_x");
save_volume4D(ypd,bname+"_y"); save_volume4D(ypd,bname+"_y");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment