Skip to content

Commit

Permalink
Fix merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
wayfarer3130 committed Apr 3, 2023
1 parent ccd1b6a commit b995a78
Showing 1 changed file with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,6 @@ const CORNERSTONE_3D_TOOLS_SOURCE_VERSION = '0.1';

const supportedLegacyCornerstoneTags = ['cornerstoneTools@^4.0.0'];

const convertCode = (codingValues, code) => {
if (!code || code.CodingSchemeDesignator === 'CORNERSTONEJS') return;
const ref = `${code.CodingSchemeDesignator}:${code.CodeValue}`;
const ret = { ...codingValues[ref], ref, ...code, text: code.CodeMeaning };
return ret;
};

const convertSites = (codingValues, sites) => {
if (!sites || !sites.length) return;
const ret = [];
// Do as a loop to convert away from Proxy instances
for (let i = 0; i < sites.length; i++) {
// Deal with irregular conversion from dcmjs
const site = convertCode(codingValues, sites[i][0] || sites[i]);
if (site) ret.push(site);
}
return (ret.length && ret) || undefined;
};

/**
* Takes a list of codes and runs them through convert, only adding the ones
* which are not CORNERSTONEJS issued to the result.
Expand Down Expand Up @@ -303,7 +284,7 @@ function _mapLegacyDataSet(dataset) {
return dataset;
}

const toArray = function (x) {
const toArray = function(x) {
return Array.isArray(x) ? x : [x];
};

Expand Down

0 comments on commit b995a78

Please sign in to comment.