[Freesurfer] Using PD Scans for Inhomogeneity Correction

2020-05-21 Thread Tali Weiss
External Email - Use Caution

Dear all,

1. BV have a tool:

https://www.brainvoyager.com/bv/doc/UsersGuide/HighResDataAnalysis/UsingPDScansForInhomogeneityCorrection.html

Is freesurfer have something similar for MPRAGE (i use recon-all)


2.Is PD is suitable also to correct MP2RAGE on 7T?

My resolution 1mm, I use recon-all.v6.hires (freesurfer/6.0.0-patch/hcp/)

Still, the segmentation in the inferior temporal and frontal pole are very 
bad...

Is it make sense to use PD in MP2RAGE sequence?


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

[Freesurfer] question on partial volume correction

2020-05-21 Thread Barletta, Valeria
Dear Freesurfers,
We need to analyze PET data after correcting for partial volume effect in the 
cortex, white matter and subarachnoid space. Is Freesurfer's partial volume 
correction working on all these areas or only the grey matter volume and 
surface? Is there a way to use gtmseg on the white matter and outside the pial 
surface?

Thanks a lot,

Valeria Barletta, MD
Massachusetts General Hospital
149 13th Street, Charlestown MA 02129
(617)-724-8823
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] mris_register intermediate results display

2020-05-21 Thread Chris Adamson
External Email - Use Caution

Freesurfer devs,

Apologies if this has already been asked. I'm looking for a way that I can look 
at the progress of mris_register to investigate the accuracy of registration. 
Given that the registration is done on the 2D parameterisations of the 
curvature maps, how can I take a spherical surface and write out a tif file 
with the curvature maps of the surface that I'm registering and the target 
surface. I presume I need to use mrisp_write but it is unclear how I choose the 
curvature map to write in the image.

Thanks in advance,

Chris.

Dr Chris Adamson
Senior Research Officer, Developmental Imaging, Clinical Sciences (0.3 EFT)
Software Engineer, Cardiovascular Research (0.7 EFT)

Murdoch Childrens Research Institute
The Royal Children's Hospital
Flemington Road, Parkville, VIC 3052 Australia
E chris.adam...@mcri.edu.au
www.mcri.edu.au

Disclaimer

This e-mail and any attachments to it (the "Communication") are, unless 
otherwise stated, confidential, may contain copyright material and is for the 
use only of the intended recipient. If you receive the Communication in error, 
please notify the sender immediately by return e-mail, delete the Communication 
and the return e-mail, and do not read, copy, retransmit or otherwise deal with 
it. Any views expressed in the Communication are those of the individual sender 
only, unless expressly stated to be those of Murdoch Children’s Research 
Institute (MCRI) ABN 21 006 566 972 or any of its related entities. MCRI does 
not accept liability in connection with the integrity of or errors in the 
Communication, computer virus, data corruption, interference or delay arising 
from or in respect of the Communication.
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Rescale question in PETsurfer

2020-05-21 Thread Vicky Shi
External Email - Use Caution

Hi Douglas,

Thank you so much for your quick response. That is what I am looking for.

By the way, I found another file,global.gmwm.dat, in aux. Is this file the
mean suv intensity for grey matter and white matter? Which ROIs does it
remove compare to global.gmwmcsf.dat? csf and ventricles?

Regards,
Vicky


On Wed, May 20, 2020 at 4:54 PM Douglas N. Greve 
wrote:

> Do you mean from the mri_gtmpvc command line? There is not. The value you
> want will be stored in aux/global.gmwmcsf.dat, so, once you had that value,
> you could rescale the values in the .dat file
>
> On 5/20/2020 3:33 PM, Vicky Shi wrote:
>
> External Email - Use Caution
> Dear Freesurfer experts,
>
> I am using gtm.stats.dat file generated by command mri_gtmpvc. I want it
> scaled by the mean intensity of whole brain. Is there an easy way to
> achieve this?
>
> Thank you in advance for your help.
>
> Best regards,
> Vicky
>
> ___
> Freesurfer mailing 
> listfreesur...@nmr.mgh.harvard.eduhttps://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
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] qdec and mris_anatomical_stats help

2020-05-21 Thread Douglas N. Greve



On 5/15/2020 8:17 PM, Lab of Autism and Developmental Neuroscience, Lab 
of Autism and Developmental Neuroscience wrote:


External Email - Use Caution

Dear Freesurfer experts,

Hope everyone is doing well! Could someone please clarify some things 
about mris_anatomical_stats, done after running qdec + mapping label 
to all subjects?

From what I can  understand, the following code should be used:

mris_anatomical_stats -l lh.supramarg.label \
  -t lh.thickness -b -f 004/stats/lh.supramarg.stats 004 lh

But if I created the ".label" file directly on qdec, by "mapping label 
to all subjects", and didn't use the mri_label2label code for "target 
subjects", how should I work around this to perform 
mris_anatomical_stat correctly?
Sorry, it's been about 10 years since I used qdec and don't remember 
what the "mapping label to all subjects" does. My guess is that it is 
using mri_label2label to create labels for each subject. You can copy 
those labels into the label folder for each subject, then use 
mris_anatomical_stats
Also, I'm confused on when + where this "lh.thickness" file is created 
and stored.

This is created by recon-all. You can find it in subject/surf/lh.thickness

Please let me know if you need any other information about my code or 
my qdec output.


Thank you,
Alex Job Said

___
Freesurfer mailing list
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

Re: [Freesurfer] question on partial volume correction

2020-05-21 Thread Douglas N. Greve
It will certainly do cortex. We do not have a segmentation for 
subarachnoid spaces. Or are you just talking about extra cerebral CSF? 
We do have a segmentation for xCSF, but it is not the most beautiful 
thing in the world. For WM, the GTM will give you a PVC corrected value 
for the entire lh and rh cerebral WM (and cerebellar) segments. Is that 
all you need?


On 5/19/2020 11:36 AM, Barletta, Valeria wrote:

Dear Freesurfers,
We need to analyze PET data after correcting for partial volume effect 
in the cortex, white matter and subarachnoid space. Is Freesurfer's 
partial volume correction working on all these areas or only the grey 
matter volume and surface? Is there a way to use gtmseg on the white 
matter and outside the pial surface?


Thanks a lot,

Valeria Barletta, MD
Massachusetts General Hospital
149 13th Street, Charlestown MA 02129
(617)-724-8823

___
Freesurfer mailing list
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

Re: [Freesurfer] Volume timeseries to native and fsaverage

