Browse Source

Allowing case of multiple unwanted bytes per step

zolfa-add_slices_loading
Gabriele Girelli 4 years ago
committed by GitHub
parent
commit
237bea49eb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      nd2reader/parser.py

+ 1
- 1
nd2reader/parser.py View File

@ -264,7 +264,7 @@ class Parser(object):
if all([0 == image_group_data[byte_ids[i]+i] for i in range(len(byte_ids))]): if all([0 == image_group_data[byte_ids[i]+i] for i in range(len(byte_ids))]):
warnings.warn(f'Identified {n_unwanted_bytes} ({unwanted_byte_per_step}*{height}) unwanted zero-bytes in the ND2 file, removed.') warnings.warn(f'Identified {n_unwanted_bytes} ({unwanted_byte_per_step}*{height}) unwanted zero-bytes in the ND2 file, removed.')
for i in range(len(byte_ids)): for i in range(len(byte_ids)):
del image_group_data[byte_ids[i]]
del image_group_data[byte_ids[i]:(byte_ids[i]+unwanted_byte_per_step)]
else: else:
warnings.warn(f'Identified {n_unwanted_bytes} unwanted non-zero bytes in the ND2 file.') warnings.warn(f'Identified {n_unwanted_bytes} unwanted non-zero bytes in the ND2 file.')


Loading…
Cancel
Save