Skip to content

Commit

Permalink
Merge pull request #33 from sandip-shah/patch-4
Browse files Browse the repository at this point in the history
Update mcd_file.py
  • Loading branch information
Milad4849 authored Sep 9, 2024
2 parents 847f78b + 8385827 commit 5eb3712
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions readimc/mcd_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ def read_slide(
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: "
Expand Down Expand Up @@ -236,6 +237,7 @@ def read_panorama(
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: "
Expand Down Expand Up @@ -276,6 +278,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: "
Expand Down Expand Up @@ -318,6 +321,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: "
Expand Down

0 comments on commit 5eb3712

Please sign in to comment.