Migrating from ClearMap 2#
ClearMap 3.1 is a substantial redesign of the backend. The GUI is fully backwards-compatible with existing config files (with automatic migration), but scripted workflows need updating.
Concept |
ClearMap 2 |
ClearMap 3.1 |
|---|---|---|
Entry point |
|
|
Processing classes |
|
|
Workspace |
|
|
Config files |
|
Single |
Channel support |
Fixed two-channel layout (signal + autofluorescence) |
Arbitrary number of channels, each with its own data type and pipeline assignment |
GPU dependency |
Required for vasculature |
Required only for deep vessel filling; all other steps are CPU-only |
conda environment |
|
|
Key API changes#
# ClearMap 2 — direct script execution
# (edit variables at top of CellMap.py and run)
# ClearMap 3.1 — programmatic API
from ClearMap.pipeline_orchestrators.utils import init_sample_manager_and_processors
from ClearMap.pipeline_orchestrators.cell_map import CellDetector
orchestrators = init_sample_manager_and_processors('/path/to/experiment')
sm = orchestrators['sample_manager']
reg = orchestrators['registration_processor']
for channel in sm.get_channels_by_pipeline('CellMap', as_list=True):
det = CellDetector(sm, config_coordinator=sm.cfg_coordinator,
channel=channel, registration_processor=reg)
det.run_cell_detection()
det.post_process_cells()
det.voxelize()