This project extends a whole slide image (WSI) viewer to visualize segmentation results, built with Electron, Next.js, TypeScript, and FastAPI.
- WSI viewing with support for zooming and panning
- Segmentation results overlay on the WSI
- Management sidebar for reviewing all segmentation results
- User annotation functionality (cropping regions and changing annotation colors)
- Modern UI with Tailwind CSS and React components
- Node.js (v14+)
- Python (v3.8+)
- Git
-
Clone the repository:
git clone <repository-url> cd wsi-viewer
-
Install frontend dependencies:
cd wsi-viewer-app npm install -
Install backend dependencies:
cd ../wsi-backend pip install -r requirements.txt -
Download test data (if needed):
wget https://openslide.cs.cmu.edu/download/openslide-testdata/Aperio/CMU-1.svs
-
Start the backend server:
cd wsi-backend python main.py -
Start the frontend application:
cd wsi-viewer-app npm run dev -
The application should open automatically in Electron. If not, open it manually according to instructions in the terminal.
wsi-backend/: FastAPI backend for handling WSI data and segmentationwsi-viewer-app/: Electron + Next.js frontend applicationsample_code/: Reference implementation
This project addresses the requirements of visualizing segmentation results on whole slide images by:
- Using Electron and Next.js for a responsive desktop application
- Implementing an overlay system that shows:
- Segmentation centroids as dots at low zoom levels
- Detailed contours when zoomed in past a threshold
- Providing a management interface for reviewing all segmentation results
- Supporting user annotations within cropped regions
- Frontend: Electron, Next.js, TypeScript, OpenSeadragon, Tailwind CSS
- Backend: FastAPI, Python
- Data Handling: HDF5 for segmentation results
- Performance optimizations for large WSIs
- Additional annotation tools
- Support for multiple segmentation masks
- Collaborative viewing and annotation