fix(bugs): and replace seriesInstanceUID and seriesInstanceUIDs URL with seriesInstanceUIDs (#4049)
This commit is contained in:
1 parent
058da93863
commit
da7c1a5d8c
19 files changed
+173
-118
No files matched your search
@@ -1314,19 +1314,18 @@ export default class HangingProtocolService extends PubSubService {
|
||||
);
|
||||
|
||||
// Use the display set provided instead
|
||||
// Todo: find out what is wrong here
|
||||
// if (reuseDisplaySetUID) {
|
||||
// if (viewportOptions.allowUnmatchedView !== true) {
|
||||
// this.validateDisplaySetSelectMatch(viewportDisplaySet, id, reuseDisplaySetUID);
|
||||
// }
|
||||
// const displaySetInfo: HangingProtocol.DisplaySetInfo = {
|
||||
// displaySetInstanceUID: reuseDisplaySetUID,
|
||||
// displaySetOptions,
|
||||
// };
|
||||
if (reuseDisplaySetUID) {
|
||||
if (viewportOptions.allowUnmatchedView !== true) {
|
||||
this.validateDisplaySetSelectMatch(viewportDisplaySet, id, reuseDisplaySetUID);
|
||||
}
|
||||
const displaySetInfo: HangingProtocol.DisplaySetInfo = {
|
||||
displaySetInstanceUID: reuseDisplaySetUID,
|
||||
displaySetOptions,
|
||||
};
|
||||
|
||||
// displaySetsInfo.push(displaySetInfo);
|
||||
// return;
|
||||
// }
|
||||
displaySetsInfo.push(displaySetInfo);
|
||||
return;
|
||||
}
|
||||
|
||||
// Use the display set index to allow getting the "next" match, eg
|
||||
// matching all display sets, and get the matchedDisplaySetsIndex'th item
|
||||
|
||||
+10
-9
@@ -13,15 +13,16 @@ const isDisplaySetFromUrl = (displaySet): boolean => {
|
||||
if (!initialSeriesInstanceUID && !initialSOPInstanceUID) {
|
||||
return false;
|
||||
}
|
||||
const isSeriesMatch =
|
||||
!initialSeriesInstanceUID ||
|
||||
initialSeriesInstanceUID.some(seriesUID => displaySet.SeriesInstanceUID === seriesUID);
|
||||
const isSopMatch =
|
||||
!initialSOPInstanceUID ||
|
||||
displaySet.instances?.some?.(instance =>
|
||||
initialSOPInstanceUID.some(sopUID => sopUID === instance.SOPInstanceUID)
|
||||
);
|
||||
return isSeriesMatch && isSopMatch;
|
||||
|
||||
const isSeriesMatch = initialSeriesInstanceUID?.some(
|
||||
seriesUID => displaySet.SeriesInstanceUID === seriesUID
|
||||
);
|
||||
|
||||
const isSopMatch = initialSOPInstanceUID?.some(sopUID =>
|
||||
displaySet.instances?.some(instance => sopUID === instance.SOPInstanceUID)
|
||||
);
|
||||
|
||||
return isSeriesMatch || isSopMatch;
|
||||
};
|
||||
|
||||
/** Returns the index location of the requested image, or the defaultValue in this.
|
||||
|
||||
@@ -28,7 +28,6 @@ export default function getPixelSpacingInformation(instance) {
|
||||
PixelSpacingCalibrationType,
|
||||
PixelSpacingCalibrationDescription,
|
||||
EstimatedRadiographicMagnificationFactor,
|
||||
SequenceOfUltrasoundRegions,
|
||||
} = instance;
|
||||
const isProjection = projectionRadiographSOPClassUIDs.includes(SOPClassUID);
|
||||
|
||||
@@ -90,21 +89,6 @@ export default function getPixelSpacingInformation(instance) {
|
||||
PixelSpacing: CorrectedImagerPixelSpacing,
|
||||
isProjection,
|
||||
};
|
||||
} else if (SequenceOfUltrasoundRegions && typeof SequenceOfUltrasoundRegions === 'object') {
|
||||
const { PhysicalDeltaX, PhysicalDeltaY } = SequenceOfUltrasoundRegions;
|
||||
const USPixelSpacing = [PhysicalDeltaX * 10, PhysicalDeltaY * 10];
|
||||
|
||||
return {
|
||||
PixelSpacing: USPixelSpacing,
|
||||
};
|
||||
} else if (
|
||||
SequenceOfUltrasoundRegions &&
|
||||
Array.isArray(SequenceOfUltrasoundRegions) &&
|
||||
SequenceOfUltrasoundRegions.length > 1
|
||||
) {
|
||||
log.warn(
|
||||
'Sequence of Ultrasound Regions > one entry. This is not yet implemented, all measurements will be shown in pixels.'
|
||||
);
|
||||
} else if (isProjection === false && !ImagerPixelSpacing) {
|
||||
// If only Pixel Spacing is present, and this is not a projection radiograph,
|
||||
// we can stop here
|
||||
|
||||
Reference in new issue
Block a user