pyreg.py registers multiplexed immunofluorescence cycle stacks using DAPI as the reference channel.
The pipeline performs two sequential steps per non-reference cycle:
- Coarse XY translation via phase cross-correlation.
- Deformable refinement via ANTsPyx SyN registration.
Outputs are saved to a reg_output/ subfolder inside each input directory.
- Python packages:
numpy,tifffile,antspyx,scikit-image,scipy
python pyreg.py <input_dir> [<input_dir> ...]input_dir: one or more directories containing cycle TIFF stacks
Examples:
python pyreg.py "D:\\202504 Ibex\\APP30"
python pyreg.py "D:\\202504 Ibex\\APP30" "D:\\202504 Ibex\\APP32"
python pyreg.py data --crop_size 1024 --threads 8
python pyreg.py data --axes ZCYX --dapi_channel 0--crop_size Ncenter crop size for phase-correlation pre-alignment (default:2048)--threads NITK/ANTs thread count (default:4)--axes MODEinput axis mode:auto,ZCYX, orCZYX(default:auto)--dapi_channel Nchannel index used as DAPI reference (default:0)
- The first TIFF stack in each directory is treated as the fixed reference cycle.
- Input stacks must be 4D and represent either
ZCYXorCZYXlayouts. - In
autoaxis mode, ambiguous small-dimension stacks may still require explicit--axes. - Output TIFF is written in ImageJ-compatible
TZCYXlayout.