Skip to content
项目

jcreinhold/intensity-normalization

在 GitHub 查看

关于

Normalize MR image intensities in Python

设计与媒体

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

intensity-normalization

PyPI Conda Version Docs

Normalize the intensities of magnetic resonance (MR) images — T1-w, T2-w, FLAIR, PD-w — across scanners, sites, and sessions.

MR images have no consistent intensity scale; the inconsistency is an acquisition artifact that breaks downstream processing (especially ML). This package implements the standard fixes:

  • Individual methods — zscore, fcm, kde, whitestripe: plain functions of one image.
  • Population methods — nyul, lsq, ravel: learn a transform from a set of images; save it, apply it to new scans.
  • Tools — tissue membership maps, histogram plotting (validation), N4 preprocessing, co-registration (ANTs).

Install

pip install intensity-normalization            # or: uv add intensity-normalization
pip install "intensity-normalization[ants]"  # ravel registration, preprocess, coregister
pip install "intensity-normalization[plot]"  # histogram plotting

Alternatively, you can install via conda:

conda install conda-forge::intensity-normalization

The CLI also runs without installing: uvx intensity-normalize --help.

Quickstart

import intensity_normalization as inorm

normed = inorm.whitestripe(t1w_image, mask=brain_mask)  # numpy or nibabel in → same type out

tx = inorm.nyul.fit(train_images, masks=train_masks)  # population: fit once...
tx.save("nyul.npz")
normed_new = tx(new_image)  # ...apply to new scans
intensity-normalize fcm t1w.nii.gz -m brain_mask.nii.gz -p
intensity-normalize nyul images/ -m masks/ -o normalized/ --save-state nyul.npz

Documentation — quickstart, how-to guides, choosing a method, algorithms, CLI, API, migrating to v4.

Reference

If you use this package, please cite the accompanying pre-print:

@article{reinhold2019evaluating,
  title={Evaluating the impact of intensity normalization on MR image synthesis},
  author={Reinhold, Jacob C and Dewey, Blake E and Carass, Aaron and Prince, Jerry L},
  journal={Medical Imaging 2019: Image Processing},
  year={2019}
}

License

MIT

探索相关项目

加载中…