2020-05-21 Thread Douglas N. Greve
I'm still confused as to what you are trying to do. If you just want to 
sample your data onto the surface, then you do not need to resample it 
at all. You just run mri_vol2surf with the appropriate registration and 
projection fraction. If I'm misunderstanding, please clarify.


On 5/19/2020 4:27 PM, özenç taşkın wrote:


External Email - Use Caution

Hi Doug,

I think I might have some gaps in my knowledge regarding the type of 
surface spaces Freesurfer uses and can produce, so I wanted to make 
sure that I got everything right. So my belief is that Freesurfer has 
the conformed surfaces which represent subjects' native topography, 
but they are built from the isotropic version of the images (orig.mgz) 
and these are actually the default outputs of Freesurfer. Then, we can 
produce the native space surfaces in the native T1 resolution which 
follows the original xyz coordinates by following the commands 
mentioned on the FSAnat to NativeAnat page using the rawavg.mgz. 
Finally, we have the standard template spaces such as fsaverage which 
the spheres that are created from the conformed surfaces are 
registered to.


One thing I forgot to mention about the data I have is that my EPI 
images are in the same space with my T1 images, but they keep their 
original resolution. Do I need to resample them in order to map them 
to any of these surface spaces ? If that is the case, I believe 
depending on the surface space I want to end up with I also should use 
different target images for this resampling. For instance, if I want 
to create maps in the conformed surfaces, I need to resample them to 
the resolution of my orig.mgz and for the native surfaces, I should 
use the rawavg.mgz. Am I right about all these ? If so, I think I now 
know how to approach this a little bit better.


Best,
Ozzy


*From:* freesurfer-boun...@nmr.mgh.harvard.edu 
 on behalf of Douglas N. Greve 


*Sent:* Monday, May 18, 2020 8:37 PM
*To:* freesurfer@nmr.mgh.harvard.edu 
*Subject:* Re: [Freesurfer] Volume timeseries to native and fsaverage
oh, if you want them in conformed space, they are already there

On 5/18/2020 11:34 AM, özenç taşkın wrote:


External Email - Use Caution

Awesome, thanks Doug. That's pretty helpful. I should also use the 
orig.mgz with tkregister2 instead of rawavg.mgz if the aim is to get 
surface maps in native space, am I right ? And by native space I mean 
the subjects' native brain structure and not necessarily the native 
xyz coordinates (I guess conformed space is the right term for this, 
but I am not sure).


Best,
Ozzy


*From:* freesurfer-boun...@nmr.mgh.harvard.edu 
 
 
 on behalf of Douglas 
N. Greve  

*Sent:* Wednesday, May 13, 2020 3:07 PM
*To:* freesurfer@nmr.mgh.harvard.edu 
 
 

*Subject:* Re: [Freesurfer] Volume timeseries to native and fsaverage


On 5/11/2020 5:53 PM, özenç taskin wrote:


External Email - Use Caution

Hello Freesurfer developers,

I am trying to map a 4D volumetric EPI image between different 
surfaces and I'd like a little bit of guidance as I am slightly 
confused about some of the outputs of freesurfer.


I have a preprocessed nifti EPI image in subject's anatomical space. 
First, I'd like to map this timeseries image to subject's native 
surface. Here is how I am currently doing this operation:


1 - Create a register.dat by using fsl identity matrix since I am 
already in the native space:


tkregister2_cmdl --mov  --fsl  --targ
 --noedit --reg 

This is ok, but unnecessary. You can use --regheader subject in 
mri_vol2surf below instead of --reg


2 - Then, using this register.dat to make surfaces from the 4D 
timeseries with:


mri_vol2surf --mov  --ref  --reg 
--hemi lh --o 


Add --projfrac 0.5 to sample in the middle of the ribbon.


I used these functions in the past to map statistical images to 
surface, but it might not be the right thing to do for timeseries in 
which case please let me know. Assuming this is correct though, next 
I want to move this native surface timeseries to fsaverage surface. 
I am pretty sure the calculations are in there, but I am not really 
sure which ones I need to use and with which freesurfer commands I 
can do this.
Time series are no different than a single frame. You can actually 
map directly to fsaverage in mri_vol2surf with --trgsubject fsaverage 
(or you can take the vol2surf output and run mri_surf2surf on it)


Lastly, I came across this freesurfer page 
https://surfer.nmr.mgh.harvard.edu/fswiki/FsAnat-to-NativeAnat which 
talks about fsaverage to native surface conversion and the examples 
there made me a bit confused. Aren't the surface f

Re: [Freesurfer] circular/cyclic color map for polar data in freeview

2020-05-21 Thread Douglas N. Greve

When you say it is "linear" do you mean it does not wrap-around?



On 5/19/2020 8:47 PM, Devavrat Vartak PhD wrote:


External Email - Use Caution

Hello freesurfer community,

I am trying to setup a retinotopy pipeline. I have analysed pRF data 
generating polar angle and eccentricity maps which I project onto an 
inflated surface / flattened surface in freeview.


Is there a way to display a circular/cyclic colour map (for the polar 
angle data) in the overlay screen?, the existing 'colour wheel' option 
seems to be linear?



Thank you!

Best,
DV



___
Freesurfer mailing list
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

Re: [Freesurfer] FREESURFER-7.1: recon-all exited with error "ERROR: cannot find or read transforms/talairach.m3z"

2020-05-21 Thread Douglas N. Greve

You can use these commands

From the linux command line,
Create the file you want to upload, eg,
cd $SUBJECTS_DIR
tar cvfz subject.tar.gz ./subject
Now log  into our anonymous FTP site:
ftp surfer.nmr.mgh.harvard.edu
It will ask you for a user name: use "anonymous" (no quotes)
It will ask you for a password: use "anonymous" (no quotes)
cd transfer/incoming
binary
put subject.tar.gz
Send an email that the file has been and the name of the file.



On 5/20/2020 12:08 AM, Bruce Fischl wrote:

Sure, send us a .nii volume that fails and we will take a look
Bruce


On May 19, 2020, at 11:38 PM, Safi Ullah .  wrote:



External Email - Use Caution

Thank You Sir,

Below is the header info of the volume, I read in Matlab.
"       srcbext: ''
    analyzehdr: []
          bhdr: []
           vol: [256×146×256 double]
      niftihdr: [1×1 struct]
         fspec: 'D:\FS_Shared\New 
