Re: [Freesurfer] Using FSL matrix for Talairach transform

2013-05-09 Thread Johannes Klein
Hi Doug,
Thanks! I've tried that now, but it didn't help. Looking at the output, I get 
the impression that some of the axes might be swapped over. I've done a manual 
registration now to process my subject. 
Maybe it's worth following this up for future use of FSL-supplied matrices - 
however, the problem only applies to XFM-style output, and e.g. mri_vol2vol 
works fine, so I guess there aren't many other users affected. If you like, I 
can send you a few volumes and the associated registration matrix.
Thanks for your help!
Cheers,
Johannes

Douglas N Greve Wed, 08 May 2013 12:16:36 -0700

Hi Johannes, as a quick fix can you try inverting the matrix?
doug

On 05/08/2013 01:31 PM, Johannes Klein wrote:
 Hi Doug,
 Thanks for your reply! I'm getting closer to a solution now, with 
 tkregister2's display showing a correctly transformed mni305 file, 
 but I still cannot get a valid talairach.xfm file out of this.

 Here's what I tried:
 tkregister2 --mov  /usr/local/freesurfer/average/mni305.cor.mgz 
  --targ orig.mgz --fsl mni2sub.mat --reg test_mni.mgz.reg
 works fine.

 Next, to obtain a suitable .xfm file, I ran
 tkregister2 --mov  /usr/local/freesurfer/average/mni305.cor.mgz 
  --targ orig.mgz --fsl mni2sub.mat --reg test_mni.mgz.reg  --xfmout 
 testtal.xfm --noedit
 and copied the output (testtal.xfm) into mri/transforms/talairach.xfm

 Now, when I view the result with
 tkregister2 --s test --fstal --mgz
 the transform is way off again. Apparently, tkregister2 reads and 
 interprets the FSL matrix correctly, but the output transform that I 
 get is not in the right format for transforms/talairach.xfm.
 I wonder if I'm using the wrong output switch now - but looking at 
 tkregister2's documentation, it seems to be the one to use?
 Thanks,
 Johannes



 Date: Tue, 07 May 2013 14:11:27 -0400
 From: Douglas N Greve gr...@nmr.mgh.harvard.edu 
 
mailto:gr...@nmr.mgh.harvard.edu

 Subject: Re: [Freesurfer] Using FSL matrix for Talairach transform
 To: freesurfer@nmr.mgh.harvard.edu 
mailto:freesurfer@nmr.mgh.harvard.edu

 Message-ID: 518943cf.7050...@nmr.mgh.harvard.edu 
 
mailto:518943cf.7050...@nmr.mgh.harvard.edu

 Content-Type: text/plain; charset=ISO-8859-1; format=flowed

 Hi Johannes, try using the --xfmout option of tkregister2. I'm not sure
 what regdat2xfm is doing.
 doug

 On 05/07/2013 12:42 PM, Johannes Klein wrote:
 Dear all,
 I have some tricky subjects that I cannot get to register properly 
 with the standard Talairach process, or even the use-mritotal option. 
 However, with some fiddling, I've produced a reasonable registration 
 matrix with FSL's FLIRT.

 I'm now looking to convert my FSL registration matrix, and use it as 
 Freesurfer's Talairach transform. From the documentation, I gathered 
 that I need to get it into Freesurfer's xfm format, and I suppose 
 this is a two step process.

 I converted the FLIRT-provided matrix cor2raw.xfm like so:
 tkregister2 --mov /usr/local/freesurfer/average/mni305.cor.mgz 
  --fslreg cor2raw.xfm --s mysubject --noedit --reg register.dat

 I then converted register.dat to the xfm data format:
 regdat2xfm /usr/local/freesurfer/average/mni305.cor.mgz rawavg.mgz 
 register.dat tal.xfm

 and finally replaced talairach.xfm in the transforms directory with 
 the output of the last command. Unfortunately, this doesn't work, and 
 the transform is very much off target when I view it in tkregister2.
 Obviously, I've made a mistake when converting between the different 
 transforms - could anybody point me in the right direction?
 Thanks all,
 Johannes



 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu 
