fix(segmentation): upgrade cs3d to fix various segmentation bugs (#3885)
This commit is contained in:
1 parent
a8a0bdb2df
commit
b1efe40aa1
26 files changed
+241
-171
No files matched your search
+1
-1
@@ -85,7 +85,7 @@ describe('OHIF Cornerstone Toolbar', () => {
|
||||
// The exact text is slightly dependent on the viewport resolution, so leave a range
|
||||
cy.get('@viewportInfoTopLeft').should($txt => {
|
||||
const text = $txt.text();
|
||||
expect(text).to.include('W:193').include('L:479');
|
||||
expect(text).to.include('W:1185').include('L:479');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.5",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.40.3",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.43.7",
|
||||
"@ohif/core": "3.8.0-beta.42",
|
||||
"@ohif/extension-cornerstone": "3.8.0-beta.42",
|
||||
"@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.42",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import React, {useEffect, useCallback, useMemo} from 'react';
|
||||
import React, { useEffect, useCallback } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { ServicesManager, Types, MeasurementService } from '@ohif/core';
|
||||
import { ViewportGrid, ViewportPane, useViewportGrid } from '@ohif/ui';
|
||||
@@ -9,6 +9,7 @@ import { useAppConfig } from '@state';
|
||||
function ViewerViewportGrid(props) {
|
||||
const { servicesManager, viewportComponents, dataSource } = props;
|
||||
const [viewportGrid, viewportGridService] = useViewportGrid();
|
||||
const [appConfig] = useAppConfig();
|
||||
|
||||
const { layout, activeViewportId, viewports } = viewportGrid;
|
||||
const { numCols, numRows } = layout;
|
||||
@@ -18,18 +19,6 @@ function ViewerViewportGrid(props) {
|
||||
servicesManager as ServicesManager
|
||||
).services;
|
||||
|
||||
/**
|
||||
* Determine whether users need to use the tools directly, or whether they need to click once to activate the viewport before using tools.
|
||||
* If 'activateViewportBeforeInteraction' is available in the 'window.config' object, use its value;
|
||||
* otherwise, default to true.
|
||||
* If true, users need to click once to activate the viewport before using the tools.
|
||||
* if false, tools can be used directly.
|
||||
*/
|
||||
const activateViewportBeforeInteraction = useMemo(() => {
|
||||
const [appConfig] = useAppConfig();
|
||||
return appConfig?.activateViewportBeforeInteraction ?? true;
|
||||
}, []);
|
||||
|
||||
/**
|
||||
* This callback runs after the viewports structure has changed in any way.
|
||||
* On initial display, that means if it has changed by applying a HangingProtocol,
|
||||
@@ -324,7 +313,8 @@ function ViewerViewportGrid(props) {
|
||||
<div
|
||||
data-cy="viewport-pane"
|
||||
className={classNames('flex h-full w-full flex-col', {
|
||||
'pointer-events-none': !isActive && activateViewportBeforeInteraction,
|
||||
'pointer-events-none':
|
||||
!isActive && (appConfig?.activateViewportBeforeInteraction ?? true),
|
||||
})}
|
||||
>
|
||||
<ViewportComponent
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
"@cornerstonejs/codec-libjpeg-turbo-8bit": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjpeg": "^1.2.2",
|
||||
"@cornerstonejs/codec-openjph": "^2.4.2",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.40.3",
|
||||
"@cornerstonejs/dicom-image-loader": "^1.43.7",
|
||||
"@ohif/ui": "3.8.0-beta.42",
|
||||
"cornerstone-math": "0.1.9",
|
||||
"dicom-parser": "^1.8.21"
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import ViewportGridService from './ViewportGridService';
|
||||
import type { PresentationIds } from './ViewportGridService';
|
||||
|
||||
export default ViewportGridService;
|
||||
export type { PresentationIds };
|
||||
@@ -7,6 +7,7 @@ import type {
|
||||
BaseDataSourceConfigurationAPI,
|
||||
BaseDataSourceConfigurationAPIItem,
|
||||
} from './DataSourceConfigurationAPI';
|
||||
import type { PresentationIds } from '../services/ViewportGridService';
|
||||
|
||||
export type * from '../services/CustomizationService/types';
|
||||
// Separate out some generic types
|
||||
@@ -34,4 +35,5 @@ export {
|
||||
DataSourceDefinition,
|
||||
BaseDataSourceConfigurationAPI,
|
||||
BaseDataSourceConfigurationAPIItem,
|
||||
PresentationIds,
|
||||
};
|
||||
@@ -60,10 +60,10 @@ module.exports = {
|
||||
? // Deploy preview: keep it fast!
|
||||
['en']
|
||||
: isI18nStaging
|
||||
? // Staging locales: https://docusaurus-i18n-staging.netlify.app/
|
||||
['en']
|
||||
: // Production locales
|
||||
['en'],
|
||||
? // Staging locales: https://docusaurus-i18n-staging.netlify.app/
|
||||
['en']
|
||||
: // Production locales
|
||||
['en'],
|
||||
},
|
||||
onBrokenLinks: 'warn',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
@@ -88,7 +88,7 @@ module.exports = {
|
||||
},
|
||||
}),
|
||||
path.resolve(__dirname, './pluginOHIFWebpackConfig.js'),
|
||||
'plugin-image-zoom', // 3rd party plugin for image click to pop
|
||||
'docusaurus-plugin-image-zoom', // 3rd party plugin for image click to pop
|
||||
[
|
||||
'@docusaurus/plugin-client-redirects',
|
||||
{
|
||||
@@ -281,6 +281,16 @@ module.exports = {
|
||||
apiKey: 'c220dd24fe4f86248eea3b1238a1fb60',
|
||||
indexName: 'ohif',
|
||||
},
|
||||
// zoom: {
|
||||
// selector: '.markdown > img',
|
||||
// background: {
|
||||
// light: 'rgb(255, 255, 255)',
|
||||
// dark: 'rgb(50, 50, 50)',
|
||||
// },
|
||||
// config: {
|
||||
// // options you can specify via https://github.com/francoischalifour/medium-zoom#usage
|
||||
// },
|
||||
// },
|
||||
navbar: {
|
||||
hideOnScroll: false,
|
||||
logo: {
|
||||
|
||||
@@ -35,12 +35,13 @@
|
||||
"@docusaurus/preset-classic": "2.4.3",
|
||||
"@docusaurus/remark-plugin-npm2yarn": "2.4.3",
|
||||
"@docusaurus/theme-live-codeblock": "2.4.3",
|
||||
"docusaurus-plugin-image-zoom": "^1.0.1",
|
||||
"@docusaurus/theme-classic": "2.4.3",
|
||||
"@mdx-js/react": "^1.6.21",
|
||||
"@svgr/webpack": "^5.5.0",
|
||||
"classnames": "^2.3.2",
|
||||
"clsx": "^1.1.1",
|
||||
"file-loader": "^6.2.0",
|
||||
"plugin-image-zoom": "ataft/plugin-image-zoom",
|
||||
"url-loader": "^4.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
||||
@@ -45,7 +45,7 @@ function ToolSettings({ options }) {
|
||||
onChange={e => option.onChange(e)}
|
||||
allowNumberEdit={true}
|
||||
showAdjustmentArrows={false}
|
||||
inputClassName="ml-1 w-4/5"
|
||||
inputClassName="ml-1 w-4/5 cursor-pointer"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import ThumbnailType from './ThumbnailType';
|
||||
import type { PresentationIds } from '../contextProviders/getPresentationIds';
|
||||
|
||||
// A few miscellaneous types declared inline here.
|
||||
|
||||
|
||||
Reference in new issue
Block a user