[Freesurfer] subcortical masks

2008-10-20 Thread Martin Ystad
Hi, I'd like to create binary masks in the nifti-format from each of the 
subcortical segmentations in freesurfer, separately (one for 
hippocampus, one for thalamus, and so forth..). Is there any way to do 
this automatically from the command line?


Thanks,
Martin Ystad
Ph.D. candidate,
University of Bergen

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


[Freesurfer] Version re-run

2009-02-16 Thread Martin Ystad
Hi all,
I have 100-something scans already run on a FreeSurfer version from 2005 
that I'd like to re-run with the newest version of FreeSurfer. The 
subjects contain manual edits to the brainmask.mgz and wm.mgz, as well 
as control points. As far as I have understood, when running autorecon2 
my manual edits will be saved by default. However, is there any need to 
re-run the autorecon1-steps for my subjects?

Also: when do you plan to release the next version of FreeSurfer?

Many thanks,
Martin Ystad
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


[Freesurfer] create volumes from surfaces

2009-11-13 Thread Martin Ystad
Hi,
I'm working on a fractal dimension analysis of the pial- and 
white-matter surface. The matlab script that calculates the fractal 
dimension needs binary nifti-files as input. Since FreeSurfer creates 
the surfaces I need, here's what I want to do:
I'd like to convert the pial and white-matter surfaces (separately) to 
.nii-volumes (e.g. 256x256) where the voxels intersected by the 
respective surfaces are white, and everything else is black. 
Furthermore, I'd like to do this for individual subregions of each 
surface; for example only the precentral gyrus or the whole frontal 
lobe, so that only the voxels intersected by the surface belonging to 
the specific label I choose appear white, and everything else is black.
How do I get this output from FreeSurfer?

Thanks,
Martin Ystad
PhD-candidate,
University of Bergen, Norway
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] create volumes from surfaces

2009-11-16 Thread Martin Ystad
I tried this, but something is going wrong. Here's what I did:
1. I ran $ mri_binarize --i subjid/mri/aparc+asec.mgz --match xx --match 
yy --o lobe.mgz
- this produces a nice binary mask of, say, the left frontal lobe.
2. Then I ran $ mri_surf2vol --mkmask --surf pial --hemi lh --template 
lobe.mgz --identity subjid --o lobe_surface.mgz
- this produces a nice binary image of the pial surface, but it contains 
the whole surface, not only the intersection with lobe.mgz.
What am I doing wrong?

Thanks,
Martin

Douglas N Greve wrote:
> Use mri_surf2vol to create volumes. You can binarize aparc+aseg.mgz to 
> give a mask of an area (use --match), then take the intersection of the 
> mask with the surface-in-volume.
>
> doug
>
> Martin Ystad wrote:
>   
>> Hi,
>> I'm working on a fractal dimension analysis of the pial- and 
>> white-matter surface. The matlab script that calculates the fractal 
>> dimension needs binary nifti-files as input. Since FreeSurfer creates 
>> the surfaces I need, here's what I want to do:
>> I'd like to convert the pial and white-matter surfaces (separately) to 
>> .nii-volumes (e.g. 256x256) where the voxels intersected by the 
>> respective surfaces are white, and everything else is black. 
>> Furthermore, I'd like to do this for individual subregions of each 
>> surface; for example only the precentral gyrus or the whole frontal 
>> lobe, so that only the voxels intersected by the surface belonging to 
>> the specific label I choose appear white, and everything else is black.
>> How do I get this output from FreeSurfer?
>>
>> Thanks,
>> Martin Ystad
>> PhD-candidate,
>> University of Bergen, Norway
>> ___
>> 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] create volumes from surfaces

2009-11-23 Thread Martin Ystad
Hi, thanks for the answer. Sorry for my delayed response.
I tried the mris_calc command, but it didn't work. Here's the error 
message I got:

"mris_calc: curvature file 'lobe.mgz' has wrong magic number."

The multiplication was easily done i Matlab, but is there any way to do 
this with FreeSurfer?

Thanks,
Martin

