WIP SR viewport.
This commit is contained in:
1 parent
8674e676b7
commit
558ab00c23
22 files changed
+904
-8
No files matched your search
@@ -19,6 +19,7 @@ import appInit from './appInit.js';
|
||||
|
||||
// TODO: Temporarily for testing
|
||||
import '@ohif/mode-example';
|
||||
import '@ohif/sr-mode-example';
|
||||
import '@ohif/mode-longitudinal';
|
||||
|
||||
/**
|
||||
@@ -48,7 +49,12 @@ function App({ config, defaultExtensions }) {
|
||||
extensionManager,
|
||||
servicesManager
|
||||
);
|
||||
const { UIDialogService, UIModalService, UINotificationService } = servicesManager.services;
|
||||
|
||||
const {
|
||||
UIDialogService,
|
||||
UIModalService,
|
||||
UINotificationService,
|
||||
} = servicesManager.services;
|
||||
|
||||
// A UI Service may need to use the ViewportGrid context
|
||||
const viewportGridReducer = (state, action) => {
|
||||
|
||||
@@ -67,6 +67,7 @@ function appInit(appConfigOrFunc, defaultExtensions) {
|
||||
if (!appConfig.modes.length) {
|
||||
appConfig.modes.push(window.exampleMode);
|
||||
appConfig.modes.push(window.longitudinalMode);
|
||||
appConfig.modes.push(window.SRViewportExample);
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
@@ -12,6 +12,7 @@ function ViewerViewportGrid(props) {
|
||||
{ numCols, numRows, activeViewportIndex, viewports },
|
||||
dispatch,
|
||||
] = useViewportGrid();
|
||||
|
||||
const setActiveViewportIndex = index => {
|
||||
dispatch({ type: 'SET_ACTIVE_VIEWPORT_INDEX', payload: index });
|
||||
};
|
||||
@@ -87,6 +88,7 @@ function ViewerViewportGrid(props) {
|
||||
const viewportIndex = i;
|
||||
const paneMetadata = viewports[i] || {};
|
||||
const { displaySetInstanceUID } = paneMetadata;
|
||||
|
||||
const displaySet =
|
||||
DisplaySetService.getDisplaySetByUID(displaySetInstanceUID) || {};
|
||||
const ViewportComponent = _getViewportComponent(
|
||||
|
||||
@@ -24,6 +24,7 @@ import ReactDOM from 'react-dom';
|
||||
import OHIFDefaultExtension from '@ohif/extension-default';
|
||||
import OHIFCornerstoneExtension from '@ohif/extension-cornerstone';
|
||||
import OHIFMeasurementTrackingExtension from '@ohif/extension-measurement-tracking';
|
||||
import OHIFDICOMSRExtension from '@ohif/extension-dicom-sr';
|
||||
|
||||
/** Combine our appConfiguration and "baked-in" extensions */
|
||||
const appProps = {
|
||||
@@ -32,6 +33,7 @@ const appProps = {
|
||||
OHIFDefaultExtension,
|
||||
OHIFCornerstoneExtension,
|
||||
OHIFMeasurementTrackingExtension,
|
||||
OHIFDICOMSRExtension,
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
@@ -2,11 +2,8 @@ import React, { useEffect } from 'react';
|
||||
import { useParams } from 'react-router';
|
||||
import PropTypes from 'prop-types';
|
||||
// TODO: DicomMetadataStore should be injected?
|
||||
import { DicomMetadataStore, ToolBarManager } from '@ohif/core';
|
||||
import {
|
||||
DragAndDropProvider,
|
||||
ImageViewerProvider,
|
||||
} from '@ohif/ui';
|
||||
import { DicomMetadataStore } from '@ohif/core';
|
||||
import { DragAndDropProvider, ImageViewerProvider } from '@ohif/ui';
|
||||
//
|
||||
import { useQuery } from '@hooks';
|
||||
import ViewportGrid from '@components/ViewportGrid';
|
||||
@@ -131,8 +128,8 @@ export default function ModeRoute({
|
||||
>
|
||||
<CombinedContextProvider>
|
||||
{/* TODO: extensionManager is already provided to the extension module.
|
||||
* Use it from there instead of passing as a prop here.
|
||||
*/}
|
||||
* Use it from there instead of passing as a prop here.
|
||||
*/}
|
||||
<DragAndDropProvider>
|
||||
<LayoutComponent
|
||||
{...layoutTemplateData.props}
|
||||
|
||||
Reference in new issue
Block a user