[Freesurfer] 2 surface mri_glmfit as independent variables

2020-03-03 Thread Adam Martersteck
External Email - Use Caution

Hi FreeSurfer team,

I have a question about running mri_glmfit with 2 different surface
modalities as the independent variable and a single value per participant
as the dependent variable. I'm trying to examine the unique and shared
contribution of the 2 surfaces to predict a cognitive measure.
E.g. Cognition ~ ?h.thickness + ?h.PET

I tried mri_glmfit with the "--table" option, giving it a column of scores
per participant (in the aseg2stats table format), and then using "--pvr
lh.thickness-stack.fsaverage.mgh" and a second "--pvr
lh.PET-stack.fsaverage.mgh", using contrasts matrices as [0 0 1], [0 1 0],
and [0 1 1].

*When I run mri_glmfit it returns:*
ERROR: mri_reshape: number of elements cannot change
  nv1 = 163842, nv1 = 1

It continues to run, but all surface maps are full of zeroes. Any
suggestions? Is there a better way to do this?

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

Re: [Freesurfer] Freesurfer installation on Ubuntu virtual machine

2020-03-03 Thread fsbuild
External Email - Use Caution

I should have said at the end for installation under $HOME to set,



$ export FREESURFER_HOME=$HOME/freesurfer





- R.


fsbuildMarch 3, 2020 at 15:39
  External Email - Use 
Caution
Hello Ben, 

For packages to install, see the following wiki page,
https://surfer.nmr.mgh.harvard.edu/fswiki/BuildRequirements
Usually to expand the freesurfer *.tar.gz archive under /usr/local, you would 
need sudo/root privileges, e.g.
$ cd /usr/local$ sudo tar 
zxpffreesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz…... output 
deleted
- and you would end up with /usr/local/freesurfer and in turn do
$ export FREESURFER_HOME=/usr/local/freesurfer
But if you don’t have sudo privileges, e.g., it does not work to do$ sudo touch 
/usr/local/foo$ sudo rm /usr/local/foo
-
 then you may want to consider putting freesurfer under your $HOME 
directory or somewhere you have permission to write files w/o needing to
 use sudo, e.g.,
$ cd $HOME$ tar 
zxpffreesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz$ export 
FREESURFER_HOME=$HOME
- R.


___
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] LGI help

2020-03-03 Thread Nillo, Ryan Michael R
Hello Freesurfer users/developers,

I want to run recon-all localGI on a subject who has been processed with 
Freesurfer 5.3. Whenever I run recon-all -localGI, I always get an error on 
“make_roi_paths”. There error can be found at the end of this email. I looked 
at the 5.3 release notes and found the that one issue with localGI was fixed by 
substituting a line of code. The current SearchProjectionOnPial.m that I am 
using uses this fix.

LGI: issue when using Matlab 2013. the fix is to edit the file 
$FREESURFER_HOME/matlab/SearchProjectionOnPial.m and make these changes: 
find this line:

< for t=1:step:size(perim,2)

and change to:

> si=max(size(perim));
> for t=1:step:si




make_roi_paths('lh.pial','lh.pial-outer-smoothed',25,100,'/working/ABCD/FS/NDAR_INV021N0FLH/surf/tmp-mris_compute_lgi-lh.pial','/tmp/mrp_58433_.m');
 exit
=

< M A T L A B (R) >
  Copyright 1984-2015 The MathWorks, Inc.
   R2015b (8.6.0.267246) 64-bit (glnxa64)
  August 20, 2015
 
For online documentation, see http://www.mathworks.com/support
For product information, visit www.mathworks.com.
 

Academic License

>> loading datas ...
FREESURFER_READ_SURF [v  1.2 ]
...reading surface file: lh.pial
...reading triangle file
...adding 1 to face indices for matlab compatibility.
...done (  0.04 sec)

FREESURFER_READ_SURF [v  1.2 ]
...reading surface file: lh.pial-outer-smoothed
...reading triangle file
...adding 1 to face indices for matlab compatibility.
...done (  0.02 sec)

