Here's a version of the "image correlation with masking" as a more complete script.
Cheers,
Carl
On 2012-06-08, at 12:44 PM, Michael Harms wrote:
> Note that 'fslcc' includes the entire volume, including any non-brain
> voxels, as part of computing its spatial correlation. And it doesn't
> currently have an option to specify an input mask.
>
> If you want to compute a spatial correlation based only on brain voxels,
> which is in my opinion more reflective of what one generally would want,
> then you either need to implement the calculation from first principles
> using fslmaths, or you can use AFNI's '3ddot' binary which has the
> option to specify an input mask.
>
> cheers,
> -MH
>
> On Fri, 2012-06-08 at 17:12 +0200, Christian F. Beckmann wrote:
>> Hi
>>
>> If al, you want is spatial correlation then just run
>>
>> fslcc img1 img2
>>
>> at the command line
>> Hth
>> Christian
>>
>> Sent from my iPad
>>
>> On 08.06.2012, at 17:01, Benjamin Wagner <[log in to unmask]> wrote:
>>
>>> About the only other thing I could suggest is trying setenv as opposed to set:
>>>
>>> setenv img1 home/kami/testMelodic/test/img1.nii.gz
>>>
>>> or
>>>
>>> export img1=home/kami/testMelodic/test/img1.nii.gz
>>>
>>> Best,
>>> Ben
>>>
>>> -----Original Message-----
>>> From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of kambiz rakhshan
>>> Sent: Friday, June 08, 2012 10:34 AM
>>> To: [log in to unmask]
>>> Subject: Re: [FSL] Please help- template matching after melöodic
>>>
>>> Dear Ben,
>>>
>>> Thanks very much for your reply!
>>>
>>> That is exactly what I did, but please the problem persist, see below:
>>>
>>> kami@kami-Z800-Ubuntu:~/testMelodic/test$ set img1=home/kami/testMelodic/test/img1.nii.gz
>>>
>>> kami@kami-Z800-Ubuntu:~/testMelodic/test$ set img2=home/kami/testMelodic/test/img2.nii.gz
>>>
>>> kami@kami-Z800-Ubuntu:~/testMelodic/test$ set mask=home/kami/testMelodic/test/mask.nii.gz
>>>
>>> kami@kami-Z800-Ubuntu:~/testMelodic/test$ pearcorr
>>> img1: Undefined variable.
>>> img2: Undefined variable.
>>> img1: Undefined variable.
>>>
>>> I really don't know why it is not working and I would highly appreciate if you help me!
>>> /kami
>>>
>>>
>>>
>>> --- On Fri, 6/8/12, Benjamin Wagner <[log in to unmask]> wrote:
>>>
>>>> From: Benjamin Wagner <[log in to unmask]>
>>>> Subject: Re: [FSL] Please help- template matching after melöodic
>>>> To: [log in to unmask]
>>>> Date: Friday, June 8, 2012, 8:40 AM
>>>> Hello Kami,
>>>>
>>>> Please replace the #!. It is correct for the #! to start a script
>>>> file. The script is looking for variables to be defined ahead of time
>>>> and not on the command line. Depending on what shell you are using
>>>> you should
>>>> issue:
>>>>
>>>> set img1=/path/to/some/image1.nii.gz
>>>> set img2=/path/to/some/image2.nii.gz
>>>> set mask=/path/to/some/mask.nii.gz
>>>> pearcorr
>>>>
>>>> Ben
>>>>
>>>> -----Original Message-----
>>>> From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On
>>>> Behalf Of kambiz rakhshan
>>>> Sent: Friday, June 08, 2012 9:08 AM
>>>> To: [log in to unmask]
>>>> Subject: Re: [FSL] Please help- template matching after melöodic
>>>>
>>>> Thanks,
>>>> but even after removing the hass the program goes to the following
>>>> line which makes me uncertain about what should I
>>>> do:
>>>>
>>>> kami-Z800-Ubuntu:~>
>>>>
>>>> when I enter pearcorr (the name of the program), it just show me
>>>> aging:
>>>>
>>>> kami-Z800-Ubuntu:~>
>>>>
>>>> I don't know really what should I do, and I am really stuck!
>>>> Any help will be highly appreciated!
>>>>
>>>> Kami
>>>>
>>>>
>>>>
>>>> --- On Fri, 6/8/12, Christine Zakrzewski <[log in to unmask]>
>>>> wrote:
>>>>
>>>>> From: Christine Zakrzewski <[log in to unmask]>
>>>>> Subject: Re: [FSL] Please help- template matching after
>>>> melöodic
>>>>> To: [log in to unmask]
>>>>> Date: Friday, June 8, 2012, 4:12 AM
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> at first glance, your shebang is commented out.
>>>>> #!/bin/csh
>>>>> The shebang tells shell what language to use,
>>>> !/bin/csh. the hash
>>>>> mark tells the shell to ignore this line, when
>>>> executing script.
>>>>> hope this is helpful.
>>>>> christine
>>>>>
>>>>>>
>>>>> Date: Thu, 7 Jun 2012 15:03:39 -0700
>>>>>> From: [log in to unmask]
>>>>>> Subject: [FSL] Please help- template matching
>>>> after
>>>>> melöodic
>>>>>> To: [log in to unmask]
>>>>>>
>>>>>> Dear all,
>>>>>>
>>>>>> I am using the code written by Michael to match
>>>> my
>>>>> resting state network with the one reported in the
>>>> Smith PNAS
>>>>> paper.However, when I run the code(I named it
>>>> pearcorr;see attach), I
>>>>> get some complains about non-defined img1(twice), img2.
>>>> The attach is
>>>>> the code that I used. My knowledge of Linux is very
>>>> little, so I will
>>>>> highly appreciate if someone let me know how shoud I
>>>> run the command.
>>>>>> Many thanks!
>>>>>>
>>>>>> my commend in the terminal:
>>>>>>
>>>>>> pearcorr -img1 img1.nii.gz -img2 img2.nii.gz
>>>> -mask
>>>>> mask.nii.gz
>>>>>>
>>>>>> however:
>>>>>> img1: Undefined variable.
>>>>>> img2: Undefined variable.
>>>>>> img1: Undefined variable.
>>>>>> Kami
>>>>>
>>>>
>>>>
>>>>
>>>>>
>>>>
>
|