folder\PPMI_3000_MR_sag_3D_FSPGR_BRAVO_straight__br_raw_20110322143431148_70_S102119_I224562.nii'

           pwd: 'D:\Safi\Parkinson'
    flip_angle: 0
            tr: 0
            te: 0
            ti: 0
      vox2ras0: [4×4 double]
       volsize: [256 146 256]
        height: 256
         width: 146
         depth: 256
       nframes: 1
       vox2ras: [4×4 double]
       nvoxels: 9568256
         xsize: 1.2000
         ysize: 1.
         zsize: 1.
           x_r: 0.9992
           x_a: 0.0283
           x_s: 0.0298
           y_r: -0.0204
           y_a: 0.9709
           y_s: -0.2386
           z_r: -0.0357
           z_a: 0.2378
           z_s: 0.9707
           c_r: 2.1796
           c_a: 7.4944
           c_s: -8.3277
      vox2ras1: [4×4 double]
           Mdc: [3×3 double]
        volres: [1. 1.2000 1.]
    tkrvox2ras: [4×4 double]"


So, the raw image size is 256x146x256
and voxal size is 1x1.2x1 mm
i downloaded as T1 (ticked button) from PPMI, and also visually looks ok

Regards,

Safi

On Wed, May 20, 2020 at 11:27 AM Douglas N. Greve 
mailto:dgr...@mgh.harvard.edu>> wrote:


Have you looked at the images? Are they T1-weighted? What is
their resolution?

On 5/19/2020 5:20 PM, Safi Ullah . wrote:


External Email - Use Caution

Thank you Sir,
I downloaded the volumes from PPMI, it is .nii,  it is whole
brain. Can I send you one sample volume?

On Wed, May 20, 2020, 12:33 AM Douglas N. Greve
mailto:dgr...@mgh.harvard.edu>> wrote:

It looks like mri_ca_register failed to create the m3z. If
this is failing on 13 subjects, then there is something
systematically wrong. What kind of input do you have? Eg,
MPRAGE? What is the resolution? Is it whole brain?

On 5/19/2020 11:17 AM, Safi Ullah . wrote:


External Email - Use Caution

Dear Freesurfer,

Using Freesurfer version 7.1, I was running recon-all on 13
subjects, using the command below
ls *.nii | parallel -jobs 8 recon-all -s {.} -I {} -all –qcache
(also checked with this one find . -name '*.nii' | parallel
-j 8 recon-all -s {.} -i {} -all -qcache)
but each time i face the same error as attached with the mail.
I checked the transformation folder, but the said
file, talairach.m3z, is not there.
the error is not same for all cases, some cases showed a
different errors, stating "IFLAG= -1  LINE SEARCH FAILED.
SEE DOCUMENTATION OF ROUTINE MCSRCH ERROR RETURN OF LINE
SEARCH:" as attached file recon-all(2nd type).log

Regards

___
Freesurfer mailing list
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


___
Freesurfer mailing list
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

___
Freesurfer mailing list
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


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

Re: [Freesurfer] the result of '1 -1' and '1 -1 0 0 0 0' are different

2020-05-21 Thread Douglas N. Greve
If I understand, you run two analyses, one with an FSGD file with only 
two classes and one where the FSGD file has the same two classes but you 
include two variables. You are doing the same test (group1-group2) and  
are wondering why the results are different.


They are different because you have different models. Eg, if age is a 
covariate, then it will remove effects of age that are in the first 
analysis. You will also have fewer degrees of freedom in the 2nd 
analysis. The differences may be large or small depending on how the 
covariates interact.


On 5/20/2020 5:37 AM, John wrote:


External Email - Use Caution

Hi friends,
(1) I have two groups, I set '1 -1' in .mtx file.
(2) I add two variables in the .fsgd file, and set '1 -1 0 0 0 0' in 
the corresponding .mtx file.
While, after run mris_preproc, mri_glmfit, I found the result of (1)  
and (2) are different. [e.g. freeview -f 
$SUBJECTS_DIR/fsaverage/surf/lh.inflated:overlay=sig.mgh]


I think the result of '1 -1' and '1 -1 0 0 0 0' will be same, right?

Thanks
John



___
Freesurfer mailing list
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

Re: [Freesurfer] -T2pial after white matter edits

2020-05-21 Thread Douglas N. Greve

You can just run
recon-all -s x autorecon2-wm -autorecon3 -T2pial

When you ran it the first time, your volT2.nii was copied into the 
subject's folder and will be used when the pial surface is placed when 
you include -T2pial



On 5/16/2020 1:12 PM, Octavian Lie wrote:


External Email - Use Caution

Dear Doug
Just to be clear

I  ran the 1st process on subject x with

recon-all -s x -T2 volT2.nii -T2pial

It still needed wm edits. On rerun, can I just do
recon-all -s x autorecon2-wm -autorecon3

or I need to reuse the T2 for best results

recon-all -s x autorecon2-wm -autorecon3  -T2 volT2.nii -T2pial

If so, can I obtain similar results with mri/orig/T2 raw.mgz instead 
of the volT2.nii input?

Thanks,
OL

On Mon, May 4, 2020 at 10:49 AM Douglas N. Greve 
mailto:dgr...@mgh.harvard.edu>> wrote:


Sorry, our interface is a little bit confusing on this. Use -T2 to
specify the T2 volume (eg, -T2 /path/to/T2.mgz). To apply the T2
to the pial use -T2pial (without any arguments)

On 5/2/2020 7:55 PM, Octavian Lie wrote:


External Email - Use Caution

Dear All,

I ran recon-all on the 1st run using the -T2pial flag. After
wm.mgz edits, when running
recon-all autorecon2-wm -autorecon3 -T2pial volT2.mgz
it throws an error ~ 'flag volT2.mgz not recognized'. When
reruning recon-all as above, do we need to include the T2pial
flag to make use of the t2 pial information? If not, is the
previous T2pial output used to regenerate the pia?
Thank you,
OL

___
Freesurfer mailing list
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


___
Freesurfer mailing list
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

Re: [Freesurfer] Recon-all error in CA Normalize (FreeSurfer V 7.1)

2020-05-21 Thread Douglas N. Greve

It is not clear what is failing. Can you check two things?
1. Check the talairach.lta with
    cd $SUBJECTS_DIR/subject/mri/transforms
    tkregisterfv --mov ../orig.mgz --reg talairach.lta --targ 
$FREESURFER_HOME/average/RB_all_2016-05-10.vc700.gca
    This does not have to be perfect, but it should not be way off (ie, 
more than 10mm or 20 deg)
2. Look at the brainmask.mgz to see whether too much or too little of 
the skull was removed


If those things look ok, then upload the subject so I can take a look 
using the steps below


