PLUGIN_TYPES --> MODULE_TYPES
This commit is contained in:
parent
29f86d41e6
commit
9c797233bb
@ -1,7 +1,4 @@
|
|||||||
import OHIF from 'ohif-core';
|
import { MODULE_TYPES, utils } from 'ohif-core';
|
||||||
|
|
||||||
const { plugins, utils } = OHIF;
|
|
||||||
const { PLUGIN_TYPES } = plugins;
|
|
||||||
|
|
||||||
// TODO: Should probably use dcmjs for this
|
// TODO: Should probably use dcmjs for this
|
||||||
const SOP_CLASS_UIDS = {
|
const SOP_CLASS_UIDS = {
|
||||||
@ -20,7 +17,7 @@ const sopClassUids = Object.values(SOP_CLASS_UIDS);
|
|||||||
// same SOP Class
|
// same SOP Class
|
||||||
const OHIFDicomHtmlSopClassHandler = {
|
const OHIFDicomHtmlSopClassHandler = {
|
||||||
id: 'OHIFDicomHtmlSopClassHandler',
|
id: 'OHIFDicomHtmlSopClassHandler',
|
||||||
type: PLUGIN_TYPES.SOP_CLASS_HANDLER,
|
type: MODULE_TYPES.SOP_CLASS_HANDLER,
|
||||||
sopClassUids,
|
sopClassUids,
|
||||||
getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) {
|
getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) {
|
||||||
const instance = series.getFirstInstance();
|
const instance = series.getFirstInstance();
|
||||||
|
|||||||
@ -1,7 +1,4 @@
|
|||||||
import OHIF from "ohif-core";
|
import { MODULE_TYPES, utils } from 'ohif-core';
|
||||||
|
|
||||||
const { plugins, utils } = OHIF;
|
|
||||||
const { PLUGIN_TYPES } = plugins;
|
|
||||||
|
|
||||||
// TODO: Should probably use dcmjs for this
|
// TODO: Should probably use dcmjs for this
|
||||||
const SOP_CLASS_UIDS = {
|
const SOP_CLASS_UIDS = {
|
||||||
@ -10,10 +7,8 @@ const SOP_CLASS_UIDS = {
|
|||||||
|
|
||||||
const OHIFDicomPDFSopClassHandler = {
|
const OHIFDicomPDFSopClassHandler = {
|
||||||
id: 'OHIFDicomPDFSopClassHandlerPlugin',
|
id: 'OHIFDicomPDFSopClassHandlerPlugin',
|
||||||
type: PLUGIN_TYPES.SOP_CLASS_HANDLER,
|
type: MODULE_TYPES.SOP_CLASS_HANDLER,
|
||||||
sopClassUids: [
|
sopClassUids: [SOP_CLASS_UIDS.ENCAPSULATED_PDF],
|
||||||
SOP_CLASS_UIDS.ENCAPSULATED_PDF
|
|
||||||
],
|
|
||||||
getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) {
|
getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) {
|
||||||
const instance = series.getFirstInstance();
|
const instance = series.getFirstInstance();
|
||||||
|
|
||||||
@ -28,6 +23,6 @@ const OHIFDicomPDFSopClassHandler = {
|
|||||||
authorizationHeaders: authorizationHeaders
|
authorizationHeaders: authorizationHeaders
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
export default OHIFDicomPDFSopClassHandler;
|
export default OHIFDicomPDFSopClassHandler;
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
import { connect } from 'react-redux';
|
|
||||||
import { LayoutManager } from 'react-viewerbase';
|
import { LayoutManager } from 'react-viewerbase';
|
||||||
import OHIF from 'ohif-core';
|
import { MODULE_TYPES } from 'ohif-core';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
const mapStateToProps = state => {
|
const mapStateToProps = state => {
|
||||||
const viewportPluginIds = state.plugins.availablePlugins
|
const viewportPluginIds = state.plugins.availablePlugins
|
||||||
.filter(plugin => plugin.type === OHIF.plugins.PLUGIN_TYPES.VIEWPORT)
|
.filter(plugin => plugin.type === MODULE_TYPES.VIEWPORT)
|
||||||
.map(plugin => plugin.id);
|
.map(plugin => plugin.id);
|
||||||
|
|
||||||
const availablePlugins = {};
|
const availablePlugins = {};
|
||||||
@ -17,7 +17,7 @@ const mapStateToProps = state => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO Use something like state.plugins.defaultPlugin[OHIF.plugins.PLUGIN_TYPES.VIEWPORT]
|
// TODO Use something like state.plugins.defaultPlugin[MODULE_TYPES.VIEWPORT]
|
||||||
let defaultPlugin;
|
let defaultPlugin;
|
||||||
if (viewportPluginIds && viewportPluginIds.length) {
|
if (viewportPluginIds && viewportPluginIds.length) {
|
||||||
defaultPlugin = viewportPluginIds[0];
|
defaultPlugin = viewportPluginIds[0];
|
||||||
|
|||||||
@ -4,7 +4,7 @@ import React, { Component } from 'react';
|
|||||||
|
|
||||||
import ConnectedLayoutButton from './ConnectedLayoutButton';
|
import ConnectedLayoutButton from './ConnectedLayoutButton';
|
||||||
import ConnectedPluginSwitch from './ConnectedPluginSwitch.js';
|
import ConnectedPluginSwitch from './ConnectedPluginSwitch.js';
|
||||||
import OHIF from 'ohif-core';
|
import { MODULE_TYPES } from 'ohif-core';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { RoundedButtonGroup } from 'react-viewerbase';
|
import { RoundedButtonGroup } from 'react-viewerbase';
|
||||||
|
|
||||||
@ -57,10 +57,9 @@ class ToolbarRow extends Component {
|
|||||||
|
|
||||||
const currentPluginId = this.props.pluginId;
|
const currentPluginId = this.props.pluginId;
|
||||||
|
|
||||||
const { PLUGIN_TYPES, availablePlugins } = OHIF.plugins;
|
|
||||||
const plugin = availablePlugins.find(entry => {
|
const plugin = availablePlugins.find(entry => {
|
||||||
return (
|
return (
|
||||||
entry.type === PLUGIN_TYPES.TOOLBAR && entry.id === currentPluginId
|
entry.type === MODULE_TYPES.TOOLBAR && entry.id === currentPluginId
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user