Overview
Thedigipathai command is the main entry point for starting the DigiPathAI web server. It launches a Flask-based application that provides a responsive whole slide image (WSI) viewer with optional AI-powered cancer tissue segmentation capabilities.
The
digipathai command is automatically installed when you install the DigiPathAI package via pip. It’s defined as a console script entry point in the package setup.Basic Usage
The simplest way to start DigiPathAI is to run the command in a directory containing your slide images:- Start a local web server on
127.0.0.1:8080 - Serve slides from the current directory
- Open the viewer interface for browsing and viewing WSI images
Starting the Web Server
Default Configuration
Start the server with default settings:Custom Host and Port
Specify a custom host address and port:Specify Slide Directory
Point to a specific directory containing your slide images:Enable Debug Mode
Run in debug mode for development (not recommended for production):Accessing the UI
Once the server is running, you can access the web interface in your browser:- Local Access: Navigate to
http://127.0.0.1:8080(or your custom host/port) - Network Access: If using
-l 0.0.0.0, access from other devices usinghttp://<your-ip>:<port>
- A file browser to navigate through slide directories
- An interactive viewer powered by OpenSeadragon
- Deep zoom functionality for high-resolution WSI navigation
- AI segmentation controls (when not in viewer-only mode)
Viewer-Only Mode
If you want to use only the viewer without AI segmentation capabilities:- You don’t have GPU resources available
- You haven’t installed the full AI dependencies
- You only need to view slides without performing analysis
Viewer-only mode is the default when the AI dependencies are not installed. The segmentation features will be automatically disabled.
Common Usage Examples
Example 1: Basic Local Viewing
http://127.0.0.1:8080 in your browser.
Example 2: Network-Accessible Server
http://<server-ip>:8080.
Example 3: High-Quality Tile Rendering
Example 4: Custom Tile Configuration
Entry Point Definition
Thedigipathai command is registered in the package’s setup.py as:
digipathai executes the main() function from DigiPathAI/main_server.py.
Next Steps
- See CLI Options for a complete reference of all command-line options
- Learn about AI Segmentation to use the cancer detection features
- Explore Python API Usage for programmatic access