Douglas N Greve wrote:
> The 2nd step only creates a mask of the entire surface. You need a 
> step 3 in which you multiply them together:
>
>
> 3. mris_calc -o product.mgz lobe.mgz mul lobe_surface.mgz
>
> Martin Ystad wrote:
>> I tried this, but something is going wrong. Here's what I did:
>> 1. I ran $ mri_binarize --i subjid/mri/aparc+asec.mgz --match xx 
>> --match yy --o lobe.mgz
>> - this produces a nice binary mask of, say, the left frontal lobe.
>> 2. Then I ran $ mri_surf2vol --mkmask --surf pial --hemi lh 
>> --template lobe.mgz --identity subjid --o lobe_surface.mgz
>> - this produces a nice binary image of the pial surface, but it 
>> contains the whole surface, not only the intersection with lobe.mgz.
>> What am I doing wrong?
>>
>> Thanks,
>> Martin
>>
>> Douglas N Greve wrote:
>>> Use mri_surf2vol to create volumes. You can binarize aparc+aseg.mgz 
>>> to give a mask of an area (use --match), then take the intersection 
>>> of the mask with the surface-in-volume.
>>>
>>> doug
>>>
>>> Martin Ystad wrote:
>>>  
>>>> Hi,
>>>> I'm working on a fractal dimension analysis of the pial- and 
>>>> white-matter surface. The matlab script that calculates the fractal 
>>>> dimension needs binary nifti-files as input. Since FreeSurfer 
>>>> creates the surfaces I need, here's what I want to do:
>>>> I'd like to convert the pial and white-matter surfaces (separately) 
>>>> to .nii-volumes (e.g. 256x256) where the voxels intersected by the 
>>>> respective surfaces are white, and everything else is black. 
>>>> Furthermore, I'd like to do this for individual subregions of each 
>>>> surface; for example only the precentral gyrus or the whole frontal 
>>>> lobe, so that only the voxels intersected by the surface belonging 
>>>> to the specific label I choose appear white, and everything else is 
>>>> black.
>>>> How do I get this output from FreeSurfer?
>>>>
>>>> Thanks,
>>>> Martin Ystad
>>>> PhD-candidate,
>>>> University of Bergen, Norway
>>>> ___
>>>> 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] Problems with FSGD file

2006-05-10 Thread Martin . Ystad

Hi,
I'd like to try out some simple regression analysis on some of my data.
I've completed the tutorial until the mri_glmfit step where I get the error 
message:

ERROR: gdfRead: gruppefil.txt is not formated properly

I really can't see what's wrong with my file, I've even copy-pasted one of the
example files from the tutorial just to check if anything is working at all, but
it didn't work either.

GroupDescriptorFile 1
Title KognitivAldringTEST21
Class Class1
CLASS Class2
Variables   Age
Input fs568 Class1  54
Input fs569 Class2  59
Input fs572 Class2  67
Input fs573 Class1  46
Input fs574 Class1  52
Input fs577 Class1  46
Input fs578 Class2  68
Input fs579 Class1  47
Input fs580 Class2  74
Input fs583 Class2  61
Input fs585 Class2  62
Input fs587 Class2  56
Input fs588 Class2  59
Input fs592 Class1  49
Input fs593 Class2  56
Input fs594 Class2  58
Input fs597 Class2  61
Input fs599 Class1  46
Input fs601 Class2  65
Input fs603 Class2  68
Input fs608 Class2  70
DefaultVariable Age


I've tried with classes, without classes, with more variables and so on, but
nothing seems to work.
Any ideas on why I get this error message? I used emacs, vim and open-office to
create my FSGD file, gruppefil.txt.
It's probably just a trivial mistake somewhere, but I just can't seem to find 
it...

Thanks,

MartinYstad
University of Bergen,
Norway
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


[Freesurfer] Resuming recon-all

2006-06-13 Thread Martin Ystad
Hi, some of my subjects crash due to memory-failure way into the 
recon-all stream. Is there any way I can resume the processing stream 
from where it crashed without having to write all the individual 
commands for the rest of the stream?  For example, if my subject crashed 
during autorecon2 -calabel, would there be a command that re-runs 
-calabel and the rest of the autorecon2 stream?


Thanks,

Martin Ystad
University of Bergen, Norway.
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


[Freesurfer] Version problems

2006-11-22 Thread Martin Ystad
Hi, I have currently processed some 100 brains in freesurfer on 
different machines.
Unfortunately, one machine was installed with version 3.0.3 (64 bit 
version), while the other machines were using version 3.0.1 (32 bit).
It now looks like there is a systematic difference in the results from 
the various versions.
I tested my suspicion by processing several identical volumes in both 
versions. The 3.0.3 version under-estimated the Intra Cranial Volume 
compared to the 3.0.1 version (around 75% of the 3.0.1-volume). Most 
other measures were slightly smaller, but no more than between 95-99% of 
the 3.0.1-volumes.


What is the reason for this?
How much of the processing stream do I have to re-run?

Thanks,

Martin Ystad
Medical Student
University of Bergen, Norway.
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


[Freesurfer] Subcortical segmentation

2010-05-13 Thread Martin Ystad
Hi, I noticed that routinely checking the subcortical segmentation 
(aseg.mgz) is not part of the Recommended Reconstruction Work Flow. Is 
this because the subcortical segmentation is highly accurate, or because 
manual intervention in the aseg is not recommended anyway?

