feat(rt): allow rendering of points in RT Struct (#4128)

This commit is contained in:
Ibrahim authored and GitHub committed 2024-05-21 17:23:18 -04:00
1 parent ebe39cb8e6
commit 5903b0749a
6 files changed
+60 -8

No files matched your search

@@ -24,7 +24,9 @@ const tools = {
},
{ toolName: toolNames.StackScrollMouseWheel, bindings: [] },
],
enabled: [{ toolName: toolNames.SegmentationDisplay }],
enabled: [{ toolName: toolNames.SegmentationDisplay }, { toolName: toolNames.PlanarFreehandContourSegmentation, configuration: {
displayOnePointAsCrosshairs: true,
}}],
};
function getCustomizationModule() {
+5 -1
View File
@@ -249,7 +249,11 @@ export default async function init({
element.addEventListener(EVENTS.CAMERA_RESET, evt => {
const { element } = evt.detail;
const { viewportId } = getEnabledElement(element);
const enabledElement = getEnabledElement(element);
if (!enabledElement) {
return;
}
const { viewportId } = enabledElement;
commandsManager.runCommand('resetCrosshairs', { viewportId });
});
@@ -33,6 +33,7 @@ import {
AdvancedMagnifyTool,
UltrasoundDirectionalTool,
PlanarFreehandROITool,
PlanarFreehandContourSegmentationTool,
SplineROITool,
LivewireContourTool,
OrientationMarkerTool,
@@ -83,6 +84,7 @@ export default function initCornerstoneTools(configuration = {}) {
addTool(SplineROITool);
addTool(LivewireContourTool);
addTool(OrientationMarkerTool);
addTool(PlanarFreehandContourSegmentationTool);
// Modify annotation tools to use dashed lines on SR
const annotationStyle = {
@@ -136,6 +138,7 @@ const toolNames = {
LivewireContour: LivewireContourTool.toolName,
PlanarFreehandROI: PlanarFreehandROITool.toolName,
OrientationMarker: OrientationMarkerTool.toolName,
PlanarFreehandContourSegmentation: PlanarFreehandContourSegmentationTool.toolName,
};
export { toolNames };
@@ -128,7 +128,9 @@ const CornerstoneViewportDownloadForm = ({
// for some reason we need a reset camera here, and I don't know why
downloadViewport.resetCamera();
const presentation = activeViewport.getViewPresentation();
downloadViewport.setView(activeViewport.getViewReference(), presentation);
if (downloadViewport.setView) {
downloadViewport.setView(activeViewport.getViewReference(), presentation);
}
downloadViewport.render();
}
);