fix(segmentation): Add segment jump for new segments and make panels scrollable (#4928)

This commit is contained in:
Alireza authored and GitHub committed 2025-04-07 16:45:29 -04:00
1 parent a8ac297e16
commit 3653de7487
23 files changed
+491 -368

No files matched your search

@@ -277,6 +277,11 @@ class SegmentationService extends PubSubService {
): Promise<void> {
const segmentation = this.getSegmentation(segmentationId);
const csViewport = this.getAndValidateViewport(viewportId);
if (!csViewport) {
return;
}
const colorLUTIndex = this._segmentationIdToColorLUTIndexMap.get(segmentationId);
const defaultRepresentationType = csToolsEnums.SegmentationRepresentations.Labelmap;
@@ -1251,7 +1256,8 @@ class SegmentationService extends PubSubService {
const csViewport =
this.servicesManager.services.cornerstoneViewportService.getCornerstoneViewport(viewportId);
if (!csViewport) {
throw new Error(`Viewport with id ${viewportId} not found.`);
console.warn(`Viewport with id ${viewportId} not found.`);
return null;
}
return csViewport;
}
@@ -1766,6 +1772,12 @@ class SegmentationService extends PubSubService {
const { center } = cachedStats;
if (!center) {
return {
world: cachedStats.namedStats.center.value,
};
}
return center;
}