diff --git a/readimc/mcd_file.py b/readimc/mcd_file.py index d49ed0b..6815e9a 100644 --- a/readimc/mcd_file.py +++ b/readimc/mcd_file.py @@ -199,6 +199,7 @@ def read_slide(self, slide: Slide) -> Optional[np.ndarray]: if data_start_offset == data_end_offset == 0: return None data_start_offset += 161 + data_end_offset -= 1 if data_start_offset >= data_end_offset: raise IOError( f"MCD file '{self.path.name}' corrupted: " @@ -230,6 +231,7 @@ def read_panorama(self, panorama: Panorama) -> np.ndarray: f"cannot locate image data for panorama {panorama.id}" ) from e data_start_offset += 161 + data_end_offset -= 1 if data_start_offset >= data_end_offset: raise IOError( f"MCD file '{self.path.name}' corrupted: " @@ -270,6 +272,7 @@ def read_before_ablation_image( if data_start_offset == data_end_offset == 0: return None data_start_offset += 161 + data_end_offset -= 1 if data_start_offset >= data_end_offset: raise IOError( f"MCD file '{self.path.name}' corrupted: " @@ -312,6 +315,7 @@ def read_after_ablation_image( if data_start_offset == data_end_offset == 0: return None data_start_offset += 161 + data_end_offset -= 1 if data_start_offset >= data_end_offset: raise IOError( f"MCD file '{self.path.name}' corrupted: "