preparing outer mesh structure ...
face 5000 / 130188
face 1 / 130188
face 15000 / 130188
face 2 / 130188
face 25000 / 130188
face 3 / 130188
face 35000 / 130188
face 4 / 130188
face 45000 / 130188
face 5 / 130188
face 55000 / 130188
face 6 / 130188
face 65000 / 130188
face 7 / 130188
face 75000 / 130188
face 8 / 130188
face 85000 / 130188
face 9 / 130188
face 95000 / 130188
face 10 / 130188
face 105000 / 130188
face 11 / 130188
face 115000 / 130188
face 12 / 130188
face 125000 / 130188
face 13 / 130188

mesh_outer = 

 vertices: [65096x3 double]
faces: [130188x3 double]
facesOfVertex: [65096x1 struct]

preparing pial mesh structure ...
...searching for mesh edges...done (134.42 sec).
... creating path file for vertex 1 / 65096
area file for outer ROIs saved at 1
In an assignment  A(:) = B, the number of elements in A and B must be the same.

Error in dsearchn (line 79)
[d(i),t(i)] = min(sum((x-yi).^2,2));

Error in mesh_vertex_nearest (line 29)
nearestIndex = dsearchn(vertices,points);


Error in reorganize_verticeslist (line 28)

[nextindex,nextvalue]=mesh_vertex_nearest(mesh_total.vertices(remaininglist,:),mesh_total.vertices(verticeslist(start_vertex),:));

Error in make_roi_paths (line 93)
reorglist = reorganize_verticeslist (mesh_total, A, mesh_outer, perim,
verticeslist, step);
 
>> 
ERROR:  make_roi_paths did not complete successfully!
Linux jamestown.radiology.ucsf.edu 3.10.0-1062.1.2.el7.x86_64 #1 SMP Mon Sep 16 
14:19:51 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux

recon-all -s NDAR_INV021N0FLH exited with ERRORS at Tue Mar  3 11:09:41 PST 2020

For more details, see the log file 
/working/ABCD/FS/NDAR_INV021N0FLH/scripts/recon-all.log
To report a problem, see http://surfer.nmr.mgh.harvard.edu/fswiki/BugReporting

Thank you for your time,

Ryan Michael Nillo
Staff Research Associate I
University of California San Francisco
Department of Radiology and Biomedical Imaging



smime.p7s
Description: S/MIME cryptographic signature
External Email - Use Caution___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

Re: [Freesurfer] Freesurfer installation on Ubuntu virtual machine

2020-03-03 Thread fsbuild
External Email - Use Caution

Hello Ben, 

For packages to install, see the following wiki page,
https://surfer.nmr.mgh.harvard.edu/fswiki/BuildRequirements
Usually to expand the freesurfer *.tar.gz archive under /usr/local, you would 
need sudo/root privileges, e.g.
$ cd /usr/local$ sudo tar 
zxpffreesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz…... output 
deleted
- and you would end up with /usr/local/freesurfer and in turn do
$ export FREESURFER_HOME=/usr/local/freesurfer
But if you don’t have sudo privileges, e.g., it does not work to do$ sudo touch 
/usr/local/foo$ sudo rm /usr/local/foo
- then you may want to consider putting freesurfer under your $HOME directory 
or somewhere you have permission to write files w/o needing to use sudo, e.g.,
$ cd $HOME$ tar 
zxpffreesurfer-Linux-centos6_x86_64-stable-pub-v6.0.0.tar.gz$ export 
FREESURFER_HOME=$HOME
- R.

