Dear Michael,
This makes total sense now.
It is important to not keep both .hdr/img versions and
.nii.gz in the same directory.
FSL is written so that it strips off the end of the image filename
and looks for anything that matches. This means that scripts
that include .nii.gz or other extensions continue to work on
systems where people use a different format (e.g. .hdr/img
pairs, or .hdr.gz and .img.gz). This is why it doesn't matter
if you specify T1_image.nii.gz or T1_image. In either case
it cannot figure out which image to use and should give you
a very clear warning about this and abort the program. I did
not see that in the output you sent to us. However, when I
try the equivalent here I get the error messages below,
including the explicit lines:
WARNING!!!! Multiple image files detected:
head.nii.gz head.img head.hdr
Did you get this message as part of your output?
It should have been in your output from first_flirt or in
your log directory (the *.e* files).
If you didn't ever see this message then please let me
know.
All the best,
Mark
$ first_flirt head test2 -b
initial registration 0
WARNING!!!! Multiple image files detected:
head.nii.gz head.img head.hdr
STOPPING PROGRAM
Stage 2: use subcortical mask
** ERROR (nifti_image_read): failed to find header file for 'test2_tmp_stage1'
** ERROR: nifti_image_open(test2_tmp_stage1): bad header info
Error: failed to open file test2_tmp_stage1
ERROR: Could not open image test2_tmp_stage1
Image Exception : #22 :: Failed to read volume test2_tmp_stage1
terminate called after throwing an instance of 'RBD_COMMON::BaseException'
/usr/local/fsl/bin/first_flirt: line 116: 4687 Abort trap ${FSLDIR}/bin/flirt -in ${B}_tmp_stage1 -out ${B}_tmp_stage2 -ref ${FSLDIR}/data/standard/${refim} -omat ${B}_tmp_stage2.mat -nosearch -refweight ${FSLDIR}/data/standard/MNI152lin_T1_1mm_subbr_mask
Could not open matrix file test2_tmp_stage1.mat
Cannot read input-matrix
WARNING!!!! Multiple image files detected:
head.nii.gz head.img head.hdr
STOPPING PROGRAM
rm: test2_tmp_stage*: No such file or directory
On 17 Nov 2010, at 23:50, Michael Bonares wrote:
> Hi Mark,
>
> My apologies for not updating sooner. The problem was that T1_image.img and T1_image.hdr were in the working directory, along with T1_image.nii.gz. Upon transferring the .img and .hdr files outside of the working directory, the command (run_first_all -i T1_image -o T1_image_seg) worked.
>
> Curiously, with the .img and .hdr files in the working directory, specifying the T1_image of interest (i.e., run_first_all -i T1_image.nii.gz -o T1_image_seg) did not solve the problem.
>
> Michael
>
>
> On 12 Nov 2010, at 08:33, Mark Jenkinson wrote:
>
>> Hi Again,
>>
>> I now think I understand what you meant.
>> You are not trying to run registration and segmentation
>> separate from FIRST, but instead running them as
>> separate steps as part of FIRST - right?
>>
>> However, I still need to know the exact command
>> you are running and what is failing (in the previous
>> email I meant to say that *without* this info we
>> cannot diagnose the problem). In your original
>> email sounded like run_first or run_first_all was
>> failing, as you got the *.com* files. But from this email
>> it looks like first_flirt is failing. Can you just confirm
>> the exact command you are running and all the
>> files and errors it produces. From this we should
>> be able to sort it out.
>>
>> All the best,
>> Mark
>>
>> On 12 Nov 2010, at 01:45, Mark Jenkinson wrote:
>>
>>> Hi,
>>>
>>> I'm still not clear on what you are doing.
>>> Can you send the exact first_flirt and run_first command lines?
>>> With that it is too difficult to diagnose the problem.
>>>
>>> Also, what do you mean by saying that you run the "segmentation"
>>> separately?!? That is what FIRST is intended to do - segmentation.
>>> How can you run this separately??
>>>
>>> All the best,
>>> Mark
>>>
>>>
>>> On 11 Nov 2010, at 22:42, Michael Bonares wrote:
>>>
>>>> Thanks Mark. I should have elaborated. "This problem" refers to the inability of the run_first_all command to be executed properly, resulting in the previously mentioned outputs (.com files and .logs folder), but not the expected .nii.gz, .vtk, and .bvars files.
>>>>
>>>> I decided to run the registration and the segmentation separately. After running first_flirt output_name output_name_to_std_sub -b, the following error message appears:
>>>>
>>>> STOPPING PROGRAM
>>>> Stage 2: use subcortical mask
>>>> ** ERROR (nifti_image_read): failed to find header file for 'Feb01_2008_T1_nu_final_masked_to_std_sub_tmp_stage1'
>>>> ** ERROR: nifti_image_open(Feb01_2008_T1_nu_final_masked_to_std_sub_tmp_stage1): bad header info
>>>> Error: failed to open file Feb01_2008_T1_nu_final_masked_to_std_sub_tmp_stage1
>>>> ERROR: Could not open image Feb01_2008_T1_nu_final_masked_to_std_sub_tmp_stage1
>>>> Image Exception : #22 :: Failed to read volume Feb01_2008_T1_nu_final_masked_to_std_sub_tmp_stage1
>>>> terminate called after throwing an instance of 'RBD_COMMON::BaseException'
>>>> /usr/local/fsl//bin/first_flirt: line 116: 2137 Aborted ${FSLDIR}/bin/flirt -in ${B}_tmp_stage1 -out ${B}_tmp_stage2 -ref ${FSLDIR}/data/standard/${refim} -omat ${B}_tmp_stage2.mat -nosearch -refweight ${FSLDIR}/data/standard/MNI152lin_T1_1mm_subbr_mask
>>>> Could not open matrix file Feb01_2008_T1_nu_final_masked_to_std_sub_tmp_stage1.mat
>>>> Cannot read input-matrix
>>>>
>>>> Any advice?
>>>>
>>>> Michael
>>>>
>>>> On Wed, Nov 10, 2010 at 7:24 PM, Mark Jenkinson <[log in to unmask]> wrote:
>>>> Hi,
>>>>
>>>> I'm not sure what "this problem" is.
>>>> The files you mention are simply initial files giving
>>>> commands and log files. Check the output_name.logs
>>>> directory and see if there are any error messages in
>>>> the *.e* files, as it says in the documentation.
>>>> Hopefully this will shed some light on the problem.
>>>>
>>>> All the best,
>>>> Mark
>>>>
>>>>
>>>> On 10 Nov 2010, at 18:13, Michael B wrote:
>>>>
>>>>> I also have this problem and have not yet figured out how to solve it.
>>>>>
>>>>> Again, the output is as follows:
>>>>> output_name.com
>>>>> output_name.com2
>>>>> output_name.com3
>>>>> output_name.logs
>>>>>
>>>>> This is in addition to the appearance of a random 5-digit number on the bash terminal, after the run_first_all command has been executed.
>>>>>
>>>>> Michael
>>>>>
>>>>
>>>
>>
>
|