fix(io): dicom writer fails with too randomise image and nvjpeg
Description
There is a fail on windows when writing dicoms of too randomize image with njpeg2000.
In this specific case, gdcm tries to write the image in the dicom with nvjpeg. On windows, with nvjpeg2000 version 0.6, this crashes because of too randomized image (fixed in version 0.7 of nvJpeg2000, used on linux).
This failure is well known, and a backup is used for classical nvJpeg2000 image writing, and a backup is used to openJpeg. This works classically, but not in the case of a gdcm dicom writing. Indeed, gdcm supports intrinsically openJpeg, and openJpeg is not supported as an external codeck, leading to a double fail.
Steps to reproduce
- create a randomized image (tu)
- have an active nvJpeg2000 on your windows computer
- try writing the image in a dicom (tu)
=> fail.
Proposal
several options are possible:
- don't use fully randomized images on dicom writing
- upgrade the nvjpek2000 version
- make gdcm work with an additional openJpeg compression
Functional specifications
All dicom should be writen properly
Technical specifications
fix dicom writer to support openJpeg
Test plan
run all test