On Mar 3, 2020, at 12:53, Benjamin Ineichen bv.ineic...@gmail.com 
wrote:External Email - Use 
CautionDear Freesurfer 
experts,Even though this problem has been raised in the archives, I was not 
able to find a specific solution to my problem.I installed Freesurfer on a 
virtual machine which runs Ubuntu 18.04.4 (Host system: Windows 10). But it 
seems that Freesurfer is not installed properly. Upon running the installation 
test, I get the following errors:1.) command line: cp 
$FREESURFER_HOME/subjects/sample-001.mgz .Error: cp: cannot create regular file 
'./sample-001.mgz': Permission denied2.) command line: mri_convert 
sample-001.mgz sample-001.nii.gzError: mri_convert..bin sample-001.mgz 
sample-001.nii.gz$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 reuter Exp 
$reading from sample-001.mgz...mghRead(/usr/local/sample-001.mgz, -1): could 
not open file3.) command line: freeviewError: freeview.bin: error while loading 
shared libraries: libpng12.so.0: cannot open shared object file: No such file 
or directory.My permissions are: drwxrwsr-x for freesurfer.Any 
advice?Manythanks!/Ben--Benjamin
 Victor Ineichen, MD PhDKarolinska InstitutetCenter for Molecular 
MedicineStockholm, swedenineic...@protonmail.ch+41 76 391 04 01Dr. med. et Dr. 
rer. nat. ETH Benjamin Victor IneichenKarolinska InstitutetCenter for Molecular 
MedicineStockholm, swedenineic...@protonmail.ch+41 76 391 04 
01___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] Registration of DIR (Double Inversion Recovery) series

2020-03-03 Thread Xiaojiang Yang
External Email - Use Caution

Hi all,

I want to register DIR (Double Inversion Recovery) series to T1 series
using Freesurfer. I used the command line similar to that used for FLAIR
registration:

bbregister --s subject001 --mov
dicom/subject001/20141003_MR/3_Sag_Space_DIR/2.25.97015757385982906453797720915266163627.dcm
--lta subjects/subject001/mri/transforms/DirTest.auto.lta  --init-coreg --T2

where the option --T2 is still used. Since in DIR series, gray matter is
brighter than white matter, I use --T2 as the contrast argument.

I wan's able to check how precise the results are. I will take some time to
do check that.

But anyone can tell me: Did I do it correctly? what is the better way or
correct way to do the above-mentioned registration?

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

[Freesurfer] Freesurfer installation on Ubuntu virtual machine

2020-03-03 Thread Benjamin Ineichen
External Email - Use Caution

Dear Freesurfer experts,

Even though this problem has been raised in the archives, I was not able to
find a specific solution to my problem.

I installed Freesurfer on a virtual machine which runs Ubuntu 18.04.4 (Host
system: Windows 10). But it seems that Freesurfer is not installed
properly. Upon running the installation test, I get the following errors:

1.) command line: cp $FREESURFER_HOME/subjects/sample-001.mgz .
Error: cp: cannot create regular file './sample-001.mgz': Permission denied

2.) command line: mri_convert sample-001.mgz sample-001.nii.gz
Error: mri_convert.bin sample-001.mgz sample-001.nii.gz
$Id: mri_convert.c,v 1.226 2016/02/26 16:15:24 reuter Exp $
reading from sample-001.mgz...
mghRead(/usr/local/sample-001.mgz, -1): could not open file

3.) command line: freeview
Error: freeview.bin: error while loading shared libraries: libpng12.so.0:
cannot open shared object file: No such file or directory.

My permissions are: drwxrwsr-x for freesurfer.

Any advice?

Many thanks!

/Ben



-- 

Benjamin Victor Ineichen, MD PhD
Karolinska Institutet
Center for Molecular Medicine
Stockholm, Sweden
ineic...@protonmail.ch
+41 76 391 04 01

Dr. med. et Dr. rer. nat. ETH Benjamin Victor Ineichen
Karolinska Institutet
Center for Molecular Medicine
Stockholm, Sweden
ineic...@protonmail.ch
+41 76 391 04 01
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] segmentation issue

2020-03-03 Thread Laboratorio de Neurociencia Funcional
External Email - Use Caution

External Email - Use Caution

Dear Freesurfeer experts,

After running the recon-all in one of my subjets, part of the temporal
lobe was partially excluded. Then, I tried to use the watershed
algorithm to be less agressive in the skull stripping
as follows:

