Table of Contents
pip install oai-analysis
This repository contains open-source analysis approaches for the Osteoarthritis Initiative (OAI) magnetic resonance image (MRI) data. The analysis code is largely written in Python with the help of ITK and VTK for data I/O and mesh processing as well as PyTorch for the deep learning approaches for segmentation and registration. The initial development of this work was led by UNC Chapel Hill as well as Kitware. This work is also an outgrowth of conversations within the Community for Open and Reproducible Musculoskeletal Imaging Research (JC|MSK). Going forward, contributions by the broader community are, of course, not only welcome but encouraged.
- Deep Learning Segmentation: Automatic cartilage segmentation (femoral and tibial cartilage) using a 3D UNet.
- Deep Learning Atlas registration: Registration of the cartilage meshes with associated cartilage thickness to a knee atlas space via a deep registration network for 3D images.
- Cartilage thickness: Extraction of femoral and tibial cartilage meshes and measuring of cartilage thickness based on a closest-point thickness estimation.
- 2D thickness mapping: Mapping of the thickness maps to a common 2D atlas space which provides full spatial correspondence. This is achieved via unrolling (based on a cylindrical coordinate system) for the femoral cartilage and a planar projection for the tibial cartilage.
- Statistical analysis: [Longitudinal statistical analysis approaches are planned]
- Read image a. Read b. Put into canonical orientation c. Intensity preprocess (rescale to 0-1)
- Segment cartilage using deep learning
- Register patient image to atlas image.
- Transform patient mesh into atlas space using registration transform
- Split the mesh into inner and outer surfaces in atlas space a. Island filtering (keep largest + islands close to atlas mesh) b. Mesh smoothing c. Clustering into inner and outer surface
- Transform the inner and outer meshes back to patient space
- Measuring the thickness by computing distances between inner and outer surfaces
- Transfer thicknesses from patient mesh to atlas mesh by iterating over atlas vertices and finding the closest patient vertex
- Project atlas mesh to 2D using precomputed mapping
The analysis approaches in this repository are based on our initial OAI Analysis work. Much of the functionality of the original code-base has been ported to the OAI Analysis 2 repository. The main differences are
- Refactoring: A significant refactoring of the code so that it makes better use of ITK conventions as well as VTK for all the mesh processing needs.
- uniGradICON registration: We switched to the new uniGradICON registration approach (see manuscripts below).
- Data processing: We improved the data processing by better handling of data objects. Whereas the previous OAI Analysis pipeline largely depended on reading and writing various different files, the OAI Aanalysis 2 refactoring uses ITK and VTK objects.
- Jupyter notebooks: Better support of analysis in Jupyter notebooks.
We are currently working on the following features which should be available in the near future:
- Distributed processing: Whereas OAI Analysis was set up for cluster computing via a simple SLURM script OAI Analysis 2 is moving toward using Dask to allow for parallel processing on clusters and the cloud.
- Workflow management: Whereas OAI Analysis used custom code to avoid recomputing results, we are switching to Dagster to manage data dependencies in OAI Analysis 2. Current progress is here.
- Distribution of analysis results: As we are planning on not only distributing code, but also analysis results (such as segmentations, meshes, thickness maps) we are planning on supporting data access via the Interplanetary File System (IPFS).
Contributions are appreciated and welcome.
git clone https://github.com/uncbiag/OAI_analysis_2
cd OAI_analysis_2
pip install -e .
pip install pytest
pytest
To view the demo notebooks:
cd notebooks
jupyter notebook
upload test data to https://data.kitware.com/#collection/6205586c4acac99f42957ac3/folder/620559344acac99f42957d63
We now use registration approach available in uniGradICON for OAI Analysis paper
@article{tian2024unigradicon,
title={uniGradICON: A Foundation Model for Medical Image Registration},
author={Tian, Lin and Greer, Hastings and Kwitt, Roland and Vialard, Francois-Xavier and Estepar, Raul San Jose and Bouix, Sylvain and Rushmore, Richard and Niethammer, Marc},
journal={arXiv preprint arXiv:2403.05780},
year={2024}
}
An overview of the analysis framework is available as a QMSKI conference abstract
@InProceedings{Sahu_2022_QMSKI,
author = {Sahu, Pranjal and Greer, Hastings and Xu, Zhenlin and Shen, Zhengyang and Bonaretti, Serena and McCormick, Matt and Niethammer, Marc},
title = {Reproducible Workflow for Visualization and Analysis of OsteoArthritis Abnormality Progression},
booktitle = {Proceedings of the International Workshop on Quantitative Musculoskeletal Imaging (QMSKI)},
year = {2022}
}
Results obtained by the OAI Analysis pipeline can be found in this manuscript [paper]
@article{huang2022dadp,
title={DADP: Dynamic abnormality detection and progression for longitudinal knee magnetic resonance images from the Osteoarthritis Initiative},
author={Huang, Chao and Xu, Zhenlin and Shen, Zhengyang and Luo, Tianyou and Li, Tengfei and Nissman, Daniel and Nelson, Amanda and Golightly, Yvonne and Niethammer, Marc and Zhu, Hongtu},
journal={Medical Image Analysis},
pages={102343},
year={2022},
publisher={Elsevier}
}
This work was developed with support in part from the National Institute of Arthritis and Musculoskeletal and Skin Diseases (NIAMS) under award numbers 1R44AR074375, 1R01AR072013, and 1R01AR082684.
This is distributed under the terms of the Apache-2.0 license.