fix(segmentation): Add segment jump for new segments and make panels scrollable (#4928)
This commit is contained in:
1 parent
a8ac297e16
commit
3653de7487
23 files changed
+491
-368
No files matched your search
@@ -38,7 +38,7 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.4",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.5",
|
||||
"@cornerstonejs/dicom-image-loader": "^3.8.5",
|
||||
"@cornerstonejs/dicom-image-loader": "^3.9.1",
|
||||
"@ohif/core": "3.10.0-beta.151",
|
||||
"@ohif/ui": "3.10.0-beta.151",
|
||||
"dcmjs": "*",
|
||||
@@ -51,12 +51,12 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/runtime": "^7.20.13",
|
||||
"@cornerstonejs/adapters": "^3.8.5",
|
||||
"@cornerstonejs/ai": "^3.8.5",
|
||||
"@cornerstonejs/core": "^3.8.5",
|
||||
"@cornerstonejs/labelmap-interpolation": "^3.8.5",
|
||||
"@cornerstonejs/polymorphic-segmentation": "^3.8.5",
|
||||
"@cornerstonejs/tools": "^3.8.5",
|
||||
"@cornerstonejs/adapters": "^3.9.1",
|
||||
"@cornerstonejs/ai": "^3.9.1",
|
||||
"@cornerstonejs/core": "^3.9.1",
|
||||
"@cornerstonejs/labelmap-interpolation": "^3.9.1",
|
||||
"@cornerstonejs/polymorphic-segmentation": "^3.9.1",
|
||||
"@cornerstonejs/tools": "^3.9.1",
|
||||
"@itk-wasm/morphological-contour-interpolation": "1.1.0",
|
||||
"@kitware/vtk.js": "32.12.0",
|
||||
"html2canvas": "^1.4.1",
|
||||
|
||||
@@ -31,6 +31,7 @@ export default function getSegmentationPanelCustomization({ commandsManager, ser
|
||||
peakLPS: 'Peak Coord',
|
||||
volume: 'Volume',
|
||||
lesionGlycolysis: 'Lesion Glycolysis',
|
||||
center: 'Center',
|
||||
},
|
||||
'segmentationToolbox.config': () => {
|
||||
// Get initial states based on current configuration
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user