Skip to content

Commit

Permalink
fix(local): fix modalities not showing in local (#3388)
Browse files Browse the repository at this point in the history
* fix various bugs

* revert back docusaurus for styling issues
  • Loading branch information
sedghi authored May 12, 2023
1 parent 84cb709 commit 4fd81b5
Show file tree
Hide file tree
Showing 8 changed files with 279 additions and 264 deletions.
5 changes: 5 additions & 0 deletions DATACITATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,3 +142,8 @@ National Lung Screening Trial
Stony Brook University COVID-19 Positive Cases (COVID-19-NY-SBU)

- Saltz, J., Saltz, M., Prasanna, P., Moffitt, R., Hajagos, J., Bremer, E., Balsamo, J., & Kurc, T. (2021). Stony Brook University COVID-19 Positive Cases [Data set]. The Cancer Imaging Archive. https://doi.org/10.7937/TCIA.BBAG-2923


### 2.16.840.1.114362.1.11972228.22789312658.616067305.306.2

https://data.kitware.com/
10 changes: 7 additions & 3 deletions extensions/cornerstone-dicom-sr/src/getSopClassHandlerModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,13 @@ function _getDisplaySetsFromSeries(
ConceptNameCodeSequence.CodeValue !==
CodeNameCodeSequenceValues.ImagingMeasurementReport
) {
console.log(
'Only support Imaging Measurement Report SRs (TID1500) for this renderer.'
);
servicesManager.services.uiNotificationService.show({
title: 'DICOM SR',
message:
'OHIF only supports TID1500 Imaging Measurement Report Structured Reports. The SR you’re trying to view is not supported.',
type: 'warning',
duration: 6000,
});
return [];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -996,10 +996,16 @@ class SegmentationService extends PubSubService {
label: string;
}
): Promise<string> => {
const { displaySetService } = this.servicesManager.services;

const displaySet = displaySetService.getDisplaySetByUID(
displaySetInstanceUID
);

// Todo: we currently only support labelmap for segmentation for a displaySet
const representationType = LABELMAP;

const volumeId = this._getVolumeIdForDisplaySet(displaySetInstanceUID);
const volumeId = this._getVolumeIdForDisplaySet(displaySet);

const segmentationId = options?.segmentationId ?? `${csUtils.uuidv4()}`;

Expand Down
2 changes: 1 addition & 1 deletion extensions/default/src/DicomLocalDataSource/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function createDicomLocalApi(dicomLocalConfig) {
const study = DicomMetadataStore.getStudy(StudyInstanceUID);
study.series.forEach(aSeries => {
numInstances += aSeries.instances.length;
modalities.add(aSeries.Modality);
modalities.add(aSeries.instances[0].Modality);
});

// first instance in the first series
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ function segmentationItemEditHandler({ id, servicesManager }) {
...segmentation,
...value,
},
true
false, // don't suppress event
true // it should update cornerstone
);
}
}
Expand Down
16 changes: 8 additions & 8 deletions platform/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@
"write-heading-ids": "docusaurus write-heading-ids"
},
"dependencies": {
"@docusaurus/core": "2.4.0",
"@docusaurus/plugin-client-redirects": "2.4.0",
"@docusaurus/plugin-ideal-image": "2.4.0",
"@docusaurus/plugin-pwa": "2.4.0",
"@docusaurus/preset-classic": "2.4.0",
"@docusaurus/remark-plugin-npm2yarn": "2.4.0",
"@docusaurus/theme-live-codeblock": "2.4.0",
"@docusaurus/plugin-google-gtag": "2.4.0",
"@docusaurus/core": "2.3.0",
"@docusaurus/plugin-client-redirects": "2.3.0",
"@docusaurus/plugin-ideal-image": "2.3.0",
"@docusaurus/plugin-pwa": "2.3.0",
"@docusaurus/preset-classic": "2.3.0",
"@docusaurus/remark-plugin-npm2yarn": "2.3.0",
"@docusaurus/theme-live-codeblock": "2.3.0",
"@docusaurus/plugin-google-gtag": "2.3.0",
"@mdx-js/react": "^1.6.21",
"@svgr/webpack": "^5.5.0",
"classnames": "^2.3.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ const SegmentationItem = ({
)}
</div>
<div className="relative flex flex-col w-full p-1">
<div className="flex items-center mb-1 ml-2">
<div className="flex items-center flex-1 text-base text-primary-light">
<div className="flex items-center ml-2">
<div className="flex flex-1 text-base text-primary-light">
<div
className="w-3 h-3 mt-1 mr-2 rounded-full"
style={{ backgroundColor: 'red' }}
Expand Down
Loading

0 comments on commit 4fd81b5

Please sign in to comment.