From the linux command line,
Create the file you want to upload, eg,
cd $SUBJECTS_DIR
tar cvfz subject.tar.gz ./subject
Now log  into our anonymous FTP site:
ftp surfer.nmr.mgh.harvard.edu
It will ask you for a user name: use "anonymous" (no quotes)
It will ask you for a password: use "anonymous" (no quotes)
cd transfer/incoming
binary
put subject.tar.gz
Send an email that the file has been and the name of the file.


On 5/16/2020 3:32 PM, Schranzer René wrote:


External Email - Use Caution

Dear Freesurfer experts,

I'm trying to recon-all (-hires) for a new subject (mp2rage image) 
using the FreeSurfer Version 7.1. However, the recon-all exited with 
errors at the "mri_ca_normalize". I also processed the same subject 
from different timepoints and they finished without errors.


The error log is as following:

#@# CA Normalize Sat May 16 12:43:31 CEST 2020

/data/disk_1/IP/MS/freesurfer/MS_MRS_03_TP1_MP2RAGE/mri

mri_ca_normalize -c ctrl_pts.mgz -mask brainmask.mgz nu.mgz 
/usr/local/freesurfer/average/RB_all_2020-01-02.gca 
transforms/talairach.lta norm.mgz


writing control point volume to ctrl_pts.mgz

using MR volume brainmask.mgz to mask input volume...

reading 1 input volume

reading atlas from 
'/usr/local/freesurfer/average/RB_all_2020-01-02.gca'...


reading transform from 'transforms/talairach.lta'...

reading input volume from nu.mgz...

MRImask(): AllowDiffGeom = 1

resetting wm mean[0]: 98 --> 107

resetting gm mean[0]: 61 --> 61

input volume #1 is the most T1-like

using real data threshold=6.0

skull bounding box = (74, 87, 47) --> (250, 243, 247)

finding center of left hemi white matter

using (133, 139, 147) as brain centroid of Right_Cerebral_White_Matter...

MRImask(): AllowDiffGeom = 1

mean wm in atlas = 107, using box (111,120,122) --> (154, 158,171) to 
find MRI wm


before smoothing, mri peak at 109

robust fit to distribution - 108 +- 4.3

after smoothing, mri peak at 109, scaling input intensities by 0.982

scaling channel 0 by 0.981651

using 246437 sample points...

INFO: compute sample coordinates transform

0.82947  -0.03916 0.01418  -3.56121;

0.02560   0.95026 0.20358  -65.47982;

-0.02149  -0.16312 0.83311   18.21485;

0.0   0.0 0.0   1.0;

INFO: transform used

finding control points in Left_Cerebral_White_Matter

found 40230 control points for structure...

bounding box (162, 90, 50) --> (242, 211, 245)

double free or corruption (out)

Command terminated by signal 6

@#@FSTIME 2020:05:16:12:43:32 mri_ca_normalize N 8 e 52.08 S 0.30 U 
41.78 P 80% M 793644 F 0 R 213860 W 0 c 1239 w 3 I 0 O 0 L 10.49 12.64 
12.79


@#@FSLOADPOST 2020:05:16:12:44:24 mri_ca_normalize N 8 10.29 12.25 12.65

Linux twodogs 4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 
2020 x86_64 x86_64 x86_64 GNU/Linux


recon-all -s MS_MRS_03_TP1_MP2RAGE exited with ERRORS at Sat May 16 
12:44:24 CEST 2020


I am thankful for any help.

Best,

René


___
Freesurfer mailing list
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

Re: [Freesurfer] QDEC error Two Groups three covariates

2020-05-21 Thread Douglas N. Greve
Sorry, one of the reasons we stopped supporting QDEC was because it 
became impossible to debug these kinds of things. Please use the command 
line stream (ie, create an FSGD file and contrast matrices, run 
mris_preproc, mris_fwhm, and mri_glmfit). I can help you once you 
recreate the error


On 5/18/2020 9:07 AM, Mikael Novén wrote:


External Email - Use Caution

Dear FreeSurfer Developers,

I’m attempting to run a cortical thickness correlation analysis 
regressing out the effect of brain size, age and gender. However, when 
attempting to run this analysis in qdec (or trying to use mri_glmfit 
separately) I get the following error:

"MatrixMultiplyD(): m2 is null
 break matrix.c:415

No such file or directory”

Full output from the mri_glmfit call is last in this mail.

The first lines of my fsgd files look like this:
"GroupDescriptorFile 1
Title RTfMRI
Class M
Class F
Variables RT eICV Age
Input 101 M36.767 1046505.93 25
Input 102 F-58.589 955597.34 30
Input 103 M68.883 1107660.32 22”

My contrast matrix looks like this:
"+0.0 +0.0 +1.0 +1.0 +0.0 +0.0 +0.0 +0.0”

Any help is much appreciated.

Kind regards,
Mikael

mri_glmfit --y lh.thickness.fMRIRT_revision.10.mgh --fsgd 
fMRIRT_age_gender_eICV.fsgd --C RT_covNI_cp.mat --surf fsaverage lh 
--cortex --glmdir fMRIRT_revision_test2

gdfRead(): reading fMRIRT_age_gender_eICV.fsgd
INFO: DeMeanFlag keyword not found, DeMeaning will NOT be done.
Continuous Variable Means (all subjects)
0 RT 82.6508 76.4669
1 eICV 980394 122148
2 Age 24.5294 3.23797
Class Means of each Continuous Variable
1 M  97.4687 1037828.2188  25.
2 F  74.5684 949066.0966  24.2727
INFO: gd2mtx_method is dods
Reading source surface 
/Applications/freesurfer/subjects/fsaverage/surf/lh.white

Number of vertices 163842
Number of faces    327680
Total area         65416.984375
AvgVtxArea       0.399269
AvgVtxDist       0.721953
StdVtxDist       0.195470

$Id: mri_glmfit.c,v 1.241.2.4 2016/12/08 22:02:40 zkaufman Exp $
cwd /Applications/freesurfer/subjects
cmdline mri_glmfit.bin --y lh.thickness.fMRIRT_revision.10.mgh --fsgd 
fMRIRT_age_gender_eICV.fsgd --C RT_covNI_cp.mat --surf fsaverage lh 
--cortex --glmdir fMRIRT_revision_test2

sysname  Darwin
hostname LUMAC1089
machine  x86_64
user     root
FixVertexAreaFlag = 1
UseMaskWithSmoothing     1
OneSampleGroupMean 0
y  /Applications/freesurfer/subjects/lh.thickness.fMRIRT_revision.10.mgh
logyflag 0
usedti  0
FSGD fMRIRT_age_gender_eICV.fsgd
labelmask 
 /Applications/freesurfer/subjects/fsaverage/label/lh.cortex.label

