fix: Use @cornerstonejs/adapters (#3116)

Also update the sort series to be consistent, using a single version of the series sort, and fix an issue with longitudinal mode export.
This commit is contained in:
Bill Wallace authored and GitHub committed 2023-02-06 17:05:13 -05:00
1 parent 8edd4ec054
commit 0e1a58da79
18 files changed
+141 -53

No files matched your search

@@ -39,7 +39,7 @@ function getFilteredCornerstoneToolState(
const findingSites = [];
// NOTE -> We use the CORNERSTONEJS coding schemeDesignator which we have
// defined in the dcmjs adapters
// defined in the @cornerstonejs/adapters
if (measurementDataI.label) {
if (additionalFindingTypes.includes(toolType)) {
finding = {
@@ -1,10 +1,10 @@
import { utilities, metaData } from '@cornerstonejs/core';
import OHIF, { DicomMetadataStore } from '@ohif/core';
import getLabelFromDCMJSImportedToolData from './getLabelFromDCMJSImportedToolData';
import { adapters } from 'dcmjs';
import { adaptersSR } from '@cornerstonejs/adapters';
const { guid } = OHIF.utils;
const { MeasurementReport, CORNERSTONE_3D_TAG } = adapters.Cornerstone3D;
const { MeasurementReport, CORNERSTONE_3D_TAG } = adaptersSR.Cornerstone3D;
const CORNERSTONE_3D_TOOLS_SOURCE_NAME = 'Cornerstone3DTools';
const CORNERSTONE_3D_TOOLS_SOURCE_VERSION = '0.1';
@@ -1,6 +1,6 @@
import { adapters } from 'dcmjs';
import { adaptersSR } from '@cornerstonejs/adapters';
const cornerstoneAdapters = adapters.Cornerstone3D;
const cornerstoneAdapters = adaptersSR.Cornerstone3D;
const supportedLegacyCornerstoneTags = ['cornerstoneTools@^4.0.0'];
const CORNERSTONE_3D_TAG = cornerstoneAdapters.CORNERSTONE_3D_TAG;
@@ -1,4 +1,4 @@
import dcmjs from 'dcmjs';
import { adaptersSR } from '@cornerstonejs/adapters';
/**
* Checks if dcmjs has support to determined tool
@@ -7,7 +7,7 @@ import dcmjs from 'dcmjs';
* @returns {boolean}
*/
const isToolSupported = toolName => {
const adapter = dcmjs.adapters.Cornerstone3D;
const adapter = adaptersSR.Cornerstone3D;
return !!adapter[toolName];
};