diff --git a/.scripts/dicom-json-generator.js b/.scripts/dicom-json-generator.js new file mode 100644 index 00000000000..5b9f45a16a6 --- /dev/null +++ b/.scripts/dicom-json-generator.js @@ -0,0 +1,265 @@ +/* + * This script uses nodejs to generate a JSON file from a DICOM study folder. + * You need to have dcmjs installed in your project. + * The JSON file can be used to load the study into the OHIF Viewer. You can get more detail + * in the DICOM JSON Data source on docs.ohif.org + * + * Usage: node dicomStudyToJSONLaunch.js + * + * params: + * - studyFolder: path to the study folder + * - urlPrefix: prefix to the url that will be used to load the study into the viewer. For instance + * we use https://ohif-assets.s3.us-east-2.amazonaws.com/dicom-json/data as the urlPrefix for the + * example since the data is hosted on S3 and each study is in a folder. So the url in the generated + * json file for the first instance of the first series of the first study will be + * dicomweb:https://ohif-assets.s3.us-east-2.amazonaws.com/dicom-json/data/Series1/Instance1 + * - outputJSONPath: path to the output JSON file + */ +const dcmjs = require('dcmjs'); +const path = require('path'); +const fs = require('fs').promises; + +const args = process.argv.slice(2); +const [studyDirectory, urlPrefix, outputPath] = args; + +if (args.length !== 3) { + console.error('Usage: node dicomStudyToJSONLaunch.js '); + process.exit(1); +} + +const model = { + studies: [], +}; + +async function convertDICOMToJSON(studyDirectory, urlPrefix, outputPath) { + try { + const files = await recursiveReadDir(studyDirectory); + console.debug('Processing...'); + + for (const file of files) { + if (!file.includes('.DS_Store') && !file.includes('.xml')) { + const arrayBuffer = await fs.readFile(file); + const dicomDict = dcmjs.data.DicomMessage.readFile(arrayBuffer.buffer); + const instance = dcmjs.data.DicomMetaDictionary.naturalizeDataset(dicomDict.dict); + + instance.fileLocation = createImageId(file, urlPrefix, studyDirectory); + processInstance(instance); + } + } + + console.log('Successfully loaded data'); + + model.studies.forEach(study => { + study.NumInstances = findInstancesNumber(study); + study.Modalities = findModalities(study).join('/'); + }); + + await fs.writeFile(outputPath, JSON.stringify(model, null, 2)); + console.log('JSON saved'); + } catch (error) { + console.error(error); + } +} + +async function recursiveReadDir(dir) { + let results = []; + const list = await fs.readdir(dir); + for (const file of list) { + const filePath = path.resolve(dir, file); + const stat = await fs.stat(filePath); + if (stat.isDirectory()) { + const res = await recursiveReadDir(filePath); + results = results.concat(res); + } else { + results.push(filePath); + } + } + return results; +} + +function createImageId(fileLocation, urlPrefix, studyDirectory) { + const relativePath = path.relative(studyDirectory, fileLocation); + const normalizedPath = path.normalize(relativePath).replace(/\\/g, '/'); + return `dicomweb:${urlPrefix}${normalizedPath}`; +} + +function processInstance(instance) { + const { StudyInstanceUID, SeriesInstanceUID } = instance; + let study = getStudy(StudyInstanceUID); + + if (!study) { + study = createStudyMetadata(StudyInstanceUID, instance); + model.studies.push(study); + } + + let series = getSeries(StudyInstanceUID, SeriesInstanceUID); + + if (!series) { + series = createSeriesMetadata(instance); + study.series.push(series); + } + + const instanceMetaData = + instance.NumberOfFrames > 1 + ? createInstanceMetaDataMultiFrame(instance) + : createInstanceMetaData(instance); + + series.instances.push(...[].concat(instanceMetaData)); +} + +function getStudy(StudyInstanceUID) { + return model.studies.find(study => study.StudyInstanceUID === StudyInstanceUID); +} + +function getSeries(StudyInstanceUID, SeriesInstanceUID) { + const study = getStudy(StudyInstanceUID); + return study + ? study.series.find(series => series.SeriesInstanceUID === SeriesInstanceUID) + : undefined; +} + +const findInstancesNumber = study => { + let numInstances = 0; + study.series.forEach(aSeries => { + numInstances = numInstances + aSeries.instances.length; + }); + return numInstances; +}; + +const findModalities = study => { + let modalities = new Set(); + study.series.forEach(aSeries => { + modalities.add(aSeries.Modality); + }); + return Array.from(modalities); +}; + +function createStudyMetadata(StudyInstanceUID, instance) { + return { + StudyInstanceUID, + StudyDescription: instance.StudyDescription, + StudyDate: instance.StudyDate, + StudyTime: instance.StudyTime, + PatientName: instance.PatientName, + PatientID: instance.PatientID || '1234', // this is critical to have + AccessionNumber: instance.AccessionNumber, + PatientAge: instance.PatientAge, + PatientSex: instance.PatientSex, + PatientWeight: instance.PatientWeight, + series: [], + }; +} +function createSeriesMetadata(instance) { + return { + SeriesInstanceUID: instance.SeriesInstanceUID, + SeriesDescription: instance.SeriesDescription, + SeriesNumber: instance.SeriesNumber, + SeriesTime: instance.SeriesTime, + Modality: instance.Modality, + SliceThickness: instance.SliceThickness, + instances: [], + }; +} +function commonMetaData(instance) { + return { + Columns: instance.Columns, + Rows: instance.Rows, + InstanceNumber: instance.InstanceNumber, + SOPClassUID: instance.SOPClassUID, + AcquisitionNumber: instance.AcquisitionNumber, + PhotometricInterpretation: instance.PhotometricInterpretation, + BitsAllocated: instance.BitsAllocated, + BitsStored: instance.BitsStored, + PixelRepresentation: instance.PixelRepresentation, + SamplesPerPixel: instance.SamplesPerPixel, + PixelSpacing: instance.PixelSpacing, + HighBit: instance.HighBit, + ImageOrientationPatient: instance.ImageOrientationPatient, + ImagePositionPatient: instance.ImagePositionPatient, + FrameOfReferenceUID: instance.FrameOfReferenceUID, + ImageType: instance.ImageType, + Modality: instance.Modality, + SOPInstanceUID: instance.SOPInstanceUID, + SeriesInstanceUID: instance.SeriesInstanceUID, + StudyInstanceUID: instance.StudyInstanceUID, + WindowCenter: instance.WindowCenter, + WindowWidth: instance.WindowWidth, + RescaleIntercept: instance.RescaleIntercept, + RescaleSlope: instance.RescaleSlope, + }; +} + +function conditionalMetaData(instance) { + return { + ...(instance.ConceptNameCodeSequence && { + ConceptNameCodeSequence: instance.ConceptNameCodeSequence, + }), + ...(instance.SeriesDate && { SeriesDate: instance.SeriesDate }), + ...(instance.ReferencedSeriesSequence && { + ReferencedSeriesSequence: instance.ReferencedSeriesSequence, + }), + ...(instance.SharedFunctionalGroupsSequence && { + SharedFunctionalGroupsSequence: instance.SharedFunctionalGroupsSequence, + }), + ...(instance.PerFrameFunctionalGroupsSequence && { + PerFrameFunctionalGroupsSequence: instance.PerFrameFunctionalGroupsSequence, + }), + ...(instance.ContentSequence && { ContentSequence: instance.ContentSequence }), + ...(instance.ContentTemplateSequence && { + ContentTemplateSequence: instance.ContentTemplateSequence, + }), + ...(instance.CurrentRequestedProcedureEvidenceSequence && { + CurrentRequestedProcedureEvidenceSequence: instance.CurrentRequestedProcedureEvidenceSequence, + }), + ...(instance.CodingSchemeIdentificationSequence && { + CodingSchemeIdentificationSequence: instance.CodingSchemeIdentificationSequence, + }), + ...(instance.RadiopharmaceuticalInformationSequence && { + RadiopharmaceuticalInformationSequence: instance.RadiopharmaceuticalInformationSequence, + }), + ...(instance.ROIContourSequence && { + ROIContourSequence: instance.ROIContourSequence, + }), + ...(instance.StructureSetROISequence && { + StructureSetROISequence: instance.StructureSetROISequence, + }), + ...(instance.ReferencedFrameOfReferenceSequence && { + ReferencedFrameOfReferenceSequence: instance.ReferencedFrameOfReferenceSequence, + }), + ...(instance.CorrectedImage && { CorrectedImage: instance.CorrectedImage }), + ...(instance.Units && { Units: instance.Units }), + ...(instance.DecayCorrection && { DecayCorrection: instance.DecayCorrection }), + ...(instance.AcquisitionDate && { AcquisitionDate: instance.AcquisitionDate }), + ...(instance.AcquisitionTime && { AcquisitionTime: instance.AcquisitionTime }), + ...(instance.PatientWeight && { PatientWeight: instance.PatientWeight }), + ...(instance.NumberOfFrames && { NumberOfFrames: instance.NumberOfFrames }), + ...(instance.FrameTime && { FrameTime: instance.FrameTime }), + ...(instance.EncapsulatedDocument && { EncapsulatedDocument: instance.EncapsulatedDocument }), + ...(instance.SequenceOfUltrasoundRegions && { + SequenceOfUltrasoundRegions: instance.SequenceOfUltrasoundRegions, + }), + }; +} + +function createInstanceMetaData(instance) { + const metadata = { + ...commonMetaData(instance), + ...conditionalMetaData(instance), + }; + return { metadata, url: instance.fileLocation }; +} + +function createInstanceMetaDataMultiFrame(instance) { + const instances = []; + const commonData = commonMetaData(instance); + const conditionalData = conditionalMetaData(instance); + + for (let i = 1; i <= instance.NumberOfFrames; i++) { + const metadata = { ...commonData, ...conditionalData }; + const result = { metadata, url: instance.fileLocation + `?frame=${i}` }; + instances.push(result); + } + return instances; +} + +convertDICOMToJSON(studyDirectory, urlPrefix, outputPath); diff --git a/.vscode/settings.json b/.vscode/settings.json index db08c79b1ab..84cc76bc295 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -31,6 +31,6 @@ "prettier.endOfLine": "lf", "workbench.colorCustomizations": {}, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true + "source.fixAll.eslint": "explicit" } } diff --git a/.webpack/rules/stylusToJavaScript.js b/.webpack/rules/stylusToJavaScript.js new file mode 100644 index 00000000000..1d83f95281e --- /dev/null +++ b/.webpack/rules/stylusToJavaScript.js @@ -0,0 +1,10 @@ +const stylusToJavaScript = { + test: /\.styl$/, + use: [ + { loader: 'style-loader' }, // 3. Style nodes from JS Strings + { loader: 'css-loader' }, // 2. CSS to CommonJS + { loader: 'stylus-loader' }, // 1. Stylus to CSS + ], +}; + +module.exports = stylusToJavaScript; diff --git a/.webpack/webpack.base.js b/.webpack/webpack.base.js index 004c73ece8e..6efedd0d2cd 100644 --- a/.webpack/webpack.base.js +++ b/.webpack/webpack.base.js @@ -18,6 +18,7 @@ const loadShadersRule = require('./rules/loadShaders.js'); const loadWebWorkersRule = require('./rules/loadWebWorkers.js'); const transpileJavaScriptRule = require('./rules/transpileJavaScript.js'); const cssToJavaScript = require('./rules/cssToJavaScript.js'); +const stylusToJavaScript = require('./rules/stylusToJavaScript.js'); // ~~ ENV VARS const NODE_ENV = process.env.NODE_ENV; @@ -112,6 +113,9 @@ module.exports = (env, argv, { SRC_DIR, ENTRY }) => { }, }, cssToJavaScript, + // 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/CHANGELOG.md b/CHANGELOG.md index a192cb9565e..a0c881e61be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,493 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package ohif-monorepo-root + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package ohif-monorepo-root + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + + +### Bug Fixes + +* **icon-style:** Ensure consistent icon dimensions ([#3727](https://github.com/OHIF/Viewers/issues/3727)) ([6ca13c0](https://github.com/OHIF/Viewers/commit/6ca13c0a4cb5a95bbb52b0db902b5dbf72f8aa6e)) + + +### Features + +* **overlay:** add inline binary overlays ([#3852](https://github.com/OHIF/Viewers/issues/3852)) ([0177b62](https://github.com/OHIF/Viewers/commit/0177b625ba86760168bc4db58c8a109aa9ee83cb)) + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package ohif-monorepo-root + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package ohif-monorepo-root + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package ohif-monorepo-root + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + + +### Features + +* **customizationService:** Enable saving and loading of private tags in SRs ([#3842](https://github.com/OHIF/Viewers/issues/3842)) ([e1f55e6](https://github.com/OHIF/Viewers/commit/e1f55e65f2d2a34136ad5d0b1ada77d337a0ea23)) + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Bug Fixes + +* address and improve system vulnerabilities ([#3851](https://github.com/OHIF/Viewers/issues/3851)) ([805c532](https://github.com/OHIF/Viewers/commit/805c53270f243ec61f142a3ffa0af500021cd5ec)) + + +### Features + +* **config:** Add activateViewportBeforeInteraction parameter for viewport interaction customization ([#3847](https://github.com/OHIF/Viewers/issues/3847)) ([f707b4e](https://github.com/OHIF/Viewers/commit/f707b4ebc996f379cd30337badc06b07e6e35ac5)) +* **i18n:** enhanced i18n support ([#3761](https://github.com/OHIF/Viewers/issues/3761)) ([d14a8f0](https://github.com/OHIF/Viewers/commit/d14a8f0199db95cd9e85866a011b64d6bf830d57)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + + +### Features + +* **HP:** Added new 3D hanging protocols to be used in the new layout selector ([#3844](https://github.com/OHIF/Viewers/issues/3844)) ([59576d6](https://github.com/OHIF/Viewers/commit/59576d695d4d26601d35c43f73d602f0b12d72bf)) + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + + +### Bug Fixes + +* **auth:** fix the issue with oauth at a non root path ([#3840](https://github.com/OHIF/Viewers/issues/3840)) ([6651008](https://github.com/OHIF/Viewers/commit/6651008fbb35dabd5991c7f61128e6ef324012df)) + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + + +### Bug Fixes + +* **SM:** drag and drop is now fixed for SM ([#3813](https://github.com/OHIF/Viewers/issues/3813)) ([f1a6764](https://github.com/OHIF/Viewers/commit/f1a67647aed635437b188cea7cf5d5a8fb974bbe)) + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + + +### Bug Fixes + +* **cine:** Set cine disabled on mode exit. ([#3812](https://github.com/OHIF/Viewers/issues/3812)) ([924affa](https://github.com/OHIF/Viewers/commit/924affa7b5d420c2f91522a075cecbb3c78e8f52)) + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + + +### Bug Fixes + +* Update the CS3D packages to add the most recent HTJ2K TSUIDS ([#3806](https://github.com/OHIF/Viewers/issues/3806)) ([9d1884d](https://github.com/OHIF/Viewers/commit/9d1884d7d8b6b2a1cdc26965a96995838aa72682)) + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + + +### Features + +* Merge Data Source ([#3788](https://github.com/OHIF/Viewers/issues/3788)) ([c4ff2c2](https://github.com/OHIF/Viewers/commit/c4ff2c2f09546ce8b72eab9c5e7beed611e3cab0)) + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + + +### Features + +* **events:** broadcast series summary metadata ([#3798](https://github.com/OHIF/Viewers/issues/3798)) ([404b0a5](https://github.com/OHIF/Viewers/commit/404b0a5d535182d1ae44e33f7232db500a7b2c16)) + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + + +### Bug Fixes + +* **DICOM Overlay:** The overlay data wasn't being refreshed on change ([#3793](https://github.com/OHIF/Viewers/issues/3793)) ([00e7519](https://github.com/OHIF/Viewers/commit/00e751933ac6d611a34773fa69594243f1b99082)) + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + + +### Bug Fixes + +* **metadata:** to handle cornerstone3D update for htj2k ([#3783](https://github.com/OHIF/Viewers/issues/3783)) ([8c8924a](https://github.com/OHIF/Viewers/commit/8c8924af373d906773f5db20defe38628cacd4a0)) + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + + +### Features + +* **docs:** Added various training videos to support the OHIF CLI tools ([#3794](https://github.com/OHIF/Viewers/issues/3794)) ([d83beb7](https://github.com/OHIF/Viewers/commit/d83beb7c62c1d5be19c54e08d23883f112147fe1)) + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + + +### Features + +* **url:** Add SeriesInstanceUIDs wado query param ([#3746](https://github.com/OHIF/Viewers/issues/3746)) ([b694228](https://github.com/OHIF/Viewers/commit/b694228dd535e4b97cb86a1dc085b6e8716bdaf3)) + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + + +### Bug Fixes + +* 🐛 Run error handler for failed image requests ([#3773](https://github.com/OHIF/Viewers/issues/3773)) ([3234014](https://github.com/OHIF/Viewers/commit/323401418e7ccab74655ba02f990bbe0ed4e523b)) + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + + +### Bug Fixes + +* **overlay:** Overlays aren't shown on undefined origin ([#3781](https://github.com/OHIF/Viewers/issues/3781)) ([fd1251f](https://github.com/OHIF/Viewers/commit/fd1251f751d8147b8a78c7f4d81c67ba69769afa)) + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + + +### Features + +* **dicomJSON:** Add Loading Other Display Sets and JSON Metadata Generation script ([#3777](https://github.com/OHIF/Viewers/issues/3777)) ([43b1c17](https://github.com/OHIF/Viewers/commit/43b1c17209502e4876ad59bae09ed9442eda8024)) + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + + +### Bug Fixes + +* **path:** upgrade docusaurus for security ([#3780](https://github.com/OHIF/Viewers/issues/3780)) ([8bbcd0e](https://github.com/OHIF/Viewers/commit/8bbcd0e692e25917c1b6dd94a39fac834c812fca)) + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + + +### Bug Fixes + +* **arrow:** ArrowAnnotate text key cause validation error ([#3771](https://github.com/OHIF/Viewers/issues/3771)) ([8af1046](https://github.com/OHIF/Viewers/commit/8af10468035f1f59e0a21e579d50ad63c8cbf7ad)) + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + + +### Features + +* add VolumeViewport rotation ([#3776](https://github.com/OHIF/Viewers/issues/3776)) ([442f99d](https://github.com/OHIF/Viewers/commit/442f99d5eb2ceece7def20e14da59af1dd7d8442)) + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + + +### Features + +* **hp callback:** Add viewport ready callback ([#3772](https://github.com/OHIF/Viewers/issues/3772)) ([bf252bc](https://github.com/OHIF/Viewers/commit/bf252bcec2aae3a00479fdcb732110b344bcf2c0)) + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package ohif-monorepo-root + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + + +### Bug Fixes + +* **thumbnail:** Avoid multiple promise creations for thumbnails ([#3756](https://github.com/OHIF/Viewers/issues/3756)) ([b23eeff](https://github.com/OHIF/Viewers/commit/b23eeff93745769e67e60c33d75293d6242c5ec9)) + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + + +### Features + +* **i18n:** enhanced i18n support ([#3730](https://github.com/OHIF/Viewers/issues/3730)) ([330e11c](https://github.com/OHIF/Viewers/commit/330e11c7ff0151e1096e19b8ffdae7d64cae280e)) + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + + +### Bug Fixes + +* **measurement service:** Implemented correct check of schema keys in _isValidMeasurment. ([#3750](https://github.com/OHIF/Viewers/issues/3750)) ([db39585](https://github.com/OHIF/Viewers/commit/db395852b6fc6cd5c265a9282e5eee5bd6f951b7)) + + +### Features + +* **filters:** save worklist query filters to session storage so that they persist between navigation to the viewer and back ([#3749](https://github.com/OHIF/Viewers/issues/3749)) ([2a15ef0](https://github.com/OHIF/Viewers/commit/2a15ef0e44b7b4d8bbf5cb9363db6e523201c681)) + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + + +### Bug Fixes + +* **toolbar:** allow customizable toolbar for active viewport and allow active tool to be deactivated via a click ([#3608](https://github.com/OHIF/Viewers/issues/3608)) ([dd6d976](https://github.com/OHIF/Viewers/commit/dd6d9768bbca1d3cc472e8c1e6d85822500b96ef)) + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + + +### Bug Fixes + +* **sr:** dcm4chee requires the patient name for an SR to match what is in the original study ([#3739](https://github.com/OHIF/Viewers/issues/3739)) ([d98439f](https://github.com/OHIF/Viewers/commit/d98439fe7f3825076dbc87b664a1d1480ff414d3)) + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package ohif-monorepo-root + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + + +### Bug Fixes + +* **recipes:** package.json script orthanc:up docker-compose path ([#3741](https://github.com/OHIF/Viewers/issues/3741)) ([49514ae](https://github.com/OHIF/Viewers/commit/49514aedfe0498b5bd505193106a9745a6a5b5e6)) + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + + +### Bug Fixes + +* **cine:** Use the frame rate specified in DICOM and optionally auto play cine ([#3735](https://github.com/OHIF/Viewers/issues/3735)) ([d9258ec](https://github.com/OHIF/Viewers/commit/d9258eca70587cf4dc18be4e56c79b16bae73d6d)) + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + + +### Bug Fixes + +* **calibration:** No calibration popup caused by perhaps an unused code optimization for production builds ([#3736](https://github.com/OHIF/Viewers/issues/3736)) ([93d798d](https://github.com/OHIF/Viewers/commit/93d798db99c0dee53ef73c376f8a74ac3049cf3f)) + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package ohif-monorepo-root + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + + +### Bug Fixes + +* **display messages:** broken after timings ([#3719](https://github.com/OHIF/Viewers/issues/3719)) ([157b88c](https://github.com/OHIF/Viewers/commit/157b88c909d3289cb89ace731c1f9a19d40797ac)) + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + + +### Bug Fixes + +* **export:** wrong export for the tmtv RT function ([#3715](https://github.com/OHIF/Viewers/issues/3715)) ([a3f2a1a](https://github.com/OHIF/Viewers/commit/a3f2a1a7b0d16bfcc0ecddc2ab731e54c5e377c8)) + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + + +### Bug Fixes + +* **i18n:** display set(s) are two words for English messages ([#3711](https://github.com/OHIF/Viewers/issues/3711)) ([c3a5847](https://github.com/OHIF/Viewers/commit/c3a5847dcd3dce4f1c8d8b11af95f79e3f93f70d)) + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + + +### Bug Fixes + +* **modules:** add stylus loader as an option to be uncommented ([#3710](https://github.com/OHIF/Viewers/issues/3710)) ([7c57f67](https://github.com/OHIF/Viewers/commit/7c57f67844b790fc6e47ac3f9708bf9d576389c8)) + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + + +### Bug Fixes + +* **segmentation:** Various fixes for segmentation mode and other ([#3709](https://github.com/OHIF/Viewers/issues/3709)) ([a9a6ad5](https://github.com/OHIF/Viewers/commit/a9a6ad50eae67b43b8b34efc07182d788cacdcfe)) + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + + +### Bug Fixes + +* **voi:** should publish voi change event on reset ([#3707](https://github.com/OHIF/Viewers/issues/3707)) ([52f34c6](https://github.com/OHIF/Viewers/commit/52f34c64d014f433ec1661a39b47e7fb27f15332)) + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + + +### Bug Fixes + +* **modality unit:** fix the modality unit per target via upgrade of cs3d ([#3706](https://github.com/OHIF/Viewers/issues/3706)) ([0a42d57](https://github.com/OHIF/Viewers/commit/0a42d573bbca7f2551a831a46d3aa6b56674a580)) + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + + +### Bug Fixes + +* **segmentation:** do not use SAB if not specified ([#3705](https://github.com/OHIF/Viewers/issues/3705)) ([4911e47](https://github.com/OHIF/Viewers/commit/4911e4796cef5e22cb7cc0ca73dc5c956bc75339)) + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) diff --git a/README.md b/README.md index 04b71142326..5befea75c47 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,10 @@ provided by the Open Health Imaging Foundation (OHIF +
+ 📰 Join OHIF Newsletter 📰 +
+
diff --git a/babel.config.js b/babel.config.js index b55cbfdfa0e..9fbd804637a 100644 --- a/babel.config.js +++ b/babel.config.js @@ -26,6 +26,7 @@ module.exports = { '@babel/plugin-transform-typescript', ['@babel/plugin-proposal-private-property-in-object', { loose: true }], ['@babel/plugin-proposal-private-methods', { loose: true }], + '@babel/plugin-transform-class-static-block', ], env: { test: { @@ -45,6 +46,7 @@ module.exports = { '@babel/plugin-proposal-object-rest-spread', '@babel/plugin-syntax-dynamic-import', '@babel/plugin-transform-regenerator', + '@babel/transform-destructuring', '@babel/plugin-transform-runtime', '@babel/plugin-transform-typescript', ], diff --git a/commit.txt b/commit.txt index 9bcf4af7c5a..8687d1149d1 100644 --- a/commit.txt +++ b/commit.txt @@ -1 +1 @@ -40673f64b36b1150149c55632aa1825178a39e65 \ No newline at end of file +0eb502aaf0d95d7515e23ed0e03b140ac17bb862 diff --git a/extensions/cornerstone-dicom-rt/CHANGELOG.md b/extensions/cornerstone-dicom-rt/CHANGELOG.md index 5385caa9242..4e4498e42b7 100644 --- a/extensions/cornerstone-dicom-rt/CHANGELOG.md +++ b/extensions/cornerstone-dicom-rt/CHANGELOG.md @@ -3,6 +3,366 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) **Note:** Version bump only for package @ohif/extension-cornerstone-dicom-rt diff --git a/extensions/cornerstone-dicom-rt/package.json b/extensions/cornerstone-dicom-rt/package.json index 1b476d8a88b..9e1e51856b8 100644 --- a/extensions/cornerstone-dicom-rt/package.json +++ b/extensions/cornerstone-dicom-rt/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-cornerstone-dicom-rt", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "DICOM RT read workflow", "author": "OHIF", "license": "MIT", @@ -31,10 +31,10 @@ "start": "yarn run dev" }, "peerDependencies": { - "@ohif/core": "3.7.0-beta.102", - "@ohif/extension-cornerstone": "3.7.0-beta.102", - "@ohif/extension-default": "3.7.0-beta.102", - "@ohif/i18n": "3.7.0-beta.102", + "@ohif/core": "3.8.0-beta.36", + "@ohif/extension-cornerstone": "3.8.0-beta.36", + "@ohif/extension-default": "3.8.0-beta.36", + "@ohif/i18n": "3.8.0-beta.36", "prop-types": "^15.6.2", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/extensions/cornerstone-dicom-seg/CHANGELOG.md b/extensions/cornerstone-dicom-seg/CHANGELOG.md index ef8e2ac7f11..259d80f3719 100644 --- a/extensions/cornerstone-dicom-seg/CHANGELOG.md +++ b/extensions/cornerstone-dicom-seg/CHANGELOG.md @@ -3,6 +3,378 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + + +### Bug Fixes + +* **auth:** fix the issue with oauth at a non root path ([#3840](https://github.com/OHIF/Viewers/issues/3840)) ([6651008](https://github.com/OHIF/Viewers/commit/6651008fbb35dabd5991c7f61128e6ef324012df)) + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + + +### Bug Fixes + +* Update the CS3D packages to add the most recent HTJ2K TSUIDS ([#3806](https://github.com/OHIF/Viewers/issues/3806)) ([9d1884d](https://github.com/OHIF/Viewers/commit/9d1884d7d8b6b2a1cdc26965a96995838aa72682)) + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + + +### Bug Fixes + +* **voi:** should publish voi change event on reset ([#3707](https://github.com/OHIF/Viewers/issues/3707)) ([52f34c6](https://github.com/OHIF/Viewers/commit/52f34c64d014f433ec1661a39b47e7fb27f15332)) + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + + +### Bug Fixes + +* **modality unit:** fix the modality unit per target via upgrade of cs3d ([#3706](https://github.com/OHIF/Viewers/issues/3706)) ([0a42d57](https://github.com/OHIF/Viewers/commit/0a42d573bbca7f2551a831a46d3aa6b56674a580)) + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-seg + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) diff --git a/extensions/cornerstone-dicom-seg/package.json b/extensions/cornerstone-dicom-seg/package.json index 900179b9a10..4ce799f656d 100644 --- a/extensions/cornerstone-dicom-seg/package.json +++ b/extensions/cornerstone-dicom-seg/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-cornerstone-dicom-seg", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "DICOM SEG read workflow", "author": "OHIF", "license": "MIT", @@ -31,10 +31,10 @@ "start": "yarn run dev" }, "peerDependencies": { - "@ohif/core": "3.7.0-beta.102", - "@ohif/extension-cornerstone": "3.7.0-beta.102", - "@ohif/extension-default": "3.7.0-beta.102", - "@ohif/i18n": "3.7.0-beta.102", + "@ohif/core": "3.8.0-beta.36", + "@ohif/extension-cornerstone": "3.8.0-beta.36", + "@ohif/extension-default": "3.8.0-beta.36", + "@ohif/i18n": "3.8.0-beta.36", "prop-types": "^15.6.2", "react": "^17.0.2", "react-dom": "^17.0.2", @@ -44,8 +44,8 @@ }, "dependencies": { "@babel/runtime": "^7.20.13", - "@cornerstonejs/adapters": "^1.20.1", - "@cornerstonejs/tools": "^1.20.1", + "@cornerstonejs/adapters": "^1.40.3", + "@cornerstonejs/tools": "^1.40.3", "@kitware/vtk.js": "27.3.1", "react-color": "^2.19.3" } diff --git a/extensions/cornerstone-dicom-seg/src/getSopClassHandlerModule.js b/extensions/cornerstone-dicom-seg/src/getSopClassHandlerModule.js index 7548d492ea8..68a6b15bd24 100644 --- a/extensions/cornerstone-dicom-seg/src/getSopClassHandlerModule.js +++ b/extensions/cornerstone-dicom-seg/src/getSopClassHandlerModule.js @@ -1,5 +1,6 @@ import { utils } from '@ohif/core'; import { metaData, cache, triggerEvent, eventTarget } from '@cornerstonejs/core'; +import { CONSTANTS } from '@cornerstonejs/tools'; import { adaptersSEG, Enums } from '@cornerstonejs/adapters'; import { SOPClassHandlerId } from './id'; @@ -141,7 +142,7 @@ async function _loadSegments({ extensionManager, servicesManager, segDisplaySet, '@ohif/extension-cornerstone.utilityModule.common' ); - const { segmentationService } = servicesManager.services; + const { segmentationService, uiNotificationService } = servicesManager.services; const { dicomLoaderService } = utilityModule.exports; const arrayBuffer = await dicomLoaderService.findDicomDataPromise(segDisplaySet, null, headers); @@ -174,12 +175,31 @@ async function _loadSegments({ extensionManager, servicesManager, segDisplaySet, { skipOverlapping, tolerance, eventTarget, triggerEvent } ); + let usedRecommendedDisplayCIELabValue = true; results.segMetadata.data.forEach((data, i) => { if (i > 0) { - data.rgba = dicomlabToRGB(data.RecommendedDisplayCIELabValue); + data.rgba = data.RecommendedDisplayCIELabValue; + + if (data.rgba) { + data.rgba = dicomlabToRGB(data.rgba); + } else { + usedRecommendedDisplayCIELabValue = false; + data.rgba = CONSTANTS.COLOR_LUT[i % CONSTANTS.COLOR_LUT.length]; + } } }); + if (!usedRecommendedDisplayCIELabValue) { + // Display a notification about the non-utilization of RecommendedDisplayCIELabValue + uiNotificationService.show({ + title: 'DICOM SEG import', + message: + 'RecommendedDisplayCIELabValue not found for one or more segments. The default color was used instead.', + type: 'warning', + duration: 5000, + }); + } + Object.assign(segDisplaySet, results); } diff --git a/extensions/cornerstone-dicom-sr/CHANGELOG.md b/extensions/cornerstone-dicom-sr/CHANGELOG.md index 7a3b3746105..f118269ea44 100644 --- a/extensions/cornerstone-dicom-sr/CHANGELOG.md +++ b/extensions/cornerstone-dicom-sr/CHANGELOG.md @@ -3,6 +3,387 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + + +### Features + +* **customizationService:** Enable saving and loading of private tags in SRs ([#3842](https://github.com/OHIF/Viewers/issues/3842)) ([e1f55e6](https://github.com/OHIF/Viewers/commit/e1f55e65f2d2a34136ad5d0b1ada77d337a0ea23)) + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + + +### Bug Fixes + +* **auth:** fix the issue with oauth at a non root path ([#3840](https://github.com/OHIF/Viewers/issues/3840)) ([6651008](https://github.com/OHIF/Viewers/commit/6651008fbb35dabd5991c7f61128e6ef324012df)) + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + + +### Bug Fixes + +* Update the CS3D packages to add the most recent HTJ2K TSUIDS ([#3806](https://github.com/OHIF/Viewers/issues/3806)) ([9d1884d](https://github.com/OHIF/Viewers/commit/9d1884d7d8b6b2a1cdc26965a96995838aa72682)) + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + + +### Features + +* **dicomJSON:** Add Loading Other Display Sets and JSON Metadata Generation script ([#3777](https://github.com/OHIF/Viewers/issues/3777)) ([43b1c17](https://github.com/OHIF/Viewers/commit/43b1c17209502e4876ad59bae09ed9442eda8024)) + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + + +### Bug Fixes + +* **sr:** dcm4chee requires the patient name for an SR to match what is in the original study ([#3739](https://github.com/OHIF/Viewers/issues/3739)) ([d98439f](https://github.com/OHIF/Viewers/commit/d98439fe7f3825076dbc87b664a1d1480ff414d3)) + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + + +### Bug Fixes + +* **voi:** should publish voi change event on reset ([#3707](https://github.com/OHIF/Viewers/issues/3707)) ([52f34c6](https://github.com/OHIF/Viewers/commit/52f34c64d014f433ec1661a39b47e7fb27f15332)) + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + + +### Bug Fixes + +* **modality unit:** fix the modality unit per target via upgrade of cs3d ([#3706](https://github.com/OHIF/Viewers/issues/3706)) ([0a42d57](https://github.com/OHIF/Viewers/commit/0a42d573bbca7f2551a831a46d3aa6b56674a580)) + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/extension-cornerstone-dicom-sr + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) diff --git a/extensions/cornerstone-dicom-sr/package.json b/extensions/cornerstone-dicom-sr/package.json index 4f0280f34c6..4a93e9e757d 100644 --- a/extensions/cornerstone-dicom-sr/package.json +++ b/extensions/cornerstone-dicom-sr/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-cornerstone-dicom-sr", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "OHIF extension for an SR Cornerstone Viewport", "author": "OHIF", "license": "MIT", @@ -32,11 +32,11 @@ "test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests" }, "peerDependencies": { - "@ohif/core": "3.7.0-beta.102", - "@ohif/extension-cornerstone": "3.7.0-beta.102", - "@ohif/extension-measurement-tracking": "3.7.0-beta.102", - "@ohif/ui": "3.7.0-beta.102", - "dcmjs": "^0.29.5", + "@ohif/core": "3.8.0-beta.36", + "@ohif/extension-cornerstone": "3.8.0-beta.36", + "@ohif/extension-measurement-tracking": "3.8.0-beta.36", + "@ohif/ui": "3.8.0-beta.36", + "dcmjs": "^0.29.12", "dicom-parser": "^1.8.9", "hammerjs": "^2.0.8", "prop-types": "^15.6.2", @@ -44,9 +44,9 @@ }, "dependencies": { "@babel/runtime": "^7.20.13", - "@cornerstonejs/adapters": "^1.20.1", - "@cornerstonejs/core": "^1.20.1", - "@cornerstonejs/tools": "^1.20.1", + "@cornerstonejs/adapters": "^1.40.3", + "@cornerstonejs/core": "^1.40.3", + "@cornerstonejs/tools": "^1.40.3", "classnames": "^2.3.2" } } diff --git a/extensions/cornerstone-dicom-sr/src/commandsModule.js b/extensions/cornerstone-dicom-sr/src/commandsModule.js index ec68cabb951..33e8a869f18 100644 --- a/extensions/cornerstone-dicom-sr/src/commandsModule.js +++ b/extensions/cornerstone-dicom-sr/src/commandsModule.js @@ -40,7 +40,9 @@ const _generateReport = (measurementData, additionalFindingTypes, options = {}) return dataset; }; -const commandsModule = ({}) => { +const commandsModule = props => { + const { servicesManager } = props; + const { customizationService } = servicesManager.services; const actions = { /** * @@ -95,7 +97,15 @@ const commandsModule = ({}) => { throw new Error('Invalid report, no content'); } - await dataSource.store.dicom(naturalizedReport); + const onBeforeDicomStore = + customizationService.getModeCustomization('onBeforeDicomStore')?.value; + + let dicomDict; + if (typeof onBeforeDicomStore === 'function') { + dicomDict = onBeforeDicomStore({ measurementData, naturalizedReport }); + } + + await dataSource.store.dicom(naturalizedReport, null, dicomDict); if (StudyInstanceUID) { dataSource.deleteStudyMetadataPromise(StudyInstanceUID); diff --git a/extensions/cornerstone-dicom-sr/src/getSopClassHandlerModule.ts b/extensions/cornerstone-dicom-sr/src/getSopClassHandlerModule.ts index 5cdf455f605..fbeaa531643 100644 --- a/extensions/cornerstone-dicom-sr/src/getSopClassHandlerModule.ts +++ b/extensions/cornerstone-dicom-sr/src/getSopClassHandlerModule.ts @@ -171,7 +171,12 @@ function _load(displaySet, servicesManager, extensionManager) { // Check currently added displaySets and add measurements if the sources exist. displaySetService.activeDisplaySets.forEach(activeDisplaySet => { - _checkIfCanAddMeasurementsToDisplaySet(displaySet, activeDisplaySet, dataSource); + _checkIfCanAddMeasurementsToDisplaySet( + displaySet, + activeDisplaySet, + dataSource, + servicesManager + ); }); // Subscribe to new displaySets as the source may come in after. @@ -180,12 +185,23 @@ function _load(displaySet, servicesManager, extensionManager) { // If there are still some measurements that have not yet been loaded into cornerstone, // See if we can load them onto any of the new displaySets. displaySetsAdded.forEach(newDisplaySet => { - _checkIfCanAddMeasurementsToDisplaySet(displaySet, newDisplaySet, dataSource); + _checkIfCanAddMeasurementsToDisplaySet( + displaySet, + newDisplaySet, + dataSource, + servicesManager + ); }); }); } -function _checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, newDisplaySet, dataSource) { +function _checkIfCanAddMeasurementsToDisplaySet( + srDisplaySet, + newDisplaySet, + dataSource, + servicesManager +) { + const { customizationService } = servicesManager.services; let unloadedMeasurements = srDisplaySet.measurements.filter( measurement => measurement.loaded === false ); @@ -200,7 +216,11 @@ function _checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, newDisplaySet, dat return; } - const { sopClassUids, images } = newDisplaySet; + if (newDisplaySet.unsupported) { + return; + } + + const { sopClassUids } = newDisplaySet; // Check if any have the newDisplaySet is the correct SOPClass. unloadedMeasurements = unloadedMeasurements.filter(measurement => @@ -240,7 +260,20 @@ function _checkIfCanAddMeasurementsToDisplaySet(srDisplaySet, newDisplaySet, dat if (SOPInstanceUIDs.includes(SOPInstanceUID)) { for (let j = unloadedMeasurements.length - 1; j >= 0; j--) { - const measurement = unloadedMeasurements[j]; + let measurement = unloadedMeasurements[j]; + + const onBeforeSRAddMeasurement = customizationService.getModeCustomization( + 'onBeforeSRAddMeasurement' + )?.value; + + if (typeof onBeforeSRAddMeasurement === 'function') { + measurement = onBeforeSRAddMeasurement({ + measurement, + StudyInstanceUID: srDisplaySet.StudyInstanceUID, + SeriesInstanceUID: srDisplaySet.SeriesInstanceUID, + }); + } + if (_measurementReferencesSOPInstanceUID(measurement, SOPInstanceUID, frameNumber)) { addMeasurement(measurement, imageId, newDisplaySet.displaySetInstanceUID); diff --git a/extensions/cornerstone-dicom-sr/src/tools/DICOMSRDisplayTool.ts b/extensions/cornerstone-dicom-sr/src/tools/DICOMSRDisplayTool.ts index 8160ea6501a..7b14b107f59 100644 --- a/extensions/cornerstone-dicom-sr/src/tools/DICOMSRDisplayTool.ts +++ b/extensions/cornerstone-dicom-sr/src/tools/DICOMSRDisplayTool.ts @@ -339,7 +339,9 @@ export default class DICOMSRDisplayTool extends AnnotationTool { const textLines = this._getTextBoxLinesFromLabels(label); const canvasTextBoxCoords = utilities.drawing.getTextBoxCoordsCanvas(adaptedCanvasCoordinates); - annotation.data.handles.textBox.worldPosition = viewport.canvasToWorld(canvasTextBoxCoords); + if (!annotation.data?.handles?.textBox?.worldPosition) { + annotation.data.handles.textBox.worldPosition = viewport.canvasToWorld(canvasTextBoxCoords); + } const textBoxPosition = viewport.worldToCanvas(annotation.data.handles.textBox.worldPosition); diff --git a/extensions/cornerstone-dicom-sr/src/utils/addMeasurement.ts b/extensions/cornerstone-dicom-sr/src/utils/addMeasurement.ts index e78b3c7f15c..348a7a79d85 100644 --- a/extensions/cornerstone-dicom-sr/src/utils/addMeasurement.ts +++ b/extensions/cornerstone-dicom-sr/src/utils/addMeasurement.ts @@ -52,7 +52,7 @@ export default function addMeasurement(measurement, imageId, displaySetInstanceU data: { label: measurement.labels, handles: { - textBox: {}, + textBox: measurement.textBox ?? {}, }, cachedStats: { TrackingUniqueIdentifier: measurementData.TrackingUniqueIdentifier, diff --git a/extensions/cornerstone-dicom-sr/src/utils/hydrateStructuredReport.js b/extensions/cornerstone-dicom-sr/src/utils/hydrateStructuredReport.js index 17216a84422..7dc9e657adc 100644 --- a/extensions/cornerstone-dicom-sr/src/utils/hydrateStructuredReport.js +++ b/extensions/cornerstone-dicom-sr/src/utils/hydrateStructuredReport.js @@ -90,7 +90,7 @@ export default function hydrateStructuredReport( const datasetToUse = _mapLegacyDataSet(instance); // Use dcmjs to generate toolState. - const storedMeasurementByAnnotationType = MeasurementReport.generateToolState( + let storedMeasurementByAnnotationType = MeasurementReport.generateToolState( datasetToUse, // NOTE: we need to pass in the imageIds to dcmjs since the we use them // for the imageToWorld transformation. The following assumes that the order @@ -101,6 +101,16 @@ export default function hydrateStructuredReport( metaData ); + const onBeforeSRHydration = + customizationService.getModeCustomization('onBeforeSRHydration')?.value; + + if (typeof onBeforeSRHydration === 'function') { + storedMeasurementByAnnotationType = onBeforeSRHydration({ + storedMeasurementByAnnotationType, + displaySet, + }); + } + // Filter what is found by DICOM SR to measurements we support. const mappingDefinitions = mappings.map(m => m.annotationType); const hydratableMeasurementsInSR = {}; diff --git a/extensions/cornerstone-dicom-sr/src/viewports/OHIFCornerstoneSRViewport.tsx b/extensions/cornerstone-dicom-sr/src/viewports/OHIFCornerstoneSRViewport.tsx index a1e728bdda7..0937ca1ff10 100644 --- a/extensions/cornerstone-dicom-sr/src/viewports/OHIFCornerstoneSRViewport.tsx +++ b/extensions/cornerstone-dicom-sr/src/viewports/OHIFCornerstoneSRViewport.tsx @@ -360,7 +360,7 @@ function OHIFCornerstoneSRViewport(props) { patientSex: PatientSex || '', patientAge: PatientAge || '', MRN: PatientID || '', - thickness: SliceThickness ? `${SliceThickness.toFixed(2)}mm` : '', + thickness: SliceThickness ? `${parseFloat(SliceThickness).toFixed(2)}mm` : '', spacing: SpacingBetweenSlices !== undefined ? `${SpacingBetweenSlices.toFixed(2)}mm` : '', scanner: ManufacturerModelName || '', diff --git a/extensions/cornerstone/CHANGELOG.md b/extensions/cornerstone/CHANGELOG.md index ca9f0f287bb..60a20928e8b 100644 --- a/extensions/cornerstone/CHANGELOG.md +++ b/extensions/cornerstone/CHANGELOG.md @@ -3,6 +3,429 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + + +### Features + +* **overlay:** add inline binary overlays ([#3852](https://github.com/OHIF/Viewers/issues/3852)) ([0177b62](https://github.com/OHIF/Viewers/commit/0177b625ba86760168bc4db58c8a109aa9ee83cb)) + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + + +### Features + +* **customizationService:** Enable saving and loading of private tags in SRs ([#3842](https://github.com/OHIF/Viewers/issues/3842)) ([e1f55e6](https://github.com/OHIF/Viewers/commit/e1f55e65f2d2a34136ad5d0b1ada77d337a0ea23)) + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + + +### Features + +* **HP:** Added new 3D hanging protocols to be used in the new layout selector ([#3844](https://github.com/OHIF/Viewers/issues/3844)) ([59576d6](https://github.com/OHIF/Viewers/commit/59576d695d4d26601d35c43f73d602f0b12d72bf)) + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + + +### Bug Fixes + +* **auth:** fix the issue with oauth at a non root path ([#3840](https://github.com/OHIF/Viewers/issues/3840)) ([6651008](https://github.com/OHIF/Viewers/commit/6651008fbb35dabd5991c7f61128e6ef324012df)) + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + + +### Bug Fixes + +* Update the CS3D packages to add the most recent HTJ2K TSUIDS ([#3806](https://github.com/OHIF/Viewers/issues/3806)) ([9d1884d](https://github.com/OHIF/Viewers/commit/9d1884d7d8b6b2a1cdc26965a96995838aa72682)) + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + + +### Bug Fixes + +* **DICOM Overlay:** The overlay data wasn't being refreshed on change ([#3793](https://github.com/OHIF/Viewers/issues/3793)) ([00e7519](https://github.com/OHIF/Viewers/commit/00e751933ac6d611a34773fa69594243f1b99082)) + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + + +### Bug Fixes + +* 🐛 Run error handler for failed image requests ([#3773](https://github.com/OHIF/Viewers/issues/3773)) ([3234014](https://github.com/OHIF/Viewers/commit/323401418e7ccab74655ba02f990bbe0ed4e523b)) + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + + +### Bug Fixes + +* **overlay:** Overlays aren't shown on undefined origin ([#3781](https://github.com/OHIF/Viewers/issues/3781)) ([fd1251f](https://github.com/OHIF/Viewers/commit/fd1251f751d8147b8a78c7f4d81c67ba69769afa)) + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + + +### Features + +* **dicomJSON:** Add Loading Other Display Sets and JSON Metadata Generation script ([#3777](https://github.com/OHIF/Viewers/issues/3777)) ([43b1c17](https://github.com/OHIF/Viewers/commit/43b1c17209502e4876ad59bae09ed9442eda8024)) + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + + +### Bug Fixes + +* **arrow:** ArrowAnnotate text key cause validation error ([#3771](https://github.com/OHIF/Viewers/issues/3771)) ([8af1046](https://github.com/OHIF/Viewers/commit/8af10468035f1f59e0a21e579d50ad63c8cbf7ad)) + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + + +### Features + +* add VolumeViewport rotation ([#3776](https://github.com/OHIF/Viewers/issues/3776)) ([442f99d](https://github.com/OHIF/Viewers/commit/442f99d5eb2ceece7def20e14da59af1dd7d8442)) + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + + +### Features + +* **hp callback:** Add viewport ready callback ([#3772](https://github.com/OHIF/Viewers/issues/3772)) ([bf252bc](https://github.com/OHIF/Viewers/commit/bf252bcec2aae3a00479fdcb732110b344bcf2c0)) + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + + +### Bug Fixes + +* **toolbar:** allow customizable toolbar for active viewport and allow active tool to be deactivated via a click ([#3608](https://github.com/OHIF/Viewers/issues/3608)) ([dd6d976](https://github.com/OHIF/Viewers/commit/dd6d9768bbca1d3cc472e8c1e6d85822500b96ef)) + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + + +### Bug Fixes + +* **sr:** dcm4chee requires the patient name for an SR to match what is in the original study ([#3739](https://github.com/OHIF/Viewers/issues/3739)) ([d98439f](https://github.com/OHIF/Viewers/commit/d98439fe7f3825076dbc87b664a1d1480ff414d3)) + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + + +### Bug Fixes + +* **cine:** Use the frame rate specified in DICOM and optionally auto play cine ([#3735](https://github.com/OHIF/Viewers/issues/3735)) ([d9258ec](https://github.com/OHIF/Viewers/commit/d9258eca70587cf4dc18be4e56c79b16bae73d6d)) + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + + +### Bug Fixes + +* **calibration:** No calibration popup caused by perhaps an unused code optimization for production builds ([#3736](https://github.com/OHIF/Viewers/issues/3736)) ([93d798d](https://github.com/OHIF/Viewers/commit/93d798db99c0dee53ef73c376f8a74ac3049cf3f)) + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-cornerstone + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + + +### Bug Fixes + +* **modules:** add stylus loader as an option to be uncommented ([#3710](https://github.com/OHIF/Viewers/issues/3710)) ([7c57f67](https://github.com/OHIF/Viewers/commit/7c57f67844b790fc6e47ac3f9708bf9d576389c8)) + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + + +### Bug Fixes + +* **segmentation:** Various fixes for segmentation mode and other ([#3709](https://github.com/OHIF/Viewers/issues/3709)) ([a9a6ad5](https://github.com/OHIF/Viewers/commit/a9a6ad50eae67b43b8b34efc07182d788cacdcfe)) + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + + +### Bug Fixes + +* **voi:** should publish voi change event on reset ([#3707](https://github.com/OHIF/Viewers/issues/3707)) ([52f34c6](https://github.com/OHIF/Viewers/commit/52f34c64d014f433ec1661a39b47e7fb27f15332)) + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + + +### Bug Fixes + +* **modality unit:** fix the modality unit per target via upgrade of cs3d ([#3706](https://github.com/OHIF/Viewers/issues/3706)) ([0a42d57](https://github.com/OHIF/Viewers/commit/0a42d573bbca7f2551a831a46d3aa6b56674a580)) + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + + +### Bug Fixes + +* **segmentation:** do not use SAB if not specified ([#3705](https://github.com/OHIF/Viewers/issues/3705)) ([4911e47](https://github.com/OHIF/Viewers/commit/4911e4796cef5e22cb7cc0ca73dc5c956bc75339)) + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) diff --git a/extensions/cornerstone/package.json b/extensions/cornerstone/package.json index 2450cd5f78b..042538f91e0 100644 --- a/extensions/cornerstone/package.json +++ b/extensions/cornerstone/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-cornerstone", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "OHIF extension for Cornerstone", "author": "OHIF", "license": "MIT", @@ -32,10 +32,10 @@ "@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.20.1", - "@ohif/core": "3.7.0-beta.102", - "@ohif/ui": "3.7.0-beta.102", - "dcmjs": "^0.29.6", + "@cornerstonejs/dicom-image-loader": "^1.40.3", + "@ohif/core": "3.8.0-beta.36", + "@ohif/ui": "3.8.0-beta.36", + "dcmjs": "^0.29.12", "dicom-parser": "^1.8.21", "hammerjs": "^2.0.8", "prop-types": "^15.6.2", @@ -48,10 +48,10 @@ }, "dependencies": { "@babel/runtime": "^7.20.13", - "@cornerstonejs/adapters": "^1.20.1", - "@cornerstonejs/core": "^1.20.1", - "@cornerstonejs/streaming-image-volume-loader": "^1.20.1", - "@cornerstonejs/tools": "^1.20.1", + "@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", "html2canvas": "^1.4.1", "lodash.debounce": "4.0.8", diff --git a/extensions/cornerstone/src/commandsModule.ts b/extensions/cornerstone/src/commandsModule.ts index fe18fbac169..52645938125 100644 --- a/extensions/cornerstone/src/commandsModule.ts +++ b/extensions/cornerstone/src/commandsModule.ts @@ -3,6 +3,8 @@ import { StackViewport, VolumeViewport, utilities as csUtils, + Types as CoreTypes, + BaseVolumeViewport, } from '@cornerstonejs/core'; import { ToolGroupManager, @@ -11,6 +13,7 @@ import { ReferenceLinesTool, } from '@cornerstonejs/tools'; import { Types as OhifTypes } from '@ohif/core'; +import { vec3, mat4 } from 'gl-matrix'; import CornerstoneViewportDownloadForm from './utils/CornerstoneViewportDownloadForm'; import callInputDialog from './utils/callInputDialog'; @@ -391,8 +394,16 @@ function commandsModule({ const { viewport } = enabledElement; - if (viewport instanceof StackViewport) { - const { rotation: currentRotation } = viewport.getProperties(); + if (viewport instanceof BaseVolumeViewport) { + const camera = viewport.getCamera(); + const rotAngle = (rotation * Math.PI) / 180; + const rotMat = mat4.identity(new Float32Array(16)); + mat4.rotate(rotMat, rotMat, rotAngle, camera.viewPlaneNormal); + const rotatedViewUp = vec3.transformMat4(vec3.create(), camera.viewUp, rotMat); + viewport.setCamera({ viewUp: rotatedViewUp as CoreTypes.Point3 }); + viewport.render(); + } else if (viewport.getRotation !== undefined) { + const currentRotation = viewport.getRotation(); const newRotation = (currentRotation + rotation) % 360; viewport.setProperties({ rotation: newRotation }); viewport.render(); @@ -456,13 +467,8 @@ function commandsModule({ const { viewport } = enabledElement; - if (viewport instanceof StackViewport) { - viewport.resetProperties(); - viewport.resetCamera(); - } else { - // Todo: add reset properties for volume viewport - viewport.resetCamera(); - } + viewport.resetProperties?.(); + viewport.resetCamera(); viewport.render(); }, @@ -585,6 +591,23 @@ function commandsModule({ storePresentation: ({ viewportId }) => { cornerstoneViewportService.storePresentation({ viewportId }); }, + + attachProtocolViewportDataListener: ({ protocol, stageIndex }) => { + const EVENT = cornerstoneViewportService.EVENTS.VIEWPORT_DATA_CHANGED; + const command = protocol.callbacks.onViewportDataInitialized; + const numPanes = protocol.stages?.[stageIndex]?.viewports.length ?? 1; + let numPanesWithData = 0; + const { unsubscribe } = cornerstoneViewportService.subscribe(EVENT, evt => { + numPanesWithData++; + + if (numPanesWithData === numPanes) { + commandsManager.run(...command); + + // Unsubscribe from the event + unsubscribe(EVENT); + } + }); + }, }; const definitions = { @@ -611,7 +634,6 @@ function commandsModule({ storeContexts: [], options: {}, }, - deleteMeasurement: { commandFn: actions.deleteMeasurement, }, @@ -719,6 +741,9 @@ function commandsModule({ cleanUpCrosshairs: { commandFn: actions.cleanUpCrosshairs, }, + attachProtocolViewportDataListener: { + commandFn: actions.attachProtocolViewportDataListener, + }, }; return { diff --git a/extensions/cornerstone/src/components/CinePlayer/CinePlayer.tsx b/extensions/cornerstone/src/components/CinePlayer/CinePlayer.tsx index 92bb1510327..be007920ede 100644 --- a/extensions/cornerstone/src/components/CinePlayer/CinePlayer.tsx +++ b/extensions/cornerstone/src/components/CinePlayer/CinePlayer.tsx @@ -1,11 +1,19 @@ -import React, { useEffect } from 'react'; +import React, { useCallback, useEffect, useState } from 'react'; import { CinePlayer, useCine, useViewportGrid } from '@ohif/ui'; import { Enums, eventTarget } from '@cornerstonejs/core'; +import { useAppConfig } from '@state'; function WrappedCinePlayer({ enabledVPElement, viewportId, servicesManager }) { - const { toolbarService, customizationService } = servicesManager.services; - const [{ isCineEnabled, cines }, cineService] = useCine(); - const [{ activeViewportId }] = useViewportGrid(); + const { + toolbarService, + customizationService, + displaySetService, + viewportGridService, + cineService, + } = servicesManager.services; + const [{ isCineEnabled, cines }] = useCine(); + const [newStackFrameRate, setNewStackFrameRate] = useState(24); + const [appConfig] = useAppConfig(); const { component: CinePlayerComponent = CinePlayer } = customizationService.get('cinePlayer') ?? {}; @@ -45,14 +53,37 @@ function WrappedCinePlayer({ enabledVPElement, viewportId, servicesManager }) { } }; + const newStackCineHandler = useCallback(() => { + const { viewports } = viewportGridService.getState(); + const { displaySetInstanceUIDs } = viewports.get(viewportId); + + let frameRate = 24; + let isPlaying = cines[viewportId].isPlaying; + displaySetInstanceUIDs.forEach(displaySetInstanceUID => { + const displaySet = displaySetService.getDisplaySetByUID(displaySetInstanceUID); + if (displaySet.FrameRate) { + // displaySet.FrameRate corresponds to DICOM tag (0018,1063) which is defined as the the frame time in milliseconds + // So a bit of math to get the actual frame rate. + frameRate = Math.round(1000 / displaySet.FrameRate); + isPlaying ||= !!appConfig.autoPlayCine; + } + }); + + if (isPlaying) { + cineService.setIsCineEnabled(isPlaying); + } + cineService.setCine({ id: viewportId, isPlaying, frameRate }); + setNewStackFrameRate(frameRate); + }, [cineService, displaySetService, viewportId, viewportGridService, cines]); + useEffect(() => { - eventTarget.addEventListener(Enums.Events.STACK_VIEWPORT_NEW_STACK, cineHandler); + eventTarget.addEventListener(Enums.Events.STACK_VIEWPORT_NEW_STACK, newStackCineHandler); return () => { cineService.setCine({ id: viewportId, isPlaying: false }); - eventTarget.removeEventListener(Enums.Events.STACK_VIEWPORT_NEW_STACK, cineHandler); + eventTarget.removeEventListener(Enums.Events.STACK_VIEWPORT_NEW_STACK, newStackCineHandler); }; - }, [enabledVPElement]); + }, [enabledVPElement, newStackCineHandler]); useEffect(() => { if (!cines || !cines[viewportId] || !enabledVPElement) { @@ -75,17 +106,18 @@ function WrappedCinePlayer({ enabledVPElement, viewportId, servicesManager }) { isCineEnabled && ( cineService.setCine({ - id: activeViewportId, + id: viewportId, isPlaying, }) } onFrameRateChange={frameRate => cineService.setCine({ - id: activeViewportId, + id: viewportId, frameRate, }) } diff --git a/extensions/cornerstone/src/getHangingProtocolModule.ts b/extensions/cornerstone/src/getHangingProtocolModule.ts index 81c2132deb3..4f2b3ececf1 100644 --- a/extensions/cornerstone/src/getHangingProtocolModule.ts +++ b/extensions/cornerstone/src/getHangingProtocolModule.ts @@ -1,295 +1,10 @@ -import { Types } from '@ohif/core'; - -const mpr: Types.HangingProtocol.Protocol = { - id: 'mpr', - name: 'Multi-Planar Reconstruction', - locked: true, - createdDate: '2021-02-23', - modifiedDate: '2023-08-15', - availableTo: {}, - editableBy: {}, - // Unknown number of priors referenced - so just match any study - numberOfPriorsReferenced: 0, - protocolMatchingRules: [], - imageLoadStrategy: 'nth', - callbacks: { - // Switches out of MPR mode when the layout change button is used - onLayoutChange: [ - { - commandName: 'toggleHangingProtocol', - commandOptions: { protocolId: 'mpr' }, - context: 'DEFAULT', - }, - ], - // Turns off crosshairs when switching out of MPR mode - onProtocolExit: [ - { - commandName: 'cleanUpCrosshairs', - }, - ], - }, - displaySetSelectors: { - activeDisplaySet: { - seriesMatchingRules: [ - { - weight: 1, - attribute: 'isReconstructable', - constraint: { - equals: { - value: true, - }, - }, - required: true, - }, - ], - }, - }, - stages: [ - { - name: 'MPR 1x3', - viewportStructure: { - layoutType: 'grid', - properties: { - rows: 1, - columns: 3, - layoutOptions: [ - { - x: 0, - y: 0, - width: 1 / 3, - height: 1, - }, - { - x: 1 / 3, - y: 0, - width: 1 / 3, - height: 1, - }, - { - x: 2 / 3, - y: 0, - width: 1 / 3, - height: 1, - }, - ], - }, - }, - viewports: [ - { - viewportOptions: { - viewportId: 'mpr-axial', - toolGroupId: 'mpr', - viewportType: 'volume', - orientation: 'axial', - initialImageOptions: { - preset: 'middle', - }, - syncGroups: [ - { - type: 'voi', - id: 'mpr', - source: true, - target: true, - }, - ], - }, - displaySets: [ - { - id: 'activeDisplaySet', - }, - ], - }, - { - viewportOptions: { - viewportId: 'mpr-sagittal', - toolGroupId: 'mpr', - viewportType: 'volume', - orientation: 'sagittal', - initialImageOptions: { - preset: 'middle', - }, - syncGroups: [ - { - type: 'voi', - id: 'mpr', - source: true, - target: true, - }, - ], - }, - displaySets: [ - { - id: 'activeDisplaySet', - }, - ], - }, - { - viewportOptions: { - viewportId: 'mpr-coronal', - toolGroupId: 'mpr', - viewportType: 'volume', - orientation: 'coronal', - initialImageOptions: { - preset: 'middle', - }, - syncGroups: [ - { - type: 'voi', - id: 'mpr', - source: true, - target: true, - }, - ], - }, - displaySets: [ - { - id: 'activeDisplaySet', - }, - ], - }, - ], - }, - ], -}; - -const mprAnd3DVolumeViewport = { - id: 'mprAnd3DVolumeViewport', - locked: true, - name: 'mpr', - createdDate: '2023-03-15T10:29:44.894Z', - modifiedDate: '2023-03-15T10:29:44.894Z', - availableTo: {}, - editableBy: {}, - protocolMatchingRules: [], - imageLoadStrategy: 'interleaveCenter', - displaySetSelectors: { - mprDisplaySet: { - seriesMatchingRules: [ - { - weight: 1, - attribute: 'isReconstructable', - constraint: { - equals: { - value: true, - }, - }, - required: true, - }, - { - attribute: 'Modality', - constraint: { - equals: { - value: 'CT', - }, - }, - required: true, - }, - ], - }, - }, - stages: [ - { - id: 'mpr3Stage', - name: 'mpr', - viewportStructure: { - layoutType: 'grid', - properties: { - rows: 2, - columns: 2, - }, - }, - viewports: [ - { - viewportOptions: { - toolGroupId: 'mpr', - viewportType: 'volume', - orientation: 'axial', - initialImageOptions: { - preset: 'middle', - }, - syncGroups: [ - { - type: 'voi', - id: 'mpr', - source: true, - target: true, - }, - ], - }, - displaySets: [ - { - id: 'mprDisplaySet', - }, - ], - }, - { - viewportOptions: { - toolGroupId: 'volume3d', - viewportType: 'volume3d', - orientation: 'coronal', - customViewportProps: { - hideOverlays: true, - }, - }, - displaySets: [ - { - id: 'mprDisplaySet', - options: { - displayPreset: 'CT-Bone', - }, - }, - ], - }, - { - viewportOptions: { - toolGroupId: 'mpr', - viewportType: 'volume', - orientation: 'coronal', - initialImageOptions: { - preset: 'middle', - }, - syncGroups: [ - { - type: 'voi', - id: 'mpr', - source: true, - target: true, - }, - ], - }, - displaySets: [ - { - id: 'mprDisplaySet', - }, - ], - }, - { - viewportOptions: { - toolGroupId: 'mpr', - viewportType: 'volume', - orientation: 'sagittal', - initialImageOptions: { - preset: 'middle', - }, - syncGroups: [ - { - type: 'voi', - id: 'mpr', - source: true, - target: true, - }, - ], - }, - displaySets: [ - { - id: 'mprDisplaySet', - }, - ], - }, - ], - }, - ], -}; +import { fourUp } from './hps/fourUp'; +import { main3D } from './hps/main3D'; +import { mpr } from './hps/mpr'; +import { mprAnd3DVolumeViewport } from './hps/mprAnd3DVolumeViewport'; +import { only3D } from './hps/only3D'; +import { primary3D } from './hps/primary3D'; +import { primaryAxial } from './hps/primaryAxial'; function getHangingProtocolModule() { return [ @@ -301,6 +16,26 @@ function getHangingProtocolModule() { name: mprAnd3DVolumeViewport.id, protocol: mprAnd3DVolumeViewport, }, + { + name: fourUp.id, + protocol: fourUp, + }, + { + name: main3D.id, + protocol: main3D, + }, + { + name: primaryAxial.id, + protocol: primaryAxial, + }, + { + name: only3D.id, + protocol: only3D, + }, + { + name: primary3D.id, + protocol: primary3D, + }, ]; } diff --git a/extensions/cornerstone/src/hps/fourUp.ts b/extensions/cornerstone/src/hps/fourUp.ts new file mode 100644 index 00000000000..776d7a29832 --- /dev/null +++ b/extensions/cornerstone/src/hps/fourUp.ts @@ -0,0 +1,130 @@ +export const fourUp = { + id: 'fourUp', + locked: true, + name: 'fourUp', + createdDate: '2023-03-15T10:29:44.894Z', + modifiedDate: '2023-03-15T10:29:44.894Z', + availableTo: {}, + editableBy: {}, + protocolMatchingRules: [], + imageLoadStrategy: 'interleaveCenter', + displaySetSelectors: { + mprDisplaySet: { + seriesMatchingRules: [ + { + weight: 1, + attribute: 'isReconstructable', + constraint: { + equals: { + value: true, + }, + }, + required: true, + }, + ], + }, + }, + stages: [ + { + id: 'fourUpStage', + name: 'fourUp', + viewportStructure: { + layoutType: 'grid', + properties: { + rows: 2, + columns: 2, + }, + }, + viewports: [ + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'axial', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'volume3d', + viewportType: 'volume3d', + orientation: 'coronal', + customViewportProps: { + hideOverlays: true, + }, + }, + displaySets: [ + { + id: 'mprDisplaySet', + options: { + // ToDo: choose appropriate preset + displayPreset: 'CT-Bone', + }, + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'coronal', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'sagittal', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + ], + }, + ], +}; diff --git a/extensions/cornerstone/src/hps/main3D.ts b/extensions/cornerstone/src/hps/main3D.ts new file mode 100644 index 00000000000..a7b837991b7 --- /dev/null +++ b/extensions/cornerstone/src/hps/main3D.ts @@ -0,0 +1,156 @@ +export const main3D = { + id: 'main3D', + locked: true, + name: 'main3D', + createdDate: '2023-03-15T10:29:44.894Z', + modifiedDate: '2023-03-15T10:29:44.894Z', + availableTo: {}, + editableBy: {}, + protocolMatchingRules: [], + imageLoadStrategy: 'interleaveCenter', + displaySetSelectors: { + mprDisplaySet: { + seriesMatchingRules: [ + { + weight: 1, + attribute: 'isReconstructable', + constraint: { + equals: { + value: true, + }, + }, + required: true, + }, + ], + }, + }, + stages: [ + { + id: 'main3DStage', + name: 'main3D', + viewportStructure: { + layoutType: 'grid', + properties: { + rows: 2, + columns: 3, + layoutOptions: [ + { + x: 0, + y: 0, + width: 1, + height: 1 / 2, + }, + { + x: 0, + y: 1 / 2, + width: 1 / 3, + height: 1 / 2, + }, + { + x: 1 / 3, + y: 1 / 2, + width: 1 / 3, + height: 1 / 2, + }, + { + x: 2 / 3, + y: 1 / 2, + width: 1 / 3, + height: 1 / 2, + }, + ], + }, + }, + viewports: [ + { + viewportOptions: { + toolGroupId: 'volume3d', + viewportType: 'volume3d', + orientation: 'coronal', + customViewportProps: { + hideOverlays: true, + }, + }, + displaySets: [ + { + id: 'mprDisplaySet', + options: { + // ToDo: choose appropriate preset + displayPreset: 'CT-Bone', + }, + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'axial', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'coronal', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'sagittal', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + ], + }, + ], +}; diff --git a/extensions/cornerstone/src/hps/mpr.ts b/extensions/cornerstone/src/hps/mpr.ts new file mode 100644 index 00000000000..4c625c73172 --- /dev/null +++ b/extensions/cornerstone/src/hps/mpr.ts @@ -0,0 +1,153 @@ +import { Types } from '@ohif/core'; + +export const mpr: Types.HangingProtocol.Protocol = { + id: 'mpr', + name: 'Multi-Planar Reconstruction', + locked: true, + createdDate: '2021-02-23', + modifiedDate: '2023-08-15', + availableTo: {}, + editableBy: {}, + // Unknown number of priors referenced - so just match any study + numberOfPriorsReferenced: 0, + protocolMatchingRules: [], + imageLoadStrategy: 'nth', + callbacks: { + // Switches out of MPR mode when the layout change button is used + onLayoutChange: [ + { + commandName: 'toggleHangingProtocol', + commandOptions: { protocolId: 'mpr' }, + context: 'DEFAULT', + }, + ], + // Turns off crosshairs when switching out of MPR mode + onProtocolExit: [ + { + commandName: 'cleanUpCrosshairs', + }, + ], + }, + displaySetSelectors: { + activeDisplaySet: { + seriesMatchingRules: [ + { + weight: 1, + attribute: 'isReconstructable', + constraint: { + equals: { + value: true, + }, + }, + required: true, + }, + ], + }, + }, + stages: [ + { + name: 'MPR 1x3', + viewportStructure: { + layoutType: 'grid', + properties: { + rows: 1, + columns: 3, + layoutOptions: [ + { + x: 0, + y: 0, + width: 1 / 3, + height: 1, + }, + { + x: 1 / 3, + y: 0, + width: 1 / 3, + height: 1, + }, + { + x: 2 / 3, + y: 0, + width: 1 / 3, + height: 1, + }, + ], + }, + }, + viewports: [ + { + viewportOptions: { + viewportId: 'mpr-axial', + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'axial', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'activeDisplaySet', + }, + ], + }, + { + viewportOptions: { + viewportId: 'mpr-sagittal', + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'sagittal', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'activeDisplaySet', + }, + ], + }, + { + viewportOptions: { + viewportId: 'mpr-coronal', + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'coronal', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'activeDisplaySet', + }, + ], + }, + ], + }, + ], +}; diff --git a/extensions/cornerstone/src/hps/mprAnd3DVolumeViewport.ts b/extensions/cornerstone/src/hps/mprAnd3DVolumeViewport.ts new file mode 100644 index 00000000000..120f6fb7ef7 --- /dev/null +++ b/extensions/cornerstone/src/hps/mprAnd3DVolumeViewport.ts @@ -0,0 +1,138 @@ +export const mprAnd3DVolumeViewport = { + id: 'mprAnd3DVolumeViewport', + locked: true, + name: 'mpr', + createdDate: '2023-03-15T10:29:44.894Z', + modifiedDate: '2023-03-15T10:29:44.894Z', + availableTo: {}, + editableBy: {}, + protocolMatchingRules: [], + imageLoadStrategy: 'interleaveCenter', + displaySetSelectors: { + mprDisplaySet: { + seriesMatchingRules: [ + { + weight: 1, + attribute: 'isReconstructable', + constraint: { + equals: { + value: true, + }, + }, + required: true, + }, + { + attribute: 'Modality', + constraint: { + equals: { + value: 'CT', + }, + }, + required: true, + }, + ], + }, + }, + stages: [ + { + id: 'mpr3Stage', + name: 'mpr', + viewportStructure: { + layoutType: 'grid', + properties: { + rows: 2, + columns: 2, + }, + }, + viewports: [ + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'axial', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'volume3d', + viewportType: 'volume3d', + orientation: 'coronal', + customViewportProps: { + hideOverlays: true, + }, + }, + displaySets: [ + { + id: 'mprDisplaySet', + options: { + displayPreset: 'CT-Bone', + }, + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'coronal', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'sagittal', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + ], + }, + ], +}; diff --git a/extensions/cornerstone/src/hps/only3D.ts b/extensions/cornerstone/src/hps/only3D.ts new file mode 100644 index 00000000000..d319d1ee4fe --- /dev/null +++ b/extensions/cornerstone/src/hps/only3D.ts @@ -0,0 +1,61 @@ +export const only3D = { + id: 'only3D', + locked: true, + name: 'only3D', + createdDate: '2023-03-15T10:29:44.894Z', + modifiedDate: '2023-03-15T10:29:44.894Z', + availableTo: {}, + editableBy: {}, + protocolMatchingRules: [], + imageLoadStrategy: 'interleaveCenter', + displaySetSelectors: { + mprDisplaySet: { + seriesMatchingRules: [ + { + weight: 1, + attribute: 'isReconstructable', + constraint: { + equals: { + value: true, + }, + }, + required: true, + }, + ], + }, + }, + stages: [ + { + id: 'only3DStage', + name: 'only3D', + viewportStructure: { + layoutType: 'grid', + properties: { + rows: 1, + columns: 1, + }, + }, + viewports: [ + { + viewportOptions: { + toolGroupId: 'volume3d', + viewportType: 'volume3d', + orientation: 'coronal', + customViewportProps: { + hideOverlays: true, + }, + }, + displaySets: [ + { + id: 'mprDisplaySet', + options: { + // ToDo: choose appropriate preset + displayPreset: 'CT-Bone', + }, + }, + ], + }, + ], + }, + ], +}; diff --git a/extensions/cornerstone/src/hps/primary3D.ts b/extensions/cornerstone/src/hps/primary3D.ts new file mode 100644 index 00000000000..12655324885 --- /dev/null +++ b/extensions/cornerstone/src/hps/primary3D.ts @@ -0,0 +1,156 @@ +export const primary3D = { + id: 'primary3D', + locked: true, + name: 'primary3D', + createdDate: '2023-03-15T10:29:44.894Z', + modifiedDate: '2023-03-15T10:29:44.894Z', + availableTo: {}, + editableBy: {}, + protocolMatchingRules: [], + imageLoadStrategy: 'interleaveCenter', + displaySetSelectors: { + mprDisplaySet: { + seriesMatchingRules: [ + { + weight: 1, + attribute: 'isReconstructable', + constraint: { + equals: { + value: true, + }, + }, + required: true, + }, + ], + }, + }, + stages: [ + { + id: 'primary3DStage', + name: 'primary3D', + viewportStructure: { + layoutType: 'grid', + properties: { + rows: 3, + columns: 3, + layoutOptions: [ + { + x: 0, + y: 0, + width: 2 / 3, + height: 1, + }, + { + x: 2 / 3, + y: 0, + width: 1 / 3, + height: 1 / 3, + }, + { + x: 2 / 3, + y: 1 / 3, + width: 1 / 3, + height: 1 / 3, + }, + { + x: 2 / 3, + y: 2 / 3, + width: 1 / 3, + height: 1 / 3, + }, + ], + }, + }, + viewports: [ + { + viewportOptions: { + toolGroupId: 'volume3d', + viewportType: 'volume3d', + orientation: 'coronal', + customViewportProps: { + hideOverlays: true, + }, + }, + displaySets: [ + { + id: 'mprDisplaySet', + options: { + // ToDo: choose appropriate preset + displayPreset: 'CT-Bone', + }, + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'axial', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'coronal', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'sagittal', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + ], + }, + ], +}; diff --git a/extensions/cornerstone/src/hps/primaryAxial.ts b/extensions/cornerstone/src/hps/primaryAxial.ts new file mode 100644 index 00000000000..2126920b3f0 --- /dev/null +++ b/extensions/cornerstone/src/hps/primaryAxial.ts @@ -0,0 +1,131 @@ +export const primaryAxial = { + id: 'primaryAxial', + locked: true, + name: 'primaryAxial', + createdDate: '2023-03-15T10:29:44.894Z', + modifiedDate: '2023-03-15T10:29:44.894Z', + availableTo: {}, + editableBy: {}, + protocolMatchingRules: [], + imageLoadStrategy: 'interleaveCenter', + displaySetSelectors: { + mprDisplaySet: { + seriesMatchingRules: [ + { + weight: 1, + attribute: 'isReconstructable', + constraint: { + equals: { + value: true, + }, + }, + required: true, + }, + ], + }, + }, + stages: [ + { + id: 'primaryAxialStage', + name: 'primaryAxial', + viewportStructure: { + layoutType: 'grid', + properties: { + rows: 2, + columns: 3, + layoutOptions: [ + { + x: 0, + y: 0, + width: 2 / 3, + height: 1, + }, + { + x: 2 / 3, + y: 0, + width: 1 / 3, + height: 1 / 2, + }, + { + x: 2 / 3, + y: 1 / 2, + width: 1 / 3, + height: 1 / 2, + }, + ], + }, + }, + viewports: [ + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'axial', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'sagittal', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + { + viewportOptions: { + toolGroupId: 'mpr', + viewportType: 'volume', + orientation: 'coronal', + initialImageOptions: { + preset: 'middle', + }, + syncGroups: [ + { + type: 'voi', + id: 'mpr', + source: true, + target: true, + }, + ], + }, + displaySets: [ + { + id: 'mprDisplaySet', + }, + ], + }, + ], + }, + ], +}; diff --git a/extensions/cornerstone/src/index.tsx b/extensions/cornerstone/src/index.tsx index 10b4ce026ba..ac53c8f0f27 100644 --- a/extensions/cornerstone/src/index.tsx +++ b/extensions/cornerstone/src/index.tsx @@ -29,6 +29,7 @@ import { id } from './id'; import * as csWADOImageLoader from './initWADOImageLoader.js'; import { measurementMappingUtils } from './utils/measurementServiceMappings'; import type { PublicViewportOptions } from './services/ViewportService/Viewport'; +import ImageOverlayViewerTool from './tools/ImageOverlayViewerTool'; const Component = React.lazy(() => { return import(/* webpackPrefetch: true */ './Viewport/OHIFCornerstoneViewport'); @@ -140,5 +141,6 @@ export { CornerstoneExtensionTypes as Types, toolNames, getActiveViewportEnabledElement, + ImageOverlayViewerTool, }; export default cornerstoneExtension; diff --git a/extensions/cornerstone/src/init.tsx b/extensions/cornerstone/src/init.tsx index a9ebf0479a9..8e304a4ab83 100644 --- a/extensions/cornerstone/src/init.tsx +++ b/extensions/cornerstone/src/init.tsx @@ -61,8 +61,8 @@ export default async function init({ await cs3DInit({ rendering: { - preferSizeOverAccuracy: Boolean(appConfig.use16BitDataType), - useNorm16Texture: Boolean(appConfig.use16BitDataType), + preferSizeOverAccuracy: Boolean(appConfig.preferSizeOverAccuracy), + useNorm16Texture: Boolean(appConfig.useNorm16Texture), }, }); @@ -344,6 +344,7 @@ export default async function init({ eventTarget.removeEventListener(EVENTS.ELEMENT_ENABLED, elementEnabledHandler); } const { element } = evt.detail; + element.addEventListener(EVENTS.CAMERA_RESET, resetCrosshairs); eventTarget.addEventListener(EVENTS.STACK_VIEWPORT_NEW_STACK, toolbarEventListener); diff --git a/extensions/cornerstone/src/initWADOImageLoader.js b/extensions/cornerstone/src/initWADOImageLoader.js index 1beda3885b7..622a4262574 100644 --- a/extensions/cornerstone/src/initWADOImageLoader.js +++ b/extensions/cornerstone/src/initWADOImageLoader.js @@ -49,7 +49,8 @@ export default function initWADOImageLoader( // Until the default is set to true (which is the case for cornerstone3D), // we should set this flag to false. convertFloatPixelDataToInt: false, - use16BitDataType: Boolean(appConfig.use16BitDataType), + use16BitDataType: + Boolean(appConfig.useNorm16Texture) || Boolean(appConfig.preferSizeOverAccuracy), }, beforeSend: function (xhr) { //TODO should be removed in the future and request emitted by DicomWebDataSource diff --git a/extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts b/extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts index 7d61a1dc550..6c48d5dfb0f 100644 --- a/extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts +++ b/extensions/cornerstone/src/services/SegmentationService/SegmentationService.ts @@ -7,7 +7,6 @@ import { geometryLoader, eventTarget, getEnabledElementByIds, - metaData, utilities as csUtils, volumeLoader, } from '@cornerstonejs/core'; @@ -41,7 +40,7 @@ const EVENTS = { SEGMENTATION_CONFIGURATION_CHANGED: 'event::segmentation_configuration_changed', // fired when the active segment is loaded in SEG or RTSTRUCT SEGMENT_LOADING_COMPLETE: 'event::segment_loading_complete', - // for all segments + // loading completed for all segments SEGMENTATION_LOADING_COMPLETE: 'event::segmentation_loading_complete', }; @@ -131,7 +130,7 @@ class SegmentationService extends PubSubService { throw new Error('Segment index 0 is reserved for "no label"'); } - const toolGroupId = config.toolGroupId ?? this._getFirstToolGroupId(); + const toolGroupId = config.toolGroupId ?? this._getApplicableToolGroupId(); const { segmentationRepresentationUID, segmentation } = this._getSegmentationInfo( segmentationId, @@ -190,7 +189,7 @@ class SegmentationService extends PubSubService { ); } - if (active !== undefined) { + if (active === true) { this._setActiveSegment(segmentationId, segmentIndex, suppressEvents); } @@ -362,7 +361,7 @@ class SegmentationService extends PubSubService { } public setActiveSegmentationForToolGroup(segmentationId: string, toolGroupId?: string): void { - toolGroupId = toolGroupId ?? this._getFirstToolGroupId(); + toolGroupId = toolGroupId ?? this._getApplicableToolGroupId(); const suppressEvents = false; this._setActiveSegmentationForToolGroup(segmentationId, toolGroupId, suppressEvents); @@ -400,6 +399,23 @@ class SegmentationService extends PubSubService { return segmentations && segmentations.map(m => this.segmentations[Object.keys(m)[0]]); } + public getActiveSegmentation(): Segmentation { + const segmentations = this.getSegmentations(); + + return segmentations.find(segmentation => segmentation.isActive); + } + + public getActiveSegment() { + const activeSegmentation = this.getActiveSegmentation(); + const { activeSegmentIndex, segments } = activeSegmentation; + + if (activeSegmentIndex === null) { + return; + } + + return segments[activeSegmentIndex]; + } + /** * Get specific segmentation by its id. * @@ -543,7 +559,7 @@ class SegmentationService extends PubSubService { volumeId: segmentationId, targetBuffer: { type: 'Uint8Array', - sharedArrayBuffer: true, + sharedArrayBuffer: window.SharedArrayBuffer, }, }); const derivedVolumeScalarData = derivedVolume.getScalarData(); @@ -913,7 +929,7 @@ class SegmentationService extends PubSubService { } const segmentation = this.getSegmentation(segmentationId); - toolGroupId = toolGroupId ?? this._getFirstToolGroupId(); + toolGroupId = toolGroupId ?? this._getApplicableToolGroupId(); const segmentationRepresentation = this._getSegmentationRepresentation( segmentationId, @@ -964,7 +980,7 @@ class SegmentationService extends PubSubService { volumeId: segmentationId, targetBuffer: { type: 'Uint8Array', - sharedArrayBuffer: true, + sharedArrayBuffer: window.SharedArrayBuffer, }, }); @@ -1314,7 +1330,7 @@ class SegmentationService extends PubSubService { if (remainingHydratedSegmentations.length) { const { id } = remainingHydratedSegmentations[0]; - this._setActiveSegmentationForToolGroup(id, this._getFirstToolGroupId(), false); + this._setActiveSegmentationForToolGroup(id, this._getApplicableToolGroupId(), false); } } @@ -1326,7 +1342,7 @@ class SegmentationService extends PubSubService { } public getConfiguration = (toolGroupId?: string): SegmentationConfig => { - toolGroupId = toolGroupId ?? this._getFirstToolGroupId(); + toolGroupId = toolGroupId ?? this._getApplicableToolGroupId(); const brushSize = 1; // const brushSize = cstUtils.segmentation.getBrushSizeForToolGroup( @@ -1621,7 +1637,7 @@ class SegmentationService extends PubSubService { throw new Error(`Segment ${segmentIndex} not yet added to segmentation: ${segmentationId}`); } - toolGroupId = toolGroupId ?? this._getFirstToolGroupId(); + toolGroupId = toolGroupId ?? this._getApplicableToolGroupId(); const segmentationRepresentation = this._getSegmentationRepresentation( segmentationId, @@ -1715,7 +1731,7 @@ class SegmentationService extends PubSubService { toolGroupId?: string, suppressEvents = false ) { - toolGroupId = toolGroupId ?? this._getFirstToolGroupId(); + toolGroupId = toolGroupId ?? this._getApplicableToolGroupId(); const { segmentationRepresentationUID, segmentation } = this._getSegmentationInfo( segmentationId, @@ -1774,7 +1790,7 @@ class SegmentationService extends PubSubService { throw new Error(`Segment ${segmentIndex} not yet added to segmentation: ${segmentationId}`); } - toolGroupId = toolGroupId ?? this._getFirstToolGroupId(); + toolGroupId = toolGroupId ?? this._getApplicableToolGroupId(); const segmentationRepresentation = this._getSegmentationRepresentation( segmentationId, @@ -2091,11 +2107,21 @@ class SegmentationService extends PubSubService { } } - private _getFirstToolGroupId = () => { - const { toolGroupService } = this.servicesManager.services; - const toolGroupIds = toolGroupService.getToolGroupIds(); + private _getApplicableToolGroupId = () => { + const { toolGroupService, viewportGridService, cornerstoneViewportService } = + this.servicesManager.services; + + const viewportInfo = cornerstoneViewportService.getViewportInfo( + viewportGridService.getActiveViewportId() + ); + + if (!viewportInfo) { + const toolGroupIds = toolGroupService.getToolGroupIds(); + + return toolGroupIds[0]; + } - return toolGroupIds[0]; + return viewportInfo.getToolGroupId(); }; private getNextColorLUTIndex = (): number => { diff --git a/extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts b/extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts index 497df2d544d..71b33ffd4fb 100644 --- a/extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts +++ b/extensions/cornerstone/src/services/ViewportService/CornerstoneViewportService.ts @@ -283,14 +283,21 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi this.viewportsById.set(viewportId, viewportInfo); const viewport = renderingEngine.getViewport(viewportId); - this._setDisplaySets(viewport, viewportData, viewportInfo, presentations); + const displaySetPromise = this._setDisplaySets( + viewport, + viewportData, + viewportInfo, + presentations + ); // The broadcast event here ensures that listeners have a valid, up to date // viewport to access. Doing it too early can result in exceptions or // invalid data. - this._broadcastEvent(this.EVENTS.VIEWPORT_DATA_CHANGED, { - viewportData, - viewportId, + displaySetPromise.then(() => { + this._broadcastEvent(this.EVENTS.VIEWPORT_DATA_CHANGED, { + viewportData, + viewportId, + }); }); } @@ -312,12 +319,12 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi return this.viewportsById.get(viewportId); } - _setStackViewport( + private async _setStackViewport( viewport: Types.IStackViewport, viewportData: StackViewportData, viewportInfo: ViewportInfo, presentations: Presentations - ): void { + ): Promise { const displaySetOptions = viewportInfo.getDisplaySetOptions(); const { imageIds, initialImageIndex, displaySetInstanceUID } = viewportData.data; @@ -347,7 +354,7 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi } } - viewport.setStack(imageIds, initialImageIndexToUse).then(() => { + return viewport.setStack(imageIds, initialImageIndexToUse).then(() => { viewport.setProperties({ ...properties }); const camera = presentations.positionPresentation?.camera; if (camera) { @@ -654,21 +661,27 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi const viewport = this.getCornerstoneViewport(viewportId); const viewportCamera = viewport.getCamera(); + let displaySetPromise; + if (viewport instanceof VolumeViewport || viewport instanceof VolumeViewport3D) { - this._setVolumeViewport(viewport, viewportData, viewportInfo).then(() => { + displaySetPromise = this._setVolumeViewport(viewport, viewportData, viewportInfo).then(() => { if (keepCamera) { viewport.setCamera(viewportCamera); viewport.render(); } }); - - return; } if (viewport instanceof StackViewport) { - this._setStackViewport(viewport, viewportData, viewportInfo); - return; + displaySetPromise = this._setStackViewport(viewport, viewportData, viewportInfo); } + + displaySetPromise.then(() => { + this._broadcastEvent(this.EVENTS.VIEWPORT_DATA_CHANGED, { + viewportData, + viewportId, + }); + }); } _setDisplaySets( @@ -676,16 +689,16 @@ class CornerstoneViewportService extends PubSubService implements IViewportServi viewportData: StackViewportData | VolumeViewportData, viewportInfo: ViewportInfo, presentations: Presentations = {} - ): void { + ): Promise { if (viewport instanceof StackViewport) { - this._setStackViewport( + return this._setStackViewport( viewport, viewportData as StackViewportData, viewportInfo, presentations ); } else if (viewport instanceof VolumeViewport || viewport instanceof VolumeViewport3D) { - this._setVolumeViewport( + return this._setVolumeViewport( viewport, viewportData as VolumeViewportData, viewportInfo, diff --git a/extensions/cornerstone/src/tools/CalibrationLineTool.ts b/extensions/cornerstone/src/tools/CalibrationLineTool.ts index 3b4a9bede0b..c9e008fc61b 100644 --- a/extensions/cornerstone/src/tools/CalibrationLineTool.ts +++ b/extensions/cornerstone/src/tools/CalibrationLineTool.ts @@ -66,14 +66,6 @@ export function onCompletedCalibrationLine(servicesManager, csToolsEvent) { calculateLength3(annotationData.handles.points[0], annotationData.handles.points[1]) * 100 ) / 100; - // calculate the currently applied pixel spacing on the viewport - const calibratedPixelSpacing = metaData.get('calibratedPixelSpacing', imageId); - const imagePlaneModule = metaData.get('imagePlaneModule', imageId); - const currentRowPixelSpacing = - calibratedPixelSpacing?.[0] || imagePlaneModule?.rowPixelSpacing || 1; - const currentColumnPixelSpacing = - calibratedPixelSpacing?.[1] || imagePlaneModule?.columnPixelSpacing || 1; - const adjustCalibration = newLength => { const spacingScale = newLength / length; diff --git a/extensions/cornerstone/src/tools/ImageOverlayViewerTool.tsx b/extensions/cornerstone/src/tools/ImageOverlayViewerTool.tsx index 20cb8b9aeef..c2ba56cbd52 100644 --- a/extensions/cornerstone/src/tools/ImageOverlayViewerTool.tsx +++ b/extensions/cornerstone/src/tools/ImageOverlayViewerTool.tsx @@ -1,8 +1,8 @@ -import { VolumeViewport, metaData } from '@cornerstonejs/core'; -import { utilities } from '@cornerstonejs/core'; +import { VolumeViewport, metaData, utilities } from '@cornerstonejs/core'; import { IStackViewport, IVolumeViewport, Point3 } from '@cornerstonejs/core/dist/esm/types'; import { AnnotationDisplayTool, drawing } from '@cornerstonejs/tools'; -import { guid } from '@ohif/core/src/utils'; +import { guid, b64toBlob } from '@ohif/core/src/utils'; +import OverlayPlaneModuleProvider from './OverlayPlaneModuleProvider'; interface CachedStat { color: number[]; // [r, g, b, a] @@ -27,8 +27,12 @@ interface CachedStat { */ class ImageOverlayViewerTool extends AnnotationDisplayTool { static toolName = 'ImageOverlayViewer'; - private _cachedOverlayMetadata: Map = new Map(); - private _cachedStats: { [key: string]: CachedStat } = {}; + + /** + * The overlay plane module provider add method is exposed here to be used + * when updating the overlay for this tool to use for displaying data. + */ + public static addOverlayPlaneModule = OverlayPlaneModuleProvider.add; constructor( toolProps = {}, @@ -42,10 +46,7 @@ class ImageOverlayViewerTool extends AnnotationDisplayTool { super(toolProps, defaultToolProps); } - onSetToolDisabled = (): void => { - this._cachedStats = {}; - this._cachedOverlayMetadata = new Map(); - }; + onSetToolDisabled = (): void => {}; protected getReferencedImageId(viewport: IStackViewport | IVolumeViewport): string { if (viewport instanceof VolumeViewport) { @@ -64,18 +65,24 @@ class ImageOverlayViewerTool extends AnnotationDisplayTool { return; } - const overlays = - this._cachedOverlayMetadata.get(imageId) ?? - metaData.get('overlayPlaneModule', imageId)?.overlays; + const overlayMetadata = metaData.get('overlayPlaneModule', imageId); + const overlays = overlayMetadata?.overlays; // no overlays if (!overlays?.length) { return; } - this._cachedOverlayMetadata.set(imageId, overlays); + // Fix the x, y positions + overlays.forEach(overlay => { + overlay.x ||= 0; + overlay.y ||= 0; + }); + + // Will clear cached stat data when the overlay data changes + ImageOverlayViewerTool.addOverlayPlaneModule(imageId, overlayMetadata); - this._getCachedStat(imageId, overlays, this.configuration.fillColor).then(cachedStat => { + this._getCachedStat(imageId, overlayMetadata, this.configuration.fillColor).then(cachedStat => { cachedStat.overlays.forEach(overlay => { this._renderOverlay(enabledElement, svgDrawingHelper, overlay); }); @@ -146,15 +153,18 @@ class ImageOverlayViewerTool extends AnnotationDisplayTool { private async _getCachedStat( imageId: string, - overlayMetadata: any[], + overlayMetadata, color: number[] ): Promise { - if (this._cachedStats[imageId] && this._isSameColor(this._cachedStats[imageId].color, color)) { - return this._cachedStats[imageId]; + const missingOverlay = overlayMetadata.overlays.filter( + overlay => overlay.pixelData && !overlay.dataUrl + ); + if (missingOverlay.length === 0) { + return overlayMetadata; } const overlays = await Promise.all( - overlayMetadata + overlayMetadata.overlays .filter(overlay => overlay.pixelData) .map(async (overlay, idx) => { let pixelData = null; @@ -164,6 +174,10 @@ class ImageOverlayViewerTool extends AnnotationDisplayTool { pixelData = overlay.pixelData[0]; } else if (overlay.pixelData.retrieveBulkData) { pixelData = await overlay.pixelData.retrieveBulkData(); + } else if (overlay.pixelData.InlineBinary) { + const blob = b64toBlob(overlay.pixelData.InlineBinary); + const arrayBuffer = await blob.arrayBuffer(); + pixelData = arrayBuffer; } if (!pixelData) { @@ -172,7 +186,7 @@ class ImageOverlayViewerTool extends AnnotationDisplayTool { const dataUrl = this._renderOverlayToDataUrl( { width: overlay.columns, height: overlay.rows }, - color, + overlay.color || color, pixelData ); @@ -184,13 +198,9 @@ class ImageOverlayViewerTool extends AnnotationDisplayTool { }; }) ); + overlayMetadata.overlays = overlays; - this._cachedStats[imageId] = { - color: color, - overlays: overlays.filter(overlay => overlay), - }; - - return this._cachedStats[imageId]; + return overlayMetadata; } /** diff --git a/extensions/cornerstone/src/tools/OverlayPlaneModuleProvider.ts b/extensions/cornerstone/src/tools/OverlayPlaneModuleProvider.ts new file mode 100644 index 00000000000..d36b5437b41 --- /dev/null +++ b/extensions/cornerstone/src/tools/OverlayPlaneModuleProvider.ts @@ -0,0 +1,40 @@ +import { metaData } from '@cornerstonejs/core'; + +const _cachedOverlayMetadata: Map = new Map(); + +/** + * Image Overlay Viewer tool is not a traditional tool that requires user interactin. + * But it is used to display Pixel Overlays. And it will provide toggling capability. + * + * The documentation for Overlay Plane Module of DICOM can be found in [C.9.2 of + * Part-3 of DICOM standard](https://dicom.nema.org/medical/dicom/2018b/output/chtml/part03/sect_C.9.2.html) + * + * Image Overlay rendered by this tool can be toggled on and off using + * toolGroup.setToolEnabled() and toolGroup.setToolDisabled() + */ +const OverlayPlaneModuleProvider = { + /** Adds the metadata for overlayPlaneModule */ + add: (imageId, metadata) => { + if (_cachedOverlayMetadata.get(imageId) === metadata) { + // This is a no-op here as the tool re-caches the data + return; + } + _cachedOverlayMetadata.set(imageId, metadata); + }, + + /** Standard getter for metadata */ + get: (type: string, query: string | string[]) => { + if (Array.isArray(query)) { + return; + } + if (type !== 'overlayPlaneModule') { + return; + } + return _cachedOverlayMetadata.get(query); + }, +}; + +// Needs to be higher priority than default provider +metaData.addProvider(OverlayPlaneModuleProvider.get, 10_000); + +export default OverlayPlaneModuleProvider; diff --git a/extensions/cornerstone/src/utils/dicomLoaderService.js b/extensions/cornerstone/src/utils/dicomLoaderService.js index 79cb2053ec1..b9d5ea6dd94 100644 --- a/extensions/cornerstone/src/utils/dicomLoaderService.js +++ b/extensions/cornerstone/src/utils/dicomLoaderService.js @@ -176,6 +176,7 @@ class DicomLoaderService { authorizationHeaders, wadoRoot, wadoUri, + instance, } = dataset; // Retrieve wadors or just try to fetch wadouri if (!someInvalidStrings(wadoRoot)) { @@ -188,6 +189,13 @@ class DicomLoaderService { ); } else if (!someInvalidStrings(wadoUri)) { return fetchIt(wadoUri, { headers: authorizationHeaders }); + } else if (!someInvalidStrings(instance?.url)) { + // make sure the url is absolute, remove the scope + // from it if it is not absolute. For instance it might be dicomweb:http://.... + // and we need to remove the dicomweb: part + const url = instance.url; + const absoluteUrl = url.startsWith('http') ? url : url.substring(url.indexOf(':') + 1); + return fetchIt(absoluteUrl, { headers: authorizationHeaders }); } } diff --git a/extensions/cornerstone/src/utils/measurementServiceMappings/Angle.ts b/extensions/cornerstone/src/utils/measurementServiceMappings/Angle.ts index 5708582a46b..7173e134466 100644 --- a/extensions/cornerstone/src/utils/measurementServiceMappings/Angle.ts +++ b/extensions/cornerstone/src/utils/measurementServiceMappings/Angle.ts @@ -50,7 +50,7 @@ const Angle = { displaySet = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID); } - const { points } = data.handles; + const { points, textBox } = data.handles; const mappedAnnotations = getMappedAnnotations(annotation, displaySetService); @@ -62,6 +62,7 @@ const Angle = { SOPInstanceUID, FrameOfReferenceUID, points, + textBox, metadata, referenceSeriesUID: SeriesInstanceUID, referenceStudyUID: StudyInstanceUID, diff --git a/extensions/cornerstone/src/utils/measurementServiceMappings/ArrowAnnotate.ts b/extensions/cornerstone/src/utils/measurementServiceMappings/ArrowAnnotate.ts index d5a7129da29..3d5904171b4 100644 --- a/extensions/cornerstone/src/utils/measurementServiceMappings/ArrowAnnotate.ts +++ b/extensions/cornerstone/src/utils/measurementServiceMappings/ArrowAnnotate.ts @@ -48,7 +48,7 @@ const Length = { displaySet = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID); } - const { points } = data.handles; + const { points, textBox } = data.handles; const mappedAnnotations = getMappedAnnotations(annotation, displaySetService); @@ -59,6 +59,7 @@ const Length = { SOPInstanceUID, FrameOfReferenceUID, points, + textBox, metadata, referenceSeriesUID: SeriesInstanceUID, referenceStudyUID: StudyInstanceUID, @@ -66,7 +67,6 @@ const Length = { toolName: metadata.toolName, displaySetInstanceUID: displaySet.displaySetInstanceUID, label: data.text, - text: data.text, displayText: displayText, data: data.cachedStats, type: getValueTypeFromToolType(toolName), diff --git a/extensions/cornerstone/src/utils/measurementServiceMappings/Bidirectional.ts b/extensions/cornerstone/src/utils/measurementServiceMappings/Bidirectional.ts index 11e1c7c02e7..958e22ed6b0 100644 --- a/extensions/cornerstone/src/utils/measurementServiceMappings/Bidirectional.ts +++ b/extensions/cornerstone/src/utils/measurementServiceMappings/Bidirectional.ts @@ -45,7 +45,7 @@ const Bidirectional = { displaySet = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID); } - const { points } = data.handles; + const { points, textBox } = data.handles; const mappedAnnotations = getMappedAnnotations(annotation, displaySetService); @@ -57,6 +57,7 @@ const Bidirectional = { SOPInstanceUID, FrameOfReferenceUID, points, + textBox, metadata, referenceSeriesUID: SeriesInstanceUID, referenceStudyUID: StudyInstanceUID, diff --git a/extensions/cornerstone/src/utils/measurementServiceMappings/CircleROI.ts b/extensions/cornerstone/src/utils/measurementServiceMappings/CircleROI.ts index 6ec79919bda..e65564c8188 100644 --- a/extensions/cornerstone/src/utils/measurementServiceMappings/CircleROI.ts +++ b/extensions/cornerstone/src/utils/measurementServiceMappings/CircleROI.ts @@ -43,7 +43,7 @@ const CircleROI = { displaySet = DisplaySetService.getDisplaySetsForSeries(SeriesInstanceUID); } - const { points } = data.handles; + const { points, textBox } = data.handles; const mappedAnnotations = getMappedAnnotations(annotation, DisplaySetService); @@ -55,6 +55,7 @@ const CircleROI = { SOPInstanceUID, FrameOfReferenceUID, points, + textBox, metadata, referenceSeriesUID: SeriesInstanceUID, referenceStudyUID: StudyInstanceUID, diff --git a/extensions/cornerstone/src/utils/measurementServiceMappings/CobbAngle.ts b/extensions/cornerstone/src/utils/measurementServiceMappings/CobbAngle.ts index f61356c29d8..dbde82860b8 100644 --- a/extensions/cornerstone/src/utils/measurementServiceMappings/CobbAngle.ts +++ b/extensions/cornerstone/src/utils/measurementServiceMappings/CobbAngle.ts @@ -50,7 +50,7 @@ const CobbAngle = { displaySet = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID); } - const { points } = data.handles; + const { points, textBox } = data.handles; const mappedAnnotations = getMappedAnnotations(annotation, displaySetService); @@ -62,6 +62,7 @@ const CobbAngle = { SOPInstanceUID, FrameOfReferenceUID, points, + textBox, metadata, referenceSeriesUID: SeriesInstanceUID, referenceStudyUID: StudyInstanceUID, diff --git a/extensions/cornerstone/src/utils/measurementServiceMappings/EllipticalROI.ts b/extensions/cornerstone/src/utils/measurementServiceMappings/EllipticalROI.ts index a38b6f8357c..1882d9ba0c0 100644 --- a/extensions/cornerstone/src/utils/measurementServiceMappings/EllipticalROI.ts +++ b/extensions/cornerstone/src/utils/measurementServiceMappings/EllipticalROI.ts @@ -43,7 +43,7 @@ const EllipticalROI = { displaySet = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID); } - const { points } = data.handles; + const { points, textBox } = data.handles; const mappedAnnotations = getMappedAnnotations(annotation, displaySetService); @@ -55,6 +55,7 @@ const EllipticalROI = { SOPInstanceUID, FrameOfReferenceUID, points, + textBox, metadata, referenceSeriesUID: SeriesInstanceUID, referenceStudyUID: StudyInstanceUID, diff --git a/extensions/cornerstone/src/utils/measurementServiceMappings/Length.ts b/extensions/cornerstone/src/utils/measurementServiceMappings/Length.ts index 5c5072d2c19..e5e9886b379 100644 --- a/extensions/cornerstone/src/utils/measurementServiceMappings/Length.ts +++ b/extensions/cornerstone/src/utils/measurementServiceMappings/Length.ts @@ -53,7 +53,7 @@ const Length = { displaySet = displaySetService.getDisplaySetsForSeries(SeriesInstanceUID); } - const { points } = data.handles; + const { points, textBox } = data.handles; const mappedAnnotations = getMappedAnnotations(annotation, displaySetService); @@ -65,6 +65,7 @@ const Length = { SOPInstanceUID, FrameOfReferenceUID, points, + textBox, metadata, referenceSeriesUID: SeriesInstanceUID, referenceStudyUID: StudyInstanceUID, diff --git a/extensions/cornerstone/src/utils/measurementServiceMappings/PlanarFreehandROI.ts b/extensions/cornerstone/src/utils/measurementServiceMappings/PlanarFreehandROI.ts index b6db513b66b..d1322e48438 100644 --- a/extensions/cornerstone/src/utils/measurementServiceMappings/PlanarFreehandROI.ts +++ b/extensions/cornerstone/src/utils/measurementServiceMappings/PlanarFreehandROI.ts @@ -48,7 +48,7 @@ const PlanarFreehandROI = { displaySet = DisplaySetService.getDisplaySetsForSeries(SeriesInstanceUID); } - const { points } = data.handles; + const { points, textBox } = data.handles; const mappedAnnotations = getMappedAnnotations(annotation, DisplaySetService); @@ -60,6 +60,7 @@ const PlanarFreehandROI = { SOPInstanceUID, FrameOfReferenceUID, points, + textBox, metadata, referenceSeriesUID: SeriesInstanceUID, referenceStudyUID: StudyInstanceUID, diff --git a/extensions/cornerstone/src/utils/measurementServiceMappings/RectangleROI.ts b/extensions/cornerstone/src/utils/measurementServiceMappings/RectangleROI.ts index c7cdb3e41e9..6c7e4b4ca1b 100644 --- a/extensions/cornerstone/src/utils/measurementServiceMappings/RectangleROI.ts +++ b/extensions/cornerstone/src/utils/measurementServiceMappings/RectangleROI.ts @@ -43,7 +43,7 @@ const RectangleROI = { displaySet = DisplaySetService.getDisplaySetsForSeries(SeriesInstanceUID); } - const { points } = data.handles; + const { points, textBox } = data.handles; const mappedAnnotations = getMappedAnnotations(annotation, DisplaySetService); @@ -55,6 +55,7 @@ const RectangleROI = { SOPInstanceUID, FrameOfReferenceUID, points, + textBox, metadata, referenceSeriesUID: SeriesInstanceUID, referenceStudyUID: StudyInstanceUID, diff --git a/extensions/cornerstone/src/utils/stackSync/toggleStackImageSync.ts b/extensions/cornerstone/src/utils/stackSync/toggleStackImageSync.ts index 65ce12ea8ec..d18768f38b4 100644 --- a/extensions/cornerstone/src/utils/stackSync/toggleStackImageSync.ts +++ b/extensions/cornerstone/src/utils/stackSync/toggleStackImageSync.ts @@ -12,7 +12,8 @@ export default function toggleStackImageSync({ const { syncGroupService, viewportGridService, displaySetService, cornerstoneViewportService } = servicesManager.services; - const viewports = providedViewports || getReconstructableStackViewports(viewportGridService, displaySetService); + const viewports = + providedViewports || getReconstructableStackViewports(viewportGridService, displaySetService); // create synchronization group and add the viewports to it. viewports.forEach(gridViewport => { @@ -46,7 +47,7 @@ function disableSync(syncName, servicesManager) { syncName ); }); -}; +} /** * Gets the consistent spacing stack viewport types, which are the ones which @@ -77,4 +78,4 @@ function getReconstructableStackViewports(viewportGridService, displaySetService } }); return viewports; -}; +} diff --git a/extensions/default/CHANGELOG.md b/extensions/default/CHANGELOG.md index 7b2e813b975..a0a2ec1abaa 100644 --- a/extensions/default/CHANGELOG.md +++ b/extensions/default/CHANGELOG.md @@ -3,6 +3,405 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + + +### Features + +* **customizationService:** Enable saving and loading of private tags in SRs ([#3842](https://github.com/OHIF/Viewers/issues/3842)) ([e1f55e6](https://github.com/OHIF/Viewers/commit/e1f55e65f2d2a34136ad5d0b1ada77d337a0ea23)) + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Features + +* **i18n:** enhanced i18n support ([#3761](https://github.com/OHIF/Viewers/issues/3761)) ([d14a8f0](https://github.com/OHIF/Viewers/commit/d14a8f0199db95cd9e85866a011b64d6bf830d57)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + + +### Bug Fixes + +* **SM:** drag and drop is now fixed for SM ([#3813](https://github.com/OHIF/Viewers/issues/3813)) ([f1a6764](https://github.com/OHIF/Viewers/commit/f1a67647aed635437b188cea7cf5d5a8fb974bbe)) + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + + +### Features + +* Merge Data Source ([#3788](https://github.com/OHIF/Viewers/issues/3788)) ([c4ff2c2](https://github.com/OHIF/Viewers/commit/c4ff2c2f09546ce8b72eab9c5e7beed611e3cab0)) + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + + +### Features + +* **url:** Add SeriesInstanceUIDs wado query param ([#3746](https://github.com/OHIF/Viewers/issues/3746)) ([b694228](https://github.com/OHIF/Viewers/commit/b694228dd535e4b97cb86a1dc085b6e8716bdaf3)) + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + + +### Features + +* **dicomJSON:** Add Loading Other Display Sets and JSON Metadata Generation script ([#3777](https://github.com/OHIF/Viewers/issues/3777)) ([43b1c17](https://github.com/OHIF/Viewers/commit/43b1c17209502e4876ad59bae09ed9442eda8024)) + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + + +### Features + +* **hp callback:** Add viewport ready callback ([#3772](https://github.com/OHIF/Viewers/issues/3772)) ([bf252bc](https://github.com/OHIF/Viewers/commit/bf252bcec2aae3a00479fdcb732110b344bcf2c0)) + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + + +### Bug Fixes + +* **thumbnail:** Avoid multiple promise creations for thumbnails ([#3756](https://github.com/OHIF/Viewers/issues/3756)) ([b23eeff](https://github.com/OHIF/Viewers/commit/b23eeff93745769e67e60c33d75293d6242c5ec9)) + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + + +### Features + +* **i18n:** enhanced i18n support ([#3730](https://github.com/OHIF/Viewers/issues/3730)) ([330e11c](https://github.com/OHIF/Viewers/commit/330e11c7ff0151e1096e19b8ffdae7d64cae280e)) + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + + +### Bug Fixes + +* **toolbar:** allow customizable toolbar for active viewport and allow active tool to be deactivated via a click ([#3608](https://github.com/OHIF/Viewers/issues/3608)) ([dd6d976](https://github.com/OHIF/Viewers/commit/dd6d9768bbca1d3cc472e8c1e6d85822500b96ef)) + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + + +### Bug Fixes + +* **sr:** dcm4chee requires the patient name for an SR to match what is in the original study ([#3739](https://github.com/OHIF/Viewers/issues/3739)) ([d98439f](https://github.com/OHIF/Viewers/commit/d98439fe7f3825076dbc87b664a1d1480ff414d3)) + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + + +### Bug Fixes + +* **display messages:** broken after timings ([#3719](https://github.com/OHIF/Viewers/issues/3719)) ([157b88c](https://github.com/OHIF/Viewers/commit/157b88c909d3289cb89ace731c1f9a19d40797ac)) + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + + +### Bug Fixes + +* **export:** wrong export for the tmtv RT function ([#3715](https://github.com/OHIF/Viewers/issues/3715)) ([a3f2a1a](https://github.com/OHIF/Viewers/commit/a3f2a1a7b0d16bfcc0ecddc2ab731e54c5e377c8)) + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/extension-default + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/extension-default + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) **Note:** Version bump only for package @ohif/extension-default diff --git a/extensions/default/babel.config.js b/extensions/default/babel.config.js new file mode 100644 index 00000000000..325ca2a8ee7 --- /dev/null +++ b/extensions/default/babel.config.js @@ -0,0 +1 @@ +module.exports = require('../../babel.config.js'); diff --git a/extensions/default/jest.config.js b/extensions/default/jest.config.js new file mode 100644 index 00000000000..ba90c0c4724 --- /dev/null +++ b/extensions/default/jest.config.js @@ -0,0 +1,17 @@ +const base = require('../../jest.config.base.js'); +const pkg = require('./package'); + +module.exports = { + ...base, + name: pkg.name, + displayName: pkg.name, + moduleNameMapper: { + ...base.moduleNameMapper, + '@ohif/(.*)': '/../../platform/$1/src', + }, + // rootDir: "../.." + // testMatch: [ + // //`/platform/${pack.name}/**/*.spec.js` + // "/platform/app/**/*.test.js" + // ] +}; diff --git a/extensions/default/package.json b/extensions/default/package.json index ed83e88ca76..acc85fe739c 100644 --- a/extensions/default/package.json +++ b/extensions/default/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-default", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "Common/default features and functionality for basic image viewing", "author": "OHIF Core Team", "license": "MIT", @@ -30,9 +30,9 @@ "start": "yarn run dev" }, "peerDependencies": { - "@ohif/core": "3.7.0-beta.102", - "@ohif/i18n": "3.7.0-beta.102", - "dcmjs": "^0.29.5", + "@ohif/core": "3.8.0-beta.36", + "@ohif/i18n": "3.8.0-beta.36", + "dcmjs": "^0.29.12", "dicomweb-client": "^0.10.2", "prop-types": "^15.6.2", "react": "^17.0.2", diff --git a/extensions/default/src/CustomizableContextMenu/ContextMenuItemsBuilder.test.js b/extensions/default/src/CustomizableContextMenu/ContextMenuItemsBuilder.test.js index 00ee469dd58..2231f750341 100644 --- a/extensions/default/src/CustomizableContextMenu/ContextMenuItemsBuilder.test.js +++ b/extensions/default/src/CustomizableContextMenu/ContextMenuItemsBuilder.test.js @@ -1,14 +1,14 @@ -import ContextMenuItemsBuilder from './ContextMenuItemsBuilder'; +import * as ContextMenuItemsBuilder from './ContextMenuItemsBuilder'; const menus = [ { id: 'one', - selector: ({ value }) => value === 'one', + selector: ({ value } = {}) => value === 'one', items: [], }, { id: 'two', - selector: ({ value }) => value === 'two', + selector: ({ value } = {}) => value === 'two', items: [], }, { @@ -17,13 +17,13 @@ const menus = [ }, ]; -const menuBuilder = new ContextMenuItemsBuilder(); - describe('ContextMenuItemsBuilder', () => { test('findMenuDefault', () => { - expect(menuBuilder.findMenuDefault(menus, {})).toBe(menus[2]); - expect(menuBuilder.findMenuDefault(menus, { value: 'two' })).toBe(menus[1]); - expect(menuBuilder.findMenuDefault([], {})).toBeUndefined(); - expect(menuBuilder.findMenuDefault(undefined, undefined)).toBeNull(); + expect(ContextMenuItemsBuilder.findMenuDefault(menus, {})).toBe(menus[2]); + expect( + ContextMenuItemsBuilder.findMenuDefault(menus, { selectorProps: { value: 'two' } }) + ).toBe(menus[1]); + expect(ContextMenuItemsBuilder.findMenuDefault([], {})).toBeUndefined(); + expect(ContextMenuItemsBuilder.findMenuDefault(undefined, undefined)).toBeNull(); }); }); diff --git a/extensions/default/src/DicomJSONDataSource/index.js b/extensions/default/src/DicomJSONDataSource/index.js index c4bfb75ce6c..d124c8b730e 100644 --- a/extensions/default/src/DicomJSONDataSource/index.js +++ b/extensions/default/src/DicomJSONDataSource/index.js @@ -25,6 +25,23 @@ let _store = { // } }; +function wrapSequences(obj) { + return Object.keys(obj).reduce( + (acc, key) => { + if (typeof obj[key] === 'object' && obj[key] !== null) { + // Recursively wrap sequences for nested objects + acc[key] = wrapSequences(obj[key]); + } else { + acc[key] = obj[key]; + } + if (key.endsWith('Sequence')) { + acc[key] = OHIF.utils.addAccessors(acc[key]); + } + return acc; + }, + Array.isArray(obj) ? [] : {} + ); +} const getMetaDataByURL = url => { return _store.urls.find(metaData => metaData.url === url); }; @@ -190,8 +207,14 @@ function createDicomJSONApi(dicomJsonConfig) { const numberOfSeries = series.length; series.forEach((series, index) => { const instances = series.instances.map(instance => { + // for instance.metadata if the key ends with sequence then + // we need to add a proxy to the first item in the sequence + // so that we can access the value of the sequence + // by using sequenceName.value + const modifiedMetadata = wrapSequences(instance.metadata); + const obj = { - ...instance.metadata, + ...modifiedMetadata, url: instance.url, imageId: instance.url, ...series, diff --git a/extensions/default/src/DicomWebDataSource/index.js b/extensions/default/src/DicomWebDataSource/index.js index b265e4a07a9..2ae44dc7e69 100644 --- a/extensions/default/src/DicomWebDataSource/index.js +++ b/extensions/default/src/DicomWebDataSource/index.js @@ -40,7 +40,8 @@ const metadataProvider = classes.MetadataProvider; * @param {bool} lazyLoadStudy - "enableStudyLazyLoad"; Request series meta async instead of blocking * @param {string|bool} singlepart - indicates of the retrieves can fetch singlepart. Options are bulkdata, video, image or boolean true */ -function createDicomWebApi(dicomWebConfig, userAuthenticationService) { +function createDicomWebApi(dicomWebConfig, servicesManager) { + const { userAuthenticationService, customizationService } = servicesManager.services; let dicomWebConfigCopy, qidoConfig, wadoConfig, @@ -140,7 +141,13 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) { instances: { search: (studyInstanceUid, queryParameters) => { qidoDicomWebClient.headers = getAuthrorizationHeader(); - qidoSearch.call(undefined, qidoDicomWebClient, studyInstanceUid, null, queryParameters); + return qidoSearch.call( + undefined, + qidoDicomWebClient, + studyInstanceUid, + null, + queryParameters + ); }, }, }, @@ -211,7 +218,7 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) { }, store: { - dicom: async (dataset, request) => { + dicom: async (dataset, request, dicomDict) => { wadoDicomWebClient.headers = getAuthrorizationHeader(); if (dataset instanceof ArrayBuffer) { const options = { @@ -220,21 +227,26 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) { }; await wadoDicomWebClient.storeInstances(options); } else { - const meta = { - FileMetaInformationVersion: dataset._meta?.FileMetaInformationVersion?.Value, - MediaStorageSOPClassUID: dataset.SOPClassUID, - MediaStorageSOPInstanceUID: dataset.SOPInstanceUID, - TransferSyntaxUID: EXPLICIT_VR_LITTLE_ENDIAN, - ImplementationClassUID, - ImplementationVersionName, - }; + let effectiveDicomDict = dicomDict; + + if (!dicomDict) { + const meta = { + FileMetaInformationVersion: dataset._meta?.FileMetaInformationVersion?.Value, + MediaStorageSOPClassUID: dataset.SOPClassUID, + MediaStorageSOPInstanceUID: dataset.SOPInstanceUID, + TransferSyntaxUID: EXPLICIT_VR_LITTLE_ENDIAN, + ImplementationClassUID, + ImplementationVersionName, + }; - const denaturalized = denaturalizeDataset(meta); - const dicomDict = new DicomDict(denaturalized); + const denaturalized = denaturalizeDataset(meta); + const defaultDicomDict = new DicomDict(denaturalized); + defaultDicomDict.dict = denaturalizeDataset(dataset); - dicomDict.dict = denaturalizeDataset(dataset); + effectiveDicomDict = defaultDicomDict; + } - const part10Buffer = dicomDict.write(); + const part10Buffer = effectiveDicomDict.write(); const options = { datasets: [part10Buffer], @@ -262,7 +274,8 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) { enableStudyLazyLoad, filters, sortCriteria, - sortFunction + sortFunction, + dicomWebConfig ); // first naturalize the data @@ -314,6 +327,8 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) { Object.keys(instancesPerSeries).forEach(seriesInstanceUID => DicomMetadataStore.addInstances(instancesPerSeries[seriesInstanceUID], madeInClient) ); + + return seriesSummaryMetadata; }, _retrieveSeriesMetadataAsync: async ( @@ -333,7 +348,8 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) { enableStudyLazyLoad, filters, sortCriteria, - sortFunction + sortFunction, + dicomWebConfig ); /** @@ -423,6 +439,9 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) { function setSuccessFlag() { const study = DicomMetadataStore.getStudy(StudyInstanceUID, madeInClient); + if (!study) { + return; + } study.isLoaded = true; } @@ -441,6 +460,8 @@ function createDicomWebApi(dicomWebConfig, userAuthenticationService) { ); await Promise.all(seriesDeliveredPromises); setSuccessFlag(); + + return seriesSummaryMetadata; }, deleteStudyMetadataPromise, getImageIdsForDisplaySet(displaySet) { diff --git a/extensions/default/src/DicomWebDataSource/retrieveStudyMetadata.js b/extensions/default/src/DicomWebDataSource/retrieveStudyMetadata.js index e4882d05e84..f05115333a5 100644 --- a/extensions/default/src/DicomWebDataSource/retrieveStudyMetadata.js +++ b/extensions/default/src/DicomWebDataSource/retrieveStudyMetadata.js @@ -1,3 +1,4 @@ +import retrieveMetadataFiltered from './utils/retrieveMetadataFiltered.js'; import RetrieveMetadata from './wado/retrieveMetadata.js'; const moduleName = 'RetrieveStudyMetadata'; @@ -5,14 +6,17 @@ const moduleName = 'RetrieveStudyMetadata'; const StudyMetaDataPromises = new Map(); /** - * Retrieves study metadata + * Retrieves study metadata. * - * @param {Object} server Object with server configuration parameters + * @param {Object} dicomWebClient The DICOMWebClient instance to be used for series load * @param {string} StudyInstanceUID The UID of the Study to be retrieved - * @param {boolean} enabledStudyLazyLoad Whether the study metadata should be loaded asynchronously. - * @param {function} storeInstancesCallback A callback used to store the retrieved instance metadata. - * @param {Object} [filters] - Object containing filters to be applied on retrieve metadata process - * @param {string} [filter.seriesInstanceUID] - series instance uid to filter results against + * @param {boolean} enableStudyLazyLoad Whether the study metadata should be loaded asynchronously. + * @param {Object} [filters] Object containing filters to be applied on retrieve metadata process + * @param {string} [filters.seriesInstanceUID] Series instance uid to filter results against + * @param {array} [filters.SeriesInstanceUIDs] Series instance uids to filter results against + * @param {function} [sortCriteria] Sort criteria function + * @param {function} [sortFunction] Sort function + * * @returns {Promise} that will be resolved with the metadata or rejected with the error */ export function retrieveStudyMetadata( @@ -21,7 +25,8 @@ export function retrieveStudyMetadata( enableStudyLazyLoad, filters, sortCriteria, - sortFunction + sortFunction, + dicomWebConfig = {} ) { // @TODO: Whenever a study metadata request has failed, its related promise will be rejected once and for all // and further requests for that metadata will always fail. On failure, we probably need to remove the @@ -34,37 +39,51 @@ export function retrieveStudyMetadata( throw new Error(`${moduleName}: Required 'StudyInstanceUID' parameter not provided.`); } + const promiseId = `${dicomWebConfig.name}:${StudyInstanceUID}`; + // Already waiting on result? Return cached promise - if (StudyMetaDataPromises.has(StudyInstanceUID)) { - return StudyMetaDataPromises.get(StudyInstanceUID); + if (StudyMetaDataPromises.has(promiseId)) { + return StudyMetaDataPromises.get(promiseId); } - // Create a promise to handle the data retrieval - const promise = new Promise((resolve, reject) => { - RetrieveMetadata( + let promise; + + if (filters && filters.SeriesInstanceUIDs) { + promise = retrieveMetadataFiltered( dicomWebClient, StudyInstanceUID, enableStudyLazyLoad, filters, sortCriteria, sortFunction - ).then(function (data) { - resolve(data); - }, reject); - }); + ); + } else { + // Create a promise to handle the data retrieval + promise = new Promise((resolve, reject) => { + RetrieveMetadata( + dicomWebClient, + StudyInstanceUID, + enableStudyLazyLoad, + filters, + sortCriteria, + sortFunction + ).then(function (data) { + resolve(data); + }, reject); + }); + } // Store the promise in cache - StudyMetaDataPromises.set(StudyInstanceUID, promise); + StudyMetaDataPromises.set(promiseId, promise); return promise; } /** * Delete the cached study metadata retrieval promise to ensure that the browser will - * re-retrieve the study metadata when it is next requested + * re-retrieve the study metadata when it is next requested. * * @param {String} StudyInstanceUID The UID of the Study to be removed from cache - * */ export function deleteStudyMetadataPromise(StudyInstanceUID) { if (StudyMetaDataPromises.has(StudyInstanceUID)) { diff --git a/extensions/default/src/DicomWebDataSource/utils/retrieveMetadataFiltered.js b/extensions/default/src/DicomWebDataSource/utils/retrieveMetadataFiltered.js new file mode 100644 index 00000000000..3e147fd48bf --- /dev/null +++ b/extensions/default/src/DicomWebDataSource/utils/retrieveMetadataFiltered.js @@ -0,0 +1,56 @@ +import RetrieveMetadata from '../wado/retrieveMetadata'; + +/** + * Retrieve metadata filtered. + * + * @param {*} dicomWebClient The DICOMWebClient instance to be used for series load + * @param {*} StudyInstanceUID The UID of the Study to be retrieved + * @param {*} enableStudyLazyLoad Whether the study metadata should be loaded asynchronously + * @param {object} filters Object containing filters to be applied on retrieve metadata process + * @param {string} [filters.seriesInstanceUID] Series instance uid to filter results against + * @param {array} [filters.SeriesInstanceUIDs] Series instance uids to filter results against + * @param {function} [sortCriteria] Sort criteria function + * @param {function} [sortFunction] Sort function + * + * @returns + */ +function retrieveMetadataFiltered( + dicomWebClient, + StudyInstanceUID, + enableStudyLazyLoad, + filters, + sortCriteria, + sortFunction +) { + const { SeriesInstanceUIDs } = filters; + + return new Promise((resolve, reject) => { + const promises = SeriesInstanceUIDs.map(uid => { + const seriesSpecificFilters = Object.assign({}, filters, { + seriesInstanceUID: uid, + }); + + return RetrieveMetadata( + dicomWebClient, + StudyInstanceUID, + enableStudyLazyLoad, + seriesSpecificFilters, + sortCriteria, + sortFunction + ); + }); + + Promise.all(promises).then(results => { + const aggregatedResult = { preLoadData: [], promises: [] }; + + results.forEach(({ preLoadData, promises }) => { + aggregatedResult.preLoadData = aggregatedResult.preLoadData.concat(preLoadData); + aggregatedResult.promises = aggregatedResult.promises.concat(promises); + }); + + resolve(aggregatedResult); + }, reject); + }); +} + +export default retrieveMetadataFiltered; diff --git a/extensions/default/src/DicomWebDataSource/wado/retrieveMetadata.js b/extensions/default/src/DicomWebDataSource/wado/retrieveMetadata.js index ba62cca1da8..7bed25a1a61 100644 --- a/extensions/default/src/DicomWebDataSource/wado/retrieveMetadata.js +++ b/extensions/default/src/DicomWebDataSource/wado/retrieveMetadata.js @@ -5,15 +5,20 @@ import RetrieveMetadataLoaderAsync from './retrieveMetadataLoaderAsync'; * Retrieve Study metadata from a DICOM server. If the server is configured to use lazy load, only the first series * will be loaded and the property "studyLoader" will be set to let consumer load remaining series as needed. * - * @param {Object} dicomWebClient The dicomweb-client. - * @param {string} studyInstanceUid The Study Instance UID of the study which needs to be loaded - * @param {Object} [filters] - Object containing filters to be applied on retrieve metadata process - * @param {string} [filter.seriesInstanceUID] - series instance uid to filter results against - * @returns {Object} A study descriptor object + * @param {*} dicomWebClient The DICOMWebClient instance to be used for series load + * @param {*} StudyInstanceUID The UID of the Study to be retrieved + * @param {*} enableStudyLazyLoad Whether the study metadata should be loaded asynchronously + * @param {object} filters Object containing filters to be applied on retrieve metadata process + * @param {string} [filters.seriesInstanceUID] Series instance uid to filter results against + * @param {array} [filters.SeriesInstanceUIDs] Series instance uids to filter results against + * @param {function} [sortCriteria] Sort criteria function + * @param {function} [sortFunction] Sort function + * + * @returns {Promise} A promises that resolves the study descriptor object */ async function RetrieveMetadata( dicomWebClient, - studyInstanceUid, + StudyInstanceUID, enableStudyLazyLoad, filters = {}, sortCriteria, @@ -24,7 +29,7 @@ async function RetrieveMetadata( const retrieveMetadataLoader = new RetrieveMetadataLoader( dicomWebClient, - studyInstanceUid, + StudyInstanceUID, filters, sortCriteria, sortFunction diff --git a/extensions/default/src/DicomWebDataSource/wado/retrieveMetadataLoaderAsync.js b/extensions/default/src/DicomWebDataSource/wado/retrieveMetadataLoaderAsync.js index bca30942929..ffaa83418f9 100644 --- a/extensions/default/src/DicomWebDataSource/wado/retrieveMetadataLoaderAsync.js +++ b/extensions/default/src/DicomWebDataSource/wado/retrieveMetadataLoaderAsync.js @@ -3,10 +3,12 @@ import { sortStudySeries, sortingCriteria } from '@ohif/core/src/utils/sortStudy import RetrieveMetadataLoader from './retrieveMetadataLoader'; /** - * Creates an immutable series loader object which loads each series sequentially using the iterator interface + * Creates an immutable series loader object which loads each series sequentially using the iterator interface. + * * @param {DICOMWebClient} dicomWebClient The DICOMWebClient instance to be used for series load * @param {string} studyInstanceUID The Study Instance UID from which series will be loaded * @param {Array} seriesInstanceUIDList A list of Series Instance UIDs + * * @returns {Object} Returns an object which supports loading of instances from each of given Series Instance UID */ function makeSeriesAsyncLoader(client, studyInstanceUID, seriesInstanceUIDList) { diff --git a/extensions/default/src/DicomWebProxyDataSource/index.js b/extensions/default/src/DicomWebProxyDataSource/index.js index ab1d8e49e31..99007de3e05 100644 --- a/extensions/default/src/DicomWebProxyDataSource/index.js +++ b/extensions/default/src/DicomWebProxyDataSource/index.js @@ -9,7 +9,7 @@ import { createDicomWebApi } from '../DicomWebDataSource/index'; * dicomWeb configuration array * */ -function createDicomWebProxyApi(dicomWebProxyConfig, UserAuthenticationService) { +function createDicomWebProxyApi(dicomWebProxyConfig, servicesManager) { const { name } = dicomWebProxyConfig; let dicomWebDelegate = undefined; @@ -28,7 +28,7 @@ function createDicomWebProxyApi(dicomWebProxyConfig, UserAuthenticationService) dicomWebDelegate = createDicomWebApi( data.servers.dicomWeb[0].configuration, - UserAuthenticationService + servicesManager ); dicomWebDelegate.initialize({ params, query }); } diff --git a/extensions/default/src/MergeDataSource/index.test.js b/extensions/default/src/MergeDataSource/index.test.js new file mode 100644 index 00000000000..2b915e32968 --- /dev/null +++ b/extensions/default/src/MergeDataSource/index.test.js @@ -0,0 +1,203 @@ +import { DicomMetadataStore, IWebApiDataSource } from '@ohif/core'; +import { + mergeMap, + callForAllDataSourcesAsync, + callForAllDataSources, + callForDefaultDataSource, + callByRetrieveAETitle, + createMergeDataSourceApi, +} from './index'; + +jest.mock('@ohif/core'); + +describe('MergeDataSource', () => { + let path, + sourceName, + mergeConfig, + extensionManager, + series1, + series2, + series3, + series4, + mergeKey, + tagFunc, + dataSourceAndSeriesMap, + dataSourceAndUIDsMap, + dataSourceAndDSMap, + pathSync; + + beforeAll(() => { + path = 'query.series.search'; + pathSync = 'getImageIdsForInstance'; + tagFunc = jest.fn((data, sourceName) => + data.map(item => ({ ...item, RetrieveAETitle: sourceName })) + ); + sourceName = 'dicomweb1'; + mergeKey = 'seriesInstanceUid'; + series1 = { [mergeKey]: '123' }; + series2 = { [mergeKey]: '234' }; + series3 = { [mergeKey]: '345' }; + series4 = { [mergeKey]: '456' }; + mergeConfig = { + seriesMerge: { + dataSourceNames: ['dicomweb1', 'dicomweb2'], + defaultDataSourceName: 'dicomweb1', + }, + }; + dataSourceAndSeriesMap = { + dataSource1: series1, + dataSource2: series2, + dataSource3: series3, + }; + dataSourceAndUIDsMap = { + dataSource1: ['123'], + dataSource2: ['234'], + dataSource3: ['345'], + }; + dataSourceAndDSMap = { + dataSource1: { + displaySet: { + StudyInstanceUID: '123', + SeriesInstanceUID: '123', + }, + }, + dataSource2: { + displaySet: { + StudyInstanceUID: '234', + SeriesInstanceUID: '234', + }, + }, + dataSource3: { + displaySet: { + StudyInstanceUID: '345', + SeriesInstanceUID: '345', + }, + }, + }; + extensionManager = { + dataSourceDefs: { + dataSource1: { + sourceName: 'dataSource1', + configuration: {}, + }, + dataSource2: { + sourceName: 'dataSource2', + configuration: {}, + }, + dataSource3: { + sourceName: 'dataSource3', + configuration: {}, + }, + }, + getDataSources: jest.fn(dataSourceName => [ + { + [path]: jest.fn().mockResolvedValue([dataSourceAndSeriesMap[dataSourceName]]), + }, + ]), + }; + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + describe('callForAllDataSourcesAsync', () => { + it('should call the correct functions and return the merged data', async () => { + /** Arrange */ + extensionManager.getDataSources = jest.fn(dataSourceName => [ + { + [path]: jest.fn().mockResolvedValue([dataSourceAndSeriesMap[dataSourceName]]), + }, + ]); + + /** Act */ + const data = await callForAllDataSourcesAsync({ + mergeMap, + path, + args: [], + extensionManager, + dataSourceNames: ['dataSource1', 'dataSource2'], + }); + + /** Assert */ + expect(extensionManager.getDataSources).toHaveBeenCalledTimes(2); + expect(extensionManager.getDataSources).toHaveBeenCalledWith('dataSource1'); + expect(extensionManager.getDataSources).toHaveBeenCalledWith('dataSource2'); + expect(data).toEqual([series1, series2]); + }); + }); + + describe('callForAllDataSources', () => { + it('should call the correct functions and return the merged data', () => { + /** Arrange */ + extensionManager.getDataSources = jest.fn(dataSourceName => [ + { + [pathSync]: () => dataSourceAndUIDsMap[dataSourceName], + }, + ]); + + /** Act */ + const data = callForAllDataSources({ + path: pathSync, + args: [], + extensionManager, + dataSourceNames: ['dataSource2', 'dataSource3'], + }); + + /** Assert */ + expect(extensionManager.getDataSources).toHaveBeenCalledTimes(2); + expect(extensionManager.getDataSources).toHaveBeenCalledWith('dataSource2'); + expect(extensionManager.getDataSources).toHaveBeenCalledWith('dataSource3'); + expect(data).toEqual(['234', '345']); + }); + }); + + describe('callForDefaultDataSource', () => { + it('should call the correct function and return the data', () => { + /** Arrange */ + extensionManager.getDataSources = jest.fn(dataSourceName => [ + { + [pathSync]: () => dataSourceAndUIDsMap[dataSourceName], + }, + ]); + + /** Act */ + const data = callForDefaultDataSource({ + path: pathSync, + args: [], + extensionManager, + defaultDataSourceName: 'dataSource2', + }); + + /** Assert */ + expect(extensionManager.getDataSources).toHaveBeenCalledTimes(1); + expect(extensionManager.getDataSources).toHaveBeenCalledWith('dataSource2'); + expect(data).toEqual(['234']); + }); + }); + + describe('callByRetrieveAETitle', () => { + it('should call the correct function and return the data', () => { + /** Arrange */ + DicomMetadataStore.getSeries.mockImplementationOnce(() => [series2]); + extensionManager.getDataSources = jest.fn(dataSourceName => [ + { + [pathSync]: () => dataSourceAndUIDsMap[dataSourceName], + }, + ]); + + /** Act */ + const data = callByRetrieveAETitle({ + path: pathSync, + args: [dataSourceAndDSMap['dataSource2']], + extensionManager, + defaultDataSourceName: 'dataSource2', + }); + + /** Assert */ + expect(extensionManager.getDataSources).toHaveBeenCalledTimes(1); + expect(extensionManager.getDataSources).toHaveBeenCalledWith('dataSource2'); + expect(data).toEqual(['234']); + }); + }); +}); diff --git a/extensions/default/src/MergeDataSource/index.ts b/extensions/default/src/MergeDataSource/index.ts new file mode 100644 index 00000000000..1c14069b665 --- /dev/null +++ b/extensions/default/src/MergeDataSource/index.ts @@ -0,0 +1,252 @@ +import { DicomMetadataStore, IWebApiDataSource } from '@ohif/core'; +import { get, uniqBy } from 'lodash'; +import { + MergeConfig, + CallForAllDataSourcesAsyncOptions, + CallForAllDataSourcesOptions, + CallForDefaultDataSourceOptions, + CallByRetrieveAETitleOptions, + MergeMap, +} from './types'; + +export const mergeMap: MergeMap = { + 'query.studies.search': { + mergeKey: 'studyInstanceUid', + tagFunc: x => x, + }, + 'query.series.search': { + mergeKey: 'seriesInstanceUid', + tagFunc: (series, sourceName) => { + series.forEach(series => { + series.RetrieveAETitle = sourceName; + DicomMetadataStore.updateSeriesMetadata(series); + }); + return series; + }, + }, +}; + +/** + * Calls all data sources asynchronously and merges the results. + * @param {CallForAllDataSourcesAsyncOptions} options - The options for calling all data sources. + * @param {string} options.path - The path to the function to be called on each data source. + * @param {unknown[]} options.args - The arguments to be passed to the function. + * @param {ExtensionManager} options.extensionManager - The extension manager. + * @param {string[]} options.dataSourceNames - The names of the data sources to be called. + * @returns {Promise} - A promise that resolves to the merged data from all data sources. + */ +export const callForAllDataSourcesAsync = async ({ + mergeMap, + path, + args, + extensionManager, + dataSourceNames, +}: CallForAllDataSourcesAsyncOptions) => { + const { mergeKey, tagFunc } = mergeMap[path] || { tagFunc: x => x }; + + const dataSourceDefs = Object.values(extensionManager.dataSourceDefs); + const promises = []; + const mergedData = []; + + for (const dataSourceDef of dataSourceDefs) { + const { configuration, sourceName } = dataSourceDef; + if (!!configuration && dataSourceNames.includes(sourceName)) { + const [dataSource] = extensionManager.getDataSources(sourceName); + const func = get(dataSource, path); + const promise = func.apply(dataSource, args); + promises.push(promise.then(data => mergedData.push(tagFunc(data, sourceName)))); + } + } + + await Promise.allSettled(promises); + + return uniqBy(mergedData.flat(), obj => obj[mergeKey]); +}; + +/** + * Calls all data sources that match the provided names and merges their data. + * @param options - The options for calling all data sources. + * @param options.path - The path to the function to be called on each data source. + * @param options.args - The arguments to be passed to the function. + * @param options.extensionManager - The extension manager instance. + * @param options.dataSourceNames - The names of the data sources to be called. + * @returns The merged data from all the matching data sources. + */ +export const callForAllDataSources = ({ + path, + args, + extensionManager, + dataSourceNames, +}: CallForAllDataSourcesOptions) => { + const dataSourceDefs = Object.values(extensionManager.dataSourceDefs); + const mergedData = []; + for (const dataSourceDef of dataSourceDefs) { + const { configuration, sourceName } = dataSourceDef; + if (!!configuration && dataSourceNames.includes(sourceName)) { + const [dataSource] = extensionManager.getDataSources(sourceName); + const func = get(dataSource, path); + const data = func.apply(dataSource, args); + mergedData.push(data); + } + } + return mergedData.flat(); +}; + +/** + * Calls the default data source function specified by the given path with the provided arguments. + * @param {CallForDefaultDataSourceOptions} options - The options for calling the default data source. + * @param {string} options.path - The path to the function within the default data source. + * @param {unknown[]} options.args - The arguments to pass to the function. + * @param {string} options.defaultDataSourceName - The name of the default data source. + * @param {ExtensionManager} options.extensionManager - The extension manager instance. + * @returns {unknown} - The result of calling the default data source function. + */ +export const callForDefaultDataSource = ({ + path, + args, + defaultDataSourceName, + extensionManager, +}: CallForDefaultDataSourceOptions) => { + const [dataSource] = extensionManager.getDataSources(defaultDataSourceName); + const func = get(dataSource, path); + return func.apply(dataSource, args); +}; + +/** + * Calls the data source specified by the RetrieveAETitle of the given display set. + * @typedef {Object} CallByRetrieveAETitleOptions + * @property {string} path - The path of the method to call on the data source. + * @property {unknown[]} args - The arguments to pass to the method. + * @property {string} defaultDataSourceName - The name of the default data source. + * @property {ExtensionManager} extensionManager - The extension manager. + */ +export const callByRetrieveAETitle = ({ + path, + args, + defaultDataSourceName, + extensionManager, +}: CallByRetrieveAETitleOptions) => { + const [displaySet] = args; + const seriesMetadata = DicomMetadataStore.getSeries( + displaySet.StudyInstanceUID, + displaySet.SeriesInstanceUID + ); + const [dataSource] = extensionManager.getDataSources( + seriesMetadata.RetrieveAETitle || defaultDataSourceName + ); + return dataSource[path](...args); +}; + +function createMergeDataSourceApi( + mergeConfig: MergeConfig, + servicesManager: unknown, + extensionManager +) { + const { seriesMerge } = mergeConfig; + const { dataSourceNames, defaultDataSourceName } = seriesMerge; + + const implementation = { + initialize: (...args: unknown[]) => + callForAllDataSources({ path: 'initialize', args, extensionManager, dataSourceNames }), + query: { + studies: { + search: (...args: unknown[]) => + callForAllDataSourcesAsync({ + mergeMap, + path: 'query.studies.search', + args, + extensionManager, + dataSourceNames, + }), + }, + series: { + search: (...args: unknown[]) => + callForAllDataSourcesAsync({ + mergeMap, + path: 'query.series.search', + args, + extensionManager, + dataSourceNames, + }), + }, + instances: { + search: (...args: unknown[]) => + callForAllDataSourcesAsync({ + mergeMap, + path: 'query.instances.search', + args, + extensionManager, + dataSourceNames, + }), + }, + }, + retrieve: { + bulkDataURI: (...args: unknown[]) => + callForAllDataSourcesAsync({ + mergeMap, + path: 'retrieve.bulkDataURI', + args, + extensionManager, + dataSourceNames, + }), + directURL: (...args: unknown[]) => + callForDefaultDataSource({ + path: 'retrieve.directURL', + args, + defaultDataSourceName, + extensionManager, + }), + series: { + metadata: (...args: unknown[]) => + callForAllDataSourcesAsync({ + mergeMap, + path: 'retrieve.series.metadata', + args, + extensionManager, + dataSourceNames, + }), + }, + }, + store: { + dicom: (...args: unknown[]) => + callForDefaultDataSource({ + path: 'store.dicom', + args, + defaultDataSourceName, + extensionManager, + }), + }, + deleteStudyMetadataPromise: (...args: unknown[]) => + callForAllDataSources({ + path: 'deleteStudyMetadataPromise', + args, + extensionManager, + dataSourceNames, + }), + getImageIdsForDisplaySet: (...args: unknown[]) => + callByRetrieveAETitle({ + path: 'getImageIdsForDisplaySet', + args, + defaultDataSourceName, + extensionManager, + }), + getImageIdsForInstance: (...args: unknown[]) => + callByRetrieveAETitle({ + path: 'getImageIdsForDisplaySet', + args, + defaultDataSourceName, + extensionManager, + }), + getStudyInstanceUIDs: (...args: unknown[]) => + callForAllDataSources({ + path: 'getStudyInstanceUIDs', + args, + extensionManager, + dataSourceNames, + }), + }; + + return IWebApiDataSource.create(implementation); +} + +export { createMergeDataSourceApi }; diff --git a/extensions/default/src/MergeDataSource/types.ts b/extensions/default/src/MergeDataSource/types.ts new file mode 100644 index 00000000000..3a0a3f83aa4 --- /dev/null +++ b/extensions/default/src/MergeDataSource/types.ts @@ -0,0 +1,44 @@ +import { ExtensionManager } from '@ohif/core'; + +export type MergeMap = { + [key: string]: { + mergeKey: string; + tagFunc: (data: unknown[], sourceName: string) => unknown[]; + }; +}; + +export type CallForAllDataSourcesAsyncOptions = { + mergeMap: object; + path: string; + args: unknown[]; + dataSourceNames: string[]; + extensionManager: ExtensionManager; +}; + +export type CallForAllDataSourcesOptions = { + path: string; + args: unknown[]; + dataSourceNames: string[]; + extensionManager: ExtensionManager; +}; + +export type CallForDefaultDataSourceOptions = { + path: string; + args: unknown[]; + defaultDataSourceName: string; + extensionManager: ExtensionManager; +}; + +export type CallByRetrieveAETitleOptions = { + path: string; + args: unknown[]; + defaultDataSourceName: string; + extensionManager: ExtensionManager; +}; + +export type MergeConfig = { + seriesMerge: { + dataSourceNames: string[]; + defaultDataSourceName: string; + }; +}; diff --git a/extensions/default/src/Panels/PanelMeasurementTable.tsx b/extensions/default/src/Panels/PanelMeasurementTable.tsx index 791d878aa24..9b5d90543ba 100644 --- a/extensions/default/src/Panels/PanelMeasurementTable.tsx +++ b/extensions/default/src/Panels/PanelMeasurementTable.tsx @@ -1,5 +1,6 @@ import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; +import { useTranslation } from 'react-i18next'; import { utils, ServicesManager } from '@ohif/core'; import { MeasurementTable, Dialog, Input, useViewportGrid, ButtonEnums } from '@ohif/ui'; import ActionButtons from './ActionButtons'; @@ -18,6 +19,8 @@ export default function PanelMeasurementTable({ commandsManager, extensionManager, }): React.FunctionComponent { + const { t } = useTranslation('MeasurementTable'); + const [viewportGrid, viewportGridService] = useViewportGrid(); const { activeViewportId, viewports } = viewportGrid; const { measurementService, uiDialogService, uiNotificationService, displaySetService } = ( @@ -209,7 +212,7 @@ export default function PanelMeasurementTable({ data-cy={'measurements-panel'} > - {dataSourcesOpts.length > 1 && ( - option.value === value.dataSourceName) + .placeHolder + } + value={value.dataSourceName} + onChange={evt => { + setValue(v => ({ ...v, dataSourceName: evt.value })); + }} + isClearable={false} + /> + )} - +
+ +
); }, diff --git a/extensions/default/src/Toolbar/Toolbar.tsx b/extensions/default/src/Toolbar/Toolbar.tsx index c714968a1d0..f3812ff5b6c 100644 --- a/extensions/default/src/Toolbar/Toolbar.tsx +++ b/extensions/default/src/Toolbar/Toolbar.tsx @@ -1,19 +1,34 @@ -import React, { useEffect, useState, useCallback } from 'react'; +import React, { useCallback, useEffect, useState } from 'react'; import classnames from 'classnames'; +import { useViewportGrid } from '@ohif/ui'; -export default function Toolbar({ servicesManager }) { +export default function Toolbar({ + servicesManager, +}: Types.Extensions.ExtensionParams): React.ReactElement { const { toolbarService } = servicesManager.services; + + const [viewportGrid, viewportGridService] = useViewportGrid(); + const [toolbarButtons, setToolbarButtons] = useState([]); useEffect(() => { - const { unsubscribe } = toolbarService.subscribe(toolbarService.EVENTS.TOOL_BAR_MODIFIED, () => - setToolbarButtons(toolbarService.getButtonSection('primary')) + const updateToolbar = () => { + const toolGroupId = + viewportGridService.getActiveViewportOptionByKey('toolGroupId') ?? 'default'; + setToolbarButtons(toolbarService.getButtonSection(toolGroupId)); + }; + + const { unsubscribe } = toolbarService.subscribe( + toolbarService.EVENTS.TOOL_BAR_MODIFIED, + updateToolbar ); + updateToolbar(); + return () => { unsubscribe(); }; - }, [toolbarService]); + }, [toolbarService, viewportGrid]); const onInteraction = useCallback( args => toolbarService.recordInteraction(args), diff --git a/extensions/default/src/Toolbar/ToolbarButtonWithServices.tsx b/extensions/default/src/Toolbar/ToolbarButtonWithServices.tsx index 24dda712b4d..32b7fb51e98 100644 --- a/extensions/default/src/Toolbar/ToolbarButtonWithServices.tsx +++ b/extensions/default/src/Toolbar/ToolbarButtonWithServices.tsx @@ -65,7 +65,7 @@ ToolbarButtonWithServices.propTypes = { state: PropTypes.shape({ primaryToolId: PropTypes.string, toggles: PropTypes.objectOf(PropTypes.bool), - groups: PropTypes.objectOf(PropTypes.object), + groups: PropTypes.objectOf(PropTypes.any), }).isRequired, }).isRequired, }).isRequired, diff --git a/extensions/default/src/ViewerLayout/ViewerHeader.tsx b/extensions/default/src/ViewerLayout/ViewerHeader.tsx index 6b7f5bfd3f0..00ec7b4796b 100644 --- a/extensions/default/src/ViewerLayout/ViewerHeader.tsx +++ b/extensions/default/src/ViewerLayout/ViewerHeader.tsx @@ -53,7 +53,7 @@ function ViewerHeader({ hotkeysManager, extensionManager, servicesManager }) { onClick: () => show({ content: AboutModal, - title: 'About OHIF Viewer', + title: t('AboutModal:About OHIF Viewer'), contentProps: { versionNumber, commitHash }, }), }, @@ -62,7 +62,7 @@ function ViewerHeader({ hotkeysManager, extensionManager, servicesManager }) { icon: 'settings', onClick: () => show({ - title: t('UserPreferencesModal:User Preferences'), + title: t('UserPreferencesModal:User preferences'), content: UserPreferences, contentProps: { hotkeyDefaults: hotkeysManager.getValidHotkeyDefinitions(hotkeyDefaults), diff --git a/extensions/default/src/commandsModule.ts b/extensions/default/src/commandsModule.ts index 3f22e35895b..bcc0cab591b 100644 --- a/extensions/default/src/commandsModule.ts +++ b/extensions/default/src/commandsModule.ts @@ -241,7 +241,6 @@ const commandsModule = ({ ]; stateSyncService.store(stateSyncReduce); // This is a default action applied - const { protocol } = hangingProtocolService.getActiveProtocol(); actions.toggleHpTools(); // try to use the same tool in the new hanging protocol stage @@ -264,16 +263,6 @@ const commandsModule = ({ }); } } - - // Send the notification about updating the state - if (protocolId !== hpInfo.protocolId) { - // The old protocol callbacks are used for turning off things - // like crosshairs when moving to the new HP - commandsManager.run(oldProtocol.callbacks?.onProtocolExit); - // The new protocol callback is used for things like - // activating modes etc. - } - commandsManager.run(protocol.callbacks?.onProtocolEnter); return true; } catch (e) { console.error(e); diff --git a/extensions/default/src/getDataSourcesModule.js b/extensions/default/src/getDataSourcesModule.js index 6eab56a2fad..8c918e0c6ac 100644 --- a/extensions/default/src/getDataSourcesModule.js +++ b/extensions/default/src/getDataSourcesModule.js @@ -6,6 +6,7 @@ import { createDicomWebApi } from './DicomWebDataSource/index.js'; import { createDicomJSONApi } from './DicomJSONDataSource/index.js'; import { createDicomLocalApi } from './DicomLocalDataSource/index.js'; import { createDicomWebProxyApi } from './DicomWebProxyDataSource/index.js'; +import { createMergeDataSourceApi } from './MergeDataSource/index'; /** * @@ -32,6 +33,11 @@ function getDataSourcesModule() { type: 'localApi', createDataSource: createDicomLocalApi, }, + { + name: 'merge', + type: 'mergeApi', + createDataSource: createMergeDataSourceApi, + }, ]; } diff --git a/extensions/default/src/getPanelModule.tsx b/extensions/default/src/getPanelModule.tsx index 559f98fcad7..e294805dfbd 100644 --- a/extensions/default/src/getPanelModule.tsx +++ b/extensions/default/src/getPanelModule.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { WrappedPanelStudyBrowser, PanelMeasurementTable } from './Panels'; +import i18n from 'i18next'; // TODO: // - No loading UI exists yet @@ -22,7 +23,7 @@ function getPanelModule({ commandsManager, extensionManager, servicesManager }) name: 'seriesList', iconName: 'tab-studies', iconLabel: 'Studies', - label: 'Studies', + label: i18n.t('SidePanel:Studies'), component: WrappedPanelStudyBrowser.bind(null, { commandsManager, extensionManager, @@ -33,8 +34,8 @@ function getPanelModule({ commandsManager, extensionManager, servicesManager }) name: 'measure', iconName: 'tab-linear', iconLabel: 'Measure', - label: 'Measurements', - secondaryLabel: 'Measurements', + label: i18n.t('SidePanel:Measurements'), + secondaryLabel: i18n.t('SidePanel:Measurements'), component: wrappedMeasurementPanel, }, ]; diff --git a/extensions/default/src/init.ts b/extensions/default/src/init.ts index 973ae0722b6..1dfc7de259b 100644 --- a/extensions/default/src/init.ts +++ b/extensions/default/src/init.ts @@ -51,10 +51,16 @@ export default function init({ servicesManager, configuration = {} }): void { const handlePETImageMetadata = ({ SeriesInstanceUID, StudyInstanceUID }) => { const { instances } = DicomMetadataStore.getSeries(StudyInstanceUID, SeriesInstanceUID); + if (!instances?.length) { + return; + } + const modality = instances[0].Modality; - if (modality !== 'PT') { + + if (!modality || modality !== 'PT') { return; } + const imageIds = instances.map(instance => instance.imageId); const instanceMetadataArray = []; imageIds.forEach(imageId => { diff --git a/extensions/dicom-microscopy/CHANGELOG.md b/extensions/dicom-microscopy/CHANGELOG.md index 83de49868e5..6a86398a8be 100644 --- a/extensions/dicom-microscopy/CHANGELOG.md +++ b/extensions/dicom-microscopy/CHANGELOG.md @@ -3,6 +3,369 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + + +### Bug Fixes + +* **SM:** drag and drop is now fixed for SM ([#3813](https://github.com/OHIF/Viewers/issues/3813)) ([f1a6764](https://github.com/OHIF/Viewers/commit/f1a67647aed635437b188cea7cf5d5a8fb974bbe)) + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/extension-dicom-microscopy + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) **Note:** Version bump only for package @ohif/extension-dicom-microscopy diff --git a/extensions/dicom-microscopy/package.json b/extensions/dicom-microscopy/package.json index 5b2a72b3595..84e4fd4f009 100644 --- a/extensions/dicom-microscopy/package.json +++ b/extensions/dicom-microscopy/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-dicom-microscopy", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "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.102", - "@ohif/extension-default": "3.7.0-beta.102", - "@ohif/i18n": "3.7.0-beta.102", - "@ohif/ui": "3.7.0-beta.102", + "@ohif/core": "3.8.0-beta.36", + "@ohif/extension-default": "3.8.0-beta.36", + "@ohif/i18n": "3.8.0-beta.36", + "@ohif/ui": "3.8.0-beta.36", "prop-types": "^15.6.2", "react": "^17.0.2", "react-dom": "^17.0.2", diff --git a/extensions/dicom-microscopy/src/index.tsx b/extensions/dicom-microscopy/src/index.tsx index a4589ed2dc7..486736407c9 100644 --- a/extensions/dicom-microscopy/src/index.tsx +++ b/extensions/dicom-microscopy/src/index.tsx @@ -1,5 +1,5 @@ import { id } from './id'; -import React, { Suspense } from 'react'; +import React, { Suspense, useMemo } from 'react'; import getPanelModule from './getPanelModule'; import getCommandsModule from './getCommandsModule'; @@ -58,8 +58,17 @@ export default { const [viewportGrid, viewportGridService] = useViewportGrid(); const { activeViewportId } = viewportGrid; + // a unique identifier based on the contents of displaySets. + // since we changed our rendering pipeline and if there is no + // element size change nor viewportId change we won't re-render + // we need a way to force re-rendering when displaySets change. + const displaySetsKey = useMemo(() => { + return props.displaySets.map(ds => ds.displaySetInstanceUID).join('-'); + }, [props.displaySets]); + return ( {isTracked ? ( <> - Series is - tracked and can be viewed
{' '} - in the measurement panel + {t('Series is tracked and can be viewed in the measurement panel')} ) : ( <> - Measurements for - untracked - series
will not be shown in the
measurements panel + {t('Measurements for untracked series will not be shown in the measurements panel')} )} diff --git a/extensions/test-extension/CHANGELOG.md b/extensions/test-extension/CHANGELOG.md index d22ae77e3e4..5a43e74c559 100644 --- a/extensions/test-extension/CHANGELOG.md +++ b/extensions/test-extension/CHANGELOG.md @@ -3,6 +3,369 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + + +### Bug Fixes + +* **sr:** dcm4chee requires the patient name for an SR to match what is in the original study ([#3739](https://github.com/OHIF/Viewers/issues/3739)) ([d98439f](https://github.com/OHIF/Viewers/commit/d98439fe7f3825076dbc87b664a1d1480ff414d3)) + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/extension-test + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/extension-test + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) **Note:** Version bump only for package @ohif/extension-test diff --git a/extensions/test-extension/package.json b/extensions/test-extension/package.json index 4c940656c0d..6371b083744 100644 --- a/extensions/test-extension/package.json +++ b/extensions/test-extension/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-test", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "OHIF extension used inside e2e testing", "author": "OHIF", "license": "MIT", @@ -28,9 +28,9 @@ "test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests" }, "peerDependencies": { - "@ohif/core": "3.7.0-beta.102", - "@ohif/ui": "3.7.0-beta.102", - "dcmjs": "0.29.4", + "@ohif/core": "3.8.0-beta.36", + "@ohif/ui": "3.8.0-beta.36", + "dcmjs": "0.29.11", "dicom-parser": "^1.8.9", "hammerjs": "^2.0.8", "prop-types": "^15.6.2", diff --git a/extensions/tmtv/CHANGELOG.md b/extensions/tmtv/CHANGELOG.md index 09c67d7626d..e6173f0d822 100644 --- a/extensions/tmtv/CHANGELOG.md +++ b/extensions/tmtv/CHANGELOG.md @@ -3,6 +3,372 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + + +### Bug Fixes + +* **sr:** dcm4chee requires the patient name for an SR to match what is in the original study ([#3739](https://github.com/OHIF/Viewers/issues/3739)) ([d98439f](https://github.com/OHIF/Viewers/commit/d98439fe7f3825076dbc87b664a1d1480ff414d3)) + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + + +### Bug Fixes + +* **export:** wrong export for the tmtv RT function ([#3715](https://github.com/OHIF/Viewers/issues/3715)) ([a3f2a1a](https://github.com/OHIF/Viewers/commit/a3f2a1a7b0d16bfcc0ecddc2ab731e54c5e377c8)) + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/extension-tmtv + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) diff --git a/extensions/tmtv/package.json b/extensions/tmtv/package.json index f34417686da..3adb929ba22 100644 --- a/extensions/tmtv/package.json +++ b/extensions/tmtv/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/extension-tmtv", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "OHIF extension for Total Metabolic Tumor Volume", "author": "OHIF", "license": "MIT", @@ -28,9 +28,9 @@ "test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests" }, "peerDependencies": { - "@ohif/core": "3.7.0-beta.102", - "@ohif/ui": "3.7.0-beta.102", - "dcmjs": "^0.29.5", + "@ohif/core": "3.8.0-beta.36", + "@ohif/ui": "3.8.0-beta.36", + "dcmjs": "^0.29.12", "dicom-parser": "^1.8.9", "hammerjs": "^2.0.8", "prop-types": "^15.6.2", diff --git a/extensions/tmtv/src/utils/dicomRTAnnotationExport/RTStructureSet/dicomRTAnnotationExport.js b/extensions/tmtv/src/utils/dicomRTAnnotationExport/RTStructureSet/dicomRTAnnotationExport.js index df4aa9c3cc1..c8de5524bb3 100644 --- a/extensions/tmtv/src/utils/dicomRTAnnotationExport/RTStructureSet/dicomRTAnnotationExport.js +++ b/extensions/tmtv/src/utils/dicomRTAnnotationExport/RTStructureSet/dicomRTAnnotationExport.js @@ -1,12 +1,12 @@ import dcmjs from 'dcmjs'; import { classes, DicomMetadataStore } from '@ohif/core'; -import { adaptersSEG } from '@cornerstonejs/adapters'; +import { adaptersRT } from '@cornerstonejs/adapters'; const { datasetToBlob } = dcmjs.data; const metadataProvider = classes.MetadataProvider; export default function dicomRTAnnotationExport(annotations) { - const dataset = adaptersSEG.Cornerstone3D.RTStruct.RTSS.generateRTSSFromAnnotations( + const dataset = adaptersRT.Cornerstone3D.RTSS.generateRTSSFromAnnotations( annotations, metadataProvider, DicomMetadataStore diff --git a/lerna.json b/lerna.json index 8c9d0c75121..998d265e7ff 100644 --- a/lerna.json +++ b/lerna.json @@ -1,5 +1,5 @@ { - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "packages": [ "extensions/*", "platform/*", diff --git a/modes/basic-dev-mode/CHANGELOG.md b/modes/basic-dev-mode/CHANGELOG.md index 08c44efa3ed..3aa245fad85 100644 --- a/modes/basic-dev-mode/CHANGELOG.md +++ b/modes/basic-dev-mode/CHANGELOG.md @@ -3,6 +3,370 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Features + +* **config:** Add activateViewportBeforeInteraction parameter for viewport interaction customization ([#3847](https://github.com/OHIF/Viewers/issues/3847)) ([f707b4e](https://github.com/OHIF/Viewers/commit/f707b4ebc996f379cd30337badc06b07e6e35ac5)) +* **i18n:** enhanced i18n support ([#3761](https://github.com/OHIF/Viewers/issues/3761)) ([d14a8f0](https://github.com/OHIF/Viewers/commit/d14a8f0199db95cd9e85866a011b64d6bf830d57)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/mode-basic-dev-mode + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) **Note:** Version bump only for package @ohif/mode-basic-dev-mode diff --git a/modes/basic-dev-mode/package.json b/modes/basic-dev-mode/package.json index adf09131c98..7d727fc6ce1 100644 --- a/modes/basic-dev-mode/package.json +++ b/modes/basic-dev-mode/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/mode-basic-dev-mode", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "Basic OHIF Viewer Using Cornerstone", "author": "OHIF", "license": "MIT", @@ -29,15 +29,16 @@ "test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests" }, "peerDependencies": { - "@ohif/core": "3.7.0-beta.102", - "@ohif/extension-cornerstone": "3.7.0-beta.102", - "@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.102", - "@ohif/extension-default": "3.7.0-beta.102", - "@ohif/extension-dicom-pdf": "3.7.0-beta.102", - "@ohif/extension-dicom-video": "3.7.0-beta.102" + "@ohif/core": "3.8.0-beta.36", + "@ohif/extension-cornerstone": "3.8.0-beta.36", + "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.36", + "@ohif/extension-default": "3.8.0-beta.36", + "@ohif/extension-dicom-pdf": "3.8.0-beta.36", + "@ohif/extension-dicom-video": "3.8.0-beta.36" }, "dependencies": { - "@babel/runtime": "^7.20.13" + "@babel/runtime": "^7.20.13", + "i18next": "^17.0.3" }, "devDependencies": { "webpack": "^5.50.0", diff --git a/modes/basic-dev-mode/src/index.js b/modes/basic-dev-mode/src/index.js index 411409e1f49..01513492fea 100644 --- a/modes/basic-dev-mode/src/index.js +++ b/modes/basic-dev-mode/src/index.js @@ -1,6 +1,7 @@ import toolbarButtons from './toolbarButtons.js'; import { hotkeys } from '@ohif/core'; import { id } from './id'; +import i18n from 'i18next'; const configs = { Length: {}, @@ -45,7 +46,7 @@ function modeFactory({ modeConfiguration }) { return { id, routeName: 'dev', - displayName: 'Basic Dev Viewer', + displayName: i18n.t('Modes:Basic Dev Viewer'), /** * Lifecycle hooks */ diff --git a/modes/basic-test-mode/CHANGELOG.md b/modes/basic-test-mode/CHANGELOG.md index 18619880575..3f44daed4b0 100644 --- a/modes/basic-test-mode/CHANGELOG.md +++ b/modes/basic-test-mode/CHANGELOG.md @@ -3,6 +3,376 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Features + +* **config:** Add activateViewportBeforeInteraction parameter for viewport interaction customization ([#3847](https://github.com/OHIF/Viewers/issues/3847)) ([f707b4e](https://github.com/OHIF/Viewers/commit/f707b4ebc996f379cd30337badc06b07e6e35ac5)) +* **i18n:** enhanced i18n support ([#3761](https://github.com/OHIF/Viewers/issues/3761)) ([d14a8f0](https://github.com/OHIF/Viewers/commit/d14a8f0199db95cd9e85866a011b64d6bf830d57)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + + +### Bug Fixes + +* **overlay:** Overlays aren't shown on undefined origin ([#3781](https://github.com/OHIF/Viewers/issues/3781)) ([fd1251f](https://github.com/OHIF/Viewers/commit/fd1251f751d8147b8a78c7f4d81c67ba69769afa)) + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + + +### Bug Fixes + +* **toolbar:** allow customizable toolbar for active viewport and allow active tool to be deactivated via a click ([#3608](https://github.com/OHIF/Viewers/issues/3608)) ([dd6d976](https://github.com/OHIF/Viewers/commit/dd6d9768bbca1d3cc472e8c1e6d85822500b96ef)) + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/mode-test + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/mode-test + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) **Note:** Version bump only for package @ohif/mode-test diff --git a/modes/basic-test-mode/package.json b/modes/basic-test-mode/package.json index 0e1cb50ae4e..b726b40e9cf 100644 --- a/modes/basic-test-mode/package.json +++ b/modes/basic-test-mode/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/mode-test", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "Basic mode for testing", "author": "OHIF", "license": "MIT", @@ -32,17 +32,18 @@ "test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests" }, "peerDependencies": { - "@ohif/core": "3.7.0-beta.102", - "@ohif/extension-cornerstone": "3.7.0-beta.102", - "@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.102", - "@ohif/extension-default": "3.7.0-beta.102", - "@ohif/extension-dicom-pdf": "3.7.0-beta.102", - "@ohif/extension-dicom-video": "3.7.0-beta.102", - "@ohif/extension-measurement-tracking": "3.7.0-beta.102", - "@ohif/extension-test": "3.7.0-beta.102" + "@ohif/core": "3.8.0-beta.36", + "@ohif/extension-cornerstone": "3.8.0-beta.36", + "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.36", + "@ohif/extension-default": "3.8.0-beta.36", + "@ohif/extension-dicom-pdf": "3.8.0-beta.36", + "@ohif/extension-dicom-video": "3.8.0-beta.36", + "@ohif/extension-measurement-tracking": "3.8.0-beta.36", + "@ohif/extension-test": "3.8.0-beta.36" }, "dependencies": { - "@babel/runtime": "^7.20.13" + "@babel/runtime": "^7.20.13", + "i18next": "^17.0.3" }, "devDependencies": { "webpack": "^5.50.0", diff --git a/modes/basic-test-mode/src/index.ts b/modes/basic-test-mode/src/index.ts index 3d51b06f15a..1c434217936 100644 --- a/modes/basic-test-mode/src/index.ts +++ b/modes/basic-test-mode/src/index.ts @@ -2,11 +2,17 @@ import { hotkeys } from '@ohif/core'; import toolbarButtons from './toolbarButtons'; import { id } from './id'; import initToolGroups from './initToolGroups'; +import moreTools from './moreTools'; +import moreToolsMpr from './moreToolsMpr'; +import i18n from 'i18next'; // Allow this mode by excluding non-imaging modalities such as SR, SEG // Also, SM is not a simple imaging modalities, so exclude it. const NON_IMAGE_MODALITIES = ['SM', 'ECG', 'SR', 'SEG']; +const DEFAULT_TOOL_GROUP_ID = 'default'; +const MPR_TOOL_GROUP_ID = 'mpr'; + const ohif = { layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout', sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack', @@ -58,7 +64,7 @@ function modeFactory() { // We should not be. id, routeName: 'basic-test', - displayName: 'Basic Test Mode', + displayName: i18n.t('Modes:Basic Test Mode'), /** * Lifecycle hooks */ @@ -77,21 +83,23 @@ function modeFactory() { ]); let unsubscribe; + toolbarService.setDefaultTool({ + groupId: 'WindowLevel', + itemId: 'WindowLevel', + interactionType: 'tool', + commands: [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'WindowLevel', + }, + context: 'CORNERSTONE', + }, + ], + }); const activateTool = () => { - toolbarService.recordInteraction({ - groupId: 'WindowLevel', - interactionType: 'tool', - commands: [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'WindowLevel', - }, - context: 'CORNERSTONE', - }, - ], - }); + toolbarService.recordInteraction(toolbarService.getDefaultTool()); // We don't need to reset the active tool whenever a viewport is getting // added to the toolGroup. @@ -106,8 +114,8 @@ function modeFactory() { )); toolbarService.init(extensionManager); - toolbarService.addButtons(toolbarButtons); - toolbarService.createButtonSection('primary', [ + toolbarService.addButtons([...toolbarButtons, ...moreTools, ...moreToolsMpr]); + toolbarService.createButtonSection(DEFAULT_TOOL_GROUP_ID, [ 'MeasurementTools', 'Zoom', 'WindowLevel', @@ -115,9 +123,19 @@ function modeFactory() { 'Capture', 'Layout', 'MPR', - 'Crosshairs', 'MoreTools', ]); + toolbarService.createButtonSection(MPR_TOOL_GROUP_ID, [ + 'MeasurementTools', + 'Zoom', + 'WindowLevel', + 'Pan', + 'Capture', + 'Layout', + 'MPR', + 'Crosshairs', + 'MoreToolsMpr', + ]); }, onModeExit: ({ servicesManager }) => { const { diff --git a/modes/basic-test-mode/src/initToolGroups.ts b/modes/basic-test-mode/src/initToolGroups.ts index 3110f24f885..3187e12e369 100644 --- a/modes/basic-test-mode/src/initToolGroups.ts +++ b/modes/basic-test-mode/src/initToolGroups.ts @@ -51,6 +51,7 @@ function initDefaultToolGroup(extensionManager, toolGroupService, commandsManage { toolName: toolNames.SegmentationDisplay }, ], // enabled + enabled: [{ toolName: toolNames.ImageOverlayViewer }], // disabled disabled: [{ toolName: toolNames.ReferenceLines }], }; diff --git a/modes/basic-test-mode/src/moreTools.ts b/modes/basic-test-mode/src/moreTools.ts new file mode 100644 index 00000000000..1baa17118ca --- /dev/null +++ b/modes/basic-test-mode/src/moreTools.ts @@ -0,0 +1,231 @@ +import type { RunCommand } from '@ohif/core/types'; +import { EVENTS } from '@cornerstonejs/core'; +import { ToolbarService } from '@ohif/core'; + +const ReferenceLinesCommands: RunCommand = [ + { + commandName: 'setSourceViewportForReferenceLinesTool', + context: 'CORNERSTONE', + }, + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'ReferenceLines', + }, + context: 'CORNERSTONE', + }, +]; + +const moreTools = [ + { + id: 'MoreTools', + type: 'ohif.splitButton', + props: { + isRadio: true, // ? + groupId: 'MoreTools', + primary: ToolbarService._createActionButton( + 'Reset', + 'tool-reset', + 'Reset View', + [ + { + commandName: 'resetViewport', + }, + ], + 'Reset' + ), + secondary: { + icon: 'chevron-down', + label: '', + isActive: true, + tooltip: 'More Tools', + }, + items: [ + ToolbarService._createActionButton( + 'Reset', + 'tool-reset', + 'Reset View', + [ + { + commandName: 'resetViewport', + }, + ], + 'Reset' + ), + ToolbarService._createActionButton( + 'rotate-right', + 'tool-rotate-right', + 'Rotate Right', + [ + { + commandName: 'rotateViewportCW', + commandOptions: {}, + context: 'CORNERSTONE', + }, + ], + 'Rotate +90' + ), + ToolbarService._createActionButton( + 'flip-horizontal', + 'tool-flip-horizontal', + 'Flip Horizontally', + [ + { + commandName: 'flipViewportHorizontal', + commandOptions: {}, + context: 'CORNERSTONE', + }, + ], + 'Flip Horizontally' + ), + ToolbarService._createToggleButton( + 'StackImageSync', + 'link', + 'Stack Image Sync', + [ + { + commandName: 'toggleStackImageSync', + }, + ], + 'Enable position synchronization on stack viewports', + { + listeners: { + [EVENTS.STACK_VIEWPORT_NEW_STACK]: { + commandName: 'toggleStackImageSync', + commandOptions: { toggledState: true }, + }, + }, + } + ), + ToolbarService._createToggleButton( + 'ReferenceLines', + 'tool-referenceLines', // change this with the new icon + 'Reference Lines', + ReferenceLinesCommands, + 'Show Reference Lines', + { + listeners: { + [EVENTS.STACK_VIEWPORT_NEW_STACK]: ReferenceLinesCommands, + [EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: ReferenceLinesCommands, + }, + } + ), + ToolbarService._createToolButton( + 'StackScroll', + 'tool-stack-scroll', + 'Stack Scroll', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'StackScroll', + }, + context: 'CORNERSTONE', + }, + ], + 'Stack Scroll' + ), + ToolbarService._createActionButton( + 'invert', + 'tool-invert', + 'Invert', + [ + { + commandName: 'invertViewport', + commandOptions: {}, + context: 'CORNERSTONE', + }, + ], + 'Invert Colors' + ), + ToolbarService._createToolButton( + 'Probe', + 'tool-probe', + 'Probe', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'DragProbe', + }, + context: 'CORNERSTONE', + }, + ], + 'Probe' + ), + ToolbarService._createToggleButton( + 'cine', + 'tool-cine', + 'Cine', + [ + { + commandName: 'toggleCine', + context: 'CORNERSTONE', + }, + ], + 'Cine' + ), + ToolbarService._createToolButton( + 'Angle', + 'tool-angle', + 'Angle', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'Angle', + }, + context: 'CORNERSTONE', + }, + ], + 'Angle' + ), + ToolbarService._createToolButton( + 'Magnify', + 'tool-magnify', + 'Magnify', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'Magnify', + }, + context: 'CORNERSTONE', + }, + ], + 'Magnify' + ), + ToolbarService._createToolButton( + 'Rectangle', + 'tool-rectangle', + 'Rectangle', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'RectangleROI', + }, + context: 'CORNERSTONE', + }, + ], + 'Rectangle' + ), + ToolbarService._createActionButton( + 'TagBrowser', + 'list-bullets', + 'Dicom Tag Browser', + [ + { + commandName: 'openDICOMTagViewer', + commandOptions: {}, + context: 'DEFAULT', + }, + ], + 'Dicom Tag Browser' + ), + ], + }, + }, +]; + +export default moreTools; diff --git a/modes/basic-test-mode/src/moreToolsMpr.ts b/modes/basic-test-mode/src/moreToolsMpr.ts new file mode 100644 index 00000000000..0672170a3c7 --- /dev/null +++ b/modes/basic-test-mode/src/moreToolsMpr.ts @@ -0,0 +1,142 @@ +import { ToolbarService } from '@ohif/core'; + +const moreToolsMpr = [ + { + id: 'MoreToolsMpr', + type: 'ohif.splitButton', + props: { + isRadio: true, // ? + groupId: 'MoreTools', + primary: ToolbarService._createActionButton( + 'Reset', + 'tool-reset', + 'Reset View', + [ + { + commandName: 'resetViewport', + }, + ], + 'Reset' + ), + secondary: { + icon: 'chevron-down', + label: '', + isActive: true, + tooltip: 'More Tools', + }, + items: [ + ToolbarService._createActionButton( + 'Reset', + 'tool-reset', + 'Reset View', + [ + { + commandName: 'resetViewport', + }, + ], + 'Reset' + ), + ToolbarService._createToolButton( + 'StackScroll', + 'tool-stack-scroll', + 'Stack Scroll', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'StackScroll', + }, + context: 'CORNERSTONE', + }, + ], + 'Stack Scroll' + ), + ToolbarService._createActionButton( + 'invert', + 'tool-invert', + 'Invert', + [ + { + commandName: 'invertViewport', + commandOptions: {}, + context: 'CORNERSTONE', + }, + ], + 'Invert Colors' + ), + ToolbarService._createToolButton( + 'Probe', + 'tool-probe', + 'Probe', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'DragProbe', + }, + context: 'CORNERSTONE', + }, + ], + 'Probe' + ), + ToolbarService._createToggleButton( + 'cine', + 'tool-cine', + 'Cine', + [ + { + commandName: 'toggleCine', + context: 'CORNERSTONE', + }, + ], + 'Cine' + ), + ToolbarService._createToolButton( + 'Angle', + 'tool-angle', + 'Angle', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'Angle', + }, + context: 'CORNERSTONE', + }, + ], + 'Angle' + ), + ToolbarService._createToolButton( + 'Rectangle', + 'tool-rectangle', + 'Rectangle', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'RectangleROI', + }, + context: 'CORNERSTONE', + }, + ], + 'Rectangle' + ), + ToolbarService._createActionButton( + 'TagBrowser', + 'list-bullets', + 'Dicom Tag Browser', + [ + { + commandName: 'openDICOMTagViewer', + commandOptions: {}, + context: 'DEFAULT', + }, + ], + 'Dicom Tag Browser' + ), + ], + }, + }, +]; + +export default moreToolsMpr; diff --git a/modes/basic-test-mode/src/toolbarButtons.ts b/modes/basic-test-mode/src/toolbarButtons.ts index 5d540b39c50..391aef110aa 100644 --- a/modes/basic-test-mode/src/toolbarButtons.ts +++ b/modes/basic-test-mode/src/toolbarButtons.ts @@ -5,16 +5,11 @@ import { // ListMenu, WindowLevelMenuItem, } from '@ohif/ui'; -import { defaults, ToolbarService } from '@ohif/core'; -import type { Button, RunCommand } from '@ohif/core/types'; -import { EVENTS } from '@cornerstonejs/core'; +import { ToolbarService, defaults } from '@ohif/core'; +import type { Button } from '@ohif/core/types'; const { windowLevelPresets } = defaults; -const _createActionButton = ToolbarService._createButton.bind(null, 'action'); -const _createToggleButton = ToolbarService._createButton.bind(null, 'toggle'); -const _createToolButton = ToolbarService._createButton.bind(null, 'tool'); - /** * * @param {*} preset - preset number (from above import) @@ -39,20 +34,6 @@ function _createWwwcPreset(preset, title, subtitle) { }; } -const ReferenceLinesCommands: RunCommand = [ - { - commandName: 'setSourceViewportForReferenceLinesTool', - context: 'CORNERSTONE', - }, - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'ReferenceLines', - }, - context: 'CORNERSTONE', - }, -]; - const toolbarButtons: Button[] = [ // Measurement { @@ -62,7 +43,7 @@ const toolbarButtons: Button[] = [ groupId: 'MeasurementTools', isRadio: true, // ? // Switch? - primary: _createToolButton( + primary: ToolbarService._createToolButton( 'Length', 'tool-length', 'Length', @@ -93,7 +74,7 @@ const toolbarButtons: Button[] = [ tooltip: 'More Measure Tools', }, items: [ - _createToolButton( + ToolbarService._createToolButton( 'Length', 'tool-length', 'Length', @@ -117,7 +98,7 @@ const toolbarButtons: Button[] = [ ], 'Length Tool' ), - _createToolButton( + ToolbarService._createToolButton( 'Bidirectional', 'tool-bidirectional', 'Bidirectional', @@ -140,7 +121,7 @@ const toolbarButtons: Button[] = [ ], 'Bidirectional Tool' ), - _createToolButton( + ToolbarService._createToolButton( 'ArrowAnnotate', 'tool-annotate', 'Annotation', @@ -163,7 +144,7 @@ const toolbarButtons: Button[] = [ ], 'Arrow Annotate' ), - _createToolButton( + ToolbarService._createToolButton( 'EllipticalROI', 'tool-elipse', 'Ellipse', @@ -186,7 +167,7 @@ const toolbarButtons: Button[] = [ ], 'Ellipse Tool' ), - _createToolButton( + ToolbarService._createToolButton( 'CircleROI', 'tool-circle', 'Circle', @@ -237,7 +218,7 @@ const toolbarButtons: Button[] = [ type: 'ohif.splitButton', props: { groupId: 'WindowLevel', - primary: _createToolButton( + primary: ToolbarService._createToolButton( 'WindowLevel', 'tool-window-level', 'Window Level', @@ -411,7 +392,6 @@ const toolbarButtons: Button[] = [ commandOptions: { protocolId: 'mpr', }, - context: 'DEFAULT', }, ], }, @@ -430,225 +410,10 @@ const toolbarButtons: Button[] = [ toolGroupId: 'mpr', toolName: 'Crosshairs', }, - context: 'CORNERSTONE', }, ], }, }, - // More... - { - id: 'MoreTools', - type: 'ohif.splitButton', - props: { - isRadio: true, // ? - groupId: 'MoreTools', - primary: _createActionButton( - 'Reset', - 'tool-reset', - 'Reset View', - [ - { - commandName: 'resetViewport', - commandOptions: {}, - context: 'CORNERSTONE', - }, - ], - 'Reset' - ), - secondary: { - icon: 'chevron-down', - label: '', - isActive: true, - tooltip: 'More Tools', - }, - items: [ - _createActionButton( - 'Reset', - 'tool-reset', - 'Reset View', - [ - { - commandName: 'resetViewport', - commandOptions: {}, - context: 'CORNERSTONE', - }, - ], - 'Reset' - ), - _createActionButton( - 'rotate-right', - 'tool-rotate-right', - 'Rotate Right', - [ - { - commandName: 'rotateViewportCW', - commandOptions: {}, - context: 'CORNERSTONE', - }, - ], - 'Rotate +90' - ), - _createActionButton( - 'flip-horizontal', - 'tool-flip-horizontal', - 'Flip Horizontally', - [ - { - commandName: 'flipViewportHorizontal', - commandOptions: {}, - context: 'CORNERSTONE', - }, - ], - 'Flip Horizontally' - ), - _createToggleButton( - 'StackImageSync', - 'link', - 'Stack Image Sync', - [ - { - commandName: 'toggleStackImageSync', - }, - ], - 'Enable position synchronization on stack viewports', - { - listeners: { - [EVENTS.STACK_VIEWPORT_NEW_STACK]: { - commandName: 'toggleStackImageSync', - commandOptions: { toggledState: true }, - }, - }, - } - ), - _createToggleButton( - 'ReferenceLines', - 'tool-referenceLines', // change this with the new icon - 'Reference Lines', - ReferenceLinesCommands, - 'Show Reference Lines', - { - listeners: { - [EVENTS.STACK_VIEWPORT_NEW_STACK]: ReferenceLinesCommands, - [EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: ReferenceLinesCommands, - }, - } - ), - _createToolButton( - 'StackScroll', - 'tool-stack-scroll', - 'Stack Scroll', - [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'StackScroll', - }, - context: 'CORNERSTONE', - }, - ], - 'Stack Scroll' - ), - _createActionButton( - 'invert', - 'tool-invert', - 'Invert', - [ - { - commandName: 'invertViewport', - commandOptions: {}, - context: 'CORNERSTONE', - }, - ], - 'Invert Colors' - ), - _createToolButton( - 'Probe', - 'tool-probe', - 'Probe', - [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'DragProbe', - }, - context: 'CORNERSTONE', - }, - ], - 'Probe' - ), - _createToggleButton( - 'cine', - 'tool-cine', - 'Cine', - [ - { - commandName: 'toggleCine', - context: 'CORNERSTONE', - }, - ], - 'Cine' - ), - _createToolButton( - 'Angle', - 'tool-angle', - 'Angle', - [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'Angle', - }, - context: 'CORNERSTONE', - }, - ], - 'Angle' - ), - _createToolButton( - 'Magnify', - 'tool-magnify', - 'Magnify', - [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'Magnify', - }, - context: 'CORNERSTONE', - }, - ], - 'Magnify' - ), - _createToolButton( - 'Rectangle', - 'tool-rectangle', - 'Rectangle', - [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'RectangleROI', - }, - context: 'CORNERSTONE', - }, - ], - 'Rectangle' - ), - _createActionButton( - 'TagBrowser', - 'list-bullets', - 'Dicom Tag Browser', - [ - { - commandName: 'openDICOMTagViewer', - commandOptions: {}, - context: 'DEFAULT', - }, - ], - 'Dicom Tag Browser' - ), - ], - }, - }, ]; export default toolbarButtons; diff --git a/modes/longitudinal/CHANGELOG.md b/modes/longitudinal/CHANGELOG.md index d859536548e..028b6753eed 100644 --- a/modes/longitudinal/CHANGELOG.md +++ b/modes/longitudinal/CHANGELOG.md @@ -3,6 +3,376 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Features + +* **config:** Add activateViewportBeforeInteraction parameter for viewport interaction customization ([#3847](https://github.com/OHIF/Viewers/issues/3847)) ([f707b4e](https://github.com/OHIF/Viewers/commit/f707b4ebc996f379cd30337badc06b07e6e35ac5)) +* **i18n:** enhanced i18n support ([#3761](https://github.com/OHIF/Viewers/issues/3761)) ([d14a8f0](https://github.com/OHIF/Viewers/commit/d14a8f0199db95cd9e85866a011b64d6bf830d57)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + + +### Bug Fixes + +* **toolbar:** allow customizable toolbar for active viewport and allow active tool to be deactivated via a click ([#3608](https://github.com/OHIF/Viewers/issues/3608)) ([dd6d976](https://github.com/OHIF/Viewers/commit/dd6d9768bbca1d3cc472e8c1e6d85822500b96ef)) + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + + +### Bug Fixes + +* **modules:** add stylus loader as an option to be uncommented ([#3710](https://github.com/OHIF/Viewers/issues/3710)) ([7c57f67](https://github.com/OHIF/Viewers/commit/7c57f67844b790fc6e47ac3f9708bf9d576389c8)) + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/mode-longitudinal + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) **Note:** Version bump only for package @ohif/mode-longitudinal diff --git a/modes/longitudinal/package.json b/modes/longitudinal/package.json index 5ccaf3d9c6c..d4b6ee18b69 100644 --- a/modes/longitudinal/package.json +++ b/modes/longitudinal/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/mode-longitudinal", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "Longitudinal Workflow", "author": "OHIF", "license": "MIT", @@ -32,18 +32,19 @@ "test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests" }, "peerDependencies": { - "@ohif/core": "3.7.0-beta.102", - "@ohif/extension-cornerstone": "3.7.0-beta.102", - "@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.102", - "@ohif/extension-cornerstone-dicom-seg": "3.7.0-beta.102", - "@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.102", - "@ohif/extension-default": "3.7.0-beta.102", - "@ohif/extension-dicom-pdf": "3.7.0-beta.102", - "@ohif/extension-dicom-video": "3.7.0-beta.102", - "@ohif/extension-measurement-tracking": "3.7.0-beta.102" + "@ohif/core": "3.8.0-beta.36", + "@ohif/extension-cornerstone": "3.8.0-beta.36", + "@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.36", + "@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.36", + "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.36", + "@ohif/extension-default": "3.8.0-beta.36", + "@ohif/extension-dicom-pdf": "3.8.0-beta.36", + "@ohif/extension-dicom-video": "3.8.0-beta.36", + "@ohif/extension-measurement-tracking": "3.8.0-beta.36" }, "dependencies": { - "@babel/runtime": "^7.20.13" + "@babel/runtime": "^7.20.13", + "i18next": "^17.0.3" }, "devDependencies": { "webpack": "^5.50.0", diff --git a/modes/longitudinal/src/index.js b/modes/longitudinal/src/index.js index c12219c274d..8cca53bc527 100644 --- a/modes/longitudinal/src/index.js +++ b/modes/longitudinal/src/index.js @@ -2,11 +2,17 @@ import { hotkeys } from '@ohif/core'; import toolbarButtons from './toolbarButtons'; import { id } from './id'; import initToolGroups from './initToolGroups'; +import moreTools from './moreTools'; +import moreToolsMpr from './moreToolsMpr'; +import i18n from 'i18next'; // Allow this mode by excluding non-imaging modalities such as SR, SEG // Also, SM is not a simple imaging modalities, so exclude it. const NON_IMAGE_MODALITIES = ['SM', 'ECG', 'SR', 'SEG', 'RTSTRUCT']; +const DEFAULT_TOOL_GROUP_ID = 'default'; +const MPR_TOOL_GROUP_ID = 'mpr'; + const ohif = { layout: '@ohif/extension-default.layoutTemplateModule.viewerLayout', sopClassHandler: '@ohif/extension-default.sopClassHandlerModule.stack', @@ -40,7 +46,7 @@ const dicomSeg = { panel: '@ohif/extension-cornerstone-dicom-seg.panelModule.panelSegmentation', }; -const dicomRt = { +const dicomRT = { viewport: '@ohif/extension-cornerstone-dicom-rt.viewportModule.dicom-rt', sopClassHandler: '@ohif/extension-cornerstone-dicom-rt.sopClassHandlerModule.dicom-rt', }; @@ -64,7 +70,7 @@ function modeFactory({ modeConfiguration }) { // We should not be. id, routeName: 'viewer', - displayName: 'Basic Viewer', + displayName: i18n.t('Modes:Basic Viewer'), /** * Lifecycle hooks */ @@ -83,21 +89,23 @@ function modeFactory({ modeConfiguration }) { initToolGroups(extensionManager, toolGroupService, commandsManager); let unsubscribe; + toolbarService.setDefaultTool({ + groupId: 'WindowLevel', + itemId: 'WindowLevel', + interactionType: 'tool', + commands: [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'WindowLevel', + }, + context: 'CORNERSTONE', + }, + ], + }); const activateTool = () => { - toolbarService.recordInteraction({ - groupId: 'WindowLevel', - interactionType: 'tool', - commands: [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'WindowLevel', - }, - context: 'CORNERSTONE', - }, - ], - }); + toolbarService.recordInteraction(toolbarService.getDefaultTool()); // We don't need to reset the active tool whenever a viewport is getting // added to the toolGroup. @@ -112,8 +120,8 @@ function modeFactory({ modeConfiguration }) { )); toolbarService.init(extensionManager); - toolbarService.addButtons(toolbarButtons); - toolbarService.createButtonSection('primary', [ + toolbarService.addButtons([...toolbarButtons, ...moreTools, ...moreToolsMpr]); + toolbarService.createButtonSection(DEFAULT_TOOL_GROUP_ID, [ 'MeasurementTools', 'Zoom', 'WindowLevel', @@ -121,9 +129,19 @@ function modeFactory({ modeConfiguration }) { 'Capture', 'Layout', 'MPR', - 'Crosshairs', 'MoreTools', ]); + toolbarService.createButtonSection(MPR_TOOL_GROUP_ID, [ + 'MeasurementTools', + 'Zoom', + 'WindowLevel', + 'Pan', + 'Capture', + 'Layout', + 'MPR', + 'Crosshairs', + 'MoreToolsMpr', + ]); customizationService.addModeCustomizations([ { @@ -218,8 +236,8 @@ function modeFactory({ modeConfiguration }) { displaySetsToDisplay: [dicomSeg.sopClassHandler], }, { - namespace: dicomRt.viewport, - displaySetsToDisplay: [dicomRt.sopClassHandler], + namespace: dicomRT.viewport, + displaySetsToDisplay: [dicomRT.sopClassHandler], }, ], }, @@ -240,7 +258,7 @@ function modeFactory({ modeConfiguration }) { ohif.sopClassHandler, dicompdf.sopClassHandler, dicomsr.sopClassHandler, - dicomRt.sopClassHandler, + dicomRT.sopClassHandler, ], hotkeys: [...hotkeys.defaults.hotkeyBindings], ...modeConfiguration, diff --git a/modes/longitudinal/src/moreTools.ts b/modes/longitudinal/src/moreTools.ts new file mode 100644 index 00000000000..5a20d1cbe44 --- /dev/null +++ b/modes/longitudinal/src/moreTools.ts @@ -0,0 +1,298 @@ +import type { RunCommand } from '@ohif/core/types'; +import { EVENTS } from '@cornerstonejs/core'; +import { ToolbarService } from '@ohif/core'; + +const ReferenceLinesCommands: RunCommand = [ + { + commandName: 'setSourceViewportForReferenceLinesTool', + context: 'CORNERSTONE', + }, + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'ReferenceLines', + }, + context: 'CORNERSTONE', + }, +]; + +const moreTools = [ + { + id: 'MoreTools', + type: 'ohif.splitButton', + props: { + isRadio: true, // ? + groupId: 'MoreTools', + primary: ToolbarService._createActionButton( + 'Reset', + 'tool-reset', + 'Reset View', + [ + { + commandName: 'resetViewport', + commandOptions: {}, + context: 'CORNERSTONE', + }, + ], + 'Reset' + ), + secondary: { + icon: 'chevron-down', + label: '', + isActive: true, + tooltip: 'More Tools', + }, + items: [ + ToolbarService._createActionButton( + 'Reset', + 'tool-reset', + 'Reset View', + [ + { + commandName: 'resetViewport', + commandOptions: {}, + context: 'CORNERSTONE', + }, + ], + 'Reset' + ), + ToolbarService._createActionButton( + 'rotate-right', + 'tool-rotate-right', + 'Rotate Right', + [ + { + commandName: 'rotateViewportCW', + commandOptions: {}, + context: 'CORNERSTONE', + }, + ], + 'Rotate +90' + ), + ToolbarService._createActionButton( + 'flip-horizontal', + 'tool-flip-horizontal', + 'Flip Horizontally', + [ + { + commandName: 'flipViewportHorizontal', + commandOptions: {}, + context: 'CORNERSTONE', + }, + ], + 'Flip Horizontal' + ), + ToolbarService._createToggleButton( + 'StackImageSync', + 'link', + 'Stack Image Sync', + [ + { + commandName: 'toggleStackImageSync', + }, + ], + 'Enable position synchronization on stack viewports', + { + listeners: { + [EVENTS.STACK_VIEWPORT_NEW_STACK]: { + commandName: 'toggleStackImageSync', + commandOptions: { toggledState: true }, + }, + }, + } + ), + ToolbarService._createToggleButton( + 'ReferenceLines', + 'tool-referenceLines', // change this with the new icon + 'Reference Lines', + ReferenceLinesCommands, + 'Show Reference Lines', + { + listeners: { + [EVENTS.STACK_VIEWPORT_NEW_STACK]: ReferenceLinesCommands, + [EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: ReferenceLinesCommands, + }, + } + ), + ToolbarService._createToggleButton( + 'ImageOverlayViewer', + 'toggle-dicom-overlay', + 'Image Overlay', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'ImageOverlayViewer', + }, + context: 'CORNERSTONE', + }, + ], + 'Image Overlay', + { isActive: true } + ), + ToolbarService._createToolButton( + 'StackScroll', + 'tool-stack-scroll', + 'Stack Scroll', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'StackScroll', + }, + context: 'CORNERSTONE', + }, + ], + 'Stack Scroll' + ), + ToolbarService._createActionButton( + 'invert', + 'tool-invert', + 'Invert', + [ + { + commandName: 'invertViewport', + commandOptions: {}, + context: 'CORNERSTONE', + }, + ], + 'Invert Colors' + ), + ToolbarService._createToolButton( + 'Probe', + 'tool-probe', + 'Probe', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'DragProbe', + }, + context: 'CORNERSTONE', + }, + ], + 'Probe' + ), + ToolbarService._createToggleButton( + 'cine', + 'tool-cine', + 'Cine', + [ + { + commandName: 'toggleCine', + context: 'CORNERSTONE', + }, + ], + 'Cine' + ), + ToolbarService._createToolButton( + 'Angle', + 'tool-angle', + 'Angle', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'Angle', + }, + context: 'CORNERSTONE', + }, + ], + 'Angle' + ), + + // Next two tools can be added once icons are added + // ToolbarService._createToolButton( + // 'Cobb Angle', + // 'tool-cobb-angle', + // 'Cobb Angle', + // [ + // { + // commandName: 'setToolActive', + // commandOptions: { + // toolName: 'CobbAngle', + // }, + // context: 'CORNERSTONE', + // }, + // ], + // 'Cobb Angle' + // ), + // ToolbarService._createToolButton( + // 'Planar Freehand ROI', + // 'tool-freehand', + // 'PlanarFreehandROI', + // [ + // { + // commandName: 'setToolActive', + // commandOptions: { + // toolName: 'PlanarFreehandROI', + // }, + // context: 'CORNERSTONE', + // }, + // ], + // 'Planar Freehand ROI' + // ), + ToolbarService._createToolButton( + 'Magnify', + 'tool-magnify', + 'Magnify', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'Magnify', + }, + context: 'CORNERSTONE', + }, + ], + 'Magnify' + ), + ToolbarService._createToolButton( + 'Rectangle', + 'tool-rectangle', + 'Rectangle', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'RectangleROI', + }, + context: 'CORNERSTONE', + }, + ], + 'Rectangle' + ), + ToolbarService._createToolButton( + 'CalibrationLine', + 'tool-calibration', + 'Calibration', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'CalibrationLine', + }, + context: 'CORNERSTONE', + }, + ], + 'Calibration Line' + ), + ToolbarService._createActionButton( + 'TagBrowser', + 'list-bullets', + 'Dicom Tag Browser', + [ + { + commandName: 'openDICOMTagViewer', + commandOptions: {}, + context: 'DEFAULT', + }, + ], + 'Dicom Tag Browser' + ), + ], + }, + }, +]; + +export default moreTools; diff --git a/modes/longitudinal/src/moreToolsMpr.ts b/modes/longitudinal/src/moreToolsMpr.ts new file mode 100644 index 00000000000..7930068dca0 --- /dev/null +++ b/modes/longitudinal/src/moreToolsMpr.ts @@ -0,0 +1,242 @@ +import type { RunCommand } from '@ohif/core/types'; +import { EVENTS } from '@cornerstonejs/core'; +import { ToolbarService } from '@ohif/core'; + +const ReferenceLinesCommands: RunCommand = [ + { + commandName: 'setSourceViewportForReferenceLinesTool', + context: 'CORNERSTONE', + }, + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'ReferenceLines', + }, + context: 'CORNERSTONE', + }, +]; + +const moreToolsMpr = [ + { + id: 'MoreToolsMpr', + type: 'ohif.splitButton', + props: { + isRadio: true, // ? + groupId: 'MoreTools', + primary: ToolbarService._createActionButton( + 'Reset', + 'tool-reset', + 'Reset View', + [ + { + commandName: 'resetViewport', + commandOptions: {}, + context: 'CORNERSTONE', + }, + ], + 'Reset' + ), + secondary: { + icon: 'chevron-down', + label: '', + isActive: true, + tooltip: 'More Tools', + }, + items: [ + ToolbarService._createActionButton( + 'Reset', + 'tool-reset', + 'Reset View', + [ + { + commandName: 'resetViewport', + commandOptions: {}, + context: 'CORNERSTONE', + }, + ], + 'Reset' + ), + ToolbarService._createToggleButton( + 'StackImageSync', + 'link', + 'Stack Image Sync', + [ + { + commandName: 'toggleStackImageSync', + }, + ], + 'Enable position synchronization on stack viewports', + { + listeners: { + [EVENTS.STACK_VIEWPORT_NEW_STACK]: { + commandName: 'toggleStackImageSync', + commandOptions: { toggledState: true }, + }, + }, + } + ), + ToolbarService._createToggleButton( + 'ReferenceLines', + 'tool-referenceLines', // change this with the new icon + 'Reference Lines', + ReferenceLinesCommands, + 'Show Reference Lines', + { + listeners: { + [EVENTS.STACK_VIEWPORT_NEW_STACK]: ReferenceLinesCommands, + [EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: ReferenceLinesCommands, + }, + } + ), + ToolbarService._createToggleButton( + 'ImageOverlayViewer', + 'toggle-dicom-overlay', + 'Image Overlay', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'ImageOverlayViewer', + }, + context: 'CORNERSTONE', + }, + ], + 'Image Overlay', + { isActive: true } + ), + ToolbarService._createToolButton( + 'StackScroll', + 'tool-stack-scroll', + 'Stack Scroll', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'StackScroll', + }, + context: 'CORNERSTONE', + }, + ], + 'Stack Scroll' + ), + ToolbarService._createActionButton( + 'invert', + 'tool-invert', + 'Invert', + [ + { + commandName: 'invertViewport', + commandOptions: {}, + context: 'CORNERSTONE', + }, + ], + 'Invert Colors' + ), + ToolbarService._createToolButton( + 'Probe', + 'tool-probe', + 'Probe', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'DragProbe', + }, + context: 'CORNERSTONE', + }, + ], + 'Probe' + ), + ToolbarService._createToggleButton( + 'cine', + 'tool-cine', + 'Cine', + [ + { + commandName: 'toggleCine', + context: 'CORNERSTONE', + }, + ], + 'Cine' + ), + ToolbarService._createToolButton( + 'Angle', + 'tool-angle', + 'Angle', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'Angle', + }, + context: 'CORNERSTONE', + }, + ], + 'Angle' + ), + + // Next two tools can be added once icons are added + // ToolbarService._createToolButton( + // 'Cobb Angle', + // 'tool-cobb-angle', + // 'Cobb Angle', + // [ + // { + // commandName: 'setToolActive', + // commandOptions: { + // toolName: 'CobbAngle', + // }, + // context: 'CORNERSTONE', + // }, + // ], + // 'Cobb Angle' + // ), + // ToolbarService._createToolButton( + // 'Planar Freehand ROI', + // 'tool-freehand', + // 'PlanarFreehandROI', + // [ + // { + // commandName: 'setToolActive', + // commandOptions: { + // toolName: 'PlanarFreehandROI', + // }, + // context: 'CORNERSTONE', + // }, + // ], + // 'Planar Freehand ROI' + // ), + ToolbarService._createToolButton( + 'Rectangle', + 'tool-rectangle', + 'Rectangle', + [ + { + commandName: 'setToolActive', + commandOptions: { + toolName: 'RectangleROI', + }, + context: 'CORNERSTONE', + }, + ], + 'Rectangle' + ), + ToolbarService._createActionButton( + 'TagBrowser', + 'list-bullets', + 'Dicom Tag Browser', + [ + { + commandName: 'openDICOMTagViewer', + commandOptions: {}, + context: 'DEFAULT', + }, + ], + 'Dicom Tag Browser' + ), + ], + }, + }, +]; + +export default moreToolsMpr; diff --git a/modes/longitudinal/src/toolbarButtons.ts b/modes/longitudinal/src/toolbarButtons.ts index e7842c56521..2237edd2b36 100644 --- a/modes/longitudinal/src/toolbarButtons.ts +++ b/modes/longitudinal/src/toolbarButtons.ts @@ -6,15 +6,10 @@ import { WindowLevelMenuItem, } from '@ohif/ui'; import { defaults, ToolbarService } from '@ohif/core'; -import type { Button, RunCommand } from '@ohif/core/types'; -import { EVENTS } from '@cornerstonejs/core'; +import type { Button } from '@ohif/core/types'; const { windowLevelPresets } = defaults; -const _createActionButton = ToolbarService._createButton.bind(null, 'action'); -const _createToggleButton = ToolbarService._createButton.bind(null, 'toggle'); -const _createToolButton = ToolbarService._createButton.bind(null, 'tool'); - /** * * @param {*} preset - preset number (from above import) @@ -59,20 +54,6 @@ function _createSetToolActiveCommands(toolName) { return temp; } -const ReferenceLinesCommands: RunCommand = [ - { - commandName: 'setSourceViewportForReferenceLinesTool', - context: 'CORNERSTONE', - }, - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'ReferenceLines', - }, - context: 'CORNERSTONE', - }, -]; - const toolbarButtons: Button[] = [ // Measurement { @@ -82,7 +63,7 @@ const toolbarButtons: Button[] = [ groupId: 'MeasurementTools', isRadio: true, // ? // Switch? - primary: _createToolButton( + primary: ToolbarService._createToolButton( 'Length', 'tool-length', 'Length', @@ -113,7 +94,7 @@ const toolbarButtons: Button[] = [ tooltip: 'More Measure Tools', }, items: [ - _createToolButton( + ToolbarService._createToolButton( 'Length', 'tool-length', 'Length', @@ -137,7 +118,7 @@ const toolbarButtons: Button[] = [ ], 'Length Tool' ), - _createToolButton( + ToolbarService._createToolButton( 'Bidirectional', 'tool-bidirectional', 'Bidirectional', @@ -160,7 +141,7 @@ const toolbarButtons: Button[] = [ ], 'Bidirectional Tool' ), - _createToolButton( + ToolbarService._createToolButton( 'ArrowAnnotate', 'tool-annotate', 'Annotation', @@ -183,7 +164,7 @@ const toolbarButtons: Button[] = [ ], 'Arrow Annotate' ), - _createToolButton( + ToolbarService._createToolButton( 'EllipticalROI', 'tool-elipse', 'Ellipse', @@ -206,7 +187,7 @@ const toolbarButtons: Button[] = [ ], 'Ellipse Tool' ), - _createToolButton( + ToolbarService._createToolButton( 'CircleROI', 'tool-circle', 'Circle', @@ -249,7 +230,7 @@ const toolbarButtons: Button[] = [ type: 'ohif.splitButton', props: { groupId: 'WindowLevel', - primary: _createToolButton( + primary: ToolbarService._createToolButton( 'WindowLevel', 'tool-window-level', 'Window Level', @@ -354,282 +335,6 @@ const toolbarButtons: Button[] = [ }, }, // More... - { - id: 'MoreTools', - type: 'ohif.splitButton', - props: { - isRadio: true, // ? - groupId: 'MoreTools', - primary: _createActionButton( - 'Reset', - 'tool-reset', - 'Reset View', - [ - { - commandName: 'resetViewport', - commandOptions: {}, - context: 'CORNERSTONE', - }, - ], - 'Reset' - ), - secondary: { - icon: 'chevron-down', - label: '', - isActive: true, - tooltip: 'More Tools', - }, - items: [ - _createActionButton( - 'Reset', - 'tool-reset', - 'Reset View', - [ - { - commandName: 'resetViewport', - commandOptions: {}, - context: 'CORNERSTONE', - }, - ], - 'Reset' - ), - _createActionButton( - 'rotate-right', - 'tool-rotate-right', - 'Rotate Right', - [ - { - commandName: 'rotateViewportCW', - commandOptions: {}, - context: 'CORNERSTONE', - }, - ], - 'Rotate +90' - ), - _createActionButton( - 'flip-horizontal', - 'tool-flip-horizontal', - 'Flip Horizontally', - [ - { - commandName: 'flipViewportHorizontal', - commandOptions: {}, - context: 'CORNERSTONE', - }, - ], - 'Flip Horizontal' - ), - _createToggleButton( - 'StackImageSync', - 'link', - 'Stack Image Sync', - [ - { - commandName: 'toggleStackImageSync', - }, - ], - 'Enable position synchronization on stack viewports', - { - listeners: { - [EVENTS.STACK_VIEWPORT_NEW_STACK]: { - commandName: 'toggleStackImageSync', - commandOptions: { toggledState: true }, - }, - }, - } - ), - _createToggleButton( - 'ReferenceLines', - 'tool-referenceLines', // change this with the new icon - 'Reference Lines', - ReferenceLinesCommands, - 'Show Reference Lines', - { - listeners: { - [EVENTS.STACK_VIEWPORT_NEW_STACK]: ReferenceLinesCommands, - [EVENTS.ACTIVE_VIEWPORT_ID_CHANGED]: ReferenceLinesCommands, - }, - } - ), - _createToggleButton( - 'ImageOverlayViewer', - 'toggle-dicom-overlay', - 'Image Overlay', - [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'ImageOverlayViewer', - }, - context: 'CORNERSTONE', - }, - ], - 'Image Overlay', - { isActive: true } - ), - _createToolButton( - 'StackScroll', - 'tool-stack-scroll', - 'Stack Scroll', - [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'StackScroll', - }, - context: 'CORNERSTONE', - }, - ], - 'Stack Scroll' - ), - _createActionButton( - 'invert', - 'tool-invert', - 'Invert', - [ - { - commandName: 'invertViewport', - commandOptions: {}, - context: 'CORNERSTONE', - }, - ], - 'Invert Colors' - ), - _createToolButton( - 'Probe', - 'tool-probe', - 'Probe', - [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'DragProbe', - }, - context: 'CORNERSTONE', - }, - ], - 'Probe' - ), - _createToggleButton( - 'cine', - 'tool-cine', - 'Cine', - [ - { - commandName: 'toggleCine', - context: 'CORNERSTONE', - }, - ], - 'Cine' - ), - _createToolButton( - 'Angle', - 'tool-angle', - 'Angle', - [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'Angle', - }, - context: 'CORNERSTONE', - }, - ], - 'Angle' - ), - - // Next two tools can be added once icons are added - // _createToolButton( - // 'Cobb Angle', - // 'tool-cobb-angle', - // 'Cobb Angle', - // [ - // { - // commandName: 'setToolActive', - // commandOptions: { - // toolName: 'CobbAngle', - // }, - // context: 'CORNERSTONE', - // }, - // ], - // 'Cobb Angle' - // ), - // _createToolButton( - // 'Planar Freehand ROI', - // 'tool-freehand', - // 'PlanarFreehandROI', - // [ - // { - // commandName: 'setToolActive', - // commandOptions: { - // toolName: 'PlanarFreehandROI', - // }, - // context: 'CORNERSTONE', - // }, - // ], - // 'Planar Freehand ROI' - // ), - _createToolButton( - 'Magnify', - 'tool-magnify', - 'Magnify', - [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'Magnify', - }, - context: 'CORNERSTONE', - }, - ], - 'Magnify' - ), - _createToolButton( - 'Rectangle', - 'tool-rectangle', - 'Rectangle', - [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'RectangleROI', - }, - context: 'CORNERSTONE', - }, - ], - 'Rectangle' - ), - _createToolButton( - 'CalibrationLine', - 'tool-calibration', - 'Calibration', - [ - { - commandName: 'setToolActive', - commandOptions: { - toolName: 'CalibrationLine', - }, - context: 'CORNERSTONE', - }, - ], - 'Calibration Line' - ), - _createActionButton( - 'TagBrowser', - 'list-bullets', - 'Dicom Tag Browser', - [ - { - commandName: 'openDICOMTagViewer', - commandOptions: {}, - context: 'DEFAULT', - }, - ], - 'Dicom Tag Browser' - ), - ], - }, - }, ]; export default toolbarButtons; diff --git a/modes/microscopy/CHANGELOG.md b/modes/microscopy/CHANGELOG.md index 33327a767fa..111065617d8 100644 --- a/modes/microscopy/CHANGELOG.md +++ b/modes/microscopy/CHANGELOG.md @@ -3,6 +3,370 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Features + +* **config:** Add activateViewportBeforeInteraction parameter for viewport interaction customization ([#3847](https://github.com/OHIF/Viewers/issues/3847)) ([f707b4e](https://github.com/OHIF/Viewers/commit/f707b4ebc996f379cd30337badc06b07e6e35ac5)) +* **i18n:** enhanced i18n support ([#3761](https://github.com/OHIF/Viewers/issues/3761)) ([d14a8f0](https://github.com/OHIF/Viewers/commit/d14a8f0199db95cd9e85866a011b64d6bf830d57)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/mode-microscopy + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) **Note:** Version bump only for package @ohif/mode-microscopy diff --git a/modes/microscopy/package.json b/modes/microscopy/package.json index c7aeb139e58..12187499236 100644 --- a/modes/microscopy/package.json +++ b/modes/microscopy/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/mode-microscopy", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "OHIF mode for DICOM microscopy", "author": "OHIF", "license": "MIT", @@ -33,10 +33,11 @@ "test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests" }, "peerDependencies": { - "@ohif/core": "3.7.0-beta.102", - "@ohif/extension-dicom-microscopy": "3.7.0-beta.102" + "@ohif/core": "3.8.0-beta.36", + "@ohif/extension-dicom-microscopy": "3.8.0-beta.36" }, "dependencies": { - "@babel/runtime": "^7.20.13" + "@babel/runtime": "^7.20.13", + "i18next": "^17.0.3" } } diff --git a/modes/microscopy/src/index.tsx b/modes/microscopy/src/index.tsx index 5f170ca265d..7165b7cc39c 100644 --- a/modes/microscopy/src/index.tsx +++ b/modes/microscopy/src/index.tsx @@ -1,4 +1,5 @@ import { hotkeys } from '@ohif/core'; +import i18n from 'i18next'; import { id } from './id'; import toolbarButtons from './toolbarButtons'; @@ -41,7 +42,7 @@ function modeFactory({ modeConfiguration }) { // We should not be. id, routeName: 'microscopy', - displayName: 'Microscopy', + displayName: i18n.t('Modes:Microscopy'), /** * Lifecycle hooks diff --git a/modes/segmentation/.prettierrc b/modes/segmentation/.prettierrc new file mode 100644 index 00000000000..28448abdf42 --- /dev/null +++ b/modes/segmentation/.prettierrc @@ -0,0 +1,11 @@ +{ + "trailingComma": "es5", + "printWidth": 100, + "proseWrap": "always", + "tabWidth": 2, + "semi": true, + "singleQuote": true, + "arrowParens": "avoid", + "singleAttributePerLine": true, + "endOfLine": "auto" +} diff --git a/modes/segmentation/CHANGELOG.md b/modes/segmentation/CHANGELOG.md index 5c2fa7e361c..ef00a6096f5 100644 --- a/modes/segmentation/CHANGELOG.md +++ b/modes/segmentation/CHANGELOG.md @@ -3,6 +3,381 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Bug Fixes + +* address and improve system vulnerabilities ([#3851](https://github.com/OHIF/Viewers/issues/3851)) ([805c532](https://github.com/OHIF/Viewers/commit/805c53270f243ec61f142a3ffa0af500021cd5ec)) + + +### Features + +* **config:** Add activateViewportBeforeInteraction parameter for viewport interaction customization ([#3847](https://github.com/OHIF/Viewers/issues/3847)) ([f707b4e](https://github.com/OHIF/Viewers/commit/f707b4ebc996f379cd30337badc06b07e6e35ac5)) +* **i18n:** enhanced i18n support ([#3761](https://github.com/OHIF/Viewers/issues/3761)) ([d14a8f0](https://github.com/OHIF/Viewers/commit/d14a8f0199db95cd9e85866a011b64d6bf830d57)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + + +### Bug Fixes + +* **SM:** drag and drop is now fixed for SM ([#3813](https://github.com/OHIF/Viewers/issues/3813)) ([f1a6764](https://github.com/OHIF/Viewers/commit/f1a67647aed635437b188cea7cf5d5a8fb974bbe)) + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + + +### Bug Fixes + +* **modules:** add stylus loader as an option to be uncommented ([#3710](https://github.com/OHIF/Viewers/issues/3710)) ([7c57f67](https://github.com/OHIF/Viewers/commit/7c57f67844b790fc6e47ac3f9708bf9d576389c8)) + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/mode-segmentation + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) **Note:** Version bump only for package @ohif/mode-segmentation diff --git a/modes/segmentation/package.json b/modes/segmentation/package.json index 50066c202ce..e4e389ca472 100644 --- a/modes/segmentation/package.json +++ b/modes/segmentation/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/mode-segmentation", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "OHIF segmentation mode which enables labelmap segmentation read/edit/export", "author": "@ohif", "license": "MIT", @@ -33,25 +33,26 @@ "test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests" }, "peerDependencies": { - "@ohif/core": "3.7.0-beta.102" + "@ohif/core": "3.8.0-beta.36" }, "dependencies": { - "@babel/runtime": "^7.20.13" + "@babel/runtime": "^7.20.13", + "i18next": "^17.0.3" }, "devDependencies": { - "@babel/core": "^7.21.4", + "@babel/core": "^7.23.2", "@babel/plugin-proposal-class-properties": "^7.16.7", "@babel/plugin-proposal-object-rest-spread": "^7.17.3", "@babel/plugin-proposal-private-methods": "^7.18.6", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-transform-arrow-functions": "^7.16.7", "@babel/plugin-transform-regenerator": "^7.16.7", - "@babel/plugin-transform-runtime": "^7.17.0", + "@babel/plugin-transform-runtime": "^7.23.2", "@babel/plugin-transform-typescript": "^7.13.0", - "@babel/preset-env": "^7.16.11", + "@babel/preset-env": "7.23.2", "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.13.0", - "babel-eslint": "^8.0.3", + "babel-eslint": "^10.1.0", "babel-loader": "^8.0.0-beta.4", "babel-plugin-inline-react-svg": "^2.0.1", "clean-webpack-plugin": "^4.0.0", diff --git a/modes/segmentation/src/index.tsx b/modes/segmentation/src/index.tsx index a6f552c5aee..8b24196f161 100644 --- a/modes/segmentation/src/index.tsx +++ b/modes/segmentation/src/index.tsx @@ -120,9 +120,19 @@ function modeFactory({ modeConfiguration }) { }, /** * A boolean return value that indicates whether the mode is valid for the - * modalities of the selected studies. For instance a PET/CT mode should be + * modalities of the selected studies. Currently we don't have stack viewport + * segmentations and we should exclude them */ - isValidMode: ({ modalities }) => true, + isValidMode: ({ modalities }) => { + // Don't show the mode if the selected studies have only one modality + // that is not supported by the mode + const modalitiesArray = modalities.split('\\'); + if (modalitiesArray.length === 1) { + return !['SM', 'US', 'MG', 'OT', 'DOC', 'CR'].includes(modalitiesArray[0]); + } + + return true; + }, /** * Mode Routes are used to define the mode's behavior. A list of Mode Route * that includes the mode's path and the layout to be used. The layout will diff --git a/modes/tmtv/CHANGELOG.md b/modes/tmtv/CHANGELOG.md index 2e02239448f..9bc5629a1d5 100644 --- a/modes/tmtv/CHANGELOG.md +++ b/modes/tmtv/CHANGELOG.md @@ -3,6 +3,373 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Features + +* **config:** Add activateViewportBeforeInteraction parameter for viewport interaction customization ([#3847](https://github.com/OHIF/Viewers/issues/3847)) ([f707b4e](https://github.com/OHIF/Viewers/commit/f707b4ebc996f379cd30337badc06b07e6e35ac5)) +* **i18n:** enhanced i18n support ([#3761](https://github.com/OHIF/Viewers/issues/3761)) ([d14a8f0](https://github.com/OHIF/Viewers/commit/d14a8f0199db95cd9e85866a011b64d6bf830d57)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + + +### Bug Fixes + +* **segmentation:** Various fixes for segmentation mode and other ([#3709](https://github.com/OHIF/Viewers/issues/3709)) ([a9a6ad5](https://github.com/OHIF/Viewers/commit/a9a6ad50eae67b43b8b34efc07182d788cacdcfe)) + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/mode-tmtv + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) **Note:** Version bump only for package @ohif/mode-tmtv diff --git a/modes/tmtv/package.json b/modes/tmtv/package.json index 0ab72f14076..cfdf780f8ac 100644 --- a/modes/tmtv/package.json +++ b/modes/tmtv/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/mode-tmtv", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "Total Metabolic Tumor Volume Workflow", "author": "OHIF", "license": "MIT", @@ -32,16 +32,17 @@ "test:unit:ci": "jest --ci --runInBand --collectCoverage --passWithNoTests" }, "peerDependencies": { - "@ohif/core": "3.7.0-beta.102", - "@ohif/extension-cornerstone": "3.7.0-beta.102", - "@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.102", - "@ohif/extension-default": "3.7.0-beta.102", - "@ohif/extension-dicom-pdf": "3.7.0-beta.102", - "@ohif/extension-dicom-video": "3.7.0-beta.102", - "@ohif/extension-measurement-tracking": "3.7.0-beta.102" + "@ohif/core": "3.8.0-beta.36", + "@ohif/extension-cornerstone": "3.8.0-beta.36", + "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.36", + "@ohif/extension-default": "3.8.0-beta.36", + "@ohif/extension-dicom-pdf": "3.8.0-beta.36", + "@ohif/extension-dicom-video": "3.8.0-beta.36", + "@ohif/extension-measurement-tracking": "3.8.0-beta.36" }, "dependencies": { - "@babel/runtime": "^7.20.13" + "@babel/runtime": "^7.20.13", + "i18next": "^17.0.3" }, "devDependencies": { "webpack": "^5.50.0", diff --git a/modes/tmtv/src/index.js b/modes/tmtv/src/index.js index 110fb0fb753..dd57be35e06 100644 --- a/modes/tmtv/src/index.js +++ b/modes/tmtv/src/index.js @@ -4,6 +4,7 @@ import { id } from './id.js'; import initToolGroups, { toolGroupIds } from './initToolGroups.js'; import setCrosshairsConfiguration from './utils/setCrosshairsConfiguration.js'; import setFusionActiveVolume from './utils/setFusionActiveVolume.js'; +import i18n from 'i18next'; const { MetadataProvider } = classes; @@ -38,7 +39,7 @@ function modeFactory({ modeConfiguration }) { // We should not be. id, routeName: 'tmtv', - displayName: 'Total Metabolic Tumor Volume', + displayName: i18n.t('Modes:Total Metabolic Tumor Volume'), /** * Lifecycle hooks */ diff --git a/modes/tmtv/src/toolbarButtons.js b/modes/tmtv/src/toolbarButtons.js index 6e336d4f83c..556e2172845 100644 --- a/modes/tmtv/src/toolbarButtons.js +++ b/modes/tmtv/src/toolbarButtons.js @@ -165,20 +165,6 @@ const toolbarButtons = [ ], 'Ellipse Tool' ), - _createToolButton( - 'CircleROI', - 'tool-circle', - 'Circle', - [ - ..._createCommands('setToolActive', 'CircleROI', [ - toolGroupIds.CT, - toolGroupIds.PT, - toolGroupIds.Fusion, - // toolGroupIds.MPR, - ]), - ], - 'Circle Tool' - ), ], }, }, diff --git a/package.json b/package.json index d562f6b6cd1..611ecebfaa0 100644 --- a/package.json +++ b/package.json @@ -39,11 +39,11 @@ "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 platform/app/.recipes/Nginx-Orthanc/docker-compose.yml up", + "orthanc:up": "docker-compose -f platform/app/.recipes/OpenResty-Orthanc/docker-compose.yml up", "preinstall": "node preinstall.js", "start": "yarn run dev", "test": "yarn run test:unit", - "test:data": "git submodule update --init", + "test:data": "git submodule update --init -r", "test-watch": "jest --collectCoverage --watchAll", "test:unit": "jest --collectCoverage", "test:unit:ci": "lerna run test:unit:ci --parallel --stream", @@ -71,7 +71,7 @@ "react-dom": "17.0.2" }, "devDependencies": { - "@babel/core": "^7.21.4", + "@babel/core": "^7.23.2", "@babel/plugin-proposal-class-properties": "^7.16.7", "@babel/plugin-proposal-object-rest-spread": "^7.17.3", "@babel/plugin-proposal-private-methods": "^7.18.6", @@ -79,9 +79,9 @@ "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-transform-arrow-functions": "^7.16.7", "@babel/plugin-transform-regenerator": "^7.16.7", - "@babel/plugin-transform-runtime": "^7.17.0", + "@babel/plugin-transform-runtime": "^7.23.2", "@babel/plugin-transform-typescript": "^7.13.0", - "@babel/preset-env": "^7.16.11", + "@babel/preset-env": "^7.23.2", "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.13.0", "@types/jest": "^27.5.0", @@ -136,6 +136,8 @@ "source-map-loader": "^4.0.1", "start-server-and-test": "^1.10.0", "style-loader": "^1.0.0", + "stylus": "^0.59.0", + "stylus-loader": "^7.1.3", "terser-webpack-plugin": "^5.1.4", "typescript": "4.6.4", "unused-webpack-plugin": "2.4.0", @@ -165,6 +167,7 @@ "trim-newlines": "^5.0.0", "glob-parent": "^6.0.2", "trim": "^1.0.0", - "package-json": "^8.1.0" + "package-json": "^8.1.0", + "sharp": "^0.32.6" } } diff --git a/platform/app/.webpack/rules/extractStyleChunks.js b/platform/app/.webpack/rules/extractStyleChunks.js index 94388a353dd..f7c467fc631 100644 --- a/platform/app/.webpack/rules/extractStyleChunks.js +++ b/platform/app/.webpack/rules/extractStyleChunks.js @@ -2,6 +2,20 @@ const ExtractCssChunksPlugin = require('extract-css-chunks-webpack-plugin'); function extractStyleChunks(isProdBuild) { return [ + // 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/.webpack/webpack.pwa.js b/platform/app/.webpack/webpack.pwa.js index af0b70b445e..c07fdfb366c 100644 --- a/platform/app/.webpack/webpack.pwa.js +++ b/platform/app/.webpack/webpack.pwa.js @@ -154,7 +154,7 @@ module.exports = (env, argv) => { { directory: '../../testdata', staticOptions: { - extensions: ['gz', 'br'], + extensions: ['gz', 'br', 'mht'], index: ['index.json.gz', 'index.mht.gz'], redirect: true, setHeaders, @@ -166,6 +166,7 @@ module.exports = (env, argv) => { //writeToDisk: true, historyApiFallback: { disableDotRule: true, + index: PUBLIC_URL + 'index.html', }, headers: { 'Cross-Origin-Embedder-Policy': 'require-corp', diff --git a/platform/app/CHANGELOG.md b/platform/app/CHANGELOG.md index 5ea5fd3f743..b41a36a478b 100644 --- a/platform/app/CHANGELOG.md +++ b/platform/app/CHANGELOG.md @@ -3,6 +3,406 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Features + +* **config:** Add activateViewportBeforeInteraction parameter for viewport interaction customization ([#3847](https://github.com/OHIF/Viewers/issues/3847)) ([f707b4e](https://github.com/OHIF/Viewers/commit/f707b4ebc996f379cd30337badc06b07e6e35ac5)) +* **i18n:** enhanced i18n support ([#3761](https://github.com/OHIF/Viewers/issues/3761)) ([d14a8f0](https://github.com/OHIF/Viewers/commit/d14a8f0199db95cd9e85866a011b64d6bf830d57)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + + +### Bug Fixes + +* **auth:** fix the issue with oauth at a non root path ([#3840](https://github.com/OHIF/Viewers/issues/3840)) ([6651008](https://github.com/OHIF/Viewers/commit/6651008fbb35dabd5991c7f61128e6ef324012df)) + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + + +### Bug Fixes + +* Update the CS3D packages to add the most recent HTJ2K TSUIDS ([#3806](https://github.com/OHIF/Viewers/issues/3806)) ([9d1884d](https://github.com/OHIF/Viewers/commit/9d1884d7d8b6b2a1cdc26965a96995838aa72682)) + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + + +### Bug Fixes + +* **DICOM Overlay:** The overlay data wasn't being refreshed on change ([#3793](https://github.com/OHIF/Viewers/issues/3793)) ([00e7519](https://github.com/OHIF/Viewers/commit/00e751933ac6d611a34773fa69594243f1b99082)) + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + + +### Bug Fixes + +* **overlay:** Overlays aren't shown on undefined origin ([#3781](https://github.com/OHIF/Viewers/issues/3781)) ([fd1251f](https://github.com/OHIF/Viewers/commit/fd1251f751d8147b8a78c7f4d81c67ba69769afa)) + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + + +### Bug Fixes + +* **thumbnail:** Avoid multiple promise creations for thumbnails ([#3756](https://github.com/OHIF/Viewers/issues/3756)) ([b23eeff](https://github.com/OHIF/Viewers/commit/b23eeff93745769e67e60c33d75293d6242c5ec9)) + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + + +### Features + +* **i18n:** enhanced i18n support ([#3730](https://github.com/OHIF/Viewers/issues/3730)) ([330e11c](https://github.com/OHIF/Viewers/commit/330e11c7ff0151e1096e19b8ffdae7d64cae280e)) + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + + +### Features + +* **filters:** save worklist query filters to session storage so that they persist between navigation to the viewer and back ([#3749](https://github.com/OHIF/Viewers/issues/3749)) ([2a15ef0](https://github.com/OHIF/Viewers/commit/2a15ef0e44b7b4d8bbf5cb9363db6e523201c681)) + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + + +### Bug Fixes + +* **toolbar:** allow customizable toolbar for active viewport and allow active tool to be deactivated via a click ([#3608](https://github.com/OHIF/Viewers/issues/3608)) ([dd6d976](https://github.com/OHIF/Viewers/commit/dd6d9768bbca1d3cc472e8c1e6d85822500b96ef)) + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + + +### Bug Fixes + +* **sr:** dcm4chee requires the patient name for an SR to match what is in the original study ([#3739](https://github.com/OHIF/Viewers/issues/3739)) ([d98439f](https://github.com/OHIF/Viewers/commit/d98439fe7f3825076dbc87b664a1d1480ff414d3)) + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + + +### Bug Fixes + +* **modules:** add stylus loader as an option to be uncommented ([#3710](https://github.com/OHIF/Viewers/issues/3710)) ([7c57f67](https://github.com/OHIF/Viewers/commit/7c57f67844b790fc6e47ac3f9708bf9d576389c8)) + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/app + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + + +### Bug Fixes + +* **voi:** should publish voi change event on reset ([#3707](https://github.com/OHIF/Viewers/issues/3707)) ([52f34c6](https://github.com/OHIF/Viewers/commit/52f34c64d014f433ec1661a39b47e7fb27f15332)) + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + + +### Bug Fixes + +* **modality unit:** fix the modality unit per target via upgrade of cs3d ([#3706](https://github.com/OHIF/Viewers/issues/3706)) ([0a42d57](https://github.com/OHIF/Viewers/commit/0a42d573bbca7f2551a831a46d3aa6b56674a580)) + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/app + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) diff --git a/platform/app/cypress/integration/measurement-tracking/OHIFCornerstoneToolbar.spec.js b/platform/app/cypress/integration/measurement-tracking/OHIFCornerstoneToolbar.spec.js index e0c509b972e..d6a7bb24d2a 100644 --- a/platform/app/cypress/integration/measurement-tracking/OHIFCornerstoneToolbar.spec.js +++ b/platform/app/cypress/integration/measurement-tracking/OHIFCornerstoneToolbar.spec.js @@ -442,7 +442,18 @@ describe('OHIF Cornerstone Toolbar', () => { cy.waitDicomImage(); // Now navigate down once and check that the left hand pane navigated - cy.get('body').type('{downarrow}'); + cy.get('body').focus().type('{downarrow}'); + + // The following lines assist in troubleshooting when/if this test were to fail. + cy.get('[data-cy="viewport-pane"]') + .eq(0) + .find('[data-cy="viewport-overlay-top-right"]') + .should('contains.text', 'I:2 (2/20)'); + cy.get('[data-cy="viewport-pane"]') + .eq(1) + .find('[data-cy="viewport-overlay-top-right"]') + .should('contains.text', 'I:2 (2/20)'); + cy.get('body').type('{leftarrow}'); cy.setLayout(1, 1); cy.get('@viewportInfoTopRight').should('contains.text', 'I:2 (2/20)'); diff --git a/platform/app/cypress/integration/measurement-tracking/OHIFMeasurementPanel.spec.js b/platform/app/cypress/integration/measurement-tracking/OHIFMeasurementPanel.spec.js index 9f0e8b0c8d9..623c58ec65d 100644 --- a/platform/app/cypress/integration/measurement-tracking/OHIFMeasurementPanel.spec.js +++ b/platform/app/cypress/integration/measurement-tracking/OHIFMeasurementPanel.spec.js @@ -48,6 +48,7 @@ describe('OHIF Measurement Panel', function () { cy.scrollToIndex(13); + // Reset to default tool so that the new add length works cy.addLengthMeasurement([100, 100], [200, 200]); //Adding measurement in the viewport cy.get('@viewportInfoTopRight').should('contains.text', '(14/'); diff --git a/platform/app/cypress/integration/measurement-tracking/OHIFStudyBrowser.spec.js b/platform/app/cypress/integration/measurement-tracking/OHIFStudyBrowser.spec.js index c43cb2c93ac..4a52b003018 100644 --- a/platform/app/cypress/integration/measurement-tracking/OHIFStudyBrowser.spec.js +++ b/platform/app/cypress/integration/measurement-tracking/OHIFStudyBrowser.spec.js @@ -18,12 +18,17 @@ describe('OHIF Study Browser', function () { const dataTransfer = new DataTransfer(); - cy.get('[data-cy="study-browser-thumbnail"]:nth-child(2)') + cy.get('[data-cy="study-browser-thumbnail"]:nth-child(2)').as('seriesThumbnail'); + + cy.get('@seriesThumbnail') .first() .trigger('mousedown', { which: 1, button: 0 }) .trigger('dragstart', { dataTransfer }) .trigger('drag', {}); - cy.get('.cornerstone-canvas') + + cy.get('.cornerstone-canvas').as('viewport'); + + cy.get('@viewport') .trigger('mousemove', 'center') .trigger('dragover', { dataTransfer, force: true }) .trigger('drop', { dataTransfer, force: true }); diff --git a/platform/app/cypress/integration/study-list/OHIFStudyList.spec.js b/platform/app/cypress/integration/study-list/OHIFStudyList.spec.js index 9809a1b7c51..d1c32e08811 100644 --- a/platform/app/cypress/integration/study-list/OHIFStudyList.spec.js +++ b/platform/app/cypress/integration/study-list/OHIFStudyList.spec.js @@ -3,6 +3,7 @@ describe('OHIF Study List', function () { context('Desktop resolution', function () { beforeEach(function () { + cy.window().then(win => win.sessionStorage.clear()); cy.openStudyList(); cy.viewport(1750, 720); @@ -14,6 +15,10 @@ describe('OHIF Study List', function () { cy.get('@StudyDescription').clear(); }); + afterEach(function () { + cy.window().then(win => win.sessionStorage.clear()); + }); + it('Displays several studies initially', function () { cy.waitStudyList(); cy.get('@searchResult2').should($list => { @@ -33,6 +38,21 @@ describe('OHIF Study List', function () { }); }); + it('maintains Patient Name filter upon return from viewer', function () { + cy.get('@PatientName').type('Juno'); + //Wait result list to be displayed + cy.waitStudyList(); + cy.get('[data-cy="studyRow-1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1"]').click(); + cy.get( + '[data-cy="mode-basic-test-1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1"]' + ).click(); + cy.get('[data-cy="return-to-work-list"]').click(); + cy.get('@searchResult2').should($list => { + expect($list.length).to.be.eq(1); + expect($list).to.contain('Juno'); + }); + }); + it('searches MRN with exact string', function () { cy.get('@MRN').type('0000003'); //Wait result list to be displayed @@ -43,6 +63,21 @@ describe('OHIF Study List', function () { }); }); + it('maintains MRN filter upon return from viewer', function () { + cy.get('@MRN').type('0000003'); + //Wait result list to be displayed + cy.waitStudyList(); + cy.get('[data-cy="studyRow-1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1"]').click(); + cy.get( + '[data-cy="mode-basic-test-1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1"]' + ).click(); + cy.get('[data-cy="return-to-work-list"]').click(); + cy.get('@searchResult2').should($list => { + expect($list.length).to.be.eq(1); + expect($list).to.contain('0000003'); + }); + }); + it('searches Accession with exact string', function () { cy.get('@AccessionNumber').type('321'); //Wait result list to be displayed @@ -53,6 +88,21 @@ describe('OHIF Study List', function () { }); }); + it('maintains Accession filter upon return from viewer', function () { + cy.get('@AccessionNumber').type('0000155811'); + //Wait result list to be displayed + cy.waitStudyList(); + cy.get('[data-cy="studyRow-1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1"]').click(); + cy.get( + '[data-cy="mode-basic-test-1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1"]' + ).click(); + cy.get('[data-cy="return-to-work-list"]').click(); + cy.get('@searchResult2').should($list => { + expect($list.length).to.be.eq(1); + expect($list).to.contain('0000155811'); + }); + }); + it('searches Description with exact string', function () { cy.get('@StudyDescription').type('PETCT'); //Wait result list to be displayed @@ -63,6 +113,21 @@ describe('OHIF Study List', function () { }); }); + it('maintains Description filter upon return from viewer', function () { + cy.get('@StudyDescription').type('PETCT'); + //Wait result list to be displayed + cy.waitStudyList(); + cy.get('[data-cy="studyRow-1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1"]').click(); + cy.get( + '[data-cy="mode-basic-test-1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1"]' + ).click(); + cy.get('[data-cy="return-to-work-list"]').click(); + cy.get('@searchResult2').should($list => { + expect($list.length).to.be.eq(1); + expect($list).to.contain('PETCT'); + }); + }); + /* Todo: fix react select it('searches Modality with camel case', function() { cy.get('@modalities').type('Ct'); diff --git a/platform/app/cypress/integration/volume/MPR.spec.js b/platform/app/cypress/integration/volume/MPR.spec.js index c2f8d94ccde..2f2cb05cb28 100644 --- a/platform/app/cypress/integration/volume/MPR.spec.js +++ b/platform/app/cypress/integration/volume/MPR.spec.js @@ -88,19 +88,7 @@ describe('OHIF MPR', () => { }); it('should correctly render Crosshairs for MPR', () => { - cy.wait(250); - - cy.get('[data-cy="Crosshairs"]').click(); - cy.window() - .its('cornerstoneTools') - .then(cornerstoneTools => { - const state = cornerstoneTools.annotation.state.getAnnotationManager(); - - const fORMap = state.annotations; - // it should not have crosshairs yet - expect(Object.keys(fORMap)).to.have.length(0); - }); - + cy.get('[data-cy="Crosshairs"]').should('not.exist'); cy.get(':nth-child(3) > [data-cy="study-browser-thumbnail"]').dblclick(); cy.get('[data-cy="MPR"]').click(); cy.get('[data-cy="Crosshairs"]').click(); @@ -131,4 +119,19 @@ describe('OHIF MPR', () => { ); }); }); + + it('should activate window level when the active Crosshairs tool for MPR is clicked', () => { + cy.get(':nth-child(3) > [data-cy="study-browser-thumbnail"]').dblclick(); + cy.get('[data-cy="MPR"]').click(); + cy.get('[data-cy="Crosshairs"]').click(); + + // wait for the crosshairs tool to be active + cy.get('[data-cy="Crosshairs"].active'); + + // Click the crosshairs button to deactivate it. + cy.get('[data-cy="Crosshairs"]').click(); + + // wait for the window level button to be active + cy.get('[data-cy="WindowLevel-split-button-primary"].active'); + }); }); diff --git a/platform/app/cypress/support/commands.js b/platform/app/cypress/support/commands.js index 83b2df9193a..a8499759869 100644 --- a/platform/app/cypress/support/commands.js +++ b/platform/app/cypress/support/commands.js @@ -125,6 +125,8 @@ Cypress.Commands.add('openStudyList', () => { }); Cypress.Commands.add('waitStudyList', () => { + // wait 1 second for the studies to get updated + cy.wait(1000); cy.get('@searchResult').should($list => { expect($list).to.not.have.class('no-hover'); }); @@ -132,7 +134,7 @@ Cypress.Commands.add('waitStudyList', () => { Cypress.Commands.add('waitViewportImageLoading', () => { // Wait for finish loading - cy.get('[data-cy="viewprt-grid"]', { timeout: 30000 }).should($grid => { + cy.get('[data-cy="viewport-grid"]', { timeout: 30000 }).should($grid => { expect($grid).not.to.contain.text('Load'); }); }); @@ -181,7 +183,7 @@ Cypress.Commands.add('expectMinimumThumbnails', (seriesToWait = 1) => { //Command to wait DICOM image to load into the viewport Cypress.Commands.add('waitDicomImage', (mode = '/basic-test', timeout = 50000) => { cy.window() - .its('cornerstone') + .its('cornerstone', { timeout: 30000 }) .should($cornerstone => { const enabled = $cornerstone.getEnabledElements(); if (enabled?.length) { @@ -262,7 +264,14 @@ Cypress.Commands.add( cy.get('@measurementToolsBtnPrimary').as('lengthButton'); cy.get('@lengthButton').should('have.attr', 'data-tool', 'Length'); - cy.get('@lengthButton').click(); + + cy.get('@lengthButton').then(button => { + // Only click the length tool if it is not active, in case the length tool is set up to + // toggle to inactive. + if (!button.is('.active')) { + cy.wrap(button).click(); + } + }); cy.get('@lengthButton').should('have.class', 'active'); diff --git a/platform/app/package.json b/platform/app/package.json index 3ea1a8f70bd..099d53f2331 100644 --- a/platform/app/package.json +++ b/platform/app/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/app", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "productVersion": "3.4.0", "description": "OHIF Viewer", "author": "OHIF Contributors", @@ -52,29 +52,29 @@ "@cornerstonejs/codec-charls": "^1.2.3", "@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.20.1", - "@ohif/core": "3.7.0-beta.102", - "@ohif/extension-cornerstone": "3.7.0-beta.102", - "@ohif/extension-cornerstone-dicom-rt": "3.7.0-beta.102", - "@ohif/extension-cornerstone-dicom-seg": "3.7.0-beta.102", - "@ohif/extension-cornerstone-dicom-sr": "3.7.0-beta.102", - "@ohif/extension-default": "3.7.0-beta.102", - "@ohif/extension-dicom-microscopy": "3.7.0-beta.102", - "@ohif/extension-dicom-pdf": "3.7.0-beta.102", - "@ohif/extension-dicom-video": "3.7.0-beta.102", - "@ohif/extension-test": "3.7.0-beta.102", - "@ohif/i18n": "3.7.0-beta.102", - "@ohif/mode-basic-dev-mode": "3.7.0-beta.102", - "@ohif/mode-longitudinal": "3.7.0-beta.102", - "@ohif/mode-microscopy": "3.7.0-beta.102", - "@ohif/mode-test": "3.7.0-beta.102", - "@ohif/ui": "3.7.0-beta.102", + "@cornerstonejs/codec-openjph": "^2.4.5", + "@cornerstonejs/dicom-image-loader": "^1.40.3", + "@ohif/core": "3.8.0-beta.36", + "@ohif/extension-cornerstone": "3.8.0-beta.36", + "@ohif/extension-cornerstone-dicom-rt": "3.8.0-beta.36", + "@ohif/extension-cornerstone-dicom-seg": "3.8.0-beta.36", + "@ohif/extension-cornerstone-dicom-sr": "3.8.0-beta.36", + "@ohif/extension-default": "3.8.0-beta.36", + "@ohif/extension-dicom-microscopy": "3.8.0-beta.36", + "@ohif/extension-dicom-pdf": "3.8.0-beta.36", + "@ohif/extension-dicom-video": "3.8.0-beta.36", + "@ohif/extension-test": "3.8.0-beta.36", + "@ohif/i18n": "3.8.0-beta.36", + "@ohif/mode-basic-dev-mode": "3.8.0-beta.36", + "@ohif/mode-longitudinal": "3.8.0-beta.36", + "@ohif/mode-microscopy": "3.8.0-beta.36", + "@ohif/mode-test": "3.8.0-beta.36", + "@ohif/ui": "3.8.0-beta.36", "@types/react": "^17.0.38", "classnames": "^2.3.2", "core-js": "^3.16.1", "cornerstone-math": "^0.1.9", - "dcmjs": "^0.29.5", + "dcmjs": "^0.29.12", "detect-gpu": "^4.0.16", "dicom-parser": "^1.8.9", "dotenv-webpack": "^1.7.0", diff --git a/platform/app/public/config/default_16bit.js b/platform/app/public/config/default_16bit.js index 20b14d6b9b1..6ea74399905 100644 --- a/platform/app/public/config/default_16bit.js +++ b/platform/app/public/config/default_16bit.js @@ -15,7 +15,7 @@ window.config = { showWarningMessageForCrossOrigin: false, showCPUFallbackMessage: true, showLoadingIndicator: true, - use16BitDataType: true, + useNorm16Texture: true, useSharedArrayBuffer: 'AUTO', maxNumRequests: { interaction: 100, diff --git a/platform/app/public/config/e2e.js b/platform/app/public/config/e2e.js index bf095af71d1..5ffdab32af0 100644 --- a/platform/app/public/config/e2e.js +++ b/platform/app/public/config/e2e.js @@ -30,6 +30,10 @@ window.config = { supportsWildcard: true, singlepart: 'video,thumbnail,pdf', omitQuotationForMultipartRequest: true, + bulkDataURI: { + enabled: true, + relativeResolution: 'studies', + }, }, }, { @@ -50,6 +54,10 @@ window.config = { supportsWildcard: true, staticWado: true, singlepart: 'bulkdata,video,pdf', + bulkDataURI: { + enabled: true, + relativeResolution: 'studies', + }, }, }, { @@ -70,6 +78,10 @@ window.config = { supportsWildcard: true, staticWado: true, singlepart: 'bulkdata,video,pdf', + bulkDataURI: { + enabled: true, + relativeResolution: 'studies', + }, }, }, { @@ -89,27 +101,35 @@ window.config = { supportsWildcard: true, staticWado: true, singlepart: 'bulkdata,video,pdf', + bulkDataURI: { + enabled: true, + relativeResolution: 'studies', + }, + }, + }, + { + friendlyName: 'StaticWado default data', + namespace: '@ohif/extension-default.dataSourcesModule.dicomweb', + sourceName: 'dicomweb', + configuration: { + name: 'DCM4CHEE', + wadoUriRoot: '/dicomweb', + qidoRoot: '/dicomweb', + wadoRoot: '/dicomweb', + qidoSupportsIncludeField: false, + supportsReject: false, + imageRendering: 'wadors', + thumbnailRendering: 'wadors', + enableStudyLazyLoad: true, + supportsFuzzyMatching: false, + supportsWildcard: true, + staticWado: true, + bulkDataURI: { + enabled: true, + relativeResolution: 'studies', + }, }, }, - // { - // friendlyName: 'StaticWado default data', - // namespace: '@ohif/extension-default.dataSourcesModule.dicomweb', - // sourceName: 'dicomweb', - // configuration: { - // name: 'DCM4CHEE', - // wadoUriRoot: '/dicomweb', - // qidoRoot: '/dicomweb', - // wadoRoot: '/dicomweb', - // qidoSupportsIncludeField: false, - // supportsReject: false, - // imageRendering: 'wadors', - // thumbnailRendering: 'wadors', - // enableStudyLazyLoad: true, - // supportsFuzzyMatching: false, - // supportsWildcard: true, - // staticWado: true, - // }, - // }, { namespace: '@ohif/extension-default.dataSourcesModule.dicomjson', sourceName: 'dicomjson', diff --git a/platform/app/public/serve.json b/platform/app/public/serve.json new file mode 100644 index 00000000000..dbbe3ba6974 --- /dev/null +++ b/platform/app/public/serve.json @@ -0,0 +1,12 @@ +{ + "rewrites": [{ "source": "*", "destination": "index.html" }], + "headers": [ + { + "source": "**/*", + "headers": [ + { "key": "Cross-Origin-Embedder-Policy", "value": "require-corp" }, + { "key": "Cross-Origin-Opener-Policy", "value": "same-origin" } + ] + } + ] +} diff --git a/platform/app/src/components/ViewportGrid.tsx b/platform/app/src/components/ViewportGrid.tsx index e6e1c239470..ac43a24d820 100644 --- a/platform/app/src/components/ViewportGrid.tsx +++ b/platform/app/src/components/ViewportGrid.tsx @@ -1,9 +1,10 @@ -import React, { useEffect, useCallback } from 'react'; +import React, {useEffect, useCallback, useMemo} from 'react'; import PropTypes from 'prop-types'; import { ServicesManager, Types, MeasurementService } from '@ohif/core'; import { ViewportGrid, ViewportPane, useViewportGrid } from '@ohif/ui'; import EmptyViewport from './EmptyViewport'; import classNames from 'classnames'; +import { useAppConfig } from '@state'; function ViewerViewportGrid(props) { const { servicesManager, viewportComponents, dataSource } = props; @@ -17,6 +18,18 @@ function ViewerViewportGrid(props) { servicesManager as ServicesManager ).services; + /** + * Determine whether users need to use the tools directly, or whether they need to click once to activate the viewport before using tools. + * If 'activateViewportBeforeInteraction' is available in the 'window.config' object, use its value; + * otherwise, default to true. + * If true, users need to click once to activate the viewport before using the tools. + * if false, tools can be used directly. + */ + const activateViewportBeforeInteraction = useMemo(() => { + const [appConfig] = useAppConfig(); + return appConfig?.activateViewportBeforeInteraction ?? true; + }, []); + /** * This callback runs after the viewports structure has changed in any way. * On initial display, that means if it has changed by applying a HangingProtocol, @@ -311,7 +324,7 @@ function ViewerViewportGrid(props) {
} // launch-arrow | launch-info onClick={() => {}} + data-cy={`mode-${mode.routeName}-${studyInstanceUid}`} > - {t(`Modes:${mode.displayName}`)} + {mode.displayName} ) @@ -404,7 +416,7 @@ function WorkList({ onClick: () => show({ content: AboutModal, - title: 'About OHIF Viewer', + title: t('AboutModal:About OHIF Viewer'), contentProps: { versionNumber, commitHash }, }), }, @@ -413,7 +425,7 @@ function WorkList({ icon: 'settings', onClick: () => show({ - title: t('UserPreferencesModal:User Preferences'), + title: t('UserPreferencesModal:User preferences'), content: UserPreferences, contentProps: { hotkeyDefaults: hotkeysManager.getValidHotkeyDefinitions(hotkeyDefaults), diff --git a/platform/app/src/routes/WorkList/filtersMeta.js b/platform/app/src/routes/WorkList/filtersMeta.js index a6bf204b539..7057c8b3b80 100644 --- a/platform/app/src/routes/WorkList/filtersMeta.js +++ b/platform/app/src/routes/WorkList/filtersMeta.js @@ -1,35 +1,37 @@ +import i18n from 'i18next'; + const filtersMeta = [ { name: 'patientName', - displayName: 'PatientName', + displayName: i18n.t('StudyList:PatientName'), inputType: 'Text', isSortable: true, gridCol: 4, }, { name: 'mrn', - displayName: 'MRN', + displayName: i18n.t('StudyList:MRN'), inputType: 'Text', isSortable: true, gridCol: 3, }, { name: 'studyDate', - displayName: 'StudyDate', + displayName: i18n.t('StudyList:StudyDate'), inputType: 'DateRange', isSortable: true, gridCol: 5, }, { name: 'description', - displayName: 'StudyDescription', + displayName: i18n.t('StudyList:Description'), inputType: 'Text', isSortable: true, gridCol: 4, }, { name: 'modalities', - displayName: 'Modality', + displayName: i18n.t('StudyList:Modality'), inputType: 'MultiSelect', inputProps: { options: [ @@ -110,14 +112,14 @@ const filtersMeta = [ }, { name: 'accession', - displayName: 'AccessionNumber', + displayName: i18n.t('StudyList:AccessionNumber'), inputType: 'Text', isSortable: true, gridCol: 3, }, { name: 'instances', - displayName: 'Instances', + displayName: i18n.t('StudyList:Instances'), inputType: 'None', isSortable: false, gridCol: 2, diff --git a/platform/app/src/utils/OpenIdConnectRoutes.tsx b/platform/app/src/utils/OpenIdConnectRoutes.tsx index 4552b0527eb..7c83efd2a04 100644 --- a/platform/app/src/utils/OpenIdConnectRoutes.tsx +++ b/platform/app/src/utils/OpenIdConnectRoutes.tsx @@ -147,7 +147,10 @@ function OpenIdConnectRoutes({ oidc, routerBasename, userAuthenticationService } const location = useLocation(); const { pathname, search } = location; - const redirect_uri = new URL(userManager.settings._redirect_uri).pathname; //.replace(routerBasename,'') + const redirect_uri = new URL(userManager.settings._redirect_uri).pathname.replace( + routerBasename !== '/' ? routerBasename : '', + '' + ); const silent_refresh_uri = new URL(userManager.settings._silent_redirect_uri).pathname; //.replace(routerBasename,'') const post_logout_redirect_uri = new URL(userManager.settings._post_logout_redirect_uri).pathname; //.replace(routerBasename,''); @@ -158,7 +161,7 @@ function OpenIdConnectRoutes({ oidc, routerBasename, userAuthenticationService } } return ( - + =14", @@ -32,19 +34,19 @@ "@babel/runtime": "^7.20.13" }, "devDependencies": { - "@babel/core": "^7.21.4", + "@babel/core": "^7.23.2", "@babel/plugin-proposal-class-properties": "^7.16.7", "@babel/plugin-proposal-object-rest-spread": "^7.17.3", "@babel/plugin-proposal-private-methods": "^7.18.6", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-transform-arrow-functions": "^7.16.7", "@babel/plugin-transform-regenerator": "^7.16.7", - "@babel/plugin-transform-runtime": "^7.17.0", + "@babel/plugin-transform-runtime": "^7.23.2", "@babel/plugin-transform-typescript": "^7.13.0", - "@babel/preset-env": "^7.16.11", + "@babel/preset-env": "^7.23.2", "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.13.0", - "@babel/plugin-proposal-private-property-in-object":"7.21.11", + "@babel/plugin-proposal-private-property-in-object": "7.21.11", "babel-eslint": "9.x", "babel-loader": "^8.2.4", "babel-plugin-inline-react-svg": "^2.0.2", diff --git a/platform/cli/templates/mode/dependencies.json b/platform/cli/templates/mode/dependencies.json index 4270837d9fc..e7600852870 100644 --- a/platform/cli/templates/mode/dependencies.json +++ b/platform/cli/templates/mode/dependencies.json @@ -23,16 +23,16 @@ "@babel/runtime": "^7.20.13" }, "devDependencies": { - "@babel/core": "^7.21.4", + "@babel/core": "^7.23.2", "@babel/plugin-proposal-class-properties": "^7.16.7", "@babel/plugin-proposal-object-rest-spread": "^7.17.3", "@babel/plugin-proposal-private-methods": "^7.18.6", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-transform-arrow-functions": "^7.16.7", "@babel/plugin-transform-regenerator": "^7.16.7", - "@babel/plugin-transform-runtime": "^7.17.0", + "@babel/plugin-transform-runtime": "^7.23.2", "@babel/plugin-transform-typescript": "^7.13.0", - "@babel/preset-env": "^7.16.11", + "@babel/preset-env": "^7.23.2", "@babel/preset-react": "^7.16.7", "@babel/preset-typescript": "^7.13.0", "babel-eslint": "^8.0.3", diff --git a/platform/core/CHANGELOG.md b/platform/core/CHANGELOG.md index fba709f1bd3..8cef872999e 100644 --- a/platform/core/CHANGELOG.md +++ b/platform/core/CHANGELOG.md @@ -3,6 +3,420 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + + +### Features + +* **customizationService:** Enable saving and loading of private tags in SRs ([#3842](https://github.com/OHIF/Viewers/issues/3842)) ([e1f55e6](https://github.com/OHIF/Viewers/commit/e1f55e65f2d2a34136ad5d0b1ada77d337a0ea23)) + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Features + +* **i18n:** enhanced i18n support ([#3761](https://github.com/OHIF/Viewers/issues/3761)) ([d14a8f0](https://github.com/OHIF/Viewers/commit/d14a8f0199db95cd9e85866a011b64d6bf830d57)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + + +### Bug Fixes + +* **auth:** fix the issue with oauth at a non root path ([#3840](https://github.com/OHIF/Viewers/issues/3840)) ([6651008](https://github.com/OHIF/Viewers/commit/6651008fbb35dabd5991c7f61128e6ef324012df)) + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + + +### Bug Fixes + +* **cine:** Set cine disabled on mode exit. ([#3812](https://github.com/OHIF/Viewers/issues/3812)) ([924affa](https://github.com/OHIF/Viewers/commit/924affa7b5d420c2f91522a075cecbb3c78e8f52)) + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + + +### Bug Fixes + +* Update the CS3D packages to add the most recent HTJ2K TSUIDS ([#3806](https://github.com/OHIF/Viewers/issues/3806)) ([9d1884d](https://github.com/OHIF/Viewers/commit/9d1884d7d8b6b2a1cdc26965a96995838aa72682)) + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + + +### Features + +* Merge Data Source ([#3788](https://github.com/OHIF/Viewers/issues/3788)) ([c4ff2c2](https://github.com/OHIF/Viewers/commit/c4ff2c2f09546ce8b72eab9c5e7beed611e3cab0)) + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + + +### Features + +* **events:** broadcast series summary metadata ([#3798](https://github.com/OHIF/Viewers/issues/3798)) ([404b0a5](https://github.com/OHIF/Viewers/commit/404b0a5d535182d1ae44e33f7232db500a7b2c16)) + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + + +### Bug Fixes + +* **metadata:** to handle cornerstone3D update for htj2k ([#3783](https://github.com/OHIF/Viewers/issues/3783)) ([8c8924a](https://github.com/OHIF/Viewers/commit/8c8924af373d906773f5db20defe38628cacd4a0)) + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + + +### Features + +* **dicomJSON:** Add Loading Other Display Sets and JSON Metadata Generation script ([#3777](https://github.com/OHIF/Viewers/issues/3777)) ([43b1c17](https://github.com/OHIF/Viewers/commit/43b1c17209502e4876ad59bae09ed9442eda8024)) + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + + +### Features + +* **hp callback:** Add viewport ready callback ([#3772](https://github.com/OHIF/Viewers/issues/3772)) ([bf252bc](https://github.com/OHIF/Viewers/commit/bf252bcec2aae3a00479fdcb732110b344bcf2c0)) + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + + +### Bug Fixes + +* **thumbnail:** Avoid multiple promise creations for thumbnails ([#3756](https://github.com/OHIF/Viewers/issues/3756)) ([b23eeff](https://github.com/OHIF/Viewers/commit/b23eeff93745769e67e60c33d75293d6242c5ec9)) + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + + +### Bug Fixes + +* **measurement service:** Implemented correct check of schema keys in _isValidMeasurment. ([#3750](https://github.com/OHIF/Viewers/issues/3750)) ([db39585](https://github.com/OHIF/Viewers/commit/db395852b6fc6cd5c265a9282e5eee5bd6f951b7)) + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + + +### Bug Fixes + +* **toolbar:** allow customizable toolbar for active viewport and allow active tool to be deactivated via a click ([#3608](https://github.com/OHIF/Viewers/issues/3608)) ([dd6d976](https://github.com/OHIF/Viewers/commit/dd6d9768bbca1d3cc472e8c1e6d85822500b96ef)) + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + + +### Bug Fixes + +* **sr:** dcm4chee requires the patient name for an SR to match what is in the original study ([#3739](https://github.com/OHIF/Viewers/issues/3739)) ([d98439f](https://github.com/OHIF/Viewers/commit/d98439fe7f3825076dbc87b664a1d1480ff414d3)) + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + + +### Bug Fixes + +* **export:** wrong export for the tmtv RT function ([#3715](https://github.com/OHIF/Viewers/issues/3715)) ([a3f2a1a](https://github.com/OHIF/Viewers/commit/a3f2a1a7b0d16bfcc0ecddc2ab731e54c5e377c8)) + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/core + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + + +### Bug Fixes + +* **segmentation:** Various fixes for segmentation mode and other ([#3709](https://github.com/OHIF/Viewers/issues/3709)) ([a9a6ad5](https://github.com/OHIF/Viewers/commit/a9a6ad50eae67b43b8b34efc07182d788cacdcfe)) + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + + +### Bug Fixes + +* **voi:** should publish voi change event on reset ([#3707](https://github.com/OHIF/Viewers/issues/3707)) ([52f34c6](https://github.com/OHIF/Viewers/commit/52f34c64d014f433ec1661a39b47e7fb27f15332)) + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + + +### Bug Fixes + +* **modality unit:** fix the modality unit per target via upgrade of cs3d ([#3706](https://github.com/OHIF/Viewers/issues/3706)) ([0a42d57](https://github.com/OHIF/Viewers/commit/0a42d573bbca7f2551a831a46d3aa6b56674a580)) + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/core + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) diff --git a/platform/core/package.json b/platform/core/package.json index ea8e88b408d..3409d933003 100644 --- a/platform/core/package.json +++ b/platform/core/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/core", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "Generic business logic for web-based medical imaging applications", "author": "OHIF Core Team", "license": "MIT", @@ -35,14 +35,14 @@ "@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.20.1", - "@ohif/ui": "3.7.0-beta.102", + "@cornerstonejs/dicom-image-loader": "^1.40.3", + "@ohif/ui": "3.8.0-beta.36", "cornerstone-math": "0.1.9", "dicom-parser": "^1.8.21" }, "dependencies": { "@babel/runtime": "^7.20.13", - "dcmjs": "^0.29.5", + "dcmjs": "^0.29.12", "dicomweb-client": "^0.10.2", "gl-matrix": "^3.4.3", "isomorphic-base64": "^1.0.2", diff --git a/platform/core/src/classes/MetadataProvider.ts b/platform/core/src/classes/MetadataProvider.ts index 0ecfae3d801..650466a0a56 100644 --- a/platform/core/src/classes/MetadataProvider.ts +++ b/platform/core/src/classes/MetadataProvider.ts @@ -74,6 +74,9 @@ class MetadataProvider { } get(query, imageId, options = { fallback: false }) { + if (Array.isArray(imageId)) { + return; + } const instance = this._getInstance(imageId); if (query === INSTANCE) { diff --git a/platform/core/src/extensions/ExtensionManager.ts b/platform/core/src/extensions/ExtensionManager.ts index aaf6df8918a..083fde7f22b 100644 --- a/platform/core/src/extensions/ExtensionManager.ts +++ b/platform/core/src/extensions/ExtensionManager.ts @@ -461,10 +461,10 @@ export default class ExtensionManager extends PubSubService { this.dataSourceDefs[dataSourceDef.sourceName] = dataSourceDef; - const { userAuthenticationService } = this._servicesManager.services; const dataSourceInstance = module.createDataSource( dataSourceDef.configuration, - userAuthenticationService + this._servicesManager, + this ); this.dataSourceMap[dataSourceDef.sourceName] = [dataSourceInstance]; diff --git a/platform/core/src/services/CineService/CineService.ts b/platform/core/src/services/CineService/CineService.ts index 4d81a624e8c..153a186d52c 100644 --- a/platform/core/src/services/CineService/CineService.ts +++ b/platform/core/src/services/CineService/CineService.ts @@ -7,6 +7,7 @@ const publicAPI = { setIsCineEnabled: _setIsCineEnabled, playClip: _playClip, stopClip: _stopClip, + onModeExit: _onModeExit, setServiceImplementation, }; @@ -38,6 +39,10 @@ function _stopClip(element) { return serviceImplementation._stopClip(element); } +function _onModeExit() { + _setIsCineEnabled(false); +} + function setServiceImplementation({ getState: getStateImplementation, setCine: setCineImplementation, diff --git a/platform/core/src/services/DicomMetadataStore/DicomMetadataStore.ts b/platform/core/src/services/DicomMetadataStore/DicomMetadataStore.ts index 841e72e26c1..99843e810f2 100644 --- a/platform/core/src/services/DicomMetadataStore/DicomMetadataStore.ts +++ b/platform/core/src/services/DicomMetadataStore/DicomMetadataStore.ts @@ -186,7 +186,23 @@ const BaseImplementation = { madeInClient, }); }, + updateSeriesMetadata(seriesMetadata) { + const { StudyInstanceUID, SeriesInstanceUID } = seriesMetadata; + const series = _getSeries(StudyInstanceUID, SeriesInstanceUID); + if (!series) { + return; + } + + const study = _getStudy(StudyInstanceUID); + if (study) { + study.setSeriesMetadata(SeriesInstanceUID, seriesMetadata); + } + }, addSeriesMetadata(seriesSummaryMetadata, madeInClient = false) { + if (!seriesSummaryMetadata || !seriesSummaryMetadata.length || !seriesSummaryMetadata[0]) { + return; + } + const { StudyInstanceUID } = seriesSummaryMetadata[0]; let study = _getStudy(StudyInstanceUID); if (!study) { @@ -210,6 +226,7 @@ const BaseImplementation = { this._broadcastEvent(EVENTS.SERIES_ADDED, { StudyInstanceUID, + seriesSummaryMetadata, madeInClient, }); }, diff --git a/platform/core/src/services/DicomMetadataStore/createStudyMetadata.js b/platform/core/src/services/DicomMetadataStore/createStudyMetadata.js index ee7415b9ac5..eaaab192a5b 100644 --- a/platform/core/src/services/DicomMetadataStore/createStudyMetadata.js +++ b/platform/core/src/services/DicomMetadataStore/createStudyMetadata.js @@ -26,7 +26,7 @@ function createStudyMetadata(StudyInstanceUID) { let series = this.series.find(s => s.SeriesInstanceUID === SeriesInstanceUID); if (!series) { - const series = createSeriesMetadata(SeriesInstanceUID); + series = createSeriesMetadata(SeriesInstanceUID); this.series.push(series); } diff --git a/platform/core/src/services/DisplaySetService/DisplaySetService.ts b/platform/core/src/services/DisplaySetService/DisplaySetService.ts index 8d01a28dca7..3db737c0cbe 100644 --- a/platform/core/src/services/DisplaySetService/DisplaySetService.ts +++ b/platform/core/src/services/DisplaySetService/DisplaySetService.ts @@ -36,7 +36,7 @@ export default class DisplaySetService extends PubSubService { }; public activeDisplaySets = []; - public unsuportedSOPClassHandler; + public unsupportedSOPClassHandler; extensionManager: ExtensionManager; protected activeDisplaySetsMap = new Map(); @@ -47,7 +47,7 @@ export default class DisplaySetService extends PubSubService { constructor() { super(EVENTS); - this.unsuportedSOPClassHandler = + this.unsupportedSOPClassHandler = '@ohif/extension-default.sopClassHandlerModule.not-supported-display-sets-handler'; } @@ -81,7 +81,7 @@ export default class DisplaySetService extends PubSubService { * @param sopClassHandlerUID */ public setUnsuportedSOPClassHandler(sopClassHandler) { - this.unsuportedSOPClassHandler = sopClassHandler; + this.unsupportedSOPClassHandler = sopClassHandler; } /** @@ -384,7 +384,7 @@ export default class DisplaySetService extends PubSubService { // applying the default sopClassUID handler if (allDisplaySets.length === 0) { // applying hp-defined viewport settings to the displaysets - const handler = this.extensionManager.getModuleEntry(this.unsuportedSOPClassHandler); + const handler = this.extensionManager.getModuleEntry(this.unsupportedSOPClassHandler); const displaySets = handler.getDisplaySetsFromSeries(instances); if (displaySets?.length) { displaySets.forEach(ds => { diff --git a/platform/core/src/services/HangingProtocolService/HangingProtocolService.test.js b/platform/core/src/services/HangingProtocolService/HangingProtocolService.test.js index aa9dfa169f0..cbc726ca450 100644 --- a/platform/core/src/services/HangingProtocolService/HangingProtocolService.test.js +++ b/platform/core/src/services/HangingProtocolService/HangingProtocolService.test.js @@ -141,7 +141,9 @@ function checkHpsBestMatch(hps) { describe('HangingProtocolService', () => { const mockedFunction = jest.fn(); - const commandsManager = {}; + const commandsManager = { + run: mockedFunction, + }; const servicesManager = { services: { TestService: { diff --git a/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts b/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts index 01fdd8f6ef0..c2c987c31ea 100644 --- a/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts +++ b/platform/core/src/services/HangingProtocolService/HangingProtocolService.ts @@ -413,7 +413,7 @@ export default class HangingProtocolService extends PubSubService { * * @returns A boolean indicating whether a custom image load has been performed or not. */ - public getCustomImageLoadPerformed(): boolean { + private getCustomImageLoadPerformed(): boolean { return this.customImageLoadPerformed; } @@ -849,6 +849,8 @@ export default class HangingProtocolService extends PubSubService { throw new Error(error); } + + this._commandsManager.run(this.protocol?.callbacks?.onProtocolEnter); } protected matchActivation( @@ -955,7 +957,15 @@ export default class HangingProtocolService extends PubSubService { try { if (!this.protocol || this.protocol.id !== protocol.id) { this.stageIndex = options?.stageIndex || 0; + //Reset load performed to false to re-fire loading strategy at new study opening + this.customImageLoadPerformed = false; this._originalProtocol = this._copyProtocol(protocol); + + // before reassigning the protocol, we need to check if there is a callback + // on the old protocol that needs to be called + // Send the notification about updating the state + this._commandsManager.run(this.protocol?.callbacks?.onProtocolExit); + this.protocol = protocol; const { imageLoadStrategy } = protocol; @@ -1120,6 +1130,13 @@ export default class HangingProtocolService extends PubSubService { const { columns: numCols, rows: numRows, layoutOptions = [] } = layoutProps; + if (this.protocol?.callbacks?.onViewportDataInitialized) { + this._commandsManager.runCommand('attachProtocolViewportDataListener', { + protocol: this.protocol, + stageIndex: this.stageIndex, + }); + } + this._broadcastEvent(this.EVENTS.NEW_LAYOUT, { layoutType, numRows, @@ -1143,9 +1160,6 @@ export default class HangingProtocolService extends PubSubService { } { let matchedViewports = 0; stageModel.viewports.forEach(viewport => { - // Todo: we should probably assign a random viewportId if not defined - // below, but it feels odd since viewportGrid should handle this kind - // of thing const viewportId = viewport.viewportOptions.viewportId; const matchDetails = this._matchViewport( viewport, diff --git a/platform/core/src/services/MeasurementService/MeasurementService.test.js b/platform/core/src/services/MeasurementService/MeasurementService.test.js index 93517d58c2f..51ec9b66d23 100644 --- a/platform/core/src/services/MeasurementService/MeasurementService.test.js +++ b/platform/core/src/services/MeasurementService/MeasurementService.test.js @@ -324,6 +324,25 @@ describe('MeasurementService.js', () => { }).toThrow(); }); + it('throws Error if adding measurement with unknown schema key', () => { + measurementService.addMapping( + source, + annotationType, + matchingCriteria, + toSourceSchema, + () => { + return { + ...measurement, + invalidSchemaKey: 0, + }; + } + ); + + expect(() => { + source.annotationToMeasurement(annotationType, measurement); + }).toThrow(); + }); + it('updates existing measurement', () => { measurementService.addMapping( source, diff --git a/platform/core/src/services/MeasurementService/MeasurementService.ts b/platform/core/src/services/MeasurementService/MeasurementService.ts index dde9ff4d217..7d253ecffb3 100644 --- a/platform/core/src/services/MeasurementService/MeasurementService.ts +++ b/platform/core/src/services/MeasurementService/MeasurementService.ts @@ -58,6 +58,7 @@ const MEASUREMENT_SCHEMA_KEYS = [ 'longestDiameter', 'cachedStats', 'selected', + 'textBox', ]; const EVENTS = { @@ -691,14 +692,14 @@ class MeasurementService extends PubSubService { * @return {boolean} Measurement validation */ _isValidMeasurement(measurementData) { - Object.keys(measurementData).forEach(key => { + return Object.keys(measurementData).every(key => { if (!MEASUREMENT_SCHEMA_KEYS.includes(key)) { log.warn(`Invalid measurement key: ${key}`); return false; } - }); - return true; + return true; + }); } /** diff --git a/platform/core/src/services/ToolBarService/ToolbarService.ts b/platform/core/src/services/ToolBarService/ToolbarService.ts index a39d3eca58b..269f93da417 100644 --- a/platform/core/src/services/ToolBarService/ToolbarService.ts +++ b/platform/core/src/services/ToolBarService/ToolbarService.ts @@ -63,12 +63,17 @@ export default class ToolbarService extends PubSubService { }; } + public static _createActionButton = ToolbarService._createButton.bind(null, 'action'); + public static _createToggleButton = ToolbarService._createButton.bind(null, 'toggle'); + public static _createToolButton = ToolbarService._createButton.bind(null, 'tool'); + buttons: Record = {}; state: { primaryToolId: string; toggles: Record; groups: Record; - } = { primaryToolId: 'WindowLevel', toggles: {}, groups: {} }; + } = { primaryToolId: '', toggles: {}, groups: {} }; + buttonSections: Record = { /** * primary: ['Zoom', 'Wwwc'], @@ -78,6 +83,8 @@ export default class ToolbarService extends PubSubService { _commandsManager: CommandsManager; extensionManager: ExtensionManager; + defaultTool: Record; + constructor(commandsManager: CommandsManager) { super(EVENTS); this._commandsManager = commandsManager; @@ -103,6 +110,19 @@ export default class ToolbarService extends PubSubService { this.reset(); } + /** + * Sets the default tool that will be activated whenever the primary tool is + * deactivated without activating another/different tool. + * @param interaction the interaction command that will set the default tool active + */ + public setDefaultTool(interaction) { + this.defaultTool = interaction; + } + + public getDefaultTool() { + return this.defaultTool; + } + /** * * @param {*} interaction - can be undefined to run nothing @@ -125,25 +145,20 @@ export default class ToolbarService extends PubSubService { switch (interactionType) { case 'action': { - commands.forEach(({ commandName, commandOptions, context }) => { - if (commandName) { - commandsManager.runCommand( - commandName, - { - ...commandOptions, - ...options, - }, - context - ); - } - }); + commandsManager.run(commands, options); break; } case 'tool': { try { - commands.forEach(({ commandName = 'setToolActive', commandOptions, context }) => { - commandsManager.runCommand(commandName, commandOptions, context); - }); + const alternateInteraction = + this.state.primaryToolId === itemId && + this.defaultTool?.itemId !== itemId && + this.getDefaultTool(); + if (alternateInteraction) { + // Allow toggling the mode off + return this.recordInteraction(alternateInteraction, options); + } + commandsManager.run(commands, options); // only set the primary tool if no error was thrown. // if the itemId is not undefined use it; otherwise, set the first tool in @@ -312,21 +327,27 @@ export default class ToolbarService extends PubSubService { /** * - * Finds a button section by it's name, then maps the list of string name + * Finds a button section by it's name/tool group id, then maps the list of string name * identifiers to schema/values that can be used to render the buttons. * - * @param {string} key - * @param {*} props + * @param toolGroupId - the tool group id + * @param props - optional properties to apply to every button of the section + * @param defaultToolGroupId - the fallback section to return if the given toolGroupId section is not available */ - getButtonSection(key, props) { - const buttonSectionIds = this.buttonSections[key]; + getButtonSection( + toolGroupId: string, + props?: Record, + defaultToolGroupId = 'primary' + ) { + const buttonSectionIds = + this.buttonSections[toolGroupId] || this.buttonSections[defaultToolGroupId]; const buttonsInSection = []; if (buttonSectionIds && buttonSectionIds.length !== 0) { buttonSectionIds.forEach(btnId => { const btn = this.buttons[btnId]; const metadata = {}; - const mappedBtn = this._mapButtonToDisplay(btn, key, metadata, props); + const mappedBtn = this._mapButtonToDisplay(btn, toolGroupId, metadata, props); buttonsInSection.push(mappedBtn); }); diff --git a/platform/core/src/services/_shared/pubSubServiceInterface.ts b/platform/core/src/services/_shared/pubSubServiceInterface.ts index 822f969af59..7b66ceff9f6 100644 --- a/platform/core/src/services/_shared/pubSubServiceInterface.ts +++ b/platform/core/src/services/_shared/pubSubServiceInterface.ts @@ -90,7 +90,7 @@ function _broadcastEvent(eventName, callbackProps) { /** Export a PubSubService class to be used instead of the individual items */ export class PubSubService { EVENTS: any; - subscribe: (eventName: string, callback: Function) => { unsubscribe: () => any; }; + subscribe: (eventName: string, callback: Function) => { unsubscribe: () => any }; _broadcastEvent: (eventName: string, callbackProps: any) => void; _unsubscribe: (eventName: string, listenerId: string) => void; _isValidEvent: (eventName: string) => boolean; diff --git a/platform/core/src/types/HangingProtocol.ts b/platform/core/src/types/HangingProtocol.ts index 797028f3815..8059b5675c8 100644 --- a/platform/core/src/types/HangingProtocol.ts +++ b/platform/core/src/types/HangingProtocol.ts @@ -241,15 +241,17 @@ export type ProtocolStage = { export type ProtocolNotifications = { // This set of commands is executed after the protocol is exited and the new one applied onProtocolExit?: Command[]; - // This set of commands is executed after the protocol is entered and applied onProtocolEnter?: Command[]; - // This set of commands is executed before the layout change is started. // If it returns false, the layout change will be aborted. // The numRows and numCols is included in the command params, so it is possible // to apply a specific hanging protocol onLayoutChange?: Command[]; + // This set of commands is executed after the initial viewport grid data is set + // and all viewport data includes a designated display set. This command + // will run on every stage's initial layout. + onViewportDataInitialized?: Command[]; }; /** diff --git a/platform/core/src/utils/addAccessors.js b/platform/core/src/utils/addAccessors.js new file mode 100644 index 00000000000..c9f2fa5285e --- /dev/null +++ b/platform/core/src/utils/addAccessors.js @@ -0,0 +1,66 @@ +const handler = { + /** + * Get a proxied value from the array or property value + * Note that the property value get works even if you update the underlying object. + * Also, return true of proxy.__isProxy in order to distinguish proxies and not double proxy them. + */ + get: (target, prop) => { + if (prop == '__isProxy') { + return true; + } + if (prop in target) { + return target[prop]; + } + return target[0][prop]; + }, + + set: (obj, prop, value) => { + if (typeof prop === 'number' || prop in obj) { + obj[prop] = value; + } else { + obj[0][prop] = value; + } + return true; + }, +}; + +/** + * Add a proxy object for sqZero or the src[0] element if sqZero is unspecified, AND + * src is an array of length 1. + * + * If sqZero isn't passed in, then assume this is a create call on the destination object + * itself, by: + * 1. If not an object, return dest + * 2. If an array of length != 1, return dest + * 3. If an array, use dest[0] as sqZero + * 4. Use dest as sqZero + * + * @example + * src = [{a:5,b:'string', c:null}] + * addAccessors(src) + * src.c = 'outerChange' + * src[0].b='innerChange' + * + * assert src.a===5 + * assert src[0].c === 'outerChange' + * assert src.b === 'innerChange' + */ +const addAccessors = (dest, sqZero) => { + if (dest.__isProxy) { + return dest; + } + let itemZero = sqZero; + if (itemZero === undefined) { + if (typeof dest !== 'object') { + return dest; + } + if (Array.isArray(dest) && dest.length !== 1) { + return dest; + } + itemZero = Array.isArray(dest) ? dest[0] : dest; + } + const ret = [itemZero]; + return new Proxy(ret, handler); +}; + +export default addAccessors; diff --git a/platform/core/src/utils/downloadCSVReport.js b/platform/core/src/utils/downloadCSVReport.js index b2da98b6126..4185a791986 100644 --- a/platform/core/src/utils/downloadCSVReport.js +++ b/platform/core/src/utils/downloadCSVReport.js @@ -86,7 +86,7 @@ function _getCommonRowItems(measurement, seriesMetadata) { return { 'Patient ID': firstInstance.PatientID, // Patient ID - 'Patient Name': firstInstance.PatientName.Alphabetic, // PatientName + 'Patient Name': firstInstance.PatientName?.Alphabetic || '', // Patient Name StudyInstanceUID: measurement.referenceStudyUID, // StudyInstanceUID SeriesInstanceUID: measurement.referenceSeriesUID, // SeriesInstanceUID SOPInstanceUID: measurement.SOPInstanceUID, // SOPInstanceUID diff --git a/platform/core/src/utils/formatDate.js b/platform/core/src/utils/formatDate.js index 7b44277f200..866a9285af9 100644 --- a/platform/core/src/utils/formatDate.js +++ b/platform/core/src/utils/formatDate.js @@ -1,4 +1,5 @@ import moment from 'moment'; +import i18n from 'i18next'; /** * Format date @@ -7,7 +8,7 @@ import moment from 'moment'; * @param {string} format Desired date format * @returns {string} Formatted date */ -export default (date, format = 'DD-MMM-YYYY') => { +export default (date, format = i18n.t('Common:localDateFormat','DD-MMM-YYYY')) => { // moment(undefined) returns the current date, so return the empty string instead return date ? moment(date).format(format) : ''; }; diff --git a/platform/core/src/utils/index.js b/platform/core/src/utils/index.js index 3f5d66e4132..d7862618e0b 100644 --- a/platform/core/src/utils/index.js +++ b/platform/core/src/utils/index.js @@ -27,6 +27,7 @@ import debounce from './debounce'; import roundNumber from './roundNumber'; import downloadCSVReport from './downloadCSVReport'; import isEqualWithin from './isEqualWithin'; +import addAccessors from './addAccessors'; import { sortStudy, sortStudySeries, @@ -65,6 +66,7 @@ const utils = { Queue, isDicomUid, isEqualWithin, + addAccessors, resolveObjectPath, hierarchicalListUtils, progressTrackingUtils, diff --git a/platform/core/src/utils/index.test.js b/platform/core/src/utils/index.test.js index 5ac07149c33..30d8f70ef51 100644 --- a/platform/core/src/utils/index.test.js +++ b/platform/core/src/utils/index.test.js @@ -40,6 +40,7 @@ describe('Top level exports', () => { 'progressTrackingUtils', 'subscribeToNextViewportGridChange', 'uuidv4', + 'addAccessors', ].sort(); const exports = Object.keys(utils.default).sort(); diff --git a/platform/core/src/utils/isDisplaySetReconstructable.js b/platform/core/src/utils/isDisplaySetReconstructable.js index 8b348177d80..2d36266c4fa 100644 --- a/platform/core/src/utils/isDisplaySetReconstructable.js +++ b/platform/core/src/utils/isDisplaySetReconstructable.js @@ -14,15 +14,12 @@ export default function isDisplaySetReconstructable(instances) { if (!instances.length) { return { value: false }; } - const firstInstance = instances[0]; - const Modality = firstInstance.Modality; const isMultiframe = firstInstance.NumberOfFrames > 1; - if (!constructableModalities.includes(Modality)) { - return { value: false }; - } + // We used to check is reconstructable modalities here, but the logic is removed + // in favor of the calculation by metadata (orientation and positions) // Can't reconstruct if we only have one image. if (!isMultiframe && instances.length === 1) { diff --git a/platform/docs/CHANGELOG.md b/platform/docs/CHANGELOG.md index 5f09798527d..4ff22d14959 100644 --- a/platform/docs/CHANGELOG.md +++ b/platform/docs/CHANGELOG.md @@ -3,6 +3,405 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Features + +* **config:** Add activateViewportBeforeInteraction parameter for viewport interaction customization ([#3847](https://github.com/OHIF/Viewers/issues/3847)) ([f707b4e](https://github.com/OHIF/Viewers/commit/f707b4ebc996f379cd30337badc06b07e6e35ac5)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + + +### Bug Fixes + +* **auth:** fix the issue with oauth at a non root path ([#3840](https://github.com/OHIF/Viewers/issues/3840)) ([6651008](https://github.com/OHIF/Viewers/commit/6651008fbb35dabd5991c7f61128e6ef324012df)) + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + + +### Features + +* Merge Data Source ([#3788](https://github.com/OHIF/Viewers/issues/3788)) ([c4ff2c2](https://github.com/OHIF/Viewers/commit/c4ff2c2f09546ce8b72eab9c5e7beed611e3cab0)) + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + + +### Features + +* **docs:** Added various training videos to support the OHIF CLI tools ([#3794](https://github.com/OHIF/Viewers/issues/3794)) ([d83beb7](https://github.com/OHIF/Viewers/commit/d83beb7c62c1d5be19c54e08d23883f112147fe1)) + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + + +### Features + +* **url:** Add SeriesInstanceUIDs wado query param ([#3746](https://github.com/OHIF/Viewers/issues/3746)) ([b694228](https://github.com/OHIF/Viewers/commit/b694228dd535e4b97cb86a1dc085b6e8716bdaf3)) + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + + +### Features + +* **dicomJSON:** Add Loading Other Display Sets and JSON Metadata Generation script ([#3777](https://github.com/OHIF/Viewers/issues/3777)) ([43b1c17](https://github.com/OHIF/Viewers/commit/43b1c17209502e4876ad59bae09ed9442eda8024)) + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + + +### Bug Fixes + +* **path:** upgrade docusaurus for security ([#3780](https://github.com/OHIF/Viewers/issues/3780)) ([8bbcd0e](https://github.com/OHIF/Viewers/commit/8bbcd0e692e25917c1b6dd94a39fac834c812fca)) + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + + +### Features + +* **hp callback:** Add viewport ready callback ([#3772](https://github.com/OHIF/Viewers/issues/3772)) ([bf252bc](https://github.com/OHIF/Viewers/commit/bf252bcec2aae3a00479fdcb732110b344bcf2c0)) + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + + +### Bug Fixes + +* **toolbar:** allow customizable toolbar for active viewport and allow active tool to be deactivated via a click ([#3608](https://github.com/OHIF/Viewers/issues/3608)) ([dd6d976](https://github.com/OHIF/Viewers/commit/dd6d9768bbca1d3cc472e8c1e6d85822500b96ef)) + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + + +### Bug Fixes + +* **sr:** dcm4chee requires the patient name for an SR to match what is in the original study ([#3739](https://github.com/OHIF/Viewers/issues/3739)) ([d98439f](https://github.com/OHIF/Viewers/commit/d98439fe7f3825076dbc87b664a1d1480ff414d3)) + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + + +### Bug Fixes + +* **cine:** Use the frame rate specified in DICOM and optionally auto play cine ([#3735](https://github.com/OHIF/Viewers/issues/3735)) ([d9258ec](https://github.com/OHIF/Viewers/commit/d9258eca70587cf4dc18be4e56c79b16bae73d6d)) + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + + +### Bug Fixes + +* **export:** wrong export for the tmtv RT function ([#3715](https://github.com/OHIF/Viewers/issues/3715)) ([a3f2a1a](https://github.com/OHIF/Viewers/commit/a3f2a1a7b0d16bfcc0ecddc2ab731e54c5e377c8)) + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + + +### Bug Fixes + +* **segmentation:** Various fixes for segmentation mode and other ([#3709](https://github.com/OHIF/Viewers/issues/3709)) ([a9a6ad5](https://github.com/OHIF/Viewers/commit/a9a6ad50eae67b43b8b34efc07182d788cacdcfe)) + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package ohif-docs + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package ohif-docs + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) **Note:** Version bump only for package ohif-docs diff --git a/platform/docs/docs/assets/img/filtering-worklist.png b/platform/docs/docs/assets/img/filtering-worklist.png new file mode 100644 index 00000000000..47ab317d969 Binary files /dev/null and b/platform/docs/docs/assets/img/filtering-worklist.png differ diff --git a/platform/docs/docs/assets/img/large-pt-ct.png b/platform/docs/docs/assets/img/large-pt-ct.png new file mode 100644 index 00000000000..16c16bcbae7 Binary files /dev/null and b/platform/docs/docs/assets/img/large-pt-ct.png differ diff --git a/platform/docs/docs/assets/img/memory-profiling-regular.png b/platform/docs/docs/assets/img/memory-profiling-regular.png new file mode 100644 index 00000000000..dd87a3430b4 Binary files /dev/null and b/platform/docs/docs/assets/img/memory-profiling-regular.png differ diff --git a/platform/docs/docs/assets/img/preferSizeOverAccuracy.png b/platform/docs/docs/assets/img/preferSizeOverAccuracy.png new file mode 100644 index 00000000000..253414cddb4 Binary files /dev/null and b/platform/docs/docs/assets/img/preferSizeOverAccuracy.png differ diff --git a/platform/docs/docs/assets/img/webgl-int16.png b/platform/docs/docs/assets/img/webgl-int16.png new file mode 100644 index 00000000000..1a9abd8cf19 Binary files /dev/null and b/platform/docs/docs/assets/img/webgl-int16.png differ diff --git a/platform/docs/docs/assets/img/webgl-report-norm16.png b/platform/docs/docs/assets/img/webgl-report-norm16.png new file mode 100644 index 00000000000..766938ba5c8 Binary files /dev/null and b/platform/docs/docs/assets/img/webgl-report-norm16.png differ diff --git a/platform/docs/docs/configuration/configurationFiles.md b/platform/docs/docs/configuration/configurationFiles.md index 9141cc108e5..df0299feca9 100644 --- a/platform/docs/docs/configuration/configurationFiles.md +++ b/platform/docs/docs/configuration/configurationFiles.md @@ -179,11 +179,14 @@ if auth headers are used, a preflight request is required. } ``` - `showLoadingIndicator`: (default to true), if set to false, the loading indicator will not be shown when navigating between studies. -- `use16BitDataType`: (default to false), if set to true, it will use 16 bit data type for the image data wherever possible which has +- `useNorm16Texture`: (default to false), if set to true, it will use 16 bit data type for the image data wherever possible which has significant impact on reducing the memory usage. However, the 16Bit textures require EXT_texture_norm16 extension in webGL 2.0 (you can check if you have it here https://webglreport.com/?v=2). In addition to the extension, there are reported problems for Intel Macs that might cause the viewer to crash. In summary, it is great a configuration if you have support for it. - `useSharedArrayBuffer` (default to 'TRUE', options: 'AUTO', 'FALSE', 'TRUE', note that these are strings), for volume loading we use sharedArrayBuffer to be able to load the volume progressively as the data arrives (each webworker has the shared buffer and can write to it). However, there might be certain environments that do not support sharedArrayBuffer. In that case, you can set this flag to false and the viewer will use the regular arrayBuffer which might be slower for large volume loading. - `supportsWildcard`: (default to false), if set to true, the datasource will support wildcard matching for patient name and patient id. +- `allowMultiSelectExport`: (default to false), if set to true, the user will be able to select the datasource to export the report to. +- `activateViewportBeforeInteraction`: (default to true), if set to false, tools can be used directly without the need to click and activate the viewport. +- `autoPlayCine`: (default to false), if set to true, data sets with the DICOM frame time tag (i.e. (0018,1063)) will auto play when displayed - `dangerouslyUseDynamicConfig`: Dynamic config allows user to pass `configUrl` query string. This allows to load config without recompiling application. If the `configUrl` query string is passed, the worklist and modes will load from the referenced json rather than the default .env config. If there is no `configUrl` path provided, the default behaviour is used and there should not be any deviation from current user experience.
Points to consider while using `dangerouslyUseDynamicConfig`:
- User have to enable this feature by setting `dangerouslyUseDynamicConfig.enabled:true`. By default it is `false`. diff --git a/platform/docs/docs/configuration/dataSources/configuration-ui.md b/platform/docs/docs/configuration/dataSources/configuration-ui.md index 15f3b0bcbad..b4279a26a2b 100644 --- a/platform/docs/docs/configuration/dataSources/configuration-ui.md +++ b/platform/docs/docs/configuration/dataSources/configuration-ui.md @@ -18,6 +18,11 @@ Google Cloud Healthcare data source. ![Data source configuration UI](../../assets/img/data-source-configuration-ui.png) +:::tip +A datasource root URI can be [fully or partially specified](../../deployment/google-cloud-healthcare.md#configuring-google-cloud-healthcare-as-a-datasource-in-ohif) +in the OHIF configuration file. +::: + ## `BaseDataSourceConfigurationAPIItem` interface Each (path) item of a data source is represented by an instance of this interface. diff --git a/platform/docs/docs/configuration/dataSources/dicom-json.md b/platform/docs/docs/configuration/dataSources/dicom-json.md index 20b0036d057..c2b95a874bb 100644 --- a/platform/docs/docs/configuration/dataSources/dicom-json.md +++ b/platform/docs/docs/configuration/dataSources/dicom-json.md @@ -28,6 +28,20 @@ dataset. Let's have a look at the JSON file: JSON file stores the metadata for the study level, series level and instance level. A JSON launch file should follow the same structure as the one below. +:::tip +You can use our script to generate the JSON file from a hosted endpoint. See +`.scripts/dicom-json-generator.js` + +You could run it like this: + +```bash +node .scripts/dicom-json-generator.js '/path/to/study/folder' 'url/to/dicom/server/folder' 'json/output/file.json' +``` + +Some modalities require additional metadata to be added to the JSON file. You can read more about the minimum amount of metadata required for the viewer to work [here](../../faq.md#what-are-the-list-of-required-metadata-for-the-ohif-viewer-to-work). We will handle this in the script. For example, the script will add the CodeSequences for SR in order to display the measurements in the viewer. +::: + + Note that at the instance level metadata we are storing both the `metadata` and also the `url` for the dicom file on the dicom server. In this case we are referring to @@ -35,6 +49,8 @@ referring to which is stored in another directory in our s3. (You can actually try downloading the dicom file by opening the url in your browser). +The URL to the script in the given example is `https://ohif-dicom-json-example.s3.amazonaws.com/LIDC-IDRI-0001/01-01-2000-30178`. This URL serves as the parent directory that contains all the series within their respective folders. + ```json { "studies": [ @@ -154,6 +170,18 @@ Your public folder should look like this: ![](../../assets/img/dicom-json-public.png) +:::tip +It is important to URL encode the `url` query parameter especially if the `url` +parameter itself also contains query parameters. So for example, + +`http://localhost:3000/viewer/dicomjson?url=http://localhost:3000/LIDC-IDRI-0001.json?key0=val0&key1=val1` + +should be... + +`http://localhost:3000/viewer/dicomjson?url=http://localhost:3000/LIDC-IDRI-0001.json?key0=val0%26key1=val1` + +Notice the ampersand (`&`) is encoded as `%26`. +::: :::note When hosting the DICOM JSON files, it is important to be aware that certain providers @@ -162,5 +190,5 @@ handles this, but Azure does not. Consequently, when you attempt to access a lin specific URL, a 404 error will be displayed. This issue also occurs locally, where the http-server does not handle it. However, -if you utilize the `serve` package (npx serve ./dist -l 8080 -s), it effectively addresses this problem. +if you utilize the `serve` package (npx serve ./dist -c ../public/serve.json), it effectively addresses this problem. ::: diff --git a/platform/docs/docs/configuration/dataSources/static-files.md b/platform/docs/docs/configuration/dataSources/static-files.md index aa69d4bbafb..2741e04951d 100644 --- a/platform/docs/docs/configuration/dataSources/static-files.md +++ b/platform/docs/docs/configuration/dataSources/static-files.md @@ -26,7 +26,7 @@ StaticWado/build/install/StaticWado/bin/StaticWado -d /dicomweb /dicom/study1 cd /dicomweb npx http-server -p 5000 --cors -g -# you can use npx serve ./dist -l 8080 -s as an alternative to http-server +# you can use npx serve ./dist -l 8080 -c ../public/serve.json as an alternative to http-server ``` There is then a dev environment in the platform/app directory which can be diff --git a/platform/docs/docs/configuration/url.md b/platform/docs/docs/configuration/url.md index fc8eaa2e947..c81464e2fbf 100644 --- a/platform/docs/docs/configuration/url.md +++ b/platform/docs/docs/configuration/url.md @@ -62,7 +62,9 @@ WorkList by adding the `dataSources` query parameter. /?dataSources=orthanc ``` -Note: you should pass the `sourceName` of the data source in the configuration file (not the friendly name nor the name) +Note1: You should pass the `sourceName` of the data source in the configuration file (not the friendly name nor the name) +Note2: Make sure that the configuration file you are using actually includes that data source. You cannot use a data source from another configuration file. + :::tip @@ -118,7 +120,7 @@ values. ::: -### SeriesInstanceUID and initialSeriesInstanceUID +### SeriesInstanceUID, SeriesInstanceUIDs and initialSeriesInstanceUID Sometimes you need to only retrieve a specific series in a study, you can do that by providing series level QIDO query parameters in the URL such as @@ -132,6 +134,17 @@ http://localhost:3000/viewer?StudyInstanceUIDs=1.3.6.1.4.1.25403.345050719074.38 This will only open the viewer with one series (one displaySet) loaded, and no queries made for any other series. +Sometimes you need to only retrieve a subset of series in a study, you can do +that by providing study level wado query parameters in the URL such as +SeriesInstanceUIDs. For example: + +```js +http://localhost:3000/viewer?StudyInstanceUIDs=1.3.6.1.4.1.25403.345050719074.3824.20170125113417.1&SeriesInstanceUIDs=1.3.6.1.4.1.25403.345050719074.3824.20170125113545.4,1.3.6.1.4.1.25403.345050719074.3824.20170125113545.5 +``` + +This will only open the viewer with two series (two displaySets) loaded, and no +queries made for any other series. + Alternatively, sometimes you want to just open the study on a specified series and/or display a particular sop instance, which you can accomplish using: `initialSeriesInstanceUID` and/or `initialSOPInstanceUID` diff --git a/platform/docs/docs/deployment/authorization.md b/platform/docs/docs/deployment/authorization.md index 281b8f91bc8..b80a7c96259 100644 --- a/platform/docs/docs/deployment/authorization.md +++ b/platform/docs/docs/deployment/authorization.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 6 sidebar_label: Authorization --- diff --git a/platform/docs/docs/deployment/build-for-production.md b/platform/docs/docs/deployment/build-for-production.md index 7da884abdd5..d1dd508bd9c 100644 --- a/platform/docs/docs/deployment/build-for-production.md +++ b/platform/docs/docs/deployment/build-for-production.md @@ -104,10 +104,7 @@ yarn global add http-server # Change the directory to the platform/app # Serve the files in our current directory -# Accessible at: `http://localhost:8080` -npx http-server ./dist - -# you can use npx serve ./dist -l 8080 -s as an alternative to http-server +npx serve ./dist -c ../public/serve.json ``` :::caution @@ -118,25 +115,6 @@ In the video below notice that there is `platform/viewer` which has been renamed
-### Build for non-root path - -If you would like to access the viewer from a non-root path (e.g., `/my-awesome-viewer` instead of `/`), -You can achieve so by using the `PUBLIC_URL` environment variable AND the `routerBasename` configuration option. - -1. use a config (e.g. config/myConfig.js) file that is using the `routerBasename` of your choice `/my-awesome-viewer` (note there is only one / - it is not /my-awesome-viewer/). -2. build the viewer with `PUBLIC_URL=/my-awesome-viewer/ APP_CONFIG=config/myConfig.js yarn build` (note there are two / - it is not /my-awesome-viewer). - - -:::tip -The PUBLIC_URL tells the application where to find the static assets and the routerBasename will tell the application how to handle the routes -::: - -:::tip -Testing, you can use `npx http-server` to serve the files in the generated `dist` folder and access the viewer from `http://localhost:8080/my-awesome-viewer`. To achieve -so, you should first rename the `dist` folder to `my-awesome-viewer` and then change the working directory -to the `platform/app` folder and run `npx http-server ./`. Then on the browser, you can access the viewer from `http://localhost:8080/my-awesome-viewer` -::: - ### Automating Builds and Deployments diff --git a/platform/docs/docs/deployment/cors.md b/platform/docs/docs/deployment/cors.md index bd88d0d1daa..135c9f96166 100644 --- a/platform/docs/docs/deployment/cors.md +++ b/platform/docs/docs/deployment/cors.md @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 7 --- # Cross-Origin Information for OHIF diff --git a/platform/docs/docs/deployment/custom-url-access.md b/platform/docs/docs/deployment/custom-url-access.md new file mode 100644 index 00000000000..16844ca3129 --- /dev/null +++ b/platform/docs/docs/deployment/custom-url-access.md @@ -0,0 +1,74 @@ +--- +sidebar_position: 4 +title: Custom URL Access/Build +--- + + +## Build for non-root path + +Sometimes it is desired to access the viewer from a non-root path (e.g., `/my-awesome-viewer` instead of `/`). +You can achieve so by using the `PUBLIC_URL` environment variable AND the `routerBasename` configuration option. + +1. use a config (e.g. `config/myConfig.js`) file that is using the `routerBasename` of your choice `/my-awesome-viewer` (note there is only one / - it is not /my-awesome-viewer/). +2. build the viewer with `PUBLIC_URL=/my-awesome-viewer/` (note there are two / - it is not /my-awesome-viewer). + + +:::tip +The PUBLIC_URL tells the application where to find the static assets and the routerBasename will tell the application how to handle the routes +::: + + +### Testing in Development +For testing the build locally, you can use the following command: + +```bash +# we use default config file, so we assume you have already set the routerBasename to /my-awesome-viewer in the default config as an example +PUBLIC_URL=/my-awesome-viewer/ APP_CONFIG=config/default.js yarn dev +``` + + +### Testing in Build (production) +You need to build the viewer with the following command: + +```bash +PUBLIC_URL=/my-awesome-viewer/ APP_CONFIG=config/default.js yarn build +``` + +We can use the `npx serve` to serve the build folder. There are two things you need to consider however, +1. You need to change the public/serve.json file to reflect the new routerBasename in the destination (see the example below) + + +```json +// final serve.json +{ + "rewrites": [{ "source": "*", "destination": "my-awesome-viewer/index.html" }], + "headers": [ + { + "source": "**/*", + "headers": [ + { "key": "Cross-Origin-Embedder-Policy", "value": "require-corp" }, + { "key": "Cross-Origin-Opener-Policy", "value": "same-origin" } + ] + } + ] +} +``` + +```bash +cd platform/app; + +# rename the dist folder to my-awesome-viewer +mv dist my-awesome-viewer + +# serve the folder with custom json, note that we are using ../public/serve.json and NOT public/serve.json +npx serve -c ./public/serve.json +``` + + +:::note +When you want to authenticate against a sub path, there are a few things you should keep in mind: + +1. Set the `routerBasename` to the sub path and also update the `PUBLIC_URL` to match the sub path. +2. Don't forget to modify the `serve.json` file as mentioned earlier. +3. Ensure that the sub path is included in the list of allowed callback URLs. For example, in the Google Cloud dashboard, you can set it in the `Authorized redirect URIs` field under the `Credentials` section of the `APIs & Services` menu. +::: diff --git a/platform/docs/docs/deployment/docker.md b/platform/docs/docs/deployment/docker.md index addfeaa9047..d79c3eb3d05 100644 --- a/platform/docs/docs/deployment/docker.md +++ b/platform/docs/docs/deployment/docker.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 5 --- # Docker diff --git a/platform/docs/docs/deployment/google-cloud-healthcare.md b/platform/docs/docs/deployment/google-cloud-healthcare.md index 80a654d2620..73b37855421 100644 --- a/platform/docs/docs/deployment/google-cloud-healthcare.md +++ b/platform/docs/docs/deployment/google-cloud-healthcare.md @@ -1,5 +1,5 @@ --- -sidebar_position: 9 +sidebar_position: 10 --- # Google Cloud Healthcare @@ -128,3 +128,12 @@ cd OHIFViewer yarn install APP_CONFIG=config/google.js yarn run dev ``` + +## Configuring Google Cloud Healthcare as a datasource in OHIF + +A Google Cloud Healthcare DICOM store can be configured as a DICOMweb datasource +in OHIF. A full or partial path is permitted in the configuration file. For +partial paths, the [data source configuration UI](../configuration/dataSources/configuration-ui.md) +will assist in filling in the missing pieces. For example, a configuration with +empty `wadoUriRoot`, `qidoRoot` and `wadoRoot` will prompt for the entire path +step-by-step starting with the project. diff --git a/platform/docs/docs/deployment/iframe.md b/platform/docs/docs/deployment/iframe.md index 50ae28cec8b..4642f728126 100644 --- a/platform/docs/docs/deployment/iframe.md +++ b/platform/docs/docs/deployment/iframe.md @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 8 sidebar_label: iframe --- @@ -47,7 +47,7 @@ Then run the ```bash npx http-server unzipped-folder -# you can use npx serve ./dist -l 8080 -s as an alternative to http-server +# you can use npx serve ./dist -c ../public/serve.json as an alternative to http-server ``` You should be able to see diff --git a/platform/docs/docs/deployment/nginx--image-archive.md b/platform/docs/docs/deployment/nginx--image-archive.md index 5d96443e58f..5f8dc5166c7 100644 --- a/platform/docs/docs/deployment/nginx--image-archive.md +++ b/platform/docs/docs/deployment/nginx--image-archive.md @@ -1,5 +1,5 @@ --- -sidebar_position: 8 +sidebar_position: 9 --- # Nginx + Image Archive diff --git a/platform/docs/docs/deployment/static-assets.md b/platform/docs/docs/deployment/static-assets.md index 68b4fb9b3fc..4186a1b3cca 100644 --- a/platform/docs/docs/deployment/static-assets.md +++ b/platform/docs/docs/deployment/static-assets.md @@ -155,6 +155,22 @@ accurate documentation, we will link to each provider's own recommended steps: ### Azure -- [Host a Static Website](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website) + - Deploying viewer to Azure blob storage as a static website: + Refer to [Host a static website](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-blob-static-website) + High level steps : + 1. Go to Azure portal and create a storage account. + 2. Under Overview->Capabilities, select Static website. + 3. Enable Static website. Set the index document as ‘index.html’. + 4. Copy the primary endpoint. This will serve as the root URL for the viewer. + 5. Save. A new container named ‘$web’ will be created. + 6. Copy OHIF viewer’s build output from ‘platform\app\dist’ folder to the ‘$web’ container. + 7. Open browser and navigate to the viewer root URL copied in the step above. It should display OHIF viewer with data from default data source. + + ![image](https://github.com/OHIF/Viewers/assets/132684122/236a574b-0f05-4d90-a721-df8720d05949) + Special consideration while accessing DicomJson data source : + • Due to the way routing is handled in react, it may error out in production when trying to display data through dicomJson data source. E.g. https://[Static Website endpoint]/viewer/dicomjson?url= https://ohif-dicom-json-example.s3.amazonaws.com/LIDC-IDRI-0001.json + • Resolution to this is to set error page to ‘index.html’ at the website level. This will ensure that all errors are redirected to root and requests are further served from root path. + ![image](https://github.com/OHIF/Viewers/assets/132684122/87696c90-c344-489a-af15-b992434555f9) + - [Add SSL Support](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-https-custom-domain-cdn) - [Configure a Custom Domain](https://docs.microsoft.com/en-us/azure/storage/blobs/storage-custom-domain-name) diff --git a/platform/docs/docs/deployment/user-account-control.md b/platform/docs/docs/deployment/user-account-control.md index 78c9876fd8c..d67708df1e0 100644 --- a/platform/docs/docs/deployment/user-account-control.md +++ b/platform/docs/docs/deployment/user-account-control.md @@ -1,5 +1,5 @@ --- -sidebar_position: 10 +sidebar_position: 11 --- # User Account Control diff --git a/platform/docs/docs/development/continuous-integration.md b/platform/docs/docs/development/continuous-integration.md index 72acbbcbdb1..48ad4c4d097 100644 --- a/platform/docs/docs/development/continuous-integration.md +++ b/platform/docs/docs/development/continuous-integration.md @@ -1,5 +1,5 @@ --- -sidebar_position: 7 +sidebar_position: 8 sidebar_label: Continuous Integration --- diff --git a/platform/docs/docs/development/contributing.md b/platform/docs/docs/development/contributing.md index 763be20dd08..62c59341d88 100644 --- a/platform/docs/docs/development/contributing.md +++ b/platform/docs/docs/development/contributing.md @@ -1,5 +1,5 @@ --- -sidebar_position: 4 +sidebar_position: 5 sidebar_label: Contributing --- diff --git a/platform/docs/docs/development/link.md b/platform/docs/docs/development/link.md index 733ae5d0f2b..c06fa24e92b 100644 --- a/platform/docs/docs/development/link.md +++ b/platform/docs/docs/development/link.md @@ -1,5 +1,5 @@ --- -sidebar_position: 8 +sidebar_position: 9 sidebar_label: Local Linking --- diff --git a/platform/docs/docs/development/ohif-cli.md b/platform/docs/docs/development/ohif-cli.md index 0cd7ebc6aad..038f331a962 100644 --- a/platform/docs/docs/development/ohif-cli.md +++ b/platform/docs/docs/development/ohif-cli.md @@ -306,3 +306,7 @@ The ohif-cli will add the path to the external dependencies to the webpack confi so that you can install them in your project and use them in your custom extensions and modes. To achieve this ohif-cli will update the webpack.pwa.js file in the platform/app directory. + +## Video tutorials +See the [Video Tutorials](./video-tutorials.md) for videos of some the above +commands in action. diff --git a/platform/docs/docs/development/our-process.md b/platform/docs/docs/development/our-process.md index aaac77533d2..a420c9d4905 100644 --- a/platform/docs/docs/development/our-process.md +++ b/platform/docs/docs/development/our-process.md @@ -1,5 +1,5 @@ --- -sidebar_position: 5 +sidebar_position: 6 sidebar_label: Issue & PR Triage Process --- diff --git a/platform/docs/docs/development/testing.md b/platform/docs/docs/development/testing.md index c7c846aaa3d..23f2397553f 100644 --- a/platform/docs/docs/development/testing.md +++ b/platform/docs/docs/development/testing.md @@ -1,5 +1,5 @@ --- -sidebar_position: 6 +sidebar_position: 7 sidebar_label: Testing --- diff --git a/platform/docs/docs/development/video-tutorials.md b/platform/docs/docs/development/video-tutorials.md new file mode 100644 index 00000000000..482967e26fd --- /dev/null +++ b/platform/docs/docs/development/video-tutorials.md @@ -0,0 +1,68 @@ +--- +sidebar_position: 4 +sidebar_label: Video Tutorials +--- + +# Video Tutorials + +## Creating, Linking and Publishing OHIF Modes and Extensions + +The [OHIF CLI](./ohif-cli.md) facilitates the creation, linkage and publication +of OHIF modes and extensions. The videos below walk through how to use the CLI for +- creating modes and extensions +- linking local modes and extensions +- publishing modes and extensions to NPM +- adding published modes and extensions to OHIF +- submitting a mode to OHIF + +The videos build on top of one another whereby the mode and extension created +in each of the first two videos are published to NPM and then the published +entities are added to OHIF. + +### Creating and Linking a Mode + +The first video demonstrates the creation and linkage of a mode. +
+ +
+ +### Creating and Linking an Extension + +The second video creates and links an extension. The mode from the first +video is modified to reference the extension. +
+ +
+ +### Publishing an Extension to NPM + +The third video shows how the extension created in the second video can +be published to NPM. +
+ +
+ +### Publishing a Mode to NPM + +The fourth video shows how the mode created in the first video can be +published to NPM. +
+ +
+ +### Adding a Mode from NPM + +The fifth video adds the mode and extension published in NPM to OHIF. Note +that since the mode references the extension both are added with one CLI +command. +
+ +
+ +### Submitting a Mode to OHIF + +The sixth video demonstrates how a mode can be submitted to OHIF to have it +appear in OHIF's mode gallery. +
+ +
diff --git a/platform/docs/docs/faq.md b/platform/docs/docs/faq.md index 01d42ee9510..8746e5d9838 100644 --- a/platform/docs/docs/faq.md +++ b/platform/docs/docs/faq.md @@ -3,36 +3,45 @@ sidebar_position: 8 sidebar_label: FAQ --- -# Frequently Asked Questions -## Index +- [General FAQ](#general-faq) + - [How do I report a bug?](#how-do-i-report-a-bug) + - [How can I request a new feature?](#how-can-i-request-a-new-feature) + - [Who should I contact about Academic Collaborations?](#who-should-i-contact-about-academic-collaborations) + - [Does OHIF offer support?](#does-ohif-offer-support) + - [Does The OHIF Viewer have 510(k) Clearance from the U.S. F.D.A or CE Marking from the European Commission?](#does-the-ohif-viewer-have-510k-clearance-from-the-us-fda-or-ce-marking-from-the-european-commission) + - [Is The OHIF Viewer HIPAA Compliant?](#is-the-ohif-viewer-hipaa-compliant) +- [Technical FAQ](#technical-faq) + - [Why do I keep seeing a Cross Origin Isolation warning](#why-do-i-keep-seeing-a-cross-origin-isolation-warning) + - [What if my setup does not support the Shared Array Buffers API?](#what-if-my-setup-does-not-support-the-shared-array-buffers-api) + - [Viewer opens but does not show any thumbnails](#viewer-opens-but-does-not-show-any-thumbnails) + - [What are the list of required metadata for the OHIF Viewer to work?](#what-are-the-list-of-required-metadata-for-the-ohif-viewer-to-work) + - [Mandatory](#mandatory) + - [Optional](#optional) + - [How do I handle large volumes for MPR and Volume Rendering](#how-do-i-handle-large-volumes-for-mpr-and-volume-rendering) + - [`useNorm16Texture`](#usenorm16texture) + - [`preferSizeOverAccuracy`](#prefersizeoveraccuracy) -- [Report a bug][report-bug] -- [Request a feature][new-feature] -- [Commercial Support & Consulting][commercial-support] -- [Academic collaborations][academic] -- [FDA Clearance or CE Marking][fda-clearance] -- [HIPAA Compliance][hipaa] -### How do I report a bug? +# General FAQ + + +## How do I report a bug? Navigate to our [GitHub Repository][new-issue], and submit a new bug report. Follow the steps outlined in the [Bug Report Template][bug-report-template]. -### How can I request a new feature? +## How can I request a new feature? At the moment we are in the process of defining our roadmap and will do our best to communicate this to the community. If your requested feature is on the roadmap, then it will most likely be built at some point. If it is not, you are welcome to build it yourself and [contribute it](development/contributing.md). If you have resources and would like to fund the development of a feature, -please [contact us](https://www.ohif.org) or work with community members that -offer [consulting services][commercial-support]. +please [contact us](https://ohif.org/get-support). -### Why do I keep seeing a Cross Origin Isolation warning -If you encounter a warning while running OHIF indicating that your application is not cross-origin isolated, it implies that volume rendering, such as MPR, will not function properly since they depend on Shared Array Buffers. To resolve this issue, we recommend referring to our comprehensive guide on Cross Origin Isolation available at [./deployment/cors.md](./deployment/cors.md). -### Who should I contact about Academic Collaborations? +## Who should I contact about Academic Collaborations? [Gordon J. Harris](https://www.dfhcc.harvard.edu/insider/member-detail/member/gordon-j-harris-phd/) at Massachusetts General Hospital is the primary contact for any academic @@ -40,12 +49,12 @@ collaborators. We are always happy to hear about new groups interested in using the OHIF framework, and may be able to provide development support if the proposed collaboration has an impact on cancer research. -### Does OHIF offer support? +## Does OHIF offer support? yes, you can contact us for more information [here](https://ohif.org/get-support) -### Does The OHIF Viewer have [510(k) Clearance][501k-clearance] from the U.S. F.D.A or [CE Marking][ce-marking] from the European Commission? +## Does The OHIF Viewer have [510(k) Clearance][501k-clearance] from the U.S. F.D.A or [CE Marking][ce-marking] from the European Commission? **NO.** The OHIF Viewer is **NOT** F.D.A. cleared or CE Marked. It is the users' responsibility to ensure compliance with applicable rules and regulations. The @@ -56,28 +65,226 @@ for a product built using the platform. If you have gone this route (or are going there), please let us know because we would be interested to hear about your experience. -### Is The OHIF Viewer [HIPAA][hipaa-def] Compliant? +## Is The OHIF Viewer [HIPAA][hipaa-def] Compliant? **NO.** The OHIF Viewer **DOES NOT** fulfill all of the criteria to become HIPAA Compliant. It is the users' responsibility to ensure compliance with applicable rules and regulations. +# Technical FAQ + +## Why do I keep seeing a Cross Origin Isolation warning +If you encounter a warning while running OHIF indicating that your application is not cross-origin isolated, it implies that volume rendering, such as MPR, will not function properly since they depend on Shared Array Buffers. To resolve this issue, we recommend referring to our comprehensive guide on Cross Origin Isolation available at [our dedicated cors page](./deployment/cors.md). + +## What if my setup does not support the Shared Array Buffers API? +You can simply disable that by adding the `useSharedArrayBuffer: 'FALSE'` (notice the string FALSE), and the volumes will only use a regular +array buffer which is a bit slower but will work on all browsers. + + +## Viewer opens but does not show any thumbnails + +Thumbnails may not appear in your DICOMWeb application for various reasons. This guide focuses on one primary scenario, which is you are using +the `supportsWildcard: true` in your configuration file while your sever does not support it. +One + +For instance for the following filtering in the worklist tab we send this request + +![](assets/img/filtering-worklist.png) + +`https://d33do7qe4w26qo.cloudfront.net/dicomweb/studies?PatientName=*Head*&limit=101&offset=0&fuzzymatching=false&includefield=00081030%2C00080060` + +Which our server can respond properly. If your server does not support this type of filtering, you can disable it by setting `supportsWildcard: false` in your configuration file, +or edit your server code to support it for instance something like + +```js +Pseudocode: +For each filter in filters: + if filter.value contains "*": + Convert "*" to SQL LIKE wildcard ("%") + Add "metadataField LIKE ?" to query + else: + Add "metadataField = ?" to query +``` + + + +## What are the list of required metadata for the OHIF Viewer to work? + + +### Mandatory + +**All Modalities** + +- `StudyInstanceUID`, `SeriesInstanceUID`, `SOPInstanceUID`: Unique identifiers for the study, series, and object. +- `PhotometricInterpretation`: Describes the color space of the image. +- `Rows`, `Columns`: Image dimensions. +- `PixelRepresentation`: Indicates how pixel data should be interpreted. +- `Modality`: Type of modality (e.g., CT, MR, etc.). +- `PixelSpacing`: Spacing between pixels. +- `BitsAllocated`: Number of bits allocated for each pixel sample. +- `SOPClassUID`: Specifies the DICOM service class of the object (though you might be able to render without it for most regular images datasets, but it is pretty normal to have it) + +**Rendering** + +You need to have the following tags for the viewer to render the image properly, otherwise you should +use the windowing tools to adjust the image to your liking: + +- `RescaleIntercept`, `RescaleSlope`: Values used for rescaling pixel values for visualization. +- `WindowCenter`, `WindowWidth`: Windowing parameters for display. + +**Some Datasets** + +- `InstanceNumber`: Useful for sorting instances (without it the instances might be out of order) + +**For MPR (Multi-Planar Reformatting) rendering and tools** + +- `ImagePositionPatient`, `ImageOrientationPatient`: Position and orientation of the image in the patient. + +**SEG (Segmentation)** + +- `FrameOfReferenceUID` for handling segmentation layers. +- sequences + - `ReferencedSeriesSequence` + - `SharedFunctionalGroupsSequence` + - `PerFrameFunctionalGroupsSequence` + +**RTSTRUCT (Radiotherapy Structure)** + +- `FrameOfReferenceUID` for handling segmentation layers. +- sequences + - `ROIContourSequence` + - `StructureSetROISequence` + - `ReferencedFrameOfReferenceSequence` + +**US (Ultrasound)** + +- `NumberOfFrames`: Number of frames in a multi-frame image. +- `SequenceOfUltrasoundRegions`: For measurements. +- `FrameTime`: Time between frames if specified. + +**SR (Structured Reporting)** + +- Various sequences for encoding the report content and template. + - `ConceptNameCodeSequence` + - `ContentSequence` + - `ContentTemplateSequence` + - `CurrentRequestedProcedureEvidenceSequence` + - `ContentTemplateSequence` + - `CodingSchemeIdentificationSequence` + +**PT with SUV Correction (Positron Tomography Standardized Uptake Value)** + +- Sequences and tags related to radiopharmaceuticals, units, corrections, and timing. + - `RadiopharmaceuticalInformationSequence` + - `SeriesDate` + - `SeriesTime` + - `CorrectedImage` + - `Units` + - `DecayCorrection` + - `AcquisitionDate` + - `AcquisitionTime` + - `PatientWeight` + +**PDF** + +- `EncapsulatedDocument`: Contains the PDF document. + +**Video** + +- `NumberOfFrames`: Video frame count . + + +### Optional +There are various other optional tags that will add to the viewer experience, but are not required for basic functionality. These include: +Patient Information, Study Information, Series Information, Instance Information, and Frame Information. + + +## How do I handle large volumes for MPR and Volume Rendering + +Currently there are two ways to handle large volumes for MPR and Volume Rendering if that does not +fit in the memory of the client machine. + +### `useNorm16Texture` + +WebGL officially supports only 8-bit and 32-bit data types. For most images, 8 bits are not enough, and 32 bits are too much. However, we have to use the 32-bit data type for volume rendering and MPR, which results in suboptimal memory consumption for the application. + +Through [EXT_texture_norm16](https://registry.khronos.org/webgl/extensions/EXT_texture_norm16/) , WebGL can support 16 bit data type which is ideal +for most images. You can look into the [webgl report](https://webglreport.com/?v=2) to check if you have that extension enabled. + +![](assets/img/webgl-report-norm16.png) + + +This is a flag that you can set in your [configuration file](./configuration/configurationFiles.md) to force usage of 16 bit data type for the volume rendering and MPR. This will reduce the memory usage by half. + + +For instance for a large pt/ct study + +![](assets/img/large-pt-ct.png) + +Before (without the flag) the app shows 399 MB of memory usage + +![](assets/img/memory-profiling-regular.png) + + +After (with flag, running locally) the app shows 249 MB of memory usage + + +![](assets/img/webgl-int16.png) + +:::note +Using the 16 bit texture (if supported) will not have any effect in the rendering what so ever, and pixelData +would be exactly shown as it is. For datasets that cannot be represented with 16 bit data type, the flag will be ignored +and the 32 bit data type will be used. + + +Read more about these discussions in our PRs +- https://github.com/Kitware/vtk-js/pull/2058 +::: + + +:::warning +Although the support for 16 bit data type is available in WebGL, in some settings (e.g., Intel-based Macos) there seems +to be still some issues with it. You can read and track bugs below. + +- https://bugs.chromium.org/p/chromium/issues/detail?id=1246379 +- https://bugs.chromium.org/p/chromium/issues/detail?id=1408247 +::: + +### `preferSizeOverAccuracy` + +This is another flag that you can set in your [configuration file](./configuration/configurationFiles.md) to force the usage of the `half_float` data type for volume rendering and MPR. The main reason to choose this option over `useNorm16Texture` is its broader support across hardware and browsers. However, it is less accurate than the 16-bit data type and may lead to some rendering artifacts. + +```js +Integers between 0 and 2048 can be exactly represented (and also between −2048 and 0) +Integers between 2048 and 4096 round to a multiple of 2 (even number) +Integers between 4096 and 8192 round to a multiple of 4 +Integers between 8192 and 16384 round to a multiple of 8 +Integers between 16384 and 32768 round to a multiple of 16 +Integers between 32768 and 65519 round to a multiple of 32 +``` + +As you see in the ranges above 2048 there will be inaccuracies in the rendering. + +Memory snapshot after enabling `preferSizeOverAccuracy` for the same study as above + +![](assets/img/preferSizeOverAccuracy.png) + + + + - - - +[general]: #general +[technical]: #technical [report-bug]: #how-do-i-report-a-bug [new-feature]: #how-can-i-request-a-new-feature [commercial-support]: #does-ohif-offer-commercial-support [academic]: #who-should-i-contact-about-academic-collaborations [fda-clearance]: #does-the-ohif-viewer-have-510k-clearance-from-the-us-fda-or-ce-marking-from-the-european-commission [hipaa]: #is-the-ohif-viewer-hipaa-compliant - [501k-clearance]: https://www.fda.gov/MedicalDevices/DeviceRegulationandGuidance/HowtoMarketYourDevice/PremarketSubmissions/PremarketNotification510k/ [ce-marking]: https://ec.europa.eu/growth/single-market/ce-marking_en [hipaa-def]: https://en.wikipedia.org/wiki/Health_Insurance_Portability_and_Accountability_Act [new-issue]: https://github.com/OHIF/Viewers/issues/new/choose [bug-report-template]: https://github.com/OHIF/Viewers/issues/new?assignees=&labels=Bug+Report+%3Abug%3A&template=---bug-report.md&title= - diff --git a/platform/docs/docs/migration-guide.md b/platform/docs/docs/migration-guide.md index fcf45aadd3a..c252d23c899 100644 --- a/platform/docs/docs/migration-guide.md +++ b/platform/docs/docs/migration-guide.md @@ -1,6 +1,6 @@ --- sidebar_position: 10 -sidebar_label: Migration Guide (NEW) +sidebar_label: Migration Guide --- # Migration Guide diff --git a/platform/docs/docs/platform/extensions/modules/data-source.md b/platform/docs/docs/platform/extensions/modules/data-source.md index 6cbb741d36d..7b7a2d5060c 100644 --- a/platform/docs/docs/platform/extensions/modules/data-source.md +++ b/platform/docs/docs/platform/extensions/modules/data-source.md @@ -81,7 +81,6 @@ You can take a look at `dicomweb` data source implementation to get an idea `extensions/default/src/DicomWebDataSource/index.js` but here here are some important api endpoints that you need to implement: - - `initialize`: This method is called when the data source is first created in the mode.tsx, it is used to initialize the data source and set the configuration. For instance, `dicomwebDatasource` uses this method to grab the StudyInstanceUID from the URL and set it as the active study, as opposed to `dicomJSONDatasource` which uses url in the browser to fetch the data and store it in a cache - `query.studies.search`: This is used in the study panel on the left to fetch the prior studies for the same MRN which is then used to display on the `All` tab. it is also used in the Worklist to show all the studies from the server. - `query.series.search`: This is used to fetch the series information for a given study that is expanded in the Worklist. @@ -89,8 +88,6 @@ important api endpoints that you need to implement: - `retrieve.series.metadata`: It is a crucial end point that is used to fetch series level metadata which for hanging displaySets and displaySet creation. - `store.dicom`: If you don't need store functionality, you can skip this method. This is used to store the data in the backend. - - ## Static WADO Client If the configuration for the data source has the value staticWado set, then it @@ -172,3 +169,44 @@ extensionManager.updateDataSourceConfiguration( "dicomweb", }, ); ``` + +## Merge Data Source +The built-in merge data source is a useful tool for combining results from multiple data sources. +Currently, this data source only supports merging at the series level. This means that series from data source 'A' +and series from data source 'B' will be retrieved under the same study. If the same series exists in both data sources, +the first series arrived is the one that gets stored, and any other conflicting series will be ignored. + +The merge data source is particularly useful when dealing with derived data that is generated and stored in different servers. +For example, it can be used to retrieve annotation series from one data source and input data (images) from another data source. + +A default data source can be defined as shown below. This allows defining which of the servers should be the +fallback server in case something goes wrong. + +Configuration Example: +```js +window.config = { + ... + dataSources: [ + { + sourceName: 'merge', + namespace: '@ohif/extension-default.dataSourcesModule.merge', + configuration: { + name: 'merge', + friendlyName: 'Merge dicomweb-1 and dicomweb-2 data at the series level', + seriesMerge: { + dataSourceNames: ['dicomweb-1', 'dicomweb-2'], + defaultDataSourceName: 'dicomweb-1' + }, + }, + }, + { + sourceName: 'dicomweb-1', + ... + }, + { + sourceName: 'dicomweb-2', + ... + }, + ], +}; +``` diff --git a/platform/docs/docs/platform/extensions/modules/hpModule.md b/platform/docs/docs/platform/extensions/modules/hpModule.md index 922d9e04ed1..40d627f2a74 100644 --- a/platform/docs/docs/platform/extensions/modules/hpModule.md +++ b/platform/docs/docs/platform/extensions/modules/hpModule.md @@ -403,6 +403,7 @@ viewportStructure: { ], }, }, + ``` @@ -559,3 +560,64 @@ Additional series level criteria, such as modality rules must be included at the }, ], ``` + + +## Callbacks + + +Hanging protocols in `OHIF-v3` provide the flexibility to define various callbacks that allow you to customize the behavior of your viewer when specific events occur during protocol execution. These callbacks are defined in the `ProtocolNotifications` type and can be added to your hanging protocol configuration. + +Each callback is an array of commands or actions that are executed when the event occurs. + +```js +[ + { + commandName: 'showDownloadViewportModal', + commandOptions: {} + } +] +``` + + +Here, we'll explain the available callbacks and their purposes: + +### `onProtocolExit` + +The `onProtocolExit` callback is executed after the protocol is exited and the new one is applied. This callback is useful for performing actions or executing commands when switching between hanging protocols. + +### `onProtocolEnter` + +The `onProtocolEnter` callback is executed after the protocol is entered and applied. You can use this callback to define actions or commands that should run when entering a specific hanging protocol. + +### `onLayoutChange` + +The `onLayoutChange` callback is executed before the layout change is started. You can use it to apply a specific hanging protocol based on the current layout or other criteria. + +### `onViewportDataInitialized` + +The `onViewportDataInitialized` callback is executed after the initial viewport grid data is set and all viewport data includes a designated display set. This callback runs during the initial layout setup for each stage. You can use it to perform actions or apply settings to the viewports at the start. + +Here is an example of how you can add these callbacks to your hanging protocol configuration: + +```javascript +const protocol = { + id: 'myProtocol', + name: 'My Protocol', + // rest of the protocol configuration + callbacks: { + onProtocolExit: [ + // Array of commands or actions to execute on protocol exit + ], + onProtocolEnter: [ + // Array of commands or actions to execute on protocol enter + ], + onLayoutChange: [ + // Array of commands or actions to execute on layout change + ], + onViewportDataInitialized: [ + // Array of commands or actions to execute on viewport data initialization + ], + }, + // protocolMatchingRules + // the rest +}; diff --git a/platform/docs/docs/platform/services/data/HangingProtocolService.md b/platform/docs/docs/platform/services/data/HangingProtocolService.md index f2e156b6336..de33e9bbd5d 100644 --- a/platform/docs/docs/platform/services/data/HangingProtocolService.md +++ b/platform/docs/docs/platform/services/data/HangingProtocolService.md @@ -356,6 +356,11 @@ ptDisplaySet: { attribute: 'sameAs', sameAttribute: 'FrameOfReferenceUID', sameDisplaySetId: 'ctDisplaySet', + constraint: { + equals: { + value: true, + }, + }, required: true, }, ... diff --git a/platform/docs/docs/platform/services/data/ToolbarService.md b/platform/docs/docs/platform/services/data/ToolbarService.md index f92cc385fb0..3acfb3e2d12 100644 --- a/platform/docs/docs/platform/services/data/ToolbarService.md +++ b/platform/docs/docs/platform/services/data/ToolbarService.md @@ -46,6 +46,8 @@ button is clicked by the user. - `getActiveTools`: returns the active tool + all the toggled-on tools +- `setDefaultTool`: sets the default tool that will be activated whenever the primary tool is deactivated without activating another/different tool + ## State ToolBarService has an internal state that gets updated per tool interaction and diff --git a/platform/docs/docs/platform/services/ui/viewport-grid-service.md b/platform/docs/docs/platform/services/ui/viewport-grid-service.md index ee610a98c82..6f8435905a2 100644 --- a/platform/docs/docs/platform/services/ui/viewport-grid-service.md +++ b/platform/docs/docs/platform/services/ui/viewport-grid-service.md @@ -33,6 +33,7 @@ is expected to support, [check out it's interface in `@ohif/core`][interface] | `getNumViewportPanes()` | Gets the number of visible viewport panes | | `getLayoutOptionsFromState(gridState)` | Utility method that produces a `ViewportLayoutOptions` based on the passed in state| | `getActiveViewportId()` | Returns the viewport Id of the active viewport in the grid| +| `getActiveViewportOptionByKey(key)` | Gets the specified viewport option field (key) for the active viewport | ## Implementations diff --git a/platform/docs/docs/release-notes.md b/platform/docs/docs/release-notes.md index 146f567b1d6..48491be16db 100644 --- a/platform/docs/docs/release-notes.md +++ b/platform/docs/docs/release-notes.md @@ -6,202 +6,5 @@ sidebar_label: Release Notes # Release Notes -## Current Release (master branch) -### OHIF Viewer v3.6 - Official Version 3 Release (June 2023) - -Check out the complete press announcement [here](https://ohif.org/newsletters/2023-06-08-ohif%20viewer%20v3%20official%20release%20&%20new%20nci%20funding--release). - -- Official OHIF v3 release: An important milestone achieved with OHIF v3 now at feature parity with v2 but with a more extensible and powerful framework. - -New Features: - -- DICOM Radiotherapy Structure Sets: Enhancement of DICOM RTSTRUCT rendering pipeline to better integrate with other segmentation types. -- Slide Microscopy: Slide microscopy code updated with the latest technologies from the DICOM Microscopy Library and SLIM Viewer. -- DICOM Uploader: New feature to easily upload DICOM files directly from the viewer to their PACS systems over DICOMWeb. -- Cornerstone DICOM Image Loader Migrated to TypeScript: Transition to the new TypeScript-based DICOM Image Loader library. -- Cornerstone3D 1.0 Release: Announcement of Cornerstone3D reaching version 1.0, indicating its readiness for production use. - -## Previous V3 Releases (on `v3-stable` branch, before merge to `master`) - -### OHIF Viewer v3.5 - Docker Build - -This update represents a minor release that is primarily focused on enhancing the development environment of the OHIF Viewer. It achieves this by integrating Docker build support, which is essential for streamlining the deployment process and ensuring consistent environments. Additionally, in an effort to optimize the development workflow, this release takes care of pushing changes to the master branch. Furthermore, it strategically splits the master branch from the release branch. This separation is crucial as it allows the developers to work more efficiently on the ongoing developments in the master branch, while simultaneously ensuring that the release branch remains stable and well-maintained. Such an approach underlines the commitment to both innovation and reliability. - - -### OHIF Viewer v3.4 - Segmentation Support (April 2023) -Check out the complete press announcement [here](https://ohif.org/newsletters/2023-04-03-new%20product%20features,%20grant%20updates%20and%20collaborations). - -- New Viewport State Preservation: Enhancements in state synchronization in OHIF Viewer for a seamless experience when switching between Multiplanar Reformatting (MPR) and other views. - -- Enhanced Hanging Protocol Matching: Improved hanging protocols for a faster, more user-friendly experience. - -- Customizable Context Menu: Expansion of context menu options allowing for greater customization and addition of sub-menus. - -- UI/UX Improvements: Revamped viewport header design and the addition of double-click functionality to maximize viewport. - -### OHIF Viewer v3.3 - Segmentation Support (November 2022) - -Check out the complete press announcement [here](https://ohif.org/newsletters/2022-11-21-ohif%20viewer:%20dicom%20segmentation%20support). - -- 3D Segmentation: Segmentations are natively loaded and rendered in 3D. The UI includes various interaction tools and rendering display preferences. Segmentation creation and editing tools are in development. - -- Fast and Optimized Multiplanar Reconstruction (MPR): The viewer now supports MPR visualization of volumes and segmentations, leading to significantly reduced memory footprint and improved performance. - -- New Collapsible Side Panels: The OHIF Viewer has redesigned side panels to be more compact and user friendly. - -- Context-aware Drag and Drop via Hanging Protocols: The viewer now allows a more seamless experience when dragging and dropping thumbnails. - -- New Tools: Two new tools have been added: Reference Lines and Stack Synchronizations. - - - -### OHIF Viewer v3.2 - Mode Gallery & TMTV Mode (August 2022) - -Check out the complete press announcement [here](https://ohif.org/newsletters/2022-08-18-mode%20gallery%20and%20tmtv%20mode). - -- New Total Metabolic Tumor Volume (TMTV) Workflow: This new mode includes high-performance rendering of volumetric data in ten distinct viewports, fusion of two series with adjustable colormaps, synchronization of the viewports for both camera and VOI settings, jump-to-click capability to synchronize navigation in all viewports, and support for exporting results. - -- OHIF Workflow Mode Gallery: This new feature is a one-stop shop for users to find, install, and use OHIF modes and share functionality with the community. The gallery is continuously updated with community-submitted modes. - - -### OHIF Viewer v3.1 - Cornerstone3D Integration (July 2022) - -Check out the complete press announcement [here](https://ohif.org/newsletters/2022-07-28-ohif%20&%20cornerstone3d%20integratione). - -- Cornerstone3D Integration: OHIF v3.1 has deprecated the legacy Cornerstone.js extension and replaced all functionality with Cornerstone3D. This includes updating the Measurement Tracking workflow mode. - -- GPU Accelerated 2D Rendering: The Cornerstone3D rendering engine now supports WebGL 2D textures for large images, increasing the interaction speed significantly compared to the legacy Cornerstone.js engine. - -- Upgraded Hanging Protocol Engine: The OHIF Hanging Protocol Engine has been updated for increased flexibility and ease of writing protocols. This includes the ability to position viewports in any non-grid layout and specify viewport configurations such as colormap, initial VOI, initial image to render, orientation, and more. - - -### OHIF Viewer v3.0 Public Beta Launch (September 2021) - -Check out the complete press announcement [here](https://ohif.org/newsletters/2021-09-14-ohif%20update:%20v3%20public%20beta%20launch--release). - -- UI has been completely redesigned with modularity and workflow modes in mind. -- New UI components have been built with Tailwind CSS -- Addition of workflow modes - - Often, medical imaging use cases involves lots of specific workflows that - reuse functionalities. We have added the capability of workflow modes, that - enable people to customize user interface and configure application for - specific workflow. - - The idea is to reuse the functionalities that extensions provide and create - a workflow. Brain segmentation workflow is different from prostate - segmentation in UI for sure; however, they share the segmentation tools that - can be re-used. - - Our vision is that technical people focus of developing extensions which - provides core functionalities, and experts to build modes by picking the - appropriate functionalities from each extension. - - - - - +You can find the detailed release notes on the OHIF website. Please visit [https://ohif.org/release-notes](https://ohif.org/release-notes) diff --git a/platform/docs/docusaurus.config.js b/platform/docs/docusaurus.config.js index bdcaa205b19..2c3022471e4 100644 --- a/platform/docs/docusaurus.config.js +++ b/platform/docs/docusaurus.config.js @@ -270,7 +270,7 @@ module.exports = { announcementBar: { id: 'healthimaging', content: - '🚀 AWS has announced the general availability of HealthImaging! Easily connect your OHIF to it. Learn more Here!! 🌟', + '🚀 The latest version of OHIF, v3.7, has been released. You can find the release notes by following this Link! 🌟', }, prism: { theme: require('prism-react-renderer/themes/github'), diff --git a/platform/docs/package.json b/platform/docs/package.json index 7b5f2128e41..0c181de802e 100644 --- a/platform/docs/package.json +++ b/platform/docs/package.json @@ -1,6 +1,6 @@ { "name": "ohif-docs", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "private": true, "workspaces": { "nohoist": [ @@ -27,14 +27,14 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "2.3.0", - "@docusaurus/plugin-client-redirects": "2.3.0", - "@docusaurus/plugin-google-gtag": "2.3.0", - "@docusaurus/plugin-ideal-image": "2.3.0", - "@docusaurus/plugin-pwa": "2.3.0", - "@docusaurus/preset-classic": "2.3.0", - "@docusaurus/remark-plugin-npm2yarn": "2.3.0", - "@docusaurus/theme-live-codeblock": "2.3.0", + "@docusaurus/core": "2.4.3", + "@docusaurus/plugin-client-redirects": "2.4.3", + "@docusaurus/plugin-google-gtag": "2.4.3", + "@docusaurus/plugin-ideal-image": "2.4.3", + "@docusaurus/plugin-pwa": "2.4.3", + "@docusaurus/preset-classic": "2.4.3", + "@docusaurus/remark-plugin-npm2yarn": "2.4.3", + "@docusaurus/theme-live-codeblock": "2.4.3", "@mdx-js/react": "^1.6.21", "@svgr/webpack": "^5.5.0", "classnames": "^2.3.2", diff --git a/platform/i18n/CHANGELOG.md b/platform/i18n/CHANGELOG.md index d9ba0e154c6..3e5ff49c496 100644 --- a/platform/i18n/CHANGELOG.md +++ b/platform/i18n/CHANGELOG.md @@ -3,6 +3,378 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Features + +* **i18n:** enhanced i18n support ([#3761](https://github.com/OHIF/Viewers/issues/3761)) ([d14a8f0](https://github.com/OHIF/Viewers/commit/d14a8f0199db95cd9e85866a011b64d6bf830d57)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + + +### Bug Fixes + +* **SM:** drag and drop is now fixed for SM ([#3813](https://github.com/OHIF/Viewers/issues/3813)) ([f1a6764](https://github.com/OHIF/Viewers/commit/f1a67647aed635437b188cea7cf5d5a8fb974bbe)) + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + + +### Features + +* **i18n:** enhanced i18n support ([#3730](https://github.com/OHIF/Viewers/issues/3730)) ([330e11c](https://github.com/OHIF/Viewers/commit/330e11c7ff0151e1096e19b8ffdae7d64cae280e)) + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + + +### Bug Fixes + +* **i18n:** display set(s) are two words for English messages ([#3711](https://github.com/OHIF/Viewers/issues/3711)) ([c3a5847](https://github.com/OHIF/Viewers/commit/c3a5847dcd3dce4f1c8d8b11af95f79e3f93f70d)) + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/i18n + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/i18n + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) **Note:** Version bump only for package @ohif/i18n diff --git a/platform/i18n/package.json b/platform/i18n/package.json index 38e1d953bc3..0d4312e5ed1 100644 --- a/platform/i18n/package.json +++ b/platform/i18n/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/i18n", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "Internationalization library for The OHIF Viewer", "author": "OHIF", "license": "MIT", diff --git a/platform/i18n/src/locales/de/AboutModal.json b/platform/i18n/src/locales/de/AboutModal.json index 29d0b30578b..c64654d6d2f 100644 --- a/platform/i18n/src/locales/de/AboutModal.json +++ b/platform/i18n/src/locales/de/AboutModal.json @@ -1,14 +1,14 @@ { + "About OHIF Viewer": "Über OHIF Viewer", "Browser": "Browser", - "Build Number": "Build-Nummer", - "Latest Master Commits": "Letzter Master Commit", + "Build number": "Build-Nummer", + "Last master commits": "Letzter Master Commit", "More details": "Mehr Details", "Name": "Name", - "About OHIF Viewer": "Über OHIF Viewer", "OS": "OS", "Report an issue": "Ein Problem melden", "Repository URL": "Repository URL", "Value": "Wert", - "Version Information": "Informationen zur Version", + "Version information": "Informationen zur Version", "Visit the forum": "Besuchen Sie das Forum" } diff --git a/platform/i18n/src/locales/de/Buttons.json b/platform/i18n/src/locales/de/Buttons.json index 9bf993f3625..9adac93e076 100644 --- a/platform/i18n/src/locales/de/Buttons.json +++ b/platform/i18n/src/locales/de/Buttons.json @@ -36,7 +36,7 @@ "Rectangle": "Rechteck", "Reset": "$t(Common:Reset)", "Reset View": "$t(Common:Reset)", - "Reset to Defaults": "Auf Default zurücksetzen", + "Reset to defaults": "Auf Default zurücksetzen", "Rotate Right": "Nach rechts drehen", "Rotate +90": "Drehen +90", "Sagittal": "Sagittal", diff --git a/platform/i18n/src/locales/de/StudyList.json b/platform/i18n/src/locales/de/StudyList.json index 2794ba89386..0759eb86176 100644 --- a/platform/i18n/src/locales/de/StudyList.json +++ b/platform/i18n/src/locales/de/StudyList.json @@ -9,5 +9,5 @@ "Description": "Beschreibung", "Study list": "Studienliste", "Instances": "Instanzen", - "Studies": "Studien" + "Number of studies": "Studien" } diff --git a/platform/i18n/src/locales/de/UserPreferencesModal.json b/platform/i18n/src/locales/de/UserPreferencesModal.json index 4ae672cbf7e..04790fdfc51 100644 --- a/platform/i18n/src/locales/de/UserPreferencesModal.json +++ b/platform/i18n/src/locales/de/UserPreferencesModal.json @@ -1,11 +1,11 @@ { "Cancel": "$t(Buttons:Cancel)", "No hotkeys found": "Keine Hotkeys gefunden.", - "Reset to Defaults": "$t(Buttons:Reset to Defaults)", + "Reset to defaults": "$t(Buttons:Reset to defaults)", "ResetDefaultMessage": "Einstellungen zurückgesetzt. Bitte speichern.", "Save": "$t(Buttons:Save)", "SaveMessage": "Gespeichert", - "User Preferences": "Benutzereinstellungen", + "User preferences": "Benutzereinstellungen", "Language": "Sprache", "General": "Allgemein" } diff --git a/platform/i18n/src/locales/en-US/AboutModal.json b/platform/i18n/src/locales/en-US/AboutModal.json index 55e0144c903..aa00fc0b67f 100644 --- a/platform/i18n/src/locales/en-US/AboutModal.json +++ b/platform/i18n/src/locales/en-US/AboutModal.json @@ -1,14 +1,18 @@ { + "About OHIF Viewer": "About OHIF Viewer", "Browser": "Browser", - "Build Number": "Build Number", - "Latest Master Commits": "Latest Master Commits", + "Build number": "Build Number", + "Commit hash": "Commit hash", + "Data citation": "Data citation", + "Important links": "Important links", + "Last master commits": "Latest Master Commits", "More details": "More details", "Name": "Name", - "OHIF Viewer - About": "OHIF Viewer - About", "OS": "OS", "Report an issue": "Report an issue", "Repository URL": "Repository URL", "Value": "Value", - "Version Information": "Version Information", + "Version information": "Version Information", + "Version number": "Version number", "Visit the forum": "Visit the forum" } diff --git a/platform/i18n/src/locales/en-US/Buttons.json b/platform/i18n/src/locales/en-US/Buttons.json index 7e5f23b36aa..4a2d259a732 100644 --- a/platform/i18n/src/locales/en-US/Buttons.json +++ b/platform/i18n/src/locales/en-US/Buttons.json @@ -39,7 +39,7 @@ "Rectangle": "Rectangle", "Reference Lines": "Reference Lines", "Reset": "$t(Common:Reset)", - "Reset to Defaults": "$t(Common:Reset) to Defaults", + "Reset to defaults": "$t(Common:Reset) to Defaults", "Rotate Right": "Rotate Right", "Sagittal": "Sagittal", "Save": "Save", diff --git a/platform/i18n/src/locales/en-US/Common.json b/platform/i18n/src/locales/en-US/Common.json index 2a9b748c32a..2cbb92cd38f 100644 --- a/platform/i18n/src/locales/en-US/Common.json +++ b/platform/i18n/src/locales/en-US/Common.json @@ -4,8 +4,10 @@ "Layout": "Layout", "LOAD": "LOAD", "Measurements": "Measurements", + "mm": "mm", "More": "More", "Next": "Next", + "No": "No", "NoStudyDate": "No Study Date", "Play": "Play", "Previous": "Previous", @@ -14,5 +16,6 @@ "Series": "Series", "Show": "Show", "Stop": "Stop", - "StudyDate": "Study Date" + "StudyDate": "Study Date", + "Yes": "Yes" } diff --git a/platform/i18n/src/locales/en-US/DatePicker.json b/platform/i18n/src/locales/en-US/DatePicker.json index 24187a1cf42..3add53f9e71 100644 --- a/platform/i18n/src/locales/en-US/DatePicker.json +++ b/platform/i18n/src/locales/en-US/DatePicker.json @@ -1,5 +1,9 @@ { "Clear dates": "Clear dates", + "Close": "$t(Common:Close)", "End Date": "End Date", - "Start Date": "Start Date" + "Last 7 days": "Last 7 days", + "Last 30 days": "Last 30 days", + "Start Date": "Start Date", + "Today": "Today" } diff --git a/platform/i18n/src/locales/en-US/ErrorBoundary.json b/platform/i18n/src/locales/en-US/ErrorBoundary.json new file mode 100644 index 00000000000..dcefb50b4b7 --- /dev/null +++ b/platform/i18n/src/locales/en-US/ErrorBoundary.json @@ -0,0 +1,8 @@ +{ + "Context": "Context", + "Error Message": "Error Message", + "Something went wrong": "Something went wrong", + "in": "in", + "Sorry, something went wrong there. Try again.": "Sorry, something went wrong there. Try again.", + "Stack Trace": "Stack Trace" +} diff --git a/platform/i18n/src/locales/en-US/HotkeysValidators.json b/platform/i18n/src/locales/en-US/HotkeysValidators.json new file mode 100644 index 00000000000..74665c1ac0b --- /dev/null +++ b/platform/i18n/src/locales/en-US/HotkeysValidators.json @@ -0,0 +1,6 @@ +{ + "Field can't be empty": "Field can't be empty", + "Hotkey is already in use": "\"{{action}}\" is already using the \"{{pressedKeys}}\" shortcut.", + "It's not possible to define only modifier keys (ctrl, alt and shift) as a shortcut": "It's not possible to define only modifier keys (ctrl, alt and shift) as a shortcut", + "Shortcut combination is not allowed": "{{pressedKeys}} shortcut combination is not allowed" +} diff --git a/platform/i18n/src/locales/en-US/MeasurementTable.json b/platform/i18n/src/locales/en-US/MeasurementTable.json index 9eb9b8d609d..008a8c8a4dd 100644 --- a/platform/i18n/src/locales/en-US/MeasurementTable.json +++ b/platform/i18n/src/locales/en-US/MeasurementTable.json @@ -3,7 +3,10 @@ "Delete": "Delete", "Description": "Description", "MAX": "MAX", + "Measurements": "Measurements", + "No, do not ask again": "No, do not ask again", "NonTargets": "NonTargets", "Relabel": "Relabel", - "Targets": "Targets" + "Targets": "Targets", + "Track measurements for this series?": "Track measurements for this series?" } diff --git a/platform/i18n/src/locales/en-US/Messages.json b/platform/i18n/src/locales/en-US/Messages.json index 13c4f7a7bdb..931bd939ad2 100644 --- a/platform/i18n/src/locales/en-US/Messages.json +++ b/platform/i18n/src/locales/en-US/Messages.json @@ -1,15 +1,16 @@ { + "Display Set Messages": "Display Set Messages", "1": "No valid instances found in series.", - "2": "DisplaySet has missing position information.", - "3": "DisplaySet is not a reconstructable 3D volume.", - "4": "Multi frame displaySet don't have pixel measurement information.", - "5": "Multi frame displaySet don't have orientation information.", - "6": "Multi frame displaySet don't have position information.", - "7": "DisplaySet has missing frames.", - "8": "DisplaySet has irregular spacing.", - "9": "DisplaySet has inconsistent dimensions between frames.", - "10": "DisplaySet has frames with inconsistent number of components.", - "11": "DisplaySet has frames with inconsistent orientations.", - "12": "DisplaySet has inconsistent position information.", - "13": "Unsupported displaySet." + "2": "Display set has missing position information.", + "3": "Display set is not a reconstructable 3D volume.", + "4": "Multi frame display sets do not have pixel measurement information.", + "5": "Multi frame display sets do not have orientation information.", + "6": "Multi frame display sets do not have position information.", + "7": "Display set has missing frames.", + "8": "Display set has irregular spacing.", + "9": "Display set has inconsistent dimensions between frames.", + "10": "Display set has frames with inconsistent number of components.", + "11": "Display set has frames with inconsistent orientations.", + "12": "Display set has inconsistent position information.", + "13": "Unsupported display set." } diff --git a/platform/i18n/src/locales/en-US/Modes.json b/platform/i18n/src/locales/en-US/Modes.json new file mode 100644 index 00000000000..813dfe9d63b --- /dev/null +++ b/platform/i18n/src/locales/en-US/Modes.json @@ -0,0 +1,8 @@ +{ + "Basic Dev Viewer": "Basic Dev Viewer", + "Basic Test Mode": "Basic Test Mode", + "Basic Viewer": "Basic Viewer", + "Microscopy": "Microscopy", + "Segmentation": "Segmentation", + "Total Metabolic Tumor Volume": "Total Metabolic Tumor Volume" +} diff --git a/platform/i18n/src/locales/en-US/SegmentationTable.json b/platform/i18n/src/locales/en-US/SegmentationTable.json new file mode 100644 index 00000000000..8d73016f326 --- /dev/null +++ b/platform/i18n/src/locales/en-US/SegmentationTable.json @@ -0,0 +1,18 @@ +{ + "Active": "Active", + "Add new segmentation": "Add new segmentation", + "Add segment": "Add segment", + "Add segmentation": "Add segmentation", + "Delete": "Delete", + "Display inactive segmentations": "Display inactive segmentations", + "Export DICOM SEG": "Export DICOM SEG", + "Download DICOM SEG": "Download DICOM SEG", + "Download DICOM RTSTRUCT": "Download DICOM RTSTRUCT", + "Fill": "Fill", + "Inactive segmentations": "Inactive segmentations", + "Opacity": "Opacity", + "Outline": "Outline", + "Rename": "Rename", + "Segmentation": "Segmentation", + "Size": "Size" +} diff --git a/platform/i18n/src/locales/en-US/StudyItem.json b/platform/i18n/src/locales/en-US/StudyItem.json new file mode 100644 index 00000000000..d6891379635 --- /dev/null +++ b/platform/i18n/src/locales/en-US/StudyItem.json @@ -0,0 +1,3 @@ +{ + "Tracked series": "{{trackedSeries}} Tracked series" +} diff --git a/platform/i18n/src/locales/en-US/StudyList.json b/platform/i18n/src/locales/en-US/StudyList.json index 3c2c731eca1..c64afdb7a3c 100644 --- a/platform/i18n/src/locales/en-US/StudyList.json +++ b/platform/i18n/src/locales/en-US/StudyList.json @@ -3,17 +3,18 @@ "ClearFilters": "Clear Filters", "Description": "Description", "Empty": "Empty", + "Filter list to 100 studies or less to enable sorting": "Filter the list to 100 studies or less to enable sorting", "Instances": "Instances", - "MRN": "MRN", - "NumOfStudiesHiggerThan100Message": "Filter the list to 100 studies or less to enable sorting", "Modality": "Modality", + "MRN": "MRN", + "Next": "Next >", + "No studies available": "No studies available", + "Number of studies": "Number of studies", + "Page": "Page", "PatientName": "Patient Name", "Previous": "< Back", - "Page": "Page", - "Next": "Next >", - "ResultsPerPage": "Results per page", - "Studies": "Studies", + "Results per page": "Results per page", "StudyDate": "Study Date", - "StudyDescription": "Description", - "StudyList": "Study List" + "StudyList": "Study List", + "Upload": "Upload" } diff --git a/platform/i18n/src/locales/en-US/ThumbnailTracked.json b/platform/i18n/src/locales/en-US/ThumbnailTracked.json new file mode 100644 index 00000000000..0fef3468eec --- /dev/null +++ b/platform/i18n/src/locales/en-US/ThumbnailTracked.json @@ -0,0 +1,5 @@ +{ + "Series is tracked": "Series is tracked", + "Series is untracked": "Series is untracked", + "Viewport": "Viewport" +} diff --git a/platform/i18n/src/locales/en-US/TooltipClipboard.json b/platform/i18n/src/locales/en-US/TooltipClipboard.json new file mode 100644 index 00000000000..0d85da6610a --- /dev/null +++ b/platform/i18n/src/locales/en-US/TooltipClipboard.json @@ -0,0 +1,4 @@ +{ + "Copied": "Copied", + "Failed to copy": "Failed to copy" +} diff --git a/platform/i18n/src/locales/en-US/TrackedCornerstoneViewport.json b/platform/i18n/src/locales/en-US/TrackedCornerstoneViewport.json new file mode 100644 index 00000000000..6da525f3416 --- /dev/null +++ b/platform/i18n/src/locales/en-US/TrackedCornerstoneViewport.json @@ -0,0 +1,6 @@ +{ + "Series is tracked and can be viewed in the measurement panel": + "Series is tracked and can be viewed in the measurement panel", + "Measurements for untracked series will not be shown in the measurements panel": + "Measurements for untracked series will not be shown in the measurements panel" +} diff --git a/platform/i18n/src/locales/en-US/UserPreferencesModal.json b/platform/i18n/src/locales/en-US/UserPreferencesModal.json index 33b331f598e..5e733546818 100644 --- a/platform/i18n/src/locales/en-US/UserPreferencesModal.json +++ b/platform/i18n/src/locales/en-US/UserPreferencesModal.json @@ -1,9 +1,9 @@ { "Cancel": "$t(Buttons:Cancel)", "No hotkeys found": "No hotkeys are configured for this application. Hotkeys can be configured in the application's app-config.js file.", - "Reset to Defaults": "$t(Buttons:Reset to Defaults)", + "Reset to defaults": "$t(Buttons:Reset to defaults)", "ResetDefaultMessage": "Preferences successfully reset to default.
You must Save to perform this action.", "Save": "$t(Buttons:Save)", "SaveMessage": "Preferences saved", - "User Preferences": "User Preferences" + "User preferences": "User Preferences" } diff --git a/platform/i18n/src/locales/en-US/index.js b/platform/i18n/src/locales/en-US/index.js index d8b19e6f84f..eb3d442ba5c 100644 --- a/platform/i18n/src/locales/en-US/index.js +++ b/platform/i18n/src/locales/en-US/index.js @@ -4,11 +4,19 @@ import CineDialog from './CineDialog.json'; import Common from './Common.json'; import DataSourceConfiguration from './DataSourceConfiguration.json'; import DatePicker from './DatePicker.json'; +import ErrorBoundary from './ErrorBoundary.json'; import Header from './Header.json'; +import HotkeysValidators from './HotkeysValidators.json'; import MeasurementTable from './MeasurementTable.json'; +import Modes from './Modes.json'; +import SegmentationTable from './SegmentationTable.json'; import SidePanel from './SidePanel.json'; import StudyBrowser from './StudyBrowser.json'; +import StudyItem from './StudyItem.json'; import StudyList from './StudyList.json'; +import TooltipClipboard from './TooltipClipboard.json'; +import ThumbnailTracked from './ThumbnailTracked.json'; +import TrackedCornerstoneViewport from './TrackedCornerstoneViewport.json'; import UserPreferencesModal from './UserPreferencesModal.json'; import ViewportDownloadForm from './ViewportDownloadForm.json'; import Messages from './Messages.json'; @@ -21,11 +29,19 @@ export default { Common, DataSourceConfiguration, DatePicker, + ErrorBoundary, Header, + HotkeysValidators, MeasurementTable, + Modes, + SegmentationTable, SidePanel, StudyBrowser, + StudyItem, StudyList, + TooltipClipboard, + ThumbnailTracked, + TrackedCornerstoneViewport, UserPreferencesModal, ViewportDownloadForm, Messages, diff --git a/platform/i18n/src/locales/es/AboutModal.json b/platform/i18n/src/locales/es/AboutModal.json index 74cab12b24b..22153c9fe61 100644 --- a/platform/i18n/src/locales/es/AboutModal.json +++ b/platform/i18n/src/locales/es/AboutModal.json @@ -1,14 +1,14 @@ { + "About OHIF Viewer": "Sobre OHIF Viewer", "Browser": "Navegador", - "Build Number": "Número de compilación", - "Latest Master Commits": "Últimos Master Commits", + "Build number": "Número de compilación", + "Last master commits": "Últimos Master Commits", "More details": "Más detalles", "Name": "Nombre", - "OHIF Viewer - About": "Sobre OHIF Viewer", "OS": "SO", "Report an issue": "Informar un problema", "Repository URL": "URL del repositorio", "Value": "Valor", - "Version Information": "Información de la versión", + "Version information": "Información de la versión", "Visit the forum": "Visita el foro" } diff --git a/platform/i18n/src/locales/es/Buttons.json b/platform/i18n/src/locales/es/Buttons.json index d7e0acfbfbc..ce1a1a999b8 100644 --- a/platform/i18n/src/locales/es/Buttons.json +++ b/platform/i18n/src/locales/es/Buttons.json @@ -32,7 +32,7 @@ "ROI Window": "Ventana ROI", "Rectangle": "Rectángulo", "Reset": "$t(Common:Reset)", - "Reset to Defaults": "$t(Common:Reset) por defecto", + "Reset to defaults": "$t(Common:Reset) por defecto", "Rotate Right": "Girar ->", "Sagittal": "Sagital", "Save": "Guardar", diff --git a/platform/i18n/src/locales/es/StudyList.json b/platform/i18n/src/locales/es/StudyList.json index b20d1c98cc4..8ff58c1a2b8 100644 --- a/platform/i18n/src/locales/es/StudyList.json +++ b/platform/i18n/src/locales/es/StudyList.json @@ -3,17 +3,16 @@ "ClearFilters": "Limpiar filtros", "Description": "Descripción", "Empty": "vacío", + "Filter list to 100 studies or less to enable sorting": "Filtre la lista a 100 estudios o menos para habilitar la clasificación", "Instances": "Instancias", "MRN": "MRN", - "NumOfStudiesHiggerThan100Message": "Filtre la lista a 100 estudios o menos para habilitar la clasificación", "Modality": "Modalidad", "PatientName": "Nombre paciente", "Previous": "< Anterior", "Page": "Página", "Next": "Siguiente >", - "ResultsPerPage": "Resultados por página", - "Studies": "Estudios", + "Results per page": "Resultados por página", + "Number of studies": "Estudios", "StudyDate": "Fecha del estudio", - "StudyDescription": "Descripción", "StudyList": "Lista de Estudios" } diff --git a/platform/i18n/src/locales/es/UserPreferencesModal.json b/platform/i18n/src/locales/es/UserPreferencesModal.json index 4534903afc9..f0a9fe8ca27 100644 --- a/platform/i18n/src/locales/es/UserPreferencesModal.json +++ b/platform/i18n/src/locales/es/UserPreferencesModal.json @@ -1,6 +1,6 @@ { "Cancel": "$t(Buttons:Cancel)", - "Reset to Defaults": "$t(Buttons:Reset to Defaults)", + "Reset to defaults": "$t(Buttons:Reset to defaults)", "Save": "$t(Buttons:Save)", - "User Preferences": "Preferencias de Usuario" + "User preferences": "Preferencias de Usuario" } diff --git a/platform/i18n/src/locales/fr/Buttons.json b/platform/i18n/src/locales/fr/Buttons.json index 50e7dfadc45..c97dfaac667 100644 --- a/platform/i18n/src/locales/fr/Buttons.json +++ b/platform/i18n/src/locales/fr/Buttons.json @@ -31,7 +31,7 @@ "ROI Window": "ROI fenêtrage", "Rectangle": "Rectangle", "Reset": "$t(Common:Reset)", - "Reset to Defaults": "Valeurs d'usine", + "Reset to defaults": "Valeurs d'usine", "Rotate Right": "Tourner à droite", "Sagittal": "Sagittal", "Save": "Sauvegarder", diff --git a/platform/i18n/src/locales/fr/UserPreferencesModal.json b/platform/i18n/src/locales/fr/UserPreferencesModal.json index 506547fd98c..424cfe98ef9 100644 --- a/platform/i18n/src/locales/fr/UserPreferencesModal.json +++ b/platform/i18n/src/locales/fr/UserPreferencesModal.json @@ -1,6 +1,6 @@ { "Cancel": "$t(Buttons:Cancel)", - "Reset to Defaults": "$t(Buttons:Reset to Defaults)", + "Reset to defaults": "$t(Buttons:Reset to defaults)", "Save": "$t(Buttons:Save)", - "User Preferences": "Préférences utilisateur" + "User preferences": "Préférences utilisateur" } diff --git a/platform/i18n/src/locales/ja-JP/Buttons.json b/platform/i18n/src/locales/ja-JP/Buttons.json index aed8434026f..43934aa65c8 100644 --- a/platform/i18n/src/locales/ja-JP/Buttons.json +++ b/platform/i18n/src/locales/ja-JP/Buttons.json @@ -31,7 +31,7 @@ "ROI Window": "ROIウィンドウ", "Rectangle": "長方形", "Reset": "$t(Common:Reset)", - "Reset to Defaults": "デフォルトへ$t(Common:Reset)", + "Reset to defaults": "デフォルトへ$t(Common:Reset)", "Rotate Right": "右に回転", "Sagittal": "サジタル", "Save": "保存", diff --git a/platform/i18n/src/locales/ja-JP/UserPreferencesModal.json b/platform/i18n/src/locales/ja-JP/UserPreferencesModal.json index b7215966cbe..80a545b4f9a 100644 --- a/platform/i18n/src/locales/ja-JP/UserPreferencesModal.json +++ b/platform/i18n/src/locales/ja-JP/UserPreferencesModal.json @@ -1,6 +1,6 @@ { "Cancel": "$t(Buttons:Cancel)", - "Reset to Defaults": "$t(Buttons:Reset to Defaults)", + "Reset to defaults": "$t(Buttons:Reset to defaults)", "Save": "$t(Buttons:Save)", - "User Preferences": "ユーザプレファレンス" + "User preferences": "ユーザプレファレンス" } diff --git a/platform/i18n/src/locales/pt-BR/AboutModal.json b/platform/i18n/src/locales/pt-BR/AboutModal.json index 23ccac43ab2..00e56c64124 100644 --- a/platform/i18n/src/locales/pt-BR/AboutModal.json +++ b/platform/i18n/src/locales/pt-BR/AboutModal.json @@ -1,14 +1,14 @@ { + "About OHIF Viewer": "OHIF Viewer - Sobre", "Browser": "Navegador", - "Build Number": "Número da compilação", - "Latest Master Commits": "Últimos Commits na Master", + "Build number": "Número da compilação", + "Last master commits": "Últimos Commits na Master", "More details": "Mais detalhes", "Name": "Nome", - "OHIF Viewer - About": "OHIF Viewer - Sobre", "OS": "SO", "Report an issue": "Informar um problema", "Repository URL": "URL do Repositório", "Value": "Valor", - "Version Information": "Informação da Versão", + "Version information": "Informação da Versão", "Visit the forum": "Visite o fórum" } diff --git a/platform/i18n/src/locales/pt-BR/Buttons.json b/platform/i18n/src/locales/pt-BR/Buttons.json index 0e910aed101..838e42bd93c 100644 --- a/platform/i18n/src/locales/pt-BR/Buttons.json +++ b/platform/i18n/src/locales/pt-BR/Buttons.json @@ -32,7 +32,7 @@ "ROI Window": "Janela ROI", "Rectangle": "Retângulo", "Reset": "$t(Common:Reset)", - "Reset to Defaults": "$t(Common:Reset) para o Padrão", + "Reset to defaults": "$t(Common:Reset) para o Padrão", "Rotate Right": "Girar à direita", "Sagittal": "Sagital", "Save": "Salvar", diff --git a/platform/i18n/src/locales/pt-BR/UserPreferencesModal.json b/platform/i18n/src/locales/pt-BR/UserPreferencesModal.json index 046be3c074d..6d85f2a9fd0 100644 --- a/platform/i18n/src/locales/pt-BR/UserPreferencesModal.json +++ b/platform/i18n/src/locales/pt-BR/UserPreferencesModal.json @@ -1,8 +1,8 @@ { "Cancel": "Cancelar", - "Reset to Defaults": "$t(Common:Reset) para Padrão", + "Reset to defaults": "$t(Common:Reset) para Padrão", "ResetDefaultMessage": "Preferências resetadas com sucesso.
Você deve Salvar para que essa ação seja realizada.", "Save": "Salvar", "SaveMessage": "Preferências salvas", - "User Preferences": "Preferências do Usuário" + "User preferences": "Preferências do Usuário" } diff --git a/platform/i18n/src/locales/test-LNG/AboutModal.json b/platform/i18n/src/locales/test-LNG/AboutModal.json index 55e0144c903..6608ef6c5b4 100644 --- a/platform/i18n/src/locales/test-LNG/AboutModal.json +++ b/platform/i18n/src/locales/test-LNG/AboutModal.json @@ -1,14 +1,18 @@ { + "About OHIF Viewer": "About OHIF Viewer", "Browser": "Browser", "Build Number": "Build Number", - "Latest Master Commits": "Latest Master Commits", + "Commit hash": "Commit hash", + "Data citation": "Data citation", + "Important links": "Important links", + "Last master commits": "Latest Master Commits", "More details": "More details", "Name": "Name", - "OHIF Viewer - About": "OHIF Viewer - About", "OS": "OS", "Report an issue": "Report an issue", "Repository URL": "Repository URL", "Value": "Value", - "Version Information": "Version Information", + "Version information": "Version Information", + "Version number": "Version number", "Visit the forum": "Visit the forum" } diff --git a/platform/i18n/src/locales/test-LNG/Buttons.json b/platform/i18n/src/locales/test-LNG/Buttons.json index 62e1cf81ff4..999309aa2b5 100644 --- a/platform/i18n/src/locales/test-LNG/Buttons.json +++ b/platform/i18n/src/locales/test-LNG/Buttons.json @@ -32,7 +32,7 @@ "ROI Window": "Test ROI Window", "Rectangle": "Test Rectangle", "Reset": "Test $t(Common:Reset)", - "Reset to Defaults": "Test $t(Common:Reset) to Defaults", + "Reset to defaults": "Test $t(Common:Reset) to Defaults", "Rotate Right": "Test Rotate Right", "Sagittal": "Test Sagittal", "Save": "Test Save", diff --git a/platform/i18n/src/locales/test-LNG/Common.json b/platform/i18n/src/locales/test-LNG/Common.json index 9c29646fe74..a809080484e 100644 --- a/platform/i18n/src/locales/test-LNG/Common.json +++ b/platform/i18n/src/locales/test-LNG/Common.json @@ -3,8 +3,10 @@ "Image": "Test Image", "Layout": "Test Layout", "Measurements": "Test Measurements", + "mm": "Test mm", "More": "Test More", "Next": "Test Next", + "No": "Test No", "Play": "Test Play", "Previous": "Test Previous", "Reset": "Test Reset", @@ -12,5 +14,6 @@ "Series": "Test Series", "Show": "Test Show", "Stop": "Test Stop", - "StudyDate": "Test Study Date" + "StudyDate": "Test Study Date", + "Yes": "Test Yes" } diff --git a/platform/i18n/src/locales/test-LNG/DatePicker.json b/platform/i18n/src/locales/test-LNG/DatePicker.json index 24187a1cf42..3add53f9e71 100644 --- a/platform/i18n/src/locales/test-LNG/DatePicker.json +++ b/platform/i18n/src/locales/test-LNG/DatePicker.json @@ -1,5 +1,9 @@ { "Clear dates": "Clear dates", + "Close": "$t(Common:Close)", "End Date": "End Date", - "Start Date": "Start Date" + "Last 7 days": "Last 7 days", + "Last 30 days": "Last 30 days", + "Start Date": "Start Date", + "Today": "Today" } diff --git a/platform/i18n/src/locales/test-LNG/ErrorBoundary.json b/platform/i18n/src/locales/test-LNG/ErrorBoundary.json new file mode 100644 index 00000000000..4077306b249 --- /dev/null +++ b/platform/i18n/src/locales/test-LNG/ErrorBoundary.json @@ -0,0 +1,8 @@ +{ + "Context": "Test Context", + "Error Message": "Test Error Message", + "Something went wrong": "Test Something went wrong", + "in": "in", + "Sorry, something went wrong there. Try again.": "Test Sorry, something went wrong there. Try again.", + "Stack Trace": "Test Stack Trace" +} diff --git a/platform/i18n/src/locales/test-LNG/HotkeysValidators.json b/platform/i18n/src/locales/test-LNG/HotkeysValidators.json new file mode 100644 index 00000000000..97348844000 --- /dev/null +++ b/platform/i18n/src/locales/test-LNG/HotkeysValidators.json @@ -0,0 +1,6 @@ +{ + "Field can't be empty": "Test Field can't be empty", + "Hotkey is already in use": "Test \"{{action}}\" is already using the \"{{pressedKeys}}\" shortcut.", + "It's not possible to define only modifier keys (ctrl, alt and shift) as a shortcut": "Test It's not possible to define only modifier keys (ctrl, alt and shift) as a shortcut", + "Shortcut combination is not allowed": "Test {{pressedKeys}} shortcut combination is not allowed" +} diff --git a/platform/i18n/src/locales/test-LNG/MeasurementTable.json b/platform/i18n/src/locales/test-LNG/MeasurementTable.json index 70e04dea018..f65da4815e1 100644 --- a/platform/i18n/src/locales/test-LNG/MeasurementTable.json +++ b/platform/i18n/src/locales/test-LNG/MeasurementTable.json @@ -6,7 +6,9 @@ "Delete": "Delete", "Description": "Description", "MAX": "MAX", + "No, do not ask again": "Test No, do not ask again", "NonTargets": "NonTargets", "Relabel": "Relabel", - "Targets": "Targets" + "Targets": "Targets", + "Track measurements for this series?": "Test Track measurements for this series?" } diff --git a/platform/i18n/src/locales/test-LNG/Messages.json b/platform/i18n/src/locales/test-LNG/Messages.json new file mode 100644 index 00000000000..acf153cac98 --- /dev/null +++ b/platform/i18n/src/locales/test-LNG/Messages.json @@ -0,0 +1,16 @@ +{ + "Display Set Messages": "Test Display Set Messages", + "1": "Test No valid instances found in series.", + "2": "Test Display set has missing position information.", + "3": "Test Display set is not a reconstructable 3D volume.", + "4": "Test Multi frame display sets do not have pixel measurement information.", + "5": "Test Multi frame display sets do not have orientation information.", + "6": "Test Multi frame display sets do not have position information.", + "7": "Test Display set has missing frames.", + "8": "Test Display set has irregular spacing.", + "9": "Test Display set has inconsistent dimensions between frames.", + "10": "Test Display set has frames with inconsistent number of components.", + "11": "Test Display set has frames with inconsistent orientations.", + "12": "Test Display set has inconsistent position information.", + "13": "Test Unsupported display set." +} diff --git a/platform/i18n/src/locales/test-LNG/Modes.json b/platform/i18n/src/locales/test-LNG/Modes.json index 058e7d5c224..a9f03e23274 100644 --- a/platform/i18n/src/locales/test-LNG/Modes.json +++ b/platform/i18n/src/locales/test-LNG/Modes.json @@ -1,3 +1,8 @@ { - "Basic Viewer": "Test Basic Viewer" + "Basic Dev Viewer": "Test Basic Dev Viewer", + "Basic Test Mode": "Test Basic Test Mode", + "Basic Viewer": "Test Basic Viewer", + "Microscopy": "Test Microscopy", + "Segmentation": "Test Segmentation", + "Total Metabolic Tumor Volume": "Test Total Metabolic Tumor Volume" } diff --git a/platform/i18n/src/locales/test-LNG/SegmentationTable.json b/platform/i18n/src/locales/test-LNG/SegmentationTable.json new file mode 100644 index 00000000000..45f6aae720b --- /dev/null +++ b/platform/i18n/src/locales/test-LNG/SegmentationTable.json @@ -0,0 +1,18 @@ +{ + "Active": "Test Active", + "Add new segmentation": "Test Add new segmentation", + "Add segment": "Test Add segment", + "Add segmentation": "Test Add segmentation", + "Delete": "Test Delete", + "Display inactive segmentations": "Test Display inactive segmentations", + "Export DICOM SEG": "Test Export DICOM SEG", + "Download DICOM SEG": "Test Download DICOM SEG", + "Download DICOM RTSTRUCT": "Test Download DICOM RTSTRUCT", + "Fill": "Test Fill", + "Inactive segmentations": "Test Inactive segmentations", + "Opacity": "Test Opacity", + "Outline": "Test Outline", + "Rename": "Test Rename", + "Segmentation": "Test Segmentation", + "Size": "Test Size" +} diff --git a/platform/i18n/src/locales/test-LNG/StudyItem.json b/platform/i18n/src/locales/test-LNG/StudyItem.json new file mode 100644 index 00000000000..b8a18966dfa --- /dev/null +++ b/platform/i18n/src/locales/test-LNG/StudyItem.json @@ -0,0 +1,3 @@ +{ + "Tracked series": "{{trackedSeries}} Test Tracked series" +} diff --git a/platform/i18n/src/locales/test-LNG/StudyList.json b/platform/i18n/src/locales/test-LNG/StudyList.json index 5e06459fbc4..5f9bf949f94 100644 --- a/platform/i18n/src/locales/test-LNG/StudyList.json +++ b/platform/i18n/src/locales/test-LNG/StudyList.json @@ -1,21 +1,23 @@ { + "Previous": "Test < Previous", "AccessionNumber": "Test Accession #", "Accession": "Test Accession", - "Next >": "Test Next >", - "< Previous": "Test < Previous", - "Results per page": "Test Results per page", + "Description": "Test Description", "Empty": "Test Empty", + "Filter list to 100 studies or less to enable sorting": "Test Filter list to 100 studies or less to enable sorting", + "Instances": "Test Instances", "MRN": "Test MRN", "Modality": "Test Modality", + "Next": "Test Next >", + "No studies available": "Test No studies available", + "Number of studies": "Test Number of studies", "PatientName": "Test PatientName", "Patient Name": "Test Patient Name", - "Description": "Test Description", + "Results per page": "Test Results per page", "StudyDate": "Test Study Date", "Study date": "Test Study Date", - "Studies": "Test Studies", "Series": "Test Series", - "Instances": "Test Instances", "Study List": "Test Study List", "Study list": "Test Study list", - "Filter list to 100 studies or less to enable sorting": "Test Filter list to 100 studies or less to enable sorting" + "Upload": "Test Upload" } diff --git a/platform/i18n/src/locales/test-LNG/ThumbnailTracked.json b/platform/i18n/src/locales/test-LNG/ThumbnailTracked.json new file mode 100644 index 00000000000..bfda28677f6 --- /dev/null +++ b/platform/i18n/src/locales/test-LNG/ThumbnailTracked.json @@ -0,0 +1,5 @@ +{ + "Series is tracked": "Test Series is tracked", + "Series is untracked": "Test Series is untracked", + "Viewport": "Test Viewport" +} diff --git a/platform/i18n/src/locales/test-LNG/TooltipClipboard.json b/platform/i18n/src/locales/test-LNG/TooltipClipboard.json new file mode 100644 index 00000000000..b21a54d518c --- /dev/null +++ b/platform/i18n/src/locales/test-LNG/TooltipClipboard.json @@ -0,0 +1,4 @@ +{ + "Copied": "Test Copied", + "Failed to copy": "Test Failed to copy" +} diff --git a/platform/i18n/src/locales/test-LNG/TrackedCornerstoneViewport.json b/platform/i18n/src/locales/test-LNG/TrackedCornerstoneViewport.json new file mode 100644 index 00000000000..2b6c50e8aa5 --- /dev/null +++ b/platform/i18n/src/locales/test-LNG/TrackedCornerstoneViewport.json @@ -0,0 +1,6 @@ +{ + "Series is tracked and can be viewed in the measurement panel": + "Test Series is tracked and can be viewed in the measurement panel", + "Measurements for untracked series will not be shown in the measurements panel": + "Test Measurements for untracked series will not be shown in the measurements panel" +} diff --git a/platform/i18n/src/locales/test-LNG/UserPreferencesModal.json b/platform/i18n/src/locales/test-LNG/UserPreferencesModal.json index c5ae4fde84e..e6c003feccb 100644 --- a/platform/i18n/src/locales/test-LNG/UserPreferencesModal.json +++ b/platform/i18n/src/locales/test-LNG/UserPreferencesModal.json @@ -1,11 +1,11 @@ { "Cancel": "$t(Buttons:Cancel)", "No hotkeys found": "No hotkeys are configured for this application. Hotkeys can be configured in the application's app-config.js file.", - "Reset to Defaults": "$t(Buttons:Reset to Defaults)", + "Reset to defaults": "$t(Buttons:Reset to defaults)", "ResetDefaultMessage": "Preferences successfully reset to default.
You must Save to perform this action.", "Save": "$t(Buttons:Save)", "SaveMessage": "Test Preferences saved", - "User Preferences": "Test User Preferences", + "User preferences": "Test User Preferences", "Function": "Test function", "Shortcut": "Test shortcut", "Language": "Test language", diff --git a/platform/i18n/src/locales/test-LNG/index.js b/platform/i18n/src/locales/test-LNG/index.js index f39132793b7..561161d2f20 100644 --- a/platform/i18n/src/locales/test-LNG/index.js +++ b/platform/i18n/src/locales/test-LNG/index.js @@ -3,17 +3,25 @@ import Buttons from './Buttons.json'; import CineDialog from './CineDialog.json'; import Common from './Common.json'; import DatePicker from './DatePicker.json'; +import ErrorBoundary from './ErrorBoundary.json'; import Header from './Header.json'; +import HotkeysValidators from './HotkeysValidators.json'; import MeasurementTable from './MeasurementTable.json'; +import Messages from './Messages.json'; +import Modals from './Modals.json'; +import Modes from './Modes.json'; +import PatientInfo from './PatientInfo.json'; +import SegmentationTable from './SegmentationTable.json'; +import SidePanel from './SidePanel.json'; +import StudyBrowser from './StudyBrowser.json'; +import StudyItem from './StudyItem.json'; import StudyList from './StudyList.json'; +import ToolTip from './ToolTip.json'; +import TooltipClipboard from './TooltipClipboard.json'; +import ThumbnailTracked from './ThumbnailTracked.json'; +import TrackedCornerstoneViewport from './TrackedCornerstoneViewport.json'; import UserPreferencesModal from './UserPreferencesModal.json'; import ViewportDownloadForm from './ViewportDownloadForm.json'; -import ToolTip from './ToolTip.json'; -import StudyBrowser from './StudyBrowser.json'; -import SidePanel from './SidePanel.json'; -import PatientInfo from './PatientInfo.json'; -import Modes from './Modes.json'; -import Modals from './Modals.json'; export default { 'test-LNG': { @@ -22,16 +30,24 @@ export default { CineDialog, Common, DatePicker, + ErrorBoundary, Header, + HotkeysValidators, MeasurementTable, + Messages, + Modals, + Modes, + PatientInfo, + SegmentationTable, + SidePanel, + StudyBrowser, + StudyItem, StudyList, + ToolTip, + TooltipClipboard, + ThumbnailTracked, + TrackedCornerstoneViewport, UserPreferencesModal, ViewportDownloadForm, - ToolTip, - StudyBrowser, - PatientInfo, - Modes, - SidePanel, - Modals, }, }; diff --git a/platform/i18n/src/locales/tr-TR/AboutModal.json b/platform/i18n/src/locales/tr-TR/AboutModal.json index 487e4082c6d..b60829bb75f 100644 --- a/platform/i18n/src/locales/tr-TR/AboutModal.json +++ b/platform/i18n/src/locales/tr-TR/AboutModal.json @@ -1,14 +1,14 @@ { + "About OHIF Viewer": "OHIF Viewer - Hakkında", "Browser": "Tarayıcı", - "Build Number": "Derleme Numarası", - "Latest Master Commits": "Son Kaynak Kod Güncellemesi", + "Build number": "Derleme Numarası", + "Last master commits": "Son Kaynak Kod Güncellemesi", "More details": "Daha Fazla Detay", "Name": "İsim", - "OHIF Viewer - About": "OHIF Viewer - Hakkında", "OS": "İşletim Sistemi", "Report an issue": "Sorun Bildir", "Repository URL": "Kaynak Kod URL", "Value": "Değer", - "Version Information": "Sürüm Bilgisi", + "Version information": "Sürüm Bilgisi", "Visit the forum": "Forumu ziyaret et" } diff --git a/platform/i18n/src/locales/tr-TR/Buttons.json b/platform/i18n/src/locales/tr-TR/Buttons.json index 83c2655c115..f397797c07d 100644 --- a/platform/i18n/src/locales/tr-TR/Buttons.json +++ b/platform/i18n/src/locales/tr-TR/Buttons.json @@ -32,7 +32,7 @@ "ROI Window": "ROI Penceresi", "Rectangle": "Diktörtgen", "Reset": "$t(Common:Reset)", - "Reset to Defaults": "Varsayılana $t(Common:Reset)", + "Reset to defaults": "Varsayılana $t(Common:Reset)", "Rotate Right": "Sağa Döndür", "Sagittal": "Sagital", "Save": "Kaydet", diff --git a/platform/i18n/src/locales/tr-TR/StudyList.json b/platform/i18n/src/locales/tr-TR/StudyList.json index 4eaea20ca85..956621411da 100644 --- a/platform/i18n/src/locales/tr-TR/StudyList.json +++ b/platform/i18n/src/locales/tr-TR/StudyList.json @@ -5,6 +5,6 @@ "Modality": "Modalite", "PatientName": "Hasta Adı", "StudyDate": "Çalışma Zamanı", - "StudyDescription": "Açıklama", + "Description": "Açıklama", "StudyList": "Çalışma Listesi" } diff --git a/platform/i18n/src/locales/tr-TR/UserPreferencesModal.json b/platform/i18n/src/locales/tr-TR/UserPreferencesModal.json index 1a843a3a4a3..16cf465933a 100644 --- a/platform/i18n/src/locales/tr-TR/UserPreferencesModal.json +++ b/platform/i18n/src/locales/tr-TR/UserPreferencesModal.json @@ -1,9 +1,9 @@ { "Cancel": "$t(Buttons:Cancel)", "No hotkeys found": "Bu uygulama için hiçbir kısayol tuşu yapılandırılmamış. Kısayol tuşları, uygulamanın app-config.js dosyasında yapılandırılabilir.", - "Reset to Defaults": "$t(Buttons:Reset to Defaults)", + "Reset to defaults": "$t(Buttons:Reset to defaults)", "ResetDefaultMessage": "Tercihler başarıyla varsayılana sıfırlandı.
Bu eylemi gerçekleştirmek için Kaydetmelisiniz.", "Save": "$t(Buttons:Save)", "SaveMessage": "Tercihler kaydedildi", - "User Preferences": "Kullanıcı tercihleri" + "User preferences": "Kullanıcı tercihleri" } diff --git a/platform/i18n/src/locales/vi/Buttons.json b/platform/i18n/src/locales/vi/Buttons.json index ea378b41a80..952ec814faa 100644 --- a/platform/i18n/src/locales/vi/Buttons.json +++ b/platform/i18n/src/locales/vi/Buttons.json @@ -31,7 +31,7 @@ "ROI Window": "ROI Window", "Rectangle": "Đo chữ nhật", "Reset": "$t(Common:Reset)", - "Reset to Defaults": "$t(Common:Reset) đến mặc định", + "Reset to defaults": "$t(Common:Reset) đến mặc định", "Rotate Right": "Xoay phải", "Sagittal": "Mặt phẳng đứng dọc", "Save": "Lưu", diff --git a/platform/i18n/src/locales/vi/StudyList.json b/platform/i18n/src/locales/vi/StudyList.json index 50acf54b68f..4f13a5e4f45 100644 --- a/platform/i18n/src/locales/vi/StudyList.json +++ b/platform/i18n/src/locales/vi/StudyList.json @@ -5,6 +5,6 @@ "Modality": "Thiết bị", "PatientName": "Tên Bệnh nhân", "StudyDate": "Ngày chụp", - "StudyDescription": "Diễn giải", + "Description": "Diễn giải", "StudyList": "Danh sách" } diff --git a/platform/i18n/src/locales/vi/UserPreferencesModal.json b/platform/i18n/src/locales/vi/UserPreferencesModal.json index f5474c9e5ed..38ad6eda722 100644 --- a/platform/i18n/src/locales/vi/UserPreferencesModal.json +++ b/platform/i18n/src/locales/vi/UserPreferencesModal.json @@ -1,6 +1,6 @@ { "Cancel": "$t(Buttons:Cancel)", - "Reset to Defaults": "$t(Buttons:Reset to Defaults)", + "Reset to defaults": "$t(Buttons:Reset to defaults)", "Save": "$t(Buttons:Save)", - "User Preferences": "Thiết lập theo người dùng" + "User preferences": "Thiết lập theo người dùng" } diff --git a/platform/i18n/src/locales/zh/Buttons.json b/platform/i18n/src/locales/zh/Buttons.json index ea57d0b3b3f..fe99f012365 100644 --- a/platform/i18n/src/locales/zh/Buttons.json +++ b/platform/i18n/src/locales/zh/Buttons.json @@ -49,7 +49,7 @@ "Probe": "探针", "Rectangle": "矩形", "Reference Lines": "参考线", - "Reset to Defaults": "返回默认", + "Reset to defaults": "返回默认", "Reset View": "复原", "Reset": "复原", "ROI Window": "选择对比度", diff --git a/platform/i18n/src/locales/zh/StudyList.json b/platform/i18n/src/locales/zh/StudyList.json index d7563ff5531..bbdf8bea732 100644 --- a/platform/i18n/src/locales/zh/StudyList.json +++ b/platform/i18n/src/locales/zh/StudyList.json @@ -1,9 +1,9 @@ { "Empty": "无", + "Filter list to 100 studies or less to enable sorting": "将检查列表过滤到 100 个或更少以启用排序", "Modality": "成像设备", "PatientName": "患者姓名", "StudyDate": "检查日期", - "StudyDescription": "描述", "StudyList": "检查列表", "Patient Name": "患者姓名", "MRN": "病例号", @@ -11,18 +11,17 @@ "Description": "描述", "Study list": "检查列表", "Clear filters": "清空条件", - "Studies": "", + "Number of studies": "", "Instances": "图像数", "Accession": "检查号", "Results per page": "每页条数", - "< Previous": "上一页", - "Next >": "下一页", + "Previous": "上一页", + "Next": "下一页", "Page": "页码", "Start Date": "开始日期", "Series": "序列", "No studies available": "没有数据", "Loading...": "加载中...", "Select...": "选择...", - "InstitutionName": "检查机构", - "Filter list to 100 studies or less to enable sorting": "将检查列表过滤到 100 个或更少以启用排序" + "InstitutionName": "检查机构" } diff --git a/platform/i18n/src/locales/zh/UserPreferencesModal.json b/platform/i18n/src/locales/zh/UserPreferencesModal.json index e71386abc67..41ddeddec6f 100644 --- a/platform/i18n/src/locales/zh/UserPreferencesModal.json +++ b/platform/i18n/src/locales/zh/UserPreferencesModal.json @@ -1,6 +1,6 @@ { "Cancel": "取消", - "Reset to Defaults": "返回默认", + "Reset to defaults": "返回默认", "Save": "保存", - "User Preferences": "用户偏好" + "User preferences": "用户偏好" } diff --git a/platform/ui/CHANGELOG.md b/platform/ui/CHANGELOG.md index daa291b6314..bf777f026b5 100644 --- a/platform/ui/CHANGELOG.md +++ b/platform/ui/CHANGELOG.md @@ -3,6 +3,395 @@ 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.36](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.35...v3.8.0-beta.36) (2023-12-15) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.35](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.34...v3.8.0-beta.35) (2023-12-14) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.34](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.33...v3.8.0-beta.34) (2023-12-13) + + +### Bug Fixes + +* **icon-style:** Ensure consistent icon dimensions ([#3727](https://github.com/OHIF/Viewers/issues/3727)) ([6ca13c0](https://github.com/OHIF/Viewers/commit/6ca13c0a4cb5a95bbb52b0db902b5dbf72f8aa6e)) + + + + + +# [3.8.0-beta.33](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.32...v3.8.0-beta.33) (2023-12-13) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.32](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.31...v3.8.0-beta.32) (2023-12-13) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.31](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.30...v3.8.0-beta.31) (2023-12-13) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.30](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.29...v3.8.0-beta.30) (2023-12-13) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.29](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.28...v3.8.0-beta.29) (2023-12-13) + + +### Bug Fixes + +* address and improve system vulnerabilities ([#3851](https://github.com/OHIF/Viewers/issues/3851)) ([805c532](https://github.com/OHIF/Viewers/commit/805c53270f243ec61f142a3ffa0af500021cd5ec)) + + +### Features + +* **i18n:** enhanced i18n support ([#3761](https://github.com/OHIF/Viewers/issues/3761)) ([d14a8f0](https://github.com/OHIF/Viewers/commit/d14a8f0199db95cd9e85866a011b64d6bf830d57)) + + + + + +# [3.8.0-beta.28](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.27...v3.8.0-beta.28) (2023-12-08) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.27](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.26...v3.8.0-beta.27) (2023-12-06) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.26](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.25...v3.8.0-beta.26) (2023-11-28) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.25](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.24...v3.8.0-beta.25) (2023-11-27) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.24](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.23...v3.8.0-beta.24) (2023-11-24) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.23](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.22...v3.8.0-beta.23) (2023-11-24) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.22](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.21...v3.8.0-beta.22) (2023-11-21) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.21](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.20...v3.8.0-beta.21) (2023-11-21) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.20](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.19...v3.8.0-beta.20) (2023-11-21) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.19](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.18...v3.8.0-beta.19) (2023-11-18) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.18](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.17...v3.8.0-beta.18) (2023-11-15) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.17](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.16...v3.8.0-beta.17) (2023-11-13) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.16](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.15...v3.8.0-beta.16) (2023-11-13) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.15](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.14...v3.8.0-beta.15) (2023-11-10) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.14](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.13...v3.8.0-beta.14) (2023-11-10) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.13](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.12...v3.8.0-beta.13) (2023-11-09) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.12](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.11...v3.8.0-beta.12) (2023-11-08) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.11](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.10...v3.8.0-beta.11) (2023-11-08) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.10](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.9...v3.8.0-beta.10) (2023-11-03) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.9](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.8...v3.8.0-beta.9) (2023-11-02) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.8](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.7...v3.8.0-beta.8) (2023-10-31) + + +### Features + +* **i18n:** enhanced i18n support ([#3730](https://github.com/OHIF/Viewers/issues/3730)) ([330e11c](https://github.com/OHIF/Viewers/commit/330e11c7ff0151e1096e19b8ffdae7d64cae280e)) + + + + + +# [3.8.0-beta.7](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.6...v3.8.0-beta.7) (2023-10-30) + + +### Features + +* **filters:** save worklist query filters to session storage so that they persist between navigation to the viewer and back ([#3749](https://github.com/OHIF/Viewers/issues/3749)) ([2a15ef0](https://github.com/OHIF/Viewers/commit/2a15ef0e44b7b4d8bbf5cb9363db6e523201c681)) + + + + + +# [3.8.0-beta.6](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.5...v3.8.0-beta.6) (2023-10-25) + + +### Bug Fixes + +* **toolbar:** allow customizable toolbar for active viewport and allow active tool to be deactivated via a click ([#3608](https://github.com/OHIF/Viewers/issues/3608)) ([dd6d976](https://github.com/OHIF/Viewers/commit/dd6d9768bbca1d3cc472e8c1e6d85822500b96ef)) + + + + + +# [3.8.0-beta.5](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.4...v3.8.0-beta.5) (2023-10-24) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.4](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.3...v3.8.0-beta.4) (2023-10-23) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.3](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.2...v3.8.0-beta.3) (2023-10-23) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.2](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.1...v3.8.0-beta.2) (2023-10-19) + + +### Bug Fixes + +* **cine:** Use the frame rate specified in DICOM and optionally auto play cine ([#3735](https://github.com/OHIF/Viewers/issues/3735)) ([d9258ec](https://github.com/OHIF/Viewers/commit/d9258eca70587cf4dc18be4e56c79b16bae73d6d)) + + + + + +# [3.8.0-beta.1](https://github.com/OHIF/Viewers/compare/v3.8.0-beta.0...v3.8.0-beta.1) (2023-10-19) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.8.0-beta.0](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.110...v3.8.0-beta.0) (2023-10-12) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.7.0-beta.110](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.109...v3.7.0-beta.110) (2023-10-11) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.7.0-beta.109](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.108...v3.7.0-beta.109) (2023-10-11) + + +### Bug Fixes + +* **export:** wrong export for the tmtv RT function ([#3715](https://github.com/OHIF/Viewers/issues/3715)) ([a3f2a1a](https://github.com/OHIF/Viewers/commit/a3f2a1a7b0d16bfcc0ecddc2ab731e54c5e377c8)) + + + + + +# [3.7.0-beta.108](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.107...v3.7.0-beta.108) (2023-10-10) + + +### Bug Fixes + +* **i18n:** display set(s) are two words for English messages ([#3711](https://github.com/OHIF/Viewers/issues/3711)) ([c3a5847](https://github.com/OHIF/Viewers/commit/c3a5847dcd3dce4f1c8d8b11af95f79e3f93f70d)) + + + + + +# [3.7.0-beta.107](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.106...v3.7.0-beta.107) (2023-10-10) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.7.0-beta.106](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.105...v3.7.0-beta.106) (2023-10-10) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.7.0-beta.105](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.104...v3.7.0-beta.105) (2023-10-10) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.7.0-beta.104](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.103...v3.7.0-beta.104) (2023-10-09) + +**Note:** Version bump only for package @ohif/ui + + + + + +# [3.7.0-beta.103](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.102...v3.7.0-beta.103) (2023-10-09) + +**Note:** Version bump only for package @ohif/ui + + + + + # [3.7.0-beta.102](https://github.com/OHIF/Viewers/compare/v3.7.0-beta.101...v3.7.0-beta.102) (2023-10-06) diff --git a/platform/ui/jest.config.js b/platform/ui/jest.config.js new file mode 100644 index 00000000000..2978b062ed1 --- /dev/null +++ b/platform/ui/jest.config.js @@ -0,0 +1,13 @@ +const base = require('../../jest.config.base.js'); +const pkg = require('./package'); + +module.exports = { + ...base, + name: pkg.name, + displayName: pkg.name, + // rootDir: "../.." + // testMatch: [ + // //`/platform/${pack.name}/**/*.spec.js` + // "/platform/app/**/*.test.js" + // ] +}; diff --git a/platform/ui/package.json b/platform/ui/package.json index 74908977144..e4221433852 100644 --- a/platform/ui/package.json +++ b/platform/ui/package.json @@ -1,6 +1,6 @@ { "name": "@ohif/ui", - "version": "3.7.0-beta.102", + "version": "3.8.0-beta.36", "description": "A set of React components for Medical Imaging Viewers", "author": "OHIF Contributors", "license": "MIT", @@ -32,6 +32,7 @@ "react-dom": "17.0.2" }, "dependencies": { + "@testing-library/react-hooks": "^3.2.1", "browser-detect": "^0.2.28", "classnames": "^2.3.2", "lodash.debounce": "4.0.8", @@ -47,13 +48,14 @@ "react-modal": "3.11.2", "react-outside-click-handler": "^1.3.0", "react-select": "5.7.4", + "react-test-renderer": "^16.12.0", "react-window": "^1.8.9", "react-with-direction": "^1.3.1", "swiper": "^8.4.2", "webpack": "^5.81.0" }, "devDependencies": { - "@babel/core": "^7.21.4", + "@babel/core": "^7.23.2", "@storybook/addon-actions": "^7.2.2", "@storybook/addon-docs": "^7.2.2", "@storybook/addon-essentials": "^7.2.2", diff --git a/platform/ui/src/components/AboutModal/AboutModal.tsx b/platform/ui/src/components/AboutModal/AboutModal.tsx index 477b48a9ee6..1c027c87f1a 100644 --- a/platform/ui/src/components/AboutModal/AboutModal.tsx +++ b/platform/ui/src/components/AboutModal/AboutModal.tsx @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import detect from 'browser-detect'; +import { useTranslation } from 'react-i18next'; import Typography from '../Typography'; import Icon from '../Icon'; @@ -59,6 +60,7 @@ const Row = ({ title, value, link }) => { const AboutModal = ({ buildNumber, versionNumber, commitHash }) => { const { os, version, name } = detect(); const browser = `${name[0].toUpperCase()}${name.substr(1)} ${version}`; + const { t } = useTranslation('AboutModal'); const renderRowTitle = title => (
@@ -73,20 +75,20 @@ const AboutModal = ({ buildNumber, versionNumber, commitHash }) => { ); return (
- {renderRowTitle('Important Links')} + {renderRowTitle(t('Important links'))}
- Visit the forum + {t('Visit the forum')} - Report an issue + {t('Report an issue')} @@ -94,50 +96,50 @@ const AboutModal = ({ buildNumber, versionNumber, commitHash }) => { href="https://ohif.org/" showIcon={true} > - More details + {t('More details')}
- {renderRowTitle('Version Information')} + {renderRowTitle(t('Version information'))}
{/* */} {buildNumber && ( )} {commitHash && ( )}
diff --git a/platform/ui/src/components/CinePlayer/CinePlayer.tsx b/platform/ui/src/components/CinePlayer/CinePlayer.tsx index 843d318da67..34afa7807ac 100644 --- a/platform/ui/src/components/CinePlayer/CinePlayer.tsx +++ b/platform/ui/src/components/CinePlayer/CinePlayer.tsx @@ -1,4 +1,4 @@ -import React, { useState } from 'react'; +import React, { useEffect, useState } from 'react'; import PropTypes from 'prop-types'; import debounce from 'lodash.debounce'; @@ -48,6 +48,10 @@ const CinePlayer: React.FC = ({ debouncedSetFrameRate(frameRate); }; + useEffect(() => { + setFrameRate(defaultFrameRate); + }, [defaultFrameRate]); + return (
{ const currentYear = moment().year(); const options = []; @@ -52,6 +32,27 @@ const DateRange = props => { const { id, onChange, startDate, endDate } = props; const [focusedInput, setFocusedInput] = useState(null); const renderYearsOptionsCallback = useCallback(renderYearsOptions, []); + const { t } = useTranslation('DatePicker'); + const today = moment(); + const lastWeek = moment().subtract(7, 'day'); + const lastMonth = moment().subtract(1, 'month'); + const studyDatePresets = [ + { + text: t('Today'), + start: today, + end: today, + }, + { + text: t('Last 7 days'), + start: lastWeek, + end: today, + }, + { + text: t('Last 30 days'), + start: lastMonth, + end: today, + }, + ]; const renderDatePresets = () => { return ( @@ -149,11 +150,11 @@ const DateRange = props => { /** OPTIONAL */ renderCalendarInfo={renderDatePresets} renderMonthElement={renderMonthElement} - startDatePlaceholderText={'Start Date'} - endDatePlaceholderText={'End Date'} + startDatePlaceholderText={t('Start Date')} + endDatePlaceholderText={t('End Date')} phrases={{ - closeDatePicker: 'Close', - clearDates: 'Clear dates', + closeDatePicker: t('Close'), + clearDates: t('Clear dates'), }} isOutsideRange={day => !isInclusivelyBeforeDay(day, moment())} hideKeyboardShortcutsPanel={true} @@ -175,7 +176,7 @@ DateRange.propTypes = { /** YYYYMMDD (19921022) */ startDate: PropTypes.string, /** YYYYMMDD (19921022) */ - endDate: PropTypes.object, + endDate: PropTypes.string, /** Callback that received { startDate: string(YYYYMMDD), endDate: string(YYYYMMDD)} */ onChange: PropTypes.func.isRequired, }; diff --git a/platform/ui/src/components/DisplaySetMessageListTooltip/DisplaySetMessageListTooltip.tsx b/platform/ui/src/components/DisplaySetMessageListTooltip/DisplaySetMessageListTooltip.tsx index 0a7080b8cd2..4d1c4102de6 100644 --- a/platform/ui/src/components/DisplaySetMessageListTooltip/DisplaySetMessageListTooltip.tsx +++ b/platform/ui/src/components/DisplaySetMessageListTooltip/DisplaySetMessageListTooltip.tsx @@ -37,7 +37,7 @@ const DisplaySetMessageListTooltip = ({ messages, id }): React.ReactNode => { marginTop: '12px', }} > - DisplaySet Messages + {t('Display Set Messages')}
    { + const { t } = useTranslation('StudyList'); return (
    { className="text-primary-light" variant="h5" > - {'No studies available'} + {t('No studies available')}
    ); diff --git a/platform/ui/src/components/ErrorBoundary/ErrorBoundary.tsx b/platform/ui/src/components/ErrorBoundary/ErrorBoundary.tsx index a485590e2a7..c8170e60d20 100644 --- a/platform/ui/src/components/ErrorBoundary/ErrorBoundary.tsx +++ b/platform/ui/src/components/ErrorBoundary/ErrorBoundary.tsx @@ -1,6 +1,8 @@ import React, { useState } from 'react'; import { ErrorBoundary as ReactErrorBoundary } from 'react-error-boundary'; import PropTypes from 'prop-types'; +import { useTranslation } from 'react-i18next'; +import i18n from 'i18next'; import Modal from '../Modal'; import Icon from '../Icon'; @@ -9,9 +11,10 @@ import IconButton from '../IconButton'; const isProduction = process.env.NODE_ENV === 'production'; const DefaultFallback = ({ error, context, resetErrorBoundary, fallbackRoute }) => { + const { t } = useTranslation('ErrorBoundary'); const [showDetails, setShowDetails] = useState(false); - const title = `Something went wrong${!isProduction && ` in ${context}`}.`; - const subtitle = `Sorry, something went wrong there. Try again.`; + const title = `${t('Something went wrong')}${!isProduction && ` ${t('in')} ${context}`}.`; + const subtitle = t('Sorry, something went wrong there. Try again.'); return (
    {subtitle}

    {!isProduction && (
    -

    Context: {context}

    -

    Error Message: {error.message}

    +

    {t('Context')}: {context}

    +

    {t('Error Message')}: {error.message}

    setShowDetails(!showDetails)} > -
    {'Stack Trace'}
    +
    {t('Stack Trace')}
    { setIsOpen(false); if (fallbackRoute && typeof window !== 'undefined') { diff --git a/platform/ui/src/components/Header/Header.tsx b/platform/ui/src/components/Header/Header.tsx index a780b231c59..3bf7a69268a 100644 --- a/platform/ui/src/components/Header/Header.tsx +++ b/platform/ui/src/components/Header/Header.tsx @@ -43,6 +43,7 @@ function Header({ isReturnEnabled && 'cursor-pointer' )} onClick={onClickReturn} + data-cy="return-to-work-list" > {isReturnEnabled && ( { diff --git a/platform/ui/src/components/HotkeysPreferences/hotkeysValidators.js b/platform/ui/src/components/HotkeysPreferences/hotkeysValidators.js index be56d247eb8..0df0f5dee55 100644 --- a/platform/ui/src/components/HotkeysPreferences/hotkeysValidators.js +++ b/platform/ui/src/components/HotkeysPreferences/hotkeysValidators.js @@ -1,4 +1,5 @@ import { MODIFIER_KEYS, DISALLOWED_COMBINATIONS } from './hotkeysConfig'; +import i18n from 'i18next'; const formatPressedKeys = pressedKeysArray => pressedKeysArray.join('+'); @@ -20,8 +21,8 @@ const findConflictingCommand = (hotkeys, currentCommandName, pressedKeys) => { }; const ERROR_MESSAGES = { - MODIFIER: "It's not possible to define only modifier keys (ctrl, alt and shift) as a shortcut", - EMPTY: "Field can't be empty.", + MODIFIER: i18n.t('HotkeysValidators:It\'s not possible to define only modifier keys (ctrl, alt and shift) as a shortcut'), + EMPTY: i18n.t('HotkeysValidators:Field can\'t be empty'), }; // VALIDATORS @@ -46,7 +47,7 @@ const conflictingValidator = ({ commandName, pressedKeys, hotkeys }) => { if (conflictingCommand) { return { - error: `"${conflictingCommand.label}" is already using the "${pressedKeys}" shortcut.`, + error: i18n.t('HotkeysValidators:Hotkey is already in use', {action: conflictingCommand.label, pressedKeys: pressedKeys }), }; } }; @@ -62,7 +63,7 @@ const disallowedValidator = ({ pressedKeys = [] }) => { if (hasDisallowedCombinations) { return { - error: `"${formatPressedKeys(pressedKeys)}" shortcut combination is not allowed`, + error: i18n.t('HotkeysValidators:Shortcut combination is not allowed', {pressedKeys: formatPressedKeys(pressedKeys)}), }; } }; diff --git a/platform/ui/src/components/InputLabelWrapper/InputLabelWrapper.tsx b/platform/ui/src/components/InputLabelWrapper/InputLabelWrapper.tsx index 73172da58cf..904b06904e0 100644 --- a/platform/ui/src/components/InputLabelWrapper/InputLabelWrapper.tsx +++ b/platform/ui/src/components/InputLabelWrapper/InputLabelWrapper.tsx @@ -1,7 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; -import { useTranslation } from 'react-i18next'; import Icon from '../Icon'; @@ -21,8 +20,6 @@ const InputLabelWrapper = ({ className, children, }) => { - const { t } = useTranslation('StudyList'); - const onClickHandler = e => { if (!isSortable) { return; @@ -40,7 +37,7 @@ const InputLabelWrapper = ({ onKeyDown={onClickHandler} tabIndex="0" > - {t(label)} + {label} {isSortable && (
    - Add Segment + {t('Add segment')}
diff --git a/platform/ui/src/components/SegmentationGroupTable/NoSegmentationRow.tsx b/platform/ui/src/components/SegmentationGroupTable/NoSegmentationRow.tsx index 05233dcc011..5e6b74e1943 100644 --- a/platform/ui/src/components/SegmentationGroupTable/NoSegmentationRow.tsx +++ b/platform/ui/src/components/SegmentationGroupTable/NoSegmentationRow.tsx @@ -1,7 +1,9 @@ import React from 'react'; import Icon from '../Icon'; +import { useTranslation } from 'react-i18next'; function NoSegmentationRow({ onSegmentationAdd }) { + const { t } = useTranslation('SegmentationTable'); return (
- Add Segmentation + {t('Add segmentation')} ); diff --git a/platform/ui/src/components/SegmentationGroupTable/SegmentationConfig.tsx b/platform/ui/src/components/SegmentationGroupTable/SegmentationConfig.tsx index c56260c3130..622b9219661 100644 --- a/platform/ui/src/components/SegmentationGroupTable/SegmentationConfig.tsx +++ b/platform/ui/src/components/SegmentationGroupTable/SegmentationConfig.tsx @@ -4,6 +4,7 @@ import InputRange from '../InputRange'; import CheckBox from '../CheckBox'; import InputNumber from '../InputNumber'; import classNames from 'classnames'; +import { useTranslation } from 'react-i18next'; const getRoundedValue = value => { return Math.round(value * 100) / 100; @@ -17,19 +18,20 @@ const ActiveSegmentationConfig = ({ setRenderFill, setFillAlpha, }) => { + const { t } = useTranslation('SegmentationTable'); return (
-
Active
+
{t('Active')}
-
Opacity
+
{t('Opacity')}
-
Size
+
{t('Size')}
{ + const { t } = useTranslation('SegmentationTable'); return (
- Opacity + {t('Opacity')} { + const { t } = useTranslation('SegmentationTable'); const { initialConfig } = segmentationConfig; const [isMinimized, setIsMinimized] = useState(true); return ( @@ -144,7 +148,7 @@ const SegmentationConfig = ({ 'rotate-90 transform': !isMinimized, })} /> - {'Inactive Segmentations'} + {t('Inactive segmentations')}
{!isMinimized && ( { onSegmentationAdd(); }, @@ -56,7 +58,7 @@ function SegmentationDropDownRow({ ...(!disableEditing ? [ { - title: 'Rename', + title: t('Rename'), onClick: () => { onSegmentationEdit(activeSegmentation.id); }, @@ -64,7 +66,7 @@ function SegmentationDropDownRow({ ] : []), { - title: 'Delete', + title: t('Delete'), onClick: () => { onSegmentationDelete(activeSegmentation.id); }, @@ -72,7 +74,7 @@ function SegmentationDropDownRow({ ...(!disableEditing ? [ { - title: 'Export DICOM SEG', + title: t('Export DICOM SEG'), onClick: () => { storeSegmentation(activeSegmentation.id); }, @@ -81,13 +83,13 @@ function SegmentationDropDownRow({ : []), ...[ { - title: 'Download DICOM SEG', + title: t('Download DICOM SEG'), onClick: () => { onSegmentationDownload(activeSegmentation.id); }, }, { - title: 'Download DICOM RTSTRUCT', + title: t('Download DICOM RTSTRUCT'), onClick: () => { onSegmentationDownloadRTSS(activeSegmentation.id); }, diff --git a/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupSegment.tsx b/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupSegment.tsx index 5c1fee88e25..677f3b1246a 100644 --- a/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupSegment.tsx +++ b/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupSegment.tsx @@ -175,11 +175,12 @@ const HoveringIcons = ({ return (
{!disableEditing && createIcon('row-edit', onEdit)} - {createIcon( - isLocked ? 'row-lock' : 'row-unlock', - onToggleLocked, - isLocked ? 'text-[#3d5871]' : null - )} + {!disableEditing && + createIcon( + isLocked ? 'row-lock' : 'row-unlock', + onToggleLocked, + isLocked ? 'text-[#3d5871]' : null + )} {createIcon( isVisible ? 'row-shown' : 'row-hidden', onToggleVisibility, diff --git a/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupTable.tsx b/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupTable.tsx index 295a7951441..2ea0bcb0014 100644 --- a/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupTable.tsx +++ b/platform/ui/src/components/SegmentationGroupTable/SegmentationGroupTable.tsx @@ -6,6 +6,7 @@ import SegmentationDropDownRow from './SegmentationDropDownRow'; import NoSegmentationRow from './NoSegmentationRow'; import AddSegmentRow from './AddSegmentRow'; import SegmentationGroupSegment from './SegmentationGroupSegment'; +import { useTranslation } from 'react-i18next'; const SegmentationGroupTable = ({ segmentations, @@ -70,11 +71,12 @@ const SegmentationGroupTable = ({ const activeSegmentation = segmentations?.find( segmentation => segmentation.id === activeSegmentationId ); + const { t } = useTranslation('SegmentationTable'); return (
{ }; const SidePanel = ({ side, className, activeTabIndex: activeTabIndexProp, tabs, onOpen }) => { - const { t } = useTranslation('SidePanel'); - const [panelOpen, setPanelOpen] = useState(activeTabIndexProp !== null); const [activeTabIndex, setActiveTabIndex] = useState(0); @@ -279,7 +276,13 @@ const SidePanel = ({ side, className, activeTabIndex: activeTabIndexProp, tabs, data-cy={`${tab.name}-btn`} >
- +
diff --git a/platform/ui/src/components/StudyItem/StudyItem.tsx b/platform/ui/src/components/StudyItem/StudyItem.tsx index f382bf652b0..9325e5b013e 100644 --- a/platform/ui/src/components/StudyItem/StudyItem.tsx +++ b/platform/ui/src/components/StudyItem/StudyItem.tsx @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; +import { useTranslation } from 'react-i18next'; import Icon from '../Icon'; @@ -16,6 +17,7 @@ const StudyItem = ({ isActive, onClick, }) => { + const { t } = useTranslation('StudyItem'); return (
- {trackedSeries} Tracked Series + {t('Tracked series', {trackedSeries: trackedSeries})}
)} @@ -67,7 +69,7 @@ const StudyItem = ({ StudyItem.propTypes = { date: PropTypes.string.isRequired, - description: PropTypes.string.isRequired, + description: PropTypes.string, modalities: PropTypes.string.isRequired, numInstances: PropTypes.number.isRequired, trackedSeries: PropTypes.number, diff --git a/platform/ui/src/components/StudyListExpandedRow/StudyListExpandedRow.tsx b/platform/ui/src/components/StudyListExpandedRow/StudyListExpandedRow.tsx index 2d7cac0b2fd..739e69f7043 100644 --- a/platform/ui/src/components/StudyListExpandedRow/StudyListExpandedRow.tsx +++ b/platform/ui/src/components/StudyListExpandedRow/StudyListExpandedRow.tsx @@ -1,6 +1,5 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { useTranslation } from 'react-i18next'; import Table from '../Table'; import TableHead from '../TableHead'; @@ -9,8 +8,6 @@ import TableRow from '../TableRow'; import TableCell from '../TableCell'; const StudyListExpandedRow = ({ seriesTableColumns, seriesTableDataSource, children }) => { - const { t } = useTranslation('StudyList'); - return (
{children}
@@ -19,7 +16,7 @@ const StudyListExpandedRow = ({ seriesTableColumns, seriesTableDataSource, child {Object.keys(seriesTableColumns).map(columnKey => { - return {t(seriesTableColumns[columnKey])}; + return {seriesTableColumns[columnKey]}; })} diff --git a/platform/ui/src/components/StudyListFilter/StudyListFilter.tsx b/platform/ui/src/components/StudyListFilter/StudyListFilter.tsx index 635317f4db3..b322eba176a 100644 --- a/platform/ui/src/components/StudyListFilter/StudyListFilter.tsx +++ b/platform/ui/src/components/StudyListFilter/StudyListFilter.tsx @@ -48,11 +48,11 @@ const StudyListFilter = ({ onClick={onUploadClick} > - Upload + {t('Upload')}
)}
-
+
{/* TODO revisit the completely rounded style of button used for clearing the study list filter - for now use LegacyButton*/} {isFiltering && ( - {numOfStudies > 100 ? '>100' : numOfStudies} + {`${t('Number of studies')}: `} - {t('Studies')} + {numOfStudies > 100 ? '>100' : numOfStudies}
@@ -99,7 +99,7 @@ const StudyListFilter = ({ {numOfStudies > 100 && (
-

{t('NumOfStudiesHiggerThan100Message')}

+

{t('Filter list to 100 studies or less to enable sorting')}

)} diff --git a/platform/ui/src/components/StudyListPagination/StudyListPagination.tsx b/platform/ui/src/components/StudyListPagination/StudyListPagination.tsx index de9067c23b2..969af698159 100644 --- a/platform/ui/src/components/StudyListPagination/StudyListPagination.tsx +++ b/platform/ui/src/components/StudyListPagination/StudyListPagination.tsx @@ -43,7 +43,7 @@ const StudyListPagination = ({ onChangePage, currentPage, perPage, onChangePerPa hideSelectedOptions={true} onChange={onSelectedRange} /> - {t('ResultsPerPage')} + {t('Results per page')}
diff --git a/platform/ui/src/components/StudyListTable/StudyListTableRow.tsx b/platform/ui/src/components/StudyListTable/StudyListTableRow.tsx index 079a2985f4d..2235f277d1c 100644 --- a/platform/ui/src/components/StudyListTable/StudyListTableRow.tsx +++ b/platform/ui/src/components/StudyListTable/StudyListTableRow.tsx @@ -7,10 +7,13 @@ import Icon from '../Icon'; const StudyListTableRow = props => { const { tableData } = props; - const { row, expandedContent, onClickRow, isExpanded } = tableData; + const { row, expandedContent, onClickRow, isExpanded, dataCY } = tableData; return ( <> - + { +}) { + const { t } = useTranslation('ThumbnailTracked'); const trackedIcon = isTracked ? 'circled-checkmark' : 'dotted-circle'; const viewportIdentificatorLabel = viewportIdentificator.join(', '); const renderViewportLabels = () => { @@ -42,7 +44,7 @@ const ThumbnailTracked = ({ position="right" content={
- Series is displayed
in viewport {viewportIdentificatorLabel} + {`${t('Viewport')}: ${viewportIdentificatorLabel}`}
} > @@ -85,13 +87,11 @@ const ThumbnailTracked = ({
- Series is - {isTracked ? ' tracked' : ' untracked'} + {isTracked ? t('Series is tracked') : t('Series is untracked')} {!!viewportIdentificator.length && ( - in viewport - {viewportIdentificatorLabel} + {`${t('Viewport')}: ${viewportIdentificatorLabel}`} )}
diff --git a/platform/ui/src/components/TooltipClipboard/TooltipClipboard.tsx b/platform/ui/src/components/TooltipClipboard/TooltipClipboard.tsx index 43688b90547..c48755363ed 100644 --- a/platform/ui/src/components/TooltipClipboard/TooltipClipboard.tsx +++ b/platform/ui/src/components/TooltipClipboard/TooltipClipboard.tsx @@ -1,4 +1,5 @@ import React, { useState, useRef, useEffect } from 'react'; +import { useTranslation } from 'react-i18next'; import PropTypes from 'prop-types'; import classnames from 'classnames'; @@ -9,6 +10,8 @@ const DELAY_TO_HIDE = 10; // it needs at least a little delay to prevent tooltip const DELAY_TO_HIDE_AFTER_COPYING = 1000; const TooltipClipboard = ({ children, text }) => { + const { t } = useTranslation('TooltipClipboard'); + const [isActive, setIsActive] = useState(false); const [message, setMessage] = useState(null); const [isCopying, setIsCopying] = useState(false); @@ -21,10 +24,10 @@ const TooltipClipboard = ({ children, text }) => { setIsCopying(true); try { await navigator.clipboard.writeText(text); - setMessage('Copied!'); + setMessage(t('Copied')); } catch (err) { console.error('Failed to copy: ', err); - setMessage('Failed to copy!'); + setMessage(t('Failed to copy')); } finally { refreshElementPosition(); diff --git a/platform/ui/src/components/UserPreferences/UserPreferences.tsx b/platform/ui/src/components/UserPreferences/UserPreferences.tsx index e3934dbbafd..923838f4feb 100644 --- a/platform/ui/src/components/UserPreferences/UserPreferences.tsx +++ b/platform/ui/src/components/UserPreferences/UserPreferences.tsx @@ -112,7 +112,7 @@ const UserPreferences = ({ onClick={onResetHandler} disabled={disabled} > - {t('Reset to Defaults')} + {t('Reset to defaults')}