From 97a66c4d205630f470ec30af3b2b9a6542ad5535 Mon Sep 17 00:00:00 2001 From: Curtis Lisle Date: Wed, 1 Jun 2022 16:20:39 -0400 Subject: [PATCH] Window presets (#515) * window level preset buttons * add CT to allowed scan types * Add migration for new scan type option * Lint fix Co-authored-by: curtislisle Co-authored-by: Anne Haley --- client/src/components/ControlPanel.vue | 40 +++++++++++++++++++++++ miqa/core/migrations/0034_CT_scan_type.py | 40 +++++++++++++++++++++++ miqa/core/models/scan.py | 1 + 3 files changed, 81 insertions(+) create mode 100644 miqa/core/migrations/0034_CT_scan_type.py diff --git a/client/src/components/ControlPanel.vue b/client/src/components/ControlPanel.vue index 4e40f458..29d5765a 100644 --- a/client/src/components/ControlPanel.vue +++ b/client/src/components/ControlPanel.vue @@ -175,6 +175,20 @@ export default { this.representation.setWindowWidth(this.currentWindowWidth); this.representation.setWindowLevel(this.currentWindowLevel); }, + + // this is a preset value assigned when the user clicks a W/L preset button icon + setWindowLevelToHighContrast() { + this.setCurrentWindowWidth(1500); + this.setCurrentWindowLevel(-500); + this.representation.setWindowWidth(this.currentWindowWidth); + this.representation.setWindowLevel(this.currentWindowLevel); + }, + setWindowLevelToLowContrast() { + this.setCurrentWindowWidth(6000); + this.setCurrentWindowLevel(500); + this.representation.setWindowWidth(this.currentWindowWidth); + this.representation.setWindowLevel(this.currentWindowLevel); + }, navigateToFrame(frameId) { if (frameId && frameId !== this.$route.params.frameId) { this.$router @@ -577,6 +591,32 @@ export default { + + + + Window/Level Presets + + + + High Contrast + + + + + + Low Contrast + + + +