cantaloupe-project / cantaloupe

High-performance dynamic image server in Java
https://cantaloupe-project.github.io/
Other
268 stars 111 forks source link

Question: Support for intensity normalization after removal of ImageMagickProcessor? #530

Open imoutsatsos opened 3 years ago

imoutsatsos commented 3 years ago

In the past @adolski had implemented support for serving intensity normalized images (and this was a great contribution to our scientific imaging work. Thank you!) Up to v 4.0.1 there was a procesor.normalize=false/true property that expanded the image contrast to utilize the entire dynamic range of the image. We use this functionality extensively for TIFF images generated from automated microscopes and other laboratory images.

I believe support for these operations was provided by ImageMagickProcessor. How is the removal of this processor from the v5.0 release affecting these functions. Is it supplemented by one of the other image processors, and if so, are there any properties that need to be set? I no longer see the processor.normalize property in the properties sample.

Thank you and best regards

adolski commented 3 years ago

Hi @imoutsatsos , I don't remember the specifics, but I think this feature just became too burdensome to maintain. (I also don't like how it's enabled server-side--I think client-side would be more appropriate, but of course the IIIF Image API doesn't support that in a clean way.) I haven't heard any other feedback about its removal, so you may be the only one using it.

To get normalization working with only Java2dProcessor, for only images that are one-shot-read, should be pretty simple. If you want to maintain a fork with this feature.

imoutsatsos commented 3 years ago

Thanks for the clarification @adolski. I agree that for many of the 'cultural domain' uses of Cantaloupe and IIIF it is rather unlikely that the images require intensity normalization to be viewed, but for scientific imaging the range of intensities taken in an automated way can vary widely thus requiring this type of intensity processing. It is also true that, at least for automated microscopy, most of the image sizes were small enough to be 'one-shot read'. Finally, the majority of scientific images are in TIFF format which seems to have rather limited support (only 2 of 7 Cantaloupe image processors support it).

I will need to discuss this internally with my developer colleagues to determine the implication of these changes and whether maintaining a Cantaloupe fork is feasible. Also would you mind clarifying the comment 'too burdensome to maintain' Is this because of the use of ImageMagick as a processor or because the feature is not supported by the iiif API?

As always your feedback is much appreciated. Thank you and best regards

imoutsatsos commented 3 years ago

Hmm... I just took a look at the repo and I see that the removal of the 'normalize operation' affected 24 files! I think I'm starting to understand the 'burdensome to maintain' comment