Configuration Reference

All tuneable parameters live in core/config.py. Edit that file before running a registration pipeline.

File paths

Parameter

Description

SOURCE_WSI_PATH

Absolute path to the moving (source) whole-slide image (.tiff).

TARGET_WSI_PATH

Absolute path to the fixed (target) whole-slide image (.tiff).

FIXED_NUCLEI_CSV

Path to a pre-computed nuclei CSV for the fixed image (optional).

MOVING_NUCLEI_CSV

Path to a pre-computed nuclei CSV for the moving image (optional).

Each CSV must contain at least the columns global_x and global_y (nucleus centroid coordinates in pixels at REGISTRATION_RESOLUTION). An optional area column enables shape-aware registration.

Resolution parameters

Parameter

Description

PREPROCESSING_RESOLUTION

Objective power (magnification) at which WSIs are loaded for coarse rigid and elastic registration. Default: 0.625.

REGISTRATION_RESOLUTION

Objective power (magnification) at which nuclei are detected and fine shape-aware registration is performed. Default: 40.

REGISTRATION_RESOLUTION must be strictly greater than PREPROCESSING_RESOLUTION.

Patch parameters

Parameter

Description

PATCH_SIZE

(height, width) of each patch in pixels. Default: (1000, 1000).

PATCH_STRIDE

Stride between patches. Default: (1000, 1000).

VISUALIZATION_SIZE

Canvas size for visualisation output. Default: (5000, 5000).

Nuclei detection parameters

Parameter

Description

FIXED_THRESHOLD

Binarisation threshold for the fixed image (0–255). Default: 100.

MOVING_THRESHOLD

Binarisation threshold for the moving image (0–255). Default: 50.

MIN_NUCLEI_AREA

Minimum nucleus area in pixels². Default: 200.

GAMMA_CORRECTION

Gamma value applied before nuclei detection. Default: 0.4.

RegistrationParams class

class core.config.RegistrationParams[source]

Bases: object

DISPLACEMENT_SIGMA = 10.0
INTERPOLATION_METHOD = 'linear'
MAX_DISPLACEMENT = 500.0
MNN_SAMPLE_SIZE = 5000

VisualizationParams class

class core.config.VisualizationParams[source]

Bases: object

ALPHA = 0.6
FIGURE_HEIGHT = 700
FIGURE_WIDTH = 900
FIXED_COLOR = 'blue'
MOVING_COLOR = 'red'
NONRIGID_COLOR = 'orange'
POINT_SIZE_LARGE = 10
POINT_SIZE_MEDIUM = 3
POINT_SIZE_SMALL = 2
RIGID_COLOR = 'green'