Skip to content

Instantly share code, notes, and snippets.

@CGDogan
Last active September 11, 2023 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CGDogan/f6e720357d503c506c02199ae8947be1 to your computer and use it in GitHub Desktop.
Save CGDogan/f6e720357d503c506c02199ae8947be1 to your computer and use it in GitHub Desktop.
can-gsoc-2023.md

My (Can's) GSOC 2023 work

Work done

My project goal was to add DICOM file support to caMicroscope, a Whole Slide Image viewer. The viewer backend (OpenSlide) didn't support DICOM, so we needed a second backend. Surprisingly, before the coding period started, OpenSlide did get DICOM file support and this gave me the opportunity to tackle the bigger challenge of integrating BioFormats into caMicroscope. This would be extraordinary, as BioFormats is a Java library with no C wrappers available online.

I started by refactoring caMicroscope code to use a single base Dockerfile which compiled OpenSlide. Then I made a Java wrapper and prepared its corresponding C caller. For this, I had chosen GraalVM C API, but once I found out about its level of performance and its requirement to achieve high code covergage first (for metadata collection), I rewrote it for Java JNI. To make it available to the two derivatives of our base image, I refactored this to be a separate project. We also needed to make this available to our Python image metadata server, so I wrote a wrapper in Python using cffi. I also made modifications for caMicroscope to provide basic support for multifile formats.

Link to work

Less significant work

caMicroscope:

OpenSlide:

BioFormats:

Future work

  • Use my new BioFormats wrapper in C to add support for more languages to BioFormats
  • Modify my BioFormats wrapper in Python to dedicate a thread for JVM calls
  • Modify caMicroscope/iipimage to support indexed image files (false color/must-read color profiles) and an arbitrary number of channels
  • Modify caMicroscope frontend to support switching among z and t dimensions.
  • Modify caMicroscope slideloader to detect flat BioFormats images and convert their series 0 to ometiff and use the current pyramid-conversion to convert it to tiff
  • Modify make_pil_image to allow single-channel images
  • Bfbridge C code needsd dirent.h equivalent for windows
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment