Compare commits

...
Author SHA1 Message Date
ohif-bot 3e074da64e chore(release): publish [skip ci]
- @ohif/extension-vtk@1.2.22
 - @ohif/core@2.5.2
 - @ohif/viewer@3.7.6
2020-03-06 09:53:40 +00:00
d66bad664a Fix for correct reading of enableStudyLazyLoad setting (#1333)
Co-authored-by: Rutman <victor.rutman@changehealthcare.com>
Co-authored-by: Erik Ziegler <erik.sweed@gmail.com>
2020-03-06 10:50:16 +01:00
ohif-bot e1c21a7ce1 chore(release): publish [skip ci]
- @ohif/viewer@3.7.5
2020-03-05 15:08:13 +00:00
Danny Brown c785a5e975 feat: is disabled flag for sidepanels (#1461)
* chore: updated autofix settings

* chore: remove dead code

* chore: further identify study schema/props

* chore: sketch out beginnings of isDisabled method for sidePanel menuOptions

* chore: set API as studies object

* docs: update docs to include isDisabled computed

* chore: note regarding reactivity

* chore: handle function not set (preserve non-breaking)

* chore: clarify how props are added

* chore: specify left side for built-in series button (thumbnails)

* chore: remove 'from', and push to correct key
2020-03-05 10:05:51 -05:00
Danny Brown f133be75d1 Merge branch 'master' into feat/is-disabled-flag-for-sidepanels 2020-03-05 09:39:58 -05:00
dannyrb 6829542c00 chore: remove 'from', and push to correct key 2020-02-24 11:36:10 -05:00
dannyrb 846c9c1c54 chore: specify left side for built-in series button (thumbnails) 2020-02-24 11:35:34 -05:00
dannyrb 85fed49eb1 chore: clarify how props are added 2020-02-24 11:28:35 -05:00
dannyrb 298da03e2f chore: handle function not set (preserve non-breaking) 2020-02-24 11:22:41 -05:00
dannyrb 141e1cf648 chore: note regarding reactivity 2020-02-24 11:20:10 -05:00
dannyrb ea2ab1a25e docs: update docs to include isDisabled computed 2020-02-24 11:18:55 -05:00
dannyrb 3d0357c9c0 chore: set API as studies object 2020-02-24 11:16:24 -05:00
dannyrb f68aaf973c chore: sketch out beginnings of isDisabled method for sidePanel menuOptions 2020-02-21 16:09:55 -05:00
dannyrb f04d459a63 chore: further identify study schema/props 2020-02-21 16:09:05 -05:00
dannyrb 4cf9f2c9cb chore: remove dead code 2020-02-21 16:08:48 -05:00
dannyrb c0cc9752c6 chore: updated autofix settings 2020-02-21 16:08:15 -05:00
12 changed files with 105 additions and 60 deletions

No files matched your search

+4 -1
View File
@@ -28,5 +28,8 @@
],
"prettier.disableLanguages": ["html"],
"prettier.endOfLine": "lf",
"workbench.colorCustomizations": {}
"workbench.colorCustomizations": {},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
}
}
+4
View File
@@ -40,6 +40,10 @@ export default {
from: 'right',
// The target component to toggle open/close
target: 'target-component-id',
// UI Hint; If the target panel is in a "disabled" state
isDisabled: studies => {
return false;
},
// Overrides `defaultContext`, if specified
context: ['ACTIVE_VIEWPORT:MAGIC'],
},
+3 -1
View File
@@ -21,7 +21,6 @@ export default {
/**
* MODULE GETTERS
*/
getViewportModule() {
return '... react component ...';
},
@@ -98,6 +97,9 @@ const panelModule = {
icon: 'th-list',
label: 'Segments',
target: 'segment-panel',
isDisabled: studies => {
return false;
},
},
],
components: [
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.22](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.21...@ohif/extension-vtk@1.2.22) (2020-03-06)
**Note:** Version bump only for package @ohif/extension-vtk
## [1.2.21](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.2.20...@ohif/extension-vtk@1.2.21) (2020-02-29)
**Note:** Version bump only for package @ohif/extension-vtk
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-vtk",
"version": "1.2.21",
"version": "1.2.22",
"description": "OHIF extension for VTK.js",
"author": "OHIF",
"license": "MIT",
@@ -52,7 +52,7 @@
"react-vtkjs-viewport": "^0.8.3"
},
"devDependencies": {
"@ohif/core": "^2.5.1",
"@ohif/core": "^2.5.2",
"@ohif/ui": "^1.3.1",
"cornerstone-tools": "^4.12.0",
"cornerstone-wado-image-loader": "^3.0.0",
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [2.5.2](https://github.com/OHIF/Viewers/compare/@ohif/core@2.5.1...@ohif/core@2.5.2) (2020-03-06)
**Note:** Version bump only for package @ohif/core
## [2.5.1](https://github.com/OHIF/Viewers/compare/@ohif/core@2.5.0...@ohif/core@2.5.1) (2020-02-21)
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/core",
"version": "2.5.1",
"version": "2.5.2",
"description": "Generic business logic for web-based medical imaging applications",
"author": "OHIF Core Team",
"license": "MIT",
@@ -13,7 +13,7 @@ import RetrieveMetadataLoaderAsync from './retrieveMetadataLoaderAsync';
*/
async function RetrieveMetadata(server, studyInstanceUid, filters = {}) {
const RetrieveMetadataLoader =
server.enableStudyLazyLoad !== false
server.enableStudyLazyLoad != false
? RetrieveMetadataLoaderAsync
: RetrieveMetadataLoaderSync;
+16
View File
@@ -3,6 +3,22 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [3.7.6](https://github.com/OHIF/Viewers/compare/@ohif/viewer@3.7.5...@ohif/viewer@3.7.6) (2020-03-06)
**Note:** Version bump only for package @ohif/viewer
## [3.7.5](https://github.com/OHIF/Viewers/compare/@ohif/viewer@3.7.4...@ohif/viewer@3.7.5) (2020-03-05)
**Note:** Version bump only for package @ohif/viewer
## [3.7.4](https://github.com/OHIF/Viewers/compare/@ohif/viewer@3.7.3...@ohif/viewer@3.7.4) (2020-03-03)
**Note:** Version bump only for package @ohif/viewer
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/viewer",
"version": "3.7.4",
"version": "3.7.6",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
"license": "MIT",
@@ -47,13 +47,13 @@
},
"dependencies": {
"@babel/runtime": "^7.5.5",
"@ohif/core": "^2.5.1",
"@ohif/core": "^2.5.2",
"@ohif/extension-cornerstone": "^2.4.1",
"@ohif/extension-dicom-html": "^1.1.0",
"@ohif/extension-dicom-microscopy": "^0.50.6",
"@ohif/extension-dicom-pdf": "^1.0.1",
"@ohif/extension-lesion-tracker": "^0.2.0",
"@ohif/extension-vtk": "^1.2.21",
"@ohif/extension-vtk": "^1.2.22",
"@ohif/i18n": "^0.52.6",
"@ohif/ui": "^1.3.1",
"@tanem/react-nprogress": "^1.1.25",
@@ -25,9 +25,17 @@ class ToolbarRow extends Component {
isRightSidePanelOpen: PropTypes.bool.isRequired,
selectedLeftSidePanel: PropTypes.string.isRequired,
selectedRightSidePanel: PropTypes.string.isRequired,
handleSidePanelChange: PropTypes.func,
handleSidePanelChange: PropTypes.func.isRequired,
activeContexts: PropTypes.arrayOf(PropTypes.string).isRequired,
studies: PropTypes.array,
t: PropTypes.func.isRequired,
// NOTE: withDialog, withModal HOCs
dialog: PropTypes.any,
modal: PropTypes.any,
};
static defaultProps = {
studies: [],
};
constructor(props) {
@@ -50,30 +58,30 @@ class ToolbarRow extends Component {
this._handleBuiltIn = _handleBuiltIn.bind(this);
const panelModules = extensionManager.modules[MODULE_TYPES.PANEL];
this.buttonGroups = {
left: [
// TODO: This should come from extensions, instead of being baked in
{
value: 'studies',
icon: 'th-large',
bottomLabel: this.props.t('Series'),
},
],
left: [],
right: [],
};
// ~ FIND MENU OPTIONS
panelModules.forEach(panelExtension => {
const panelModule = panelExtension.module;
const defaultContexts = Array.from(panelModule.defaultContext);
// MENU OPTIONS
panelModule.menuOptions.forEach(menuOption => {
const contexts = Array.from(menuOption.context || defaultContexts);
const activeContextIncludesAnyPanelContexts = this.props.activeContexts.some(
actx => contexts.includes(actx)
const hasActiveContext = this.props.activeContexts.some(actx =>
contexts.includes(actx)
);
if (activeContextIncludesAnyPanelContexts) {
// It's a bit beefy to pass studies; probably only need to be reactive on `studyInstanceUIDs` and activeViewport?
// Note: This does not cleanly handle `studies` prop updating with panel open
const isDisabled =
typeof menuOption.isDisabled === 'function' &&
menuOption.isDisabled(this.props.studies);
if (hasActiveContext && !isDisabled) {
const menuOptionEntry = {
value: menuOption.target,
icon: menuOption.icon,
@@ -85,6 +93,13 @@ class ToolbarRow extends Component {
}
});
});
// TODO: This should come from extensions, instead of being baked in
this.buttonGroups.left.unshift({
value: 'studies',
icon: 'th-large',
bottomLabel: this.props.t('Series'),
});
}
componentDidUpdate(prevProps) {
@@ -222,6 +237,10 @@ function _getButtonComponents(toolbarButtons, activeButtons) {
}
/**
* TODO: DEPRECATE
* This is used exclusively in `extensions/cornerstone/src`
* We have better ways with new UI Services to trigger "builtin" behaviors
*
* A handy way for us to handle different button types. IE. firing commands for
* buttons, or initiation built in behavior.
*
@@ -273,7 +292,7 @@ function _getVisibleToolbarButtons() {
function _handleBuiltIn(button) {
/* TODO: Keep cine button active until its unselected. */
const { dialog, modal, t } = this.props;
const { dialog, t } = this.props;
const { dialogId } = this.state;
const { id, options } = button;
@@ -18,45 +18,30 @@ import WhiteLabellingContext from '../context/WhiteLabellingContext.js';
import UserManagerContext from '../context/UserManagerContext';
import './Viewer.css';
/**
* Inits OHIF Hanging Protocol's onReady.
* It waits for OHIF Hanging Protocol to be ready to instantiate the ProtocolEngine
* Hanging Protocol will use OHIF LayoutManager to render viewports properly
*/
/*const initHangingProtocol = () => {
// When Hanging Protocol is ready
HP.ProtocolStore.onReady(() => {
// Gets all StudyMetadata objects: necessary for Hanging Protocol to access study metadata
const studyMetadataList = OHIF.viewer.StudyMetadataList.all();
// Instantiate StudyMetadataSource: necessary for Hanging Protocol to get study metadata
const studyMetadataSource = new OHIF.studies.classes.OHIFStudyMetadataSource();
// Get prior studies map
const studyPriorsMap = OHIF.studylist.functions.getStudyPriorsMap(studyMetadataList);
// Creates Protocol Engine object with required arguments
const ProtocolEngine = new HP.ProtocolEngine(layoutManager, studyMetadataList, studyPriorsMap, studyMetadataSource);
// Sets up Hanging Protocol engine
HP.setEngine(ProtocolEngine);
});
};*/
/*const viewportUtils = OHIF.viewerbase.viewportUtils;
OHIF.viewer.functionList = {
toggleCineDialog: viewportUtils.toggleCineDialog,
toggleCinePlay: viewportUtils.toggleCinePlay,
clearTools: viewportUtils.clearTools,
resetViewport: viewportUtils.resetViewport,
invert: viewportUtils.invert
};*/
class Viewer extends Component {
static propTypes = {
studies: PropTypes.array,
studies: PropTypes.arrayOf(
PropTypes.shape({
studyInstanceUid: PropTypes.string.isRequired,
studyDate: PropTypes.string,
displaySets: PropTypes.arrayOf(
PropTypes.shape({
displaySetInstanceUid: PropTypes.string.isRequired,
seriesDescription: PropTypes.string,
seriesNumber: PropTypes.number,
instanceNumber: PropTypes.number,
numImageFrames: PropTypes.number,
modality: PropTypes.string.isRequired,
images: PropTypes.arrayOf(
PropTypes.shape({
getImageId: PropTypes.func.isRequired,
})
),
})
),
})
),
studyInstanceUids: PropTypes.array,
activeServer: PropTypes.shape({
type: PropTypes.string,