OHIF / Viewers

OHIF zero-footprint DICOM viewer and oncology specific Lesion Tracker, plus shared extension packages
https://docs.ohif.org/
MIT License
3.32k stars 3.35k forks source link

TMTV Coronal PET Viewport Instance Sometimes Incorrect [Bug] #4035

Open 03shek opened 6 months ago

03shek commented 6 months ago

Describe the Bug

TMTV Coronal PET viewport isn't always indicating the nearest coronal PET instance to the current coronal CT instance.

Steps to Reproduce

  1. Open Water Phantom study in TMTV mode, with CTAC in the CT row.

  2. Keep any axial slice fixed. Keep any sagittal slice fixed.

  3. Scroll through coronal CT viewport. Observe matching PET viewport instance numbers and slice locations.

  4. Corresponding Coronal viewport instances and slice locations:

    CT_i CT_imax CT_loc PET_i PET_imax PET_loc CT_t PET_t delta(CT_loc, PET_loc) Notes
    250 512 -9.57 93 192 -9.11 1.37 2.6 0.46 OK
    251 512 -8.20 94 192 -6.51 1.36 0 1.69 Delta > 0.5*PET_t. Should show PET_i=93
    252 512 -6.84 94 192 -6.51 1.37 2.6 0.33 OK
    253 512 -5.47 95 192 -3.91 1.37 0 1.56 Should show PET_i=94
    254 512 -4.10 95 192 -3.91 1.37 2.61 0.19 OK
    255 512 -2.73 96 192 -1.30 1.36 0 1.43 Should show PET_i=95 (shown in Figure 1 & 2, just like sagittal viewports)
    256 512 -1.37 96 192 -1.30 - - 0.07 OK
  5. Keep any axial slice fixed. Keep any coronal slice fixed.

  6. Scroll through sagittal CT viewport. Observe matching PET viewport instance numbers and slice locations.

  7. Corresponding Sagittal viewport instances and slice locations:

    CT_i CT_imax CT_loc PET_i PET_imax PET_loc CT_t PET_t delta(CT_loc, PET_loc) Notes
    253 512 -5.47 94 192 -6.51 1.37 2.6 1.04 OK
    254 512 -4.10 95 192 -3.91 1.37 0 0.19 OK
    255 512 -2.73 95 192 -3.91 1.36 2.61 1.18 OK (shown in Figure 1 & 2)
    256 512 -1.37 96 192 -1.30 1.37 2.6 0.07 OK
    257 512 0.00 97 192 1.30 1.37 0 1.3 OK
    258 512 1.37 97 192 1.30 1.36 2.61 0.07 OK
    259 512 2.73 98 192 3.91 - - 1.18 OK

CT_IPP: -350\-350\Z CT_pixelspacing: 1.367188\1.367188

PET_IPP: -248.69792175292\-248.69792175292\Z PET_pixelspacing: 2.6041667461395\2.6041667461395

Figure 1: From local deployment of v3.8.0-beta.67: image

Figure 2: Analog of Figure 1 on viewer-dev.ohif.org (v3.8.0-beta.78) image

The current behavior

TMTV Coronal PET viewport isn't always displaying the nearest coronal PET instance to the current coronal CT instance. Coronal PET viewport is not identical in behavior to Sagittal PET viewport.

The expected behavior

TMTV Coronal PET viewport should display nearest instance to current coronal CT viewport instance. Coronal PET viewport should display identical behavior to Sagittal PET viewport.

OS

Windows 10

Node version

3.8.0-beta.78

Browser

Chrome

03shek commented 6 months ago

Alternate (clinical) example, where sag & cor seem affected by same bug (and maybe an additional bug too)

CT_IPP: -249.51171875\-405.51171875\Z CT_pixelspacing: 0.9765625\0.9765625

PET_IPP: -406.908\-564.474\Z PET_pixelspacing: 4.07283\4.07283

Corresponding Coronal viewport instances and slice locations: CT_i CT_imax CT_loc PET_i PET_imax PET_loc CT_t PET_t delta(CT_loc, PET_loc) Notes
1 512 -405.51 38 200 -413.78 0.97 0 8.27 Already Delta > 0.5*PET_t. Should show PET_i=40
2 512 -404.54 38 200 -413.78 0.98 4.07 9.24 Delta > 0.5*PET_t continues
3 512 -403.56 39 200 -409.71 0.98 0 6.15 Should start showing PET_i=41
4 512 -402.58 39 200 -409.71 0.97 0 7.13
5 512 -401.61 39 200 -409.71 0.98 0 8.1
6 512 -400.63 39 200 -409.71 0.98 4.08 9.08 Etc.
7 512 -399.65 40 200 -405.63 0.97 0 5.98
8 512 -398.68 40 200 -405.63 0.98 0 6.95
9 512 -397.7 40 200 -405.63 0.98 0 7.93
10 512 -396.72 40 200 -405.63 0.97 4.07 8.91
11 512 -395.75 41 200 -401.56 0.97 0 5.81
259 512 -153.56 100 200 -161.26 0.98 4.07 7.7 Should start showing PET_i=102 (shown in Figure 3)
260 512 -152.58 101 200 -157.19 0.97 0 4.61
261 512 -151.61 101 200 -157.19 0.98 0 5.58
262 512 -150.63 101 200 -157.19 0.98 0 6.56
263 512 -149.65 101 200 -157.19 0.97 4.07 7.54 Should start showing PET_i=103
264 512 -148.68 102 200 -153.12 0.98 0 4.44
Corresponding Sagittal viewport instances and slice locations: CT_i CT_imax CT_loc PET_i PET_imax PET_loc CT_t PET_t delta(CT_loc, PET_loc) Notes
1 512 -249.51 39 200 -252.14 0.97 4.07 2.63 Already Delta > 0.5*PET_t. Should show PET_i=40
2 512 -248.54 40 200 -248.07 0.98 0 0.47 OK
3 512 -247.56 40 200 -248.07 0.98 0 0.51 OK
4 512 -246.58 40 200 -248.07 0.97 0 1.49 OK
5 512 -245.61 40 200 -248.07 0.98 4.08 2.46 Should show PET_i=41
6 512 -244.63 41 200 -243.99 0.98 0 0.64 OK
7 512 -243.65 41 200 -243.99 0.97 0 0.34 OK
8 512 -242.68 41 200 -243.99 0.98 0 1.31 OK
9 512 -241.7 41 200 -243.99 0.98 4.07 2.29 Should show PET_i=42
10 512 -240.72 42 200 -239.92 0.97 0 0.8 OK
11 512 -239.75 42 200 -239.92 0.98 0 0.17 OK
12 512 -238.77 42 200 -239.92 0.98 0 1.15 OK
13 512 -237.79 42 200 -239.92 0.97 0 2.13 Should show PET_i=43
14 512 -236.82 42 200 -239.92 0.98 4.07 3.1 Should show PET_i=43
15 512 -235.84 43 200 -235.85 0.01 OK

Figure 3: Different study with same bug, but worse, from local deployment of v3.8.0-beta.67: image