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

Added verbose mode

parent 44961d6f
No related branches found
No related tags found
No related merge requests found
...@@ -18,7 +18,7 @@ using namespace MISCMATHS; ...@@ -18,7 +18,7 @@ using namespace MISCMATHS;
void print_usage(const string& progname) { void print_usage(const string& progname) {
cerr << "Usage: " << progname << " <input 4D volume> <output text file> [<mask volume>] " cerr << "Usage: " << progname << " <input 4D volume> <output text file> [<mask volume> [-v]] "
<< endl << endl; << endl << endl;
cerr << "e.g. " << progname << " filtered_func_data meants.txt my_mask" cerr << "e.g. " << progname << " filtered_func_data meants.txt my_mask"
<< endl; << endl;
...@@ -39,6 +39,13 @@ int main(int argc,char *argv[]) ...@@ -39,6 +39,13 @@ int main(int argc,char *argv[])
return -1; return -1;
} }
bool verbose = false;
if ( (argc>=5) && (argv[4]=="-v") ) {
verbose = true;
} else {
cerr << "Unrecognised option: " << argv[4] << endl;
}
volume4D<float> vin; volume4D<float> vin;
read_volume4D(vin,argv[1]); read_volume4D(vin,argv[1]);
...@@ -67,6 +74,9 @@ int main(int argc,char *argv[]) ...@@ -67,6 +74,9 @@ int main(int argc,char *argv[])
if (fabs(mask(x,y,z))>1e-8) { // arbitrary "0" threshold if (fabs(mask(x,y,z))>1e-8) { // arbitrary "0" threshold
meants += vin.voxelts(x,y,z); meants += vin.voxelts(x,y,z);
num++; num++;
if (verbose) {
cout << x << " " << y " " << z " " << vin.voxelts(x,y,z).t();
}
} }
} }
} }
......
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