Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to Segment Groups under Annotations and Simpify CT Presets #686

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/components/AnnotationsModule.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const MeasurementToolTypes = new Set<string>(
MeasurementTools.map(({ type }) => type)
);

const tab = ref(Tabs.Measurements);
const tab = ref(Tabs.SegmentGroups);
const { currentTool } = storeToRefs(useToolStore());

function autoFocusTab() {
Expand All @@ -58,16 +58,16 @@ watch(
<tool-controls />
<v-divider thickness="4" />
<v-tabs v-model="tab" align-tabs="center" density="compact" class="my-1">
<v-tab value="measurements" class="tab-header">Measurements</v-tab>
<v-tab value="segmentGroups" class="tab-header">Segment Groups</v-tab>
<v-tab value="measurements" class="tab-header">Measurements</v-tab>
</v-tabs>
<v-window v-model="tab">
<v-window-item value="measurements">
<measurements-tool-list :tools="MeasurementTools" />
</v-window-item>
<v-window-item value="segmentGroups">
<segment-group-controls />
</v-window-item>
<v-window-item value="measurements">
<measurements-tool-list :tools="MeasurementTools" />
</v-window-item>
</v-window>
</div>
</template>
Expand Down
30 changes: 12 additions & 18 deletions src/components/tools/windowing/WindowLevelControls.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default defineComponent({
const windowingStore = useWindowingStore();
const viewStore = useViewStore();
const dicomStore = useDICOMStore();
const panel = ref(['tags', 'presets']);
const panel = ref(['tags', 'presets', 'auto']);
const windowingDefaults = defaultWindowLevelConfig();

// Get the relevant view ids
Expand Down Expand Up @@ -126,7 +126,7 @@ export default defineComponent({
<v-expansion-panels v-model="panel" multiple>
<v-expansion-panel value="tags" v-if="tags.length">
<v-expansion-panel-title>
Data-Specific Presets
File Specific Presets
</v-expansion-panel-title>
<v-expansion-panel-text>
<v-radio-group v-model="wlOptions" hide-details>
Expand All @@ -141,24 +141,18 @@ export default defineComponent({
</v-expansion-panel-text>
</v-expansion-panel>
<v-expansion-panel v-if="showCtPresets" value="presets">
<v-expansion-panel-title>Presets</v-expansion-panel-title>
<v-expansion-panel-title>CT Presets</v-expansion-panel-title>
<v-expansion-panel-text>
<v-radio-group v-model="wlOptions" hide-details>
<template v-if="showCtPresets">
<p>CT Presets</p>
<hr />
<div v-for="(options, category) in WLPresetsCT" :key="category">
<p>{{ parseLabel(category) }}</p>
<v-radio
v-for="(value, key) in options"
:key="key"
:label="parseLabel(key)"
:value="value"
density="compact"
class="ml-3"
/>
</div>
</template>
<div v-for="(wl, name) in WLPresetsCT" :key="name">
<v-radio
:key="name"
:label="parseLabel(name)"
:value="wl"
density="compact"
class="ml-3"
/>
</div>
</v-radio-group>
</v-expansion-panel-text>
</v-expansion-panel>
Expand Down
70 changes: 19 additions & 51 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,57 +82,25 @@ export const WL_AUTO_DEFAULT = 'FullRange';
export const WL_HIST_BINS = 512;

export const WLPresetsCT = {
Head: {
Brain: {
width: 80,
level: 40,
},
Subdural: {
width: 300,
level: 100,
},
Stroke: {
width: 40,
level: 40,
},
Bones: {
width: 2800,
level: 600,
},
SoftTissue: {
width: 400,
level: 60,
},
},
Chest: {
Lungs: {
width: 1500,
level: -600,
},
Mediastinum: {
width: 350,
level: 50,
},
},
Abdomen: {
SoftTissue: {
width: 400,
level: 50,
},
Liver: {
width: 150,
level: 30,
},
},
Spine: {
SoftTissue: {
width: 250,
level: 50,
},
Bones: {
width: 1800,
level: 400,
},
Bones: {
width: 1000,
level: 400,
},
Air: {
width: 1000,
level: -426,
},
SoftTissue: {
width: 350,
level: 50,
},
Lungs: {
width: 1500,
level: -600,
},
Brain: {
width: 80,
level: 40,
},
};

Expand Down
Loading