Skip to content

Commit 9d5eeab

Browse files
authored
Merge pull request #684 from PaulHax/show-ct
feat(WindowLevelControls): show CT presets for images
2 parents 6b9dd93 + b417de4 commit 9d5eeab

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/components/tools/windowing/WindowLevelControls.vue

+9-5
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,12 @@ export default defineComponent({
3939
}
4040
return '';
4141
});
42-
const isCT = computed(() => {
43-
const ctTags = ['ct', 'ctprotocol'];
42+
43+
const ctTags = ['ct', 'ctprotocol'];
44+
const showCtPresets = computed(() => {
45+
if (currentImageID.value && !isDicomImage(currentImageID.value)) {
46+
return true;
47+
}
4448
return modality.value && ctTags.includes(modality.value.toLowerCase());
4549
});
4650
@@ -107,7 +111,7 @@ export default defineComponent({
107111
parseLabel,
108112
wlOptions,
109113
WLPresetsCT,
110-
isCT,
114+
showCtPresets,
111115
tags,
112116
panel,
113117
WLAutoRanges,
@@ -136,11 +140,11 @@ export default defineComponent({
136140
</v-radio-group>
137141
</v-expansion-panel-text>
138142
</v-expansion-panel>
139-
<v-expansion-panel v-if="isCT" value="presets">
143+
<v-expansion-panel v-if="showCtPresets" value="presets">
140144
<v-expansion-panel-title>Presets</v-expansion-panel-title>
141145
<v-expansion-panel-text>
142146
<v-radio-group v-model="wlOptions" hide-details>
143-
<template v-if="isCT">
147+
<template v-if="showCtPresets">
144148
<p>CT Presets</p>
145149
<hr />
146150
<div v-for="(options, category) in WLPresetsCT" :key="category">

0 commit comments

Comments
 (0)