maskinv 0
glmdir fMRIRT_revision_test2
IllCondOK 0
ReScaleX 1
DoFFx 0
Creating output directory fMRIRT_revision_test2
Loading y from 
/Applications/freesurfer/subjects/lh.thickness.fMRIRT_revision.10.mgh

   ... done reading.
INFO: gd2mtx_method is dods
Saving design matrix to fMRIRT_revision_test2/Xg.dat
Computing normalized matrix
Normalized matrix condition is 3815.6
Matrix condition is 1e+08
Found 149955 points in label.
Pruning voxels by thr: 1.175494e-38
Found 149078 voxels in mask
Saving mask to fMRIRT_revision_test2/mask.mgh
Reshaping mriglm->mask...
search space = 74130.630564
DOF = 9
Starting fit and test
Fit completed in 0.0511667 minutes
Computing spatial AR1 on surface
Residual: ar1mn=0.995881, ar1std=0.003426, gstd=6.299149, fwhm=14.833361
Writing results
  RT_covNI_cp
    maxvox sig=-4.61019  F=62.3686  at  index 156731 0 0  seed=1590285961
MatrixMultiplyD(): m2 is null
 break matrix.c:415

No such file or directory



___
Freesurfer mailing list
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

Re: [Freesurfer] Using PD Scans for Inhomogeneity Correction

2020-05-21 Thread Douglas N. Greve
We don't have tools to do this. I guess you could use BV to do the 
correction and feed the output into recon-all. For 7T, we often run SPM 
VBM or segmentation to get a bias corrected output, then feed that into 
recon-all


On 5/21/2020 3:50 AM, Tali Weiss wrote:


External Email - Use Caution

Dear all,

1. BV have a tool:

https://www.brainvoyager.com/bv/doc/UsersGuide/HighResDataAnalysis/UsingPDScansForInhomogeneityCorrection.html

Is freesurfer have something similar for MPRAGE (i use recon-all)


2.Is PD is suitable also to correct MP2RAGE on 7T?

My resolution 1mm, I use recon-all.v6.hires (freesurfer/6.0.0-patch/hcp/)

Still, the segmentation in the inferior temporal and frontal pole are 
very bad...


Is it make sense to use PD in MP2RAGE sequence?


Tali


___
Freesurfer mailing list
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

Re: [Freesurfer] Rescale question in PETsurfer

2020-05-21 Thread Douglas N. Greve

Yes, CSF and vents

On 5/21/2020 9:48 AM, Vicky Shi wrote:


External Email - Use Caution

Hi Douglas,

Thank you so much for your quick response. That is what I am looking for.

By the way, I found another file,global.gmwm.dat, in aux. Is this file 
the mean suv intensity for grey matter and white matter? Which ROIs 
does it remove compare to global.gmwmcsf.dat? csf and ventricles?


Regards,
Vicky


On Wed, May 20, 2020 at 4:54 PM Douglas N. Greve 
mailto:dgr...@mgh.harvard.edu>> wrote:


Do you mean from the mri_gtmpvc command line? There is not. The
value you want will be stored in aux/global.gmwmcsf.dat, so, once
you had that value, you could rescale the values in the .dat file

On 5/20/2020 3:33 PM, Vicky Shi wrote:


External Email - Use Caution

Dear Freesurfer experts,

I am using gtm.stats.dat file generated by command mri_gtmpvc. I
want it scaled by the mean intensity of whole brain. Is there an
easy way to achieve this?

Thank you in advance for your help.

Best regards,
Vicky

___
Freesurfer mailing list
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


___
Freesurfer mailing list
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

Re: [Freesurfer] mris_register intermediate results display

2020-05-21 Thread Douglas N. Greve
I would just map the ?h.curv from one subject to another and then 
display them on a single surface and flip back and forth. Would that 
work for you?


On 5/21/2020 9:30 AM, Chris Adamson wrote:


External Email - Use Caution

Freesurfer devs,

Apologies if this has already been asked. I’m looking for a way that I 
can look at the progress of mris_register to investigate the accuracy 
of registration. Given that the registration is done on the 2D 
parameterisations of the curvature maps, how can I take a spherical 
surface and write out a tif file with the curvature maps of the 
surface that I’m registering and the target surface. I presume I need 
to use mrisp_write but it is unclear how I choose the curvature map to 
write in the image.


Thanks in advance,

Chris.

*Dr Chris Adamson*

Senior Research Officer, Developmental Imaging, Clinical Sciences (0.3 
EFT)


Software Engineer, Cardiovascular Research (0.7 EFT)

*Murdoch Childrens Research Institute*

The Royal Children’s Hospital

Flemington Road, Parkville, VIC 3052 Australia

E chris.adam...@mcri.edu.au 

www.mcri.edu.au 



This e-mail and any attachments to it (the "Communication") are, 
unless otherwise stated, confidential, may contain copyright material 
and is for the use only of the intended recipient. If you receive the 
Communication in error, please notify the sender immediately by return 
e-mail, delete the Communication and the return e-mail, and do not 
read, copy, retransmit or otherwise deal with it. Any views expressed 
in the Communication are those of the individual sender only, unless 
expressly stated to be those of Murdoch Children’s Research Institute 
(MCRI) ABN 21 006 566 972 or any of its related entities. MCRI does 
not accept liability in connection with the integrity of or errors in 
the Communication, computer virus, data corruption, interference or 
delay arising from or in respect of the Communication.



___
Freesurfer mailing list
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

Re: [Freesurfer] mris_register intermediate results display

2020-05-21 Thread Bruce Fischl

Hi Chris

if you specify -w  on the command line it will write out a surface 
every n iterations of the minimization (-n 1 will write out every step). 
You can then write a script to turn those into tiffs with freeview


cheers
Bruce
On Thu, 
21 May 2020, Chris Adamson wrote:




External Email - Use Caution

Freesurfer devs,

 

Apologies if this has already been asked. I’m looking for a way that I can
look at the progress of mris_register to investigate the accuracy of
registration. Given that the registration is done on the 2D
parameterisations of the curvature maps, how can I take a spherical surface
and write out a tif file with the curvature maps of the surface that I’m
registering and the target surface. I presume I need to use mrisp_write but
it is unclear how I choose the curvature map to write in the image.

 

Thanks in advance,

 

Chris.

 

Dr Chris Adamson

Senior Research Officer, Developmental Imaging, Clinical Sciences (0.3 EFT)

Software Engineer, Cardiovascular Research (0.7 EFT)

 

Murdoch Childrens Research Institute

The Royal Children’s Hospital

