Hi again, I've been playing around with the other segmentation fault I was getting (stage 1 recon-all with the 3T images). I've noticed that my 1.5T images (with which I have no problems) are coronally acquired, 256 x 256 x 123 (x, y, z) , voxel size 0.9 x 0.9 x 1.5, 16 bit. My 3Ts are 512 x 512 x 124, coronally acquired, voxel size 0.6 x 0.6 x 1.7, 16 bit. It seems the FOV is too big, since mri_convert ends up producing a COR image with 330 slices instead of 256. I registered and resmapled the 3T to one of my 1.5Ts using a 6 parameter rigid body registration in AIR so that the 3T took on the properties of the 1.5T (ie., it became 256 x 256 x 123, 0.9 x 0.9 x 1.5). recon-all -stage1 only worked if I converted the resampled image to 8 bit. If I tried to run it on the 16bit image, the intensity normalization failed. The relevant output is below. Do images need to be in a certain format before mri_convert can convert them to COR format successfully? Thanks again for all your help, Alex
Intensity Normalization Tue Jun 28 14:40:54 EST 2005 /data/flanders/work/alex/freesurfer/subjects/mw_3T_2_186/mri mri_normalize orig T1 reading from orig... normalizing image... talairach transform 1.051 0.565 0.381 -29.026; -0.317 1.126 -0.797 -10.790; -0.719 0.586 1.113 -42.660; 0.000 0.000 0.000 1.000; INFO: Modifying talairach volume c_(r,a,s) based on average_305 MRInormalize: could not find any valid peaks No such file or directory mri_normalize: normalization failed No such file or directory ERROR: mri_normalize exited with non-zero status ------------------------------------------ Filesystem 1k-blocks Used Available Use% Mounted on /dev/hda9 130282400 12379432 111284996 11% /data/flanders ------------------------------------------ recon-all exited with errors at Tue Jun 28 14:41:03 EST 2005
-----Original Message----- From: Nick Schmansky [mailto:nicks@nmr.mgh.harvard.edu] Sent: Wed 6/29/2005 2:26 AM To: Fornito, Alexander Cc: Itamar Kahn; Freesurfer Mailing List Subject: RE: [Freesurfer] mris_glm Alex,
I'm trying to track down the source of the segmentation fault. In the meantime, can you re-run the script with the parameter --echo just after 'make_average_surface' (and before the --subjects)? This will give me a better idea on where its faulting. I don't think the subject naming is the problem, but I am wondering about the two warnings about not being able to open the .avg_curv files.
Thanks, Itamar, for pointing out the problem with the script. I'm not sure how the file got converted to DOS format (as we use Linux), maybe a mail system, but I hadn't seen that error before.
I've posted a gzip'd make_average_surface on the ftp site (same as sent prior), in case others want the script. At: ftp://surfer.nmr.mgh.harvard.edu/pub/dist/make_average_surface.gz Copy it to $FREESURFER_HOME/bin, and remember to make it executable by typing 'chmod 755 make_average_surface' after gunzip'ing it.
Nick
On Tue, 2005-06-28 at 13:11 +1000, Fornito, Alexander wrote:
Thanks - that got it working!
I tried running it on a small sample of 8 subjects, and got a segmentation fault (below). I've noticed that make_average_surface requires subject names to start with a letter. My subjects were coded as numbers, so I just added an 's' to the beginning to get it going. I'm not sure if this has anything to do with the problem. Any help is appreciated. Alex
make_average_surface --subjects s1000186 s1000187 s1000188 s1000189 s1000190 s1000191 s1000192 s1000194
make_average_surface
input subjects: s1000186 s1000187 s1000188 s1000189 s1000190 s1000191 s1000192 s1000194 output subject: average mris_average_curvature... processing subject s1000186... processing subject s1000187... processing subject s1000188... processing subject s1000189... processing subject s1000190... processing subject s1000191... processing subject s1000192... processing subject s1000194... MRISwriteCurvature: could not open ../average/surf/lh.avg_sulc No such file or directory mris_average_curvature... processing subject s1000186... processing subject s1000187... processing subject s1000188... processing subject s1000189... processing subject s1000190... processing subject s1000191... processing subject s1000192... processing subject s1000194... MRISwriteCurvature: could not open ../average/surf/lh.avg_curv No such file or directory mris_make_average_surface... reading vertex positions from orig... processing subject s1000186... The following must be revisited********************************** Segmentation fault
-----Original Message----- From: Itamar Kahn [mailto:kahn@MIT.EDU] Sent: Tue 6/28/2005 9:51 AM To: Fornito, Alexander Cc: Freesurfer Mailing List Subject: Re: [Freesurfer] mris_glm The 'make_average_surface' script is in Dos format. You can use the 'dos2unix' application to remove the offending characters from it (dos2unix comes with all linux dist and you can use fink to download it for mac os x).
Cheers, Itamar
[kahn@###### kahn]$ dos2unix --help dos2unix Copyright (c) 1994-1995 Benjamin Lin Copyright (c) 1998 Bernd Johannes Wuebben (Version 3.0) Copyright (c) 1998 Christian Wurll (Version 3.1) Usage: dos2unix [-hkqV] [-c convmode] [-o file ...] [-n infile outfile ...] -h --help give this help -k --keepdate keep output file date -q --quiet quiet mode, suppress all warnings always on in stdin->stdout mode -V --version display version number -c --convmode conversion mode convmode ASCII, 7bit, ISO, Mac, default to ASCII -l --newline add additional newline in all but Mac convmode -o --oldfile write to old file file ... files to convert in old file mode -n --newfile write to new file infile original file in new file mode outfile output file in new file mode
On Jun 27, 2005, at 4:39 PM, Fornito, Alexander wrote:
Hi Nick, I copied the script into the bin dir, but when I type make_average_surface, I get the following:
make_average_surface 'nknown option: `- Usage: tcsh [ -bcdefilmnqstvVxX ] [ argument ... ].
Is this normal? Thanks, Alex
-----Original Message----- From: Nick Schmansky [mailto:nicks@nmr.mgh.harvard.edu] Sent: Tue 6/21/2005 11:00 PM To: Fornito, Alexander Cc: Freesurfer Mailing List; Bruce Fischl Subject: RE: [Freesurfer] mris_glm Alex,
Attached is the make_average_surface script. Copy it to the freesurfer/bin directory, and be sure to make it executable (run 'chmod 755 make_average_surface' in the freesurfer/bin directory).
Type 'make_average_surface' to get help. Basically, just the subject names are required. By default, a 'subject' named 'average' will be created from your set of subjects (a name instead of 'average' can be specified on the command line).
Nick
ps. I am working on the mris_surface seg-fault problem using the rh.orig file that you sent.
On Tue, 2005-06-21 at 08:23 -0400, Bruce Fischl wrote:
Hi Alex,
you're better off using the make_average_surfaces.csh script to make an average of your subjects. Nick: can you send Alex a copy?
thanks, Bruce On Tue, 21 Jun 2005, Fornito, Alexander wrote:
Def. sounds worth doing then! I'll give it a try. My other question is, where can I get my hands on the average7? It's used as the target in the mris_glm examples, but I haven't been able to find the actual average7 surface in any of the freesurfer directories. Am I missing something? Thanks again, Alex
-----Original Message----- From: Doug Greve [mailto:greve@nmr.mgh.harvard.edu] Sent: Tuesday, June 21, 2005 4:11 PM To: Fornito, Alexander Cc: freesurfer@nmr.mgh.harvard.edu Subject: Re: [Freesurfer] mris_glm
You can run with just the design matrix, but you won't be able to use the cool fsgdf stuff in tksurfer (Load->FSGDF). The fsgdf is a way to specify how to build the des mtx. The fsgdf keeps track of what the regressors mean (eg, Age, Class, IQ, etc). When you save the preprocessed data with --y, you'll see that there will be an fsgdf file saved with it. Load this in tksurfer, click on a point, and you will be able to make a scatter plot of, say, thickness vs age, with each class (eg, Male, Female) having a different color dot in the scatter plot. When you mouse-over the dot, it tells you the subject name. Click on a new point and you'll see the scatter plot for that point. If you use --xmat, you can save the design matrix (in matlab-4 format).
doug
On Tue, 21 Jun 2005, Fornito, Alexander wrote:
Hi,
I was seeking some clarification re: the relationship between the
fsgdf
and design matrix file for use with mris_glm. It seems to me that the two contain very similar info, the examples in the -help don't use the fsdf at all. Is it necessary to create one, or can you just run an analysis with the desmtx?
Thanks,
Alex
Alexander Fornito
M.psych (Clin. Neuro.)/PhD candidate
Melbourne Neuropsychiatry Centre and Department of Psychology
The University of Melbourne
alexander.fornito@wh.org.au
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
Itamar Kahn Department of Psychology Stanford University Jordan Hall, Bldg 420 Mail Code 2130 Stanford, CA 94305 office: 650-724-9515 fax: 650-725-5699 url: http://web.mit.edu/kahn/www _________________________________________________
Freesurfer mailing list Freesurfer@nmr.mgh.harvard.edu https://mail.nmr.mgh.harvard.edu/mailman/listinfo/freesurfer
freesurfer@nmr.mgh.harvard.edu