mailto:Freesurfer@nmr.mgh.harvard.edu

 
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


 -- 
 Douglas N. Greve, Ph.D.
 MGH-NMR Center
 gr...@nmr.mgh.harvard.edu 
mailto:gr...@nmr.mgh.harvard.edu

 Phone Number: 617-724-2358
 Fax: 617-726-7422

 Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
 FileDrop: 
https://gate.nmr.mgh.harvard.edu/filedrop2

 www.nmr.mgh.harvard.edu/facility/filedrop/index.html 
 
http://www.nmr.mgh.harvard.edu/facility/filedrop/index.html

 Outgoing: 
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/




 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: 
https://gate.nmr.mgh.harvard.edu/filedrop2

www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: 
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/


___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu

https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer




___
Freesurfer mailing

Re: [Freesurfer] Using FSL matrix for Talairach transform

2013-05-08 Thread Johannes Klein
Hi Doug,
Thanks for your reply! I'm getting closer to a solution now, with tkregister2's 
display showing a correctly transformed mni305 file, but I still cannot get a 
valid talairach.xfm file out of this.

Here's what I tried:
tkregister2 --mov  /usr/local/freesurfer/average/mni305.cor.mgz  --targ 
orig.mgz --fsl mni2sub.mat --reg test_mni.mgz.reg  
works fine. 

Next, to obtain a suitable .xfm file, I ran 
tkregister2 --mov  /usr/local/freesurfer/average/mni305.cor.mgz  --targ 
orig.mgz --fsl mni2sub.mat --reg test_mni.mgz.reg  --xfmout testtal.xfm --noedit
and copied the output (testtal.xfm) into mri/transforms/talairach.xfm

Now, when I view the result with
tkregister2 --s test --fstal --mgz
the transform is way off again. Apparently, tkregister2 reads and interprets 
the FSL matrix correctly, but the output transform that I get is not in the 
right format for transforms/talairach.xfm. 
I wonder if I'm using the wrong output switch now - but looking at 
tkregister2's documentation, it seems to be the one to use? 
Thanks,
Johannes



Date: Tue, 07 May 2013 14:11:27 -0400
From: Douglas N Greve gr...@nmr.mgh.harvard.edu
Subject: Re: [Freesurfer] Using FSL matrix for Talairach transform
To: freesurfer@nmr.mgh.harvard.edu
Message-ID: 518943cf.7050...@nmr.mgh.harvard.edu
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Hi Johannes, try using the --xfmout option of tkregister2. I'm not sure 
what regdat2xfm is doing.
doug

On 05/07/2013 12:42 PM, Johannes Klein wrote:
 Dear all,
 I have some tricky subjects that I cannot get to register properly with the 
 standard Talairach process, or even the use-mritotal option. However, with 
 some fiddling, I've produced a reasonable registration matrix with FSL's 
 FLIRT.
 
 I'm now looking to convert my FSL registration matrix, and use it as 
 Freesurfer's Talairach transform. From the documentation, I gathered that I 
 need to get it into Freesurfer's xfm format, and I suppose this is a two step 
 process.
 
 I converted the FLIRT-provided matrix cor2raw.xfm like so:
 tkregister2 --mov /usr/local/freesurfer/average/mni305.cor.mgz  --fslreg 
 cor2raw.xfm --s mysubject --noedit --reg register.dat
 
 I then converted register.dat to the xfm data format:
 regdat2xfm /usr/local/freesurfer/average/mni305.cor.mgz rawavg.mgz 
 register.dat tal.xfm
 
 and finally replaced talairach.xfm in the transforms directory with the 
 output of the last command. Unfortunately, this doesn't work, and the 
 transform is very much off target when I view it in tkregister2.
 Obviously, I've made a mistake when converting between the different 
 transforms - could anybody point me in the right direction?
 Thanks all,
 Johannes
 
 
 
 ___
 Freesurfer mailing list
 Freesurfer@nmr.mgh.harvard.edu
 https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer

-- 
Douglas N. Greve, Ph.D.
MGH-NMR Center
gr...@nmr.mgh.harvard.edu
Phone Number: 617-724-2358
Fax: 617-726-7422

