diff --git a/extensions/ohif-dicom-html-extension/src/OHIFDicomHtmlSopClassHandler.js b/extensions/ohif-dicom-html-extension/src/OHIFDicomHtmlSopClassHandler.js
index caef91682..7423da779 100644
--- a/extensions/ohif-dicom-html-extension/src/OHIFDicomHtmlSopClassHandler.js
+++ b/extensions/ohif-dicom-html-extension/src/OHIFDicomHtmlSopClassHandler.js
@@ -1,7 +1,4 @@
-import OHIF from 'ohif-core';
-
-const { plugins, utils } = OHIF;
-const { PLUGIN_TYPES } = plugins;
+import { MODULE_TYPES, utils } from 'ohif-core';
// TODO: Should probably use dcmjs for this
const SOP_CLASS_UIDS = {
@@ -20,7 +17,7 @@ const sopClassUids = Object.values(SOP_CLASS_UIDS);
// same SOP Class
const OHIFDicomHtmlSopClassHandler = {
id: 'OHIFDicomHtmlSopClassHandler',
- type: PLUGIN_TYPES.SOP_CLASS_HANDLER,
+ type: MODULE_TYPES.SOP_CLASS_HANDLER,
sopClassUids,
getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) {
const instance = series.getFirstInstance();
diff --git a/extensions/ohif-dicom-pdf-extension/src/OHIFDicomPDFSopClassHandler.js b/extensions/ohif-dicom-pdf-extension/src/OHIFDicomPDFSopClassHandler.js
index 4591f3498..0b8e1b7bd 100644
--- a/extensions/ohif-dicom-pdf-extension/src/OHIFDicomPDFSopClassHandler.js
+++ b/extensions/ohif-dicom-pdf-extension/src/OHIFDicomPDFSopClassHandler.js
@@ -1,7 +1,4 @@
-import OHIF from "ohif-core";
-
-const { plugins, utils } = OHIF;
-const { PLUGIN_TYPES } = plugins;
+import { MODULE_TYPES, utils } from 'ohif-core';
// TODO: Should probably use dcmjs for this
const SOP_CLASS_UIDS = {
@@ -10,10 +7,8 @@ const SOP_CLASS_UIDS = {
const OHIFDicomPDFSopClassHandler = {
id: 'OHIFDicomPDFSopClassHandlerPlugin',
- type: PLUGIN_TYPES.SOP_CLASS_HANDLER,
- sopClassUids: [
- SOP_CLASS_UIDS.ENCAPSULATED_PDF
- ],
+ type: MODULE_TYPES.SOP_CLASS_HANDLER,
+ sopClassUids: [SOP_CLASS_UIDS.ENCAPSULATED_PDF],
getDisplaySetFromSeries(series, study, dicomWebClient, authorizationHeaders) {
const instance = series.getFirstInstance();
@@ -28,6 +23,6 @@ const OHIFDicomPDFSopClassHandler = {
authorizationHeaders: authorizationHeaders
};
}
-}
+};
export default OHIFDicomPDFSopClassHandler;
diff --git a/src/connectedComponents/ConnectedLayoutManager.js b/src/connectedComponents/ConnectedLayoutManager.js
index d18605ac1..b90094202 100644
--- a/src/connectedComponents/ConnectedLayoutManager.js
+++ b/src/connectedComponents/ConnectedLayoutManager.js
@@ -1,10 +1,10 @@
-import { connect } from 'react-redux';
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 viewportPluginIds = state.plugins.availablePlugins
- .filter(plugin => plugin.type === OHIF.plugins.PLUGIN_TYPES.VIEWPORT)
+ .filter(plugin => plugin.type === MODULE_TYPES.VIEWPORT)
.map(plugin => plugin.id);
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;
if (viewportPluginIds && viewportPluginIds.length) {
defaultPlugin = viewportPluginIds[0];
diff --git a/src/connectedComponents/ToolbarRow.js b/src/connectedComponents/ToolbarRow.js
index deda8d4c4..1494d8275 100644
--- a/src/connectedComponents/ToolbarRow.js
+++ b/src/connectedComponents/ToolbarRow.js
@@ -4,7 +4,7 @@ import React, { Component } from 'react';
import ConnectedLayoutButton from './ConnectedLayoutButton';
import ConnectedPluginSwitch from './ConnectedPluginSwitch.js';
-import OHIF from 'ohif-core';
+import { MODULE_TYPES } from 'ohif-core';
import PropTypes from 'prop-types';
import { RoundedButtonGroup } from 'react-viewerbase';
@@ -57,10 +57,9 @@ class ToolbarRow extends Component {
const currentPluginId = this.props.pluginId;
- const { PLUGIN_TYPES, availablePlugins } = OHIF.plugins;
const plugin = availablePlugins.find(entry => {
return (
- entry.type === PLUGIN_TYPES.TOOLBAR && entry.id === currentPluginId
+ entry.type === MODULE_TYPES.TOOLBAR && entry.id === currentPluginId
);
});