That link works for me, but I've attached rtview to this email just in case.
doug

On 06/04/2012 11:03 AM, Michael Bannert wrote:
Dear freesurfer community,

I tried to download rtview but it didn't work. I used the following URL: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/rtview

... as described here: http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg21560.html

I need this function to interpret retinotopic mapping data. I followed the instructions for running retinotopic mapping using Freesurfer 5 I found here ( https://surfer.nmr.mgh.harvard.edu/fswiki/FsFastIndividualRetinotopyAnalysis ) and everything seems to work fine but I find it hard to interpret the results and to determine the boundaries between visual areas.

Could you please tell me where the file can be found? (Or is there a more elegant way to get a nice color wheel in Freesurfer 5?)

Thank you very much!
Michael

PS: The URL for the FsFast tutorial data still seems to be incorrect as well. See also http://www.mail-archive.com/freesurfer@nmr.mgh.harvard.edu/msg23019.html

--
Michael Bannert, Dipl.-Psych.
Vision & Cognition Lab, Centre for Integrative Neuroscience, Univ. of Tübingen & BCCN Tübingen
Otfried-Müller-Str. 25, 72076 Tübingen, Germany
Phone: +49 - (0)7071 / 29 - 89031





_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

--
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: www.nmr.mgh.harvard.edu/facility/filedrop/index.html

#!/bin/tcsh -f
# rtview

set VERSION = '$Id$';

set srcsubject = ();
set trgsubject = ();
set realvol = ();
set imagvol = ();
set hemi = ();
set regfile = ();
set hfile = ();
set stimtype = ();

set tmpdir = ();
set cleanup = 1;
set LF = ();

set tclcmd0 = $FREESURFER_HOME/lib/tcl/twocond-views.tcl

set inputargs = ($argv);
set PrintHelp = 0;

if($#argv == 0) goto usage_exit;
set n = `echo $argv | grep -e -help | wc -l` 
if($n != 0) then
  set PrintHelp = 1;
  goto usage_exit;
endif
set n = `echo $argv | grep -e -version | wc -l` 
if($n != 0) then
  echo $VERSION
  exit 0;
endif

goto parse_args;
parse_args_return:

goto check_params;
check_params_return:

if($#hfile) then
  set srcdir = `dirname $hfile`
else
  set srcdir = `dirname $realvol`
endif
if($#tmpdir == 0) set tmpdir = $srcdir/tmpdir.rtview
mkdir -p $tmpdir

if($#LF == 0) set LF = $tmpdir/rtview.log
if($LF != /dev/null) rm -f $LF
echo "Log file for rtview" >> $LF
date  | tee -a $LF
echo "" | tee -a $LF
echo "setenv SUBJECTS_DIR $SUBJECTS_DIR" | tee -a $LF
echo "cd `pwd`"  | tee -a $LF
echo $0 $inputargs | tee -a $LF
echo "" | tee -a $LF
uname -a  | tee -a $LF

set tkimagvol = $tmpdir/tkimag.mgh
set tkrealvol = $tmpdir/tkreal.mgh
rm -f $tkimagvol $tkrealvol
if($#hfile) then
  set imagvol = $tmpdir/imag.mgh
  set realvol = $tmpdir/real.mgh
  mri_convert $hfile --frame 1 $tkimagvol; # 2nd frame
  if($status) exit 1;
  mri_convert $hfile --frame 2 $tkrealvol; # 3rd frame
  if($status) exit 1;
endif
if(! -e $tkimagvol) then
  # Multiply by fsig because that is what 
  mris_calc -o $tkimagvol $fsigvol mul $imagvol
  if($status) exit 1;
  mris_calc -o $tkrealvol $fsigvol mul $realvol
  if($status) exit 1;
endif

foreach cmpx (real imag)
  set cmpxvol = $tmpdir/tk"$cmpx".mgh
  if($#regfile) then
    # Input is a volume, use vol2surf
    set cmpxmgh = $tmpdir/map-$cmpx-$hemi.mgh
    mri_vol2surf --reg $regfile --mov $cmpxvol --hemi $hemi --o $cmpxmgh \
       --mapmethod nnf
    if($status) exit 1;
  else
    set cmpxmgh = $cmpxvol
  endif
  # Convert to wfile (and maybe change subjects)
  set cmpxw = $tmpdir/map-$cmpx-$hemi.w
  mri_surf2surf --hemi $hemi --sval $cmpxmgh --tval $cmpxw \
   --tfmt paint --srcsubject $srcsubject --trgsubject $trgsubject 
  if($status) exit 1;
end

#mri_fieldsign --eccen eccen/lh.real.mgh eccen/lh.imag.mgh \
#--polar polar/lh.real.mgh polar/lh.imag.mgh \
# --fs lh.fieldsign.mgh --s els --hemi lh --sphere --old --fwhm 10

setenv angle_offset 0
setenv revpolarflag 0
unsetenv flatzrot 
unsetenv flatscale 
unsetenv statflag 
unsetenv statname
setenv colscale 0
unsetenv colscalebarflag 
#setenv eccendir eccen
#setenv polardir polar
setenv floatstem map
setenv realname    -real; # map-real-?h.w
setenv complexname -imag; # map-imag-?h.w
setenv fthresh 0.4
setenv fslope 1.3
setenv fmid 0.8
setenv offset 0.4; # for gray scale
setenv hemi $hemi
setenv curv $hemi.curv
setenv nosave 1
setenv noexit
setenv dir $tmpdir
setenv polardir $tmpdir
setenv eccendir $tmpdir
setenv smoothsteps 2

#set tclcmd = $tmpdir/rtview.tcl
#rm -f $tclcmd
#echo "set noexit 1" >> $tclcmd
#cat $tclcmd0  >> $tclcmd
#echo "set dir $tmpdir" >> $tclcmd
#echo "set floatstem map" >> $tclcmd

set tclcmd = $FREESURFER_HOME/lib/tcl/$stimtype-views.tcl

set cmd = (tksurfer $subject $hemi inflated -aparc -tcl $tclcmd)
echo $cmd
$cmd

if($cleanup) rm -f $tmpdir

exit 0

###############################################

############--------------##################
parse_args:
set cmdline = ($argv);
while( $#argv != 0 )

  set flag = $argv[1]; shift;
  
  switch($flag)

    case "--s":
      if($#argv < 1) goto arg1err;
      set trgsubject = $argv[1]; shift;
      set srcsubject = $trgsubject;
      breaksw

    case "--reg":
      if($#argv < 1) goto arg1err;
      set regfile = $argv[1]; shift;
      if(! -e $regfile) then
        echo "ERROR: cannot find $regfile"
        exit 1;
      endif
      set srcsubject = `head -n 1 $regfile`
      breaksw

    case "--r":
    case "--real":
      if($#argv < 1) goto arg1err;
      set realvol = $argv[1]; shift;
      if(! -e $realvol) then
        echo "ERROR: cannot find $realvol"
        exit 1;
      endif
      breaksw
      breaksw

    case "--i":
    case "--imag":
      if($#argv < 1) goto arg1err;
      set imagvol = $argv[1]; shift;
      if(! -e $imagvol) then
        echo "ERROR: cannot find $imagvol"
        exit 1;
      endif
      breaksw

    case "--fsig":
      if($#argv < 1) goto arg1err;
      set fsigvol = $argv[1]; shift;
      if(! -e $fsigvol) then
        echo "ERROR: cannot find $fsigvol"
        exit 1;
      endif
      breaksw

    case "--h":
      if($#argv < 1) goto arg1err;
      set hfile = $argv[1]; shift;
      if(! -e $hfile) then
        echo "ERROR: cannot find $hfile"
        exit 1;
      endif
      breaksw

    case "--hemi":
      if($#argv < 1) goto arg1err;
      set hemi = $argv[1]; shift;
      breaksw

    case "--lh":
      set hemi = lh;
      breaksw

    case "--rh":
      set hemi = rh;
      breaksw

    case "--log":
      if($#argv < 1) goto arg1err;
      set LF = $argv[1]; shift;
      breaksw

    case "--nolog":
    case "--no-log":
      set LF = /dev/null
      breaksw

    case "--tmpdir":
      if($#argv < 1) goto arg1err;
      set tmpdir = $argv[1]; shift;
      set cleanup = 0;
      breaksw

    case "--no-cleanup":
    case "--nocleanup":
      set cleanup = 0;
      breaksw

    case "--polar":
      set stimtype = polar
      breaksw

    case "--eccen":
      set stimtype = eccen
      breaksw

    case "--cleanup":
      set cleanup = 1;
      breaksw

    case "--debug":
      set verbose = 1;
      set echo = 1;
      breaksw

    default:
      echo ERROR: Flag $flag unrecognized. 
      echo $cmdline
      exit 1
      breaksw
  endsw

end

goto parse_args_return;
############--------------##################

############--------------##################
check_params:

if($#stimtype == 0) then
  echo "ERROR: must --eccen or --polar"
  exit 1;
endif

if($#trgsubject == 0) set trgsubject = $srcsubject
if($#trgsubject == 0) then
  echo "ERROR: must spec subject or reg"
  exit 1;
endif
foreach subject ($srcsubject $trgsubject)
  if(! -e $SUBJECTS_DIR/$subject) then
    echo "ERROR: cannot find $subject"
    exit 1;
  endif
end
if($#hemi == 0) then
  echo "ERROR: must spec hemi"
  exit 1;
endif
if($#fsigvol == 0) then
  echo "ERROR: must spec fsigvol"
  exit 1;
endif
if($#realvol == 0) then
  echo "ERROR: must spec real vol"
  exit 1;
endif
if($#imagvol == 0) then
  echo "ERROR: must spec imag vol"
  exit 1;
endif
if(0 && $#hfile == 0) then
  echo "ERROR: must spec hfile"
  exit 1;
endif

goto check_params_return;
############--------------##################

############--------------##################
arg1err:
  echo "ERROR: flag $flag requires one argument"
  exit 1
############--------------##################

############--------------##################
usage_exit:
  echo ""
  echo "rtview"
  echo ""
  echo "  --s subject : subject to use as display"
  echo "  --hemi hemi, --lh, --rh"
  echo "  --eccen or --polar"
  echo "  --real real : real (cosine) values"
  echo "  --imag imag : imaginary (sine) values"
  echo "  --fsig fsig : significances"
  echo ""
  echo "  --reg regfile  : for when real/imag/fsig are volumes "
  echo ""
  echo "  --no-cleanup : don't delete tmp dir"
  echo ""
#  echo "  --src srcsubject : map to this subject"
#  echo "   --h hfile : eg, eccen/h.nii"
#  echo ""

  if(! $PrintHelp) exit 1;

  echo $VERSION

  cat $0 | awk 'BEGIN{prt=0}{if(prt) print $0; if($1 == "BEGINHELP") prt = 1 }'

exit 1;


#---- Everything below here is printed out as part of help -----#
BEGINHELP

View FSFAST version 5 retinotopy data using the color wheel. This is a
front-end for tksurfer. It sets up the environment for using the
color wheel.

The source data (real/imaginary/fsig) can be either in the volume or
the surface.  If in the volume, then you need to supply a registration
file with --reg (and no need to supply a subject name with --s).

For displaying data already on the surface:

cd sess/bold/rtopy.lh
 rtview --s subject --lh --eccen \
   --real eccen/real.nii --imag eccen/imag.nii --fsig eccen/fsig.nii
 rtview --s subject --lh --polar \
   --real polar/real.nii --imag polar/imag.nii --fsig polar/fsig.nii

For displaying in the native volume:

cd sess/bold/rtopy.native
 rtview --reg ../register.dof6.dat --lh --eccen \
   --real eccen/real.nii --imag eccen/imag.nii --fsig eccen/fsig.nii
 rtview --reg ../register.dof6.dat --lh --polar \
   --real polar/real.nii --imag polar/imag.nii --fsig polar/fsig.nii


_______________________________________________
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.

Reply via email to