Bugs: surfer.nmr.mgh.harvard.edu/fswiki/BugReporting
FileDrop: https://gate.nmr.mgh.harvard.edu/filedrop2
www.nmr.mgh.harvard.edu/facility/filedrop/index.html
Outgoing: ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/

___
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] Trouble with flip angle map when computing T1 maps

2013-04-29 Thread Johannes Klein
Dear all,
I've had some trouble feeding a flip angle map into mri_ms_fitparms. If I don't 
provide it, the estimates look fine; with the FA map however, all brain voxels 
in the resultant T1.mgz are set to 5. I've checked that all images are 
registered, and the nominal values in the FA map look good to me. I'm running 
Freesurfer 5.1.0

Here's the output:
johannes$ mri_ms_fitparms  -afi B1Map_in_degrees.mgz DESPOT_FA_18.mgz 
DESPOT_FA_4.mgz t1_fs
using flip angle map DESPOT1HIFI_B1Map_in_degrees.mgz with nominal value 60.0 
degrees
reading DESPOT_FA_18.mgz...TE = 3.70, TR = 8.00, flip angle = 18.00
reading DESPOT_FA_4.mgz...TE = 3.70, TR = 8.00, flip angle = 4.00
using 2 FLASH volumes to estimate tissue parameters.
parameter rms = 77.083
non-equal flip_angle found for the volume 1.
Flip_angle is set to zero.
TR = 8.00, TE = 3.70, Flip_angle = 0.00 are used
writing PD estimates to t1_fs/PD.mgz...
writing T1 estimates to t1_fs/T1.mgz...
writing residual sse to t1_fs/sse.mgz...
writing faf map to t1_fs/faf.mgz...
writing synthetic images to t1_fs/flash18.mgz...
writing registration matrix to t1_fs/flash18.lta...
writing synthetic images to t1_fs/flash4.mgz...
writing registration matrix to t1_fs/flash4.lta...
parameter estimation took 1 minutes and 18 seconds.

Any thoughts on what I'm doing wrong?
Thanks for your help,
Johannes
___
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] Scripting: Feeding arguments and variables to script?

2007-04-16 Thread Johannes Klein

Hi Graham,
Another way is to generate your TCL on the fly, see below for a simple 
example:


- snip -
#!/bin/sh
outdir=/usr/people/johannes/scratch/fssubjects/pictures
mkdir -p $outdir

cd $SUBJECTS_DIR
# put your subjects here
for f in CONTROL*; do
 for hemi in lh rh; do
  echo scale_brain 1.05
  redraw
  save_tiff ${outdir}/${f}_thickness_${hemi}.tiff
  exit  /tmp/prettypic_$$.tcl
  tksurfer $f $hemi inflated -overlay $f/surf/${hemi}.thickness -tcl 
/tmp/prettypic_$$.tcl

 done
done
rm /tmp/prettypic_$$.tcl
- snap -

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


Re: [Freesurfer] mris_anatomical_stats error

2006-11-01 Thread Johannes Klein

Sure, my command would look something like this:
mris_anatomical_stats -b average_subject lh white -l lh.mylabel
Works on individual subjects, but not on the averaged one.
The latter was created with
make_average_subject --subjects STRU_1 STRU_2 [...] --out average_subject
Thanks for your help,
Johannes

Doug Greve schrieb:


The problem is that this is being done an the average subject, which 
does not have a wm.mgz file. Should be easy to fix. Johannes, can you 
send your cmd line?


doug





Nick Schmansky wrote:


Johannes,

wm.mgz is produced in the -autorecon2 stage of recon-all.  


A handy table to consult is:

http://surfer.nmr.mgh.harvard.edu/fswiki/ReconAllDevTable

or

http://grahamwideman.com/gw/brain/fs/fsunderstanding2006/processvsdata2006.htm

Nick  


On Tue, 2006-10-31 at 11:49 +, Johannes Klein wrote:
 


Hi everyone,
I'm trying to calculate surface areas for some labels I've drawn on an 
averaged subject created with mrake_average_surface, and 
mris_anatomical_stats seems the way to go.
Unfortunately, it needs a file called wm.mgz, which doesn't exist for my 
averaged subject. The mri subdir contains T1, brain, mni305.cor and 
orig.mgz, but no wm.mgz. Is there a way to create this file from the 
data I've got?

