Re: [Freesurfer] Copy geometry (fov position) from one header to another while keeping voxel and matrix sizes unchanged

2023-09-08 Thread Wighton, Paul
External Email - Use Caution Hey Sebastien, I'm not sure how to do this in FreeSurfer (mri_add_xform_to_header might work) but you can overwrite the header in python using nibable. You'll have to compute the vox2ras yourself however. Let's say you have image 1 and image 2 and

Re: [Freesurfer] Finding Intracranial volume

2023-11-01 Thread Wighton, Paul
Hi Peter, recon-all produces an estimate of ICV. In aseg.stats there is a line that looks like: # Measure EstimatedTotalIntraCranialVol, eTIV, Estimated Total Intracranial Volume, 1696008.240403, mm^3 You can read more about how it is computed at

Re: [Freesurfer] Question about Freesurfer

2023-11-06 Thread Wighton, Paul
Hi Mahdi, I'm afraid I don't know what you mean by "Freeview opens fine but when I load a column in it just shows a black view." What is a column in this context? As for registration between PET and MR, have you seen this page? https://surfer.nmr.mgh.harvard.edu/fswiki/PetSurfer It suggests

Re: [Freesurfer] Free surfer quits unexpectedly

2023-10-06 Thread Wighton, Paul
External Email - Use Caution Thanks for this, R! Monika (cc'd) is running into the same issue, and has followed these steps, and can now open files from the command line, but not from the GUI. Any ideas? -Paul From:

Re: [Freesurfer] Starting a new project

2022-05-25 Thread Wighton, Paul
Hi Raffaele, There is some info here: https://surfer.nmr.mgh.harvard.edu/fswiki/DevelopersGuide For more details on compiling FreeSurfer from source, you can refer to this neurodocker template:

Re: [Freesurfer] Deface DICOM

2022-05-24 Thread Wighton, Paul
Hi Victor, If you have the original DICOMs you could try something like pydicom to overwrite the voxel values. The process would go something like: 1) Convert DICOM to nifti using your favorite tool 2) Deface niftii data using your favorite tool 3) Load the defaced data into python using

Re: [Freesurfer] aseg.stats - eTIV volume space

2022-06-23 Thread Wighton, Paul
Hi Katie, FreeSurfer operates mostly in "FreeSurfer Space", which is voxel resolution of 1mm^3 and sagittal orientation. You can compare orig.mgz to the original input to see what the difference between native space and FreeSurfer Space would be. eTIV is computed using the transformation

Re: [Freesurfer] Problem with sxconcat-sess

2022-07-04 Thread Wighton, Paul
of Wighton, Paul Sent: 30 June 2022 17:36 To: Freesurfer support list Subject: Re: [Freesurfer] Problem with sxconcat-sess Hi Noah, These dof files were not created by recon-all. I was hoping there would be other log files in the scripts directory describing the functional analysis. I have

Re: [Freesurfer] Command Not Found

2022-06-28 Thread Wighton, Paul
Hi Rachel, Are you trying to run tkregister2? Looks like you forgot the t at the start of the command. -Paul From: freesurfer-boun...@nmr.mgh.harvard.edu on behalf of Rachel Wagner Sent: Tuesday, June 28, 2022 4:29 PM To: freesurfer@nmr.mgh.harvard.edu

Re: [Freesurfer] Problem with sxconcat-sess

2022-06-30 Thread Wighton, Paul
@nmr.mgh.harvard.edu on behalf of Wighton, Paul Sent: 28 June 2022 11:10 To: Freesurfer support list Subject: Re: [Freesurfer] Problem with sxconcat-sess Hi Noah, I'm not super familiar with the functional stream, but it looks like something has gone wrong during the first-level analysis for some of

Re: [Freesurfer] TRACULA -bedp parallel processing

2022-06-08 Thread Wighton, Paul
Hi Ela, It looks to me like line 79 of bedpostx_preproc.sh is: if [ ${gflag} -eq 1 ]; then Which is consistent with the error: -eq: unary operator expected What this error is saying is that the variable `gflag` has not been set, so the script does not know how to perform the comparison.

Re: [Freesurfer] vertex ID in the contralateral hemisphere

2022-06-07 Thread Wighton, Paul
Hi Marina, I believe mris_left_right_register can do this. -Paul From: freesurfer-boun...@nmr.mgh.harvard.edu on behalf of Marina Fern?ndez Sent: Tuesday, June 7, 2022 4:16 AM To: freesurfer@nmr.mgh.harvard.edu Subject: [Freesurfer] vertex ID in the

