Print

Print


I haven't tested it, but try changing spm_dicom_convert.m so that the
determine_datatype function says:

function dt = determine_datatype(hdr)
% Determine what datatype to use for NIfTI images
be = spm_platform('bigend');
if hdr.BitsStored>16
    if hdr.PixelRepresentation
        dt  = [spm_type( 'int32') be];
    else
        dt  = [spm_type('uint32') be];
    end
else
    if hdr.PixelRepresentation
        dt  = [spm_type( 'int16') be];
    else
        dt  = [spm_type('uint16') be];
    end
end

Best regards,
-John

On 18 January 2012 10:39, Michael Marxen <[log in to unmask]> wrote:
> Dear Guillaume, dear John,
>
> The bad news is that there is a problem with release 4290. I just died the
> following:
> 1) Dicom conversion under spm8 v4010 -> correct import to int16
> 2) run spm_update(4290)
> 3) Dicom conversion under the updated version -> incorrect import to uint16
>
> The good news is that I also updated my previous 4290 version with
> Guillaume's link to 4624. With this version,
> The import works correctly again.
> Will there be a new release soon?
>
> Best, Michael
>
>
> ----------------------------------------------------------------------------
> --------
> Michael Marxen, Ph.D., Dipl.-Phys.
> MR Research Physicist and
> Technical Co-Director Neuroimaging Centre
>
> Technische Universität Dresden
> Faculty of Medicine Carl Gustav Carus
> Department of Psychiatry und Psychotherapy
> Section of Systems Neuroscience
>
> Würzburger Str. 35
> 01187 Dresden
> Germany
>
> Phone:  +49 (351) 46342212
> Fax:      +49 (351) 46342202
> E-Mail:  [log in to unmask]
> ----------------------------------------------------------------------------
> --------
>
> -----Ursprüngliche Nachricht-----
> Von: Guillaume Flandin [mailto:[log in to unmask]]
> Gesendet: Dienstag, 17. Januar 2012 15:29
> An: Michael Marxen
> Betreff: Re: [SPM] dicom import under version 4290 to data type uint16
>
> Dear Michael,
>
> thanks for this. Could you try the latest in-house version of SPM8:
> ftp://ftp.fil.ion.ucl.ac.uk/spm/restricted/beta.Duc0z6iLtE/spm8_r4624.zip
> and let me know if everything is all fine with it?
>
> Best regards,
> Guillaume.
>
>
> On 17/01/12 13:57, Michael Marxen wrote:
>> Dear SPM-Developers,
>>
>> I noticed that the latest SPM8 release Dicom import seems to convert
>> EPI-images (Siemens Trio) from int16 (signed) to uint16 (unsigned).
>>
>> I converted the same file with the 4010 release and it converted
>> (correctly) to int16. SPM8 is running under Windows7 and MatlabR2010a.
>>
>> I only noticed this because MRICroN misinterpretes the intensity of
>> these uint16 images by a factor of 2. I think a bug in MRICroN.
>>
>>
>>
>> However, SPM should also not do such a type conversion, e.g. in case
>> dicom data is negative ( I am not sure that the standard allows that
>> but most likely it does because our original  dicom files are signed
> int16.
>> ) . It seems safest for an import function not to change data types.
>>
>>
>>
>> Is this a bug or intended?
>>
>>
>>
>> Best, Michael
>>
>>
>>
>>
>>
>> ----------------------------------------------------------------------
>> --------------
>>
>> Michael Marxen, Ph.D., Dipl.-Phys.
>>
>> MR Research Physicist and
>>
>> Technical Co-Director Neuroimaging Centre
>>
>>
>>
>> Technische Universität Dresden
>>
>> Faculty of Medicine Carl Gustav Carus
>>
>> Department of Psychiatry und Psychotherapy
>>
>> Section of Systems Neuroscience
>>
>>
>>
>> Würzburger Str. 35
>>
>> 01187 Dresden
>>
>> Germany
>>
>>
>>
>> Phone:  +49 (351) 46342212
>>
>> Fax:      +49 (351) 46342202
>>
>> E-Mail:  [log in to unmask]
>> <mailto:[log in to unmask]>
>>
>> ----------------------------------------------------------------------
>> --------------
>>
>
> --
> Guillaume Flandin, PhD
> Wellcome Trust Centre for Neuroimaging
> University College London
> 12 Queen Square
> London WC1N 3BG
>
>