itkwasm_dicom.write_overlapping_segmentation_async

Module Contents

Functions

write_overlapping_segmentation_async

Write DICOM segmentation object for overlapping segments.

API

async itkwasm_dicom.write_overlapping_segmentation_async.write_overlapping_segmentation_async(seg_image: itkwasm.Image, meta_info: Any, output_dicom_file: str, ref_dicom_series: List[os.PathLike] = [], skip_empty_slices: bool = False, use_labelid_as_segmentnumber: bool = False) os.PathLike

Write DICOM segmentation object for overlapping segments.

Parameters:
  • seg_image (Image) – dicom segmentation object as an image

  • meta_info (Any) – JSON file containing the meta-information that describesthe measurements to be encoded. See DCMQI documentation for details.

  • output_dicom_file (str) – File name of the DICOM SEG object that will store theresult of conversion.

  • ref_dicom_series (os.PathLike) – List of DICOM files that correspond to the originalimage that was segmented.

  • skip_empty_slices (bool) – Skip empty slices while encoding segmentation image.By default, empty slices will not be encoded, resulting in a smaller output file size.

  • use_labelid_as_segmentnumber (bool) – Use label IDs from ITK images asSegment Numbers in DICOM. Only works if label IDs are consecutively numbered starting from 1, otherwise conversion will fail.