You've already fixed it!  I didn't realize the computer I was using was a couple of versions behind (fsl 4.1.1) and this is definitely fixed in 4.1.6.

Thanks,
Jeanette

On Thu, Aug 19, 2010 at 1:24 AM, Stephen Smith <[log in to unmask]> wrote:
Urgh - thanks for looking into this Jeanette.  We'll delve deeper.
Cheers.



On 18 Aug 2010, at 22:05, Jeanette Mumford wrote:

Hi,
I don't know if it would be a computer problem (this error has occurred on two machines), but we used the -B option previously with no error and the problem popped up with fsl 4.1.1.  Here is what happens when I ran bet with  -m -B -d

Here is the error message again:
/Applications/fsl/bin/bet: line 383:  8794 Segmentation fault      ${FSLDIR}/bin/fast -oba 100 ${OUT}_tmp_premask 1>&/dev/null
** ERROR (nifti_image_read): failed to find header file for 'mprage_defaced_brain_tmp_premask_abias'
** ERROR: nifti_image_open(mprage_defaced_brain_tmp_premask_abias): bad header info
Error: failed to open file mprage_defaced_brain_tmp_premask_abias
ERROR: Could not open image mprage_defaced_brain_tmp_premask_abias
Image Exception : #22 :: Failed to read volume mprage_defaced_brain_tmp_premask_abias
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
/Applications/fsl/bin/bet: line 383:  8802 Abort trap              ${FSLDIR}/bin/fslmaths $IN -mul ${OUT}_tmp_premask_abias ${OUT}_tmp_unbiased
Input image mprage_defaced_brain_tmp_unbiased not valid

Error: input image mprage_defaced_brain_tmp_unbiased_premask not valid

and here is the list of files that were created:

mprage_defaced_brain.nii.gz
mprage_defaced_brain_mask.nii.gz
mprage_defaced_brain_skull.nii.gz
mprage_defaced_brain_tmp_premask.nii.gz
mprage_defaced_brain_tmp_premask_tmp_masked.nii.gz
mprage_defaced_brain_tmp_premask_tmp_standard_mask.nii.gz
mprage_defaced_brain_tmp_premask_tmp_standard_mask_to_in.nii.gz
mprage_defaced_brain_tmp_premask_tmp_to_std.mat
mprage_defaced_brain_tmp_premask_tmp_to_std.nii.gz
mprage_defaced_brain_tmp_premask_tmp_to_std_inv.mat


So, I went through the bet script and I think it is hung up when it calls fast, so I ran that line of code (line 371 in our version of bet, but of course I omitted ">& /dev/null")

fast -oba 100 mprage_defaced_brain_tmp_premask

Here is the error message
Could not open matrix file mprage_defaced_brain_tmp_premask
Could not open matrix file mprage_defaced_brain_tmp_premask
Could not open matrix file mprage_defaced_brain_tmp_premask
csf prior image not transformed correctly! priors are not used!
Segmentation fault

Is it looking for a mat file to pair up with the -a flag?  I'm not sure what the 100 does.

Thanks for the help!

Jeanette


On Wed, Aug 18, 2010 at 3:45 AM, Stephen Smith <[log in to unmask]> wrote:
Hi - this means that FAST has not run successfully - maybe the image is too large for FAST to run on your computer?
If you use the -d flag it should leave behind as many of the intermediate steps as do complete, which should make it easier to test what's going on.
Cheers.

On 17 Aug 2010, at 20:29, Jeanette Mumford wrote:

Hi,

When I run bet with the -B flag I get the following error message:

/Applications/fsl/bin/bet: line 383: 18901 Segmentation fault      ${FSLDIR}/bin/fast -oba 100 ${OUT}_tmp_premask 1>&/dev/null
** ERROR (nifti_image_read): failed to find header file for 'mprage_defaced_brain3_tmp_premask_abias'
** ERROR: nifti_image_open(mprage_defaced_brain3_tmp_premask_abias): bad header info
Error: failed to open file mprage_defaced_brain3_tmp_premask_abias
ERROR: Could not open image mprage_defaced_brain3_tmp_premask_abias
Image Exception : #22 :: Failed to read volume mprage_defaced_brain3_tmp_premask_abias
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
/Applications/fsl/bin/bet: line 383: 18909 Abort trap              ${FSLDIR}/bin/fslmaths $IN -mul ${OUT}_tmp_premask_abias ${OUT}_tmp_unbiased
Input image mprage_defaced_brain3_tmp_unbiased not valid

Error: input image mprage_defaced_brain3_tmp_unbiased_premask not valid



The results I'm getting seem okay (image seems to have had bias field correction and the mask is much better than without the -B flag).  I was just wondering what the error was about and if there would be anything wrong with using the resulting images.

Thanks,
Jeanette 


---------------------------------------------------------------------------
Stephen M. Smith, Professor of Biomedical Engineering
Associate Director,  Oxford University FMRIB Centre

FMRIB, JR Hospital, Headington, Oxford  OX3 9DU, UK
+44 (0) 1865 222726  (fax 222717)
[log in to unmask]    http://www.fmrib.ox.ac.uk/~steve
---------------------------------------------------------------------------






---------------------------------------------------------------------------
Stephen M. Smith, Professor of Biomedical Engineering
Associate Director,  Oxford University FMRIB Centre

FMRIB, JR Hospital, Headington, Oxford  OX3 9DU, UK
+44 (0) 1865 222726  (fax 222717)
[log in to unmask]    http://www.fmrib.ox.ac.uk/~steve
---------------------------------------------------------------------------