Compare commits

...
20 changed files with 316 additions and 26 deletions

No files matched your search

@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.2.23](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.22...@ohif/extension-dicom-tag-browser@0.2.23) (2022-04-06)
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser
## [0.2.22](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.21...@ohif/extension-dicom-tag-browser@0.2.22) (2022-04-05)
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-tag-browser",
"version": "0.2.22",
"version": "0.2.23",
"description": "OHIF extension for checking DICOM headers.",
"author": "OHIF",
"license": "MIT",
@@ -59,7 +59,7 @@ const DicomTagBrowser = ({ displaySets, displaySetInstanceUID }) => {
let metadata;
const isImageStack =
activeDisplaySet instanceof ImageSet &&
activeDisplaySet.isModalitySupported === true;
activeDisplaySet.isSOPClassUIDSupported === true;
let instanceList;
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.12.23](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.22...@ohif/extension-vtk@1.12.23) (2022-04-22)
**Note:** Version bump only for package @ohif/extension-vtk
## [1.12.22](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.21...@ohif/extension-vtk@1.12.22) (2022-04-06)
**Note:** Version bump only for package @ohif/extension-vtk
## [1.12.21](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.20...@ohif/extension-vtk@1.12.21) (2022-04-05)
**Note:** Version bump only for package @ohif/extension-vtk
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-vtk",
"version": "1.12.21",
"version": "1.12.23",
"description": "OHIF extension for VTK.js",
"author": "OHIF",
"license": "MIT",
@@ -53,8 +53,8 @@
"react-vtkjs-viewport": "^0.14.4"
},
"devDependencies": {
"@ohif/core": "^2.16.16",
"@ohif/ui": "^1.10.7",
"@ohif/core": "^2.16.18",
"@ohif/ui": "^1.10.8",
"cornerstone-tools": "^6.0.6",
"cornerstone-wado-image-loader": "^4.1.0",
"dicom-parser": "^1.8.11",
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.16.18](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.17...@ohif/core@2.16.18) (2022-04-22)
**Note:** Version bump only for package @ohif/core
## [2.16.17](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.16...@ohif/core@2.16.17) (2022-04-06)
**Note:** Version bump only for package @ohif/core
## [2.16.16](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.15...@ohif/core@2.16.16) (2022-04-05)
**Note:** Version bump only for package @ohif/core
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/core",
"version": "2.16.16",
"version": "2.16.18",
"description": "Generic business logic for web-based medical imaging applications",
"author": "OHIF Core Team",
"license": "MIT",
@@ -401,7 +401,7 @@ class StackLoadingListener extends BaseLoadingListener {
const totalFramesCount = this.stack.imageIds.length;
const loadedFramesCount = this.loadedCount;
const loadingFramesCount = totalFramesCount - loadedFramesCount;
const percentComplete = Math.round(
const percentComplete = Math.ceil(
(loadedFramesCount / totalFramesCount) * 100
);
const progressId = this._getProgressId();
@@ -3,12 +3,12 @@ import DICOMWeb from './../../DICOMWeb';
import ImageSet from './../ImageSet';
import { InstanceMetadata } from './InstanceMetadata';
import { Metadata } from './Metadata';
import OHIFError from '../OHIFError';
import { SeriesMetadata } from './SeriesMetadata';
// - createStacks
import { api } from 'dicomweb-client';
// - createStacks
import { isImage } from '../../utils/isImage';
import { naturalizeSOPClassUID } from '../../utils/naturalizeSOPClassUID';
import {
isDisplaySetReconstructable,
isSpacingUniform,
@@ -169,8 +169,12 @@ class StudyMetadata extends Metadata {
!isImage(instance.getTagValue('SOPClassUID')) &&
!instance.getTagValue('Rows')
) {
// we set an empty display and we add a isModalitySupported variable to
// print a warning that the modality is not supported in the thumbnail.
// we set an empty display and we add a isSOPClassUIDSupported variable to
// print a warning that the series is not supported in the thumbnail.
// SOPClassUIDNaturalized is human readable name, since for non image series,
// we could have a mismatch between the SOPClassUID and the Modality.
// For example, in the Parametric map IOD Modality is expected to match
// the value for the series used to generate Parametric map, and there is no "PM" modality.
const displaySet = new ImageSet([]);
const seriesData = series.getData();
displaySet.setAttributes({
@@ -188,7 +192,10 @@ class StudyMetadata extends Metadata {
InstanceNumber: instance.getTagValue('InstanceNumber'), // Include the instance number
AcquisitionDatetime: instance.getTagValue('AcquisitionDateTime'), // Include the acquisition datetime
isReconstructable: false,
isModalitySupported: false,
isSOPClassUIDSupported: false,
SOPClassUIDNaturalized: naturalizeSOPClassUID(
instance.getTagValue('SOPClassUID')
),
metadata: instance.getData().metadata,
});
@@ -333,10 +340,18 @@ class StudyMetadata extends Metadata {
if (referencedSeriesInstanceUID) {
filteredDerivedDisplaySets = filteredDerivedDisplaySets.filter(
displaySet => {
return (
StudyMetadata.getReferencedDisplaySet(displaySet, [this])
.SeriesInstanceUID === referencedSeriesInstanceUID
const referencedDisplaySet = StudyMetadata.getReferencedDisplaySet(
displaySet,
[this]
);
if (referencedDisplaySet) {
return (
referencedDisplaySet.SeriesInstanceUID ===
referencedSeriesInstanceUID
);
} else {
return false;
}
}
);
}
@@ -923,7 +938,7 @@ const makeDisplaySet = (series, instances) => {
: displayReconstructableInfo.reconstructionIssues;
}
imageSet.isModalitySupported = true;
imageSet.isSOPClassUIDSupported = true;
return imageSet;
};
@@ -0,0 +1,200 @@
import { sopClassDictionary } from './sopClassDictionary';
import { isImage } from './isImage';
/**
* Naturalize SOP Class UID which do not have image data
* @param {string} SOPClassUID - SOP Class UID to be converted
* @returns {string} - human readable name
*/
export const naturalizeSOPClassUID = SOPClassUID => {
let naturalizedName = '';
if (!SOPClassUID) return naturalizedName;
if (!isImage) return naturalizedName;
if (sopClassDictionary.MRSpectroscopyStorage === SOPClassUID) {
naturalizedName = 'MRSpectroscopy';
} else if (sopClassDictionary.EnhancedUSVolumeStorage === SOPClassUID) {
naturalizedName = 'EnhancedUSVolume';
} else if (sopClassDictionary.Sop12LeadECGWaveformStorage === SOPClassUID) {
naturalizedName = 'Sop12LeadECGWaveform';
} else if (sopClassDictionary.GeneralECGWaveformStorage === SOPClassUID) {
naturalizedName = 'GeneralECGWaveform';
} else if (sopClassDictionary.AmbulatoryECGWaveformStorage === SOPClassUID) {
naturalizedName = 'AECAmbulatoryECGWaveformGW';
} else if (sopClassDictionary.HemodynamicWaveformStorage === SOPClassUID) {
naturalizedName = 'HemodynamicWaveform';
} else if (
sopClassDictionary.CardiacElectrophysiologyWaveformStorage === SOPClassUID
) {
naturalizedName = 'CardiacElectrophysiologyWaveform';
} else if (
sopClassDictionary.BasicVoiceAudioWaveformStorage === SOPClassUID
) {
naturalizedName = 'BasicVoiceAudioWaveform';
} else if (sopClassDictionary.GeneralAudioWaveformStorage === SOPClassUID) {
naturalizedName = 'GGeneralAudioWaveformAW';
} else if (sopClassDictionary.ArterialPulseWaveformStorage === SOPClassUID) {
naturalizedName = 'APArterialPulseWaveformW';
} else if (sopClassDictionary.RespiratoryWaveformStorage === SOPClassUID) {
naturalizedName = 'RespiratoryWaveform';
} else if (
sopClassDictionary.GrayscaleSoftcopyPresentationStateStorage === SOPClassUID
) {
naturalizedName = 'GrayscaleSoftcopyPresentationState';
} else if (
sopClassDictionary.ColorSoftcopyPresentationStateStorage === SOPClassUID
) {
naturalizedName = 'ColorSoftcopyPresentationState';
} else if (
sopClassDictionary.PseudoColorSoftcopyPresentationStateStorage ===
SOPClassUID
) {
naturalizedName = 'PseudoColorSoftcopyPresentationState';
} else if (
sopClassDictionary.BlendingSoftcopyPresentationStateStorage === SOPClassUID
) {
naturalizedName = 'BlendingSoftcopyPresentationState';
} else if (
sopClassDictionary.XAXRFGrayscaleSoftcopyPresentationStateStorage ===
SOPClassUID
) {
naturalizedName = 'XAXRFGrayscaleSoftcopyPresentationState';
} else if (sopClassDictionary.RawDataStorage === SOPClassUID) {
naturalizedName = 'RawData';
} else if (sopClassDictionary.SpatialRegistrationStorage === SOPClassUID) {
naturalizedName = 'SpatialRegistration';
} else if (sopClassDictionary.SpatialFiducialsStorage === SOPClassUID) {
naturalizedName = 'SpatialFiducials';
} else if (
sopClassDictionary.DeformableSpatialRegistrationStorage === SOPClassUID
) {
naturalizedName = 'DeformableSpatialRegistration';
} else if (sopClassDictionary.SegmentationStorage === SOPClassUID) {
naturalizedName = 'SEG';
} else if (sopClassDictionary.SurfaceSegmentationStorage === SOPClassUID) {
naturalizedName = 'SurfaceSEG';
} else if (sopClassDictionary.RealWorldValueMappingStorage === SOPClassUID) {
naturalizedName = 'RealWorldValueMapping';
} else if (sopClassDictionary.SurfaceScanMeshStorage === SOPClassUID) {
naturalizedName = 'SurfaceScanMesh';
} else if (sopClassDictionary.SurfaceScanPointCloudStorage === SOPClassUID) {
naturalizedName = 'SurfaceScanPointCloud';
} else if (
sopClassDictionary.StereometricRelationshipStorage === SOPClassUID
) {
naturalizedName = 'StereometricRelationship';
} else if (sopClassDictionary.LensometryMeasurementsStorage === SOPClassUID) {
naturalizedName = 'LensometryMeasurements';
} else if (
sopClassDictionary.AutorefractionMeasurementsStorage === SOPClassUID
) {
naturalizedName = 'AutorefractionMeasurements';
} else if (
sopClassDictionary.KeratometryMeasurementsStorage === SOPClassUID
) {
naturalizedName = 'KeratometryMeasurements';
} else if (
sopClassDictionary.SubjectiveRefractionMeasurementsStorage === SOPClassUID
) {
naturalizedName = 'SubjectiveRefractionMeasurements';
} else if (
sopClassDictionary.VisualAcuityMeasurementsStorage === SOPClassUID
) {
naturalizedName = 'VisualAcuityMeasurements';
} else if (
sopClassDictionary.SpectaclePrescriptionReportStorage === SOPClassUID
) {
naturalizedName = 'SpectaclePrescriptionReport';
} else if (
sopClassDictionary.OphthalmicAxialMeasurementsStorage === SOPClassUID
) {
naturalizedName = 'OphthalmicAxialMeasurements';
} else if (
sopClassDictionary.IntraocularLensCalculationsStorage === SOPClassUID
) {
naturalizedName = 'IntraocularLensCalculations';
} else if (
sopClassDictionary.MacularGridThicknessandVolumeReport === SOPClassUID
) {
naturalizedName = 'MacularGridThicknessandVolume';
} else if (
sopClassDictionary.OphthalmicVisualFieldStaticPerimetryMeasurementsStorage ===
SOPClassUID
) {
naturalizedName = 'OphthalmicVisualFieldStaticPerimetryMeasurements';
} else if (sopClassDictionary.OphthalmicThicknessMapStorage === SOPClassUID) {
naturalizedName = 'OphthalmicThicknessMap';
} else if (sopClassDictionary.CornealTopographyMapStorage === SOPClassUID) {
naturalizedName = 'CornealTopographyMap';
} else if (sopClassDictionary.BasicTextSR === SOPClassUID) {
naturalizedName = 'BasicTextSR';
} else if (sopClassDictionary.EnhancedSR === SOPClassUID) {
naturalizedName = 'EnhancedSR';
} else if (sopClassDictionary.ComprehensiveSR === SOPClassUID) {
naturalizedName = 'ComprehensiveSR';
} else if (sopClassDictionary.Comprehensive3DSR === SOPClassUID) {
naturalizedName = 'Comprehensive3DSR';
} else if (sopClassDictionary.ProcedureLog === SOPClassUID) {
naturalizedName = 'ProcedureLog';
} else if (sopClassDictionary.MammographyCADSR === SOPClassUID) {
naturalizedName = 'MammographyCADSR';
} else if (sopClassDictionary.KeyObjectSelection === SOPClassUID) {
naturalizedName = 'KeyObject';
} else if (sopClassDictionary.ChestCADSR === SOPClassUID) {
naturalizedName = 'ChestCADSR';
} else if (sopClassDictionary.XRayRadiationDoseSR === SOPClassUID) {
naturalizedName = 'XRayRadiationDoseSR';
} else if (
sopClassDictionary.RadiopharmaceuticalRadiationDoseSR === SOPClassUID
) {
naturalizedName = 'RadiopharmaceuticalRadiationDoseSR';
} else if (sopClassDictionary.ColonCADSR === SOPClassUID) {
naturalizedName = 'ColonCADSR';
} else if (
sopClassDictionary.ImplantationPlanSRDocumentStorage === SOPClassUID
) {
naturalizedName = 'ImplantationPlanSRDocument';
} else if (sopClassDictionary.EncapsulatedPDFStorage === SOPClassUID) {
naturalizedName = 'EncapsulatedPDF';
} else if (sopClassDictionary.EncapsulatedCDAStorage === SOPClassUID) {
naturalizedName = 'EncapsulatedCDA';
} else if (sopClassDictionary.BasicStructuredDisplayStorage === SOPClassUID) {
naturalizedName = 'BasicStructuredDisplay';
} else if (sopClassDictionary.RTDoseStorage === SOPClassUID) {
naturalizedName = 'RTDose';
} else if (sopClassDictionary.RTStructureSetStorage === SOPClassUID) {
naturalizedName = 'RTStructureSet';
} else if (sopClassDictionary.RTBeamsTreatmentRecordStorage === SOPClassUID) {
naturalizedName = 'RTBeamsTreatmentRecord';
} else if (sopClassDictionary.RTPlanStorage === SOPClassUID) {
naturalizedName = 'RTPlan';
} else if (
sopClassDictionary.RTBrachyTreatmentRecordStorage === SOPClassUID
) {
naturalizedName = 'RTBrachyTreatmentRecord';
} else if (
sopClassDictionary.RTTreatmentSummaryRecordStorage === SOPClassUID
) {
naturalizedName = 'RTTreatmentSummaryRecord';
} else if (sopClassDictionary.RTIonPlanStorage === SOPClassUID) {
naturalizedName = 'RTIonPlan';
} else if (
sopClassDictionary.RTIonBeamsTreatmentRecordStorage === SOPClassUID
) {
naturalizedName = 'RTIonBeamsTreatmentRecord';
} else if (
sopClassDictionary.RTBeamsDeliveryInstructionStorage === SOPClassUID
) {
naturalizedName = 'RTBeamsDeliveryInstruction';
} else if (sopClassDictionary.GenericImplantTemplateStorage === SOPClassUID) {
naturalizedName = 'GenericImplantTemplate';
} else if (
sopClassDictionary.ImplantAssemblyTemplateStorage === SOPClassUID
) {
naturalizedName = 'ImplantAssemblyTemplate';
} else if (sopClassDictionary.ImplantTemplateGroupStorage === SOPClassUID) {
naturalizedName = 'ImplantTemplateGroup';
}
return naturalizedName;
};
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.10.8](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.10.7...@ohif/ui@1.10.8) (2022-04-06)
**Note:** Version bump only for package @ohif/ui
## [1.10.7](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.10.6...@ohif/ui@1.10.7) (2022-03-14)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/ui",
"version": "1.10.7",
"version": "1.10.8",
"description": "A set of React components for Medical Imaging Viewers",
"author": "OHIF Contributors",
"license": "MIT",
@@ -177,7 +177,9 @@ function Thumbnail(props) {
const { progressId, progressData } = detail;
if (`StackProgress:${displaySetInstanceUID}` === progressId) {
const percent = progressData ? progressData.percentComplete : 0;
setStackPercentComplete(percent);
if (percent > stackPercentComplete) {
setStackPercentComplete(percent);
}
}
}, 100);
@@ -25,7 +25,8 @@
box-shadow: inset 0 0 0 1px var(--ui-border-color-dark);
border: 2px solid transparent;
border-radius: 12px;
height: 135px;
min-height: 135px;
max-height: 250px;
margin: 0 auto;
padding: 5px;
position: relative;
@@ -36,6 +37,11 @@
h1
text-align: center
color: var(--text-primary-color);
max-width: 200px;
max-height: 250px;
overflow-wrap: break-word;
word-wrap: break-word;
hyphens: auto;
.series-details
display: flex;
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [4.12.26](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.25...@ohif/viewer@4.12.26) (2022-04-22)
**Note:** Version bump only for package @ohif/viewer
## [4.12.25](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.24...@ohif/viewer@4.12.25) (2022-04-06)
**Note:** Version bump only for package @ohif/viewer
## [4.12.24](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.23...@ohif/viewer@4.12.24) (2022-04-05)
**Note:** Version bump only for package @ohif/viewer
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/viewer",
"version": "4.12.24",
"version": "4.12.26",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
"license": "MIT",
@@ -47,7 +47,7 @@
},
"dependencies": {
"@babel/runtime": "^7.5.5",
"@ohif/core": "^2.16.16",
"@ohif/core": "^2.16.18",
"@ohif/extension-cornerstone": "^2.12.10",
"@ohif/extension-debugging": "^0.3.2",
"@ohif/extension-dicom-html": "^1.3.21",
@@ -56,9 +56,9 @@
"@ohif/extension-dicom-rt": "^0.7.11",
"@ohif/extension-dicom-segmentation": "^0.7.11",
"@ohif/extension-lesion-tracker": "^0.2.1",
"@ohif/extension-vtk": "^1.12.21",
"@ohif/extension-vtk": "^1.12.23",
"@ohif/i18n": "^0.53.0",
"@ohif/ui": "^1.10.7",
"@ohif/ui": "^1.10.8",
"@tanem/react-nprogress": "^1.1.25",
"classnames": "^2.2.6",
"core-js": "^3.2.1",
+1
View File
@@ -30,6 +30,7 @@ window.config = {
},
],
},
// Extensions should be able to suggest default values for these?
// Or we can require that these be explicitly set
hotkeys: [
@@ -79,7 +79,7 @@ const mapDispatchToProps = (dispatch, ownProps) => {
});
}
if (displaySet.isModalitySupported === false) {
if (displaySet.isSOPClassUIDSupported === false) {
const error = new Error('Modality not supported');
const message = 'Modality not supported';
LoggerService.error({ error, message });
@@ -563,8 +563,8 @@ const _checkForSeriesInconsistencesWarnings = async function(displaySet) {
);
}
if (displaySet.isModalitySupported === false) {
inconsistencyWarnings.push('The datasets modality is not supported.');
if (displaySet.isSOPClassUIDSupported === false) {
inconsistencyWarnings.push('The datasets is not supported.');
}
displaySet.inconsistencyWarnings = inconsistencyWarnings;
} else {
@@ -668,6 +668,8 @@ const _mapStudiesToThumbnails = function(studies, activeDisplaySetInstanceUID) {
} else if (displaySet.images && displaySet.images.length) {
const imageIndex = Math.floor(displaySet.images.length / 2);
imageId = displaySet.images[imageIndex].getImageId();
} else if (displaySet.isSOPClassUIDSupported === false) {
altImageText = displaySet.SOPClassUIDNaturalized;
} else {
altImageText = displaySet.Modality ? displaySet.Modality : 'UN';
}
@@ -190,7 +190,7 @@ class ViewerMain extends Component {
}
}
if (displaySet.isModalitySupported === false) {
if (displaySet.isSOPClassUIDSupported === false) {
const error = new Error('Modality not supported');
const message = 'Modality not supported';
LoggerService.error({ error, message });