[Freesurfer] How to verify that cortical surface orientation volume w/ respect to b0 is accurate?

2022-09-28 Thread Bansal, Krishan Chandra
External Email - Use Caution

I have created a volume which is supposed to have the cortical surface 
orientation with respect to b0 at each voxel. To do this I got the 6 frame 
overlay file from mris_convert. Then I isolated the first 3 values from each 
row in Matlab to create an Nx3 matrix, then from this I calculated the angle 
between each row vector and the b0 vector (which was just [0 1 0]) using the 
usual angle between two vectors formula. The result was an Nx1 matrix.I then 
saved it as an .mgh surface file (using save_mgh)  and projected it back onto 
the original volume using surf2vol. I believe that I did this correctly, 
however the professor that I am developing this method for told me he wants me 
to verify that the results are correct. He was not very specific in how to do 
this, all he told me was that I could use volumes of the individual scanner 
x,y,z angles to help me figure out if my b0 results are right. What I assume he 
meant is: since the b0 axis goes vertically down the middle of the brain when 
in coronal view I can tell if the b0 angles are correct by seeing where the 
cortical surface is with respect to the z scanner direction and seeing if the 
b0 angle at the corresponding location makes sense. My problem is that I can’t 
tell if my results make sense. In theory I believe that at the locations where 
the cortex appears to be orthogonal to the B0 (z scanner) axis, the overall B0 
angle of the cortical surface should be closer to 90 degrees. I still don’t 
understand what pattern I should be seeing in the values of the z scanner 
volume compared to the b0 angles volume. Comparing my z scanner volume results 
to the B0 angle volume the only pattern I can see is that the cortical surface 
with respect to B0 is closer to 90 degrees when the z scanner volume is closer 
to 0 degrees. No B0 angle I got is actually greater than 89 though. I can’t 
tell if this is the right pattern or enough to verify the results in the way 
the professor I’m working for wants. Any help here would be GREATLY 
appreciated. So far I have been able to get pretty far in teaching myself 
Freesurfer, but the some of the underlying mathematics about how to verify my 
results are unclear. I can send pictures of my results if someone wants to look 
at them.
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
 .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 


[Freesurfer] Assistant Professor in Cognitive Neuroscience at UW-Milwaukee

2022-09-28 Thread Caitlin R Bowman
External Email - Use Caution

