[Insight-users] convert raw to dicom

Mathieu Malaterre mathieu.malaterre at gmail.com
Wed Jul 9 10:39:44 EDT 2008


On Tue, Jul 8, 2008 at 6:18 PM, alexandre govignon
<govignon.alexandre at gmail.com> wrote:
> Can you tel me how can i convert a raw files in a dicom files... i
> modify the file: DicomSeriesReadImageWrite2.cxx, but it doesn't
> work...
>
> I have this debugger error:
>
>
> exception in file writer
>
> itk::ExceptionObject (0x17707f0)
> Location: "virtual void itk::GDCMImageIO::Write(const void*)"
> File: /Users/alex/Documents/Essai1Interface/Insight2/Code/IO/itkGDCMImageIO.cxx
> Line: 1233
> Description: itk::ERROR: GDCMImageIO(0x66a370): A Floating point
> buffer was passed but the stored pixel type was not specified.This is
> currently not supported

Salut Alexandre,

  You found the only case that is not auto-magically handled
internally. DICOM does not support directly floating point value. The
only thing you can do is apply a well designed linear operation to
transform your floating point data to discretized one.
A naive approach is to simply take the min & max of your image and
compute the slope/intercept for the linear transform based on those
values. A more advanced technic would be to use the histogram.

  Anyway what I am trying to say is that you have to explicitly
specify the linear transform you want to use before trying to store
this image as a valid DICOM file.

HTH
-- 
Mathieu


More information about the Insight-users mailing list