Compare commits

..
Author SHA1 Message Date
ohif-bot 5b0b6301b9 chore(release): publish [skip ci]
- @ohif/extension-cornerstone@2.12.2
 - @ohif/extension-dicom-html@1.3.13
 - @ohif/extension-dicom-rt@0.7.3
 - @ohif/extension-dicom-segmentation@0.7.3
 - @ohif/extension-dicom-tag-browser@0.2.13
 - @ohif/extension-vtk@1.12.5
 - @ohif/core@2.16.1
 - @ohif/ui@1.10.4
 - @ohif/viewer@4.12.4
2021-10-26 08:23:03 +00:00
Igor OctavianoandDavide Punzo 03a34a75a1 Add checks for study metadata in rt and seg panels + bump dcmjs to fix circular references issues naturalizing datasets (#2588)
Co-authored-by: Davide Punzo <punzodavide@hotmail.it>
2021-10-26 10:19:12 +02:00
ohif-bot 729272a985 chore(release): publish [skip ci]
- @ohif/extension-dicom-html@1.3.12
 - @ohif/viewer@4.12.3
2021-10-25 15:11:00 +00:00
Bill Wallace 9194ec2404 fix(OHIF):The header depth was too deep for display SR files. (#2594) 2021-10-25 17:08:10 +02:00
ohif-bot 52c95a1209 chore(release): publish [skip ci]
- @ohif/extension-vtk@1.12.4
 - @ohif/ui@1.10.3
 - @ohif/viewer@4.12.2
2021-10-15 11:37:07 +00:00
Davide Punzo 8903adaea7 Re #2571: thumbnail footer remove instance number and add link icon if any derived display set is present (#2582)
* Re #2571, thumbnail footer layout modifications: remove instance number and add link icon if any derived display set is present.
2021-10-15 13:29:36 +02:00
ohif-bot 9481e2a99e chore(release): publish [skip ci]
- @ohif/extension-dicom-rt@0.7.2
 - @ohif/extension-dicom-segmentation@0.7.2
 - @ohif/viewer@4.12.1
2021-10-06 21:01:00 +00:00
Igor Octaviano f783fd7650 Merge pull request #2575 from OHIF/fix/ohif-2570
OHIF-2570: Update badge number based on active ds
2021-10-06 17:53:07 -03:00
Igor Octaviano 79afee7615 Merge branch 'master' into fix/ohif-2570 2021-10-05 09:40:49 -03:00
igoroctaviano 073be065cf Update badge number based on active ds 2021-10-01 18:09:48 -03:00
26 changed files with 278 additions and 60 deletions

No files matched your search

+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.12.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.12.1...@ohif/extension-cornerstone@2.12.2) (2021-10-26)
**Note:** Version bump only for package @ohif/extension-cornerstone
## [2.12.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.12.0...@ohif/extension-cornerstone@2.12.1) (2021-09-28) ## [2.12.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.12.0...@ohif/extension-cornerstone@2.12.1) (2021-09-28)
**Note:** Version bump only for package @ohif/extension-cornerstone **Note:** Version bump only for package @ohif/extension-cornerstone
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ohif/extension-cornerstone", "name": "@ohif/extension-cornerstone",
"version": "2.12.1", "version": "2.12.2",
"description": "OHIF extension for Cornerstone", "description": "OHIF extension for Cornerstone",
"author": "OHIF", "author": "OHIF",
"license": "MIT", "license": "MIT",
@@ -36,7 +36,7 @@
"cornerstone-math": "^0.1.9", "cornerstone-math": "^0.1.9",
"cornerstone-tools": "^6.0.0", "cornerstone-tools": "^6.0.0",
"cornerstone-wado-image-loader": "^4.0.3", "cornerstone-wado-image-loader": "^4.0.3",
"dcmjs": "0.18.9", "dcmjs": "0.18.10",
"dicom-parser": "^1.8.9", "dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8", "hammerjs": "^2.0.8",
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.3.13](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.12...@ohif/extension-dicom-html@1.3.13) (2021-10-26)
**Note:** Version bump only for package @ohif/extension-dicom-html
## [1.3.12](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.11...@ohif/extension-dicom-html@1.3.12) (2021-10-25)
**Note:** Version bump only for package @ohif/extension-dicom-html
## [1.3.11](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.10...@ohif/extension-dicom-html@1.3.11) (2021-09-28) ## [1.3.11](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.10...@ohif/extension-dicom-html@1.3.11) (2021-09-28)
**Note:** Version bump only for package @ohif/extension-dicom-html **Note:** Version bump only for package @ohif/extension-dicom-html
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ohif/extension-dicom-html", "name": "@ohif/extension-dicom-html",
"version": "1.3.11", "version": "1.3.13",
"description": "OHIF extension for rendering structured reports to HTML", "description": "OHIF extension for rendering structured reports to HTML",
"author": "OHIF", "author": "OHIF",
"license": "MIT", "license": "MIT",
@@ -29,7 +29,7 @@
}, },
"peerDependencies": { "peerDependencies": {
"@ohif/core": "^0.50.0", "@ohif/core": "^0.50.0",
"dcmjs": "0.18.9", "dcmjs": "0.18.10",
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
"react": "^16.8.6", "react": "^16.8.6",
"react-dom": "^16.8.6" "react-dom": "^16.8.6"
@@ -160,7 +160,7 @@ const getContentSequence = (data, level = 1) => {
const root = []; const root = [];
if (header) { if (header) {
const HeaderDynamicLevel = `h${level}`; const HeaderDynamicLevel = `h${Math.min(level, 6)}`;
root.push(<HeaderDynamicLevel key={header}>{header}</HeaderDynamicLevel>); root.push(<HeaderDynamicLevel key={header}>{header}</HeaderDynamicLevel>);
} }
@@ -170,7 +170,7 @@ const getContentSequence = (data, level = 1) => {
if (key === '_meta') { if (key === '_meta') {
const HeaderDynamicLevel = `h3`; const HeaderDynamicLevel = `h3`;
root.push(<hr />); root.push(<hr key={root.length} />);
root.push( root.push(
<HeaderDynamicLevel key="Metadata"> <HeaderDynamicLevel key="Metadata">
DICOM File Meta Information DICOM File Meta Information
@@ -217,7 +217,7 @@ class DicomHtmlViewport extends Component {
}; };
componentDidMount() { componentDidMount() {
const dataSet = this.setContentFromByteArray(this.props.byteArray); this.setContentFromByteArray(this.props.byteArray);
} }
setContentFromByteArray(byteArray) { setContentFromByteArray(byteArray) {
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.7.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.7.2...@ohif/extension-dicom-rt@0.7.3) (2021-10-26)
**Note:** Version bump only for package @ohif/extension-dicom-rt
## [0.7.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.7.1...@ohif/extension-dicom-rt@0.7.2) (2021-10-06)
**Note:** Version bump only for package @ohif/extension-dicom-rt
## [0.7.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.7.0...@ohif/extension-dicom-rt@0.7.1) (2021-09-28) ## [0.7.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-rt@0.7.0...@ohif/extension-dicom-rt@0.7.1) (2021-09-28)
**Note:** Version bump only for package @ohif/extension-dicom-rt **Note:** Version bump only for package @ohif/extension-dicom-rt
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ohif/extension-dicom-rt", "name": "@ohif/extension-dicom-rt",
"version": "0.7.1", "version": "0.7.3",
"description": "OHIF extension for rendering DICOM RTSTRUCTs on top of cornerstone images.", "description": "OHIF extension for rendering DICOM RTSTRUCTs on top of cornerstone images.",
"author": "OHIF", "author": "OHIF",
"license": "MIT", "license": "MIT",
@@ -31,7 +31,7 @@
"@ohif/core": "^0.50.0", "@ohif/core": "^0.50.0",
"cornerstone-core": "^2.5.0", "cornerstone-core": "^2.5.0",
"cornerstone-tools": "^6.0.0", "cornerstone-tools": "^6.0.0",
"dcmjs": "0.18.9", "dcmjs": "0.18.10",
"gl-matrix": "^3.3.0", "gl-matrix": "^3.3.0",
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
"react": "^16.8.6", "react": "^16.8.6",
+7 -8
View File
@@ -91,17 +91,12 @@ export default {
} }
if (activeViewport) { if (activeViewport) {
const study = studies.find(
s => s.StudyInstanceUID === activeViewport.StudyInstanceUID
);
const ds = study.displaySets.find(
ds =>
ds.displaySetInstanceUID ===
activeViewport.displaySetInstanceUID
);
const studyMetadata = studyMetadataManager.get( const studyMetadata = studyMetadataManager.get(
activeViewport.StudyInstanceUID activeViewport.StudyInstanceUID
); );
if (!studyMetadata) {
return;
}
const referencedDisplaySets = studyMetadata.getDerivedDatasets({ const referencedDisplaySets = studyMetadata.getDerivedDatasets({
referencedSeriesInstanceUID: activeViewport.SeriesInstanceUID, referencedSeriesInstanceUID: activeViewport.SeriesInstanceUID,
Modality: 'RTSTRUCT', Modality: 'RTSTRUCT',
@@ -112,6 +107,10 @@ export default {
['RTSTRUCT'].includes(ds.Modality) ['RTSTRUCT'].includes(ds.Modality)
) )
) { ) {
triggerRTPanelUpdatedEvent({
badgeNumber: referencedDisplaySets.length,
target: 'rt-panel',
});
return false; return false;
} }
} }
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.7.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.7.2...@ohif/extension-dicom-segmentation@0.7.3) (2021-10-26)
**Note:** Version bump only for package @ohif/extension-dicom-segmentation
## [0.7.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.7.1...@ohif/extension-dicom-segmentation@0.7.2) (2021-10-06)
**Note:** Version bump only for package @ohif/extension-dicom-segmentation
## [0.7.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.7.0...@ohif/extension-dicom-segmentation@0.7.1) (2021-09-28) ## [0.7.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-segmentation@0.7.0...@ohif/extension-dicom-segmentation@0.7.1) (2021-09-28)
**Note:** Version bump only for package @ohif/extension-dicom-segmentation **Note:** Version bump only for package @ohif/extension-dicom-segmentation
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ohif/extension-dicom-segmentation", "name": "@ohif/extension-dicom-segmentation",
"version": "0.7.1", "version": "0.7.3",
"description": "OHIF extension for viewing segmentations in the 2D MPR view", "description": "OHIF extension for viewing segmentations in the 2D MPR view",
"author": "OHIF", "author": "OHIF",
"license": "MIT", "license": "MIT",
@@ -31,7 +31,7 @@
"@ohif/core": "^0.50.0", "@ohif/core": "^0.50.0",
"cornerstone-core": "^2.5.0", "cornerstone-core": "^2.5.0",
"cornerstone-tools": "^6.0.0", "cornerstone-tools": "^6.0.0",
"dcmjs": "0.18.9", "dcmjs": "0.18.10",
"prop-types": "^15.6.2", "prop-types": "^15.6.2",
"react": "^16.8.6", "react": "^16.8.6",
"react-dom": "^16.8.6" "react-dom": "^16.8.6"
+18 -1
View File
@@ -126,7 +126,7 @@ export default {
label: 'Segmentations', label: 'Segmentations',
target: 'segmentation-panel', target: 'segmentation-panel',
stateEvent: SegmentationPanelTabUpdatedEvent, stateEvent: SegmentationPanelTabUpdatedEvent,
isDisabled: studies => { isDisabled: (studies, activeViewport) => {
if (!studies) { if (!studies) {
return true; return true;
} }
@@ -139,6 +139,23 @@ export default {
const series = study.series[j]; const series = study.series[j];
if (series.Modality === 'SEG') { if (series.Modality === 'SEG') {
if (activeViewport) {
const studyMetadata = studyMetadataManager.get(
activeViewport.StudyInstanceUID
);
if (!studyMetadata) {
return;
}
const referencedDS = studyMetadata.getDerivedDatasets({
referencedSeriesInstanceUID:
activeViewport.SeriesInstanceUID,
Modality: 'SEG',
});
triggerSegmentationPanelTabUpdatedEvent({
badgeNumber: referencedDS.length,
target: 'segmentation-panel',
});
}
return false; return false;
} }
} }
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.2.13](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.12...@ohif/extension-dicom-tag-browser@0.2.13) (2021-10-26)
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser
## [0.2.12](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.11...@ohif/extension-dicom-tag-browser@0.2.12) (2021-09-28) ## [0.2.12](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-tag-browser@0.2.11...@ohif/extension-dicom-tag-browser@0.2.12) (2021-09-28)
**Note:** Version bump only for package @ohif/extension-dicom-tag-browser **Note:** Version bump only for package @ohif/extension-dicom-tag-browser
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ohif/extension-dicom-tag-browser", "name": "@ohif/extension-dicom-tag-browser",
"version": "0.2.12", "version": "0.2.13",
"description": "OHIF extension for checking DICOM headers.", "description": "OHIF extension for checking DICOM headers.",
"author": "OHIF", "author": "OHIF",
"license": "MIT", "license": "MIT",
@@ -28,7 +28,7 @@
}, },
"peerDependencies": { "peerDependencies": {
"@ohif/core": "^2.6.0", "@ohif/core": "^2.6.0",
"dcmjs": "0.18.9", "dcmjs": "0.18.10",
"react": "^16.8.6" "react": "^16.8.6"
}, },
"dependencies": { "dependencies": {
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.12.5](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.4...@ohif/extension-vtk@1.12.5) (2021-10-26)
**Note:** Version bump only for package @ohif/extension-vtk
## [1.12.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.3...@ohif/extension-vtk@1.12.4) (2021-10-15)
**Note:** Version bump only for package @ohif/extension-vtk
## [1.12.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.2...@ohif/extension-vtk@1.12.3) (2021-10-04) ## [1.12.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.2...@ohif/extension-vtk@1.12.3) (2021-10-04)
**Note:** Version bump only for package @ohif/extension-vtk **Note:** Version bump only for package @ohif/extension-vtk
+4 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ohif/extension-vtk", "name": "@ohif/extension-vtk",
"version": "1.12.3", "version": "1.12.5",
"description": "OHIF extension for VTK.js", "description": "OHIF extension for VTK.js",
"author": "OHIF", "author": "OHIF",
"license": "MIT", "license": "MIT",
@@ -35,7 +35,7 @@
"cornerstone-core": "^2.5.0", "cornerstone-core": "^2.5.0",
"cornerstone-tools": "^6.0.0", "cornerstone-tools": "^6.0.0",
"cornerstone-wado-image-loader": "^4.0.3", "cornerstone-wado-image-loader": "^4.0.3",
"dcmjs": "0.18.9", "dcmjs": "0.18.10",
"dicom-parser": "^1.8.9", "dicom-parser": "^1.8.9",
"i18next": "^17.0.3", "i18next": "^17.0.3",
"i18next-browser-languagedetector": "^3.0.1", "i18next-browser-languagedetector": "^3.0.1",
@@ -53,8 +53,8 @@
"react-vtkjs-viewport": "^0.14.4" "react-vtkjs-viewport": "^0.14.4"
}, },
"devDependencies": { "devDependencies": {
"@ohif/core": "^2.16.0", "@ohif/core": "^2.16.1",
"@ohif/ui": "^1.10.2", "@ohif/ui": "^1.10.4",
"cornerstone-tools": "^6.0.0", "cornerstone-tools": "^6.0.0",
"cornerstone-wado-image-loader": "^4.0.3", "cornerstone-wado-image-loader": "^4.0.3",
"dicom-parser": "^1.8.9", "dicom-parser": "^1.8.9",
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.16.1](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.0...@ohif/core@2.16.1) (2021-10-26)
**Note:** Version bump only for package @ohif/core
# [2.16.0](https://github.com/OHIF/Viewers/compare/@ohif/core@2.15.1...@ohif/core@2.16.0) (2021-10-04) # [2.16.0](https://github.com/OHIF/Viewers/compare/@ohif/core@2.15.1...@ohif/core@2.16.0) (2021-10-04)
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ohif/core", "name": "@ohif/core",
"version": "2.16.0", "version": "2.16.1",
"description": "Generic business logic for web-based medical imaging applications", "description": "Generic business logic for web-based medical imaging applications",
"author": "OHIF Core Team", "author": "OHIF Core Team",
"license": "MIT", "license": "MIT",
@@ -39,7 +39,7 @@
"dependencies": { "dependencies": {
"@babel/runtime": "^7.5.5", "@babel/runtime": "^7.5.5",
"ajv": "^6.10.0", "ajv": "^6.10.0",
"dcmjs": "0.18.9", "dcmjs": "0.18.10",
"dicomweb-client": "^0.8.1", "dicomweb-client": "^0.8.1",
"immer": "6.0.2", "immer": "6.0.2",
"isomorphic-base64": "^1.0.2", "isomorphic-base64": "^1.0.2",
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.10.4](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.10.3...@ohif/ui@1.10.4) (2021-10-26)
**Note:** Version bump only for package @ohif/ui
## [1.10.3](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.10.2...@ohif/ui@1.10.3) (2021-10-15)
**Note:** Version bump only for package @ohif/ui
## [1.10.2](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.10.1...@ohif/ui@1.10.2) (2021-09-24) ## [1.10.2](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.10.1...@ohif/ui@1.10.2) (2021-09-24)
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ohif/ui", "name": "@ohif/ui",
"version": "1.10.2", "version": "1.10.4",
"description": "A set of React components for Medical Imaging Viewers", "description": "A set of React components for Medical Imaging Viewers",
"author": "OHIF Contributors", "author": "OHIF Contributors",
"license": "MIT", "license": "MIT",
@@ -25,11 +25,12 @@ function StudyBrowser(props) {
altImageText, altImageText,
displaySetInstanceUID, displaySetInstanceUID,
imageId, imageId,
InstanceNumber, derivedDisplaySetsNumber,
numImageFrames, numImageFrames,
SeriesDescription, SeriesDescription,
SeriesNumber, SeriesNumber,
hasWarnings, hasWarnings,
hasDerivedDisplaySets,
} = thumb; } = thumb;
return ( return (
@@ -48,12 +49,13 @@ function StudyBrowser(props) {
// Thumb // Thumb
altImageText={altImageText} altImageText={altImageText}
imageId={imageId} imageId={imageId}
InstanceNumber={InstanceNumber} derivedDisplaySetsNumber={derivedDisplaySetsNumber}
displaySetInstanceUID={displaySetInstanceUID} // used by drop displaySetInstanceUID={displaySetInstanceUID} // used by drop
numImageFrames={numImageFrames} numImageFrames={numImageFrames}
SeriesDescription={SeriesDescription} SeriesDescription={SeriesDescription}
SeriesNumber={SeriesNumber} SeriesNumber={SeriesNumber}
hasWarnings={hasWarnings} hasWarnings={hasWarnings}
hasDerivedDisplaySets={hasDerivedDisplaySets}
// Events // Events
onClick={onThumbnailClick.bind( onClick={onThumbnailClick.bind(
undefined, undefined,
@@ -83,7 +85,7 @@ StudyBrowser.propTypes = {
altImageText: PropTypes.string, altImageText: PropTypes.string,
displaySetInstanceUID: PropTypes.string.isRequired, displaySetInstanceUID: PropTypes.string.isRequired,
imageId: PropTypes.string, imageId: PropTypes.string,
InstanceNumber: PropTypes.number, derivedDisplaySetsNumber: PropTypes.number,
numImageFrames: PropTypes.number, numImageFrames: PropTypes.number,
SeriesDescription: PropTypes.string, SeriesDescription: PropTypes.string,
SeriesNumber: PropTypes.number, SeriesNumber: PropTypes.number,
@@ -15,11 +15,12 @@ const StudyLoadingListener = classes.StudyLoadingListener;
function ThumbnailFooter({ function ThumbnailFooter({
SeriesDescription, SeriesDescription,
SeriesNumber, SeriesNumber,
InstanceNumber,
numImageFrames, numImageFrames,
hasWarnings, hasWarnings,
hasDerivedDisplaySets,
}) { }) {
const [inconsistencyWarnings, inconsistencyWarningsSet] = useState([]); const [inconsistencyWarnings, inconsistencyWarningsSet] = useState([]);
const [derivedDisplaySetsActive, derivedDisplaySetsActiveSet] = useState([]);
useEffect(() => { useEffect(() => {
let unmounted = false; let unmounted = false;
@@ -28,10 +29,15 @@ function ThumbnailFooter({
inconsistencyWarningsSet(response); inconsistencyWarningsSet(response);
} }
}); });
hasDerivedDisplaySets.then(response => {
if (!unmounted) {
derivedDisplaySetsActiveSet(response);
}
});
return () => { return () => {
unmounted = true; unmounted = true;
}; };
}, [hasWarnings]); }, [hasWarnings, hasDerivedDisplaySets]);
const infoOnly = !SeriesDescription; const infoOnly = !SeriesDescription;
@@ -88,20 +94,47 @@ function ThumbnailFooter({
</React.Fragment> </React.Fragment>
); );
}; };
const getDerivedInfo = derivedDisplaySetsActive => {
return (
<React.Fragment>
{derivedDisplaySetsActive ? (
<div className="derived">
<Icon name="link" />
</div>
) : (
<React.Fragment></React.Fragment>
)}
</React.Fragment>
);
};
const getSeriesInformation = ( const getSeriesInformation = (
SeriesNumber, SeriesNumber,
InstanceNumber,
numImageFrames, numImageFrames,
inconsistencyWarnings inconsistencyWarnings,
derivedDisplaySetsActive
) => { ) => {
if (!SeriesNumber && !InstanceNumber && !numImageFrames) { if (!SeriesNumber && !numImageFrames) {
return; return;
} }
const seriesInformation = ( const seriesInformation = (
<div className="series-information"> <div className="series-information">
{getInfo(SeriesNumber, 'S:')} <React.Fragment>
{getInfo(InstanceNumber, 'I:')} {SeriesNumber !== undefined ? (
{getInfo(numImageFrames, '', 'image-frames')} getInfo(SeriesNumber, 'S:')
) : (
<React.Fragment></React.Fragment>
)}
</React.Fragment>
<React.Fragment>
{numImageFrames !== undefined ? (
getInfo(numImageFrames, '', 'image-frames')
) : (
<React.Fragment></React.Fragment>
)}
</React.Fragment>
{getDerivedInfo(derivedDisplaySetsActive)}
{getWarningInfo(SeriesNumber, inconsistencyWarnings)} {getWarningInfo(SeriesNumber, inconsistencyWarnings)}
</div> </div>
); );
@@ -114,9 +147,9 @@ function ThumbnailFooter({
<div className="series-description">{SeriesDescription}</div> <div className="series-description">{SeriesDescription}</div>
{getSeriesInformation( {getSeriesInformation(
SeriesNumber, SeriesNumber,
InstanceNumber,
numImageFrames, numImageFrames,
inconsistencyWarnings inconsistencyWarnings,
derivedDisplaySetsActive
)} )}
</div> </div>
); );
@@ -130,11 +163,11 @@ function Thumbnail(props) {
displaySetInstanceUID, displaySetInstanceUID,
imageId, imageId,
imageSrc, imageSrc,
InstanceNumber,
numImageFrames, numImageFrames,
SeriesDescription, SeriesDescription,
SeriesNumber, SeriesNumber,
hasWarnings, hasWarnings,
hasDerivedDisplaySets,
StudyInstanceUID, StudyInstanceUID,
onClick, onClick,
onDoubleClick, onDoubleClick,
@@ -232,8 +265,8 @@ Thumbnail.propTypes = {
altImageText: PropTypes.string, altImageText: PropTypes.string,
SeriesDescription: PropTypes.string, SeriesDescription: PropTypes.string,
SeriesNumber: PropTypes.oneOfType([PropTypes.string, PropTypes.number]), SeriesNumber: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
InstanceNumber: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
hasWarnings: PropTypes.instanceOf(Promise), hasWarnings: PropTypes.instanceOf(Promise),
hasDerivedDisplaySets: PropTypes.instanceOf(Promise),
numImageFrames: PropTypes.number, numImageFrames: PropTypes.number,
onDoubleClick: PropTypes.func, onDoubleClick: PropTypes.func,
onClick: PropTypes.func, onClick: PropTypes.func,
@@ -41,7 +41,7 @@ const SnackbarProvider = ({ children, service }) => {
LogManager.subscribe(LogManager.EVENTS.OnLog, onLogHandler); LogManager.subscribe(LogManager.EVENTS.OnLog, onLogHandler);
return () => { return () => {
LogManager.subscribe(LogManager.EVENTS.OnLog, onLogHandler); LogManager.unsubscribe(LogManager.EVENTS.OnLog, onLogHandler);
}; };
}, [show]); }, [show]);
+32
View File
@@ -3,6 +3,38 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [4.12.4](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.3...@ohif/viewer@4.12.4) (2021-10-26)
**Note:** Version bump only for package @ohif/viewer
## [4.12.3](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.2...@ohif/viewer@4.12.3) (2021-10-25)
**Note:** Version bump only for package @ohif/viewer
## [4.12.2](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.1...@ohif/viewer@4.12.2) (2021-10-15)
**Note:** Version bump only for package @ohif/viewer
## [4.12.1](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.0...@ohif/viewer@4.12.1) (2021-10-06)
**Note:** Version bump only for package @ohif/viewer
# [4.12.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.11.2...@ohif/viewer@4.12.0) (2021-10-04) # [4.12.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.11.2...@ohif/viewer@4.12.0) (2021-10-04)
+9 -9
View File
@@ -1,6 +1,6 @@
{ {
"name": "@ohif/viewer", "name": "@ohif/viewer",
"version": "4.12.0", "version": "4.12.4",
"description": "OHIF Viewer", "description": "OHIF Viewer",
"author": "OHIF Contributors", "author": "OHIF Contributors",
"license": "MIT", "license": "MIT",
@@ -47,18 +47,18 @@
}, },
"dependencies": { "dependencies": {
"@babel/runtime": "^7.5.5", "@babel/runtime": "^7.5.5",
"@ohif/core": "^2.16.0", "@ohif/core": "^2.16.1",
"@ohif/extension-cornerstone": "^2.12.1", "@ohif/extension-cornerstone": "^2.12.2",
"@ohif/extension-debugging": "^0.3.0", "@ohif/extension-debugging": "^0.3.0",
"@ohif/extension-dicom-html": "^1.3.11", "@ohif/extension-dicom-html": "^1.3.13",
"@ohif/extension-dicom-microscopy": "^0.52.0", "@ohif/extension-dicom-microscopy": "^0.52.0",
"@ohif/extension-dicom-pdf": "^1.1.0", "@ohif/extension-dicom-pdf": "^1.1.0",
"@ohif/extension-dicom-rt": "^0.7.1", "@ohif/extension-dicom-rt": "^0.7.3",
"@ohif/extension-dicom-segmentation": "^0.7.1", "@ohif/extension-dicom-segmentation": "^0.7.3",
"@ohif/extension-lesion-tracker": "^0.2.1", "@ohif/extension-lesion-tracker": "^0.2.1",
"@ohif/extension-vtk": "^1.12.3", "@ohif/extension-vtk": "^1.12.5",
"@ohif/i18n": "^0.53.0", "@ohif/i18n": "^0.53.0",
"@ohif/ui": "^1.10.2", "@ohif/ui": "^1.10.4",
"@tanem/react-nprogress": "^1.1.25", "@tanem/react-nprogress": "^1.1.25",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"core-js": "^3.2.1", "core-js": "^3.2.1",
@@ -66,7 +66,7 @@
"cornerstone-math": "^0.1.9", "cornerstone-math": "^0.1.9",
"cornerstone-tools": "^6.0.0", "cornerstone-tools": "^6.0.0",
"cornerstone-wado-image-loader": "^4.0.3", "cornerstone-wado-image-loader": "^4.0.3",
"dcmjs": "0.18.9", "dcmjs": "0.18.10",
"dicom-parser": "^1.8.9", "dicom-parser": "^1.8.9",
"dicomweb-client": "^0.8.1", "dicomweb-client": "^0.8.1",
"hammerjs": "^2.0.8", "hammerjs": "^2.0.8",
@@ -23,6 +23,8 @@ import './Viewer.css';
import StudyPrefetcher from '../components/StudyPrefetcher.js'; import StudyPrefetcher from '../components/StudyPrefetcher.js';
import StudyLoadingMonitor from '../components/StudyLoadingMonitor'; import StudyLoadingMonitor from '../components/StudyLoadingMonitor';
const { studyMetadataManager } = OHIF.utils;
class Viewer extends Component { class Viewer extends Component {
static propTypes = { static propTypes = {
studies: PropTypes.arrayOf( studies: PropTypes.arrayOf(
@@ -429,6 +431,31 @@ class Viewer extends Component {
export default withDialog(Viewer); export default withDialog(Viewer);
/**
* Async function to check if the displaySet has any derived one
*
* @param {*object} displaySet
* @param {*object} study
* @returns {bool}
*/
const _checkForDerivedDisplaySets = async function(displaySet, study) {
let derivedDisplaySetsNumber = 0;
if (
displaySet.Modality &&
!['SEG', 'SR', 'RTSTRUCT', 'RTDOSE'].includes(displaySet.Modality)
) {
const studyMetadata = studyMetadataManager.get(study.StudyInstanceUID);
const derivedDisplaySets = studyMetadata.getDerivedDatasets({
referencedSeriesInstanceUID: displaySet.SeriesInstanceUID,
});
derivedDisplaySetsNumber = derivedDisplaySets.length;
}
return derivedDisplaySetsNumber > 0;
};
/** /**
* Async function to check if there are any inconsistences in the series. * Async function to check if there are any inconsistences in the series.
* *
@@ -684,7 +711,6 @@ const _mapStudiesToThumbnails = function(studies, activeDisplaySetInstanceUID) {
const { const {
displaySetInstanceUID, displaySetInstanceUID,
SeriesDescription, SeriesDescription,
InstanceNumber,
numImageFrames, numImageFrames,
SeriesNumber, SeriesNumber,
} = displaySet; } = displaySet;
@@ -709,6 +735,11 @@ const _mapStudiesToThumbnails = function(studies, activeDisplaySetInstanceUID) {
studies studies
); );
const hasDerivedDisplaySets = _checkForDerivedDisplaySets(
displaySet,
study
);
return { return {
active: _isDisplaySetActive( active: _isDisplaySetActive(
displaySet, displaySet,
@@ -719,10 +750,10 @@ const _mapStudiesToThumbnails = function(studies, activeDisplaySetInstanceUID) {
altImageText, altImageText,
displaySetInstanceUID, displaySetInstanceUID,
SeriesDescription, SeriesDescription,
InstanceNumber,
numImageFrames, numImageFrames,
SeriesNumber, SeriesNumber,
hasWarnings, hasWarnings,
hasDerivedDisplaySets,
}; };
}); });
+4 -4
View File
@@ -6647,10 +6647,10 @@ dateformat@^3.0.0:
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae" resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q== integrity sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==
dcmjs@0.18.9: dcmjs@0.18.10:
version "0.18.9" version "0.18.10"
resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.18.9.tgz#0e18fcff975aaae8ca01a96e781fa75c29ec97f3" resolved "https://registry.yarnpkg.com/dcmjs/-/dcmjs-0.18.10.tgz#9e293a20dc359c7eba6c81b6afaf5a52fa841288"
integrity sha512-aTu4fUo3TSgohJC+U509qdXL1per09XvlYdQva0BGtIZMr/iR5n8h/ojpcDTRJoVtSuaj331KJj1yCj8FMMK4Q== integrity sha512-GLW1KJmzs+1ye8WA29wDy+cOHa4dYv2Q5XPQuX33X4bK5AqzS+56IzuCH+WkQXnvALZZDBFgbPztOVdUwnN4uw==
dependencies: dependencies:
"@babel/polyfill" "^7.8.3" "@babel/polyfill" "^7.8.3"
"@babel/runtime" "^7.8.4" "@babel/runtime" "^7.8.4"