I’m trying to convert .nii, .img files with double precision values to .dcm format.
Due to the limit of .dcm format, I had to multiply pixel value of original image x 10000 and cast to the 16bit integer in order to pass the buffer. However, as expected, I lost many of image details. Is there any good way to minimize lose when converting float to integer?
You could try rescale filter. If that does not work well, you could apply intensity windowing to the data conversion in a similar way done for display purposes. That would preserve the detail the user cares about.
DICOM supports single and double floating point pixel data in the Parametric Map IOD and SOP Class, but I don’t know if the DICOM support in ITK implements reading and writing of it.
You might want to experiment with converting your images with com.pixelmed.convert.NIfTI1ToDicom to see if the result is useful to you.