Print

Print


Hi,

Another trick might be to use:
fslmeants -i maskfile -m maskfile --showall | head -3 > mask_coordinate.txt
This will give you instead of 0's and 1's the voxel coordinates of the 
mask in a 3-row format with X as first row, y as second row ...
Maybe this is a fast intermediate step for what you want to achieve.

good luck,
wolf

On 10/14/2009 09:04 AM, Jasper Luyendijk wrote:
> Hi,
>
> If I'm not mistaken the 'fsl2ascii' command under fslutils in the list of tools (FSL-website) converts images (nii) to text files.
>
> Jasper
>
>
> -----Original Message-----
> From: FSL - FMRIB's Software Library [mailto:[log in to unmask]] On Behalf Of Rolf Heckemann
> Sent: woensdag 14 oktober 2009 8:58
> To: [log in to unmask]
> Subject: Re: [FSL] how to read bet binary mask
>
> Ying
>
> As far as I'm aware, you cannot convert NIfTI to ASCII with FSL, but
> an external utility will do it.  Try (X)MedCon
> <http://xmedcon.sourceforge.net/>
>
> Rolf
>
>
> On Tue, Oct 13, 2009 at 10:36:21PM +0100, Ying Chen wrote:
>    
>> Hello,
>>
>> Bet2 -m option generates binary brain mask, with 0 outside the brain and 1
>> inside the brain. The output brain mask is in .nii.gz format. My questions
>> is how I can read it as a text file which has a bunch of zeros and ones. Do
>> I need to convert .nii.gz format to another kind of format to be able to
>> read the text version of the brain mask?
>>
>> Thanks a lot in advance,
>> Ying
>>      
>