Thanks for your help,
Johannes
___
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


 



--
Douglas N. Greve, Ph.D.
MGH-NMR Center
[EMAIL PROTECTED]
Phone Number: 617-724-2358 
Fax: 617-726-7422


In order to help us help you, please follow the steps in:
surfer.nmr.mgh.harvard.edu/fswiki/BugReporting




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


[Freesurfer] mris_anatomical_stats error

2006-10-31 Thread Johannes Klein

Hi everyone,
I'm trying to calculate surface areas for some labels I've drawn on an 
averaged subject created with mrake_average_surface, and 
mris_anatomical_stats seems the way to go.
Unfortunately, it needs a file called wm.mgz, which doesn't exist for my 
averaged subject. The mri subdir contains T1, brain, mni305.cor and 
orig.mgz, but no wm.mgz. Is there a way to create this file from the 
data I've got?

Thanks for your help,
Johannes
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


[Freesurfer] tksurfer marking nodes on opposite side of brain

2006-09-15 Thread Johannes Klein

Hi everyone,
I'm currently hand-drawing some labels using tksurfer. Unfortunately, 
quite often a node that I try to click will not be selected. Instead, 
the mark is placed on the surface behind the one I'm viewing, e.g. 
when trying to outline calcarine structures, the node mark will appear 
somewhere on the lateral surface.
I wonder if anyone else has run into this? Is it possible to constrain 
tksurfer's node selection to the currently visible part of the cortex 
only? Alternatively, an undo feature to de-select the last point clicked 
would save me re-drawing the whole outline, but in my Edit menu, 
tksurfer consistently says Nothing to Undo. Do I need to enalbe the 
Undo feature somewhere? I'm running FS 3.0.3 centos4.

Thank you very much,
Johannes
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] Cannot view average curvature after make_average_subject

2006-09-10 Thread Johannes Klein

Hi Doug,
Thanks for your answer. I've processed my data as you suggested, and it 
seems to work fine now.
If I may, I would like to ask some follow-up questions to you and the 
list. The data I'm analysing comprises a group of healthy controls and 
patients with increased cortical thickness. When I compare the stats 
tables generated from these groups, it is obvious that there is a 
thickness difference in almost all of the regions studied (in eg. 
lh.aparc.a2005.stats). After glmfit, however, there are only a few 
regions of significant difference, and I suspect that this is due to the 
DOSS option to glmfit. If I understand correctly, then this would remove 
the difference of mean cortical thickness, which I am interested in here.
I wonder what the best way around this is. If I test for significant 
difference in overall thickness seperately, can I assume that the 
changes displayed are those that occur over and above what the 
difference in mean thickness explains?
More generally, I wonder if the different offset approach I've been 
running so far is correct for comparison of thickness measurements 
(since the difference of the mean is meaningful here).

Your input is very much appreciated.
Thanks a lot,
Johannes

Doug Greve wrote:


Use lh.curv instead of lh.avg_curv. For lh.thickness, there is a bug in 
make_average_subject (resamples the avg thickness to the first or last 
subject instead of the average subject). If you are going to be doing a 
group stat analysis, you will usually get the mean thickness. Otherwise, 
you can just run mris_preproc with the --mean option.


doug

Johannes Klein wrote:


Hi all,
I'm setting up a small study where I want to compare a subject to some 
matched controls. I've been following the Group analysis tutorial and 
I've run make_average_subject on my controls. Now, I'd like to check 
my data and view averaged curvature and thickness measurements.
When I try to load the lh.avg_curv onto lh white in tksurfer, I get 
the following error:
ERROR: number of vertices in XX/lh.avg_curv does not match surface 
(173612,163842)surfer: error reading curvature file

The same applies to lh.avg_thickness
However, there is a file called lh.curv that I can load.
What am I doing wrong here? How can I view the average curvature and 
thickness measurements?

Thanks a lot everyone,
Johannes

___
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] Cannot view average curvature after make_average_subject

2006-09-07 Thread Johannes Klein

