Getting started with caMicroscope- Week1

Tarun Jain
4 min readJun 4, 2023

--

I will share my week 1 journey as a Google Summer of Code contributor at caMicroscope in this article. Before I proceed let me break through what caMicroscope is about and what impact it can bring in AI in the Healthcare industry.

Introduction to caMicroscope

In the field of healthcare, pathology plays a vital role in diagnosis and treatment decisions. Traditionally, pathologists examine tissue samples under a microscope to identify diseases. However, the advent of digital pathology has transformed the way pathology is practised. Among the innovative platforms available, caMicroscope stands out as a game-changer in the industry.

caMicroscope is a web-based platform designed for the visualization, analysis, and annotation of digital pathology images. It leverages cutting-edge technologies to enable pathologists, researchers, and healthcare professionals to access and explore high-resolution digitized slides online.

Installation Guide

As a beginner to the caMicroscope environment, one might face a few challenges to get started with the installation. But my mentor Ryan Birmingham (Github: https://github.com/birm) helped with getting through these steps.

First and foremost, download Docker from the official documentation.

Once done, here is the step you need to follow.

1. Clone required GitHub repositories

In order to install caMicroscope in your local system, you need to clone three GitHub repositories. The three repo includes:

  • caMicroscope- Main repo
  • Caracal- A Conslidated Backend, Auth, and Security Services for caMicroscope
  • Distro- Docker distribution of caMicroscope and all its components
git clone https://github.com/camicroscope/caMicroscope.git
git clone https://github.com/camicroscope/Caracal.git
git clone https://github.com/camicroscope/Distro.git

Make sure all the repositories are under the same directory. Here is what the main directory should look like.

Main directory

2. Update develop.yml inside Distro

Since Caracal is inside the same directory, there is no need to git clone again. So update the context in the develop.yml- back session as shown below.

context: "../Caracal"

Also update the Docker Volumes, by adding:

  
- ../caMicroscope:/src/camicroscope

Here is what your develop.yml should look like:

version: '2'

services:
mongo:
image: mongo:4.2-bionic
container_name: ca-mongo
volumes:
- ./db:/data/db
back:
build:
context: "../Caracal"
args:
viewer: "develop"
fork: "camicroscope"
depends_on:
- "mongo"
ports:
- "4010:4010"
container_name: ca-back
volumes:
- ../caMicroscope:/src/camicroscope
- ./config/login.html:/src/static/login.html
- ./jwt_keys/:/src/keys/
- ./config/routes.json:/src/routes.json
- ./config/contentSecurityPolicy.json:/src/contentSecurityPolicy.json
environment:
JWK_URL: "https://www.googleapis.com/oauth2/v3/certs"
IIP_PATH: "http://ca-iip:8080/fcgi-bin/iipsrv.fcgi"
MONGO_URI: "mongodb://ca-mongo"
DISABLE_SEC: "true"
ALLOW_PUBLIC: "true"
iip:
image: camicroscope/iipimage:version-3.8.4
container_name: ca-iip
restart: unless-stopped
volumes:
- ./images/:/images/
loader:
build: "https://github.com/camicroscope/SlideLoader.git#develop"
container_name: ca-load
volumes:
- ./images/:/images/
- ./cloud-upload-apis/:/cloud-upload-apis/

3. Update Dockerfile in Caracal

Switch to the Caracal directory and edit Dockerfile.

Remove this line/command from Dockerfile :

RUN git clone https://github.com/${fork:-camicroscope}/camicroscope.git --branch=${viewer:-master}

Also, the following commands as well can be ignored:

RUN chgrp -R 0 /src && \
chmod -R g+rwX /src

USER 1001

The final Dockerfile should be like this:

FROM node:14-alpine
RUN mkdir /src
COPY . /src
WORKDIR /src
RUN npm install
ARG viewer
ARG fork
RUN apk add --no-cache git
EXPOSE 4010

CMD node caracal.js

4. Docker build

Once all the update in Dockerfile and develop.yml is completed. Open the Distro in the terminal or CMD and run the following command to build the Docker image.

docker-compose -f develop.yml build

This step took around 20 minutes to build

5. Run the application on localhost

Once the Docker build is completed, we are up to running the application on the local host. In order to do that stay in the Distro directory and run the following command:

docker-compose -f develop.yml up
Execution of localhost
Open http://localhost:4010/ in the browser

Multi-channel Images

Coming to the coding part, I need a lot of research to find the dataset that contains multi-channel data. During this time, I found Cell Image Library: 44153.tif- confocal microscopy kind of image.

This image contains a 3D reconstruction (using Imaris software) of confocal/multiphoton (Leica SP5) images collected through the thickness (100 micrometres) of a live lymph node from a bone-marrow transplanted mouse. Cells marked by five fluorescent proteins: Cerulean (cyan), EGFP (green), Venus (yellow), tdTomato (purple), and mCherry (red) appear surrounded by collagen matrix (second harmonic generation-SHG, white) at 4 months post-transplant.

I started the coding phase by visualizing the images and converting the channel into RGB format.

RGB- The channel is displayed separately
Combined RGB image

I will be exploring different techniques to build a Multi-channel image conversion to RBG and vice versa during this week.

About Me: I am Tarun Jain, Community Manager at AI Planet and part of GSoC23 caMicroscope. I am also Pie&AI Bangalore Ambassador at Deep Learning AI. I have won 5 AI Hackathons. Let’s connect:

LinkedIn: https://www.linkedin.com/in/jaintarun75/

GitHub: https://github.com/lucifertrj/

Twitter: https://twitter.com/TRJ_0751

--

--

Tarun Jain

Youtube: AIWithTarun || ML @AIPlanet || GSoC'24 RedHen Lab ||GSoC'23 @caMicroscope || GDE in ML