Re #2852 IDC: fix parsing of qualitative slice annotation (#2888)

This commit is contained in:
Davide Punzo 2022-08-24 12:37:21 +02:00 committed by GitHub
parent efdbe8e7b4
commit 2ac0d3f017
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 9 deletions

View File

@ -8,6 +8,17 @@ const parseSCOORD3D = ({ servicesManager, displaySets }) => {
const { MeasurementService } = servicesManager.services; const { MeasurementService } = servicesManager.services;
const srDisplaySets = displaySets.filter(ds => ds.Modality === 'SR'); 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 => { srDisplaySets.forEach(srDisplaySet => {
const firstInstance = srDisplaySet.metadata; const firstInstance = srDisplaySet.metadata;
@ -28,13 +39,6 @@ const parseSCOORD3D = ({ servicesManager, displaySets }) => {
srDisplaySet.isRehydratable = isRehydratable(srDisplaySet, mappings); srDisplaySet.isRehydratable = isRehydratable(srDisplaySet, mappings);
srDisplaySet.isLoaded = true; srDisplaySet.isLoaded = true;
const imageDisplaySets = displaySets.filter(
ds =>
ds.Modality !== 'SR' &&
ds.Modality !== 'SEG' &&
ds.Modality !== 'RTSTRUCT' &&
ds.Modality !== 'RTDOSE'
);
imageDisplaySets.forEach(imageDisplaySet => { imageDisplaySets.forEach(imageDisplaySet => {
// Check currently added displaySets and add measurements if the sources exist. // Check currently added displaySets and add measurements if the sources exist.
checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, imageDisplaySet); checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, imageDisplaySet);
@ -127,7 +131,6 @@ const checkIfCanAddMeasurementsToDisplaySet = (
const imageIds = images.map(i => i.getImageId()); const imageIds = images.map(i => i.getImageId());
const SOPInstanceUIDs = images.map(i => i.SOPInstanceUID); const SOPInstanceUIDs = images.map(i => i.SOPInstanceUID);
imageDisplaySet.SRLabels = [];
const colors = new Map(); const colors = new Map();
measurements.forEach(measurement => { measurements.forEach(measurement => {
const { coords } = measurement; const { coords } = measurement;

View File

@ -175,7 +175,9 @@ class MeasurementTableItem extends Component {
> >
<div> <div>
<div className="icons"> <div className="icons">
<span>{SRLabel.label + ' : ' + SRLabel.value}</span> <span style={{ width: '90px' }}>
{SRLabel.label + ' : ' + SRLabel.value}
</span>
<Icon <Icon
className={`eye-icon`} className={`eye-icon`}
name={SRLabel.visible ? 'eye' : 'eye-closed'} name={SRLabel.visible ? 'eye' : 'eye-closed'}

View File

@ -18,6 +18,7 @@ $headerRowHeight = 63px
.tableListHeaderTitle .tableListHeaderTitle
color: var(--text-secondary-color) color: var(--text-secondary-color)
max-width: 230px
font-size: 22px font-size: 22px
font-weight: 300 font-weight: 300
line-height: $headerRowHeight line-height: $headerRowHeight