JPEG Encoding #1345
Replies: 2 comments
-
Sorry for the delay in responding, there have been so many issues and PRs lately to try to keep up with. First, I'm sure this would be a very welcome addition for many people, and quite a significant undertaking, so thanks for proposing it. My first impressions: I'm thinking of some kind of dictionary or class that provides a 'context' that could flexibly handle different settings now and allow for future ones also. Then the default settings could be replaced as needed via, e.g., keyword arguments or passing a dict. Perhaps the encoding type (J2K, but possible others in future) would be a required argument, but then each type would have an options dict whose keys depended on the compression engine. Just some initial thoughts without thinking a lot about the technical details... |
Beta Was this translation helpful? Give feedback.
-
Hey this looks pretty good - I used J2K encoded path files a bit in a previous job quite a while ago, and it's complex to say the least. So the above looks reasonable to me, and having default options does make it probably use-able to a lot more people. But one thought about that, is perhaps provide a set of defaults, rather than a single 'default'. If I remember correctly, there was compression parameters that were best suited to, say, CT that were quite different to something like a colour, comparably huge digital path image. So, with Darcy's idea of having a dict or equivalent be used to specify the compression parameters, perhaps have a set of default dictionary specifications pre-defined. That way you could choose which you want to use, easily modify or view the parameters in a default, or just go whole-hog and define you're own from scratch. A separate issue we ran into is for dealing with pathology images in particular, was the simple problem of their size. In the above, for encoding, is there any thought to be able to handle the encoding in a way that doesn't require the entire uncompressed and compressed data to be in-memory at once? |
Beta Was this translation helpful? Give feedback.
-
I've started working on J2K encoding in pylibjpeg, and I'm wondering how pydicom will end up interfacing with it. So I have some questions:
Beta Was this translation helpful? Give feedback.
All reactions