Skip to content

Commit

Permalink
mri_gtmpvc. #NF. Added --no-pvc to turn off all PVC with one flag.
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglas Greve committed Feb 18, 2022
1 parent 57bc258 commit 257ed6d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions mri_gtmpvc/mri_gtmpvc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ int main(int argc, char *argv[])
if(gtm->reduce_fov && gtm->mask){
LTA *seg2bbpet,*anat2bbpet,*lta;
MRI *masktmp,*yvoltmp;
printf("Automask, reducing FOV\n");
printf("Automask, reducing FOV %d\n",gtm->reduce_fov);
if(gtm->reduce_fov == 1)
gtm->automaskRegion = REGIONgetBoundingBox(gtm->mask,1);
if(gtm->reduce_fov == 2)
Expand Down Expand Up @@ -606,7 +606,7 @@ int main(int argc, char *argv[])
fprintf(logfp,"Turning VoxFracCor ON for simulation. It will be turned OFF for anlaysis.\n");
gtm->DoVoxFracCor = 1;
}
printf("Building GTM DoVoxFracCor=%d\n",gtm->DoVoxFracCor);fflush(stdout);
printf("Building GTM DoVoxFracCor=%d (TFE)\n",gtm->DoVoxFracCor);fflush(stdout);
if(Gdiag_no > 0) PrintMemUsage(stdout);
PrintMemUsage(logfp);
mytimer.reset();
Expand Down Expand Up @@ -1226,6 +1226,13 @@ static int parse_commandline(int argc, char **argv) {
else if(!strcasecmp(option, "--sim-anat-seg")) DoSimAnatSeg=1;
else if (!strcasecmp(option, "--chunk")) setenv("FS_USE_MRI_CHUNK","1",1);
else if (!strcasecmp(option, "--no-chunk") ) unsetenv("FS_USE_MRI_CHUNK");
else if(!strcasecmp(option, "--no-pvc")){
// Turn off all pvc
gtm->cFWHM = 0;
gtm->rFWHM = 0;
gtm->sFWHM = 0;
gtm->DoVoxFracCor=0;
}
else if(!strcasecmp(option, "--auto-mask")){
if(nargc < 2) CMDargNErr(option,2);
sscanf(pargv[0],"%lf",&gtm->automask_fwhm);
Expand Down Expand Up @@ -1678,7 +1685,7 @@ static void print_usage(void) {
printf("\n");
printf(" --i inputvol : source data to PVC\n");
printf(" --frame F : only process 0-based frame F from inputvol\n");
printf(" --psf psfmm : scanner PSF FWHM in mm\n");
printf(" --psf psfmm : scanner PSF FWHM in mm (see also --no-tfe and --no-pvc)\n");
printf(" --seg segfile : anatomical segmentation to define regions for GTM\n");
printf(" --reg reg.lta : LTA registration file that maps PET to anatomical\n");
printf(" --regheader : assume input and seg share scanner space\n");
Expand Down Expand Up @@ -1709,7 +1716,8 @@ static void print_usage(void) {
printf(" Note: tissue type lateralization will sligthly affect results since \n");
printf(" the tissue type is used to resolve ties.\n");
printf("\n");
printf(" --no-tfe : do not correction for tissue fraction effect (with --psf 0 turns off PVC entirely)\n");
printf(" --no-tfe : do not correction for tissue fraction effect (corrects by default)\n");
printf(" --no-pvc : turns off PVC entirely (both PSF and TFE)\n");
printf(" --segpvfres resmm : set the tissue fraction resolution parameter (def is %g)\n",segpvfresmm);
printf(" if a negative number is used, then it is treated as an upsampling factor (eg, -3)\n");
printf(" The TF is computed by dividing the PET voxel into subvoxels of size segpvfres\n");
Expand Down

0 comments on commit 257ed6d

Please sign in to comment.