def id()

in ez_wsi_dicomweb/dicom_slide.py [0:0]


  def id(self) -> str:
    if not self.source or not self.source.accession_number:
      return (
          f'M_{self.pixel_spacing.as_magnification_string}:'
          f'{self.width:06d}x{self.height:06d}{self.x:+07d}{self.y:+07d}'
      )
    # Be consistent with internal id format.
    # "%s:%06dx%06d%+07d%+07d", image_id, width, height, left, top
    return (
        f'{self.source.accession_number}:M_{self.pixel_spacing.as_magnification_string}:'
        f'{self.width:06d}x{self.height:06d}{self.x:+07d}{self.y:+07d}'
    )