diff --git a/platipy/dicom/io/crawl.py b/platipy/dicom/io/crawl.py index c0fd8480..d2aa071e 100644 --- a/platipy/dicom/io/crawl.py +++ b/platipy/dicom/io/crawl.py @@ -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) diff --git a/platipy/dicom/io/rtstruct_to_nifti.py b/platipy/dicom/io/rtstruct_to_nifti.py index fe7dd5f7..e0bb7340 100644 --- a/platipy/dicom/io/rtstruct_to_nifti.py +++ b/platipy/dicom/io/rtstruct_to_nifti.py @@ -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))