Thanks,
Martin Ystad
PhD-student
University of Bergen, Norway
___
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 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.



Re: [Freesurfer] Subcortical segmentation

2010-05-13 Thread Martin Ystad
Maybe I've misunderstood. In
http://surfer.nmr.mgh.harvard.edu/fswiki/RecommendedReconstruction ,
after autorecon2 it says to check white and pial surfaces before running
autorecon3. The linked tutorials on how to do WM, Pial and Final
surfaces edits, does not mention checking the aseg as far as I can see.
Also, to express myself more clearly: I'm thinking of the labeling of
the subcortical structures (thalamus, putamen, etc.). Is there something
I'm missing here?
- Martin

Allison Stevens wrote:
> It should be part of the workflow. Can you show me where it was not listed?
>
> On May 13, 2010, at 7:58 AM, Martin Ystad  wrote:
>
>   
>> Hi, I noticed that routinely checking the subcortical segmentation 
>> (aseg.mgz) is not part of the Recommended Reconstruction Work Flow. Is 
>> this because the subcortical segmentation is highly accurate, or because 
>> manual intervention in the aseg is not recommended anyway?
>>
>> Thanks,
>> Martin Ystad
>> PhD-student
>> University of Bergen, Norway
>> ___
>> 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 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


[Freesurfer] Intensity problems

2005-10-28 Thread Martin Ystad
Hi, I'm currently running the latest developmental release for RedHat 9, 
but I seem to have some problems concerning the intesity-normalization. 
Unfortunately, my images have some intensity inhomogenities, but the 
first normalization-step seems to take care of most of these. However, 
some regions inside the white matter has a somewhat high value, for 
example 130 -140. These regions are not included in the white matter 
when I run the recon-all -segmentation program. Adding control-points to 
these areas does not work, obviously, since only values lower than 110 
are considered when the normalization-step is re-runned. (right?)
Is there any way to include these areas in my final white matter 
whithout manually drawing them onto the wm.mgz -volume? For instance 
raising the threshold for wm-segmentation?
If so, would this produce any kind new artifacts which I need to be 
aware of?


Thanks,

Martin Ystad
Medical Student
University of Bergen
Institute of Biomedicine
Jonas Lies vei 91, 5009
Bergen, Norway.

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


Re: [Freesurfer] Intensity problems

2005-10-30 Thread Martin Ystad
Jenni Pacheco wrote:


Hi Martin,

Control points should fix the problem.  Try adding some to this 
brighter region, as well as a few to regions currently labeled to 
110.  Sometimes this helps. After you've saved your control points (be 
sure to save them) then you should run:


recon-all -normalization -usecontrolpoints -subjid 

to make sure that it uses your control points. If you look at your 
brain T1 volume now, those bright spots should be taken care of.  If 
so you'll need to re-run these steps:
recon-all -skullstrip -subcortseg -normalization2 -segmentation 
-subjid 


If it hasn't worked, let me know, maybe there's another problem.

good luck,
Jenni

On Fri, 28 Oct 2005, Martin Ystad wrote:

Hi, I'm currently running the latest developmental release for RedHat 
9, but I seem to have some problems concerning the 
intesity-normalization. Unfortunately, my images have some intensity 
inhomogenities, but the first normalization-step seems to take care 
of most of these. However, some regions inside the white matter has a 
somewhat high value, for example 130 -140. These regions are not 
included in the white matter when I run the recon-all -segmentation 
program. Adding control-points to these areas does not work, 
obviously, since only values lower than 110 are considered when the 
normalization-step is re-runned. (right?)
Is there any way to include these areas in my final white matter 
whithout manually drawing them onto the wm.mgz -volume? For instance 
raising the threshold for wm-segmentation?
If so, would this produce any kind new artifacts which I need to be 
aware of?


Thanks,

Martin Ystad
Medical Student
University of Bergen
Institute of Biomedicine
Jonas Lies vei 91, 5009
Bergen, Norway.

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






Hi, thanks for your help.
I tried what you suggested and it turned out somewhat better. Still, 
there are large areas that are not included in the wm.mgz. The problem 
with some of the data sets is that the intensity inhomogenities in the 
center of the brain also reaches some very low values. I'm worried that 
if I include these with control-points, some of the gray matter will be 
misinterpreted as white matter. Is this a legitimate concern, or does 
the program work in a different way? If so, how low can the control 
point value be to avoid that this happens?


Ps. If I add a control point to one area with a specific high or low 
value, does this take care of all the other areas with similar values 
across the brain, or do I have to add a control point to all areas that 
have discrepancies in intensity?


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


[Freesurfer] Normalization problem