Re: [Freesurfer] Problem with sxconcat-sess

2022-06-28 Thread Wighton, Paul
Hi Noah, I'm not super familiar with the functional stream, but it looks like something has gone wrong during the first-level analysis for some of your subjects. Can you compare the log files in the ./scripts directory for a subject that has the dof files vs a subject that doesn't and post any

Re: [Freesurfer] Recon-All Error: "Command exited with non-zero status"

2022-05-06 Thread Wighton, Paul
recon-all is running fine now. Thank you! Joanna -- Joanna Eckhardt Neurosciences Graduate Program University of California, San Diego From: freesurfer-boun...@nmr.mgh.harvard.edu on behalf of Wighton, Paul Sent: Thursday, May 5, 2022 1:26 PM To:

Re: [Freesurfer] Recon-all Error: "ln: failed to create symbolic link 'lh.white.H': Operation not permitted"

2022-05-06 Thread Wighton, Paul
Hi Joanna, Is it possible you've run out of disk space? What's the output of `df --si`? -Paul From: freesurfer-boun...@nmr.mgh.harvard.edu on behalf of Joanna L Eckhardt Sent: Friday, May 6, 2022 12:33 PM To: freesurfer@nmr.mgh.harvard.edu Subject:

Re: [Freesurfer] Recon-all Error: "ln: failed to create symbolic link 'lh.white.H': Operation not permitted"

2022-05-06 Thread Wighton, Paul
urfer-boun...@nmr.mgh.harvard.edu on behalf of Wighton, Paul Sent: Friday, May 6, 2022 10:55 AM To: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] Recon-all Error: "ln: failed to create symbolic link 'lh.white.H': Operation not permitted" Hi Joanna, Is it possible you've run out of disk space

Re: [Freesurfer] Scalable recon workflow

2022-05-03 Thread Wighton, Paul
There's a small percentage of subjects that need more than the 8Gb of memory (for mris_fix_topology if my memory is correct). You could increase the memory allocation for all subjects, or you could run your entire dataset with 8Gb per subject, then re-run the ones that failed with increased

Re: [Freesurfer] Recon-All Error: "Command exited with non-zero status"

