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

Fixed mm scalings

parent ded96222
No related branches found
No related tags found
No related merge requests found
...@@ -57,11 +57,17 @@ int do_work(int argc, char* argv[]) ...@@ -57,11 +57,17 @@ int do_work(int argc, char* argv[])
volume4D<float> fw, xpd, ypd, zpd; volume4D<float> fw, xpd, ypd, zpd;
read_volume4D(fw,fullwarp.value()); read_volume4D(fw,fullwarp.value());
gradient(fw[0],xpd); gradient(fw[0],xpd);
xpd/=fw.xdim(); xpd[0]/=fw.xdim();
xpd[1]/=fw.ydim();
xpd[2]/=fw.zdim();
gradient(fw[1],ypd); gradient(fw[1],ypd);
ypd/=fw.ydim(); ypd[0]/=fw.xdim();
ypd[1]/=fw.ydim();
ypd[2]/=fw.zdim();
gradient(fw[2],zpd); gradient(fw[2],zpd);
zpd/=fw.zdim(); zpd[0]/=fw.xdim();
zpd[1]/=fw.ydim();
zpd[2]/=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