feat(4D): Add 4D dynamic volume rendering and new pre-clinical 4d pt/ct mode (#3664)

Co-authored-by: Alireza <ar.sedghi@gmail.com>
Co-authored-by: Neil <neil.a.macphee@gmail.com>
This commit is contained in:
authored and GitHub committed 2024-04-09 23:57:34 -04:00
1 parent dc0b183dd4
commit d57e8bc157
200 files changed
+9589 -2178

No files matched your search

@@ -1289,7 +1289,7 @@ class SegmentationService extends PubSubService {
}
const { colorLUTIndex } = segmentation;
this._removeSegmentationFromCornerstone(segmentationId);
const { updatedToolGroupIds } = this._removeSegmentationFromCornerstone(segmentationId);
// Delete associated colormap
// Todo: bring this back
@@ -1309,7 +1309,9 @@ class SegmentationService extends PubSubService {
if (remainingHydratedSegmentations.length) {
const { id } = remainingHydratedSegmentations[0];
this._setActiveSegmentationForToolGroup(id, this._getApplicableToolGroupId(), false);
updatedToolGroupIds.forEach(toolGroupId => {
this._setActiveSegmentationForToolGroup(id, toolGroupId, false);
});
}
}
@@ -1966,6 +1968,7 @@ class SegmentationService extends PubSubService {
const removeFromCache = true;
const segmentationState = cstSegmentation.state;
const sourceSegState = segmentationState.getSegmentation(segmentationId);
const updatedToolGroupIds: Set<string> = new Set();
if (!sourceSegState) {
return;
@@ -1981,6 +1984,7 @@ class SegmentationService extends PubSubService {
segmentationRepresentations.forEach(representation => {
if (representation.segmentationId === segmentationId) {
UIDsToRemove.push(representation.segmentationRepresentationUID);
updatedToolGroupIds.add(toolGroupId);
}
});
@@ -1998,6 +2002,8 @@ class SegmentationService extends PubSubService {
if (removeFromCache && cache.getVolumeLoadObject(segmentationId)) {
cache.removeVolumeLoadObject(segmentationId);
}
return { updatedToolGroupIds: Array.from(updatedToolGroupIds) };
}
private _updateCornerstoneSegmentations({ segmentationId, notYetUpdatedAtSource }) {