Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
850de2903a | ||
|
|
f26ed5539b | ||
|
|
21aeaa63c7 | ||
|
|
2ac0d3f017 | ||
|
|
efdbe8e7b4 | ||
|
|
67b70eaa98 | ||
|
|
5150ed9427 | ||
|
|
1bcb0acf9f | ||
|
|
5d6cf2a609 | ||
|
|
9f813e0ea0 |
No files matched your search
@@ -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.12.13](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.12.12...@ohif/extension-cornerstone@2.12.13) (2022-06-30)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.12.12](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.12.11...@ohif/extension-cornerstone@2.12.12) (2022-06-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.12.11](https://github.com/OHIF/Viewers/compare/@ohif/extension-cornerstone@2.12.10...@ohif/extension-cornerstone@2.12.11) (2022-06-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-cornerstone
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-cornerstone",
|
||||
"version": "2.12.11",
|
||||
"version": "2.12.13",
|
||||
"description": "OHIF extension for Cornerstone",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -237,7 +237,7 @@ class OHIFCornerstoneViewport extends Component {
|
||||
}
|
||||
};
|
||||
|
||||
const warningsOverlay = props => {
|
||||
const overlay = props => {
|
||||
const displaySet = this.props.viewportData.displaySet;
|
||||
let filteredSRLabels;
|
||||
if (displaySet.SRLabels && displaySet.SRLabels.length !== 0) {
|
||||
@@ -264,7 +264,7 @@ class OHIFCornerstoneViewport extends Component {
|
||||
imageIdIndex={currentImageIdIndex}
|
||||
onNewImageDebounced={newImageHandler}
|
||||
onNewImageDebounceTime={300}
|
||||
viewportOverlayComponent={warningsOverlay}
|
||||
viewportOverlayComponent={overlay}
|
||||
stackPrefetch={this.props.stackPrefetch}
|
||||
isStackPrefetchEnabled={this.props.isStackPrefetchEnabled}
|
||||
// ~~ Connected (From REDUX)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
}
|
||||
.OHIFCornerstoneViewportOverlay .bottom-left3 {
|
||||
bottom: 110px;
|
||||
left: 100px;
|
||||
left: -20px;
|
||||
}
|
||||
.OHIFCornerstoneViewportOverlay .bottom-right {
|
||||
bottom: 20px;
|
||||
|
||||
@@ -18,19 +18,13 @@ import { Tooltip } from '@ohif/ui/src/components/tooltip';
|
||||
import { OverlayTrigger } from '@ohif/ui/src/components/overlayTrigger';
|
||||
|
||||
const Button = styled.button`
|
||||
background-color: #3f51b5;
|
||||
color: white;
|
||||
padding: 5px 15px;
|
||||
padding: 2px 7px;
|
||||
border-radius: 10px;
|
||||
outline: 0;
|
||||
text-transform: lowercase;
|
||||
margin: 5px 5px;
|
||||
text-transform: none;
|
||||
margin: 2px 2px;
|
||||
cursor: pointer;
|
||||
box-shadow: 0px 2px 2px lightgray;
|
||||
transition: ease background-color 250ms;
|
||||
&:hover {
|
||||
background-color: #283593;
|
||||
}
|
||||
&:disabled {
|
||||
cursor: default;
|
||||
opacity: 0.9;
|
||||
@@ -51,7 +45,7 @@ class OHIFCornerstoneViewportOverlay extends PureComponent {
|
||||
imageId: PropTypes.string.isRequired,
|
||||
imageIndex: PropTypes.number.isRequired,
|
||||
stackSize: PropTypes.number.isRequired,
|
||||
inconsistencyWarnings: PropTypes.array.isRequired,
|
||||
inconsistencyWarnings: PropTypes.array,
|
||||
SRLabels: PropTypes.array,
|
||||
};
|
||||
|
||||
@@ -152,34 +146,48 @@ class OHIFCornerstoneViewportOverlay extends PureComponent {
|
||||
|
||||
const SRLabelsOn = SRLabels && SRLabels.length !== 0 ? true : false;
|
||||
|
||||
/**/
|
||||
|
||||
const getSRLabelsContent = SRLabels => {
|
||||
if (Array.isArray(SRLabels)) {
|
||||
const listedSRLabels = SRLabels.map((SRLabel, index) => {
|
||||
const color = SRLabel.labels.color;
|
||||
return (
|
||||
<OverlayTrigger
|
||||
key={index}
|
||||
placement="top"
|
||||
overlay={
|
||||
<Tooltip
|
||||
placement="top"
|
||||
className="in tooltip-warning"
|
||||
id="tooltip-top"
|
||||
>
|
||||
<div className="warningTitle"> Designators </div>
|
||||
<div className="warningContent">
|
||||
{SRLabel.labels.labelCodingSchemeDesignator +
|
||||
' : ' +
|
||||
SRLabel.labels.valueCodingSchemeDesignator}
|
||||
</div>
|
||||
</Tooltip>
|
||||
}
|
||||
>
|
||||
<div style={{ display: 'inline-block' }}>
|
||||
<Button disabled={true} key={index}>
|
||||
{SRLabel.labels.label + ' : ' + SRLabel.labels.value}
|
||||
</Button>
|
||||
</div>
|
||||
</OverlayTrigger>
|
||||
SRLabel.labels.visible && (
|
||||
<OverlayTrigger
|
||||
key={index}
|
||||
placement="top"
|
||||
overlay={
|
||||
<Tooltip
|
||||
placement="top"
|
||||
className="in tooltip-warning"
|
||||
id="tooltip-top"
|
||||
>
|
||||
<div className="warningTitle">
|
||||
{' '}
|
||||
Coding scheme designators{' '}
|
||||
</div>
|
||||
<div className="warningContent">
|
||||
{SRLabel.labels.labelCodingSchemeDesignator +
|
||||
' : ' +
|
||||
SRLabel.labels.valueCodingSchemeDesignator}
|
||||
</div>
|
||||
</Tooltip>
|
||||
}
|
||||
>
|
||||
<div style={{ display: 'inline-block' }}>
|
||||
<Button
|
||||
style={{
|
||||
backgroundColor: color,
|
||||
}}
|
||||
disabled={true}
|
||||
key={index}
|
||||
>
|
||||
{SRLabel.labels.label + ' : ' + SRLabel.labels.value}
|
||||
</Button>
|
||||
</div>
|
||||
</OverlayTrigger>
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
|
||||
@@ -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.3.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-debugging@0.3.2...@ohif/extension-debugging@0.3.3) (2022-06-30)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-debugging
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.3.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-debugging@0.3.1...@ohif/extension-debugging@0.3.2) (2022-03-10)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-debugging
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-debugging",
|
||||
"version": "0.3.2",
|
||||
"version": "0.3.3",
|
||||
"description": "OHIF extension for debugging.",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -89,10 +89,10 @@ const DubugReportModal = ({
|
||||
|
||||
Object.keys(viewportSpecificData).forEach(viewportIndex => {
|
||||
const displaySet = viewportSpecificData[viewportIndex];
|
||||
const [
|
||||
referencedDisplaySetsRef,
|
||||
referencedDisplaySetsCount,
|
||||
] = _getReferencedSeriesInstanceUIDsString(displaySet, 'SEG');
|
||||
const [referencedDisplaySetsRef] = _getReferencedSeriesInstanceUIDsString(
|
||||
displaySet,
|
||||
'SEG'
|
||||
);
|
||||
|
||||
const [row, column] = _viewportIndexToViewportPosition(
|
||||
viewportIndex,
|
||||
@@ -106,10 +106,27 @@ const DubugReportModal = ({
|
||||
|
||||
Object.keys(viewportSpecificData).forEach(viewportIndex => {
|
||||
const displaySet = viewportSpecificData[viewportIndex];
|
||||
const [
|
||||
referencedDisplaySetsRef,
|
||||
referencedDisplaySetsCount,
|
||||
] = _getReferencedSeriesInstanceUIDsString(displaySet, 'RTSTRUCT');
|
||||
const [referencedDisplaySetsRef] = _getReferencedSeriesInstanceUIDsString(
|
||||
displaySet,
|
||||
'RTSTRUCT'
|
||||
);
|
||||
|
||||
const [row, column] = _viewportIndexToViewportPosition(
|
||||
viewportIndex,
|
||||
numColumns
|
||||
);
|
||||
|
||||
body += `[${row},${column}]\t${referencedDisplaySetsRef}\n`;
|
||||
});
|
||||
|
||||
body += '== ReferencedSRSeriesInstanceUIDs ==\n';
|
||||
|
||||
Object.keys(viewportSpecificData).forEach(viewportIndex => {
|
||||
const displaySet = viewportSpecificData[viewportIndex];
|
||||
const [referencedDisplaySetsRef] = _getReferencedSeriesInstanceUIDsString(
|
||||
displaySet,
|
||||
'SR'
|
||||
);
|
||||
|
||||
const [row, column] = _viewportIndexToViewportPosition(
|
||||
viewportIndex,
|
||||
@@ -261,11 +278,15 @@ const getLayout = viewports => {
|
||||
<tr>
|
||||
<th>ReferencedSEGSeriesInstanceUIDs</th>
|
||||
</tr>
|
||||
{getReferencedSEGSeriesInstanceUIDsPerRow(viewports)}
|
||||
{getReferencedSeriesInstanceUIDsPerRow(viewports, 'SEG')}
|
||||
<tr>
|
||||
<th>ReferencedRTSTRUCTSeriesInstanceUIDs</th>
|
||||
</tr>
|
||||
{getReferencedRTSTRUCTSeriesInstanceUIDsPerRow(viewports)}
|
||||
{getReferencedSeriesInstanceUIDsPerRow(viewports, 'RTSTRUCT')}
|
||||
<tr>
|
||||
<th>ReferencedSRSeriesInstanceUIDs</th>
|
||||
</tr>
|
||||
{getReferencedSeriesInstanceUIDsPerRow(viewports, 'SR')}
|
||||
</React.Fragment>
|
||||
);
|
||||
};
|
||||
@@ -351,7 +372,7 @@ const _getReferencedSeriesInstanceUIDsString = (displaySet, Modality) => {
|
||||
return [referencedDisplaySetsRef, referencedDisplaySetsCount];
|
||||
};
|
||||
|
||||
const getReferencedSEGSeriesInstanceUIDsPerRow = viewports => {
|
||||
const getReferencedSeriesInstanceUIDsPerRow = (viewports, Modality) => {
|
||||
const { viewportSpecificData, numColumns } = viewports;
|
||||
|
||||
// NOTE viewportSpecificData is actually an object with numerical keys.
|
||||
@@ -360,43 +381,7 @@ const getReferencedSEGSeriesInstanceUIDsPerRow = viewports => {
|
||||
const [
|
||||
referencedDisplaySetsRef,
|
||||
referencedDisplaySetsCount,
|
||||
] = _getReferencedSeriesInstanceUIDsString(displaySet, 'SEG');
|
||||
|
||||
const [row, column] = _viewportIndexToViewportPosition(
|
||||
viewportIndex,
|
||||
numColumns
|
||||
);
|
||||
|
||||
if (referencedDisplaySetsCount > 1) {
|
||||
return (
|
||||
<tr>
|
||||
<td>{`[${row},${column}]`}</td>
|
||||
<td className="debug-overflowText-border">
|
||||
{referencedDisplaySetsRef}
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<tr>
|
||||
<td>{`[${row},${column}]`}</td>
|
||||
<td className="debug-overflowText">{referencedDisplaySetsRef}</td>
|
||||
</tr>
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
const getReferencedRTSTRUCTSeriesInstanceUIDsPerRow = viewports => {
|
||||
const { viewportSpecificData, numColumns } = viewports;
|
||||
|
||||
// NOTE viewportSpecificData is actually an object with numerical keys.
|
||||
return Object.keys(viewportSpecificData).map(viewportIndex => {
|
||||
const displaySet = viewportSpecificData[viewportIndex];
|
||||
const [
|
||||
referencedDisplaySetsRef,
|
||||
referencedDisplaySetsCount,
|
||||
] = _getReferencedSeriesInstanceUIDsString(displaySet, 'RTSTRUCT');
|
||||
] = _getReferencedSeriesInstanceUIDsString(displaySet, Modality);
|
||||
|
||||
const [row, column] = _viewportIndexToViewportPosition(
|
||||
viewportIndex,
|
||||
|
||||
@@ -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.3.22](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.21...@ohif/extension-dicom-html@1.3.22) (2022-06-30)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-html
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.3.21](https://github.com/OHIF/Viewers/compare/@ohif/extension-dicom-html@1.3.20...@ohif/extension-dicom-html@1.3.21) (2022-04-05)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-dicom-html
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-dicom-html",
|
||||
"version": "1.3.21",
|
||||
"version": "1.3.22",
|
||||
"description": "OHIF extension for rendering structured reports to HTML",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { MODULE_TYPES, utils } from '@ohif/core';
|
||||
import { MODULE_TYPES, utils, metadata } from '@ohif/core';
|
||||
|
||||
// TODO: Should probably use dcmjs for this
|
||||
const SOP_CLASS_UIDS = {
|
||||
@@ -10,7 +10,7 @@ const SOP_CLASS_UIDS = {
|
||||
MAMMOGRAPHY_CAD_SR: '1.2.840.10008.5.1.4.1.1.88.50',
|
||||
CHEST_CAD_SR: '1.2.840.10008.5.1.4.1.1.88.65',
|
||||
X_RAY_RADIATION_DOSE_SR: '1.2.840.10008.5.1.4.1.1.88.67',
|
||||
ACQUISITION_CONTEXT_SR_STORAGE: '1.2.840.10008.5.1.4.1.1.88.71'
|
||||
ACQUISITION_CONTEXT_SR_STORAGE: '1.2.840.10008.5.1.4.1.1.88.71',
|
||||
};
|
||||
|
||||
const sopClassUIDs = Object.values(SOP_CLASS_UIDS);
|
||||
@@ -32,7 +32,7 @@ const OHIFDicomHtmlSopClassHandler = {
|
||||
SeriesTime,
|
||||
} = metadata;
|
||||
|
||||
return {
|
||||
const srDisplaySet = {
|
||||
plugin: 'html',
|
||||
Modality: 'SR',
|
||||
displaySetInstanceUID: utils.guid(),
|
||||
@@ -49,7 +49,15 @@ const OHIFDicomHtmlSopClassHandler = {
|
||||
authorizationHeaders,
|
||||
sopClassUids: sopClassUIDs,
|
||||
images: series._instances,
|
||||
isDerived: true,
|
||||
referencedDisplaySets: [],
|
||||
};
|
||||
|
||||
srDisplaySet.getSourceDisplaySet = function() {
|
||||
return srDisplaySet.referencedDisplaySets;
|
||||
};
|
||||
|
||||
return srDisplaySet;
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -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.2](https://github.com/OHIF/Viewers/compare/@ohif/extension-lesion-tracker@0.2.1...@ohif/extension-lesion-tracker@0.2.2) (2022-06-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-lesion-tracker
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [0.2.1](https://github.com/OHIF/Viewers/compare/@ohif/extension-lesion-tracker@0.2.0...@ohif/extension-lesion-tracker@0.2.1) (2020-09-03)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-lesion-tracker
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-lesion-tracker",
|
||||
"version": "0.2.1",
|
||||
"version": "0.2.2",
|
||||
"description": "OHIF extension for Lesion Tracker",
|
||||
"author": "OHIF",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -76,13 +76,13 @@ const additionalFindings = [
|
||||
|
||||
const currentCollections = [
|
||||
{
|
||||
selectorAction: () => { },
|
||||
selectorAction: () => {},
|
||||
maxMeasurements: 3,
|
||||
groupName: 'Measurements',
|
||||
measurements: measurements,
|
||||
},
|
||||
{
|
||||
selectorAction: () => { },
|
||||
selectorAction: () => {},
|
||||
groupName: 'Additional Findings',
|
||||
measurements: additionalFindings,
|
||||
},
|
||||
@@ -90,13 +90,13 @@ const currentCollections = [
|
||||
|
||||
const comparisonColletions = [
|
||||
{
|
||||
selectorAction: () => { },
|
||||
selectorAction: () => {},
|
||||
maxMeasurements: 3,
|
||||
groupName: 'Measurements',
|
||||
measurements: measurements,
|
||||
},
|
||||
{
|
||||
selectorAction: () => { },
|
||||
selectorAction: () => {},
|
||||
groupName: 'Additional Findings',
|
||||
measurements: additionalFindings,
|
||||
},
|
||||
@@ -128,7 +128,7 @@ const comparisonTimepoints = [
|
||||
{
|
||||
key: 'Comparison',
|
||||
date: '15-Jun-18',
|
||||
}
|
||||
},
|
||||
];
|
||||
|
||||
const MeasurementComparisonTable = () => {
|
||||
@@ -138,8 +138,8 @@ const MeasurementComparisonTable = () => {
|
||||
timepoints={comparisonTimepoints}
|
||||
overallWarnings={overallWarnings}
|
||||
measurementCollection={comparisonCollections}
|
||||
onRelabelClick={() => { }}
|
||||
onEditDescriptionClick={() => { }}
|
||||
onRelabelClick={() => {}}
|
||||
onEditDescriptionClick={() => {}}
|
||||
/>
|
||||
<div className="generate-report">
|
||||
<button className="btn btn-primary">Generate Report</button>
|
||||
|
||||
@@ -3,6 +3,38 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [1.12.28](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.27...@ohif/extension-vtk@1.12.28) (2022-08-24)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.12.27](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.26...@ohif/extension-vtk@1.12.27) (2022-06-30)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.12.26](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.25...@ohif/extension-vtk@1.12.26) (2022-06-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.12.25](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.24...@ohif/extension-vtk@1.12.25) (2022-06-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.12.24](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.12.23...@ohif/extension-vtk@1.12.24) (2022-06-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/extension-vtk
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/extension-vtk",
|
||||
"version": "1.12.24",
|
||||
"version": "1.12.28",
|
||||
"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.19",
|
||||
"@ohif/ui": "^1.10.8",
|
||||
"@ohif/core": "^2.16.23",
|
||||
"@ohif/ui": "^1.10.10",
|
||||
"cornerstone-tools": "^6.0.6",
|
||||
"cornerstone-wado-image-loader": "^4.1.0",
|
||||
"dicom-parser": "^1.8.11",
|
||||
|
||||
@@ -3,6 +3,41 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [2.16.23](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.22...@ohif/core@2.16.23) (2022-08-24)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.16.22](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.21...@ohif/core@2.16.22) (2022-06-30)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.16.21](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.20...@ohif/core@2.16.21) (2022-06-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.16.20](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.19...@ohif/core@2.16.20) (2022-06-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Re IDC2797, fix double parsing of SR qualitative annotations ([#2830](https://github.com/OHIF/Viewers/issues/2830)) ([9f813e0](https://github.com/OHIF/Viewers/commit/9f813e0ea08f0aada8efab9ef6228ad90dd1758d))
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [2.16.19](https://github.com/OHIF/Viewers/compare/@ohif/core@2.16.18...@ohif/core@2.16.19) (2022-06-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/core
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/core",
|
||||
"version": "2.16.19",
|
||||
"version": "2.16.23",
|
||||
"description": "Generic business logic for web-based medical imaging applications",
|
||||
"author": "OHIF Core Team",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -8,6 +8,17 @@ const parseSCOORD3D = ({ servicesManager, displaySets }) => {
|
||||
const { MeasurementService } = servicesManager.services;
|
||||
|
||||
const srDisplaySets = displaySets.filter(ds => ds.Modality === 'SR');
|
||||
const imageDisplaySets = displaySets.filter(
|
||||
ds =>
|
||||
ds.Modality !== 'SR' &&
|
||||
ds.Modality !== 'SEG' &&
|
||||
ds.Modality !== 'RTSTRUCT' &&
|
||||
ds.Modality !== 'RTDOSE'
|
||||
);
|
||||
|
||||
imageDisplaySets.forEach(imageDisplaySet => {
|
||||
imageDisplaySet.SRLabels = [];
|
||||
});
|
||||
|
||||
srDisplaySets.forEach(srDisplaySet => {
|
||||
const firstInstance = srDisplaySet.metadata;
|
||||
@@ -28,13 +39,6 @@ const parseSCOORD3D = ({ servicesManager, displaySets }) => {
|
||||
srDisplaySet.isRehydratable = isRehydratable(srDisplaySet, mappings);
|
||||
srDisplaySet.isLoaded = true;
|
||||
|
||||
const imageDisplaySets = displaySets.filter(
|
||||
ds =>
|
||||
ds.Modality !== 'SR' &&
|
||||
ds.Modality !== 'SEG' &&
|
||||
ds.Modality !== 'RTSTRUCT' &&
|
||||
ds.Modality !== 'RTDOSE'
|
||||
);
|
||||
imageDisplaySets.forEach(imageDisplaySet => {
|
||||
// Check currently added displaySets and add measurements if the sources exist.
|
||||
checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, imageDisplaySet);
|
||||
@@ -127,11 +131,10 @@ const checkIfCanAddMeasurementsToDisplaySet = (
|
||||
|
||||
const imageIds = images.map(i => i.getImageId());
|
||||
const SOPInstanceUIDs = images.map(i => i.SOPInstanceUID);
|
||||
imageDisplaySet.SRLabels = [];
|
||||
const colors = new Map();
|
||||
measurements.forEach(measurement => {
|
||||
const { coords } = measurement;
|
||||
|
||||
coords.forEach(coord => {
|
||||
coords.forEach((coord, index) => {
|
||||
if (coord.ReferencedSOPSequence !== undefined) {
|
||||
const imageIndex = SOPInstanceUIDs.findIndex(
|
||||
SOPInstanceUID =>
|
||||
@@ -139,29 +142,50 @@ const checkIfCanAddMeasurementsToDisplaySet = (
|
||||
coord.ReferencedSOPSequence.ReferencedSOPInstanceUID
|
||||
);
|
||||
if (imageIndex > -1) {
|
||||
if (!srDisplaySet.referencedDisplaySets.includes(imageDisplaySet)) {
|
||||
srDisplaySet.referencedDisplaySets.push(imageDisplaySet);
|
||||
}
|
||||
|
||||
const imageId = imageIds[imageIndex];
|
||||
const imageMetadata = images[imageIndex].getData().metadata;
|
||||
|
||||
const coords = measurement.coords;
|
||||
for (let i = 0; i < coords.length; i++) {
|
||||
const coord = coords[i];
|
||||
if (coord.GraphicType !== 'TEXT') {
|
||||
continue;
|
||||
if (coord.GraphicType === 'TEXT') {
|
||||
const key =
|
||||
measurement.labels[index].label + measurement.labels[index].value;
|
||||
let color = colors.get(key);
|
||||
if (!color) {
|
||||
// random dark color
|
||||
color =
|
||||
'hsla(' + Math.floor(Math.random() * 360) + ', 70%, 30%, 1)';
|
||||
colors.set(key, color);
|
||||
}
|
||||
|
||||
measurement.labels[index].color = color;
|
||||
measurement.isSRText = true;
|
||||
measurement.labels[index].visible = true;
|
||||
|
||||
imageDisplaySet.SRLabels.push({
|
||||
ReferencedSOPInstanceUID:
|
||||
coord.ReferencedSOPSequence.ReferencedSOPInstanceUID,
|
||||
labels: measurement.labels[i],
|
||||
labels: measurement.labels[index],
|
||||
});
|
||||
}
|
||||
|
||||
addMeasurement(
|
||||
measurement,
|
||||
imageId,
|
||||
imageMetadata,
|
||||
imageDisplaySet.displaySetInstanceUID
|
||||
);
|
||||
if (index === 0) {
|
||||
addMeasurement(
|
||||
measurement,
|
||||
imageId,
|
||||
imageMetadata,
|
||||
imageDisplaySet.displaySetInstanceUID
|
||||
);
|
||||
}
|
||||
} else {
|
||||
addMeasurement(
|
||||
measurement,
|
||||
imageId,
|
||||
imageMetadata,
|
||||
imageDisplaySet.displaySetInstanceUID
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -26,8 +26,10 @@ export default function addMeasurement(
|
||||
|
||||
const measurementData = {
|
||||
TrackingUniqueIdentifier: measurement.TrackingUniqueIdentifier,
|
||||
TrackingIdentifier: measurement.TrackingIdentifier,
|
||||
renderableData: {},
|
||||
labels: measurement.labels,
|
||||
isSRText: measurement.isSRText,
|
||||
};
|
||||
|
||||
measurement.coords.forEach(coord => {
|
||||
|
||||
@@ -350,6 +350,19 @@ class StudyMetadata extends Metadata {
|
||||
referencedSeriesInstanceUID
|
||||
);
|
||||
} else {
|
||||
const filteredReferencedDisplaySets = displaySet.referencedDisplaySets.filter(
|
||||
referencedDisplaySet =>
|
||||
referencedDisplaySet.SeriesInstanceUID ===
|
||||
referencedSeriesInstanceUID
|
||||
);
|
||||
|
||||
if (
|
||||
filteredReferencedDisplaySets &&
|
||||
filteredReferencedDisplaySets.length !== 0
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,8 @@ export const dicomSRDisplayTool = {
|
||||
options: {
|
||||
measurementTable: {
|
||||
displayFunction: data => {
|
||||
return `(SR) ${data.lesionNamingNumber ||
|
||||
return `(SR) ${data.TrackingIdentifier ||
|
||||
data.lesionNamingNumber ||
|
||||
data.measurementNumber ||
|
||||
data.text ||
|
||||
''}`;
|
||||
|
||||
@@ -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.10.10](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.10.9...@ohif/ui@1.10.10) (2022-08-24)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [1.10.9](https://github.com/OHIF/Viewers/compare/@ohif/ui@1.10.8...@ohif/ui@1.10.9) (2022-06-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/ui
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [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,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/ui",
|
||||
"version": "1.10.8",
|
||||
"version": "1.10.10",
|
||||
"description": "A set of React components for Medical Imaging Viewers",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
|
||||
@@ -9,6 +9,14 @@ import { TableListItem } from './../tableList/TableListItem.js';
|
||||
|
||||
import './MeasurementTableItem.styl';
|
||||
|
||||
const ColoredCircle = ({ color }) => {
|
||||
return <div className="item-color" style={{ backgroundColor: color }}></div>;
|
||||
};
|
||||
|
||||
ColoredCircle.propTypes = {
|
||||
color: PropTypes.string.isRequired,
|
||||
};
|
||||
|
||||
class MeasurementTableItem extends Component {
|
||||
static propTypes = {
|
||||
measurementData: PropTypes.object.isRequired,
|
||||
@@ -21,6 +29,14 @@ class MeasurementTableItem extends Component {
|
||||
t: PropTypes.func,
|
||||
};
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
collapsed: true,
|
||||
visible: true,
|
||||
};
|
||||
}
|
||||
|
||||
render() {
|
||||
const {
|
||||
warningTitle = '',
|
||||
@@ -93,27 +109,115 @@ class MeasurementTableItem extends Component {
|
||||
actionButtons.push(deleteButton);
|
||||
}
|
||||
|
||||
return (
|
||||
<TableListItem
|
||||
itemKey={this.props.measurementData.measurementNumber}
|
||||
itemClass={`measurementItem ${this.props.itemClass} ${hasWarningClass}`}
|
||||
itemIndex={this.props.itemIndex}
|
||||
onItemClick={this.onItemClick}
|
||||
>
|
||||
<div>
|
||||
<div className="measurementLocation">
|
||||
{this.props.t(this.props.measurementData.label, {
|
||||
keySeparator: '>',
|
||||
nsSeparator: '|',
|
||||
if (
|
||||
this.props.measurementData.isSRText === true &&
|
||||
this.props.measurementData.labels &&
|
||||
this.props.measurementData.labels.length > 0
|
||||
) {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<TableListItem
|
||||
key={this.props.measurementData.measurementNumber}
|
||||
itemKey={this.props.measurementData.measurementNumber}
|
||||
itemClass={`measurementItem ${this.props.itemClass} ${hasWarningClass}`}
|
||||
itemIndex={this.props.itemIndex}
|
||||
onItemClick={this.onItemClick}
|
||||
>
|
||||
<div>
|
||||
<div className="measurementLocation">
|
||||
{this.props.t(this.props.measurementData.label, {
|
||||
keySeparator: '>',
|
||||
nsSeparator: '|',
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
<div className="icons">
|
||||
<div className="displayTexts">{this.getDataDisplayText()}</div>
|
||||
<Icon
|
||||
className={`eye-icon`}
|
||||
name={this.state.visible ? 'eye' : 'eye-closed'}
|
||||
width="20px"
|
||||
height="20px"
|
||||
onClick={() => {
|
||||
this.props.measurementData.labels.forEach(label => {
|
||||
label.visible = !this.state.visible;
|
||||
});
|
||||
|
||||
this.setState({
|
||||
visible: !this.state.visible,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
<Icon
|
||||
className={`angle-double-${
|
||||
this.state.collapsed ? 'down' : 'up'
|
||||
}`}
|
||||
name={`angle-double-${this.state.collapsed ? 'down' : 'up'}`}
|
||||
width="20px"
|
||||
height="20px"
|
||||
onClick={() => {
|
||||
this.setState({
|
||||
collapsed: !this.state.collapsed,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</TableListItem>
|
||||
{this.state.collapsed &&
|
||||
this.props.measurementData.labels.map((SRLabel, index) => {
|
||||
return (
|
||||
<TableListItem
|
||||
key={index}
|
||||
itemKey={index}
|
||||
itemMeta={<ColoredCircle color={SRLabel.color} />}
|
||||
itemMetaClass="item-color-section"
|
||||
onItemClick={this.onItemClick}
|
||||
>
|
||||
<div>
|
||||
<div className="icons">
|
||||
<span style={{ width: '90px' }}>
|
||||
{SRLabel.label + ' : ' + SRLabel.value}
|
||||
</span>
|
||||
<Icon
|
||||
className={`eye-icon`}
|
||||
name={SRLabel.visible ? 'eye' : 'eye-closed'}
|
||||
width="20px"
|
||||
height="20px"
|
||||
onClick={() => {
|
||||
SRLabel.visible = !SRLabel.visible;
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</TableListItem>
|
||||
);
|
||||
})}
|
||||
</React.Fragment>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
<TableListItem
|
||||
key={this.props.measurementData.measurementNumber}
|
||||
itemKey={this.props.measurementData.measurementNumber}
|
||||
itemClass={`measurementItem ${this.props.itemClass} ${hasWarningClass}`}
|
||||
itemIndex={this.props.itemIndex}
|
||||
onItemClick={this.onItemClick}
|
||||
>
|
||||
<div>
|
||||
<div className="measurementLocation">
|
||||
{this.props.t(this.props.measurementData.label, {
|
||||
keySeparator: '>',
|
||||
nsSeparator: '|',
|
||||
})}
|
||||
</div>
|
||||
<div className="displayTexts">{this.getDataDisplayText()}</div>
|
||||
{!this.props.measurementData.isReadOnly && (
|
||||
<div className="rowActions">{actionButtons}</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="displayTexts">{this.getDataDisplayText()}</div>
|
||||
{!this.props.measurementData.isReadOnly && (
|
||||
<div className="rowActions">{actionButtons}</div>
|
||||
)}
|
||||
</div>
|
||||
</TableListItem>
|
||||
);
|
||||
</TableListItem>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
onItemClick = event => {
|
||||
|
||||
@@ -1,4 +1,16 @@
|
||||
.measurementItem
|
||||
.item-color-section
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
|
||||
.item-color
|
||||
margin-top: 8px;
|
||||
border-radius: 100%;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
|
||||
.rowActions
|
||||
margin-left: -1px;
|
||||
background-color: var(--ui-gray-darker)
|
||||
@@ -63,3 +75,16 @@
|
||||
width: 22px;
|
||||
height: 20px;
|
||||
pointer-events: inherit;
|
||||
|
||||
.icons
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border-radius: 5px;
|
||||
|
||||
.icons .eye-icon
|
||||
margin-left: 100px;
|
||||
margin-right: -5px;
|
||||
.icons .angle-double-down
|
||||
.icons .angle-double-up
|
||||
margin-left: 15px;
|
||||
margin-right: -5px;
|
||||
@@ -18,6 +18,7 @@ $headerRowHeight = 63px
|
||||
|
||||
.tableListHeaderTitle
|
||||
color: var(--text-secondary-color)
|
||||
max-width: 230px
|
||||
font-size: 22px
|
||||
font-weight: 300
|
||||
line-height: $headerRowHeight
|
||||
|
||||
@@ -12,16 +12,13 @@ export class TableListItem extends Component {
|
||||
itemIndex: PropTypes.number,
|
||||
itemMeta: PropTypes.node,
|
||||
itemMetaClass: PropTypes.string,
|
||||
itemKey: PropTypes.oneOfType([
|
||||
PropTypes.string,
|
||||
PropTypes.number,
|
||||
]),
|
||||
itemKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
||||
onItemClick: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
static defaultProps = {
|
||||
itemMeta: null,
|
||||
itemMetaClass: ''
|
||||
itemMetaClass: '',
|
||||
};
|
||||
|
||||
render() {
|
||||
|
||||
@@ -3,6 +3,46 @@
|
||||
All notable changes to this project will be documented in this file.
|
||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||
|
||||
## [4.12.32](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.31...@ohif/viewer@4.12.32) (2022-08-25)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.12.31](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.30...@ohif/viewer@4.12.31) (2022-08-24)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.12.30](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.29...@ohif/viewer@4.12.30) (2022-06-30)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.12.29](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.28...@ohif/viewer@4.12.29) (2022-06-29)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.12.28](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.27...@ohif/viewer@4.12.28) (2022-06-28)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## [4.12.27](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.12.26...@ohif/viewer@4.12.27) (2022-06-14)
|
||||
|
||||
**Note:** Version bump only for package @ohif/viewer
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@ohif/viewer",
|
||||
"version": "4.12.27",
|
||||
"version": "4.12.32",
|
||||
"description": "OHIF Viewer",
|
||||
"author": "OHIF Contributors",
|
||||
"license": "MIT",
|
||||
@@ -47,18 +47,18 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.5.5",
|
||||
"@ohif/core": "^2.16.19",
|
||||
"@ohif/extension-cornerstone": "^2.12.11",
|
||||
"@ohif/extension-debugging": "^0.3.2",
|
||||
"@ohif/extension-dicom-html": "^1.3.21",
|
||||
"@ohif/core": "^2.16.23",
|
||||
"@ohif/extension-cornerstone": "^2.12.13",
|
||||
"@ohif/extension-debugging": "^0.3.3",
|
||||
"@ohif/extension-dicom-html": "^1.3.22",
|
||||
"@ohif/extension-dicom-microscopy": "^0.52.0",
|
||||
"@ohif/extension-dicom-pdf": "^1.1.2",
|
||||
"@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.24",
|
||||
"@ohif/extension-lesion-tracker": "^0.2.2",
|
||||
"@ohif/extension-vtk": "^1.12.28",
|
||||
"@ohif/i18n": "^0.53.0",
|
||||
"@ohif/ui": "^1.10.8",
|
||||
"@ohif/ui": "^1.10.10",
|
||||
"@tanem/react-nprogress": "^1.1.25",
|
||||
"classnames": "^2.2.6",
|
||||
"core-js": "^3.2.1",
|
||||
|
||||
@@ -122,6 +122,7 @@ function convertMeasurementsToTableData(toolCollections, timepoints) {
|
||||
|
||||
Object.keys(toolCollections).forEach(toolId => {
|
||||
const toolMeasurements = toolCollections[toolId];
|
||||
|
||||
const tool = tools.find(tool => tool.id === toolId);
|
||||
const { displayFunction } = tool.options.measurementTable;
|
||||
|
||||
@@ -131,12 +132,13 @@ function convertMeasurementsToTableData(toolCollections, timepoints) {
|
||||
Object.keys(groupedMeasurements).forEach(groupedMeasurementsIndex => {
|
||||
const measurementNumberList =
|
||||
groupedMeasurements[groupedMeasurementsIndex];
|
||||
|
||||
const measurementData = measurementNumberList[0];
|
||||
const {
|
||||
measurementNumber,
|
||||
lesionNamingNumber,
|
||||
toolType,
|
||||
isReadOnly
|
||||
isReadOnly,
|
||||
} = measurementData;
|
||||
const measurementId = measurementData._id;
|
||||
|
||||
@@ -150,6 +152,8 @@ function convertMeasurementsToTableData(toolCollections, timepoints) {
|
||||
const tableMeasurement = {
|
||||
itemNumber: lesionNamingNumber,
|
||||
label: getMeasurementText(measurementData),
|
||||
labels: measurementData.labels,
|
||||
isSRText: measurementData.isSRText,
|
||||
measurementId,
|
||||
measurementNumber,
|
||||
lesionNamingNumber,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { measurements, utils } from '@ohif/core';
|
||||
|
||||
import { servicesManager } from './../../App.js';
|
||||
const { MeasurementApi } = measurements;
|
||||
const { studyMetadataManager } = utils;
|
||||
|
||||
@@ -19,6 +19,25 @@ export default function jumpToRowItem(
|
||||
timepointManagerState,
|
||||
options = { invertViewportTimepointsOrder: false, childToolKey: null }
|
||||
) {
|
||||
const viewports = viewportsState.layout.viewports;
|
||||
const activeViewportIndex = viewportsState.activeViewportIndex;
|
||||
const activeViewport = viewports[activeViewportIndex];
|
||||
if (activeViewport.vtk) {
|
||||
const error = new Error('Measurements are not supported by the MPR mode.');
|
||||
const { UINotificationService, LoggerService } = servicesManager.services;
|
||||
LoggerService.error({ error, message: error.message });
|
||||
UINotificationService.show({
|
||||
title: 'Measurements panel',
|
||||
message: error.message,
|
||||
type: 'warning',
|
||||
autoClose: true,
|
||||
});
|
||||
return {
|
||||
viewportSpecificData: [],
|
||||
layout: [], // TODO: if we need to change layout, we should return this here
|
||||
};
|
||||
}
|
||||
|
||||
const numViewports = viewportsState.layout.viewports.length;
|
||||
const numTimepoints = timepointManagerState.timepoints.length;
|
||||
const { measurements, timepoints } = timepointManagerState;
|
||||
|
||||
@@ -48,7 +48,7 @@ const mapDispatchToProps = (dispatch, ownProps) => {
|
||||
);
|
||||
document.dispatchEvent(selectionFired);
|
||||
});
|
||||
} else {
|
||||
} else if (Modality !== 'SR') {
|
||||
displaySet = displaySet.getSourceDisplaySet(ownProps.studyMetadata);
|
||||
}
|
||||
|
||||
|
||||
@@ -262,7 +262,11 @@ class Viewer extends Component {
|
||||
const { currentTimepointId } = this;
|
||||
|
||||
this.timepointApi.retrieveTimepoints({ PatientID });
|
||||
this.measurementApi.retrieveMeasurements(PatientID, [currentTimepointId]);
|
||||
this.measurementApi
|
||||
.retrieveMeasurements(PatientID, [currentTimepointId])
|
||||
.then(() => {
|
||||
this._updateThumbnails();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -608,9 +612,30 @@ const _isDisplaySetActive = function(
|
||||
if (
|
||||
displaySet.Modality !== 'SEG' &&
|
||||
displaySet.Modality !== 'RTSTRUCT' &&
|
||||
displaySet.Modality !== 'RTDOSE'
|
||||
displaySet.Modality !== 'RTDOSE' &&
|
||||
displaySet.Modality !== 'SR'
|
||||
) {
|
||||
active = activeDisplaySetInstanceUID === displaySetInstanceUID;
|
||||
} else if (displaySet.Modality === 'SR') {
|
||||
active = activeDisplaySetInstanceUID === displaySetInstanceUID;
|
||||
|
||||
if (!active && displaySet.getSourceDisplaySet) {
|
||||
const referencedDisplaySet = displaySet.getSourceDisplaySet(
|
||||
studies,
|
||||
false
|
||||
);
|
||||
if (referencedDisplaySet && referencedDisplaySet.length !== 0) {
|
||||
for (let i = 0; i < referencedDisplaySet.length; i++) {
|
||||
if (
|
||||
referencedDisplaySet[i].displaySetInstanceUID ===
|
||||
activeDisplaySetInstanceUID
|
||||
) {
|
||||
active = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (displaySet.getSourceDisplaySet) {
|
||||
if (displaySet.Modality === 'SEG') {
|
||||
const { referencedDisplaySet } = displaySet.getSourceDisplaySet(
|
||||
@@ -661,10 +686,9 @@ const _mapStudiesToThumbnails = function(studies, activeDisplaySetInstanceUID) {
|
||||
let altImageText;
|
||||
|
||||
if (displaySet.Modality && displaySet.Modality === 'SEG') {
|
||||
// TODO: We want to replace this with a thumbnail showing
|
||||
// the segmentation map on the image, but this is easier
|
||||
// and better than what we have right now.
|
||||
altImageText = 'SEG';
|
||||
} else if (displaySet.Modality && displaySet.Modality === 'SR') {
|
||||
altImageText = 'SR';
|
||||
} else if (displaySet.images && displaySet.images.length) {
|
||||
const imageIndex = Math.floor(displaySet.images.length / 2);
|
||||
imageId = displaySet.images[imageIndex].getImageId();
|
||||
|
||||
@@ -173,7 +173,7 @@ class ViewerMain extends Component {
|
||||
);
|
||||
document.dispatchEvent(selectionFired);
|
||||
});
|
||||
} else {
|
||||
} else if (Modality !== 'SR') {
|
||||
displaySet = displaySet.getSourceDisplaySet(this.props.studies);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user