Hi all,
I'm setting up a small study where I want to compare a subject to some 
matched controls. I've been following the Group analysis tutorial and 
I've run make_average_subject on my controls. Now, I'd like to check my 
data and view averaged curvature and thickness measurements.
When I try to load the lh.avg_curv onto lh white in tksurfer, I get the 
following error:
ERROR: number of vertices in XX/lh.avg_curv does not match surface 
(173612,163842)surfer: error reading curvature file

The same applies to lh.avg_thickness
However, there is a file called lh.curv that I can load.
What am I doing wrong here? How can I view the average curvature and 
thickness measurements?

Thanks a lot everyone,
Johannes

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


[Freesurfer] tkmedit problem, crash on loading aseg

2006-09-05 Thread Johannes Klein

Hi everyone,
I have a rather obscure problem. There are some subjects whose aseg 
subcortical parcellations will not load up in tkmedit, causing it to 
crash. This happens when using a Mac with X11 to view them, not on my 
Linux machine. Interestingly though, this does not happen for all 
subjects, some do get displayed correctly on the Mac, too.

Here's what I do:
tkmedit mysubj T1.mgz
Then, use tkmedit's File-Load Segmentation
There, select aseg.mgz and tkmeditColorsCMA

tkmedit then crashes, producing the following log:
tkmedit started: Tue Sep  5 17:26:20 2006

tkmedit PAT_ T1.mgz lh.white -aux-surface rh.white

$Id: tkmedit.c,v 1.274.2.1 2006/03/06 19:52:48 kteich Exp $ $Name: stable3 $
Set user home dir to /Volumes/JalapenoSAN/Scratch/XX/fs
Set subject home dir to /Scratch/XX/fs/PAT_
Using interface file /usr/local/freesurfer/lib/tcl/tkmedit.tcl
Tcl: Successfully parsed tkmedit.tcl
Tcl: Successfully parsed tkm_functional.tcl
Error 1 in CLUT_GetLabel: Invalid pointer to object.

I wonder if this is a known problem for Macs?
Thanks,
Johannes
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] recon-all: error in topology correction step

2006-07-19 Thread Johannes Klein

Hi Nick, hi everyone,
I just ran the 3.0.2 topology fixer on a linux machine over one of the
failed surfaces, and that seems to have worked - great! The compute 
servers have since been upgraded to 3.0.3, so I'll feed the results into 
the rest of the recon-all pipeline and see how it goes.

Thanks for all your help,
Johannes

Nick Schmansky schrieb:

Johannes,

In looking at your recon-all.log, it looks like you are running v3.0.1
of freesurfer, which can be confirmed by typing:

  cat $FREESURFER_HOME/build-stamp.txt

In v3.0.2, a bug in the topology fixer was fixed (namely, the
'mrisDefectAnalysis' routine).

Is it possible for you to download the latest freesurfer and rerun on
the trouble subjects?  It should not be necessary to re-run on the other
subjects.  The fixed topology fixer is likely to successfully process
your subjects.  


I can also send you this new mris_topology_fixer binary for the Mac if
you don't want to download/re-install.

Nick



On Wed, 2006-07-12 at 18:50 +0100, Johannes Klein wrote:


Hi Nick,
Thanks for your message. Unfortunately, the topology fixer did not 
produce a defect_labels file, it seems to have aborted before doing so.
Is there a way to make mris_fix_topology produce the defect labels 
without actually running topology correction? I thought of trying the 
-correct_defect option with one of the defects that didn't cause 
problems. Does that make sense?

Thanks,
Johannes

Nick Schmansky schrieb:


Johannes,

To visualize defect locations:

 tksurfer subjid lh inflated.nofix

then:

 File-Curvature-Load Curvature

select:

 surf/lh.defect_labels

and the defects will display in red.

Remember you can click on a defect vertex in tksurfer, then click 'save
point' and then in tkmedit, click 'goto saved point', which is handy to
see exactly where in a volume things went wrong.

Nick









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


[Freesurfer] recon-all: error in topology correction step

2006-07-12 Thread Johannes Klein

