Hi,
Yes, in theory it is fine to convert to NIFTI RGB but I don't know if any other tools use this or not.
What I would recommend as a workaround (if you can't find an easy tool to do this) is to make a fake file in matlab that starts with an 8-bit image (UINT8) and then repeats each value 3 times in place (e.g. if the original intensity values were 98 67 102 ... then the new ones should be 98 98 98 67 67 67 102 102 102 ...). Then save this out as a UINT8 image but with an x-dimension (dim1) that is three times as big (don't change the mm size - i.e. leave pixdim1 untouched). Then, you can use fsledithd (or nifti_tool if you have it) on this new/fake image to change the "datatype" field in the nifti header to be RGB (value is 128) and dim1 to be the original value (one third of the fake value) - these must both be changed in the same command, not sequentially. This should then make a valid RGB nifti file (that is grey, not coloured).
All the best,
Mark
> On 24 Oct 2016, at 08:13, Alberto <[log in to unmask]> wrote:
>
> Hi Mark,
>
> I need NIFTI RGB because I have a function written in Matlab that read only
> this datatype; so, in order to use FSL output I have to convert NIFTI FLOAT to
> NIFTI RGB.
> Do you know some other tools about this conversion?
> But, in general, as far you know, is it possibile to transform FLOAT datatype
> to RGB?
>
> Best
> Albert
>
>
>> ----Messaggio originale----
>> Da: "Mark Jenkinson" <[log in to unmask]>
>> Data: 23-ott-2016 22.11
>> A: <[log in to unmask]>
>> Ogg: Re: [FSL] From NIFTI FLOAT to NIFTI RGB
>>
>> Hi,
>>
>> I'm afraid not, as we don't support RGB.
>> What do you need this for?
>>
>> All the best,
>> Mark
>>
>>
>>> On 22 Oct 2016, at 10:49, Albert <[log in to unmask]
> AC.UK> wrote:
>>>
>>> Dear Expert,
>>>
>>> is there some tools in FSL to convert the datatype FLOAT of a NIFTI file in
> a RGB one?
>>>
>>> Thanks in advance
>>> Albert
>>
|