Hi,
I set pixel value of image with double value and tried to save image as dicom file. I am getting error like this
“Description: itk::ERROR: GDCMImageIO(0573B7B0): A Floating point buffer was passed but the stored pixel type was not specified.This is currently not supported”.
Most DICOM modalities doesn’t support double or float precision pixel values, if you really want this you could use the modality “Parametric Map” but I’m unsure if the ImageFileWriter supports this. Usually you can only store pixel values as 16-bit integers and then use intercept/slope parameters to reconstruct the data. Of course you usually get a quantization error when doing this depending on the original data.
As I mentioned there are some modalities that supports 32 or 64-bits, “Parametric Map” and perhaps “Secondary Capture”, but I’m uncertain how the ITK image writer works and what the resulting modality is.
ITK currently only does “16bits floating point buffer”. So you need to use the Rescale Slope/Intercept to get a float16 buffer approximation of your original dataset.
GDCM does not implement support f(read+write) of Parametric Map, this is rather a big change and very few DICOM viewers support them (AFAIK).
Thank you for the information.
Now i am trying to add header tag data for rescale intercept . The writer is throwing exception.
Unhandled Exception: System.Runtime.InteropServices.SEHException: External component has thrown an exception.
at itk.ImageFileWriter<itk::Image<short,2> >.GenerateData(ImageFileWriter<itk::Image<short\,2> >* ) in C:\ITK_4.13_x86_vs17\ITK\include\ITK-4.13\itkImageFileWriter.hxx:line 429
at itk.ImageFileWriter<itk::Image<short,2> >.Write(ImageFileWriter<itk::Image<short\,2> >* ) in C:\ITK_4.13_x86_vs17\ITK\include\ITK-4.13\itkImageFileWriter.hxx:line 363
at itk.ImageFileWriter<itk::Image<short,2> >.Update(ImageFileWriter<itk::Image<short\,2> >* ) in C:\ITK_4.13_x86_vs17\ITK\include\ITK-4.13\itkImageFileWriter.h:line 165
I am not able to update only these two tags. Along with it i changed 2 more tags (“0008|0016” and 0018|6032) .Those are getting updated. But not rescale tags.
Any help is appreciated.