Skip to content

Commit

Permalink
fix(worldToImage):Exception on out of bounds in image coords
Browse files Browse the repository at this point in the history
  • Loading branch information
wayfarer3130 committed Nov 18, 2022
1 parent 29db829 commit e4c1768
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions packages/core/src/utilities/worldToImageCoords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,6 @@ function worldToImageCoords(
columnDistance / columnPixelSpacing,
];

if (
imageCoords[0] < 0 ||
imageCoords[0] >= columns ||
imageCoords[1] < 0 ||
imageCoords[1] >= rows
) {
throw new Error(
`The image coordinates are outside of the image, imageCoords: ${imageCoords}`
);
}

return imageCoords as Point2;
}

Expand Down

0 comments on commit e4c1768

Please sign in to comment.