diff --git a/.webpack/webpack.base.js b/.webpack/webpack.base.js
index 08c3aa7f0c..6efedd0d2c 100644
--- a/.webpack/webpack.base.js
+++ b/.webpack/webpack.base.js
@@ -113,7 +113,9 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => {
},
},
cssToJavaScript,
- stylusToJavaScript,
+ // Note: Only uncomment the following if you are using the old style of stylus in v2
+ // Also you need to uncomment this platform/app/.webpack/rules/extractStyleChunks.js
+ // stylusToJavaScript,
{
test: /\.wasm/,
type: 'asset/resource',
diff --git a/extensions/cornerstone-dicom-seg/package.json b/extensions/cornerstone-dicom-seg/package.json
index 487471f6d1..df8edf5438 100644
--- a/extensions/cornerstone-dicom-seg/package.json
+++ b/extensions/cornerstone-dicom-seg/package.json
@@ -43,7 +43,6 @@
"react-router-dom": "^6.8.1"
},
"dependencies": {
- "@cornerstonejs/tools": "^1.16.0",
"@babel/runtime": "^7.20.13",
"@cornerstonejs/adapters": "^1.20.3",
"@cornerstonejs/tools": "^1.20.3",
diff --git a/extensions/cornerstone-dicom-seg/src/panels/Toolbox/ThresholdSettingsPreset.tsx b/extensions/cornerstone-dicom-seg/src/panels/Toolbox/ThresholdSettingsPreset.tsx
deleted file mode 100644
index f708233c30..0000000000
--- a/extensions/cornerstone-dicom-seg/src/panels/Toolbox/ThresholdSettingsPreset.tsx
+++ /dev/null
@@ -1,88 +0,0 @@
-import React, { useState } from 'react';
-import { InputDoubleRange, Select } from '@ohif/ui';
-
-const defaultOptions = [
- {
- value: 'Soft tissue',
- label: 'Soft tissue',
- range: [-160, 240] as [number, number],
- },
- {
- value: 'Lung',
- label: 'Lung',
- range: [-1350, 150] as [number, number],
- },
- {
- value: 'Liver',
- label: 'Liver',
- range: [15, 165] as [number, number],
- },
- {
- value: 'Bone',
- label: 'Bone',
- range: [-770, 1730] as [number, number],
- },
- {
- value: 'Brain',
- label: 'Brain',
- range: [0, 80] as [number, number],
- },
-];
-
-function ThresholdSettings({ onRangeChange }) {
- const [options, setOptions] = useState(defaultOptions);
- const [selectedPreset, setSelectedPreset] = useState(defaultOptions[0].value);
-
- const handleRangeChange = newRange => {
- const selectedOption = options.find(o => o.value === selectedPreset);
-
- if (newRange[0] === selectedOption.range[0] && newRange[1] === selectedOption.range[1]) {
- return;
- }
-
- onRangeChange(newRange);
-
- const updatedOptions = options.map(o => {
- if (o.value === selectedPreset) {
- return {
- ...o,
- range: newRange,
- };
- }
- return o;
- });
-
- setOptions(updatedOptions);
- };
-
- const selectedPresetRange = options.find(ds => ds.value === selectedPreset).range;
-
- return (
-
-
-
Threshold
-
-
-
-
- );
-}
-
-export default ThresholdSettings;
diff --git a/extensions/cornerstone/src/commandsModule.ts b/extensions/cornerstone/src/commandsModule.ts
index 805f8a2d52..9ca0dbb335 100644
--- a/extensions/cornerstone/src/commandsModule.ts
+++ b/extensions/cornerstone/src/commandsModule.ts
@@ -32,26 +32,10 @@ function commandsModule({
cornerstoneViewportService,
uiNotificationService,
measurementService,
- hangingProtocolService,
- segmentationService,
} = servicesManager.services as CornerstoneServices;
const { measurementServiceSource } = this;
- function _getMatchedViewportsToolGroupIds() {
- const { viewportMatchDetails } = hangingProtocolService.getMatchDetails();
- const toolGroupIds = [];
-
- viewportMatchDetails.forEach((matchDetails, viewportIndex) => {
- const { toolGroupId } = matchDetails.viewportOptions;
- if (toolGroupIds.indexOf(toolGroupId) === -1) {
- toolGroupIds.push(toolGroupId);
- }
- });
-
- return toolGroupIds;
- }
-
function _getActiveViewportEnabledElement() {
return getActiveViewportEnabledElement(viewportGridService);
}
diff --git a/extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts b/extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts
index 1e9aada40b..eda99b7b2f 100644
--- a/extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts
+++ b/extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts
@@ -415,6 +415,7 @@ class SegmentationService extends PubSubService {
return segments[activeSegmentIndex];
}
+
/**
* Get specific segmentation by its id.
*
@@ -1333,6 +1334,8 @@ class SegmentationService extends PubSubService {
}
}
+ this._setDisplaySetIsHydrated(segmentationId, false);
+
this._broadcastEvent(this.EVENTS.SEGMENTATION_REMOVED, {
segmentationId,
});
diff --git a/extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts b/extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts
index 070e05cbea..497df2d544 100644
--- a/extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts
+++ b/extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts
@@ -533,6 +533,7 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi
const overlayDisplaySet = displaySetInstanceUIDs
.map(displaySetService.getDisplaySetByUID)
.find(displaySet => displaySet?.isOverlayDisplaySet);
+
if (overlayDisplaySet) {
this.addOverlayRepresentationForDisplaySet(overlayDisplaySet, viewport);
} else {
diff --git a/modes/segmentation/.prettierrc b/modes/segmentation/.prettierrc
index b80ec6b347..28448abdf4 100644
--- a/modes/segmentation/.prettierrc
+++ b/modes/segmentation/.prettierrc
@@ -1,8 +1,11 @@
{
"trailingComma": "es5",
- "printWidth": 80,
+ "printWidth": 100,
"proseWrap": "always",
"tabWidth": 2,
"semi": true,
- "singleQuote": true
+ "singleQuote": true,
+ "arrowParens": "avoid",
+ "singleAttributePerLine": true,
+ "endOfLine": "auto"
}
diff --git a/modes/segmentation/src/index.tsx b/modes/segmentation/src/index.tsx
index e63a5a54ba..a6f552c5ae 100644
--- a/modes/segmentation/src/index.tsx
+++ b/modes/segmentation/src/index.tsx
@@ -17,10 +17,8 @@ const cornerstone = {
const segmentation = {
panel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',
- panelTool:
- '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentationWithTools',
- sopClassHandler:
- '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
+ panelTool: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentationWithTools',
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg',
};
@@ -52,8 +50,7 @@ function modeFactory({ modeConfiguration }) {
* Services and other resources.
*/
onModeEnter: ({ servicesManager, extensionManager, commandsManager }) => {
- const { measurementService, toolbarService, toolGroupService } =
- servicesManager.services;
+ const { measurementService, toolbarService, toolGroupService } = servicesManager.services;
measurementService.clearMeasurements();
diff --git a/modes/segmentation/src/initToolGroups.ts b/modes/segmentation/src/initToolGroups.ts
index da9e0ffa57..58204839ee 100644
--- a/modes/segmentation/src/initToolGroups.ts
+++ b/modes/segmentation/src/initToolGroups.ts
@@ -20,22 +20,13 @@ function createTools(utilityModule) {
const { toolNames, Enums } = utilityModule.exports;
return {
active: [
- {
- toolName: toolNames.WindowLevel,
- bindings: [{ mouseButton: Enums.MouseBindings.Primary }],
- },
- {
- toolName: toolNames.Pan,
- bindings: [{ mouseButton: Enums.MouseBindings.Auxiliary }],
- },
- {
- toolName: toolNames.Zoom,
- bindings: [{ mouseButton: Enums.MouseBindings.Secondary }],
- },
+ { toolName: toolNames.WindowLevel, bindings: [{ mouseButton: Enums.MouseBindings.Primary }] },
+ { toolName: toolNames.Pan, bindings: [{ mouseButton: Enums.MouseBindings.Auxiliary }] },
+ { toolName: toolNames.Zoom, bindings: [{ mouseButton: Enums.MouseBindings.Secondary }] },
{ toolName: toolNames.StackScrollMouseWheel, bindings: [] },
],
passive: Object.keys(brushInstanceNames)
- .map((brushName) => ({
+ .map(brushName => ({
toolName: brushName,
parentTool: 'Brush',
configuration: {
@@ -54,12 +45,7 @@ function createTools(utilityModule) {
};
}
-function initDefaultToolGroup(
- extensionManager,
- toolGroupService,
- commandsManager,
- toolGroupId
-) {
+function initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, toolGroupId) {
const utilityModule = extensionManager.getModuleEntry(
'@ohif/extension-cornerstone.utilityModule.tools'
);
@@ -89,12 +75,7 @@ function initMPRToolGroup(extensionManager, toolGroupService, commandsManager) {
}
function initToolGroups(extensionManager, toolGroupService, commandsManager) {
- initDefaultToolGroup(
- extensionManager,
- toolGroupService,
- commandsManager,
- 'default'
- );
+ initDefaultToolGroup(extensionManager, toolGroupService, commandsManager, 'default');
initMPRToolGroup(extensionManager, toolGroupService, commandsManager);
}
diff --git a/modes/segmentation/src/toolbarButtons.ts b/modes/segmentation/src/toolbarButtons.ts
index ba251639dc..b17a33deae 100644
--- a/modes/segmentation/src/toolbarButtons.ts
+++ b/modes/segmentation/src/toolbarButtons.ts
@@ -62,7 +62,7 @@ const toolGroupIds = ['default', 'mpr', 'SRToolGroup'];
* @returns {Array} an array of 'setToolActive' commands
*/
function _createSetToolActiveCommands(toolName) {
- const temp = toolGroupIds.map((toolGroupId) => ({
+ const temp = toolGroupIds.map(toolGroupId => ({
commandName: 'setToolActive',
commandOptions: {
toolGroupId,
diff --git a/platform/app/.webpack/rules/extractStyleChunks.js b/platform/app/.webpack/rules/extractStyleChunks.js
index f49173230e..f7c467fc63 100644
--- a/platform/app/.webpack/rules/extractStyleChunks.js
+++ b/platform/app/.webpack/rules/extractStyleChunks.js
@@ -2,19 +2,20 @@ const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin');
function extractStyleChunks(isProdBuild) {
return [
- {
- test: /\.styl$/,
- use: [
- {
- loader: ExtractCssChunksPlugin.loader,
- options: {
- hot: !isProdBuild,
- },
- },
- { loader: 'css-loader' },
- { loader: 'stylus-loader' },
- ],
- },
+ // If you are using the old stylus, you should uncomment this
+ // {
+ // test: /\.styl$/,
+ // use: [
+ // {
+ // loader: ExtractCssChunksPlugin.loader,
+ // options: {
+ // hot: !isProdBuild,
+ // },
+ // },
+ // { loader: 'css-loader' },
+ // { loader: 'stylus-loader' },
+ // ],
+ // },
{
test: /\.(sa|sc|c)ss$/,
use: [
diff --git a/platform/app/src/components/ViewportGrid.tsx b/platform/app/src/components/ViewportGrid.tsx
index f4b8e17d49..e6e1c23947 100644
--- a/platform/app/src/components/ViewportGrid.tsx
+++ b/platform/app/src/components/ViewportGrid.tsx
@@ -379,6 +379,7 @@ function _getViewportComponent(displaySets, viewportComponents, uiNotificationSe
}
}
+ console.log("Can't show displaySet", SOPClassHandlerId, displaySets[0]);
uiNotificationService.show({
title: 'Viewport Not Supported Yet',
message: `Cannot display SOPClassUID of ${displaySets[0].SOPClassUID} yet`,
diff --git a/platform/app/src/routes/WorkList/WorkList.tsx b/platform/app/src/routes/WorkList/WorkList.tsx
index 013615808e..865c6fbb9e 100644
--- a/platform/app/src/routes/WorkList/WorkList.tsx
+++ b/platform/app/src/routes/WorkList/WorkList.tsx
@@ -12,8 +12,6 @@ import { useAppConfig } from '@state';
import { useDebounce, useSearchParams } from '@hooks';
import { utils, hotkeys, ServicesManager } from '@ohif/core';
-// New
-
import {
Icon,
StudyListExpandedRow,
diff --git a/platform/cli/templates/mode/src/index.tsx b/platform/cli/templates/mode/src/index.tsx
index cdbf9e41a0..3f3f806bec 100644
--- a/platform/cli/templates/mode/src/index.tsx
+++ b/platform/cli/templates/mode/src/index.tsx
@@ -7,24 +7,19 @@ const ohif = {
sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack',
hangingProtocol: '@ohif/extension-default.hangingProtocolModule.default',
thumbnailList: '@ohif/extension-default.panelModule.seriesList',
- thumbnailListTracking:
- '@ohif/extension-measurement-tracking.panelModule.seriesList',
- viewport:
- '@ohif/extension-measurement-tracking.viewportModule.cornerstone-tracked',
- measurements:
- '@ohif/extension-measurement-tracking.panelModule.trackedMeasurements',
+ thumbnailListTracking: '@ohif/extension-measurement-tracking.panelModule.seriesList',
+ viewport: '@ohif/extension-measurement-tracking.viewportModule.cornerstone-tracked',
+ measurements: '@ohif/extension-measurement-tracking.panelModule.trackedMeasurements',
measurementNoTracking: '@ohif/extension-default.panelModule.measure',
};
const dicomsr = {
- sopClassHandler:
- '@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr',
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-sr.sopClassHandlerModule.dicom-sr',
viewport: '@ohif/extension-cornerstone-dicom-sr.viewportModule.dicom-sr',
};
const dicomvideo = {
- sopClassHandler:
- '@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video',
+ sopClassHandler: '@ohif/extension-dicom-video.sopClassHandlerModule.dicom-video',
viewport: '@ohif/extension-dicom-video.viewportModule.dicom-video',
};
@@ -34,16 +29,14 @@ const dicompdf = {
};
const dicomSeg = {
- sopClassHandler:
- '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-seg.sopClassHandlerModule.dicom-seg',
viewport: '@ohif/extension-cornerstone-dicom-seg.viewportModule.dicom-seg',
panel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation',
};
const dicomRT = {
viewport: '@ohif/extension-cornerstone-dicom-rt.viewportModule.dicom-rt',
- sopClassHandler:
- '@ohif/extension-cornerstone-dicom-rt.sopClassHandlerModule.dicom-rt',
+ sopClassHandler: '@ohif/extension-cornerstone-dicom-rt.sopClassHandlerModule.dicom-rt',
};
const extensionDependencies = {
diff --git a/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts b/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts
index 5c32f48f8c..01fdd8f6ef 100644
--- a/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts
+++ b/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts
@@ -1393,7 +1393,7 @@ export default class HangingProtocolService extends PubSubService {
const matchingScores = [];
let highestSeriesMatchingScore = 0;
- // console.log('ProtocolEngine::matchImages', studyMatchingRules, seriesMatchingRules);
+ console.log('ProtocolEngine::matchImages', studyMatchingRules, seriesMatchingRules);
const matchActiveOnly = this.protocol.numberOfPriorsReferenced === -1;
this.studies.forEach((study, studyInstanceUIDsIndex) => {
// Skip non-active if active only
diff --git a/platform/ui/src/index.js b/platform/ui/src/index.js
index c30b87b4db..1acacefd16 100644
--- a/platform/ui/src/index.js
+++ b/platform/ui/src/index.js
@@ -84,7 +84,6 @@ export {
Select,
SegmentationTable,
SegmentationGroupTable,
- SegmentationGroup,
SidePanel,
SplitButton,
StudyBrowser,
diff --git a/version.json b/version.json
index 3ec7dc56a0..57c8dfd0f2 100644
--- a/version.json
+++ b/version.json
@@ -1,4 +1,4 @@
{
"version": "3.7.0-beta.106",
"commit": "a9a6ad50eae67b43b8b34efc07182d788cacdcfe"
-}
+}
\ No newline at end of file