fix(rt): jump to segment discards the configured width (#4799)
This commit is contained in:
1 parent
76da2d86a9
commit
afd528b8d7
2 files changed
+30
-13
No files matched your search
@@ -16,7 +16,7 @@ import {
|
||||
} from '@cornerstonejs/tools';
|
||||
import { PubSubService, Types as OHIFTypes } from '@ohif/core';
|
||||
import i18n from '@ohif/i18n';
|
||||
import { easeInOutBell, reverseEaseInOutBell } from '../../utils/transitions';
|
||||
import { easeInOutBell, easeInOutBellRelative } from '../../utils/transitions';
|
||||
import { mapROIContoursToRTStructData } from './RTSTRUCT/mapROIContoursToRTStructData';
|
||||
import { SegmentationRepresentations } from '@cornerstonejs/tools/enums';
|
||||
import { addColorLUT } from '@cornerstonejs/tools/segmentation/addColorLUT';
|
||||
@@ -1637,10 +1637,7 @@ class SegmentationService extends PubSubService {
|
||||
const startTime = performance.now();
|
||||
|
||||
const prevStyle = cstSegmentation.config.style.getStyle({
|
||||
viewportId,
|
||||
segmentationId,
|
||||
type: CONTOUR,
|
||||
segmentIndex,
|
||||
}) as ContourStyle;
|
||||
|
||||
const prevOutlineWidth = prevStyle.outlineWidth;
|
||||
@@ -1650,18 +1647,11 @@ class SegmentationService extends PubSubService {
|
||||
const animate = (currentTime: number) => {
|
||||
const progress = (currentTime - startTime) / animationLength;
|
||||
if (progress >= 1) {
|
||||
cstSegmentation.config.style.setStyle(
|
||||
{
|
||||
segmentationId,
|
||||
segmentIndex,
|
||||
type: CONTOUR,
|
||||
},
|
||||
{}
|
||||
);
|
||||
cstSegmentation.config.style.resetToGlobalStyle();
|
||||
return;
|
||||
}
|
||||
|
||||
const reversedProgress = reverseEaseInOutBell(progress, baseline);
|
||||
const reversedProgress = easeInOutBellRelative(progress, baseline, prevOutlineWidth);
|
||||
|
||||
cstSegmentation.config.style.setStyle(
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user