Start adding measurement table

This commit is contained in:
Erik Ziegler committed 2020-05-15 14:31:18 +02:00
1 parent 264a72b566
commit 304caba873
2 files changed
+86 -10

No files matched your search

+13 -10
View File
@@ -1,19 +1,13 @@
import React, { useState, useEffect, useCallback } from 'react';
import { StudyBrowser } from '@ohif/ui';
import {
dicomMetadataStore,
useViewModel,
displaySetManager,
} from '@ohif/core';
// Create map in local state from displaySetInstanceUids to thumbnails
// Get thumbnail imageId from displaySet
// When displaySetInstanceUids change, initiate async render into canvas
// Get image data-uri from canvas offscreen
// Set image data-uri into state (NOTE: This will probably end up in the fucking browser cache, NEED to find a way to prevent that from happening)
// state triggers rerender
//
import MeasurementTable from './MeasurementTable.js';
// TODO:
// - No loading UI exists yet
// - cancel promises when component is destroyed
@@ -253,7 +247,7 @@ function StudyBrowserPanel({ getDataSources, commandsManager }) {
return <StudyBrowser tabs={tabs} onClickStudy={memoOnClickStudy} />;
}
function getPanelModule({ getDataSources, commandsManager }) {
function getPanelModule({ getDataSources, commandsManager, servicesManager }) {
const wrappedStudyBrowserPanel = () => {
return (
<StudyBrowserPanel
@@ -263,6 +257,15 @@ function getPanelModule({ getDataSources, commandsManager }) {
);
};
const wrappedMeasurementPanel = () => {
return (
<MeasurementTable
commandsManager={commandsManager}
servicesManager={servicesManager}
/>
);
};
return [
{
name: 'seriesList',
@@ -276,7 +279,7 @@ function getPanelModule({ getDataSources, commandsManager }) {
iconName: 'list-bullets',
iconLabel: 'Measure',
label: 'Measurements',
component: wrappedStudyBrowserPanel,
component: wrappedMeasurementPanel,
},
];
}