Compare commits

..
Author SHA1 Message Date
ohif-bot e362e895d4 chore(release): publish [skip ci]
- @ohif/viewer@4.7.2
2020-12-03 20:45:12 +00:00
Nikola Mijajlović 45a07dfa19 refactor: Update SidePanel.js to use a functional component (#2179) 2020-12-03 21:39:14 +01:00
ohif-bot 7323e63608 chore(release): publish [skip ci]
- @ohif/extension-vtk@1.9.4
 - @ohif/viewer@4.7.1
2020-12-03 17:20:07 +00:00
Igor OctavianoandDavide Punzo 0baf18dcb2 fix: reset VOI on mpr reset (#2115)
Co-authored-by: Davide Punzo <punzodavide@hotmail.it>
2020-12-03 18:11:14 +01:00
6 changed files with 64 additions and 38 deletions

No files matched your search

+11
View File
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.9.4](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.9.3...@ohif/extension-vtk@1.9.4) (2020-12-03)
### Bug Fixes
* reset VOI on mpr reset ([#2115](https://github.com/OHIF/Viewers/issues/2115)) ([0baf18d](https://github.com/OHIF/Viewers/commit/0baf18dcb2985378016236b735329346a851e14f))
## [1.9.3](https://github.com/OHIF/Viewers/compare/@ohif/extension-vtk@1.9.2...@ohif/extension-vtk@1.9.3) (2020-12-03)
**Note:** Version bump only for package @ohif/extension-vtk
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-vtk",
"version": "1.9.3",
"version": "1.9.4",
"description": "OHIF extension for VTK.js",
"author": "OHIF",
"license": "MIT",
+8 -4
View File
@@ -17,6 +17,7 @@ const { BlendMode } = Constants;
const commandsModule = ({ commandsManager, UINotificationService }) => {
// TODO: Put this somewhere else
let apis = {};
let defaultVOI;
async function _getActiveViewportVTKApi(viewports) {
const {
@@ -119,9 +120,11 @@ const commandsModule = ({ commandsManager, UINotificationService }) => {
return apis[index];
},
resetMPRView() {
apis.forEach(api => {
api.resetOrientation();
});
// Reset orientation
apis.forEach(api => api.resetOrientation());
// Reset VOI
if (defaultVOI) setVOI(defaultVOI);
// Reset the crosshairs
apis[0].svgWidgets.rotatableCrosshairsWidget.resetCrosshairs(apis, 0);
@@ -172,7 +175,7 @@ const commandsModule = ({ commandsManager, UINotificationService }) => {
segmentNumber,
frameIndex,
frame,
done = () => {},
done = () => { },
}) => {
let api = apis[viewports.activeViewportIndex];
@@ -387,6 +390,7 @@ const commandsModule = ({ commandsManager, UINotificationService }) => {
// Get current VOI if cornerstone viewport.
const cornerstoneVOI = getVOIFromCornerstoneViewport();
defaultVOI = cornerstoneVOI;
const viewportProps = [
{
+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.
## [4.7.2](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.7.1...@ohif/viewer@4.7.2) (2020-12-03)
**Note:** Version bump only for package @ohif/viewer
## [4.7.1](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.7.0...@ohif/viewer@4.7.1) (2020-12-03)
**Note:** Version bump only for package @ohif/viewer
# [4.7.0](https://github.com/OHIF/Viewers/compare/@ohif/viewer@4.6.3...@ohif/viewer@4.7.0) (2020-12-03)
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/viewer",
"version": "4.7.0",
"version": "4.7.2",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
"license": "MIT",
@@ -58,7 +58,7 @@
"@ohif/extension-dicom-rt": "^0.5.0",
"@ohif/extension-dicom-segmentation": "^0.4.7",
"@ohif/extension-lesion-tracker": "^0.2.1",
"@ohif/extension-vtk": "^1.9.3",
"@ohif/extension-vtk": "^1.9.4",
"@ohif/i18n": "^0.53.0",
"@ohif/ui": "^1.7.1",
"@tanem/react-nprogress": "^1.1.25",
+26 -31
View File
@@ -1,41 +1,36 @@
import './SidePanel.css';
import React, { Component } from 'react';
import React from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';
class SidePanel extends Component {
static propTypes = {
from: PropTypes.string.isRequired,
isOpen: PropTypes.bool.isRequired,
children: PropTypes.node,
width: PropTypes.string,
};
const SidePanel = ({ from, isOpen, children, width }) => {
const fromSideClass = from === 'right' ? 'from-right' : 'from-left';
render() {
const fromSideClass =
this.props.from === 'right' ? 'from-right' : 'from-left';
const styles = width
? {
maxWidth: width,
marginRight: isOpen ? '0' : Number.parseInt(width) * -1,
}
: {};
const styles = this.props.width
? {
maxWidth: this.props.width,
marginRight: this.props.isOpen
? '0'
: Number.parseInt(this.props.width) * -1,
}
: {};
return (
<section
style={styles}
className={classNames('sidepanel', fromSideClass, {
'is-open': isOpen,
})}
>
{children}
</section>
);
};
return (
<section
style={styles}
className={classNames('sidepanel', fromSideClass, {
'is-open': this.props.isOpen,
})}
>
{this.props.children}
</section>
);
}
}
SidePanel.propTypes = {
from: PropTypes.string.isRequired,
isOpen: PropTypes.bool.isRequired,
children: PropTypes.node,
width: PropTypes.string,
};
export default SidePanel;