Skip to content
Snippets Groups Projects
Commit 6a9ea684 authored by Stephen Smith's avatar Stephen Smith
Browse files

CVS: ----------------------------------------------------------------------

parent 1f89d0c3
No related branches found
No related tags found
No related merge requests found
......@@ -26,12 +26,12 @@ using namespace NEWIMAGE;
void usage()
{
cout << "\nUsage: siena_diff <input1_basename> <input2_basename> [options] [-s segmentation options]\n\n" <<
"[-d] debug - generate edge images and don't remove temporary images\n" <<
"[-2] don't segment grey+white separately (because there is poor grey-white contrast)\n" <<
"[-c <corr>] apply self-calibrating correction factor\n" <<
"[-d] debug - generate edge images and don't remove temporary images\n" <<
"[-2] don't segment grey+white separately (because there is poor grey-white contrast)\n" <<
"[-c <corr>] apply self-calibrating correction factor\n" <<
// "[-e] erode joint mask a lot instead of dilating it slightly (ie find ventricle surface)\n" <<
"[-i] ignore flow in z (may be good if top of brain is missing)\n" <<
"[-m] apply <input1_basename>_stdmask to brain edge points\n" <<
"[-i] ignore flow in z (may be good if top of brain is missing)\n" <<
"[-m] apply <input1_basename>_stdmask to brain edge points\n" <<
"[-s <options>] <options> to be passed to segmentation (type \"fast\" to get these)\n\n" << endl;
exit(1);
}
......@@ -149,28 +149,28 @@ for (i = 3; i < argc; i++) {
// }}}
// {{{ transform images and masks
// sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
// fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
// printf("%s\n",thestring); system(thestring);
sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
printf("%s\n",thestring); system(thestring);
// sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
// fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
// printf("%s\n",thestring); system(thestring);
sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s",
fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
printf("%s\n",thestring); system(thestring);
// sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
// fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
// printf("%s\n",thestring); system(thestring);
sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1]);
printf("%s\n",thestring); system(thestring);
// sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
// fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
// printf("%s\n",thestring); system(thestring);
sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_brain_mask",
fsldir,argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
printf("%s\n",thestring); system(thestring);
// if (edge_masking)
// {
// sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_valid_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_valid_mask_with_%s",
// fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
// printf("%s\n",thestring); system(thestring);
// }
if (edge_masking)
{
sprintf(thestring,"%s/bin/flirt -o %s_halfwayto_%s_valid_mask -applyisoxfm 1 -paddingsize 0 -init %s_halfwayto_%s.mat -ref %s -in %s_valid_mask_with_%s",
fsldir,argv[1],argv[2],argv[1],argv[2],argv[1],argv[1],argv[2]);
printf("%s\n",thestring); system(thestring);
}
// }}}
// {{{ dilate masks, read transformed images and masks, and combine to jointly-masked transformed images
......@@ -230,7 +230,7 @@ if(1) // always done unless the above uncommented and used instead of this test
sprintf(thestring,"%s/bin/fast %s %s %s_halfwayto_%s_brain > %s_halfwayto_%s_brain.vol 2>&1",
fsldir,segtype,segoptions,argv[1],argv[2],argv[1],argv[2]);
cout << thestring << endl;
// system(thestring);
system(thestring);
}
else
{
......@@ -482,7 +482,7 @@ if (flow_output)
cout << "AREA " << count*voxel_area << " mm^2" << endl;
cout << "VOLC " << total*voxel_volume << " mm^3" << endl;
cout << "RATIO " << (total*voxel_volume) / (count*voxel_area) << " mm" << endl; /* mean perpendicular edge motion; l in the equations */
cout << "PBVC " << (calib*30*total*voxel_volume) / (count*voxel_area) << " %%" << endl;
cout << "PBVC " << (calib*30*total*voxel_volume) / (count*voxel_area) << " %" << endl;
// }}}
return 0;
......
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