recon-all -skullstrip -wsthresh 35 -clean-bm -no-wsgcaatlas -subjid sub_001

The problem was solved in the brainmask.mgz but not in the cortical surfaces. To
handle this issue, I edited the white matter and run the recon-all
-autorecon2-wm
-autorecon3 without success. I also placed control points but the
following error appeared after running
the recon-all -autorecon2-cp -autorecon3:

recon-all -s sub_001 existed with errors

I noted that white matter of this part of the temporal lobe has high
values (up to 132). What can I
do to solve the problem with this subject?

Thank you in advance.

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

[Freesurfer] petsurfer

2020-03-03 Thread Laboratorio de Neurociencia Funcional
External Email - Use Caution

Dear Freesurfer experts,

I have compared the PVC uptake values of gtm.stats with the values of
gtm.nii.gz with the function load_nii in matlab. I noted
that values in matlab are reversed, i. e., the first value in
gtm.stats matches with the last value in gtm.nii.gz and so on.

Could you confirm me that nopvc.nii.gz values are also reversed
when loaded with load_nii in matlab? I have no way to check this.

Thank you in advance.

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

[Freesurfer] (no subject)

2020-03-03 Thread Laboratorio de Neurociencia Funcional
External Email - Use Caution

Dear Freesurfeer experts,

After running the recon-all in one of my subjets, part of the temporal
lobe was partially excluded. Then, I tried to use the watershed
algorithm to be less agressive in the skull stripping
as follows:

recon-all -skullstrip -wsthresh 35 -clean-bm -no-wsgcaatlas -subjid sub_001

The problem was solved in the brainmask.mgz but not in the cortical surfaces. To
handle this issue, I edited the white matter and run the recon-all
-autorecon2-wm
-autorecon3 without success. I also placed control points but the
following error appeared after running
the recon-all -autorecon2-cp -autorecon3:

recon-all -s sub_001 existed with errors

I noted that white matter of this part of the temporal lobe has high
values (up to 132). What can I
do to solve the problem with this subject?

Thank you in advance.

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

Re: [Freesurfer] Control Points

2020-03-03 Thread Bruce Fischl
Hi Doro

it's hard to tell from your image, but it looks like at least one of your 
cps is not in wm but in the gm. This will mess everything up. Make sure 
that they are in unpartial-volumed wm

cheers
Bruce
On Tue, 3 Mar 2020, Meike Hettwer 
wrote:

>External Email - Use Caution 
>
> Dear Freesurfer Team,
>
> I am currently performing manual edits using freesurfer v. 6.0.1. (on Debian 
> /Linux 7). While brainmask edits work perfectly, the control points i set 
> (mainly in temporal and frontopolar regions, running recon-all -autorecon2-cp 
> -autorecon3) either have no effect at all or even make the situation worse 
> (see screenshots attached). Do you have any idea why that might be and how I 
> could fix that? I also tried editing the wm.mgz, but it didn't improve the 
> segmentation.
>
> Thanks a lot,
>
> Doro
>
>
>
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


[Freesurfer] Control Points

2020-03-03 Thread Meike Hettwer
   External Email - Use Caution


Dear Freesurfer Team,

I am currently performing manual edits using freesurfer v. 6.0.1. (on 
Debian /Linux 7). While brainmask edits work perfectly, the control 
points i set (mainly in temporal and frontopolar regions, running 
recon-all -autorecon2-cp -autorecon3) either have no effect at all or 
even make the situation worse (see screenshots attached). Do you have 
any idea why that might be and how I could fix that? I also tried 
editing the wm.mgz, but it didn't improve the segmentation.


Thanks a lot,

Doro

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

[Freesurfer] comparison within same subjects for different conditions

2020-03-03 Thread Marco Ninghetto
External Email - Use Caution

