Skip to content

Python tool to manually segment myocardial images according to the American Heart Association (AHA) 16-segment model.

License

Notifications You must be signed in to change notification settings

CNCarvalho/Myocardial_AHA_Segmentation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Myocardial_AHA_Segmentation

This is a Python tool to manually segment myocardial images according to the American Heart Association (AHA) 16-segment model.

Tested and confirmed to work on:

Python 3.7 Python 3.12

Windows 10 64b

How to use

Load a numpy.array containing your myocardial image and a numpy.array containing the corresponding myocardial mask. To initialize the main class, select the type of segmentation you want to perform: basal, mid, or apical.

import numpy as np
from AHA_segmentation import AHA_segmentation

image = np.load(example_image.npy)
mask = np.load('example_mask.npy')

Segmentation_class = AHA_segmentation(image, mask, mode='basal')

This will create the main figure with the segmentation guidelines:

Figure1

Call the segment() method and adjust the sliders until the guidelines are positioned correctly. The right ventricle should be positioned in the area defined by the rlines marked with a circle and a square.

Segmentation_class.segment()

Figure2

Call the save_segment() method to save. This will return a numpy.array mask whose values correspond to the AHA segment in each area.

mask = Segmentation_class.save_segments()

Figure4

About

Python tool to manually segment myocardial images according to the American Heart Association (AHA) 16-segment model.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages