File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -416,7 +416,9 @@ class CompressedSegmentationArray:
416
416
gpt = xyz // self .block_size
417
417
grid_size = self .grid_size
418
418
419
- if self .binary[0 ] != 1 :
419
+ channel_offset = int .from_bytes(self .binary[:4 ], ' little' )
420
+
421
+ if channel_offset != 1 :
420
422
raise DecodeError(
421
423
" Only single channel is currently supported in this function."
422
424
)
@@ -449,7 +451,7 @@ class CompressedSegmentationArray:
449
451
cdef uint64_t table_entry_size = np.dtype(self .dtype).itemsize // 4
450
452
cdef uint64_t val = data[tbl_off + bitval * table_entry_size]
451
453
if table_entry_size > 1 :
452
- val = val | (data[tbl_off + bitval * table_entry_size + 1 ] << 32 )
454
+ val = val | (< uint64_t > ( data[tbl_off + bitval * table_entry_size + 1 ]) << 32 )
453
455
454
456
return val
455
457
You can’t perform that action at this time.
0 commit comments