feat(OHIF):Add DICOM Video Display

* feat(OHIFv3):Add a video viewport

* Fixed a couple of viewing issues

* fix(OHIF):If not all instances are used by a given provider, then continue to add items

* Added video data

* Add a basic e2e test for video display

* Adding a screen shot as requested
This commit is contained in:
Bill Wallace authored and GitHub committed 2022-02-24 11:55:12 -05:00
1 parent 73aa738c48
commit ca9ed62a5f
19 files changed
+543 -5

No files matched your search

@@ -0,0 +1,51 @@
import React, { useCallback, useContext, useEffect, useState } from 'react';
import PropTypes from 'prop-types';
import cornerstoneTools from 'cornerstone-tools';
import cornerstone from 'cornerstone-core';
import CornerstoneViewport from 'react-cornerstone-viewport';
import OHIF, { DicomMetadataStore, utils } from '@ohif/core';
import {
Notification,
ViewportActionBar,
useViewportGrid,
useViewportDialog,
} from '@ohif/ui';
import { adapters } from 'dcmjs';
import id from '../id';
function OHIFCornerstoneVideoViewport({
children,
dataSource,
displaySet,
viewportIndex,
servicesManager,
extensionManager,
}) {
const {
DisplaySetService,
MeasurementService,
ToolBarService,
} = servicesManager.services;
const { videoUrl } = displaySet;
const mimeType = "video/mp4";
// Need to copies of the source to fix a firefox bug
return (
<div className="bg-primary-black w-full h-full">
<video
src={videoUrl}
controls
controlsList="nodownload"
preload="auto"
className="w-full h-full"
>
<source src={videoUrl} type={mimeType} />
<source src={videoUrl} type={mimeType} />
Video src/type not supported: <a href={videoUrl}>{videoUrl} of type {mimeType}</a>
</video>
</div>
)
}
export default OHIFCornerstoneVideoViewport;