Skip to content

ai-assisted-healthcare/AIAH_utility

Repository files navigation

AI-Assisted Healthcare Utility Scripts


Continuous Integration License: Apache Code style: black

Container for:

  • Dicom Reading
  • Image Stitching
  • 3D Image Viewing

Installation

git clone https://github.com/ai-assisted-healthcare/AIAH_utility.git
cd AIAH_utility
python -m pip install -e .

Usage

Read, Stitch & View Dicom

import SimpleITK as sitk
from AIAH_utility.dicom_io import read_dicom_series_zipped
from AIAH_utility.stitching import stitch_images
from AIAH_utility.viewer import BasicViewer

imgs, _manifest =  read_dicom_series_zipped("dicom.zip")
stitched_image = stitch_images(imgs)

stitched_image_np = sitk.GetArrayFromImage(stitched_image)
BasicViewer(stitched_image_np).show()

View Nifti with Segmentation Map

from monai.transforms import LoadImage
from AIAH_utility.viewer import BasicViewer, ListViewer

img = LoadImage()("image.nii.gz")
seg = LoadImage()("segmentation.nii.gz")

# Single Image
BasicViewer(img,seg).show()

# Multiple Images
ListViewer(
    [img1,img2, ...],
    [seg1,seg2, ...],
    figsize = (5,5),
    start_view = 0,
    cmap ="Greys_r"
).show()

ListViewer Example Image

About

Container with utility scripts for medical image analysis

Resources

License

Stars

Watchers

Forks

Packages

No packages published