Skip to content

Commit

Permalink
Merge branch 'master' into fix/first-image-load-time
Browse files Browse the repository at this point in the history
  • Loading branch information
igoroctaviano authored Jan 9, 2024
2 parents b8e06c0 + 7c551f5 commit 1225067
Show file tree
Hide file tree
Showing 70 changed files with 576 additions and 281 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

# [3.8.0-beta.43](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.42...v3.8.0-beta.43) (2024-01-09)


### Bug Fixes

* **segmentation:** upgrade cs3d to fix various segmentation bugs ([#3885](https://github.com/OHIF/Viewers/issues/3885)) ([b1efe40](https://github.com/OHIF/Viewers/commit/b1efe40aa146e4052cc47b3f774cabbb47a8d1a6))





# [3.8.0-beta.42](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.41...v3.8.0-beta.42) (2024-01-08)

**Note:** Version bump only for package ohif-monorepo-root
Expand Down
2 changes: 1 addition & 1 deletion commit.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d181eb4fdc064ef5c5fada42abb6d9a362284b01
b1efe40aa146e4052cc47b3f774cabbb47a8d1a6
11 changes: 11 additions & 0 deletions extensions/cornerstone-dicom-rt/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

# [3.8.0-beta.43](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.42...v3.8.0-beta.43) (2024-01-09)


### Bug Fixes

* **segmentation:** upgrade cs3d to fix various segmentation bugs ([#3885](https://github.com/OHIF/Viewers/issues/3885)) ([b1efe40](https://github.com/OHIF/Viewers/commit/b1efe40aa146e4052cc47b3f774cabbb47a8d1a6))





# [3.8.0-beta.42](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.41...v3.8.0-beta.42) (2024-01-08)

**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
Expand Down
10 changes: 5 additions & 5 deletions extensions/cornerstone-dicom-rt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-rt",
"version": "3.8.0-beta.42",
"version": "3.8.0-beta.43",
"description": "DICOM RT read workflow",
"author": "OHIF",
"license": "MIT",
Expand Down Expand Up @@ -31,10 +31,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.42",
"@ohif/extension-cornerstone": "3.8.0-beta.42",
"@ohif/extension-default": "3.8.0-beta.42",
"@ohif/i18n": "3.8.0-beta.42",
"@ohif/core": "3.8.0-beta.43",
"@ohif/extension-cornerstone": "3.8.0-beta.43",
"@ohif/extension-default": "3.8.0-beta.43",
"@ohif/i18n": "3.8.0-beta.43",
"prop-types": "^15.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ function OHIFCornerstoneRTViewport(props) {
}, [servicesManager, viewportId, rtDisplaySet, rtIsLoading]);

useEffect(() => {
// I'm not sure what is this, since in RT we support Overlapping segmnets

Check failure on line 171 in extensions/cornerstone-dicom-rt/src/viewports/OHIFCornerstoneRTViewport.tsx

View workflow job for this annotation

GitHub Actions / Check for spelling errors

segmnets ==> segments
// via contours
const { unsubscribe } = segmentationService.subscribe(
segmentationService.EVENTS.SEGMENTATION_LOADING_COMPLETE,
evt => {
Expand Down
11 changes: 11 additions & 0 deletions extensions/cornerstone-dicom-seg/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

# [3.8.0-beta.43](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.42...v3.8.0-beta.43) (2024-01-09)


### Bug Fixes

* **segmentation:** upgrade cs3d to fix various segmentation bugs ([#3885](https://github.com/OHIF/Viewers/issues/3885)) ([b1efe40](https://github.com/OHIF/Viewers/commit/b1efe40aa146e4052cc47b3f774cabbb47a8d1a6))





# [3.8.0-beta.42](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.41...v3.8.0-beta.42) (2024-01-08)

**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
Expand Down
16 changes: 8 additions & 8 deletions extensions/cornerstone-dicom-seg/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-seg",
"version": "3.8.0-beta.42",
"version": "3.8.0-beta.43",
"description": "DICOM SEG read workflow",
"author": "OHIF",
"license": "MIT",
Expand Down Expand Up @@ -31,10 +31,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.42",
"@ohif/extension-cornerstone": "3.8.0-beta.42",
"@ohif/extension-default": "3.8.0-beta.42",
"@ohif/i18n": "3.8.0-beta.42",
"@ohif/core": "3.8.0-beta.43",
"@ohif/extension-cornerstone": "3.8.0-beta.43",
"@ohif/extension-default": "3.8.0-beta.43",
"@ohif/i18n": "3.8.0-beta.43",
"prop-types": "^15.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand All @@ -44,9 +44,9 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^1.40.3",
"@cornerstonejs/tools": "^1.40.3",
"@kitware/vtk.js": "27.3.1",
"@cornerstonejs/adapters": "^1.43.7",
"@cornerstonejs/tools": "^1.43.7",
"@kitware/vtk.js": "29.3.0",
"react-color": "^2.19.3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,15 @@ async function _loadSegments({ extensionManager, servicesManager, segDisplaySet,
}
});

if (results.overlappingSegments) {
uiNotificationService.show({
title: 'Overlapping Segments',
message:
'Unsupported overlapping segments detected, segmentation rendering results may be incorrect.',
type: 'warning',
});
}

if (!usedRecommendedDisplayCIELabValue) {
// Display a notification about the non-utilization of RecommendedDisplayCIELabValue
uiNotificationService.show({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createReportAsync } from '@ohif/extension-default';
import React, { useEffect, useState, useCallback } from 'react';
import PropTypes from 'prop-types';
import { SegmentationGroupTable, LegacyButtonGroup, LegacyButton } from '@ohif/ui';
import { SegmentationGroupTable } from '@ohif/ui';

import callInputDialog from './callInputDialog';
import callColorPickerDialog from './colorPickerDialog';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const initialState = {
},
ThresholdBrush: {
brushSize: 15,
thresholdRange: [-500, 500],
thresholdRange: null,
},
activeTool: null,
};
Expand Down Expand Up @@ -88,6 +88,8 @@ function SegmentationToolbox({ servicesManager, extensionManager }) {

const setToolActive = useCallback(
toolName => {
initializeThresholdValue(toolName);

toolbarService.recordInteraction({
interactionType: 'tool',
commands: [
Expand Down Expand Up @@ -178,6 +180,24 @@ function SegmentationToolbox({ servicesManager, extensionManager }) {
[toolGroupService]
);

function initializeThresholdValue(toolName: any) {
if (state.ThresholdBrush.thresholdRange === null) {
// set the default threshold range from the tool configuration
const toolGroupIds = toolGroupService.getToolGroupIds();
const toolGroupId = toolGroupIds[0];
const toolGroup = toolGroupService.getToolGroup(toolGroupId);
const toolConfig = toolGroup.getToolConfiguration(toolName);
const defaultThresholdRange = toolConfig?.strategySpecificConfiguration?.THRESHOLD?.threshold;
dispatch({
type: ACTIONS.SET_TOOL_CONFIG,
payload: {
tool: 'ThresholdBrush',
config: { thresholdRange: defaultThresholdRange },
},
});
}
}

const onBrushSizeChange = useCallback(
(valueAsStringOrNumber, toolCategory) => {
const value = Number(valueAsStringOrNumber);
Expand All @@ -200,8 +220,8 @@ function SegmentationToolbox({ servicesManager, extensionManager }) {
const handleRangeChange = useCallback(
newRange => {
if (
newRange[0] === state.ThresholdBrush.thresholdRange[0] &&
newRange[1] === state.ThresholdBrush.thresholdRange[1]
newRange[0] === state.ThresholdBrush.thresholdRange?.[0] &&
newRange[1] === state.ThresholdBrush.thresholdRange?.[1]
) {
return;
}
Expand All @@ -213,7 +233,7 @@ function SegmentationToolbox({ servicesManager, extensionManager }) {
const toolGroup = toolGroupService.getToolGroup(toolGroupId);
toolGroup.setToolConfiguration(toolName, {
strategySpecificConfiguration: {
THRESHOLD_INSIDE_CIRCLE: {
THRESHOLD: {
threshold: newRange,
},
},
Expand Down Expand Up @@ -365,7 +385,7 @@ function SegmentationToolbox({ servicesManager, extensionManager }) {
<InputDoubleRange
values={state.ThresholdBrush.thresholdRange}
onChange={handleRangeChange}
minValue={-1000}
minValue={-1000} // Todo: these should be configurable
maxValue={1000}
step={1}
showLabel={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,6 @@ function OHIFCornerstoneSEGViewport(props) {
if (evt.segDisplaySet.displaySetInstanceUID === segDisplaySet.displaySetInstanceUID) {
setSegIsLoading(false);
}

if (evt.overlappingSegments) {
uiNotificationService.show({
title: 'Overlapping Segments',
message: 'Overlapping segments detected which is not currently supported',
type: 'warning',
});
}
}
);

Expand Down
11 changes: 11 additions & 0 deletions extensions/cornerstone-dicom-sr/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

# [3.8.0-beta.43](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.42...v3.8.0-beta.43) (2024-01-09)


### Bug Fixes

* **segmentation:** upgrade cs3d to fix various segmentation bugs ([#3885](https://github.com/OHIF/Viewers/issues/3885)) ([b1efe40](https://github.com/OHIF/Viewers/commit/b1efe40aa146e4052cc47b3f774cabbb47a8d1a6))





# [3.8.0-beta.42](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.41...v3.8.0-beta.42) (2024-01-08)

**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
Expand Down
16 changes: 8 additions & 8 deletions extensions/cornerstone-dicom-sr/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-sr",
"version": "3.8.0-beta.42",
"version": "3.8.0-beta.43",
"description": "OHIF extension for an SR Cornerstone Viewport",
"author": "OHIF",
"license": "MIT",
Expand Down Expand Up @@ -32,10 +32,10 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.8.0-beta.42",
"@ohif/extension-cornerstone": "3.8.0-beta.42",
"@ohif/extension-measurement-tracking": "3.8.0-beta.42",
"@ohif/ui": "3.8.0-beta.42",
"@ohif/core": "3.8.0-beta.43",
"@ohif/extension-cornerstone": "3.8.0-beta.43",
"@ohif/extension-measurement-tracking": "3.8.0-beta.43",
"@ohif/ui": "3.8.0-beta.43",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
Expand All @@ -44,9 +44,9 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^1.40.3",
"@cornerstonejs/core": "^1.40.3",
"@cornerstonejs/tools": "^1.40.3",
"@cornerstonejs/adapters": "^1.43.7",
"@cornerstonejs/core": "^1.43.7",
"@cornerstonejs/tools": "^1.43.7",
"classnames": "^2.3.2"
}
}
11 changes: 11 additions & 0 deletions extensions/cornerstone/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

# [3.8.0-beta.43](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.42...v3.8.0-beta.43) (2024-01-09)


### Bug Fixes

* **segmentation:** upgrade cs3d to fix various segmentation bugs ([#3885](https://github.com/OHIF/Viewers/issues/3885)) ([b1efe40](https://github.com/OHIF/Viewers/commit/b1efe40aa146e4052cc47b3f774cabbb47a8d1a6))





# [3.8.0-beta.42](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.41...v3.8.0-beta.42) (2024-01-08)

**Note:** Version bump only for package @ohif/extension-cornerstone
Expand Down
18 changes: 9 additions & 9 deletions extensions/cornerstone/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone",
"version": "3.8.0-beta.42",
"version": "3.8.0-beta.43",
"description": "OHIF extension for Cornerstone",
"author": "OHIF",
"license": "MIT",
Expand Down Expand Up @@ -36,9 +36,9 @@
"@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",
"@ohif/core": "3.8.0-beta.42",
"@ohif/ui": "3.8.0-beta.42",
"@cornerstonejs/dicom-image-loader": "^1.43.7",
"@ohif/core": "3.8.0-beta.43",
"@ohif/ui": "3.8.0-beta.43",
"dcmjs": "^0.29.12",
"dicom-parser": "^1.8.21",
"hammerjs": "^2.0.8",
Expand All @@ -52,11 +52,11 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^1.40.3",
"@cornerstonejs/core": "^1.40.3",
"@cornerstonejs/streaming-image-volume-loader": "^1.40.3",
"@cornerstonejs/tools": "^1.40.3",
"@kitware/vtk.js": "27.3.1",
"@cornerstonejs/adapters": "^1.43.7",
"@cornerstonejs/core": "^1.43.7",
"@cornerstonejs/streaming-image-volume-loader": "^1.43.7",
"@cornerstonejs/tools": "^1.43.7",
"@kitware/vtk.js": "29.3.01",
"html2canvas": "^1.4.1",
"lodash.debounce": "4.0.8",
"lodash.merge": "^4.6.2",
Expand Down
6 changes: 3 additions & 3 deletions extensions/cornerstone/src/init.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,10 @@ export default async function init({

/**
* Runs error handler for failed requests.
* @param event
* @param event
*/
const imageLoadFailedHandler = ({ detail }) => {
const handler = errorHandler.getHTTPErrorHandler()
const handler = errorHandler.getHTTPErrorHandler();
handler(detail.error);
};

Expand Down Expand Up @@ -290,7 +290,7 @@ export default async function init({
});
eventTarget.addEventListener(EVENTS.IMAGE_LOAD_FAILED, imageLoadFailedHandler);
eventTarget.addEventListener(EVENTS.IMAGE_LOAD_ERROR, imageLoadFailedHandler);

function elementEnabledHandler(evt) {
const { element } = evt.detail;

Expand Down
Loading

0 comments on commit 1225067

Please sign in to comment.