-
Hi, This is my code:
Best, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
If the image is read and re-compressed into jpeg it is normal to lose the metadata and moreover the image will be different because it is recompressed (jpeg is lossy even at 100% quality). To convert from jpeg to dcm, it is better to use the function of the dicomizer class with the noAPPn parameter set to false (preserves the metadata). Then you just have to extract the jpeg file from the dicom (note that this code must be improved to handle all situations). If a jpeg has an orientation flag then most dicom viewer will read the image with the orientation according to the data. The dicomization done in Weasis Dicomizer takes this into account and applies the rotation of the data when necessary.
|
Beta Was this translation helpful? Give feedback.
-
See examples of orientation flags: https://github.com/recurser/exif-orientation-examples |
Beta Was this translation helpful? Give feedback.
-
Really thanks a lot for the code it works perfectly. |
Beta Was this translation helpful? Give feedback.
-
Yes you can get it from the dicomMetaData object. |
Beta Was this translation helpful? Give feedback.
If the image is read and re-compressed into jpeg it is normal to lose the metadata and moreover the image will be different because it is recompressed (jpeg is lossy even at 100% quality).
To convert from jpeg to dcm, it is better to use the function of the dicomizer class with the noAPPn parameter set to false (preserves the metadata). Then you just have to extract the jpeg file from the dicom (note that this code must be improved to handle all situations).
If a jpeg has an orientation flag then most dicom viewer will read the image with the orientation according to the data. The dicomization done in Weasis Dicomizer takes this into account and applies the rotation of the data when neces…