Compare commits

...
Author SHA1 Message Date
ohif-bot 2132f0777e chore(version): Update package versions [skip ci] 2023-09-19 14:19:42 +00:00
ohif-bot 10ecd4997b chore(version): version.json [skip ci] 2023-09-19 14:19:34 +00:00
AlirezaandJoe Boccanfuso 2d7721cb58 fix(keyCloak): fix openresty keycloak deployment recipe (#3655)
Co-authored-by: Joe Boccanfuso <joe.boccanfuso@radicalimaging.com>
2023-09-19 10:11:32 -04:00
ohif-bot c49b833274 chore(version): Update package versions [skip ci] 2023-09-18 15:10:25 +00:00
ohif-bot 3279df543f chore(version): version.json [skip ci] 2023-09-18 15:10:17 +00:00
Joe Boccanfuso 2737903386 fix(DicomJson): retrieve.series.metadata method should be async (#3659) 2023-09-18 11:02:27 -04:00
ohif-bot 9ccdaef812 chore(version): Update package versions [skip ci] 2023-09-15 14:58:43 +00:00
ohif-bot 8c6764a936 chore(version): version.json [skip ci] 2023-09-15 14:58:36 +00:00
Bill Wallace 38af3112ec fix(measurements): Update the calibration tool to match changes in CS3D (#3505)
This change makes the OHIF side consistent with the CS3D user calibration settings, and will correctly display px and rounding values consistent with the CS3D display.
2023-09-15 10:50:23 -04:00
74 changed files with 1188 additions and 376 deletions

No files matched your search

-48
View File
@@ -1,48 +0,0 @@
worker_processes 1;
events { worker_connections 1024; }
http {
upstream orthanc-server {
server orthanc:8042;
}
server {
listen [::]:80 default_server;
listen 80;
# CORS Magic
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow_Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
location / {
if ($request_method = 'OPTIONS') {
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow_Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
add_header 'Access-Control-Max-Age' 1728000;
add_header 'Content-Type' 'text/plain charset=UTF-8';
add_header 'Content-Length' 0;
return 204;
}
proxy_pass http://orthanc:8042;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
# CORS Magic
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow_Credentials' 'true';
add_header 'Access-Control-Allow-Headers' 'Authorization,Accept,Origin,DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
add_header 'Access-Control-Allow-Methods' 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
}
}
}
-89
View File
@@ -1,89 +0,0 @@
{
"Name": "Orthanc inside Docker",
"StorageDirectory": "/var/lib/orthanc/db",
"IndexDirectory": "/var/lib/orthanc/db",
"StorageCompression": false,
"MaximumStorageSize": 0,
"MaximumPatientCount": 0,
"LuaScripts": [],
"Plugins": ["/usr/share/orthanc/plugins", "/usr/local/share/orthanc/plugins"],
"ConcurrentJobs": 2,
"HttpServerEnabled": true,
"HttpPort": 8042,
"HttpDescribeErrors": true,
"HttpCompressionEnabled": true,
"DicomServerEnabled": true,
"DicomAet": "ORTHANC",
"DicomCheckCalledAet": false,
"DicomPort": 4242,
"DefaultEncoding": "Latin1",
"DeflatedTransferSyntaxAccepted": true,
"JpegTransferSyntaxAccepted": true,
"Jpeg2000TransferSyntaxAccepted": true,
"JpegLosslessTransferSyntaxAccepted": true,
"JpipTransferSyntaxAccepted": true,
"Mpeg2TransferSyntaxAccepted": true,
"RleTransferSyntaxAccepted": true,
"UnknownSopClassAccepted": false,
"DicomScpTimeout": 30,
"RemoteAccessAllowed": true,
"SslEnabled": false,
"SslCertificate": "certificate.pem",
"AuthenticationEnabled": false,
"RegisteredUsers": {
"test": "test"
},
"DicomModalities": {},
"DicomModalitiesInDatabase": false,
"DicomAlwaysAllowEcho": true,
"DicomAlwaysAllowStore": true,
"DicomCheckModalityHost": false,
"DicomScuTimeout": 10,
"OrthancPeers": {},
"OrthancPeersInDatabase": false,
"HttpProxy": "",
"HttpVerbose": true,
"HttpTimeout": 10,
"HttpsVerifyPeers": true,
"HttpsCACertificates": "",
"UserMetadata": {},
"UserContentType": {},
"StableAge": 60,
"StrictAetComparison": false,
"StoreMD5ForAttachments": true,
"LimitFindResults": 0,
"LimitFindInstances": 0,
"LimitJobs": 10,
"LogExportedResources": false,
"KeepAlive": true,
"TcpNoDelay": true,
"HttpThreadsCount": 50,
"StoreDicom": true,
"DicomAssociationCloseDelay": 5,
"QueryRetrieveSize": 10,
"CaseSensitivePN": false,
"LoadPrivateDictionary": true,
"Dictionary": {},
"SynchronousCMove": true,
"JobsHistorySize": 10,
"SaveJobs": true,
"OverwriteInstances": false,
"MediaArchiveSize": 1,
"StorageAccessOnFind": "Always",
"MetricsEnabled": true,
"DicomWeb": {
"Enable": true,
"Root": "/dicom-web/",
"EnableWado": true,
"WadoRoot": "/wado",
"Host": "127.0.0.1",
"Ssl": false,
"StowMaxInstances": 10,
"StowMaxSize": 10,
"QidoCaseSensitive": false
}
}
-23
View File
@@ -1,23 +0,0 @@
version: '3.5'
services:
orthanc:
image: jodogne/orthanc-plugins:1.11.0
hostname: orthanc
volumes:
# Config
- ./config/orthanc.json:/etc/orthanc/orthanc.json:ro
# Persist data
- ./volumes/orthanc-db/:/var/lib/orthanc/db/
ports:
- '4242:4242' # DICOM
- '8042:8042' # Web
restart: unless-stopped
nginx:
image: nginx:latest
volumes:
- ./config/nginx.conf:/etc/nginx/nginx.conf
ports:
- '80:80' #ngnix proxy
depends_on:
- orthanc
@@ -1,2 +0,0 @@
*
!.gitignore
+33
View File
@@ -3,6 +3,39 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
### Bug Fixes
* **keyCloak:** fix openresty keycloak deployment recipe ([#3655](https://github.com/OHIF/Viewers/issues/3655)) ([2d7721c](https://github.com/OHIF/Viewers/commit/2d7721cb581f55dc49e3baeca2411b18dd78ad74))
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
### Bug Fixes
* **DicomJson:** retrieve.series.metadata method should be async ([#3659](https://github.com/OHIF/Viewers/issues/3659)) ([2737903](https://github.com/OHIF/Viewers/commit/2737903386cf97399473e0fa64fe53ad14da155a))
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
### Bug Fixes
* **measurements:** Update the calibration tool to match changes in CS3D ([#3505](https://github.com/OHIF/Viewers/issues/3505)) ([38af311](https://github.com/OHIF/Viewers/commit/38af3112ec1f94f36c0ef64ff1cf9d21c0981c81))
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
+1 -1
View File
@@ -1 +1 @@
74e62a176374f720080d4e777972f70e7f2d8b2b
2d7721cb581f55dc49e3baeca2411b18dd78ad74
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-rt",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "DICOM RT read workflow",
"author": "OHIF",
"license": "MIT",
@@ -31,10 +31,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/extension-cornerstone": "3.7.0-beta.73",
"@ohif/extension-default": "3.7.0-beta.73",
"@ohif/i18n": "3.7.0-beta.73",
"@ohif/core": "3.7.0-beta.76",
"@ohif/extension-cornerstone": "3.7.0-beta.76",
"@ohif/extension-default": "3.7.0-beta.76",
"@ohif/i18n": "3.7.0-beta.76",
"prop-types": "^15.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-seg",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "DICOM SEG read workflow",
"author": "OHIF",
"license": "MIT",
@@ -31,10 +31,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/extension-cornerstone": "3.7.0-beta.73",
"@ohif/extension-default": "3.7.0-beta.73",
"@ohif/i18n": "3.7.0-beta.73",
"@ohif/core": "3.7.0-beta.76",
"@ohif/extension-cornerstone": "3.7.0-beta.76",
"@ohif/extension-default": "3.7.0-beta.76",
"@ohif/i18n": "3.7.0-beta.76",
"prop-types": "^15.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone-dicom-sr",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "OHIF extension for an SR Cornerstone Viewport",
"author": "OHIF",
"license": "MIT",
@@ -32,10 +32,10 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/extension-cornerstone": "3.7.0-beta.73",
"@ohif/extension-measurement-tracking": "3.7.0-beta.73",
"@ohif/ui": "3.7.0-beta.73",
"@ohif/core": "3.7.0-beta.76",
"@ohif/extension-cornerstone": "3.7.0-beta.76",
"@ohif/extension-measurement-tracking": "3.7.0-beta.76",
"@ohif/ui": "3.7.0-beta.76",
"dcmjs": "^0.29.5",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
+27
View File
@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/extension-cornerstone
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/extension-cornerstone
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
### Bug Fixes
* **measurements:** Update the calibration tool to match changes in CS3D ([#3505](https://github.com/OHIF/Viewers/issues/3505)) ([38af311](https://github.com/OHIF/Viewers/commit/38af3112ec1f94f36c0ef64ff1cf9d21c0981c81))
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/extension-cornerstone
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-cornerstone",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "OHIF extension for Cornerstone",
"author": "OHIF",
"license": "MIT",
@@ -37,8 +37,8 @@
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
"@cornerstonejs/dicom-image-loader": "^1.13.2",
"@ohif/core": "3.7.0-beta.73",
"@ohif/ui": "3.7.0-beta.73",
"@ohif/core": "3.7.0-beta.76",
"@ohif/ui": "3.7.0-beta.76",
"dcmjs": "^0.29.6",
"dicom-parser": "^1.8.21",
"hammerjs": "^2.0.8",
@@ -76,11 +76,12 @@ export function onCompletedCalibrationLine(servicesManager, csToolsEvent) {
const adjustCalibration = newLength => {
const spacingScale = newLength / length;
const rowSpacing = spacingScale * currentRowPixelSpacing;
const colSpacing = spacingScale * currentColumnPixelSpacing;
// trigger resize of the viewport to adjust the world/pixel mapping
calibrateImageSpacing(imageId, viewport.getRenderingEngine(), rowSpacing, colSpacing);
calibrateImageSpacing(imageId, viewport.getRenderingEngine(), {
type: 'User',
scale: 1 / spacingScale,
});
};
return new Promise((resolve, reject) => {
@@ -99,8 +99,7 @@ function getMappedAnnotations(annotation, displaySetService) {
);
const { SeriesNumber } = displaySet;
const { length, width } = targetStats;
const unit = 'mm';
const { length, width, unit } = targetStats;
annotations.push({
SeriesInstanceUID,
@@ -130,9 +129,9 @@ function _getReport(mappedAnnotations, points, FrameOfReferenceUID) {
values.push('Cornerstone:Bidirectional');
mappedAnnotations.forEach(annotation => {
const { length, width } = annotation;
columns.push(`Length (mm)`, `Width (mm)`);
values.push(length, width);
const { length, width, unit } = annotation;
columns.push(`Length`, `Width`, 'Unit');
values.push(length, width, unit);
});
if (FrameOfReferenceUID) {
@@ -162,7 +161,14 @@ function getDisplayText(mappedAnnotations, displaySet) {
const displayText = [];
// Area is the same for all series
const { length, width, SeriesNumber, SOPInstanceUID, frameNumber } = mappedAnnotations[0];
const {
length,
width,
unit,
SeriesNumber,
SOPInstanceUID,
frameNumber,
} = mappedAnnotations[0];
const roundedLength = utils.roundNumber(length, 2);
const roundedWidth = utils.roundNumber(width, 2);
@@ -176,8 +182,10 @@ function getDisplayText(mappedAnnotations, displaySet) {
const instanceText = InstanceNumber ? ` I: ${InstanceNumber}` : '';
const frameText = displaySet.isMultiFrame ? ` F: ${frameNumber}` : '';
displayText.push(`L: ${roundedLength} mm (S: ${SeriesNumber}${instanceText}${frameText})`);
displayText.push(`W: ${roundedWidth} mm`);
displayText.push(
`L: ${roundedLength} ${unit} (S: ${SeriesNumber}${instanceText}${frameText})`
);
displayText.push(`W: ${roundedWidth} ${unit}`);
return displayText;
}
@@ -98,7 +98,7 @@ function getMappedAnnotations(annotation, DisplaySetService) {
);
const { SeriesNumber } = displaySet;
const { mean, stdDev, max, area, Modality, modalityUnit } = targetStats;
const { mean, stdDev, max, area, Modality, areaUnit, modalityUnit } = targetStats;
annotations.push({
SeriesInstanceUID,
@@ -111,6 +111,7 @@ function getMappedAnnotations(annotation, DisplaySetService) {
stdDev,
max,
area,
areaUnit,
});
});
@@ -131,14 +132,20 @@ function _getReport(mappedAnnotations, points, FrameOfReferenceUID) {
values.push('Cornerstone:CircleROI');
mappedAnnotations.forEach(annotation => {
const { mean, stdDev, max, area, unit } = annotation;
const { mean, stdDev, max, area, unit, areaUnit } = annotation;
if (!mean || !unit || !max || !area) {
return;
}
columns.push(`max (${unit})`, `mean (${unit})`, `std (${unit})`, `area (mm2)`);
values.push(max, mean, stdDev, area);
columns.push(
`max (${unit})`,
`mean (${unit})`,
`std (${unit})`,
'Area',
'Unit'
);
values.push(max, mean, stdDev, area, areaUnit);
});
if (FrameOfReferenceUID) {
@@ -168,7 +175,7 @@ function getDisplayText(mappedAnnotations, displaySet) {
const displayText = [];
// Area is the same for all series
const { area, SOPInstanceUID, frameNumber } = mappedAnnotations[0];
const { area, SOPInstanceUID, frameNumber, areaUnit } = mappedAnnotations[0];
const instance = displaySet.images.find(image => image.SOPInstanceUID === SOPInstanceUID);
@@ -182,7 +189,7 @@ function getDisplayText(mappedAnnotations, displaySet) {
// Area sometimes becomes undefined if `preventHandleOutsideImage` is off.
const roundedArea = utils.roundNumber(area || 0, 2);
displayText.push(`${roundedArea} mm<sup>2</sup>`);
displayText.push(`${roundedArea} ${areaUnit}`);
// Todo: we need a better UI for displaying all these information
mappedAnnotations.forEach(mappedAnnotation => {
@@ -98,7 +98,7 @@ function getMappedAnnotations(annotation, displaySetService) {
);
const { SeriesNumber } = displaySet;
const { mean, stdDev, max, area, Modality, modalityUnit } = targetStats;
const { mean, stdDev, max, area, Modality, areaUnit, modalityUnit } = targetStats;
annotations.push({
SeriesInstanceUID,
@@ -107,6 +107,7 @@ function getMappedAnnotations(annotation, displaySetService) {
frameNumber,
Modality,
unit: modalityUnit,
areaUnit,
mean,
stdDev,
max,
@@ -131,14 +132,20 @@ function _getReport(mappedAnnotations, points, FrameOfReferenceUID) {
values.push('Cornerstone:EllipticalROI');
mappedAnnotations.forEach(annotation => {
const { mean, stdDev, max, area, unit } = annotation;
const { mean, stdDev, max, area, unit, areaUnit } = annotation;
if (!mean || !unit || !max || !area) {
return;
}
columns.push(`max (${unit})`, `mean (${unit})`, `std (${unit})`, `area (mm2)`);
values.push(max, mean, stdDev, area);
columns.push(
`max (${unit})`,
`mean (${unit})`,
`std (${unit})`,
'Area',
'Unit'
);
values.push(max, mean, stdDev, area, areaUnit);
});
if (FrameOfReferenceUID) {
@@ -168,7 +175,7 @@ function getDisplayText(mappedAnnotations, displaySet) {
const displayText = [];
// Area is the same for all series
const { area, SOPInstanceUID, frameNumber } = mappedAnnotations[0];
const { area, SOPInstanceUID, frameNumber, areaUnit } = mappedAnnotations[0];
const instance = displaySet.images.find(image => image.SOPInstanceUID === SOPInstanceUID);
@@ -180,9 +187,8 @@ function getDisplayText(mappedAnnotations, displaySet) {
const instanceText = InstanceNumber ? ` I: ${InstanceNumber}` : '';
const frameText = displaySet.isMultiFrame ? ` F: ${frameNumber}` : '';
// Area sometimes becomes undefined if `preventHandleOutsideImage` is off.
const roundedArea = utils.roundNumber(area || 0, 2);
displayText.push(`${roundedArea} mm<sup>2</sup>`);
const roundedArea = utils.roundNumber(area, 2);
displayText.push(`${roundedArea} ${areaUnit}`);
// Todo: we need a better UI for displaying all these information
mappedAnnotations.forEach(mappedAnnotation => {
@@ -32,7 +32,11 @@ const Length = {
throw new Error('Tool not supported');
}
const { SOPInstanceUID, SeriesInstanceUID, StudyInstanceUID } = getSOPInstanceAttributes(
const {
SOPInstanceUID,
SeriesInstanceUID,
StudyInstanceUID,
} = getSOPInstanceAttributes(
referencedImageId,
cornerstoneViewportService,
viewportId
@@ -94,8 +98,11 @@ function getMappedAnnotations(annotation, displaySetService) {
throw new Error('Non-acquisition plane measurement mapping not supported');
}
const { SOPInstanceUID, SeriesInstanceUID, frameNumber } =
getSOPInstanceAttributes(referencedImageId);
const {
SOPInstanceUID,
SeriesInstanceUID,
frameNumber,
} = getSOPInstanceAttributes(referencedImageId);
const displaySet = displaySetService.getDisplaySetForSOPInstanceUID(
SOPInstanceUID,
@@ -104,8 +111,7 @@ function getMappedAnnotations(annotation, displaySetService) {
);
const { SeriesNumber } = displaySet;
const { length } = targetStats;
const unit = 'mm';
const { length, unit = 'mm' } = targetStats;
annotations.push({
SeriesInstanceUID,
@@ -134,9 +140,11 @@ function _getReport(mappedAnnotations, points, FrameOfReferenceUID) {
values.push('Cornerstone:Length');
mappedAnnotations.forEach(annotation => {
const { length } = annotation;
columns.push(`Length (mm)`);
const { length, unit } = annotation;
columns.push(`Length`);
values.push(length);
columns.push('Unit');
values.push(unit);
});
if (FrameOfReferenceUID) {
@@ -166,7 +174,13 @@ function getDisplayText(mappedAnnotations, displaySet) {
const displayText = [];
// Area is the same for all series
const { length, SeriesNumber, SOPInstanceUID, frameNumber } = mappedAnnotations[0];
const {
length,
SeriesNumber,
SOPInstanceUID,
frameNumber,
unit,
} = mappedAnnotations[0];
const instance = displaySet.images.find(image => image.SOPInstanceUID === SOPInstanceUID);
@@ -182,7 +196,9 @@ function getDisplayText(mappedAnnotations, displaySet) {
return displayText;
}
const roundedLength = utils.roundNumber(length, 2);
displayText.push(`${roundedLength} mm (S: ${SeriesNumber}${instanceText}${frameText})`);
displayText.push(
`${roundedLength} ${unit} (S: ${SeriesNumber}${instanceText}${frameText})`
);
return displayText;
}
@@ -25,7 +25,11 @@ const RectangleROI = {
throw new Error('Tool not supported');
}
const { SOPInstanceUID, SeriesInstanceUID, StudyInstanceUID } = getSOPInstanceAttributes(
const {
SOPInstanceUID,
SeriesInstanceUID,
StudyInstanceUID,
} = getSOPInstanceAttributes(
referencedImageId,
CornerstoneViewportService,
viewportId
@@ -88,8 +92,11 @@ function getMappedAnnotations(annotation, DisplaySetService) {
throw new Error('Non-acquisition plane measurement mapping not supported');
}
const { SOPInstanceUID, SeriesInstanceUID, frameNumber } =
getSOPInstanceAttributes(referencedImageId);
const {
SOPInstanceUID,
SeriesInstanceUID,
frameNumber,
} = getSOPInstanceAttributes(referencedImageId);
const displaySet = DisplaySetService.getDisplaySetForSOPInstanceUID(
SOPInstanceUID,
@@ -98,7 +105,7 @@ function getMappedAnnotations(annotation, DisplaySetService) {
);
const { SeriesNumber } = displaySet;
const { mean, stdDev, max, area, Modality, modalityUnit } = targetStats;
const { mean, stdDev, max, area, Modality, modalityUnit, areaUnit } = targetStats;
annotations.push({
SeriesInstanceUID,
@@ -111,6 +118,7 @@ function getMappedAnnotations(annotation, DisplaySetService) {
stdDev,
max,
area,
areaUnit,
});
});
@@ -131,14 +139,14 @@ function _getReport(mappedAnnotations, points, FrameOfReferenceUID) {
values.push('Cornerstone:RectangleROI');
mappedAnnotations.forEach(annotation => {
const { mean, stdDev, max, area, unit } = annotation;
const { mean, stdDev, max, area, unit, areaUnit } = annotation;
if (!mean || !unit || !max || !area) {
return;
}
columns.push(`max (${unit})`, `mean (${unit})`, `std (${unit})`, `area (mm2)`);
values.push(max, mean, stdDev, area);
columns.push(`Maximum`, `Mean`, `Std Dev`, 'Pixel Unit', `Area`, 'Unit');
values.push(max, mean, stdDev, unit, area, areaUnit);
});
if (FrameOfReferenceUID) {
@@ -168,7 +176,7 @@ function getDisplayText(mappedAnnotations, displaySet) {
const displayText = [];
// Area is the same for all series
const { area, SOPInstanceUID, frameNumber } = mappedAnnotations[0];
const { area, SOPInstanceUID, frameNumber, areaUnit } = mappedAnnotations[0];
const instance = displaySet.images.find(image => image.SOPInstanceUID === SOPInstanceUID);
@@ -182,7 +190,7 @@ function getDisplayText(mappedAnnotations, displaySet) {
// Area sometimes becomes undefined if `preventHandleOutsideImage` is off.
const roundedArea = utils.roundNumber(area || 0, 2);
displayText.push(`${roundedArea} mm<sup>2</sup>`);
displayText.push(`${roundedArea} ${areaUnit}`);
// Todo: we need a better UI for displaying all these information
mappedAnnotations.forEach(mappedAnnotation => {
+27
View File
@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/extension-default
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
### Bug Fixes
* **DicomJson:** retrieve.series.metadata method should be async ([#3659](https://github.com/OHIF/Viewers/issues/3659)) ([2737903](https://github.com/OHIF/Viewers/commit/2737903386cf97399473e0fa64fe53ad14da155a))
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/extension-default
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-default",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "Common/default features and functionality for basic image viewing",
"author": "OHIF Core Team",
"license": "MIT",
@@ -30,8 +30,8 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/i18n": "3.7.0-beta.73",
"@ohif/core": "3.7.0-beta.76",
"@ohif/i18n": "3.7.0-beta.76",
"dcmjs": "^0.29.5",
"dicomweb-client": "^0.10.2",
"prop-types": "^15.6.2",
@@ -152,7 +152,7 @@ function createDicomJSONApi(dicomJsonConfig) {
return getDirectURL(wadoRoot, params);
},
series: {
metadata: ({ StudyInstanceUID, madeInClient = false, customSort } = {}) => {
metadata: async ({ StudyInstanceUID, madeInClient = false, customSort } = {}) => {
if (!StudyInstanceUID) {
throw new Error('Unable to query for SeriesMetadata without StudyInstanceUID');
}
@@ -48,7 +48,7 @@ function createDicomWebProxyApi(dicomWebProxyConfig, UserAuthenticationService)
retrieve: {
directURL: (...args) => dicomWebDelegate.retrieve.directURL(...args),
series: {
metadata: (...args) => dicomWebDelegate.retrieve.series.metadata(...args),
metadata: async (...args) => dicomWebDelegate.retrieve.series.metadata(...args),
},
},
store: {
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/extension-dicom-microscopy
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-microscopy",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "OHIF extension for DICOM microscopy",
"author": "Bill Wallace, md-prog",
"license": "MIT",
@@ -28,10 +28,10 @@
"start": "yarn run dev"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/extension-default": "3.7.0-beta.73",
"@ohif/i18n": "3.7.0-beta.73",
"@ohif/ui": "3.7.0-beta.73",
"@ohif/core": "3.7.0-beta.76",
"@ohif/extension-default": "3.7.0-beta.76",
"@ohif/i18n": "3.7.0-beta.76",
"@ohif/ui": "3.7.0-beta.76",
"prop-types": "^15.6.2",
"react": "^17.0.2",
"react-dom": "^17.0.2",
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/extension-dicom-pdf
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-pdf",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "OHIF extension for PDF display",
"author": "OHIF",
"license": "MIT",
@@ -28,8 +28,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/ui": "3.7.0-beta.73",
"@ohif/core": "3.7.0-beta.76",
"@ohif/ui": "3.7.0-beta.76",
"dcmjs": "^0.29.5",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/extension-dicom-video
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/extension-dicom-video
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/extension-dicom-video
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/extension-dicom-video
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-dicom-video",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "OHIF extension for video display",
"author": "OHIF",
"license": "MIT",
@@ -28,8 +28,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/ui": "3.7.0-beta.73",
"@ohif/core": "3.7.0-beta.76",
"@ohif/ui": "3.7.0-beta.76",
"dcmjs": "^0.29.5",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/extension-measurement-tracking
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/extension-measurement-tracking
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/extension-measurement-tracking
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/extension-measurement-tracking
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-measurement-tracking",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "Tracking features and functionality for basic image viewing",
"author": "OHIF Core Team",
"license": "MIT",
@@ -32,9 +32,9 @@
"peerDependencies": {
"@cornerstonejs/core": "^1.13.2",
"@cornerstonejs/tools": "^1.13.2",
"@ohif/core": "3.7.0-beta.73",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.73",
"@ohif/ui": "3.7.0-beta.73",
"@ohif/core": "3.7.0-beta.76",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.76",
"@ohif/ui": "3.7.0-beta.76",
"classnames": "^2.3.2",
"dcmjs": "^0.29.5",
"lodash.debounce": "^4.17.21",
@@ -46,7 +46,7 @@
},
"dependencies": {
"@babel/runtime": "^7.20.13",
"@ohif/ui": "3.7.0-beta.73",
"@ohif/ui": "3.7.0-beta.76",
"@xstate/react": "^3.2.2",
"xstate": "^4.10.0"
}
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/extension-test
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/extension-test
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/extension-test
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/extension-test
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-test",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "OHIF extension used inside e2e testing",
"author": "OHIF",
"license": "MIT",
@@ -28,8 +28,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/ui": "3.7.0-beta.73",
"@ohif/core": "3.7.0-beta.76",
"@ohif/ui": "3.7.0-beta.76",
"dcmjs": "0.29.4",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/extension-tmtv
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/extension-tmtv
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/extension-tmtv
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/extension-tmtv
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/extension-tmtv",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "OHIF extension for Total Metabolic Tumor Volume",
"author": "OHIF",
"license": "MIT",
@@ -28,8 +28,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/ui": "3.7.0-beta.73",
"@ohif/core": "3.7.0-beta.76",
"@ohif/ui": "3.7.0-beta.76",
"dcmjs": "^0.29.5",
"dicom-parser": "^1.8.9",
"hammerjs": "^2.0.8",
+1 -1
View File
@@ -1,5 +1,5 @@
{
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"packages": ["extensions/*", "platform/*", "modes/*"],
"npmClient": "yarn"
}
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/mode-basic-dev-mode
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-basic-dev-mode",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "Basic OHIF Viewer Using Cornerstone",
"author": "OHIF",
"license": "MIT",
@@ -29,12 +29,12 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/extension-cornerstone": "3.7.0-beta.73",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.73",
"@ohif/extension-default": "3.7.0-beta.73",
"@ohif/extension-dicom-pdf": "3.7.0-beta.73",
"@ohif/extension-dicom-video": "3.7.0-beta.73"
"@ohif/core": "3.7.0-beta.76",
"@ohif/extension-cornerstone": "3.7.0-beta.76",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.76",
"@ohif/extension-default": "3.7.0-beta.76",
"@ohif/extension-dicom-pdf": "3.7.0-beta.76",
"@ohif/extension-dicom-video": "3.7.0-beta.76"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/mode-test
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/mode-test
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/mode-test
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/mode-test
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-test",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "Basic mode for testing",
"author": "OHIF",
"license": "MIT",
@@ -32,14 +32,14 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/extension-cornerstone": "3.7.0-beta.73",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.73",
"@ohif/extension-default": "3.7.0-beta.73",
"@ohif/extension-dicom-pdf": "3.7.0-beta.73",
"@ohif/extension-dicom-video": "3.7.0-beta.73",
"@ohif/extension-measurement-tracking": "3.7.0-beta.73",
"@ohif/extension-test": "3.7.0-beta.73"
"@ohif/core": "3.7.0-beta.76",
"@ohif/extension-cornerstone": "3.7.0-beta.76",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.76",
"@ohif/extension-default": "3.7.0-beta.76",
"@ohif/extension-dicom-pdf": "3.7.0-beta.76",
"@ohif/extension-dicom-video": "3.7.0-beta.76",
"@ohif/extension-measurement-tracking": "3.7.0-beta.76",
"@ohif/extension-test": "3.7.0-beta.76"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/mode-longitudinal
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/mode-longitudinal
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/mode-longitudinal
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/mode-longitudinal
+10 -10
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-longitudinal",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "Longitudinal Workflow",
"author": "OHIF",
"license": "MIT",
@@ -32,15 +32,15 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/extension-cornerstone": "3.7.0-beta.73",
"@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.73",
"@ohif/extension-cornerstone-dicom-seg": "3.7.0-beta.73",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.73",
"@ohif/extension-default": "3.7.0-beta.73",
"@ohif/extension-dicom-pdf": "3.7.0-beta.73",
"@ohif/extension-dicom-video": "3.7.0-beta.73",
"@ohif/extension-measurement-tracking": "3.7.0-beta.73"
"@ohif/core": "3.7.0-beta.76",
"@ohif/extension-cornerstone": "3.7.0-beta.76",
"@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.76",
"@ohif/extension-cornerstone-dicom-seg": "3.7.0-beta.76",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.76",
"@ohif/extension-default": "3.7.0-beta.76",
"@ohif/extension-dicom-pdf": "3.7.0-beta.76",
"@ohif/extension-dicom-video": "3.7.0-beta.76",
"@ohif/extension-measurement-tracking": "3.7.0-beta.76"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/mode-microscopy
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/mode-microscopy
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/mode-microscopy
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/mode-microscopy
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-microscopy",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "OHIF mode for DICOM microscopy",
"author": "OHIF",
"license": "MIT",
@@ -33,8 +33,8 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/extension-dicom-microscopy": "3.7.0-beta.73"
"@ohif/core": "3.7.0-beta.76",
"@ohif/extension-dicom-microscopy": "3.7.0-beta.76"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/mode-tmtv
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/mode-tmtv
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/mode-tmtv
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/mode-tmtv
+8 -8
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/mode-tmtv",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "Total Metabolic Tumor Volume Workflow",
"author": "OHIF",
"license": "MIT",
@@ -32,13 +32,13 @@
"test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests"
},
"peerDependencies": {
"@ohif/core": "3.7.0-beta.73",
"@ohif/extension-cornerstone": "3.7.0-beta.73",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.73",
"@ohif/extension-default": "3.7.0-beta.73",
"@ohif/extension-dicom-pdf": "3.7.0-beta.73",
"@ohif/extension-dicom-video": "3.7.0-beta.73",
"@ohif/extension-measurement-tracking": "3.7.0-beta.73"
"@ohif/core": "3.7.0-beta.76",
"@ohif/extension-cornerstone": "3.7.0-beta.76",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.76",
"@ohif/extension-default": "3.7.0-beta.76",
"@ohif/extension-dicom-pdf": "3.7.0-beta.76",
"@ohif/extension-dicom-video": "3.7.0-beta.76",
"@ohif/extension-measurement-tracking": "3.7.0-beta.76"
},
"dependencies": {
"@babel/runtime": "^7.20.13"
+1 -1
View File
@@ -32,7 +32,7 @@
"dev:orthanc": "lerna run dev:orthanc --stream",
"dev:dcm4chee": "lerna run dev:dcm4chee --stream",
"dev:static": "lerna run dev:static --stream",
"orthanc:up": "docker-compose -f .docker/Nginx-Orthanc/docker-compose.yml up",
"orthanc:up": "docker-compose -f platform/app/.recipes/Nginx-Orthanc/docker-compose.yml up",
"preinstall": "node preinstall.js",
"start": "yarn run dev",
"test": "yarn run test:unit",
@@ -22,7 +22,7 @@ http {
# lua_ settings
#
lua_package_path '/usr/local/openresty/lualib/?.lua;;';
lua_package_path '/usr/local/openresty/lualib/?.lua;;/usr/local/share/lua/5.4/?.lua;;';
lua_shared_dict discovery 1m; # cache for discovery metadata documents
lua_shared_dict jwks 1m; # cache for JWKs
# lua_ssl_trusted_certificate /etc/ssl/certs/ca-certificates.crt;
@@ -182,6 +182,8 @@ http {
index index.html;
try_files $uri $uri/ /index.html;
add_header Cache-Control "no-store, no-cache, must-revalidate";
add_header 'Cross-Origin-Opener-Policy' 'same-origin' always;
add_header 'Cross-Origin-Embedder-Policy' 'require-corp' always;
}
# EXAMPLE: Reverse Proxy, no auth
@@ -28,6 +28,8 @@ FROM node:16.15.0-slim as builder
RUN mkdir /usr/src/app
WORKDIR /usr/src/app
RUN apt-get update && apt-get install -y build-essential python3
ENV APP_CONFIG=config/docker_openresty-orthanc-keycloak.js
ENV PATH /usr/src/app/node_modules/.bin:$PATH
@@ -44,23 +46,38 @@ RUN yarn run build
# Stage 2: Bundle the built application into a Docker container
# which runs openresty (nginx) using Alpine Linux
# LINK: https://hub.docker.com/r/openresty/openresty
FROM openresty/openresty:1.15.8.1rc1-0-alpine-fat
FROM openresty/openresty:1.21.4.2-0-bullseye-fat
RUN mkdir /var/log/nginx
RUN apk add --no-cache openssl
RUN apk add --no-cache openssl-dev
RUN apk add --no-cache git
RUN apk add --no-cache gcc
RUN apt-get update && \
apt-get install -y openssl libssl-dev git gcc wget unzip make&& \
apt-get clean
RUN apt-get install --assume-yes lua5.4 libzmq3-dev lua5.4-dev
RUN cd /tmp && \
wget http://luarocks.org/releases/luarocks-3.9.2.tar.gz && \
tar zxpf luarocks-3.9.2.tar.gz && \
cd luarocks-3.9.2 && \
./configure && \
make && \
make install
# !!!
RUN luarocks install lua-resty-http
# RUN luarocks install lua-nginx-module
RUN luarocks install lua-cjson
RUN luarocks install lua-resty-string
RUN luarocks install lua-resty-session
RUN luarocks install lua-resty-jwt
RUN luarocks install lua-resty-openidc
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
#
RUN luarocks install lua-resty-jwt
RUN luarocks install lua-resty-session
RUN luarocks install lua-resty-http
# !!!
RUN luarocks install lua-resty-openidc
RUN luarocks install luacrypto
RUN luarocks install lua-resty-auto-ssl
# Copy build output to image
COPY --from=builder /usr/src/app/platform/app/dist /var/www/html
+27
View File
@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
### Bug Fixes
* **keyCloak:** fix openresty keycloak deployment recipe ([#3655](https://github.com/OHIF/Viewers/issues/3655)) ([2d7721c](https://github.com/OHIF/Viewers/commit/2d7721cb581f55dc49e3baeca2411b18dd78ad74))
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/app
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/app
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
+17 -17
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/app",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"productVersion": "3.4.0",
"description": "OHIF Viewer",
"author": "OHIF Contributors",
@@ -51,22 +51,22 @@
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
"@cornerstonejs/dicom-image-loader": "^1.13.2",
"@ohif/core": "3.7.0-beta.73",
"@ohif/extension-cornerstone": "3.7.0-beta.73",
"@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.73",
"@ohif/extension-cornerstone-dicom-seg": "3.7.0-beta.73",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.73",
"@ohif/extension-default": "3.7.0-beta.73",
"@ohif/extension-dicom-microscopy": "3.7.0-beta.73",
"@ohif/extension-dicom-pdf": "3.7.0-beta.73",
"@ohif/extension-dicom-video": "3.7.0-beta.73",
"@ohif/extension-test": "3.7.0-beta.73",
"@ohif/i18n": "3.7.0-beta.73",
"@ohif/mode-basic-dev-mode": "3.7.0-beta.73",
"@ohif/mode-longitudinal": "3.7.0-beta.73",
"@ohif/mode-microscopy": "3.7.0-beta.73",
"@ohif/mode-test": "3.7.0-beta.73",
"@ohif/ui": "3.7.0-beta.73",
"@ohif/core": "3.7.0-beta.76",
"@ohif/extension-cornerstone": "3.7.0-beta.76",
"@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.76",
"@ohif/extension-cornerstone-dicom-seg": "3.7.0-beta.76",
"@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.76",
"@ohif/extension-default": "3.7.0-beta.76",
"@ohif/extension-dicom-microscopy": "3.7.0-beta.76",
"@ohif/extension-dicom-pdf": "3.7.0-beta.76",
"@ohif/extension-dicom-video": "3.7.0-beta.76",
"@ohif/extension-test": "3.7.0-beta.76",
"@ohif/i18n": "3.7.0-beta.76",
"@ohif/mode-basic-dev-mode": "3.7.0-beta.76",
"@ohif/mode-longitudinal": "3.7.0-beta.76",
"@ohif/mode-microscopy": "3.7.0-beta.76",
"@ohif/mode-test": "3.7.0-beta.76",
"@ohif/ui": "3.7.0-beta.76",
"@types/react": "^17.0.38",
"classnames": "^2.3.2",
"core-js": "^3.16.1",
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/cli
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/cli
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/cli
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/cli
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/cli",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "A CLI to bootstrap new OHIF extension or mode",
"type": "module",
"main": "src/index.js",
+27
View File
@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/core
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/core
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
### Bug Fixes
* **measurements:** Update the calibration tool to match changes in CS3D ([#3505](https://github.com/OHIF/Viewers/issues/3505)) ([38af311](https://github.com/OHIF/Viewers/commit/38af3112ec1f94f36c0ef64ff1cf9d21c0981c81))
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/core
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/core",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "Generic business logic for web-based medical imaging applications",
"author": "OHIF Core Team",
"license": "MIT",
@@ -36,7 +36,7 @@
"@cornerstonejs/codec-openjpeg": "^1.2.2",
"@cornerstonejs/codec-openjph": "^2.4.2",
"@cornerstonejs/dicom-image-loader": "^1.13.2",
"@ohif/ui": "3.7.0-beta.73",
"@ohif/ui": "3.7.0-beta.76",
"cornerstone-math": "0.1.9",
"dicom-parser": "^1.8.21"
},
@@ -68,7 +68,7 @@ class MetadataProvider {
if (!instance) {
return;
}
}
return (frameNumber && combineFrameInstance(frameNumber, instance)) || instance;
}
@@ -114,8 +114,20 @@ class MetadataProvider {
return this._getCornerstoneDICOMImageLoaderTag(naturalizedTagOrWADOImageLoaderTag, instance);
}
/**
* Adds a new handler for the given tag. The handler will be provided an
* instance object that it can read values from.
*/
public addHandler(
wadoImageLoaderTag: string,
handler
) {
WADO_IMAGE_LOADER[wadoImageLoaderTag] = handler;
}
_getCornerstoneDICOMImageLoaderTag(wadoImageLoaderTag, instance) {
let metadata;
let metadata = WADO_IMAGE_LOADER[wadoImageLoaderTag]?.(instance);
if (metadata) return metadata;
switch (wadoImageLoaderTag) {
case WADO_IMAGE_LOADER_TAGS.GENERAL_SERIES_MODULE:
@@ -153,45 +165,6 @@ class MetadataProvider {
patientSex: instance.PatientSex,
};
break;
case WADO_IMAGE_LOADER_TAGS.IMAGE_PLANE_MODULE:
const { ImageOrientationPatient } = instance;
// Fallback for DX images.
// TODO: We should use the rest of the results of this function
// to update the UI somehow
const { PixelSpacing } = getPixelSpacingInformation(instance);
let rowPixelSpacing;
let columnPixelSpacing;
let rowCosines;
let columnCosines;
if (PixelSpacing) {
rowPixelSpacing = PixelSpacing[0];
columnPixelSpacing = PixelSpacing[1];
}
if (ImageOrientationPatient) {
rowCosines = ImageOrientationPatient.slice(0, 3);
columnCosines = ImageOrientationPatient.slice(3, 6);
}
metadata = {
frameOfReferenceUID: instance.FrameOfReferenceUID,
rows: toNumber(instance.Rows),
columns: toNumber(instance.Columns),
imageOrientationPatient: toNumber(ImageOrientationPatient),
rowCosines: toNumber(rowCosines || [0, 1, 0]),
columnCosines: toNumber(columnCosines || [0, 0, -1]),
imagePositionPatient: toNumber(instance.ImagePositionPatient || [0, 0, 0]),
sliceThickness: toNumber(instance.SliceThickness),
sliceLocation: toNumber(instance.SliceLocation),
pixelSpacing: toNumber(PixelSpacing || 1),
rowPixelSpacing: toNumber(rowPixelSpacing || 1),
columnPixelSpacing: toNumber(columnPixelSpacing || 1),
};
break;
case WADO_IMAGE_LOADER_TAGS.IMAGE_PIXEL_MODULE:
metadata = {
samplesPerPixel: toNumber(instance.SamplesPerPixel),
@@ -484,11 +457,54 @@ const metadataProvider = new MetadataProvider();
export default metadataProvider;
const WADO_IMAGE_LOADER = {
imagePlaneModule: instance => {
const { ImageOrientationPatient } = instance;
// Fallback for DX images.
// TODO: We should use the rest of the results of this function
// to update the UI somehow
const { PixelSpacing } = getPixelSpacingInformation(instance);
let rowPixelSpacing;
let columnPixelSpacing;
let rowCosines;
let columnCosines;
if (PixelSpacing) {
rowPixelSpacing = PixelSpacing[0];
columnPixelSpacing = PixelSpacing[1];
}
if (ImageOrientationPatient) {
rowCosines = ImageOrientationPatient.slice(0, 3);
columnCosines = ImageOrientationPatient.slice(3, 6);
}
return {
frameOfReferenceUID: instance.FrameOfReferenceUID,
rows: toNumber(instance.Rows),
columns: toNumber(instance.Columns),
imageOrientationPatient: toNumber(ImageOrientationPatient),
rowCosines: toNumber(rowCosines || [0, 1, 0]),
columnCosines: toNumber(columnCosines || [0, 0, -1]),
imagePositionPatient: toNumber(
instance.ImagePositionPatient || [0, 0, 0]
),
sliceThickness: toNumber(instance.SliceThickness),
sliceLocation: toNumber(instance.SliceLocation),
pixelSpacing: toNumber(PixelSpacing || 1),
rowPixelSpacing: rowPixelSpacing ? toNumber(rowPixelSpacing) : null,
columnPixelSpacing: columnPixelSpacing ? toNumber(columnPixelSpacing) : null,
};
},
};
const WADO_IMAGE_LOADER_TAGS = {
// dicomImageLoader specific
GENERAL_SERIES_MODULE: 'generalSeriesModule',
PATIENT_STUDY_MODULE: 'patientStudyModule',
IMAGE_PLANE_MODULE: 'imagePlaneModule',
IMAGE_PIXEL_MODULE: 'imagePixelModule',
VOI_LUT_MODULE: 'voiLutModule',
MODALITY_LUT_MODULE: 'modalityLutModule',
+30 -5
View File
@@ -1,9 +1,34 @@
/**
* @param {string | number} value
* @param {number} decimals
* Truncates decimal points to that there is at least 1+precision significant
* digits.
*
* For example, with the default precision 2 (3 significant digits)
* * Values larger than 100 show no information after the decimal point
* * Values between 10 and 99 show 1 decimal point
* * Values between 1 and 9 show 2 decimal points
*
* @param value - to return a fixed measurement value from
* @param precision - defining how many digits after 1..9 are desired
*/
function _round(value, decimals) {
return Number(value).toFixed(decimals);
function roundNumber(value: string | number, precision = 2): string {
if (value === undefined || value === null || value === '') return 'NaN';
value = Number(value);
if (value < 0.0001) return `${value}`;
const fixedPrecision =
value >= 100
? precision - 2
: value >= 10
? precision - 1
: value >= 1
? precision
: value >= 0.1
? precision + 1
: value >= 0.01
? precision + 2
: value >= 0.001
? precision + 3
: precision + 4;
return value.toFixed(fixedPrecision);
}
export default _round;
export default roundNumber;
+27
View File
@@ -3,6 +3,33 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
### Bug Fixes
* **keyCloak:** fix openresty keycloak deployment recipe ([#3655](https://github.com/OHIF/Viewers/issues/3655)) ([2d7721c](https://github.com/OHIF/Viewers/commit/2d7721cb581f55dc49e3baeca2411b18dd78ad74))
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package ohif-docs
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package ohif-docs
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package ohif-docs
@@ -274,7 +274,7 @@ output.
[dicom-web]: https://en.wikipedia.org/wiki/DICOMweb
[storescu]: https://support.dcmtk.org/docs/storescu.html
[webpack-proxy]: https://webpack.js.org/configuration/dev-server/#devserverproxy
[orthanc-docker-compose]: https://github.com/OHIF/Viewers/tree/master/.docker/Nginx-Orthanc
[orthanc-docker-compose]: https://github.com/OHIF/Viewers/tree/master/platform/app/.recipes/Nginx-Orthanc
<!-- Archives -->
[dcm4chee]: https://github.com/dcm4che/dcm4chee-arc-light
[dcm4chee-docker]: https://github.com/dcm4che/dcm4chee-arc-light/wiki/Running-on-Docker
@@ -74,7 +74,7 @@ _Upload your first Study:_
#### Orthanc: Learn More
You can see the `docker-compose.yml` file this command runs at
[`<project-root>/.docker/Nginx-Orthanc/`][orthanc-docker-compose], and more on
[`<project-root>/platform/app/.recipes/Nginx-Orthanc`][orthanc-docker-compose], and more on
Orthanc for Docker in [Orthanc's documentation][orthanc-docker].
#### Connecting to Orthanc
@@ -163,7 +163,7 @@ A boolean indicating if the DICOM upload to the data source is permitted/accepte
:::tip
The [OHIF plugin for Orthanc](https://book.orthanc-server.com/plugins/ohif.html) by default utilizes the DICOM JSON data
source and it has been discovered that only those studies uploaded to Orthanc AFTER the plugin has been installed are
available as DICOM JSON. As such, if the OHIF plugin for Orthanc is desired for studies uploaded prior to installing the plugin,
available as DICOM JSON. As such, if the OHIF plugin for Orthanc is desired for studies uploaded prior to installing the plugin,
then consider switching to using [DICOMweb instead](https://book.orthanc-server.com/plugins/ohif.html#using-dicomweb).
:::
@@ -0,0 +1,292 @@
---
sidebar_position: 10
---
# User Account Control
> DISCLAIMER! We make no claims or guarantees of this approach's security. If in
> doubt, enlist the help of an expert and conduct proper audits.
Making a viewer and its medical imaging data accessible on the open web can
provide a lot of benefits, but requires additional security to make sure
sensitive information can only be viewed by authorized individuals. Most image
archives are equipped with basic security measures, but they are not
robust/secure enough for the open web.
This guide covers one of many potential production setups that secure our
sensitive data.
## Overview
This guide builds on top of our
[Nginx + Image Archive guide](/deployment/recipes/nginx--image-archive.md),
wherein we used a [`reverse proxy`](https://en.wikipedia.org/wiki/Reverse_proxy)
to retrieve resources from our image archive (Orthanc).
To add support for "User Account Control" we introduce
[Keycloak](https://www.keycloak.org/about.html). Keycloak is an open source
Identity and Access Management solution that makes it easy to secure
applications and services with little to no code. We improve upon our
`reverse proxy` setup by integrating Keycloak and Nginx to create an
`authenticating reverse proxy`.
> An authenticating reverse proxy is a reverse proxy that only retrieves the
> resources on behalf of a client if the client has been authenticated. If a
> client is not authenticated they can be redirected to a login page.
This setup allows us to create a setup similar to the one pictured below:
![userControlFlow](../assets/img/user-access-control-request-flow.png)
- All web requests are routed through `nginx` on our `OpenResty` image
- `/pacs` is a reverse proxy for `orthanc`'s `DICOM Web` endpoints
- Requires valid `Authorization: Bearer <token>` header
- `/pacs-admin` is a reverse proxy for `orthanc`'s Web Admin
- `/auth` is a reverse proxy for `keycloak`
- All static resources for OHIF Viewer are unprotected and accessible. We have
application logic that will redirect unauthenticated users to the appropriate
`keycloak` login screen.
## Getting Started
### Requirements
- Docker
- [Docker for Mac](https://docs.docker.com/docker-for-mac/)
- [Docker for Windows](https://docs.docker.com/docker-for-windows/)
_Not sure if you have `docker` installed already? Try running `docker --version`
in command prompt or terminal_
### Setup
_Spin Things Up_
- Navigate to `<project-root>/docker/OpenResty-Orthanc-Keycloak` in your shell
- Run `docker-compose up`
_Create Your First User_
- Navigate to: `http://127.0.0.1/auth/admin`
- Sign in with: `admin`/`password`
- From the top left dropdown, select the `Ohif` realm
- From the left sidebar, under `Manage`, select `Users`
- Click `Add User`
- Username: `test`
- Email Verified: `ON`
- Click `Save`
- Click the `Credentials` Tab
- New Password: `test`
- Password Confirmation: `test`
- Temporary: `OFF`
- Click: `Reset Password`
- From the top right dropdown, select `Admin`, then `Sign Out`
_Sign In_
- Navigate to `http://127.0.0.1/`
- Username: `test`, Password: `test`
- Click `Log In`
_Upload Your First Study_
- Navigate to `http://127.0.0.1/pacs-admin`
- If you're not already logged in, use `test`/`test`
- From the top right, select "Upload"
- Click "Select files to upload..." (DICOM)
- Click "Start the upload"
- Navigate back to `http://127.0.0.1/` to view your studies in the Study List
### Troubleshooting
_Exit code 137_
This means Docker ran out of memory. Open Docker Desktop, go to the `advanced`
tab, and increase the amount of Memory available.
_Cannot create container for service X_
Use this one with caution: `docker system prune`
_X is already running_
Stop running all containers:
- Win: `docker ps -a -q | ForEach { docker stop $_ }`
- Linux: `docker stop $(docker ps -a -q)`
### Configuration
After verifying that everything runs with default configuration values, you will
likely want to update:
- The domain: `http://127.0.0.1`
- Set secure, non-default passwords
- Regenerate Keycloak Client Secrets
#### OHIF Viewer
The OHIF Viewer's configuration is imported from a static `.js` file. The
configuration we use is set to a specific file when we build the viewer, and
determined by the env variable: `APP_CONFIG`. You can see where we set its value
in the `dockerfile` for this solution:
`ENV APP_CONFIG=config/docker_openresty-orthanc-keycloak.js`
You can find the configuration we're using here:
`/public/config/docker_openresty-orthanc-keycloak.js`
To rebuild the `webapp` image created by our `dockerfile` after updating the
Viewer's configuration, you can run:
- `docker-compose build` OR
- `docker-compose up --build`
#### Other
All other files are found in: `/docker/OpenResty-Orthanc-Keycloak/`
| Service | Configuration | Docs |
| ----------------- | ------------------------------------------------ | ------------------------------------------- |
| OHIF Viewer | [dockerfile][dockerfile] / [config.js][config] | You're reading them now! |
| OpenResty (Nginx) | [`/nginx.conf`][config-nginx] | [lua-resty-openidc][lua-resty-openidc-docs] |
| Orthanc | [`/orthanc.json`][config-orthanc] | [Here][orthanc-docs] |
| Keycloak | [`/ohif-keycloak-realm.json`][config-keycloak]\* | |
\* These are the seed values for Keycloak. They can be manually updated at
`http://127.0.0.1/auth/admin`
#### Keycloak Themeing
The `Login` screen for the `ohif-viewer` client is using a Custom Keycloak
theme. You can find the source files for it in
`/docker/OpenResty-Orthanc-Keycloak/volumes/keycloak-themes/`. You can see how
we add it to Keycloak in the `docker-compose` file, and you can read up on how
to leverage custom themes in
[Keycloak's own docs](https://www.keycloak.org/docs/latest/server_development/index.html#_themes).
| Default Theme | OHIF Theme |
| ---------------------------------------------------------------------- | ---------------------------------------------------------------- |
| ![Keycloak Default Theme](../assets/img/keycloak-default-theme.png) | ![Keycloak OHIF Theme](../assets/img/keycloak-ohif-theme.png) |
## Next Steps
### Deploying to Production
While these configuration and docker-compose files model an environment suitable
for production, they are not easy to deploy "as is". You can either:
- Manually recreate this environment and deploy built application files **OR**
- Deploy to a cloud kubernetes provider like
[Digital Ocean](https://www.digitalocean.com/products/kubernetes/) **OR**
- [See a full list of cloud providers here](https://landscape.cncf.io/category=cloud&format=card-mode&grouping=category)
- Find and follow your preferred provider's guide on setting up
[swarms and stacks](https://docs.docker.com/get-started/)
### Adding SSL
Adding SSL registration and renewal for your domain with Let's Encrypt that
terminates at Nginx is an incredibly important step toward securing your data.
Here are some resources, specific to this setup, that may be helpful:
- [lua-resty-auto-ssl](https://github.com/GUI/lua-resty-auto-ssl)
- [Let's Encrypt + Nginx](https://www.nginx.com/blog/using-free-ssltls-certificates-from-lets-encrypt-with-nginx/)
While we terminate SSL at Nginx, it may be worth using self signed certificates
for communication between services.
- [SSL Termination for TCP Upstream Servers](https://docs.nginx.com/nginx/admin-guide/security-controls/terminating-ssl-tcp/)
### Use PostgresSQL w/ Orthanc
Orthanc can handle a large amount of data and requests, but if you find that
requests start to slow as you add more and more studies, you may want to
configure your Orthanc instance to use PostgresSQL. Instructions on how to do
that can be found in the
[`Orthanc Server Book`](http://book.orthanc-server.com/users/docker.html), under
"PostgreSQL and Orthanc inside Docker"
### Improving This Guide
Here are some improvements this guide would benefit from, and that we would be
more than happy to accept Pull Requests for:
- SSL Support
- Complete configuration with `.env` file (or something similar)
- Keycloak Theme improvements
- Any security issues
- One-click deploy to a cloud provider
## Resources
### Misc. Helpful Commands
_Check if `nginx.conf` is valid:_
```bash
docker run --rm -t -a stdout --name my-openresty -v $PWD/config/:/usr/local/openresty/nginx/conf/:ro openresty/openresty:alpine-fat openresty -c /usr/local/openresty/nginx/conf/nginx.conf -t
```
_Interact w/ running container:_
`docker exec -it CONTAINER_NAME bash`
_List running containers:_
`docker ps`
_Clear Keycloak DB so you can re-seed values:_
- `docker volume prune` OR
- `docker volume ls` and `docker volume rm VOLUME_NAME VOLUME_NAME`
### Referenced Articles
The inspiration for our setup was driven largely by these articles:
- [Securing Nginx with Keycloak](https://edhull.co.uk/blog/2018-06-06/keycloak-nginx)
- [Authenticating Reverse Proxy with Keycloak](https://eclipsesource.com/blogs/2018/01/11/authenticating-reverse-proxy-with-keycloak/)
- [Securing APIs with Kong and Keycloak](https://www.jerney.io/secure-apis-kong-keycloak-1/)
For more documentation on the software we've chosen to use, you may find the
following resources helpful:
- [Orthanc for Docker](http://book.orthanc-server.com/users/docker.html)
- [OpenResty Guide](http://www.staticshin.com/programming/definitely-an-open-resty-guide/)
- [Lua Ngx API](https://openresty-reference.readthedocs.io/en/latest/Lua_Nginx_API/)
- [Auth0: Picking a Grant Type](https://auth0.com/docs/api-auth/which-oauth-flow-to-use)
We chose to use a generic OpenID Connect library on the client, but it's worth
noting that Keycloak comes packaged with its own:
- [oidc-client-js](https://github.com/IdentityModel/oidc-client-js/wiki)
- [Keycloak JavaScript Adapter](https://www.keycloak.org/docs/latest/securing_apps/index.html#_javascript_adapter)
If you're not already drowning in links, here are some good security resources
for OAuth:
- [Diagrams of OpenID Connect Flows](https://medium.com/@darutk/diagrams-of-all-the-openid-connect-flows-6968e3990660)
- [KeyCloak: OpenID Connect Flows](https://www.keycloak.org/docs/latest/securing_apps/index.html#authorization-code)
For a different take on this setup, check out the repositories our community
members put together:
- [mjstealey/ohif-orthanc-dimse-docker](https://github.com/mjstealey/ohif-orthanc-dimse-docker)
- [trypag/ohif-orthanc-postgres-docker](https://github.com/trypag/ohif-orthanc-postgres-docker)
<!--
Links
-->
<!-- prettier-ignore-start -->
<!-- DOCS -->
[orthanc-docs]: http://book.orthanc-server.com/users/configuration.html#configuration
[lua-resty-openidc-docs]: https://github.com/zmartzone/lua-resty-openidc
<!-- SRC -->
[config]: https://github.com/OHIF/Viewers/blob/master/platform/viewer/src/config.js
[dockerfile]: https://github.com/OHIF/Viewers/blob/master/platform/viewer/.recipes/OpenResty-Orthanc-Keycloak/dockerfile
[config-nginx]: https://github.com/OHIF/Viewers/blob/master/platform/viewer/.recipes/OpenResty-Orthanc-Keycloak/config/nginx.conf
[config-orthanc]: https://github.com/OHIF/Viewers/blob/master/platform/viewer/.recipes/OpenResty-Orthanc-Keycloak/config/orthanc.json
[config-keycloak]: https://github.com/OHIF/Viewers/blob/master/platform/viewer/.recipes/OpenResty-Orthanc-Keycloak/config/ohif-keycloak-realm.json
<!-- prettier-ignore-end -->
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ohif-docs",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"private": true,
"workspaces": {
"nohoist": [
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/i18n
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/i18n
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/i18n
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/i18n
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/i18n",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "Internationalization library for The OHIF Viewer",
"author": "OHIF",
"license": "MIT",
+24
View File
@@ -3,6 +3,30 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
# [3.7.0-beta.76](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.75...v3.7.0-beta.76) (2023-09-19)
**Note:** Version bump only for package @ohif/ui
# [3.7.0-beta.75](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.74...v3.7.0-beta.75) (2023-09-18)
**Note:** Version bump only for package @ohif/ui
# [3.7.0-beta.74](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.73...v3.7.0-beta.74) (2023-09-15)
**Note:** Version bump only for package @ohif/ui
# [3.7.0-beta.73](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.72...v3.7.0-beta.73) (2023-09-12)
**Note:** Version bump only for package @ohif/ui
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@ohif/ui",
"version": "3.7.0-beta.73",
"version": "3.7.0-beta.76",
"description": "A set of React components for Medical Imaging Viewers",
"author": "OHIF Contributors",
"license": "MIT",
+2 -2
View File
@@ -1,4 +1,4 @@
{
"version": "3.7.0-beta.73",
"commit": "74e62a176374f720080d4e777972f70e7f2d8b2b"
"version": "3.7.0-beta.76",
"commit": "2d7721cb581f55dc49e3baeca2411b18dd78ad74"
}
+1 -1
View File
@@ -1 +1 @@
3.7.0-beta.73
3.7.0-beta.76