Irina,
The error messages seem to indicate that FSLDIR variable does not get set correctly when you execute the commands.
Can you ensure that your shell has FSLDIR=/usr/local/fsl before executing?
Danny Kim
________________________________________
From: FSL - FMRIB's Software Library [[log in to unmask]] On Behalf Of Irina Anurova [[log in to unmask]]
Sent: Tuesday, February 02, 2016 6:10 PM
To: [log in to unmask]
Subject: Re: [FSL] non-FA TBSS error
Hi Matthew,
Sorry, could not check this earlier.
I made the following modification to the tbss_non_FA script:
From:
for f in `$FSLDIR/bin/imglob *_FA.*` ; do
To:
for f in `$FSLDIR/bin/imglob *_FA.nii* *_FA.img* *_FA.hdr*`; do
Now, when I run the command tbss_non_FA MD, I get another error message:
using pre-chosen registration target: A1_F_S_GT065_DTI_raw_FA_FA
upsampling alternative images into standard space
/usr/local/fsl/bin/tbss_non_FA: line 95: /bin/imglob: No such file or directory
merging all upsampled MD images into single 4D image
/usr/local/fsl/bin/tbss_non_FA: line 98: /bin/imglob: No such file or directory
/usr/local/fsl/bin/tbss_non_FA: line 98: /bin/fslmerge: No such file
or directory
/usr/local/fsl/bin/tbss_non_FA: line 100: /bin/fslmaths: No such file
or directory
projecting all_MD onto mean FA skeleton
/usr/local/fsl/bin/tbss_non_FA: line 104: /bin/tbss_skeleton: No such
file or directory
now run stats - for example:
randomise -i all_MD_skeletonised -o tbss_MD -m mean_FA_skeleton_mask
-d design.mat -t design.con -n 500 --T2 -V
(after generating design.mat and design.con)
I also tried to run the command imglob *_FA.* from the MD folder (and
then imglob *_FA.nii*), and got the following message:
/usr/local/fsl/bin/imglob: line 97: /bin/remove_ext: No such file or directory
/usr/local/fsl/bin/imglob: line 97: /bin/remove_ext: No such file or directory
/usr/local/fsl/bin/imglob: line 97: /bin/remove_ext: No such file or directory
.............
The file remove_ext does exist in the folder bin.
What would be the next step in fixing this issue?
Thank you very much for your help!
On 12/18/15, Matthew Webster <[log in to unmask]> wrote:
> Hello,
> Yes, this is the potential fix for the error message you are
> seeing.
>
> Kind Regards
> Matthew
>
>> Are you referring to this one?
>>
>> Can you modify the line in $FSLDIR/bin/tbss_non_FA reading:
>>
>> for f in `$FSLDIR/bin/imglob *_FA.*` ; do
>>
>> To:
>>
>> for f in `$FSLDIR/bin/imglob *_FA.nii* *_FA.img* *_FA.hdr*`; do
>>
>> If I found a wrong one, would you please give me a link?
>>
>>
>> On Fri, Dec 18, 2015 at 6:36 AM, Daniel Kim <[log in to unmask]> wrote:
>> Then the solution that Matthew posted should work.
>>
>> Cheers
>>
>> Danny Kim
>> ________________________________________
>> From: FSL - FMRIB's Software Library [[log in to unmask]] On Behalf Of
>> Irina Anurova [[log in to unmask]]
>> Sent: Thursday, December 17, 2015 7:10 PM
>> To: [log in to unmask]
>> Subject: Re: [FSL] non-FA TBSS error
>>
>> Hi Danny,
>> Sorry, my mistake, I have 164 images which end with _FA.nii.gz. The others
>> have either _warp postfix or _to_target postfix or _mask postfix.
>> Thank you again!
>>
>> On Thu, Dec 17, 2015 at 8:41 PM, Daniel Kim
>> <[log in to unmask]<mailto:[log in to unmask]>> wrote:
>> Hi Irina
>>
>> I believe Matthew recently provided some solution to this exact problem
>> for someone else on the list. You can try that solution for now.
>> But if your FA folder contains 20000+ images that ends with _FA.nii.gz,
>> not sure if that solution would work. Still worth a try.
>>
>> I'm puzzled that your folder contains that many images that ends with FA
>> ending - it should have appended _warp postfix to majority of the files.
>>
>> I'm away from my computer right now but when I get a chance I can suggest
>> a better solution for you.
>>
>> Best
>>
>> Danny Kim
>> ________________________________________
>> From: FSL - FMRIB's Software Library
>> [[log in to unmask]<mailto:[log in to unmask]>] On Behalf Of Irina Anurova
>> [[log in to unmask]<mailto:[log in to unmask]>]
>> Sent: Wednesday, December 16, 2015 7:03 PM
>> To: [log in to unmask]<mailto:[log in to unmask]>
>> Subject: Re: [FSL] non-FA TBSS error
>>
>> Hi Danny,
>> Thank you very much for helping me. You are right, there are 164x164=26
>> 896 *._FA_FA.nii.gz files inside the FA folder, because the -n option
>> coregisteres each subject's image with all other images from the group
>> (164 subjects totally) in order to identify the "ideal" representative
>> subject. What do you think, would it help if I remove all the images from
>> the FA folder except for those which a coregistered with the "ideal" one?
>>
>> On Thu, Dec 17, 2015 at 3:14 AM, Daniel Kim
>> <[log in to unmask]<mailto:[log in to unmask]><mailto:[log in to unmask]<mailto:[log in to unmask]>>>
>> wrote:
>> Hi Irina,
>>
>> You should be able to use tbss_2_reg -n or -T results for non-FA TBSS.
>>
>> Reason why I asked you to look in the FA folder is because of the error
>> message you posted earlier: "imglob: Argument list too long"
>>
>> In the tbss_non_FA script, one of the first thing that it does is get all
>> the names of the subject images using imglob.
>>
>> Under the FA folder, imglob *_FA.* should only list 164 images that you
>> have, but I have a feeling that for whatever reason imglob is finding way
>> too many images.
>>
>> Are there more images inside FA folder that ends with _FA.nii.gz?
>>
>> Danny Kim
>>
>> On 2015-12-16, at 4:05 PM, Irina Anurova wrote:
>>
>> Thank you very much, Danny (sorry, I've mixed up your name in the previous
>> e-mail). I'll try tomorrow.
>> I found several posts almost exactly like mine on this forum, and
>> sometimes people said that they have used the -n option in the FA TBSS.
>> Someone even has reported that he used the tbss_non_FA script after using
>> the -T option, and it went fine, by the same error appeared after the -T
>> option. Do you happen to know, did anyone use the -n option and succeeded
>> with a non-FA TBSS?
>>
>> On Thu, Dec 17, 2015 at 12:32 AM, Daniel Kim
>> <[log in to unmask]<mailto:[log in to unmask]><mailto:[log in to unmask]<mailto:[log in to unmask]>>>
>> wrote:
>> No need to do preproc step on MD images.
>>
>> Can you go in your FA folder and try:
>>
>> $FSLDIR/bin/imglob *_FA.*
>>
>> You should just get a list of all your subject's FA image names (e.g.
>> "subj1_FA_FA subj2_FA_FA ... subjN_FA_FA")
>>
>> If you get an error, then something is interfering with imglob.
>>
>> Danny Kim
>>
>> On 2015-12-16, at 1:20 PM, Irina Anurova wrote:
>>
>> Hi Kim,
>> I have 164 MD images from 164 subjects. All the MD files have exactly the
>> same names as the files in the origdata folder (e.g., SUBJ1_FA.nii.gz).
>> My subjects are children of different ages, therefore I used the -n option
>> during the FA TBSS (registration to the "most representative" subject's
>> image). Thus the FA directory contains 164x164=26 896 transformation
>> matrices. However, this huge number was not an obstacle for the FA TBSS.
>> During the FA TBSS we first have to do a preprocessing (by running
>> tbss_1_preproc *.nii.gz). At this step the images are eroded and
>> eventually become smaller in size and are renamed from SUBJ1_FA.nii.gz
>> into SUBJ1_FA_FA.nii.gz. And only after that we do co-registration.
>> In the user's guide it is not mentioned, should we perform this step
>> (tbss_1_preproc) for the MD images before running the tbss_non_FA script
>> or this erosion and renaming step is included into the tbss_non_FA
>> script?
>>
>> On Wed, Dec 16, 2015 at 9:36 PM, Daniel Kim
>> <[log in to unmask]<mailto:[log in to unmask]><mailto:[log in to unmask]<mailto:[log in to unmask]>>>
>> wrote:
>> Hi Irina
>>
>> How many MD images do you have?
>> For some reason, imglob failed to create the proper list of input for
>> fslmerge (it complains that the list is too long).
>>
>> Danny Kim
>>
>> On 2015-12-16, at 11:08 AM, Rosalia Dacosta Aguayo wrote:
>>
>> And your FA images, have you checked the registrations?....and what about
>> your MD images?....have you check them too...is you have done this and
>> still have problems...I am sorry to tell you that I do not know how I can
>> help you more unless you are working with two data files for every subject
>> in the space....because the message of fslmerge it is curious to
>> me...please could you explain with more detail what are you really doing?
>> From your information it is not clear for me where can be the problem....
>>
>> Thank you, and do not deseperate...
>>
>> Rosala.
>>
>> 2015-12-16 20:00 GMT+01:00 Irina Anurova
>> <[log in to unmask]<mailto:[log in to unmask]><mailto:[log in to unmask]<mailto:[log in to unmask]>>>:
>> Hi Rosalia,
>> Yes, I am absolutely sure that my MD images are called exactly the same as
>> my "origdata". The directory MD is created in a correct place. The disk
>> space is not an issue either.
>> Regards,
>> Irina
>>
>> On Wed, Dec 16, 2015 at 5:16 PM, Rosalia Dacosta Aguayo
>> <[log in to unmask]<mailto:[log in to unmask]><mailto:[log in to unmask]<mailto:[log in to unmask]>>>
>> wrote:
>> Hi Irina,
>>
>> Are you sure that your MD images are called exactly the same as your
>> "origdata"?
>>
>> You should get put inside mytbss directory, where you have origdata,
>> stats,....and do: mkdir MD (this will create you a new folder called MD).
>> Once you have the folder, copy inside all your MD images and make sure you
>> have named them exactly as the "origdata".....then you will not have
>> problems when calling tbss_non_FA MD (in order to create your MD
>> template).
>>
>> Another thing is that you must be careful about spaces, . or something
>> else in the name of your origdata and make an exploration of your FA
>> images in order to make sure they are fine.
>>
>> Hope this helps,
>>
>> Rosalia.
>>
>> 2015-12-16 15:44 GMT+01:00 Irina Anurova
>> <[log in to unmask]<mailto:[log in to unmask]><mailto:[log in to unmask]<mailto:[log in to unmask]>>>:
>> Dear FSL Experts,
>>
>> When I am trying to run tbss_non_FA on MD images, I receive an error shown
>> below.
>> I am using the FSL version 5.0. Furthermore, I used the "-n" option for
>> the FA TBSS (tbss_2).
>> How to solve this problem?
>>
>> Thank you,
>> Irina.
>>
>> The error message:
>>
>> tbss_non_FA MD
>> using pre-chosen registration target: A1_F_S_GT065_DTI_raw_FA_FA
>> upsampling alternative images into standard space
>> /usr/share/fsl/5.0/bin/tbss_non_FA: 1: /usr/share/fsl/5.0/bin/tbss_non_FA:
>> /usr/share/fsl/5.0/bin/imglob: Argument list too long
>> merging all upsampled MD images into single 4D image
>>
>> Usage: fslmerge <-x/y/z/t/a/tr> <output> <file1 file2 .......> [tr value
>> in seconds]
>> -t : concatenate images in time
>> -x : concatenate images in the x direction
>> -y : concatenate images in the y direction
>> -z : concatenate images in the z direction
>> -a : auto-choose: single slices -> volume, volumes -> 4D (time
>> series)
>> -tr : concatenate images in time and set the output image tr to the
>> final option value
>>
>> Cannot open volume all_MD for reading!
>> projecting all_MD onto mean FA skeleton
>> Image Exception : #22 :: ERROR: Could not open image all_MD
>> terminate called after throwing an instance of
>> 'RBD_COMMON::BaseException'
>> Aborted (core dumped)
>>
>
>
|