InsightSoftwareConsortium / ITKColorNormalization

Structure preserving color normalization on H&E images using a reference image
Apache License 2.0
18 stars 5 forks source link

Output separate images for Hematoxylin and Eosin. #32

Open Leengit opened 2 years ago

Leengit commented 2 years ago

This issue is motivated by https://discourse.itk.org/t/itk-error-hematoxylin-and-eosin-are-getting-mixed-up-failed/4767/36

To be determined:

  1. Should these images be produced always or only at the user's request? Tentative answer: only if requested. Incrementally they are very little computational effort; however, including them means that three images are produced rather than just one, and that could be a lot of memory.
  2. Should the normalized image always be produced, or only the two new optional images if that is what the user requests? Tentative answer: let the user decide. Saving the output memory may be valuable to the user.
  3. If the user requests only the two new images, should they be numbered output[0] and output[1] or, alternatively, output[1] and output[2], with the latter case reflecting that the originally supported output[0] is missing from this set of output images. Tentative answer is: output[0] and output[1].
Leengit commented 2 years ago

Implementation goals:

  1. Is implemented as a distinct filter, StructurePreservingColorSeparationFilter.
  2. Accepts a single input image, but no reference image. That is, no color normalization is performed; if that is desired too, use the StructurePreservingColorNormalizationFilter first.
  3. Produces two output images. The first shows hematoxylin only; that is, it shows what would happen if no eosin stain had been applied. The second output image is vice-versa.
  4. Has much of it implementation via the methods within StructurePreservingColorNormalizationFilter.

This interface is simpler than exposing both functionalities within a single filter. The price is that there will be some redundant computations in the situation that the user wants both color normalization and color separation.