2022-05-05 Thread Wighton, Paul
Hi Joana, There are a few things going on here. First, you should create a subjects directory for FreeSurfer recons and tell FreeSurfer where it is by setting the SUBJECTS_DIR environment variable. You should be able to do that with these 2 commands: ``` mkdir -p

Re: [Freesurfer] Docker for Freesurfer 7.3.2

2022-08-22 Thread Wighton, Paul
I just made a PR to neurodocker to support FreeSufer 7.3.2 https://github.com/ReproNim/neurodocker/pull/469 And used that to build the container `pwighton/freesurfer:7.3.2`. I'm pushing it to dockerhub now. It should be available in an hour or so. It hasn't been tested yet, so if folks use

Re: [Freesurfer] mghread : cannot open the file

2022-10-19 Thread Wighton, Paul
ri, Oct 14, 2022 at 12:54 AM Wighton, Paul mailto:pwigh...@mgh.harvard.edu>> wrote: Hi Padma, It can't find the file: /Applications/freesurfer/7.3.2/subjects/tester/mri/aseg.mgz Are you trying to run this on a subject called sub-AD003S1059S61129? If so, can you try: mri_compute_vol

Re: [Freesurfer] conversion of .stats to .csv

2022-10-27 Thread Wighton, Paul
Hi Padma, There is probably a 'cleaner' way to do this, but this should work: cat aseg.stats |grep -v '#'|sed 's/ \{1,\}/,/g'|sed 's/^,//'|sed 's/,$//' > aseg.csv -Paul From: freesurfer-boun...@nmr.mgh.harvard.edu on behalf of priya padma Sent: Wednesday,

Re: [Freesurfer] change in mask size

2022-10-27 Thread Wighton, Paul
Hi Padma, You can use the --like flag of mri_convert to convert the output of the skull stripping back to the dimensions of the original file https://surfer.nmr.mgh.harvard.edu/fswiki/mri_convert e.g mri_convert --like input-to-skullstrip.mgz output-from-skullstrip.mgz

Re: [Freesurfer] Freesurfer: fs_install_mcr: Unzip command not found

2022-09-14 Thread Wighton, Paul
? Thank you so much for your time. Sincerely, Justina On Tue, Sep 13, 2022 at 9:05 PM Wighton, Paul mailto:pwigh...@mgh.harvard.edu>> wrote: I think we are on the right track, but it looks like there was a space between FREESURFER_HOME and the equal (=) sign? It also looks like there was no

Re: [Freesurfer] Freesurfer: fs_install_mcr: Unzip command not found

2022-09-15 Thread Wighton, Paul
From: freesurfer-boun...@nmr.mgh.harvard.edu on behalf of Wighton, Paul Sent: Thursday, September 15, 2022 9:56 AM To: Freesurfer support list Subject: Re: [Freesurfer] Freesurfer: fs_install_mcr: Unzip command not found Hi Justina, Ok so on your computer, the subjects are located

Re: [Freesurfer] Freesurfer: fs_install_mcr: Unzip command not found

2022-09-15 Thread Wighton, Paul
learning student of linux system) how I can move these files instead of through my computer manually? Does the problem lie somewhere else? Thank you and I appreciate your time and efforts. Sincerely, Justina On Wed, Sep 14, 2022 at 5:07 PM Wighton, Paul mailto:pwigh...@mgh.harvard.edu>> wrote

Re: [Freesurfer] Freesurfer: fs_install_mcr: Unzip command not found

2022-09-13 Thread Wighton, Paul
for this? Sincerely, Justina On Tue, Sep 13, 2022 at 8:33 PM Wighton, Paul mailto:pwigh...@mgh.harvard.edu>> wrote: Hi Justina, Are you in the right directory (/usr/local/freesurfer/7.3.2/bin)? Can you try `cd /usr/local/freesurfer/7.3.2/bin` then `sudo fs_install_mcr R2019b`?

Re: [Freesurfer] Freesurfer: fs_install_mcr: Unzip command not found

2022-09-13 Thread Wighton, Paul
: command not found The same problem persists yet again :( Does the problem lie somewhere else? Sincerely, Justina On Tue, Sep 13, 2022 at 8:49 PM Wighton, Paul mailto:pwigh...@mgh.harvard.edu>> wrote: Ah ok, let's try this: cd /usr/local/freesurfer/7.3.2/bin sudo FREESURFE

Re: [Freesurfer] Freesurfer: fs_install_mcr: Unzip command not found

2022-09-13 Thread Wighton, Paul
Hi Justina, It looks like the matlab installer is trying to use unzip​ but it can't find it. Can you try running: `sudo apt-get install unzip` To install unzip then try the matlab installer again? -Paul From: freesurfer-boun...@nmr.mgh.harvard.edu on behalf

Re: [Freesurfer] Follow Up License Freesurfer 5.3 Ubuntu

2022-09-13 Thread Wighton, Paul
Hi Rüdiger, This is really interesting.. I'm able to reproduce this issue in a docker container. Anyone else who would like to reproduce or look into this issue can use the following containers - The container `pwighton/freesurfer:5.3.0-HCP` is based off of ubuntu 16.04 (glibc v2.23) and

Re: [Freesurfer] Freesurfer: fs_install_mcr: Unzip command not found

2022-09-13 Thread Wighton, Paul
with my follow-up issue, I appreciate it a lot. Thank you so much. Sincerely, Justina On Tue, Sep 13, 2022 at 4:35 PM Wighton, Paul mailto:pwigh...@mgh.harvard.edu>> wrote: Hi Justina, It looks like the matlab installer is trying to use unzip but it can't find it. Can you try running:

Re: [Freesurfer] Follow Up License Freesurfer 5.3 Ubuntu

2022-09-13 Thread Wighton, Paul
Thanks R, those are very good points. -Paul From: fsbuild Sent: Tuesday, September 13, 2022 2:21 PM To: freesurfer@nmr.mgh.harvard.edu Cc: r.lud...@eni-g.de ; Wighton, Paul ; fsbu...@contbay.com Subject: Re: [Freesurfer] Follow Up License Freesurfer 5.3 Ubuntu

Re: [Freesurfer] Freesurfer: fs_install_mcr: Unzip command not found

2022-09-13 Thread Wighton, Paul
: command not found I'm terribly sorry for the inconvenience. Sincerely, Justina On Tue, Sep 13, 2022 at 8:23 PM Wighton, Paul mailto:pwigh...@mgh.harvard.edu>> wrote: Hi Justina, Ok so it looks like the install script is getting further and has extracted the matlab runtime envir

Re: [Freesurfer] Voxel to mm coordinates

2022-09-21 Thread Wighton, Paul
Hi Panos, Yes that is correct. Taking a voxel value and multiplying it by the vox2ras matrix will give you a coordinate in the "patient coordinate system" which is in mm. RAS denotes that the directions (R)ight, (A)nterior and (S)uperior are positive. -Paul

Re: [Freesurfer] Running recon-all in parallel

2022-10-12 Thread Wighton, Paul
Hi Padma, It looks like tcsh isn't installed. Can you try installing it by running ``` sudo apt update sudo apt install tcsh ``` -Paul From: freesurfer-boun...@nmr.mgh.harvard.edu on behalf of priya padma Sent: Wednesday, October 12, 2022 3:16 AM To:

Re: [Freesurfer] mghread : cannot open the file

2022-10-13 Thread Wighton, Paul
Hi Padma, It can't find the file: /Applications/freesurfer/7.3.2/subjects/tester/mri/aseg.mgz Are you trying to run this on a subject called sub-AD003S1059S61129? If so, can you try: mri_compute_volume_fractions --o test --regheader sub-AD003S1059S61129 /mri/norm.mgz -Paul

Re: [Freesurfer] Freesurfer: fs_install_mcr: Unzip command not found

2022-09-30 Thread Wighton, Paul
w does not seem to work at all. (For example, trying to run the command freeview -v T1.mgz does not produce a freeview to open up on another window.) Could you help me with this? I'm sorry for the troubles once more. Sincerely, Justina On Thu, Sep 15, 2022 at 4:00 PM Wighton, Paul mailto

Re: [Freesurfer] Freesurfer: fs_install_mcr: Unzip command not found

2022-09-30 Thread Wighton, Paul
for the help! Sincerely, Justina On Fri, Sep 30, 2022 at 4:18 PM Wighton, Paul mailto:pwigh...@mgh.harvard.edu>> wrote: Hi Justina, I don't know too much about FreeView, unfortunately. Hopefully others on the list have some ideas. Are you trying to run FreeView inside the FreeSurfer v

Re: [Freesurfer] Error while testing FS version 5.1

2022-10-05 Thread Wighton, Paul
Hi Leema, This is a known issue. It has to do with the behaviour of the crypt() function provided by glibc, which has changed in more recent versions of ubuntu. We don't have a solution for it at this time, unfortunately. If you downgrade to ubuntu version 16.04 (glibc v2.23) the license

[Freesurfer] FreeSurfer equivalent to fslsplit?

2022-12-06 Thread Wighton, Paul
Hey FreeSurfer aficionados, Is there a FreeSurfer equivalent to fslsplit? If I have a 4d nifti, is there a way to split that into a set of 3d niftis from the command line? Thanks, -Paul ___ Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu

Re: [Freesurfer] FreeSurfer equivalent to fslsplit?

2022-12-06 Thread Wighton, Paul
mri_convert can take a frame number. Something like: mri_convert -nth 0 image.nii frame0.mgz mri_convert -nth 1 image.nii frame1.mgz . . . Although that means you have to know how many frames are in the original file From: freesurfer-boun...@nmr.mgh.harvard.edu On Behalf Of Wighton

Re: [Freesurfer] Regarding MRI Understanding.

2022-12-07 Thread Wighton, Paul
(possibly using HCP/UKbiobank to train my model etc). A colleague has recommended using datacamp to learn machine learning and coding in python. I was wondering whether there were any other resources that may be useful? Kind regards, Felicity On Wed, Dec 7, 2022 at 7:33 AM Wighton, Paul

Re: [Freesurfer] Regarding MRI Understanding.

2022-12-06 Thread Wighton, Paul
Hi Rahul, There is are a lot of resources on the "Teach Youself FreeSurfer" page https://surfer.nmr.mgh.harvard.edu/fswiki/TeachYourselfFreeSurfer -Paul From: freesurfer-boun...@nmr.mgh.harvard.edu on behalf of Rahul Sharma Sent: Tuesday, December 6, 2022

Re: [Freesurfer] License issue

2023-01-31 Thread Wighton, Paul
Hi Chris, What version of FreeSurfer are you using? There are some issues with the license file with really old (<6.0) versions, but the 5.3-HCP version should work. https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/5.3.0-HCP/ -Paul From:

Re: [Freesurfer] Transparency issue in FreeView

2023-03-17 Thread Wighton, Paul
4175583741%2F> This article is more geared towards remote debugging, but might give you some insight, https://www.scm.com/doc/Installation/Remote_GUI.html - R. On Mar 16, 2023, at 19:19, Wighton, Paul wrote: Hi All, I have a colleague who is trying to use FreeView on Red Hat En

Re: [Freesurfer] Flipping Thickness Matrices

2023-03-22 Thread Wighton, Paul
then apply to the overlays. -Paul From: Anam Anzak Sent: Wednesday, March 15, 2023 3:52 AM To: Wighton, Paul; Freesurfer@nmr.mgh.harvard.edu Cc: Bernardo Pimentel Subject: Re: Flipping Thickness Matrices External Email - Use Caution Dear Paul

Re: [Freesurfer] Flipping Thickness Matrices

2023-03-07 Thread Wighton, Paul
Hi Anam, Check out mris_left_right_register. It's not super well documented, but it takes as input the right and left hemispheres, inflated onto a sphere, and outputs the left hemisphere registered to the right and the right hemisphere registered to the left, also inflated onto a sphere. If

Re: [Freesurfer] Failing to execute QDEC

2023-02-24 Thread Wighton, Paul
Hi Vittal, I tested your license file and it's fine. Are you sure it's in the right place? What's the output of `cat /usr/local/freesurfer/license.txt`? It also looks like QDEC is trying to write to `/usr/local/freesurfer/subjects/qdec/Untitled/contrasts.sig.mgh` do you have permissions to

Re: [Freesurfer] Freesurfer Digest, Vol 228, Issue 26

2023-02-23 Thread Wighton, Paul
Hi Juan, It is possible, but not recommended because differing versions of FreeSurfer will introduce biases into the analysis. -Paul From: freesurfer-boun...@nmr.mgh.harvard.edu on behalf of Juan Rivas Sent: Thursday, February 23, 2023 10:00 AM To:

Re: [Freesurfer] FreeSurfer container recipe?

2023-04-06 Thread Wighton, Paul
Hi Bennet, I've been doing my best to support building FreeSurfer containers via neurodocker (https://github.com/ReproNim/neurodocker). This template should give you a good idea of the pre-reqs for a FreeSurfer container.

Re: [Freesurfer] installation of two versions of freesurfer on same computer...

2023-02-03 Thread Wighton, Paul
Hi Gonzalo, Download the .tar.gz files for the versions you're interested in and extract to different directories. https://surfer.nmr.mgh.harvard.edu/pub/dist/freesurfer/ Then to run a particular version, set the environment variable FREESURFER_HOME to the install directory of version you

Re: [Freesurfer] apply an existing linear transform to a GRE phase map

2023-05-03 Thread Wighton, Paul
External Email - Use Caution Hi Daniel, It's been a while since I looked into this, but I think you'll need to use `lta_convert` to convert your lta to xfm format, then use `mri_add_xform_to_header` to overwrite the header of your phase map. You might have to extract the

Re: [Freesurfer] PetSurfer, PET data format, mri_convert

2023-07-28 Thread Wighton, Paul
External Email - Use Caution Hi Zeyu, It looks like your files are in 'interfile' format. If you have access to pmod, you might be able to use that to convert your files to nifti.

Re: [Freesurfer] Freesurfer 7.3.1 MCR 2019b

2023-12-07 Thread Wighton, Paul
appending that to $LD_LIBRARY_PATH didn’t help. Any other tricks? Thanks so much! Regards, Xiaoxu From: freesurfer-boun...@nmr.mgh.harvard.edu On Behalf Of Wighton, Paul Sent: Thursday, December 7, 2023 10:35 AM To: Freesurfer support list Subject: Re: [Freesurfer] Freesurfer 7.3.1 MCR 2019b Hi

Re: [Freesurfer] Freesurfer 7.3.1 MCR 2019b

2023-12-07 Thread Wighton, Paul
for LGI, will you please kindly let me know and I’ll give it a try too? Thank you so much! Regards, Xiaoxu From: freesurfer-boun...@nmr.mgh.harvard.edu On Behalf Of Wighton, Paul Sent: Thursday, December 7, 2023 11:54 AM To: Freesurfer support list Subject: Re: [Freesurfer] Freesurfer 7.3.1 MCR

Re: [Freesurfer] Freesurfer 7.3.1 MCR 2019b

2023-12-07 Thread Wighton, Paul
Hi Xiaoxu, This is how I built a FreeSurfer 7.1.1 container with matlabmcr 2014b (https://github.com/pwighton/fs-docker/blob/master/notes/20201127-fs711-neurodocker-min.md#freesurfer711) ``` neurodocker generate docker \ --base continuumio/miniconda:4.7.12 \ --pkg-manager apt \