Hi everyone,
I'm using recon-all to flatten a number of scans from patients and 
controls. Most of them work fine, but there are 3 that do not 
reconstruct correctly. They all seem to share the same problem: 
Recon-all aborts during the automatic topology correction step, and 
there's a line in the log saying mrisDefectAnalysis : defect XXX overlap 
defect YYY.
I've checked registration to talairach, skull strip and initial 
surfaces, the only thing I could see was that in some cases, bits of the 
superior sagittal sinus were wrongly included in the lh.orig.nofix, or 
small bits of dura, but nothing major.
I'm attaching the relevant output from the topology fixer for two 
different cases. I would be grateful if someone could point me at other 
things to try. Is it possible to visualise the defects' locations, so I 
could find out which defect is actually causing the overlap message?

Thanks for your help everyone,
Johannes

--

CASE 1
[EMAIL PROTECTED] Fix Topology lh Wed Jun 14 04:04:29 BST 2006
\n cp ../surf/lh.orig.nofix ../surf/lh.orig \n
\n cp ../surf/lh.inflated.nofix ../surf/lh.inflated \n
/Volumes/JalapenoSAN/Scratch/natalie/schizophrenia/fs/PAT_2280/scripts
\n mris_fix_topology -mgz -sphere qsphere.nofix -ga PAT_2280 lh \n
reading spherical homeomorphism from 'qsphere.nofix'
using genetic algorithm with optimized parameters

*
Topology Correction Parameters
retessellation mode:   genetic search
number of patches/generation : 10
number of generations :10
surface mri loglikelihood coefficient : 1.0
volume mri loglikelihood coefficient :  10.0
normal dot loglikelihood coefficient :  1.0
quadratic curvature loglikelihood coefficient : 1.0
volume resolution : 2
eliminate vertices during search :  1
initial patch selection :   1
select all defect vertices :0
ordering dependant retessellation:  0
use precomputed edge table :0
smooth retessellated patch :2
match retessellated patch : 1
verbose mode :  0

*
INFO: assuming .mgz format
$Id: mris_fix_topology.c,v 1.41 2006/02/06 19:41:59 nicks Exp $
  $Id: mrisurf.c,v 1.441.2.1 2006/03/06 21:12:31 greve Exp $
before topology correction, eno=-656 (nv=197397, nf=396220, ne=594273, 
g=329)

using quasi-homeomorphic spherical map to tessellate cortical surface...

Correction of the Topology
Finding true center and radius of Spherical Surface...done
Surface centered at (0,0,0) with radius 100.0 in 9 iterations
marking ambiguous vertices...
30743 ambiguous faces found in tessellation
segmenting defects...
   defect 6 : 7 vertices have been added to the surface

[ ... ]

   defect 314 : 2 vertices have been added to the surface
   total of 95 vertices has been added to the surface
analyzing defects...
mrisDefectAnalysis : defect 277 overlap defect 272
reading input surface 
/Volumes/JalapenoSAN/Scratch/natalie/schizophrenia/fs/PAT_2280/surf/lh.qsphere.nofix...

reading brain volume from brain...
reading wm segmentation from wm...
Darwin jalapeno6.fmrib.ox.ac.uk 8.6.0 Darwin Kernel Version 8.6.0: Tue 
Mar  7 16:58:48 PST 2006; root:xnu-792.6.70.obj~1/RELEASE_PPC Power 
Macintosh powerpc


recon-all exited with ERRORS at Wed Jun 14 04:08:10 BST 2006

CASE 2
[EMAIL PROTECTED] Fix Topology rh Thu Jun 15 12:13:05 BST 2006
\n cp ../surf/rh.orig.nofix ../surf/rh.orig \n
\n cp ../surf/rh.inflated.nofix ../surf/rh.inflated \n
/Volumes/JalapenoSAN/Scratch/natalie/schizophrenia/fs/PAT_3509/scripts
\n mris_fix_topology -mgz -sphere qsphere.nofix -ga PAT_3509 rh \n
reading spherical homeomorphism from 'qsphere.nofix'
using genetic algorithm with optimized parameters

