feat: 🎸 Only allow reconstruction of datasets that make sense (#1010)

* feat: 🎸 Only allow reconstruction of datasets that make sense

Only allow reconstruction of datasets which are imaging data, that have
frames in the same orientation, with the same size and make sense to be
reconstructed in 3D.

Closes: #561
This commit is contained in:
James Petts authored and GitHub committed 2019-10-15 17:08:53 +02:00
1 parent 5c5a49486d
commit 2d75e01ea0
8 files changed
+249 -26

No files matched your search

@@ -6,10 +6,8 @@ import { connect } from 'react-redux';
const { setLayout } = OHIF.redux.actions;
const ConnectedPluginSwitch = (props) => {
return (
<PluginSwitch {...props} />
)
const ConnectedPluginSwitch = props => {
return <PluginSwitch {...props} />;
};
const mapStateToProps = state => {
@@ -26,7 +24,7 @@ const mapDispatchToProps = dispatch => {
return {
setLayout: data => {
dispatch(setLayout(data));
}
},
};
};
@@ -40,13 +38,12 @@ const mapDispatchToProps = dispatch => {
}*/
const mergeProps = (propsFromState, propsFromDispatch, ownProps) => {
//const { activeViewportIndex, layout } = propsFromState;
const { activeViewportIndex, viewportSpecificData } = propsFromState;
const { studies } = ownProps;
const { setLayout } = propsFromDispatch;
// TODO: Do not display certain options if the current display set
// cannot be displayed using these view types
const mpr = () => {
commandsManager.runCommand("mpr2d");
commandsManager.runCommand('mpr2d');
};
const exitMpr = () => {
@@ -61,7 +58,10 @@ const mergeProps = (propsFromState, propsFromDispatch, ownProps) => {
return {
mpr,
exitMpr
exitMpr,
activeViewportIndex,
viewportSpecificData,
studies,
};
};