Skip to content

Commit

Permalink
Merge pull request #271 from pyplati/support-holes-in-masks
Browse files Browse the repository at this point in the history
Support holes in RTSTRUCT contours
  • Loading branch information
pchlap authored Jul 10, 2024
2 parents c043d3d + 28e9e4d commit 89ce59a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion platipy/dicom/io/crawl.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ def transform_point_set_from_dicom_struct(image, dicom_struct, spacing_override=
xVertexArr_image, yVertexArr_image, shape=sliceArr.shape
)
sliceArr[filledIndicesX, filledIndicesY] = 1
image_blank[zIndex] += sliceArr.T
image_blank[zIndex] ^= sliceArr.T

struct_image = sitk.GetImageFromArray(1 * (image_blank > 0))
struct_image.CopyInformation(image)
Expand Down
2 changes: 1 addition & 1 deletion platipy/dicom/io/rtstruct_to_nifti.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def transform_point_set_from_dicom_struct(dicom_image, dicom_struct, spacing_ove
)
slice_arr[filled_indices_y, filled_indices_x] = 1

image_blank[z_index] += slice_arr
image_blank[z_index] ^= slice_arr

if not skip_contour:
struct_image = sitk.GetImageFromArray(1 * (image_blank > 0))
Expand Down

0 comments on commit 89ce59a

Please sign in to comment.