fix: Service consistency typing (#3309)
* Use more consistent type/structure for services * Fix restoring SR so the tests described work * One more typed service * Added types for the Cornerstone library * Couple more type fixes
This commit is contained in:
1 parent
47c25f4364
commit
6cf271d006
24 files changed
+309
-299
No files matched your search
@@ -10,17 +10,18 @@ import {
|
||||
utilities as csUtils,
|
||||
CONSTANTS,
|
||||
} from '@cornerstonejs/core';
|
||||
import { CinePlayer, useCine, useViewportGrid } from '@ohif/ui';
|
||||
import {
|
||||
IStackViewport,
|
||||
IVolumeViewport,
|
||||
} from '@cornerstonejs/core/dist/esm/types';
|
||||
|
||||
import { setEnabledElement } from '../state';
|
||||
|
||||
import './OHIFCornerstoneViewport.css';
|
||||
import CornerstoneOverlays from './Overlays/CornerstoneOverlays';
|
||||
import {
|
||||
IStackViewport,
|
||||
IVolumeViewport,
|
||||
} from '@cornerstonejs/core/dist/esm/types';
|
||||
import getSOPInstanceAttributes from '../utils/measurementServiceMappings/utils/getSOPInstanceAttributes';
|
||||
import { CinePlayer, useCine, useViewportGrid } from '@ohif/ui';
|
||||
import CornerstoneServices from '../types/CornerstoneServices';
|
||||
|
||||
const STACK = 'stack';
|
||||
|
||||
@@ -129,7 +130,7 @@ const OHIFCornerstoneViewport = React.memo(props => {
|
||||
cornerstoneCacheService,
|
||||
viewportGridService,
|
||||
stateSyncService,
|
||||
} = servicesManager.services;
|
||||
} = servicesManager.services as CornerstoneServices;
|
||||
|
||||
const cineHandler = () => {
|
||||
if (!cines || !cines[viewportIndex] || !enabledVPElement) {
|
||||
|
||||
Reference in new issue
Block a user