|
2 | 2 |
|
3 | 3 | // special: for 'sparse' tiles, show a debug overlay on render. |
4 | 4 | showDebugTiles = false; |
5 | | -// special: for z index multi-plane/focal images, pick only one z. |
| 5 | +// special: for z index multi-plane/focal images, pick only one z. |
6 | 6 | whichZ = 1; // -1 means all no matter what. |
7 | 7 | function DicomWebMods() { |
8 | 8 | async function openSeries(baseUrl, studyId, seriesId) { |
@@ -90,7 +90,7 @@ function DicomWebMods() { |
90 | 90 | } |
91 | 91 | } |
92 | 92 | console.log(tileMap); |
93 | | - uniquePhysZ = [...new Set(Object.values(tileMap).map(tile => tile.physZ))].sort((a, b) => a - b); |
| 93 | + uniquePhysZ = [...new Set(Object.values(tileMap).map((tile) => tile.physZ))].sort((a, b) => a - b); |
94 | 94 | } |
95 | 95 |
|
96 | 96 | return { |
@@ -137,15 +137,15 @@ function DicomWebMods() { |
137 | 137 | }); |
138 | 138 | // get a true list of possible z values |
139 | 139 | const globalUniquePhysZ = [ |
140 | | - ...new Set(instanceResults.flatMap(inst => inst.uniquePhysZ)) |
| 140 | + ...new Set(instanceResults.flatMap((inst) => inst.uniquePhysZ)), |
141 | 141 | ].sort((a, b) => a - b); |
142 | 142 |
|
143 | 143 | // picking a z slice |
144 | | - if (whichZ == -1 || globalUniquePhysZ.length == 0){ |
| 144 | + if (whichZ == -1 || globalUniquePhysZ.length == 0) { |
145 | 145 | whichZ = false; // sinal no slices to filter between |
146 | 146 | } else { |
147 | | - whichZ = Math.min(Math.max(whichZ, 0), globalUniquePhysZ.length) |
148 | | - instanceResults = instanceResults.filter(inst => inst.uniquePhysZ.includes(globalUniquePhysZ[whichZ])) |
| 147 | + whichZ = Math.min(Math.max(whichZ, 0), globalUniquePhysZ.length); |
| 148 | + instanceResults = instanceResults.filter((inst) => inst.uniquePhysZ.includes(globalUniquePhysZ[whichZ])); |
149 | 149 | } |
150 | 150 |
|
151 | 151 | if (showDebugTiles) { |
|
0 commit comments