lunit-io / insight-viewer

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

INSIGHT Viewer v8 Annotation Feature #421

Closed LTakhyunKim closed 1 month ago

LTakhyunKim commented 1 month ago

πŸ“ Description

DicomViewer μ—μ„œ Annotation κΈ°λŠ₯을 μ§€μ›ν•©λ‹ˆλ‹€. Annotation μ»€μŠ€ν…€ κΈ°λŠ₯은 ν•„μš”ν•  경우, λ³„λ„μ˜ PR μ—μ„œ μ²˜λ¦¬ν•˜κ³ μž ν•©λ‹ˆλ‹€.

(controlled-component PR 머지 μ‹œ Open ν•˜κ² μŠ΅λ‹ˆλ‹€) (file changed 확인을 μœ„ν•΄ merge λŒ€μƒ 브랜치λ₯Ό feat-controlled-component 둜 μ„€μ •)

κ΅¬ν˜„ 사항

  1. μ‚¬μš© κ°€λŠ₯성이 큰 circle, point, length 3 가지 Annotation 을 μΆ”κ°€ν–ˆμŠ΅λ‹ˆλ‹€. (support tool 만 μΆ”κ°€ν•˜λ©΄ λ‹€λ₯Έ κΈ°λŠ₯도 λ°”λ‘œ 지원 κ°€λŠ₯ν•©λ‹ˆλ‹€)

  2. ViewerSnapshot 에 annotationsfield κ°€ μΆ”κ°€λ©λ‹ˆλ‹€.

  3. React μ—μ„œ tools props λ₯Ό μ—…λ°μ΄νŠΈ ν•˜λ©΄ cornerstone 에 λ°˜μ˜ν•©λ‹ˆλ‹€.

κ΅¬ν˜„ 방식

  1. DicomViewer 의 tools prop μ—μ„œ annotation 도 μ§€μ •ν•©λ‹ˆλ‹€. (cornerstone tools λΌλŠ” κ°œλ… μ•ˆμ— annotation 도 ν¬ν•¨λ˜μ–΄ μœ„μ™€ 같이 κ²°μ •ν–ˆμŠ΅λ‹ˆλ‹€)
  2. useEffect λ₯Ό 톡해 factory 의 updateViewerConfiguration λ₯Ό ν˜ΈμΆœν•΄μ„œ cornerstone 에 λ°˜μ˜ν•©λ‹ˆλ‹€.
  3. updateViewerConfiguration λŠ” 자주 λ³€κ²½λ˜λŠ” μ™ΈλΆ€ 데이터λ₯Ό λ‹΄λ‹Ήν•˜λ©°, 데이터에 λ§žλŠ” ViewerSlot 의 configuration update method λ₯Ό ν˜ΈμΆœν•©λ‹ˆλ‹€.
  4. tools 의 경우, ToolManager 의 updateTool method λ₯Ό ν˜ΈμΆœν•˜μ—¬ tool 을 μ—…λ°μ΄νŠΈν•©λ‹ˆλ‹€.

확인 μš”μ²­ 사항

βœ”οΈ PR Type

What kind of change does this PR introduce?

🎯 Current behavior

N/A

Issue Number: N/A

πŸš€ New behavior

https://github.com/user-attachments/assets/ac679ea8-a789-441e-b852-b7fb9d0d11ed

πŸ’£ Is this a breaking change?

LTakhyunKim commented 1 month ago

v8 μ—μ„œ μ‚¬μš©ν•˜λŠ” interface, api λ₯Ό μ „λ©΄ μž¬κ²€ν†  ν•˜κΈ°λ‘œ κ²°μ •λ˜μ–΄ Close μ²˜λ¦¬ν•©λ‹ˆλ‹€.