# ${FSL_REMOTE_CALL} $host "kill -KILL $pid" #this leaves one child process per processor - what can you do?
# ${FSLREMOTECALL} $host "kill -KILL $pid" #this leaves one child process per processor - what can you do?
$FSL_REMOTE_CALL$host"if [ -r /etc/fslconf/fsl.sh ];then . /etc/fslconf/fsl.sh; elif [ -r /usr/local/etc/fslconf/fsl.sh ];then . /usr/local/etc/fslconf/fsl.sh; elif [ -r \${HOME}/.fslconf/fsl.sh ]; then . \${HOME}/.fslconf/fsl.sh; fi; if [ x\${FSLDIR} != "x" ];then \${FSLDIR}/bin/bedpost_kill_pid ${pid} >/dev/null 2>&1; else echo FSLDIR not set in any default location on machine `hostname`;fi">/dev/null 2>&1 &
$FSLREMOTECALL$host"if [ -r /usr/local/etc/fslconf/fsl.sh ];then . /usr/local/etc/fslconf/fsl.sh;fi; if [ -r /etc/fslconf/fsl.sh ];then . /etc/fslconf/fsl.sh;fi; if [ -r \${HOME}/.fslconf/fsl.sh ]; then . \${HOME}/.fslconf/fsl.sh; fi; if [ x\${FSLDIR} != "x" ];then \${FSLDIR}/bin/bedpost_kill_pid ${pid} >/dev/null 2>&1; else echo FSLDIR not set in any default location on machine `hostname`;fi">/dev/null 2>&1 &
echo "processing data on hosts: $FSL_MACHINE_LIST"
echo "processing data on hosts: $FSLMACHINELIST"
for machine in $FSL_MACHINE_LIST; do
for machine in $FSLMACHINELIST; do
$FSL_REMOTE_CALL$machine"if [ -r /etc/fslconf/fsl.sh ];then . /etc/fslconf/fsl.sh; elif [ -r /usr/local/etc/fslconf/fsl.sh ];then . /usr/local/etc/fslconf/fsl.sh; elif [ -r \${HOME}/.fslconf/fsl.sh ]; then . \${HOME}/.fslconf/fsl.sh; fi; if [ x\${FSLDIR} != "x" ];then \${FSLDIR}/bin/bedpost_proc $subjdir$nslices${subjdir}.bedpost/logs/pid_${$}; else echo FSLDIR not set in any default location on machine `hostname`;fi" &
$FSLREMOTECALL$machine"if [ -r /usr/local/etc/fslconf/fsl.sh ];then . /usr/local/etc/fslconf/fsl.sh;fi; if [ -r /etc/fslconf/fsl.sh ];then . /etc/fslconf/fsl.sh;fi; if [ -r \${HOME}/.fslconf/fsl.sh ]; then . \${HOME}/.fslconf/fsl.sh; fi; if [ x\${FSLDIR} != "x" ];then \${FSLDIR}/bin/bedpost_proc $subjdir$nslices${subjdir}.bedpost/logs/pid_${$}; else echo FSLDIR not set in any default location on machine `hostname`;fi" &
$FSL_REMOTE_CALL$machine"if [ -r /etc/fslconf/fsl.sh ];then . /etc/fslconf/fsl.sh; elif [ -r /usr/local/etc/fslconf/fsl.sh ];then . /usr/local/etc/fslconf/fsl.sh; elif [ -r \${HOME}/.fslconf/fsl.sh ]; then . \${HOME}/.fslconf/fsl.sh; fi; if [ x\${FSLDIR} != "x" ];then \${FSLDIR}/bin/bedpost_kill_all; else echo FSLDIR not set in any default location on machine `hostname`;fi" &
$FSLREMOTECALL$machine"if [ -r /usr/local/etc/fslconf/fsl.sh ];then . /usr/local/etc/fslconf/fsl.sh;fi; if [ -r /etc/fslconf/fsl.sh ];then . /etc/fslconf/fsl.sh;fi; if [ -r \${HOME}/.fslconf/fsl.sh ]; then . \${HOME}/.fslconf/fsl.sh; fi; if [ x\${FSLDIR} != "x" ];then \${FSLDIR}/bin/bedpost_kill_all; else echo FSLDIR not set in any default location on machine `hostname`;fi" &
cout<<"tracking mode - Options are:\n\n simple (default)\n Input is text file defining start point.\n Output is dti space volume with connectivity values at each voxel.\n Note-everything in simple mode is in\n diffusion space.\n\n seeds_to_targets\n Inputs are a volume with ones at all seed points\n (requires a matrix taking it to DTI space (--xfm))\n and a text file with the name of a single target mask\n on each new line (--targetmasks).\n Output is a single volume for each target mask where the value of each\n volume within the seed mask corresponds to the number of particles \n seeded from this voxel reaching this target mask.\n\n seedmask\n Input is a volume with ones at all seed points\n (requires a matrix taking it to DTI space (--xfm))\n Output is seed space volume with connectivity values at each voxel\n summed from every seed.\n\n twomasks_symm\n Input is a binary volume for first mask (-x)\n also requires a binary volume for second mask (--mask2)\n (requires a matrix taking both seeds to DTI space (--xfm))\n Output is the sum of all paths the from first mask which pass\n through the second and vice-versa i.e. only paths\n which pass through both masks are retained.\n\n waypoints\n Input is a binary volume for seed mask (-x)\n also requires a binary waypoint mask or ascii list\n of waypoint masks (--mask2)\n (requires a matrix taking both seeds to DTI space (--xfm))\n Output is a volume containing all the paths from the\n seedmask which pass through ALL of the waypoint masks. \n\n matrix1\n Input is a volume with ones at all seed points\n (requires a matrix taking it to DTI space (--xfm))\n Output is an avw format nseeds x nseeds matrix \n where element ij contains the number of particles leaving seed \n voxel i and passing through seed voxel j. \n Second output is an nsees x 3 matrix containing the \n anatomical locations in Seed space of each matrix node.\n\n matrix2\n Inputs are a volume with ones at all seed points\n (requires a matrix taking it to DTI space (--xfm))\n and a low resolution binary mask in register with the\n seed volume (--lrmask)\n Output is a matrix of size nseeds x nlowres \n which contains the connectivity distributions from every seed voxel.\n Auxiliary outputs are index matrices for each axis \n of this matrix containing the anatomical location of each\n node in seed space (x-axis) and low res space (y-axis)\n\n maskmatrix\n Input is volume with integers in each seed location\n Integer values distinguish different clusters\n (e.g. output of Feat clustering)\n (requires a matrix taking it to DTI space (--xfm))\n Output is two matrices whose ij^th element is the\n mean and max number of particles seeded from cluster i which pass \n through cluster j\n"<<endl;
cout<<"tracking mode - Options are:\n\n simple (default)\n Input is text file defining start point.\n Output is dti space volume with connectivity values at each voxel.\n Note-everything in simple mode is in\n diffusion space.\n\n seeds_to_targets\n Inputs are a volume with ones at all seed points\n (requires a matrix taking it to DTI space (--xfm))\n and a text file with the name of a single target mask\n on each new line (--targetmasks).\n Output is a single volume for each target mask where the value of each\n volume within the seed mask corresponds to the number of particles \n seeded from this voxel reaching this target mask.\n\n seedmask\n Input is a volume with ones at all seed points\n (requires a matrix taking it to DTI space (--xfm))\n Output is seed space volume with connectivity values at each voxel\n summed from every seed.\n\n twomasks_symm\n Input is a binary volume for first mask (-x)\n also requires a binary volume for second mask (--mask2)\n (requires a matrix taking both seeds to DTI space (--xfm))\n Output is the sum of all paths the from first mask which pass\n through the second and vice-versa i.e. only paths\n which pass through both masks are retained.\n\n waypoints\n Input is a binary volume for seed mask (-x)\n also requires a binary waypoint mask or ascii list\n of waypoint masks (--mask2)\n (requires a matrix taking both seeds to DTI space (--xfm))\n Output is a volume containing all the paths from the\n seedmask which pass through ALL of the waypoint masks.\n"<<endl;
}
if(getenv("FSLINFMRIB"))
matrixmodehelp();
}
voidprobtrackOptions::matrixmodehelp(){
cout<<" matrix1\n Input is a volume with ones at all seed points\n (requires a matrix taking it to DTI space (--xfm))\n Output is an avw format nseeds x nseeds matrix \n where element ij contains the number of particles leaving seed \n voxel i and passing through seed voxel j. \n Second output is an nsees x 3 matrix containing the \n anatomical locations in Seed space of each matrix node.\n\n matrix2\n Inputs are a volume with ones at all seed points\n (requires a matrix taking it to DTI space (--xfm))\n and a low resolution binary mask in register with the\n seed volume (--lrmask)\n Output is a matrix of size nseeds x nlowres \n which contains the connectivity distributions from every seed voxel.\n Auxiliary outputs are index matrices for each axis \n of this matrix containing the anatomical location of each\n node in seed space (x-axis) and low res space (y-axis)\n\n maskmatrix\n Input is volume with integers in each seed location\n Integer values distinguish different clusters\n (e.g. output of Feat clustering)\n (requires a matrix taking it to DTI space (--xfm))\n Output is two matrices whose ij^th element is the\n mean and max number of particles seeded from cluster i which pass \n through cluster j\n"<<endl;