Thanks Doug and Bruce,

Fscalc is great because I can do maths with multiple inputs, like a mean.  I’m 
noticing, however, that when I do a mean with fscalc I get different values 
than when I do the mean in Matlab, any idea why?  In some regions the 
differences are as much as 5-10% so I don’t think it’s just a 
rounding/precision issue.

fscalc a.mgh add b.mgh add c.mgh add d.mgh add e.mgh div 5 --odt float --o 
mean.mgh

Hard to imagine it’s an order of operations issue, but I am a little confused 
about how fscalc handles order of operations from the help page.

I’m using v5.3.0 and Matlab 2014b

Thanks,
Jared

From: <freesurfer-boun...@nmr.mgh.harvard.edu> on behalf of Douglas Greve 
<gr...@nmr.mgh.harvard.edu>
Reply-To: Freesurfer support list <freesurfer@nmr.mgh.harvard.edu>
Date: Friday, February 16, 2018 at 11:31 AM
To: "freesurfer@nmr.mgh.harvard.edu" <freesurfer@nmr.mgh.harvard.edu>
Subject: Re: [Freesurfer] Freesurfer equivalent to fslmaths?


Or fscalc

On 2/16/18 11:22 AM, Bruce Fischl wrote:
Hi Jared

I think mris_calc does at least some of what you want.

cheers
Bruce
On Fri, 16 Feb 2018, Zimmerman, Jared wrote:



Hi all,



Is there an equivalent of fslmaths in Freesurfer?  I would like to add two 
scalar value images (.mgh
files) that are registered to the fsaverage6 surface but I’m not seeing an 
obvious way to do it.
Right now I’m reading the images into Matlab to add them, but this is a bit 
inconvenient because
what I would like to do is smooth an image by a small amount, add the original 
image back to it,
then smooth again marginally and iterate until I get to a target fwhm.  Since I 
can’t smooth inside
Matlab this necessitates writing out a temp image for each smoothing step then 
reading it back into
Matlab for the adding.  Obviously this is a solvable problem, but as someone 
only marginally
proficient in Matlab it’s something I’d like to avoid, plus it seems like a lot 
of I/O for this
task.



A little more detail on my data and what I’m trying to do:



The scalar images I’m working with are network confidence maps, basically like 
the spatial maps from
an ICA dual-regression.  I want to combine the confidence maps together into a 
hard partition and
write it to an annot file, but I want to smooth them first.  I’m concerned, 
however, that smoothing
is going to bias the parcellation against small network parcels and in favor of 
large network
parcels because in each confidence map the small parcels will be surrounded by 
lots of zeros (does
this make sense?).  To correct for this, my idea was to iteratively smooth by 
small amounts and to
add the original confidence values (or some fraction of them) back to the 
smoothed map after each
iteration so that regions of high confidence with a small/narrow spatial spread 
do not become
diluted by the smoothing and don’t get taken over by larger high confidence 
regions in nearby
networks.



One final question would be how to smooth on a surface without resampling.  
Right now I’m using
mri_surf2surf and smoothing when I resample to the native mesh, but if I take 
the above approach I
would not want to resample at each smoothing step.  Could I just use 
mri_surf2surf with –srcsubject
and –trgsubject pointing to the same subject?





Thanks,

Jared

____________________________

Jared P. Zimmerman

jar...@pennmedicine.upenn.edu<mailto:jar...@pennmedicine.upenn.edu>

Neuroscience Graduate Student

Oathes Lab

University of Pennsylvania










_______________________________________________

Freesurfer mailing list

Freesurfer@nmr.mgh.harvard.edu<mailto:Freesurfer@nmr.mgh.harvard.edu>

https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


_______________________________________________
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