*
Topology Correction Parameters
retessellation mode:   genetic search
number of patches/generation : 10
number of generations :10
surface mri loglikelihood coefficient : 1.0
volume mri loglikelihood coefficient :  10.0
normal dot loglikelihood coefficient :  1.0
quadratic curvature loglikelihood coefficient : 1.0
volume resolution : 2
eliminate vertices during search :  1
initial patch selection :   1
select all defect vertices :0
ordering dependant retessellation:  0
use precomputed edge table :0
smooth retessellated patch :2
match retessellated patch : 1
verbose mode :  0

*
INFO: assuming .mgz format
$Id: mris_fix_topology.c,v 1.41 2006/02/06 19:41:59 nicks Exp $
  $Id: mrisurf.c,v 1.441.2.1 2006/03/06 21:12:31 greve Exp $

[Freesurfer] Converting .annot into volume

2006-04-11 Thread Johannes Klein

Hi folks,
I'd like to create a volume segmentation from Freesurfer's .annot 
output. I can get it back into volume land with something like


mri_label2vol --subject sub1 --annot ../label/lh.aparc.a2005s.annot --o 
sub1_parcellated.mgz --hemi lh --temp norm.mgz --proj frac 0 1 0.1


The thing I'm missing, though, is the appropriate colour table - I don't 
know how to extract the embedded one from lh.aparc.a2005s.annot
I loaded the result into tkmedit and tried the different colour tables 
(my best bet being surface_labels.txt) provided, but none of them gives 
correct anatomical labels.

Thanks for your help everyone,
Johannes
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] Converting .annot into volume

2006-04-11 Thread Johannes Klein

Hi Doug,
Thanks for the file. Unfortunately, it doesn't do the trick. I went back 
to the log file which reads


colortable with 82 entries read (originally 
/autofs/space/birn_044/users/christophe_atlas_rebuild/Simple_surface_labels2005.txt)


Saving annotation colortable ../stats/aparc.annot.a2005s.ctab

D'uh ... should have read this more patiently before - I had just looked 
for simple_surface_labels2005.txt and not read on ;)


Out of curiosity, is there a way to extract a colour table from an annot 
file?

Thanks again,
Johannes

Doug Greve schrieb:


Try using the one in:

ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/FreeSurferColorLUT.txt 



doug

Johannes Klein wrote:


Hi folks,
I'd like to create a volume segmentation from Freesurfer's .annot 
output. I can get it back into volume land with something like


mri_label2vol --subject sub1 --annot ../label/lh.aparc.a2005s.annot 
--o sub1_parcellated.mgz --hemi lh --temp norm.mgz --proj frac 0 1 0.1


The thing I'm missing, though, is the appropriate colour table - I 
don't know how to extract the embedded one from lh.aparc.a2005s.annot
I loaded the result into tkmedit and tried the different colour tables 
(my best bet being surface_labels.txt) provided, but none of them 
gives correct anatomical labels.

Thanks for your help everyone,
Johannes
___
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] Converting .annot into volume

2006-04-11 Thread Johannes Klein

Hi Doug,
Yes, that's the file I referred to in my previous mail, I should have 
made that more clear. I'll take a look at the new label2vol, 
fortunately, I haven't run into the 999 limit yet.
If you're re-coding it, it would be great if you could include an option 
to output the embedded colour table to a file, which would be less 
error-prone than hand-matching the correct colour tables (and would also 
work for files where you don't have the .ctab output, but only the 
embedded table).

Thanks again,
Johannes

Doug Greve schrieb:
There should be color tables in the stats directory, eg, 
stats/aparc.annot.a2005s.ctab


Also, there's a bug in label2vol that makes it fail on any segment with 
id  999 (as the cortical ones in aparc+aseg are). I've put a new 
version at 
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_label2vol 
(already live in the NMR center).


You can also use mri_aparc2aseg to map the a2005s annot into the aseg 
volume (like aparc+aseg). I'm not sure what version you have, so I 
copied the most recent one into
ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/mri_aparc2aseg 



Finally, mri_label2vol can be very slow. I'm almost finished with a 
version that is much faster.


doug

Johannes Klein wrote:


Hi Doug,
Thanks for the file. Unfortunately, it doesn't do the trick. I went 
back to the log file which reads


colortable with 82 entries read (originally 
/autofs/space/birn_044/users/christophe_atlas_rebuild/Simple_surface_labels2005.txt) 



