Skip to content

Commit

Permalink
Idc update (#5)
Browse files Browse the repository at this point in the history
* feat: 🎸 Update react-vtkjs-viewport usage to use requestPool (OHIF#1984)

* feat: 🎸 Update react-vtkjs-viewport usage to use requestPool

* Fix import of react-vtkjs-viewport to cornerstone-tools path.

* Increase maximum load time of MPR test now we are throttling requests.

* Remove debugger

Co-authored-by: Erik Ziegler <[email protected]>

* chore(release): publish [skip ci]

 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]

* fix: Avoid lerna:restore unless we are on Netlify (closes OHIF#1926, OHIF#1996)

* wip

* fix: Fix incorrect command name in Percy test (OHIF#1999)

* perf(stackPrefetch): Added stackPrefetch config with 20 max concurrent requests (OHIF#2000)

Co-authored-by: Danny Brown <[email protected]>

* chore(release): publish [skip ci]

 - @ohif/[email protected]
 - @ohif/[email protected]

* feat: 🎸 Filter/promote multiple series instances (OHIF#1533)

improve filter/promote to be applied on multiple series instances

✅ Closes: 1532

Co-authored-by: Rodolfo Ladeira <[email protected]>

* chore(release): publish [skip ci]

 - @ohif/[email protected]

* fix: Updated react-cornerstone-viewport to version 4.0.2 (OHIF#2001)

Co-authored-by: Danny Brown <[email protected]>

* chore(release): publish [skip ci]

 - @ohif/[email protected]
 - @ohif/[email protected]

* fix: 🐛 Fail gracefully on an MPR load error (OHIF#1992)

* feat: 🎸 Update react-vtkjs-viewport usage to use requestPool

* Fix import of react-vtkjs-viewport to cornerstone-tools path.

* Increase maximum load time of MPR test now we are throttling requests.

* fix: 🐛 Fail gracefully on an MPR load error

* Respond to reviewer comments.

* chore(release): publish [skip ci]

 - @ohif/[email protected]
 - @ohif/[email protected]

* [IDC-1994] Sort series list by SeriesNumber, and sort by same SeriesNumber by date/time. (OHIF#2010)

* Sort based on SeriesNumber and SeriesDate/SeriesTime.

* Harden, and perform final sort in algorithm if last N entries have the same SeriesNumber.

* Switch to insertion rather than sorting as sorting is too slow. Reimplement low priority sorting into new insertion method.

* Fix local file viewing.

* chore(release): publish [skip ci]

 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]

* [IDC-2017] Harden segmentation import to support more SEGs (OHIF#2024)

* fix: 🐛 Upgrade dcmjs version to support more SEGs

* chore(release): publish [skip ci]

 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]

* [IDC-1939] Debug Dialog part 1 (OHIF#2011)

* WIP debug dialog

* Rename the p10 downloader extension to debugger extension, add button to toolbar. Deactivate it by default.

* Fix unit tests

* chore(release): publish [skip ci]

 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]

* IDC-1532 multiple series search google (OHIF#2026)

* Multiple series search for google cloud adapter.

* Revert IDC config.

* fix: 🐛 Series filtering on multiple series for google

* Revert changes to default config.

* Address reviewers comments.

* Fixed spelling mistakes

* chore(release): publish [skip ci]

 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]

* Split query parameter calls. (OHIF#2035)

* chore(release): publish [skip ci]

 - @ohif/[email protected]

* [IDC-1672] Highlight SEG segment/ RT structure when click to jump. (OHIF#2034)

* Highlight for RTSTRUCT.

* SEG temp crosshairs.

* Disable RT highlighting for now.

* Remove TODO

* chore(release): publish [skip ci]

 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]

* [IDC-1129] - DICOM Tag Viewer extension (OHIF#2022)

* WIP render top level tags.

* Add drop down to select series.

* Fix errors with type 2 sequences.

* WIP swap instance.

* Fix formatting and make fullscreen.

* Remove debuggers.

* Finish formatting.

* Fix error with double SeriesNumber deconstruction.

* Address reviewer comments.

* chore(release): publish [skip ci]

 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]

* [IDC-2006] - optional mailTo for debugging extension. (OHIF#2027)

* WIP debug dialog

* Rename the p10 downloader extension to debugger extension, add button to toolbar. Deactivate it by default.

* Fix unit tests

* WIP

* WIP

* Finish mailTo

* chore(release): publish [skip ci]

 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]
 - @ohif/[email protected]

* [IDC-1905] Hover tooltips for Segmentation + RTSTRUCT extension (OHIF#2044)

* WIP debug dialog

* Rename the p10 downloader extension to debugger extension, add button to toolbar. Deactivate it by default.

* Fix unit tests

* WIP

* WIP

* Finish mailTo

* tooltop

Co-authored-by: Erik Ziegler <[email protected]>
Co-authored-by: ohif-bot <[email protected]>
Co-authored-by: Alex Broaddus <[email protected]>
Co-authored-by: Danny Brown <[email protected]>
Co-authored-by: ladeirarodolfo <[email protected]>
Co-authored-by: Rodolfo Ladeira <[email protected]>
  • Loading branch information
7 people authored Sep 18, 2020
1 parent 32fa156 commit c279815
Show file tree
Hide file tree
Showing 93 changed files with 2,147 additions and 987 deletions.
468 changes: 138 additions & 330 deletions extensions/cornerstone/CHANGELOG.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions extensions/cornerstone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone",
"version": "2.9.2",
"version": "2.9.4",
"description": "OHIF extension for Cornerstone",
"author": "OHIF",
"license": "MIT",
Expand Down Expand Up @@ -36,7 +36,7 @@
"cornerstone-math": "^0.1.8",
"cornerstone-tools": "^4.20.1",
"cornerstone-wado-image-loader": "^3.1.0",
"dcmjs": "0.16.0",
"dcmjs": "0.16.3",
"dicom-parser": "^1.8.3",
"hammerjs": "^2.0.8",
"prop-types": "^15.6.2",
Expand Down
2 changes: 2 additions & 0 deletions extensions/cornerstone/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import init from './init.js';
import commandsModule from './commandsModule.js';
import toolbarModule from './toolbarModule.js';
import CornerstoneViewportDownloadForm from './CornerstoneViewportDownloadForm';
import { version } from '../package.json';

const Component = React.lazy(() => {
return import('./OHIFCornerstoneViewport');
Expand All @@ -24,6 +25,7 @@ export default {
* Only required property. Should be a unique value across all extensions.
*/
id: 'cornerstone',
version,

/**
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [0.1.5](https://github.com/OHIF/Viewers/compare/@ohif/[email protected]...@ohif/[email protected]) (2020-09-17)

**Note:** Version bump only for package @ohif/extension-debugging





## [0.1.4](https://github.com/OHIF/Viewers/compare/@ohif/[email protected]...@ohif/[email protected]) (2020-09-10)

**Note:** Version bump only for package @ohif/extension-debugging





## 0.1.3 (2020-09-03)

**Note:** Version bump only for package @ohif/extension-debugging





## [0.1.2](https://github.com/OHIF/Viewers/compare/@ohif/[email protected]...@ohif/[email protected]) (2020-06-18)

**Note:** Version bump only for package @ohif/extension-dicom-p10-downloader
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@ohif/extension-dicom-p10-downloader",
"version": "0.1.2",
"description": "OHIF extension for downloading DICOM P10 files",
"name": "@ohif/extension-debugging",
"version": "0.1.5",
"description": "OHIF extension for debugging.",
"author": "OHIF",
"license": "MIT",
"repository": "OHIF/Viewers",
Expand Down Expand Up @@ -33,6 +33,7 @@
},
"dependencies": {
"@babel/runtime": "^7.5.5",
"detect-browser": "5.1.1",
"dicomweb-client": "^0.6.0",
"file-saver": "^2.0.2",
"jszip": "^3.2.2"
Expand Down
9 changes: 9 additions & 0 deletions extensions/debugging/src/DebugReportModal.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.debugReportModalHeader {
padding: 10px 0 10px;
color: var(--active-color);
}

.debug-report-modal-container {
display: flex;
flex-direction: column;
}
245 changes: 245 additions & 0 deletions extensions/debugging/src/DebugReportModal.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,245 @@
import React from 'react';
import { detect } from 'detect-browser';
import './DebugReportModal.css';
import { ToolbarButton } from '@ohif/ui';

const DubugReportModal = ({
viewports,
studies,
servers,
extensionManager,
mailTo,
}) => {
const mailToFunction = () => {
const StudyInstanceUID = Object.keys(studies.studyData)[0];

const subject = encodeURI(`Issue with Study: ${StudyInstanceUID}`);

let body = `Enter the description of your problem here: \n\n\n`;

body += `============= SESSION INFO =============\n\n`;

// App version

body += '== App ==\n';
body += `version\t${window.version}\n\n`;

// Extensions Versions

body += '== Extensions Versions ==\n';

const { registeredExtensionVesions } = extensionManager;

Object.keys(registeredExtensionVesions).forEach(extensionId => {
const version = registeredExtensionVesions[extensionId];

body += `${extensionId}\t${version}\n`;
});

body += '\n';

// Browser Info

const browser = detect();

const { name, os, type, version } = browser;

body += '== Browser Info ==\n';
body += `name\t ${name}\n`;
body += `os\t ${os}\n`;
body += `type\t ${type}\n`;
body += `version\t ${version}\n\n`;

// Study URL
body += '== URL ==\n';
body += `URL\t ${window.location.href}\n\n`;

// Layout

const { numRows, numColumns, viewportSpecificData } = viewports;

body += '== Viewport Layout ==\n';
body += `Rows\t${numRows}\n`;
body += `Columns\t${numColumns}\n\n`;

body += '== Viewports ==\n';

Object.keys(viewportSpecificData).forEach(viewportIndex => {
const vsd = viewportSpecificData[viewportIndex];

const [row, column] = _viewportIndexToViewportPosition(
viewportIndex,
numColumns
);

body += `[${row},${column}]\t${vsd.SeriesInstanceUID}\n`;
});

// TODO Text dump of rest of stuff.

body = encodeURI(body);

window.location.href = `mailto:${mailTo}?subject=${subject}&body=${body}`;
};

return (
<div className="debug-report-modal-container">
{mailTo ? (
<div>
<ToolbarButton
label={'Send Bug Report'}
onClick={mailToFunction}
icon={'envelope-square'}
isActive={false}
/>
</div>
) : null}
<div>
<table>
{getAppVersion()}
{getExtensionVersions(extensionManager)}
{getBrowserInfo()}
{getCurrentStudyUrl()}
{getLayout(viewports)}
</table>
</div>
</div>
);
};

const getAppVersion = () => {
return (
<React.Fragment>
<tr>
<th className="debugReportModalHeader">App</th>
</tr>
<tr>
<td>Version</td>
<td>{window.version}</td>
</tr>
</React.Fragment>
);
};

const getCurrentStudyUrl = () => {
return (
<React.Fragment>
<tr>
<th className="debugReportModalHeader">URL</th>
</tr>
<tr>
<td>URL</td>
<td>{window.location.href}</td>
</tr>
</React.Fragment>
);
};

const getExtensionVersions = extensionManager => {
const { registeredExtensionVesions } = extensionManager;

const lineItems = Object.keys(registeredExtensionVesions).map(extensionId => {
const version = registeredExtensionVesions[extensionId];

return (
<tr>
<td>{extensionId}</td>
<td>{version}</td>
</tr>
);
});

return (
<React.Fragment>
<th className="debugReportModalHeader">Extensions</th>
{lineItems}
</React.Fragment>
);
};

const getLayout = viewports => {
const { numRows, numColumns } = viewports;

return (
<React.Fragment>
<tr>
<th className="debugReportModalHeader">Viewports</th>
</tr>
<tr>
<th>Layout</th>
</tr>
<tr>
<td>Rows</td>
<td>{numRows}</td>
</tr>
<tr>
<td>Columns</td>
<td>{numColumns}</td>
</tr>
<tr>
<th>SeriesInstanceUIDs</th>
</tr>
{getSeriesInstanceUIDsPerRow(viewports)}
</React.Fragment>
);
};

const getBrowserInfo = () => {
const browser = detect();

const { name, os, type, version } = browser;

return (
<React.Fragment>
<tr>
<th className="debugReportModalHeader">Platform</th>
</tr>
<tr>
<td>name</td>
<td>{name}</td>
</tr>
<tr>
<td>os</td>
<td>{os}</td>
</tr>
<tr>
<td>type</td>
<td>{type}</td>
</tr>
<tr>
<td>version</td>
<td>{version}</td>
</tr>
</React.Fragment>
);
};

const getSeriesInstanceUIDsPerRow = viewports => {
const { viewportSpecificData, numColumns } = viewports;

// NOTE viewportSpecificData is actually an object with numerical keys.
return Object.keys(viewportSpecificData).map(viewportIndex => {
const vsd = viewportSpecificData[viewportIndex];

const [row, column] = _viewportIndexToViewportPosition(
viewportIndex,
numColumns
);

return (
<tr>
<td>{`[${row},${column}]`}</td>
<td>{vsd.SeriesInstanceUID}</td>
</tr>
);
});
};

const _viewportIndexToViewportPosition = (viewportIndex, numColumns) => {
const row = Math.floor(viewportIndex / numColumns);
const column = viewportIndex % numColumns;

return [row, column];
};

export default DubugReportModal;
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,16 @@ import {
getSOPInstanceReferencesFromViewports,
} from './utils';
import _downloadAndZip, { downloadInstances } from './downloadAndZip';
import DebugReportModal from './DebugReportModal';
import React from 'react';

import state from './state';

const {
utils: { Queue },
} = OHIF;

export function getCommands(context) {
export function getCommands(context, servicesManager, extensionManager) {
const queue = new Queue(1);
const actions = {
/**
Expand Down Expand Up @@ -87,9 +91,33 @@ export function getCommands(context) {
serverConfig
);
},
openDebugInfoModal({ viewports, studies, servers }) {
const { UIModalService } = servicesManager.services;

const WrappedDebugReportModal = function() {
return (
<DebugReportModal
viewports={viewports}
studies={studies}
servers={servers}
extensionManager={extensionManager}
mailTo={state.mailTo}
/>
);
};

UIModalService.show({
content: WrappedDebugReportModal,
title: `Debugging Information`,
});
},
};

const definitions = {
openDebugInfoModal: {
commandFn: actions.openDebugInfoModal,
storeContexts: ['viewports', 'servers', 'studies'],
},
downloadAndZip: {
commandFn: queue.bindSafe(actions.downloadAndZip, error),
storeContexts: ['servers'],
Expand Down
File renamed without changes.
Loading

0 comments on commit c279815

Please sign in to comment.