Ah - I think I've finally understood what Stella's asking - sorry it's
taken so long! The problem is that renderhighres isn't happy about an
image called "highres" not existing - and didn't give a useful error
message to this effect....
In any case, the GUI and script were a bit limited as they were - so we've
just re-written the GUI and the script to both be more useful and solve
your issue - the output is now created in an "hr" subdirectory in the FEAT
output directory. Don't forget that FEAT and this new GUI thinks that your
structural image is the "standard" image.
So - save the two attached files, and:
chmod a+x renderhighres
cp renderhighres ${FSLDIR}/bin
cp renderhighres.tcl ${FSLDIR}/tcl
Hopefully that should work!
On Fri, 29 Jul 2005, Mark Jenkinson wrote:
> Hi Stella,
>
> I didn't realise you were using the command line version of
> renderhighres. In that case you want to use both the -tal
> and -keep options. If you use the GUI, then select the
> button that I suggested before.
>
> All the best,
> Mark
>
>
> On 28 Jul 2005, at 22:45, Stella de Bode wrote:
>
> > I do use -keep, Stephen. <Renderhighres> will not run at all for me
> > after i do Feat with registration on the subject's HR only (in
> > "standard" space), no Initial/Main images. I wonder what i can do to
> > renderhighres. Thanks
> > S
> >
> >
> > On Jul 28, 2005, at 5:16 PM, Stephen Smith wrote:
> >
> >> Hi - I'm not quite sure what you're asking here - is it just that you
> >> need
> >> the -keep option so that the 3D files don't get cleaned up after the
> >> GIF
> >> images are made?
> >>
> >> Cheers.
> >>
> >> On Thu, 28 Jul 2005, Stella de Bode wrote:
> >>
> >>> Sorry. I am still stuck with <renderhighres> function. After I run
> >>> FEAT with all suggested changes "Do rendering in Tal. splace" and no
> >>> search and the subject's HR instead of standard (and decent
> >>> registration as a result), I still cannot run renderhighres file.feat
> >>> z-min z-max. I am lacking hr_thresh_zstat files, i think this is the
> >>> problem, but i am not sure how to fix it. I think, somebody during
> >>> class suggested that i should concurrently run registration on
> >>> example_func to produce this hr file, but I am not sure how to do it.
> >>> Sorry, thank you!
> >>> On Jul 28, 2005, at 11:52 AM, Christian Beckmann wrote:
> >>>
> >>>> sorry, it's the bottom right corner of the main gui - I mixed up
> >>>> left
> >>>> and right, guess I've been driving in england for too long ;)
> >>>> christian
> >>>>
> >>>>
> >>>> On 28 Jul 2005, at 16:29, Stella de Bode wrote:
> >>>>
> >>>>> Thank you, Mark. This button you are talking about, "rendering in
> >>>>> Tal. space>, where is it? I usually enter <renderhighres> as a
> >>>>> command line and i don't see it under FSL bar. Sorry, it's,
> >>>>> probably, obvious.
> >>>>> Thank you very much. Stella
> >>>>> On Jul 27, 2005, at 9:20 AM, Mark Jenkinson wrote:
> >>>>>
> >>>>>
> >>>>>> Hi Stella,
> >>>>>>
> >>>>>> Glad you enjoyed the course.
> >>>>>>
> >>>>>> I'm also glad that the registrations are working with the no
> >>>>>> search
> >>>>>> option.
> >>>>>> I assume you are now using the individual's structural image as
> >>>>>> the
> >>>>>> "standard" image in the feat registration setup. If this is the
> >>>>>> case then
> >>>>>> you also need to ask renderhighres to render into the "standard"
> >>>>>> space,
> >>>>>> rather than into highres space. You can do this by selecting the
> >>>>>> "Do rendering in Talairach space instead of original high res
> >>>>>> space"
> >>>>>> button
> >>>>>> in the GUI. Rest assured that in your case it won't do the
> >>>>>> rendering in
> >>>>>> actual Talairach space, as it uses whatever image you've put as
> >>>>>> the
> >>>>>> "standard"
> >>>>>> for its definition of "Talairach" space (which in your case will
> >>>>>> be
> >>>>>> the
> >>>>>> individual's structural).
> >>>>>>
> >>>>>> I hope that fixes the problem.
> >>>>>> Let us know if this doesn't work or you need help with another
> >>>>>> aspect of
> >>>>>> the registration work.
> >>>>>>
> >>>>>> All the best,
> >>>>>> Mark
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> stella de Bode wrote:
> >>>>>>
> >>>>>>
> >>>>>>> Thanks for an excellent class! I would like to follow up with
> >>>>>>> Mark
> >>>>>>> re performing registration when a lesion is half a brain. When i
> >>>>>>> follow Mark's suggestion and register it with "No Search" using
> >>>>>>> the
> >>>>>>> patient;s high-res instead of a standard, the registration works
> >>>>>>> smoothly. But I cannot run <renderhighres> then, i need to
> >>>>>>> somehow
> >>>>>>> input a functional scan as initial. I am not sure how to reach
> >>>>>>> the stage when both registration is correct and rendehighres is
> >>>>>>> possible. Thank you so much! Stella
> >>>>>>>
> >>>>>
> >>>>
> >>>> --
> >>>> Christian F. Beckmann
> >>>> Oxford University Centre for Functional
> >>>> Magnetic Resonance Imaging of the Brain,
> >>>> John Radcliffe Hospital, Headington, Oxford OX3 9DU, UK
> >>>> Email: [log in to unmask] -
> >>>> http://www.fmrib.ox.ac.uk/~beckmann/
> >>>> Phone: +44(0)1865 222782 Fax: +44(0)1865 222717
> >>>
> >>
> >> --
> >> Stephen M. Smith DPhil
> >> Associate Director, FMRIB and Analysis Research Coordinator
> >>
> >> Oxford University Centre for Functional MRI of the Brain
> >> John Radcliffe Hospital, Headington, Oxford OX3 9DU, UK
> >> +44 (0) 1865 222726 (fax 222717)
> >>
> >> [log in to unmask] http://www.fmrib.ox.ac.uk/~steve
>
--
Stephen M. Smith DPhil
Associate Director, FMRIB and Analysis Research Coordinator
Oxford University Centre for Functional MRI of the Brain
John Radcliffe Hospital, Headington, Oxford OX3 9DU, UK
+44 (0) 1865 222726 (fax 222717)
[log in to unmask] http://www.fmrib.ox.ac.uk/~steve
#!/bin/sh
# renderhighres - put activation results on the highres image
#
# Stephen Smith and Mark Jenkinson, FMRIB Image Analysis Group
#
# Copyright (C) 1999-2005 University of Oxford
#
# SHCOPYRIGHT
Usage() {
echo "Usage: renderhighres <feat_directory> <space> <background> <autothresh> [minZ maxZ]"
echo "<space>: either highres or standard"
echo "<background>: either highres or standard"
echo "<autothresh>: either 0 or 1 (colour-code using existing post-threshold range? If 0 then minZ and maxZ are used)"
echo ""
exit
}
[ "$4" = "" ] && Usage
[ "$4" = "0" -a "$6" = "" ] && Usage
cd $1
space=$2
background=$3
autothresh=$4
if [ `${FSLDIR}/bin/imtest reg/$space` != 1 ] ; then
echo "Can't use $space for output space - doesn't exist in the FEAT registration output"
exit
fi
if [ `${FSLDIR}/bin/imtest reg/$background` != 1 ] ; then
echo "Can't use $background for background image - doesn't exist in the FEAT registration output"
exit
fi
/bin/rm -rf hr
mkdir hr
cd hr
if [ $background != $space ] ; then
${FSLDIR}/bin/flirt -in ../reg/$background -out background -ref ../reg/$space -applyxfm -init ../reg/${background}2${space}.mat -interp sinc -sincwidth 7 -sincwindow hanning
else
${FSLDIR}/bin/imln ../reg/$space background
fi
for f in `cd .. ; ${FSLDIR}/bin/imglob -oneperimage thresh_*.*` ; do
f=`${FSLDIR}/bin/remove_ext $f`
${FSLDIR}/bin/flirt -in ../$f -out $f -ref ../reg/$space -applyxfm -init ../reg/example_func2${space}.mat -interp sinc -sincwidth 7 -sincwindow hanning
if [ $autothresh = 1 ] ; then
minZ=`${FSLDIR}/bin/avwstats++ ../$f -l 0.01 -R | awk '{print $1}'`
maxZ=`${FSLDIR}/bin/avwstats++ ../$f -R | awk '{print $2}'`
else
minZ=$5
maxZ=$6
fi
${FSLDIR}/bin/overlay 1 1 background -a $f $minZ $maxZ rendered_$f
${FSLDIR}/bin/slicer rendered_$f -S 2 900 rendered_${f}.png
done
|