This is a python package for registering x-ray images and CT scans. It is based on the xReg, a C++ library for medical image registration, and synthex, a python package for synthetic x-ray imaging.
Before you start, please make sure you have all the dependencies installed. The following libraries are required:
total segmentator can be installed through pip
pip install TotalSegmentator
xReg is a C++ library for medical image registration. It is used as the backend of xregi. To install xReg, please follow the instructions in the README.md of xreg
On other environments, such as Windows, MacOS and Ubuntu,you may need to install xreg aside according to your system. The detailed information can be found at the Building
section in the README.md of xreg.
Synthex will be installed along with xregi. If you want to install it separately, here is the installation for SyntheX:
git clone https://github.com/arcadelab/SyntheX.git
cd /SyntheX
conda install .
On ubuntu 20.04, simply install this package using pip
pip install xregi
On ubuntu 20.04, download the source code and install it under xregi path
git clone https://github.com/shez12/xregi
git checkout master
Fetch the source data and example images from here or
#download data.zip
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=1wjrxNE6B0pX3IooGxwC_cjf4n8MhxU1p' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')&id=1wjrxNE6B0pX3IooGxwC_cjf4n8MhxU1p" -O data.zip && rm -rf /tmp/cookies.txt
#unzip data.zip
cd Downloads/
unzip data.zip
Before using xregi, you need to move the data folder to xregi directory.
mv data xregi/
xregi supports command line interactions and API. To use the API,
import xregi
reg_ = Registration2D3D().load()
reg_.solve()
...
Jiaming (Jeremy) Zhang, MSE in Robotics, Johns Hopkins University
Zhangcong She, MSE in Mechanical Engineering, Johns Hopkins University
Benjamin D. Killeen, PhD in Computer Science, Johns Hopkins University