Dear Filipa,
Since you work in matlab or can use matlab imread,
you can write the data out as below
===========
% assume you saved the 3D data matrix, anatdata, in dicom orientation
load anatdata.mat
data_size = [size(anatdata,1) size(anatdata,2) size(anatdata,3)];
% write img file
file_name_w = 'anatdata.img';% Analyze file name
fid_w = fopen(file_name_w,'w');
I = zeros(data_size(1),data_size(2));
for i = 1:data_size(3)
I(:,:) = anatdata(:,:,i);
I2 = fliplr(I);
fwrite(fid_w,I2,'int16');% ? precision: 'double' , 'float32'
end
fclose(fid_w);
==========
and then edit/create the hdr with spm99.
Cheers,
Witaya Sungkarat
> Dear SPM experts,
>
> I have been trying to convert tiff images into analyze in
> MRICRO software but been unsuccessful every time, even converting the
> tiff into other type of image, decompressing, everything... Would you
> be able to help me? The message it gives me is the following
> message(TIFF READ ERROR:IMAGE DATA IS COMPRESSED. CURRENTLY ONLY
> UNCOMPRESSED DATA IS SUPPORTED). I have tried to decompress and still
> gives same message.This were images segmented on matlab and saved
> automatically.
>
> Thank you,
> Filipa Ferreira
|