BIC-MNI / minc-tools

Basic minc-tools from former minc repository
Other
30 stars 25 forks source link

dcm2mnc and JPEG compression #67

Closed andrewjanke closed 4 years ago

andrewjanke commented 7 years ago

I note that dcm2mnc will silently fail on images with JPEG compression (you get black/blank images). Specifically ones that say things like this:

# Dicom-Data-Set # Used TransferSyntax: JPEG Lossless, Non-hierarchical, 1st Order Prediction

I recognise that this is a licencing thing, meaning we'd have to include a JPEG licence in dcm2mnc to make this happen but am curious if others have ways around this. OSIRIX is one way, fork a decode process to something else?

For now I do something like this:

for i inls -1 *.dcm; do dcmdjpeg $i unjpg/$i; done

And then the conversion is all fine. Can we link/call/something dcmdjpeg?

rdvincent commented 7 years ago

There is actually some code in there now to handle jpeg compression, and to crash if the compression is something we don't know how to handle. There are open-source libraries for most of the useful transfer encodings.

andrewjanke commented 7 years ago

Ah, in the develop branch.

https://github.com/BIC-MNI/minc-tools/commit/157d0532dd137e21147ee3de6a92e77f37463457

I shall give it a whirl.

a

On 5 May 2017 at 12:15, Robert D Vincent notifications@github.com wrote:

There is actually some code in there now to handle jpeg compression, and to crash if the compression is something we don't know how to handle. There are open-source libraries for most of the useful transfer encodings.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/BIC-MNI/minc-tools/issues/67#issuecomment-299355491, or mute the thread https://github.com/notifications/unsubscribe-auth/AATwipIPdNHqMzdFpjFR_T3SffIsCMvmks5r2oYwgaJpZM4NRZRD .

vfonov commented 4 years ago

fixed by https://github.com/BIC-MNI/minc-tools/commit/157d0532dd137e21147ee3de6a92e77f37463457