Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(windowLevelActionMenu) customization support for windowLevelActionMenu #4725

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ export function getWindowLevelActionMenu({
const colorbarProperties = customizationService.getCustomization('cornerstone.colorbar');
const { volumeRenderingPresets, volumeRenderingQualityRange } =
customizationService.getCustomization('cornerstone.3dVolumeRendering');
const windowLevelActionMenu = customizationService.getCustomization(
'cornerstone.windowLevelActionMenu'
);
const MenuComponent =
windowLevelActionMenu && windowLevelActionMenu.content
? windowLevelActionMenu.content
: WindowLevelActionMenu;
Devu-trenser marked this conversation as resolved.
Show resolved Hide resolved

const displaySetPresets = displaySets
.filter(displaySet => presets[displaySet.Modality])
Expand All @@ -36,7 +43,7 @@ export function getWindowLevelActionMenu({
}

return (
<WindowLevelActionMenu
<MenuComponent
viewportId={viewportId}
element={element}
presets={displaySetPresets}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import segDisplayEditingTrue from '../../../assets/img/segDisplayEditingTrue.png
import segDisplayEditingFalse from '../../../assets/img/segDisplayEditingFalse.png';
import thumbnailMenuItemsImage from '../../../assets/img/thumbnailMenuItemsImage.png';
import studyMenuItemsImage from '../../../assets/img/studyMenuItemsImage.png';
import windowLevelActionMenu from '../../../assets/img/windowLevelActionMenu.png';

export const viewportOverlayCustomizations = [
{
Expand Down Expand Up @@ -219,6 +220,26 @@ window.config = {
default: 'The CinePlayer component in the UI',
configuration: null,
},
{
id: 'cornerstone.windowLevelActionMenu',
description: 'Window level action menu for the cornerstone viewport.',
image: windowLevelActionMenu,
default: null,
configuration: `
window.config = {
// rest of window config
customizationService: [
{
'cornerstone.windowLevelActionMenu': {
$set: {
content:CustomizedComponent
},
},
},
],
Devu-trenser marked this conversation as resolved.
Show resolved Hide resolved
};
`,
},
{
id: 'cornerstone.windowLevelPresets',
description: 'Window level presets for the cornerstone viewport.',
Expand Down
Loading