Skip to content

Commit

Permalink
feat(WindowLevelControls): show CT presets for images
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulHax committed Nov 18, 2024
1 parent 6b9dd93 commit b417de4
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/components/tools/windowing/WindowLevelControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ export default defineComponent({
}
return '';
});
const isCT = computed(() => {
const ctTags = ['ct', 'ctprotocol'];
const ctTags = ['ct', 'ctprotocol'];
const showCtPresets = computed(() => {
if (currentImageID.value && !isDicomImage(currentImageID.value)) {
return true;
}
return modality.value && ctTags.includes(modality.value.toLowerCase());
});
Expand Down Expand Up @@ -107,7 +111,7 @@ export default defineComponent({
parseLabel,
wlOptions,
WLPresetsCT,
isCT,
showCtPresets,
tags,
panel,
WLAutoRanges,
Expand Down Expand Up @@ -136,11 +140,11 @@ export default defineComponent({
</v-radio-group>
</v-expansion-panel-text>
</v-expansion-panel>
<v-expansion-panel v-if="isCT" value="presets">
<v-expansion-panel v-if="showCtPresets" value="presets">
<v-expansion-panel-title>Presets</v-expansion-panel-title>
<v-expansion-panel-text>
<v-radio-group v-model="wlOptions" hide-details>
<template v-if="isCT">
<template v-if="showCtPresets">
<p>CT Presets</p>
<hr />
<div v-for="(options, category) in WLPresetsCT" :key="category">
Expand Down

0 comments on commit b417de4

Please sign in to comment.