Dear Freesurfers,
sorry for the additional message but I really need your help.
I'm running the retinotopy analysis to study population receptive fields on
healthy subjects. Structurals have been reconstructed using "recon-all
-qcache".
The stimuli I used for retinotopy are: rotating wedge (45deg,
counter-clockwise) for polar angle and expanding ring (out) for
eccentricity.
Each subject underwent retinotopy stimuli in two conditions: free normal
sight and narrowed sight. So, each subject has 1 structural and 2 pairs of
functionals for each condition (1 rot wedge + 1 expanding ring for each
condition).

I successfully computed the 1st level analysis for each subject for each
condition. Now, I'd like to check the differences in cortical activation
between the two conditions to understand if we have significant effects in
activations when we narrow the sight (or simply make the subtraction
analysis on the 2 conditions in such a way that we can check if we really
narrow the sight).

I checked on FREESURFER tutorials but I cannot find anything similar. The group
analysis
 is for
comparison between 2 different subject populations. I opted for paired
analysis  but I'm
stuck with the FSGD files (I understand two FSGD files are requested)
*1)*

> GroupDescriptorFile 1
> Class Main
> Input subject6ng   Main
> Input subject6   Main
> Input subject7ng   Main
> Input subject7   Main
> Input subject8ng   Main
> Input subject8   Main
> Input subject9ng   Main
> Input subject9   Main
> Input subject10ng Main
> Input subject10 Main
> Input subject11ng Main
> Input subject11 Main
> Input subject12ng Main
> Input subject12 Main
> Input subject13ng Main
> Input subject13 Main
>
*2)*

> GroupDescriptorFile 1
> Class Main
> Variables Goggles
> Input subject6pairMain normal
> Input subject7pairMain normal
> Input subject8pairMain normal
> Input subject9pairMain normal
> Input subject10pair  Main normal
> Input subject11pair  Main normal
> Input subject12pair  Main normal
> Input subject13pair  Main normal

Where the "normal" variable means in free view conditions (not narrowed).
Is it well done or am I making something wrong?
- I have 1 main folder for structurals, storing all subject structural
folders;
- 1 main folder for functionals, storing all subjects two times (normal and
narrowed conditions).

Are there any other ways to compare activations on the same subjects in
different conditions?

Thank you for your patience and your help,
Marco




-- 
---
Marco Ninghetto, PhD candidate
Laboratory of Neuroplasticity
Nencki Institute of Experimental Biology
Polish Academy of Sciences
3 Pasteur Street, 02-093 Warsaw, Poland
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

[Freesurfer] CBF data for mri_glmfit processing

2020-03-03 Thread Beata Brzeska
External Email - Use Caution

Hello everyone,

I am using Freesurfer 6.0 on linux cluster.

We are analyzing CBF data (ASL derived) coupled with fMRI task in
longitudinal design. The fMRI data was analyzed in FS-FAST (with
paired-diff) and now we want to repeat the group analyses on CBF maps. So
far I registered the ASL data to individual anatomy and successfully
transformed into fsaverage surface space (and smoothed afterwards). The
data looks good so far - I can overlay it on inflated fsaverage surface.

My question is: how to stack the data for further mri_glmfit processing? I
suppose I should use mris_preproc for this purpose, but I am at loss with
which flags are appropriate and hoe to use CBF maps as an input here.


So far I did as follows for all the subjects, timepoints and hemispheres:

bbregister --s Sub01_I --mov Sub01_I_CBF.nii.gz --t2 --reg Sub01_I_reg.dat ;

mri_vol2surf --src Sub01_I_CBF.nii.gz --trgsubject fsaverage --out
Sub01_I_CBF_to_surf_lh.nii.gz --srcreg Sub01_I_reg.dat --hemi lh

mris_fwhm --s fsaverage --hemi lh --fwhm 5 --smooth-only --i
Sub01_I_CBF_to_surf_lh.nii.gz --o Sub01_I_CBF_to_surf_lh_smooth.nii.gz;



I would really appreciate your help.

Thanks,

Beata



--
Beata Brzeska
Medical University of Gdansk, Poland
Radiology Department
-- 
Beata Brzeska
Zakład Radiologii
Uniwersyteckie Centrum Kliniczne w Gdańsku
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer