Skip to content

Commit f4aa65b

Browse files
authored
Merge pull request #37 from zia-chang/master
fix: rowIndex, colIndex calculations in getFrameMapping()
2 parents 48c2a19 + 6fb5866 commit f4aa65b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/metadata.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ function getFrameMapping(metadata) {
3636
let planePositions = functionalGroups[j].PlanePositionSlideSequence[0];
3737
let rowPosition = planePositions.RowPositionInTotalImagePixelMatrix;
3838
let columnPosition = planePositions.ColumnPositionInTotalImagePixelMatrix;
39-
let rowIndex = Math.ceil(rowPosition / columns);
40-
let colIndex = Math.ceil(columnPosition / rows);
39+
let rowIndex = Math.ceil(rowPosition / rows);
40+
let colIndex = Math.ceil(columnPosition / columns);
4141
let index = rowIndex + '-' + colIndex;
4242
let frameNumber = j + 1;
4343
frameMapping[index] = `${sopInstanceUID}/frames/${frameNumber}`;

0 commit comments

Comments
 (0)