Flemington Road, Parkville, VIC 3052 Australia

E chris.adam...@mcri.edu.au 

www.mcri.edu.au

 



This e-mail and any attachments to it (the "Communication") are, unless
otherwise stated, confidential, may contain copyright material and is for
the use only of the intended recipient. If you receive the Communication in
error, please notify the sender immediately by return e-mail, delete the
Communication and the return e-mail, and do not read, copy, retransmit or
otherwise deal with it. Any views expressed in the Communication are those
of the individual sender only, unless expressly stated to be those of
Murdoch Children’s Research Institute (MCRI) ABN 21 006 566 972 or any of
its related entities. MCRI does not accept liability in connection with the
integrity of or errors in the Communication, computer virus, data
corruption, interference or delay arising from or in respect of the
Communication.


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

Re: [Freesurfer] Freesurfer 7.1 hires error

2020-05-21 Thread Douglas N. Greve

I don't know what is wrong. Can you upload the hires run? Instructions below

From the linux command line,
Create the file you want to upload, eg,
cd $SUBJECTS_DIR
tar cvfz subject.tar.gz ./subject
Now log  into our anonymous FTP site:
ftp surfer.nmr.mgh.harvard.edu
It will ask you for a user name: use "anonymous" (no quotes)
It will ask you for a password: use "anonymous" (no quotes)
cd transfer/incoming
binary
put subject.tar.gz
Send an email that the file has been and the name of the file.



On 5/21/2020 9:35 AM, Jones, Richard wrote:


External Email - Use Caution

I ran freesurfer 7.1 with the following options:-

-i ./study/T1_SAG/IM-0001-0001.dcm -FLAIR 
./study/SAG_3D_FLAIR/IM-0001-0001.dcm -s TEST_050620 -3T –mprage 
–FLAIRpial  –hires –parallel –all


The job failed, the logfile recon-all_hires.log is attached. I then 
reran the job with the same datasets but exchanged –hires with 
–conf2hires and used the subject ID TEST_050620c and the job completed 
successfully (the logfile for this job, recon-all_conf2hires.log, is 
also attached). Any idea what the problem is when using the –hires option?


Thanks

*Richard*


___
Freesurfer mailing list
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

Re: [Freesurfer] question on partial volume correction

2020-05-21 Thread Barletta, Valeria
Yes I need the lh and rh cerebral WM for sure, but not just the values, also an 
image.
And I need also a corrected image for the extra cerebral CSF. How can I get 
that?

Thank you very much,

Valeria Barletta, MD
Massachusetts General Hospital
149 13th Street, Charlestown MA 02129
(617)-724-8823

From: freesurfer-boun...@nmr.mgh.harvard.edu 
 on behalf of Douglas N. Greve 

Sent: Thursday, May 21, 2020 10:32 AM
To: freesurfer@nmr.mgh.harvard.edu 
Subject: Re: [Freesurfer] question on partial volume correction

It will certainly do cortex. We do not have a segmentation for subarachnoid 
spaces. Or are you just talking about extra cerebral CSF? We do have a 
segmentation for xCSF, but it is not the most beautiful thing in the world. For 
WM, the GTM will give you a PVC corrected value for the entire lh and rh 
cerebral WM (and cerebellar) segments. Is that all you need?

On 5/19/2020 11:36 AM, Barletta, Valeria wrote:
Dear Freesurfers,
We need to analyze PET data after correcting for partial volume effect in the 
cortex, white matter and subarachnoid space. Is Freesurfer's partial volume 
correction working on all these areas or only the grey matter volume and 
surface? Is there a way to use gtmseg on the white matter and outside the pial 
surface?

Thanks a lot,

Valeria Barletta, MD
Massachusetts General Hospital
149 13th Street, Charlestown MA 02129
(617)-724-8823



___
Freesurfer mailing list
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

Re: [Freesurfer] question on partial volume correction

2020-05-21 Thread Douglas N. Greve
You can try using --rbv. In theory, you can use mueller-gaertner 
(--mgx), but I don't have it set up to look at WM or CSF. And be careful 
because the extracerebral CSF segmentation is often not very good.


On 5/21/2020 1:07 PM, Barletta, Valeria wrote:
Yes I need the lh and rh cerebral WM for sure, but not just the 
values, also an image.
And I need also a corrected image for the extra cerebral CSF. How can 
I get that?


Thank you very much,

Valeria Barletta, MD
Massachusetts General Hospital
149 13th Street, Charlestown MA 02129
(617)-724-8823

*From:* freesurfer-boun...@nmr.mgh.harvard.edu 
 on behalf of Douglas N. Greve 


*Sent:* Thursday, May 21, 2020 10:32 AM
*To:* freesurfer@nmr.mgh.harvard.edu 
*Subject:* Re: [Freesurfer] question on partial volume correction
It will certainly do cortex. We do not have a segmentation for 
subarachnoid spaces. Or are you just talking about extra cerebral CSF? 
We do have a segmentation for xCSF, but it is not the most beautiful 
thing in the world. For WM, the GTM will give you a PVC corrected 
value for the entire lh and rh cerebral WM (and cerebellar) segments. 
Is that all you need?


On 5/19/2020 11:36 AM, Barletta, Valeria wrote:

Dear Freesurfers,
We need to analyze PET data after correcting for partial volume 
effect in the cortex, white matter and subarachnoid space. Is 
Freesurfer's partial volume correction working on all these areas or 
only the grey matter volume and surface? Is there a way to use gtmseg 
on the white matter and outside the pial surface?


Thanks a lot,

Valeria Barletta, MD
Massachusetts General Hospital
149 13th Street, Charlestown MA 02129
(617)-724-8823

___
Freesurfer mailing list
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


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

Re: [Freesurfer] Group Analysis Covariates

2020-05-21 Thread Hua, Jessica
External Email - Use Caution

I apologize for resending all of this info, but my email is acting up and every 
time I try to respond to the other email, my Outlook freezes.

Here is info from our thread. I modified it to include the analysis in which I 
found significant clusters (i.e., looking at thickness with only age and sex as 
covariates and not ICV):

After running the permutation and finding significant clusters, I am trying to 
calculate the value for each participant for these significant clusters.

The perm.th30.abs.y.ocn.dat contain the raw values, and I am trying to get the 
adjusted values accounting for age and sex (this is a three group design).


