@@ -16,12 +16,14 @@ import { usePaintToolStore } from '@/src/store/tools/paint';
1616import { Maybe } from ' @/src/types' ;
1717import { reactive , ref , computed , watch , toRaw } from ' vue' ;
1818import { useMultiSelection } from ' @/src/composables/useMultiSelection' ;
19+ import { isCineImage } from ' @/src/core/cine/isCineImage' ;
1920
2021const UNNAMED_GROUP_NAME = ' Unnamed Segment Group' ;
2122
2223const segmentGroupStore = useSegmentGroupStore ();
2324const { currentImageID } = useCurrentImage ();
2425const dataStore = useDatasetStore ();
26+ const isCurrentImageCine = computed (() => isCineImage (currentImageID .value ));
2527
2628const currentSegmentGroups = computed (() => {
2729 if (! currentImageID .value ) return [];
@@ -117,6 +119,7 @@ function stopEditing(commit: boolean) {
117119function createSegmentGroup() {
118120 if (! currentImageID .value )
119121 throw new Error (' Cannot create a labelmap without a base image' );
122+ if (isCurrentImageCine .value ) return ;
120123
121124 const id = segmentGroupStore .newLabelmapFromImage (currentImageID .value );
122125 if (! id ) throw new Error (' Could not create a new labelmap' );
@@ -152,6 +155,7 @@ function createSegmentGroupFromImage(selection: DataSelection) {
152155 if (! primarySelection ) {
153156 throw new Error (' No primary selection' );
154157 }
158+ if (isCurrentImageCine .value ) return ;
155159 segmentGroupStore .convertImageToLabelmap (selection , primarySelection );
156160}
157161
@@ -228,6 +232,7 @@ function deleteSelected() {
228232 variant =" tonal"
229233 color =" secondary"
230234 density =" compact"
235+ :disabled =" isCurrentImageCine"
231236 @click.stop =" createSegmentGroup"
232237 >
233238 <v-icon class =" mr-1" >mdi-plus</v-icon > New Group
@@ -238,6 +243,7 @@ function deleteSelected() {
238243 variant =" tonal"
239244 color =" secondary"
240245 density =" compact"
246+ :disabled =" isCurrentImageCine"
241247 v-bind =" props"
242248 >
243249 <v-icon class =" mr-1" >mdi-chevron-down</v-icon >From Image
0 commit comments