The University of Wisconsin-Milwaukee (UWM) is seeking applicants for a 
tenure-track faculty position in Cognitive Neuroscience. UWM is a Carnegie 
“Research 1” institution located in Wisconsin’s cultural and economic center. 
We are interested in recruiting outstanding scientists that will build directly 
on the current strengths of our program 
(http://secure-web.cisco.com/1k866Hj6O0LlrfeDn8tfH4EdKsnTmoH6F2ktOgucr0s8Ck9ucjLVxu77pdb5PtTw7JQiPBOX9mLxVZ-PzchE5EzuBFSTT5IEaHt4kMuxNJcpiVmM_HxU4siph_zt4UBMGGBlh5f-F4sMYXFshE8BmqJf5yI8CTz70JXSZUbKBqzmwQgvSKw63gKM0m5oDuMSzUlZN9qHAXrA7VipwOrDN7ZyRAnbvlYcLMIA-9J_y45AP6KiPQBY7pAI5tqudZa-G9K_7lXgXWndMkm9yur_wDAcLief0zsgUb_ozk29cjEwHmRPAv83uWK4QZufBGnRKMXTyGmDjdJsZEmLFEsIqlQ/http%3A%2F%2Fneuroscience.uwm.edu).
 We expect to make an appointment at the Assistant Professor level. 
Responsibilities include developing an independent extramurally funded research 
program and teaching graduate and undergraduate courses in the neurosciences 
and experimental psychology.

Successful applicants will have access to two research-dedicated MRI scanners 
maintained by the Center for Imaging Research 
(https://secure-web.cisco.com/13spGP24aK2sb8fPfNu2ykeT0PNJZJAabHc-QLtSPpbbMDLcU8ii_FPlv84FMoCTFrjII6LqL3oeCDtEu6-NvUBrx_c8GaIfNFR2xvYoAliU6Y-BM_i5uP-fGVc6pkiuoIRXMMXiRUKGMW34Rf1C_UmoLuO9gr3UvNlce5MsiSvTbUkQ0Uk3_yxmL5tBJugaEQvbxXltgbLsmHlPDfhZqRCIKfNB7k-wjAjS2DJCIi09znd4wTi9xgvUoq7RHQVNikMPvMk1YwYhBRVFAgyT8XYrv4m8nRz1fCj-KFQRnpbBldqVj8jlROEajuzCAA_rV61_bgmCi2LhOjk9cS6-MMg/https%3A%2F%2Fwww.mcw.edu%2Fdepartments%2Fcenter-for-imaging-research)
 and should be actively conducting novel, theory-based research in the domain 
of cognitive neuroscience. Outstanding individuals who use cutting-edge 
neuroimaging and/or computational methods to address questions about 
perception, attention, memory, aging, emotion, decision-making, or any 
combination of these cognitive domains are encouraged to apply. Individuals 
from minoritized, underrepresented communities are particularly encouraged to 
apply.

See full job posting: 
https://secure-web.cisco.com/1cPlunNEn-50PO-A_IKfS2IE4eWAFUpiXPigrsu7QTG1F9hJfFCDDUESbGs2lCZxGOut6ZwLFPW-VaI3s2DQA7mSV_6hAhWNgh1NkkQxmIOf3DLrSqoA36aPjTOr-YESHihW37FpldMDntBg0Nq9eVeY0dlBorOG8WhUTzowGAxc0nvDFKDaWN-Jbb5ktrUQyUpaxTO5yPx7VL0fTAN_ZHXsCLXfOoUzKyLGlnuwE2a14rQ0y6OImQzPb9buN_S3EgdbHGOcew2Fj_NcOB4jgQoSeUP_29IHEdVP0pm3UZEIvaMxy4273tcjEk3UtU2Ap3CAbu3fSLxWTm3wfgIiXkQ/https%3A%2F%2Fjobs.uwm.edu%2Fpostings%2F35462

Contact Caitlin Bowman (bowm...@uwm.edu) with questions.


--
Caitlin Bowman, Ph.D.
Assistant Professor of Psychology
University of Wisconsin-Milwaukee
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
 .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 


[Freesurfer] tissue type not set in mri_compute_volume_fractions

2022-09-28 Thread Bauer, Martin
External Email - Use Caution

Dear Freesurfer experts,

I’m trying to get a 5TT output from freesurfer data as FSL would provide it 
using MRtrix wrapper 5ttgen fsl. mri_compute_volume_fractions looks like doing 
the job, but I can’t wrap my head around some tissue type that seemed to be 
missing.

For clarification, its infant data but it comes from a freesurfer based 
processing pipeline. If I’m using it like this:

mri_compute_volume_fractions --o test --regheader 2035 
/Users/path/to/data/2035/mri/norm.mgz

I’ll get this error:

$Id: mri_compute_volume_fractions.c,v 1.22 2015/09/14 12:25:01 fischl Exp $
sysname  Darwin
hostname 
xxx.charite.de
machine  x86_64
user martinbauer
setenv SUBJECTS_DIR /Users/martinbauer/Daten/MRI/FS_corrected
cd /Users/martinbauer
mri_compute_volume_fractions --o test --regheader 2035 
/Users/martinbauer/Daten/MRI/FS_corrected/2035/mri/norm.mgz
outstem test
regfile (null)
regtype 0
segfile aseg.mgz
wsurf white
psurf pial
TempVolFile (null)
USF 2
Reading in aseg and surfs from /Users/martinbauer/Daten/MRI/FS_corrected/2035
Loading /Users/martinbauer/Daten/MRI/FS_corrected/2035/mri/aseg.mgz
Changing type of seg from UCHAR to INT
Filling empty voxels with extracerebral CSF (if not there already), nDil=3
Computing registration from header
 1.0   0.0   0.0   0.0;
 0.0   1.0   0.0   0.0;
 0.0   0.0   1.0   0.0;
 0.0   0.0   0.0   1.0;
  t = 4.53563
Computing PVF (USF=2, resmm=0.50)
  MRIhiresSeg(): filling unknowns with 257
ERROR: MRIseg2TTypeMap() tissue type for seg 172 Vermis not set


Fair enough, so I force it using finer parcellations doing:

mri_compute_volume_fractions --o test --regheader 2035 
/Users/path/to/data/2035/mri/norm.mgz --seg aparc.a2009s+aseg.mgz

Vermis is now part of the game but:

$Id: mri_compute_volume_fractions.c,v 1.22 2015/09/14 12:25:01 fischl Exp $
sysname  Darwin
hostname 
xxx.charite.de
machine  x86_64
user martinbauer
setenv SUBJECTS_DIR /Users/martinbauer/Daten/MRI/FS_corrected
cd /Users/martinbauer
mri_compute_volume_fractions --o test --regheader 2035 
/Users/martinbauer/Daten/MRI/FS_corrected/2035/mri/norm.mgz --seg 
aparc.a2009s+aseg.mgz
outstem test
regfile (null)
regtype 0
segfile aparc.a2009s+aseg.mgz
wsurf white
psurf pial
TempVolFile (null)
USF 2
Reading in aseg and surfs from /Users/martinbauer/Daten/MRI/FS_corrected/2035
Loading /Users/martinbauer/Daten/MRI/FS_corrected/2035/mri/aparc.a2009s+aseg.mgz
Filling empty voxels with extracerebral CSF (if not there already), nDil=3
Computing registration from header
 1.0   0.0   0.0   0.0;
 0.0   1.0   0.0   0.0;
 0.0   0.0   1.0   0.0;
 0.0   0.0   0.0   1.0;
  t = 4.40752
Computing PVF (USF=2, resmm=0.50)
  MRIhiresSeg(): filling unknowns with 257
ERROR: MRIseg2TTypeMap() tissue type for seg 12104 ctx_rh_G_and_S_subcentral 
not set

What files are exactly read and can those files be adjusted? In 
FreeSurferColorLUT.txt Vermis and 12104 are included, I tried to add 12104 to 
the parcellation stats LUT but it didn’t solve the problem. I’m also open to go 
another way.
Thank you so much in advance for pointing me towards the right direction!

All the best,
Martin
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
The information in this e-mail is intended only for the person to whom it is 
addressed.  If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Mass General Brigham 
Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline 
 .
Please note that this e-mail is not secure (encrypted).  If you do not wish to 
continue communication over unencrypted e-mail, please notify the sender of 
this message immediately.  Continuing to send or respond to e-mail after 
receiving this message means you understand and accept this risk and wish to 
continue to communicate over unencrypted e-mail. 


Re: [Freesurfer] White matter normalization of FLAIR images

2022-09-28 Thread James Brown
External Email - Use Caution

Dear Dr Bruce,
Thank you very much for answering my questions and for help. We highly
appreciate you.

All the best
James

   1. Sigma is the smoothing kernel applied to the bias field so you can
   make it pretty large depending on how high frequency your bias field is
   (typically defined by the size of your receive coils)
   2. min_dist specifies the minimum distance from the surface a voxel must
   be for it to be considered as a potential control point
   3. I don’t see why not although I’ve never tried it. It won’t fix
   slice-specific artifacts in e.g. interlaced acquisitions
   4. We estimate the bias field from the white matter, then apply it to
   the whole brain.



I don’t think nonmax_suppress will do anything without surfaces though



Cheers

Bruce

On Tue, Sep 27, 2022 at 7:20 AM James Brown  wrote:

> Dear Dr Greeve and Dr Fiscle,
> I am grateful to you guiding me through this. Indeed, I can see in
> recon-all.log how Freesurfer 7.3.2 is normalizing the Flair images. *it
> uses the command below:*
>
>  aseg.presurf.mgz -surface lh.white identity.nofile -surface rh.white
> identity.nofile FLAIR.prenorm.mgz FLAIR.norm.mgz >
>
> I tried to run the previous command without the flag -surface" and it
> seems to be working. using this command
>
>  --no-skull >
>
> I would like to inquire about the following points and I highly appreciate
> any clarification you might provide:
> 1- It seems mri_normalize uses default sigma of 8 for normalizing T1
> images and 0.5 for Flair. How far can we go up with this value? More
> specifically, when I have noticed when I increase sigma in noisy flair
> images in my dataset, I get better out put images in terms of less
> noticeable motion artifacts. Is there any cut off value for sigma? Can I
> use high values up to (e.g. 25)?
> 2-  What does the flag "-min_dist" do? I tried to find information in
> mri_normalize man (i.e. help ) but I couldn't find information about this
> flag. I assume it has to do with the flag surface and they both should be
> used together?
> 3- Can I use mri_normalize on 2D flair images ?
> 4- Is it recommended to do whole brain normalization (white/gray and csf)
> or just white matter normalization within a mask.
>
> Thank you very much for all that you do.
>
> James
>
>
>
>
>
> it looks like you are using v6. In v6, the flair might not have been
> normalized
> 
> On 9/23/2022 3:53 PM, Fischl, Bruce R.,PHD wrote:
>
> I think you need to add something like -FLAIRpial or -T2pial so it uses it
> (in which case it will first normalize it), but hopefully someone else can
> confirm
>
> cheers
> Bruce
>
>
> On Fri, Sep 23, 2022 at 2:40 PM James Brown  wrote:
>
>> Dear Dr Bruce,
>> Thank you very much for your guidance.
>> I ran recon-all on a subject "test" using Freesurfer V6.0 and the
>> following command line is reported in the "recon-all.log":
>>
>> /usr/local/freesurfer/6.0/bin/recon-all -all -qcache -i T1.nii.gz -flair
>> FLAIR.nii.gz -s test
>>
>> When I search for normalization of flair, I only find how Freesurfer
>> normalized T1.
>> I searched for "nonmax_suppress" and it is not in the log file. I am just
>> wondering what I am doing wrong. Thanks again for any highlights about the
>> correct method to normalize FLAIR
>>
>> Sincerely,
>>
>>
>>
>> Hi JamesB
>>
>> there is T2/FLAIR normalization in recon-all if you process it through
>> there. You can look for "nonmax_suppress" if you want to find the command
>> line
>>
>> cheers
>> Bruce
>>
>> On Fri, Sep 23, 2022 at 2:06 PM James Brown  wrote:
>>
>>> Dear Freesurfer experts,
>>> We appreciate any advice or guidance from your community of
>>> professionals and experts in the field about the issue below.
>>>
>>> Thank you for your kindness.
>>>
>>> Dear Freesurfer experts,
>>> In order to normalize white matter intensity of T1 images and correct
>>> for bias field. We do the following steps:
>>> mri_convert T1.nii.gz T1.mgz
>>> mri_nu_correct.mni --i T1.mgz --o T1_N3.mgz --n 2
>>> mri_normalize -g 1 T1_N3.mgzT1_norm.mgz
>>> mri_convert T1_norm.mgz T1_norm.nii.gz
>>>
>>> We would like to apply bias field correction on FLAIR images then
>>> normalize white matter intensity.
>>> We tried N4biasfieldcorrection from ANTS but it didn't work as expected.
>>> Reviewing documents about N4biasfieldcorrection we realize that the
>>> algorithm has been developed to correct bias field correction in T1 not
>>> clear if it works on FLAIR images.
>>>
>>> Are the steps above valid for normalizing FLAIR images or can it only be
>>> applied on T1 images? I would like to send a "recon-all.log" file that
>>> includes the processing steps of FLAIR. Is there any link I can use to
>>> upload the file. It gets rejected every time I send it due to size
>>> limitations.
>>>
>>> We appreciate any feedback about the proper way to correct FLAIR images
>>> for bias fields and normalize white matter intensity in FLAIR images.
>>>
>>> Thank you
>>> JamesB
>>>
>>> On Wed