Thanks Lee. I'll see how this works. I hope these examples make me an expert 
too.

Best,
Jennifer

-----Original Message-----
From: Lee Tirrell [mailto:ltirr...@nmr.mgh.harvard.edu] 
Sent: Saturday, August 29, 2015 5:50 PM
To: Kriegel, Jennifer Lynn Sarai
Cc: Freesurfer support list
Subject: RE: [Freesurfer] surface lines in manual edits

Hi Jennifer,

The mri_segment command only creates a volume file that is similar to wm.mgz, 
it doesn't reproduce the surfaces.  You can think of it like a command that 
adds or removes voxels from the wm.mgz based on intensity values in the 
brain.mgz (or whatever image you give it as input; brain.mgz is the volume 
recon-all uses for wm segmentation).

Since your original wm.mgz file covered almost the entire brain 
(original_wm.jpg), I clicked around and noticed that the intensity values for 
what should be grey matter were much higher in your brain.mgz (up to around 
100, when they're usually in the 70s)


I tried a few different wlo values, and visually inspected the resulting file 
in freeview to see how it looks. For example (see attached wlo-105_wm.jpg for
screenshot):

mri_segment -wlo 105 brain.mgz test_wm.mgz freeview brainmask.mgz 
test_wm.mgz:colormap=heat:opacity=0.2

This test_wm.mgz looks much better than your original wm.mgz, so I figured this 
would be a good value to use for your expert options. From there, I just ran 
the recon-all command with the expert.opts file (see recon-all_xprt-opts.jpg 
for screenshot of results):

recon-all -autorecon2-wm -autorecon3 -expert /path/to/expert.opts -s 
subject_name

with the expert.opts file containing these two lines:

mri_segment -wlo 105
mris_make_surfaces  -wlo 105

I didn't test out the mris_make_surfaces command, I just used the same wlo 
value as for mri_segment as Bruce suggested since mris_make_surfaces also uses 
an intensity value to find the border between white matter and gray matter. The 
white surfaces are based off of the wm.mgz so if the results of mri_segment 
with your wlo value looks good, the surfaces with that wlo value should also be 
improved. Since the results of re-running recon-all looked pretty good, I 
didn't try changing more parameters. If you wanted to try this yourself, the 
command recon-all uses is this (change lh to rh to do the right hemisphere):

mris_make_surfaces -noaparc -whiteonly -mgz -T1 brain.finalsurfs -wlo 105 
subject_name lh

You can run mris_make_surfaces --help for more info, and look at the 
scripts/recon-all.cmd file for the exact command that recon-all used (the 
recon-all.log file also contains the commands and all terminal output).  These 
commands take longer to run than mri_segment, and only do one hemi at a time.

Hope this puts you on a path to becoming a Freesurfer expert.

Best,
Lee


On Sat, 29 Aug 2015, Kriegel, Jennifer Lynn Sarai wrote:

> Hi Lee,
>
> I’m replying to the list on this, in case anyone else echoes this trouble 
> when altering surfaces. In addition to the email help,  I also checked the 
> thread noted, which specified that the recon-all.log file would have the line 
> information. I followed the mri folder commands you offered, both as more 
> recent, as well as the fact that the recon-all.log file listed a mean, not a 
> solid min/max number.
>
> I’ve been trying to play around with the command options you gave me, so that 
> the other two brains that had this problem at the initial reconstruction can 
> also be adjusted, and I know what I’m doing.
>
> When I ran this command:
>
> mri_segment -wlo 105 brain.mgz 105_o01.mgz
>
> it produced a file, but I can’t tell how the normalization intensity 
> is from the file set up, and I ended up with no segment lines. Hence 
> the second command line, I’m sure…
>
> However, some of this makes sense to me on this, and some doesn’t. There’s a 
> segment.dat file in the MRI folder, and thus it runs the adjustment command 
> on the brain.mgz file. There is no make_surfaces.dat file. I figured I’d run 
> the command for the fun of it:
>
> mris_make_surfaces  -wlo 105 brain.mgz 105_o01.mgz – using brain.mgz because 
> of the instructions you’d given me to run the commands from the mri folder, 
> and assuming the logic that both commands were altering the brain.mgz file.
>
> and got told there was no brain.mgz subject in my directory:
> /home/jlk130230/anatomical/brain.mgz/mri/filled.mgz was the volume that 
> couldn’t be opened.
> So, I moved back out to my subject directory for this, based on both 
> the error and the wiki information on the command, using:
>
> mris_make_surfaces -wlo 105 fmri35_o01 r l  105_o01.mgz
>
> based on the wiki information to use the subject, then input information on 
> hemispheres, and the volume to be altered. This time, I thought maybe that it 
> needed to alter the 105_o01 file I’d created with the segment command, since 
> that was the dat file that was located in the folder.
>
> However, first – unlike the instructions on the wiki stated, the hemisphere 
> information was not recognized, it was seen as a file name:
>
> /home/jlk130230/anatomical/fmri35_o01/surf/r.orig: could not open file 
> No such file or directory
>
> So, I got rid of the hemisphere information, and ran it without that – 
> mris_make_surfaces -wlo 105 fmri35_o01  105_o01.mgz
>
> This time, I realized there is no surf folder that is recognized based on the 
> file name -  /home/jlk130230/anatomical/fmri35_o01/surf/105_o01.mgz.orig does 
> not exist.
>
> The surf file is outside of the mri folder, and also contains no dat file 
> with the mris_make_surfaces command, and the mri folder has a 
> brainfinalsurfs.mgz file – but, it doesn’t seem like this would help edit the 
> new volume either, nor is it specifically "surf."
>
> While searching the wiki on expert opts, I found Bruce’s notice on some 
> commands being designed to be sure that experts were using them – which I’m 
> sure I’m not – but, do you think you can point me in the right direction on 
> this!!!!
>
> Thanks very much!
>
> Jennifer Kriegel
>
> -----Original Message-----
> From: freesurfer-boun...@nmr.mgh.harvard.edu 
> [mailto:freesurfer-boun...@nmr.mgh.harvard.edu] On Behalf Of Lee 
> Tirrell
> Sent: Friday, August 28, 2015 4:06 PM
> To: Freesurfer support list
> Subject: Re: [Freesurfer] surface lines in manual edits
>
>
> After taking a look through some of these subjects, it appears there is low 
> contrast between white and gray matter.  The gray matter has higher intensity 
> than what is normally expected by Freesurfer.  Re-running the subjects with 
> expert options that raise the lower intensity threshold for white matter 
> greatly improves the result (although further edits to wm.mgz may also be 
> necessary).  The command would be:
>
> recon-all -autorecon2-wm -autorecon3 -expert /path/to/expert.opts -s 
> subject_name
>
> The expert.opts files contains these two lines:
>  mri_segment -wlo 105
>  mris_make_surfaces  -wlo 105
>
> If you want to play around with how these expert options are working, you can 
> run the command below from your subject's mri directory (it is quick). This 
> is the command that makes the first guess at wm.mgz. By default, wlo is 90, 
> but since the gm is so bright, it needs to be raised so that only voxels with 
> intensity >105 are considered wm. I tried a few different values and looked 
> at the output_file.mgz in freeview before settling on 105 for your subject.
>    mri_segment -wlo <num> brain.mgz <output_file.mgz>
>
>
> A previous thread with the subject "how to shrink wm surface" gives some 
> further detail from Bruce and others.
> http://www.mail-archive.com/freesurfer%40nmr.mgh.harvard.edu/msg37990.
> html
>
> Best,
> Lee
>
> On Mon, 24 Aug 2015, Bruce Fischl wrote:
>
>> Hi Jennifer
>>
>> sorry for the lack of response - do you want to upload your subject 
>> data (the entire subject directory) and we will take a look?
>>
>> cheers
>> Bruce
>>
>>
>>
>> On Mon, 24 Aug 2015, Kriegel, Jennifer Lynn Sarai wrote:
>>
>>>
>>> Hi,
>>>
>>>  
>>>
>>> I apologize for asking this question again, but I’m still not 
>>> receiving any answers on what things I might try. I’ve only been 
>>> using Freesurfer about 3 months, and have basically been working on 
>>> the same analysis project, so I’m pretty new to the tool.
>>>
>>>  
>>>
>>> Again, I have brain surfaces where the white matter surface gets 
>>> confused with the brain surface after control point corrections, and 
>>> after a suggestion from another question asker, I deleted control 
>>> points with zeroes from the control dat files and reran subject 
>>> reconstructions, to get the same results.
>>>
>>>  
>>>
>>> What possible trouble-shooting method could I do on this? Should I 
>>> start the reconstruction edits over completely (several hours per
>>> brain) using only white matter edits for the white matter surface 
>>> instead of control points?
>>> Does anyone have any suggestions at all?
>>>
>>>  
>>>
>>> Thanks.
>>>
>>> Jennifer Kriegel
>>>
>>>  
>>>
>>> From: freesurfer-boun...@nmr.mgh.harvard.edu
>>> [mailto:freesurfer-boun...@nmr.mgh.harvard.edu] On Behalf Of 
>>> Kriegel, Jennifer Lynn Sarai
>>> Sent: Thursday, August 20, 2015 7:08 AM
>>> To: Freesurfer support list
>>> Subject: Re: [Freesurfer] surface lines in manual edits
>>>
>>>  
>>>
>>> Hi Freesurfer experts,
>>>
>>>  
>>>
>>> I asked this question yesterday. I ended up seeing that a similar 
>>> question had been asked in July, and spoke to the asker of the 
>>> question, who told me his problem had been zeroes on the control 
>>> point dat file, for several points.
>>>
>>>  
>>>
>>> I have attempted to go back through these, and reran several 
>>> subjects with such zeroes removed, however – the same problem 
>>> reoccurs with the white matter surface being seen as the brain surface. Any 
>>> help would be welcomed.
>>>
>>>  
>>>
>>> Thank you.
>>>
>>>  
>>>
>>> From: freesurfer-boun...@nmr.mgh.harvard.edu
>>> [mailto:freesurfer-boun...@nmr.mgh.harvard.edu] On Behalf Of 
>>> Kriegel, Jennifer Lynn Sarai
>>> Sent: Wednesday, August 19, 2015 10:44 AM
>>> To: freesurfer@nmr.mgh.harvard.edu
>>> Subject: [Freesurfer] surface lines in manual edits
>>>
>>>  
>>>
>>> Hi,
>>>
>>>  
>>>
>>> I’m hand editing brains to get the most accurate cortical thickness 
>>> analysis possible, and ran into a bit of a problem with surface 
>>> lines. One issue is with the original structural reconstructions 
>>> from the hdr files, and the other deals with the manual edits I’ve 
>>> made when the recon was re-run.
>>>
>>>  
>>>
>>> 1.       A couple of the volumes initially had the white matter 
>>> surface as the pial surface/cortical surface. Initially I tried 
>>> running g-cut for some of the suggestions I found on the wiki when 
>>> the surface lines are off. This didn’t work on those problem volumes.
>>>
>>> 2.       When editing with control points in order to get the white 
>>> matter areas that were not incorporated into the white matter 
>>> surface included, the control points have overcoverected and made 
>>> the same issue that was the occurrence with the two or three 
>>> original volumes – the white matter surface is seen as the 
>>> brain/pial surface. I was conservative with these as well.
>>>
>>>  
>>>
>>> I have been looking on the wiki for a way to adjust the actual 
>>> surface lines manually based on the actual white matter/brain 
>>> surface. I think this would be most useful, but I’m not sure if it 
>>> is possible. If so, how could this be done – and, if not, what 
>>> possible way of trouble shooting can help deal with this white 
>>> matter as pial surface issue?
>>>
>>>  
>>>
>>> Best regards,
>>>
>>>  
>>>
>>> - Jennifer Lynn Sarai Kriegel
>>>
>>> MS in Psychological Sciences, Cognition and Neuroscience Emphasis
>>>
>>> Functional Neuroimaging of Memory Lab, Center for Vital Longevity
>>>
>>> The University of Texas at Dallas
>>>
>>> jlk130...@utdallas.edu
>>>
>>> ------------------------------------------------------------
>>>
>>> I am looking for a lot of men who have an infinite capacity to not 
>>> know what can't be done.
>>>
>>> - Henry Ford
>>>
>>>  
>>>
>>> The important thing is not to stop questioning. Curiosity has its 
>>> own reason for existing.
>>>
>>> - Albert Einstein
>>>
>>>  
>>>
>>>
>>
>
>
>


The information in this e-mail is intended only for the person to whom it is 
addressed. If you believe this e-mail was sent to you in error and the e-mail 
contains patient information, please contact the Partners Compliance HelpLine 
at http://www.partners.org/complianceline . If the e-mail was sent to you in 
error but does not contain patient information, please contact the sender and 
properly dispose of the e-mail.

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

Reply via email to