Skip to content
Snippets Groups Projects
Commit 94fd0122 authored by Matthew Webster's avatar Matthew Webster
Browse files

valid filename

parent de9123fd
No related branches found
No related tags found
No related merge requests found
...@@ -26,7 +26,7 @@ int fmrib_main(int argc, char *argv[]) ...@@ -26,7 +26,7 @@ int fmrib_main(int argc, char *argv[])
int direction,dimerror=0,xoffset=0,yoffset=0,zoffset=0,toffset=0; int direction,dimerror=0,xoffset=0,yoffset=0,zoffset=0,toffset=0;
NiftiIO reader; NiftiIO reader;
NiftiHeader header(reader.loadHeader(string(argv[3]))); NiftiHeader header(reader.loadHeader(return_validimagefilename(string(argv[3]))));
float newTR(header.pixdim[3]); float newTR(header.pixdim[3]);
if (!strcmp(argv[1], "-t")) direction=0; if (!strcmp(argv[1], "-t")) direction=0;
...@@ -54,7 +54,7 @@ int fmrib_main(int argc, char *argv[]) ...@@ -54,7 +54,7 @@ int fmrib_main(int argc, char *argv[])
for(int vol = 4; vol < argc; vol++) for(int vol = 4; vol < argc; vol++)
{ {
header=reader.loadHeader(string(argv[vol])); header=reader.loadHeader(return_validimagefilename(string(argv[vol])));
if (direction==0) tdimtot+=header.dim[4]; if (direction==0) tdimtot+=header.dim[4];
if (direction==1) xdimtot+=header.dim[1]; if (direction==1) xdimtot+=header.dim[1];
if (direction==2) ydimtot+=header.dim[2]; if (direction==2) ydimtot+=header.dim[2];
......
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