2005-11-20 Thread Martin Ystad
I'm working on the latest developmental release for Rh. 9. and I'm 
having problems with the normalization procedures on my datasets.
My datasets have large intensity inhomogeneities due to their 
acquisition with a surface coil (8-ch. GE).
To fix this problem I have resorted to the use of control points. This 
works if I add enough points across the brain ( over 200), and I get a 
better normalization result after running "recon-all -normalization 
-usecontrolpoints" and another skull-stripping on the new T1-volume.
To test whether or not this produces a good segmentaition of white 
matter, I run mri_segment on my brain.mgz -volume. If I'm satisfied with 
the segmentation result, I move on to the surface  processing stage, and 
run the -autorecon2 -script.
The problem is that after running the -autorecon2, the normalization is 
completely wrong again, looking more like the first normalization done 
without control points, and the wm.mgz -volume is also bad. So are the 
surfaces.
How do I make freesurfer produce the same good results as I got during 
the first normalization? Do I need to specify the use of control points 
again, even though the brain.mgz volume looks ok?


Thanks,

Martin Ystad
Medical Student
University of Bergen
Institute of Biomedicine
Jonas Lies vei 91, 5009
Bergen, Norway.

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


[Freesurfer] Normalization problem

2005-11-21 Thread Martin Ystad
I'm working on the latest developmental release for Rh. 9. and I'm
having problems with the normalization procedures on my datasets.
My datasets have large intensity inhomogeneities due to their
acquisition with a surface coil (8-ch. GE).
To fix this problem I have resorted to the use of control points. This
works if I add enough points across the brain ( over 200), and I get a
better normalization result after running "recon-all -normalization
-usecontrolpoints" and another skull-stripping on the new T1-volume.
To test whether or not this produces a good segmentaition of white
matter, I run mri_segment on my brain.mgz -volume. If I'm satisfied with
the segmentation result, I move on to the surface  processing stage, and
run the -autorecon2 -script.
The problem is that after running the -autorecon2, the normalization is
completely wrong again, looking more like the first normalization done
without control points, and the wm.mgz -volume is also bad. So are the
surfaces.
How do I make freesurfer produce the same good results as I got during
the first normalization? Do I need to specify the use of control points
again, even though the brain.mgz volume looks ok?

Thanks,

Martin Ystad
Medical Student
University of Bergen
Institute of Biomedicine
Jonas Lies vei 91, 5009
Bergen, Norway.


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


[Freesurfer] Control-points

2005-12-05 Thread Martin Ystad
Hi, I'm using a lot of control-points (typically 200-500) to compensate 
for intensity inhomogeneities in my images.
This tends to create a rather uniformly looking white matter without any 
clearly discernible anatomical landmarks, such as the basal ganglia, 
etc. Does this mean that the subcortical segmentation won't work 
properly? Will this munificent use of control-points constitute a source 
of error for the cortical segmentation, or are the protocols relatively 
robust?


Thanks, 


Martin Ystad
Medical Student
University of Bergen
Institute of Biomedicine
Jonas Lies vei 91, 5009
Bergen, Norway.
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


[Freesurfer] dev-version/new version question.

2006-03-09 Thread Martin Ystad
Hi, I'm currently using the freesurfer-Linux-centos4-dev20060210-full 
release, and I'm thinking of upgrading to the new stable release.
However, I've done a lot of processing with the 20060210-release, and 
I'm not very keen on starting all over again with the new release.
Do you recommend that I reprocess my subjects on the new stable release 
before doing a group study, or are they similar enough in terms of 
results, so that I don't need to?
In case I do need to run everything over, which steps do I need to rerun 
(certainly not all?), and can I keep my manual edits to the brainmask- 
or wm-volume?


Thanks,
Martin Ystad
University of Bergen, Norway.

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


[Freesurfer] Autorecon1

2006-03-15 Thread Martin Ystad
Hi,
I have processed some of my subjects on a previously released 
dev-version (20060210). I have changed to the new stable release. Do I 
need to run the -autorecon1 step again, or will -autorecon2 and -3 
suffice to bring the previously run subjects up to date? (the 
brainmask-volumes have been edited, so I'd like to keep these changes)


Another question; if I run the -autorecon2-wm flag, will I save a lot of 
computing time if I manually remove the Optic Nerve before doing so?


Thanks,

Martin Ystad
University of Bergen,
Norway.
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


[Freesurfer] Talairach question

2006-03-30 Thread Martin Ystad
Hi,
I'm doing a group study and I have a question regarding the Talairach 
transform. I need to make a new transform for some of my subjects using 
the brainmask.mgz-volume. For others, the original transform is okay 
(visually) . Is it a problem to have some transforms based on the 
brainmask volume, and others made from the nu volume? Should I make new 
transforms for all subjects, even though some of the original ones are 
fine?


Thanks,

Martin Ystad
University of Bergen,
Norway.
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer