lunit-io / insight-viewer

medical image viewer component for React
https://insight-viewer.lunit.io
MIT License
34 stars 6 forks source link

VIEWER-129 / Renewal useViewport hook migration #383

Closed LTakhyunKim closed 1 year ago

LTakhyunKim commented 1 year ago

πŸ“ Description

INSIGHT Viewer Library docs 에 Renewal useViewport hook 을 μ μš©ν–ˆμŠ΅λ‹ˆλ‹€.

βœ”οΈ PR Type

What kind of change does this PR introduce?

🎯 Current behavior

ꡬ버전 useViewport hook 이 μ μš©λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€.

Issue Number: https://lunit.atlassian.net/browse/VIEWER-129

πŸš€ New behavior

Renewal useViewport hook 을 INSIGHT Viewer Library docs 에 μ μš©ν–ˆμŠ΅λ‹ˆλ‹€.

Renewal useViewport hook 에 multi image(frame) 을 λŒ€μ‘ν•˜κΈ° μœ„ν•΄μ„œ 이미지가 λ³€κ²½λ˜μ–΄λ„ image imageSeriesKey λ₯Ό μ΄μš©ν•˜μ—¬ 이전 Viewport λ₯Ό μœ μ§€ν•˜λŠ” κΈ°λŠ₯을 κ΅¬ν˜„ν–ˆμŠ΅λ‹ˆλ‹€. ef2fc12

<μΆ”κ°€ μ„€λͺ…> useMultipleImages hook 으둜 multi frame 이미지λ₯Ό ν•Έλ“€λ§ν•©λ‹ˆλ‹€. ν•΄λ‹Ή hook μ—μ„œ 같은 μ‹œλ¦¬μ¦ˆμ— λŒ€ν•œ image 에 λ™μΌν•œ imageSeriesKey λ₯Ό λΆ€μ—¬ν•©λ‹ˆλ‹€. μœ„ 방식을 useViewport hook 에 μ μš©ν•˜μ—¬ λ³€κ²½λœ 이미지가 λ™μΌν•œ key λ₯Ό 가지고 μžˆμ„ 경우 viewport reset 을 ν•˜μ§€ μ•Šκ³  early return ν•˜μ—¬ 이전 viewport λ₯Ό μœ μ§€ν•˜λŠ” λ°©μ‹μž…λ‹ˆλ‹€.

πŸ’£ Is this a breaking change?

ν•΄λ‹Ή PR 은 docs 만 λ³€κ²½λœ λ‚΄μš©μ΄λ―€λ‘œ breaking change λŠ” μ•„λ‹™λ‹ˆλ‹€.

github-actions[bot] commented 1 year ago

preview: https://insight-viewer--pr-383.f.lunit.io/

@lunit/insight-viewer docs
LTakhyunKim commented 1 year ago

ν•΄λ‹Ή PR 을 톡해 Viewport μœ μ§€, 리셋에 λŒ€ν•œ λŒ€μ‘λ„ 적용된 μƒνƒœμž…λ‹ˆλ‹€. λ”λΆˆμ–΄ multi frame 에 λŒ€ν•œ λŒ€μ‘λ„ useViewport hook λ‚΄ λ‘œμ§μ„ μΆ”κ°€ν•œ μƒνƒœμ΄λ―€λ‘œ 이 뢀뢄도 ν•¨κ»˜ 확인 λΆ€νƒλ“œλ¦½λ‹ˆλ‹€.