From 3c20960fa32523c692c9ac12bbef6ff6045f4d11 Mon Sep 17 00:00:00 2001 From: Forrest Date: Tue, 7 Nov 2023 14:44:31 -0500 Subject: [PATCH] refactor: rename labelmaps to segment groups --- src/components/AnnotationsModule.vue | 14 +- ...pControls.vue => SegmentGroupControls.vue} | 100 ++++++----- src/components/SegmentList.vue | 24 +-- src/components/VtkTwoView.vue | 10 +- src/composables/useSceneBuilder.ts | 4 +- src/config.ts | 4 +- src/constants.ts | 7 - src/io/import/processors/restoreStateFile.ts | 6 +- src/io/state-file/index.ts | 6 +- src/io/state-file/schema.ts | 10 +- ...datasets-labelmaps.ts => segmentGroups.ts} | 158 +++++++++--------- src/store/tools/index.ts | 2 +- src/store/tools/paint.ts | 42 ++--- src/types/{labelmap.ts => segment.ts} | 2 +- src/vtk/LabelMap/index.d.ts | 6 +- 15 files changed, 197 insertions(+), 198 deletions(-) rename src/components/{LabelmapControls.vue => SegmentGroupControls.vue} (59%) rename src/store/{datasets-labelmaps.ts => segmentGroups.ts} (74%) rename src/types/{labelmap.ts => segment.ts} (75%) diff --git a/src/components/AnnotationsModule.vue b/src/components/AnnotationsModule.vue index 22c0d3283..b85f0456c 100644 --- a/src/components/AnnotationsModule.vue +++ b/src/components/AnnotationsModule.vue @@ -4,13 +4,13 @@ import { storeToRefs } from 'pinia'; import { AnnotationToolType, Tools } from '@/src/store/tools/types'; import { useToolStore } from '@/src/store/tools'; import MeasurementsToolList from './MeasurementsToolList.vue'; -import LabelmapControls from './LabelmapControls.vue'; +import SegmentGroupControls from './SegmentGroupControls.vue'; import ToolControls from './ToolControls.vue'; import MeasurementRulerDetails from './MeasurementRulerDetails.vue'; const Tabs = { Measurements: 'measurements', - Labelmaps: 'labelmaps', + SegmentGroups: 'segmentGroups', }; const MeasurementTools = [ @@ -33,12 +33,12 @@ const MeasurementToolTypes = new Set( MeasurementTools.map(({ type }) => type) ); -const tab = ref('measurements'); +const tab = ref(Tabs.Measurements); const { currentTool } = storeToRefs(useToolStore()); function autoFocusTab() { if (currentTool.value === Tools.Paint) { - tab.value = Tabs.Labelmaps; + tab.value = Tabs.SegmentGroups; } else if (MeasurementToolTypes.has(currentTool.value)) { tab.value = Tabs.Measurements; } @@ -59,14 +59,14 @@ watch( Measurements - Labelmaps + Segment Groups - - + + diff --git a/src/components/LabelmapControls.vue b/src/components/SegmentGroupControls.vue similarity index 59% rename from src/components/LabelmapControls.vue rename to src/components/SegmentGroupControls.vue index d7f2f470b..6e86d08ec 100644 --- a/src/components/LabelmapControls.vue +++ b/src/components/SegmentGroupControls.vue @@ -1,59 +1,60 @@