The X matrix was 240x12 (see attached file)

  *   Column 1: 1s for Group 1 and 0s for Group 2 and 0s for Group 3
  *   Column 2: 0s for Group 1 and 1s for Group 2 and 0s for Group 3
  *   Column 3: 0s for Group 1 and 0s for Group 2 and 1s for Group 3
  *   Column 4: Age for Group 1 and 0s for Group 2 and 0s for Group 3
  *   Column 5: 0s for Group 1 and Age for Group 2 and 0s for Group 3
  *   Column 6: 0s for Group 1 and 0s for Group 2 and Age for Group 3
  *   Column 7: Sex for Group 1 and 0s for Group 2 and 0s for Group 3
  *   Column 8: 0s for Group 1 and Sex for Group 2 and 0s for Group 3
  *   Column 9: 0s for Group 1 and 0s for Group 2 and Sex for Group 3

Your code:
There is not an easy way to do it, but you can do it in matlab
cd glmdir
X = load('Xg.dat');
y = load('perm.th30.abs.y.ocn.dat');
beta = inv(X'*X)*X'*y;
yhat = X(:,[1 2 3]*beta([1 2 3])

When running your code, below are the errors I got in Matlab. Do you know how I 
can fix the code?

>> X = load('Xg.dat');
>> y = load('perm.th30.abs.y.ocn.dat');
>> y = load('perm.th30.abs.y.ocn.dat');
>> beta = inv(X'*X)*X'*y;
>> yhat = X(:,[1 2 3]*beta([1 2 3])
 yhat = X(:,[1 2 3]*beta([1 2 3])
 ↑
Error: Invalid expression. When calling a function
or indexing a variable, use parentheses. Otherwise,
check for mismatched delimiters.

Did you mean:
>> yhat = X(:,[1 2 3]*beta([1 2 3]))
Error using  *
Incorrect dimensions for matrix multiplication.
Check that the number of columns in the first matrix
matches the number of rows in the second matrix. To
perform elementwise multiplication, use '.*'.

>> yhat = X(:,[1 2 3].*beta([1 2 3]))
Index in position 2 is invalid. Array indices must
be positive integers or logical values.

---

Jessica Hua, M.A.
Cognitive and Emotional Control Lab
Doctoral Candidate Clinical Psychology
University of Missouri


Xg.dat
Description: Xg.dat


perm.th30.abs.y.ocn.dat
Description: perm.th30.abs.y.ocn.dat


GroupComparison_AllMRI.AgeSex.xlsx
Description: GroupComparison_AllMRI.AgeSex.xlsx
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Group Analysis Covariates

2020-05-21 Thread Douglas N. Greve

Typo
yhat = X(:,[1 2 3])*beta([1 2 3],:)

On 5/21/2020 2:12 PM, Hua, Jessica wrote:


External Email - Use Caution

I apologize for resending all of this info, but my email is acting up 
and every time I try to respond to the other email, my Outlook freezes.


Here is info from our thread. I modified it to include the analysis in 
which I found significant clusters (i.e., looking at thickness with 
only age and sex as covariates and not ICV):


After running the permutation and finding significant clusters, I am 
trying to calculate the value for each participant for these 
significant clusters.


The perm.th30.abs.y.ocn.dat contain the raw values, and I am trying to 
get the adjusted values accounting for age and sex (this is a three 
group design).


The X matrix was 240x12 (see attached file)

  * Column 1: 1s for Group 1 and 0s for Group 2 and 0s for Group 3
  * Column 2: 0s for Group 1 and 1s for Group 2 and 0s for Group 3
  * Column 3: 0s for Group 1 and 0s for Group 2 and 1s for Group 3
  * Column 4: Age for Group 1 and 0s for Group 2 and 0s for Group 3
  * Column 5: 0s for Group 1 and Age for Group 2 and 0s for Group 3
  * Column 6: 0s for Group 1 and 0s for Group 2 and Age for Group 3
  * Column 7: Sex for Group 1 and 0s for Group 2 and 0s for Group 3
  * Column 8: 0s for Group 1 and Sex for Group 2 and 0s for Group 3
  * Column 9: 0s for Group 1 and 0s for Group 2 and Sex for Group 3 
Your code:

There is not an easy way to do it, but you can do it in matlab
cd glmdir
X = load('Xg.dat');
y = load('perm.th30.abs.y.ocn.dat');
beta = inv(X'*X)*X'*y;
yhat = X(:,[1 2 3]*beta([1 2 3])

When running your code, below are the errors I got in Matlab. Do you 
know how I can fix the code?


>> X = load('Xg.dat');
>> y = load('perm.th30.abs.y.ocn.dat');
>> y = load('perm.th30.abs.y.ocn.dat');
>> beta = inv(X'*X)*X'*y;
>> yhat = X(:,[1 2 3]*beta([1 2 3])
 yhat = X(:,[1 2 3]*beta([1 2 3])
                                 ↑
Error: Invalid expression. When calling a function
or indexing a variable, use parentheses. Otherwise,
check for mismatched delimiters.

Did you mean:
>> yhat = X(:,[1 2 3]*beta([1 2 3]))
Error using  *
Incorrect dimensions for matrix multiplication.
Check that the number of columns in the first matrix
matches the number of rows in the second matrix. To
perform elementwise multiplication, use '.*'.

>> yhat = X(:,[1 2 3].*beta([1 2 3]))
Index in position 2 is invalid. Array indices must
be positive integers or logical values.

---

Jessica Hua, M.A.
Cognitive and Emotional Control Lab
Doctoral Candidate Clinical Psychology
University of Missouri

___
Freesurfer mailing list
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

Re: [Freesurfer] mris_register intermediate results display

2020-05-21 Thread Chris Adamson
External Email - Use Caution

Yeah that works, thanks a lot.

From: freesurfer-boun...@nmr.mgh.harvard.edu 
 On Behalf Of Douglas N. Greve
Sent: Friday, 22 May 2020 1:08 AM
To: freesurfer@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] mris_register intermediate results display

I would just map the ?h.curv from one subject to another and then display them 
on a single surface and flip back and forth. Would that work for you?
On 5/21/2020 9:30 AM, Chris Adamson wrote:

External Email - Use Caution
Freesurfer devs,

Apologies if this has already been asked. I’m looking for a way that I can look 
at the progress of mris_register to investigate the accuracy of registration. 
Given that the registration is done on the 2D parameterisations of the 
curvature maps, how can I take a spherical surface and write out a tif file 
with the curvature maps of the surface that I’m registering and the target 
surface. I presume I need to use mrisp_write but it is unclear how I choose the 
curvature map to write in the image.

Thanks in advance,

Chris.

Dr Chris Adamson
Senior Research Officer, Developmental Imaging, Clinical Sciences (0.3 EFT)
Software Engineer, Cardiovascular Research (0.7 EFT)

Murdoch Childrens Research Institute
The Royal Children’s Hospital
Flemington Road, Parkville, VIC 3052 Australia
E chris.adam...@mcri.edu.au
www.mcri.edu.au



This e-mail and any attachments to it (the "Communication") are, unless 
otherwise stated, confidential, may contain copyright material and is for the 
use only of the intended recipient. If you receive the Communication in error, 
please notify the sender immediately by return e-mail, delete the Communication 
and the return e-mail, and do not read, copy, retransmit or otherwise deal with 
it. Any views expressed in the Communication are those of the individual sender 
only, unless expressly stated to be those of Murdoch Children’s Research 
Institute (MCRI) ABN 21 006 566 972 or any of its related entities. MCRI does 
not accept liability in connection with the integrity of or errors in the 
Communication, computer virus, data corruption, interference or delay arising 
from or in respect of the Communication.



___

Freesurfer mailing list

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

[Freesurfer] Open Postdoctoral Scholar Position

2020-05-21 Thread Neva M Corrigan
External Email - Use Caution

Open Postdoctoral Scholar Position

The University of Washington Institute for Learning & Brain Sciences (I-LABS; 
http://ilabs.washington.edu/) located in Seattle, WA is seeking a Postdoctoral 
Scholar to conduct analyses of human MRI brain imaging data.  I-LABS is an 
interdisciplinary research unit dedicated to discovering the fundamental 
principles of human learning, with a special emphasis on early learning and 
brain development. The Postdoctoral Scholar will contribute to a team 
responsible for creating breakthrough findings in infant, child and adolescent 
brain development.


Applicants should have a Ph.D. in Psychology, Linguistics, Cognitive Science, 
Biomedical Engineering, Neuroscience, or relate field. Extensive prior 
experience in analysis of MRI data in a scientific setting is essential. 
Programming and scripting skills are required, with Matlab or Python as well as 
Unix scripting experience at a minimum.  Familiarity with common MRI image 
processing software packages (such as FSL, SPM, ANTS, FreeSurfer, or AFNI) is a 
must. Previous experience in working with pediatric MRI data is highly desired.
Full position details and application submission are available at:  
https://apply.interfolio.com/75530. Review of applications will begin May 1st, 
2020; applications will be accepted until the position is filled.

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

Re: [Freesurfer] Infant Freesurfer: infant_recon_all error

2020-05-21 Thread Hoopes, Andrew
Hi Fleur,
It’s definitely running with tcsh. Can you provide a bit more context for the 
error? Like is there any terminal output preceding it?
Andrew

From:  on behalf of Fleur Warton 

Reply-To: FS Help 
Date: Wednesday, May 20, 2020 at 6:13 AM
To: fsbuild 
Cc: FS Help 
Subject: Re: [Freesurfer] Infant Freesurfer: infant_recon_all error


External Email - Use Caution
Hi,

Thanks for the reply! The output for 'file' was tcsh. I switched to tcsh (just 
in that session) but got the same error when running infant_recon_all

 if: Expression Syntax

Kind regards,
--

Fleur Warton

Postdoctoral Research Fellow
Division of Biomedical Engineering
Faculty of Health Sciences
University of Cape Town


On Wed, May 20, 2020 at 11:42 AM fsbuild 
mailto:fsbu...@contbay.com>> wrote:
Hello Fleur,

You should be able to do,
$ file `which infant_recon_all`
... and the output should tell you if it it is a csh script, a Bourne shell 
script, a binary, etc.

Unless you explicitly made csh or bash your default shell, then at the dollar 
sign prompt the default shell in Ubuntu is "dash" and not bash or Bourne shell. 
  If the file command reports it's a Bourne shell then it might be a bash 
script.  Or a bash script with a hash bang line of /bin/sh will run using dash 
shell on Ubuntu and can exit with that error on bash syntax/grammar.  You can 
eliminate that possibility by first running bash, and then the script,

$ bash
$ infant_recon_all --s SUBJ --age AGE
(with I presume arguments substituted for SUBJ and AGE)

- R.
Fleur Warton
May 20, 2020 at 04:05

External Email - Use Caution
Hi,

I recently installed the Infant FreeSurfer package. When I try to run
infant_recon_all (specific command: infant_recon_all --s SUBJ --age AGE)

 I get the error

if: Expression Syntax

I tried switching shells from bash to tcsh but got the same error.

The FreeSurfer version is freesurfer-infant-20200205
My platform is Ubuntu 18.04

Any suggestions how to fix this?

Kind regards,

Fleur




___
Freesurfer mailing list
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

Re: [Freesurfer] circular/cyclic color map for polar data in freeview {Disarmed}

2020-05-21 Thread Caspar M. Schwiedrzik
External Email - Use Caution

Hi!
Jumping in on this, since it has come up many times but is without a
solution so far: the issue is that the color code is now mapped onto a
straight color bar, not a circle. At the same time, it is not documented
what color refers to which angle. That makes it very difficult to work with
this kind of color bar. It would be very helpful to reintroduce the circle,
and to explicitly document how angles are mapped to colors.
Thank you!
Caspar

On Thu, May 21, 2020 at 16:41 Douglas N. Greve 
wrote:

> When you say it is "linear" do you mean it does not wrap-around?
>
>
>
> On 5/19/2020 8:47 PM, Devavrat Vartak PhD wrote:
>
> External Email - Use Caution
> Hello freesurfer community,
>
> I am trying to setup a retinotopy pipeline. I have analysed pRF data
> generating polar angle and eccentricity maps which I project onto an
> inflated surface / flattened surface in freeview.
>
> Is there a way to display a circular/cyclic colour map (for the polar
> angle data) in the overlay screen?, the existing 'colour wheel' option
> seems to be linear?
>
>
> Thank you!
>
> Best,
> DV
>
>
>
> ___
> Freesurfer mailing 
> listfreesur...@nmr.mgh.harvard.eduhttps://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
>  
> 
>
>
> ___
> Freesurfer mailing list
> Freesurfer@nmr.mgh.harvard.edu
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.nmr.mgh.harvard.edu_mailman_listinfo_freesurfer&d=DwICAg&c=JeTkUgVztGMmhKYjxsy2rfoWYibK1YmxXez1G3oNStg&r=sgvCAzCi3iTXkTNRRVMpDnC6tu0lnijYpKXIX_UNme8&m=ZG0QTsrPnW9eG-z3AwEI4cv-XX35unrH3etOYRJoyZQ&s=hVKW4UfzYP0jPJM1fTz38lH5pcJt1mCFU-DsHtx5O98&e=
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer