Skip to content

Commit

Permalink
ENH: Minor bug fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
ntustison committed Oct 27, 2023
1 parent 1479d18 commit c55a9d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion antspynet/utilities/lung_segmentation.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ def lung_pulmonary_artery_segmentation(ct,
################################

if lung_mask is None:
lung_mask = ants.threshold_image(lung_extraction(ct, modality="ct", verbose=verbose), 1, 3, 1, 0)
lung_ex = lung_extraction(ct, modality="ct", verbose=verbose)
lung_mask = ants.threshold_image(lung_ex['segmentation_image'], 1, 3, 1, 0)
ct_preprocessed = ants.image_clone(ct)
ct_preprocessed = (ct_preprocessed + 800) / (500 + 800)
ct_preprocessed[ct_preprocessed > 1.0] = 1.0
Expand Down

0 comments on commit c55a9d9

Please sign in to comment.