fix: update DICOMSR and Measurement Panel copy to use L/W (#2174)
* fix: update DICOMSR and Measurement Panel copy to use L/W * functional viewport * support the active viewport for snapshot * Support empty viewport case * bump cs-tools to pick up misc. fixes
This commit is contained in:
1 parent
0d9da69580
commit
2f4cba28a5
14 files changed
+52
-78
No files matched your search
@@ -13,9 +13,10 @@ const DEFAULT_SIZE = 512;
|
||||
const MAX_TEXTURE_SIZE = 10000;
|
||||
|
||||
const CornerstoneViewportDownloadForm = ({ onClose, activeViewportIndex }) => {
|
||||
const { element: activeEnabledElement } = getEnabledElement(
|
||||
const enabledElement = getEnabledElement(
|
||||
activeViewportIndex
|
||||
);
|
||||
const activeEnabledElement = enabledElement?.element
|
||||
|
||||
const enableViewport = viewportElement => {
|
||||
if (viewportElement) {
|
||||
@@ -116,6 +117,7 @@ const CornerstoneViewportDownloadForm = ({ onClose, activeViewportIndex }) => {
|
||||
viewportElement.querySelector('canvas').toBlob(blob => {
|
||||
const URLObj = window.URL || window.webkitURL;
|
||||
const a = document.createElement('a');
|
||||
|
||||
a.href = URLObj.createObjectURL(blob);
|
||||
a.download = file;
|
||||
document.body.appendChild(a);
|
||||
|
||||
@@ -202,8 +202,9 @@ const commandsModule = ({ servicesManager, commandsManager }) => {
|
||||
return enabledElement;
|
||||
},
|
||||
showDownloadViewportModal: () => {
|
||||
const activeViewportIndex = 0; // viewports.activeViewportIndex;
|
||||
const { activeViewportIndex } = ViewportGridService.getState();
|
||||
const { UIModalService } = servicesManager.services;
|
||||
|
||||
if (UIModalService) {
|
||||
UIModalService.show({
|
||||
content: CornerstoneViewportDownloadForm,
|
||||
|
||||
Reference in new issue
Block a user