Skip to content

Commit

Permalink
fix missing tile regression
Browse files Browse the repository at this point in the history
  • Loading branch information
jcupitt committed Dec 20, 2024
1 parent 52a2626 commit b433c64
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/dicom-file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1388,7 +1388,7 @@ bool dcm_filehandle_get_frame_number(DcmError **error,
int64_t index = column + row * filehandle->tiles_across;
if (filehandle->layout == DCM_LAYOUT_SPARSE) {
index = filehandle->frame_index[index];
if (index == -1) {
if (index == 0xffffffff) {
dcm_error_set(error, DCM_ERROR_CODE_MISSING_FRAME,
"no frame",
"no frame at position (%u, %u)", column, row);
Expand All @@ -1406,7 +1406,8 @@ bool dcm_filehandle_get_frame_number(DcmError **error,
}

// frame numbers are from 1
*frame_number = index + 1;
if (frame_number)
*frame_number = index + 1;

return true;
}
Expand Down

0 comments on commit b433c64

Please sign in to comment.