diff --git a/src/components/project/VolumeAnnotations.stories.js b/src/components/project/VolumeAnnotations.stories.js index b1a71d1..cf26a44 100644 --- a/src/components/project/VolumeAnnotations.stories.js +++ b/src/components/project/VolumeAnnotations.stories.js @@ -1,71 +1,39 @@ import { action } from '@storybook/addon-actions'; -import { get, forEach } from 'lodash-es'; import brainboxProject from '@/components/project/TextAnnotations.brainbox.fixtures.json'; -import microdrawFiles from '@/components/project/TextAnnotations.microdraw.fixtures.json'; -import TextAnnotations from '@/components/project/TextAnnotations.vue'; +import VolumeAnnotations from '@/components/project/VolumeAnnotations.vue'; export default { title: 'Project/VolumeAnnotations', - component: TextAnnotations + component: VolumeAnnotations }; const Template = (args) => ({ - components: { TextAnnotations }, + components: { VolumeAnnotations }, setup () { return { ...args }; }, template: ` - + ` }); export const Brainbox = Template.bind({}); -export const Microdraw = Template.bind({}); - -const defaultArgs = { - valueChange: action('value changed'), - selectFile: action('file selected') -}; Brainbox.args = { - ...defaultArgs, extractKeys: (files) => { const keys = new Map(); keys.set('Name', 'name'); - keys.set('File', 'source'); - files.forEach((file) => { - const annotations = get(file, ['mri', 'annotations', brainboxProject]); - if (annotations == null) { return; } - forEach(annotations, (_value, key) => { - keys.set(key, ['mri', 'annotations', brainboxProject, key, 'data']); - }); - }); - - return keys; - }, - - files: brainboxProject.files.list -}; - -Microdraw.args = { - ...defaultArgs, - extractKeys: () => { - const keys = new Map(); - keys.set('Name', 'name'); - keys.set('File', 'source'); + keys.set('Labels sets', 'labels'); return keys; }, - - files: microdrawFiles -}; + selectVolumeAnnotation: action('select annotation'), + volumeAnnotations: brainboxProject.files.list[0].mri.atlas +}; \ No newline at end of file