Saving annotation colortable ../stats/aparc.annot.a2005s.ctab

D'uh ... should have read this more patiently before - I had just 
looked for simple_surface_labels2005.txt and not read on ;)


Out of curiosity, is there a way to extract a colour table from an 
annot file?

Thanks again,
Johannes

Doug Greve schrieb:



Try using the one in:

ftp://surfer.nmr.mgh.harvard.edu/transfer/outgoing/flat/greve/FreeSurferColorLUT.txt 



doug

Johannes Klein wrote:


Hi folks,
I'd like to create a volume segmentation from Freesurfer's .annot 
output. I can get it back into volume land with something like


mri_label2vol --subject sub1 --annot ../label/lh.aparc.a2005s.annot 
--o sub1_parcellated.mgz --hemi lh --temp norm.mgz --proj frac 0 1 0.1


The thing I'm missing, though, is the appropriate colour table - I 
don't know how to extract the embedded one from lh.aparc.a2005s.annot
I loaded the result into tkmedit and tried the different colour 
tables (my best bet being surface_labels.txt) provided, but none of 
them gives correct anatomical labels.

Thanks for your help everyone,
Johannes
___
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] mri_convert documentation error

2006-03-02 Thread Johannes Klein

Hi Doug,
Thanks for clarifying this. My data is in Nifti-Format and looks fine in 
FSLview, meaning that left is on the right-hand side of the screen and 
vice versa. There is no qform orientation information in the header. 
When I convert my data without --in_orientation LAS, it ends up looking 
the wrong way round in tkmedit. When I convert as in


mri_convert --in_orientation LAS mydata.nii 001.mgz

it looks alright again, i.e. left is on the right-hand side of the 
screen in tkmedit.
Now - having changed the orientation info, does that mean that I can 
rely on the lh.* surfaces truly being the left hemisphere, as long as I 
make sure that the 001.mgz input looks correct in tkmedit? Or is there 
some more intricate problem with the orientation info that I am missing?

Thanks again,
Johannes

Doug Greve schrieb:


I think this has been fixed. BTW, be very careful changing the 
orientation describtion. Note that it is the description that is being 
chaanged, NOT the pixel data. If your pixel data were oriented one way 
and the description was correct, changing the description will make the 
description wrong.


doug



Johannes Klein wrote:


Hi folks,
There's a small bug in the online help for mri_convert I found when 
trying to get my input Nifti's left/right to match with freesurfer 
conventions.
When run without any parameters, the last paragraph describes the use 
of the --in-orientation switch. That must read --in_orientation 
(probably same for out-/out_).

Took me a while to figure that one out ;)
Cheers,
Johannes
___
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] mri_convert documentation error

2006-03-01 Thread Johannes Klein

Hi folks,
There's a small bug in the online help for mri_convert I found when 
trying to get my input Nifti's left/right to match with freesurfer 
conventions.
When run without any parameters, the last paragraph describes the use of 
the --in-orientation switch. That must read --in_orientation (probably 
same for out-/out_).

Took me a while to figure that one out ;)
Cheers,
Johannes
___
Freesurfer mailing list
Freesurfer@nmr.mgh.harvard.edu
https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer


Re: [Freesurfer] converting thickess file to ascii

2005-10-26 Thread Johannes Klein

Hi Adam,
mris_convert still wants a surface file for reference.
I've succeeded doing what you want by pretending it's a curvature file as in
mris_convert -c lh.thickness lh.orig lh.thickness.asc

Johannes

Thomas, Adam (NIH/NIMH) schrieb:


Can mris_convert be used to convert thickness files to ascii? My
attempts so far have resulted in segfaults:


[EMAIL PROTECTED] surf]$ mris_convert lh.thickness lh.thickness.asc
Segmentation fault
[EMAIL PROTECTED] surf]$


Or is there another way to convert thickness files to ascii?


Thanks, 
-Adam 




---
Adam Thomas [EMAIL PROTECTED]
Functional MRI Facility, NIMH/NIH/DHHS
10 Center Dr, Room B1D708A
Bethesda MD. 20892-1148


___
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