Skip to content

Commit

Permalink
perf(bulkAnnotations): cache affine
Browse files Browse the repository at this point in the history
  • Loading branch information
Helmut (Oertel) Hoffer von Ankershoffen committed Nov 10, 2024
1 parent 628555a commit b527a8a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/bulkAnnotations/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,12 @@ export const getFeaturesFromBulkAnnotations = ({

const { topLeft, bottomRight } = getViewportBoundingBox({ view, pyramid, affine })

const affine = getAffineBasedOnPyramidLevel({
affine,
pyramid,
annotationGroup
})

const features = []

for (
Expand All @@ -492,11 +498,7 @@ export const getFeaturesFromBulkAnnotations = ({
if (annotationCoordinateType === '2D') {
firstCoordinate = mapPixelCoordToSlideCoord({
point: [firstCoordinate[0], firstCoordinate[1]],
affine: getAffineBasedOnPyramidLevel({
affine,
pyramid,
annotationGroup
})
affine: affine
})
}

Expand Down

0 comments on commit b527a8a

Please sign in to comment.