diff --git a/modes/longitudinal/src/index.js b/modes/longitudinal/src/index.js index 56f0e58bd..5bdc90a48 100644 --- a/modes/longitudinal/src/index.js +++ b/modes/longitudinal/src/index.js @@ -59,9 +59,11 @@ export default function mode({ modeConfiguration }) { study: [], series: [], }, - isValidMode: (studyTags, seriesTags) => { - // All series are welcome in this mode! - return true; + isValidMode: ({ modalities }) => { + const modalities_list = modalities.split('\\'); + + // Slide Microscopy modality not supported by basic mode yet + return !modalities_list.includes('SM') }, routes: [ { diff --git a/platform/docs/docs/README.md b/platform/docs/docs/README.md index 8c4bdcffd..c7b5c7f8c 100644 --- a/platform/docs/docs/README.md +++ b/platform/docs/docs/README.md @@ -54,15 +54,13 @@ To cite the OHIF Viewer in an academic publication, please cite > _Open Health Imaging Foundation Viewer: An Extensible Open-Source Framework > for Building Web-Based Imaging Applications to Support Cancer Research_ - -> Erik Ziegler, Trinity Urban, Danny Brown, James Petts, Steve D. Pieper, Rob -> Lewis, Chris Hafey, and Gordon J. Harris - -> _JCO Clinical Cancer Informatics_, no. 4 (2020), 336-345, DOI: +> +> Erik Ziegler, Trinity Urban, Danny Brown, James Petts, Steve D. Pieper, Rob +> Lewis, Chris Hafey, and Gordon J. Harris _JCO Clinical Cancer Informatics_, no. 4 (2020), 336-345, DOI: > [10.1200/CCI.19.00131](https://www.doi.org/10.1200/CCI.19.00131) -This article is freely available on Pubmed Central: -https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7259879/ +This article is freely available on Pubmed Central: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7259879/ + or, for Lesion Tracker of OHIF v1, please cite: @@ -70,14 +68,13 @@ or, for Lesion Tracker of OHIF v1, please cite: > Imaging Research and Clinical Trials_ > > Trinity Urban, Erik Ziegler, Rob Lewis, Chris Hafey, Cheryl Sadow, Annick D. -> Van den Abbeele and Gordon J. Harris -> -> _Cancer Research_, November 1 2017 (77) (21) e119-e122 DOI: +> Van den Abbeele and Gordon J. Harris _Cancer Research_, November 1 2017 (77) (21) e119-e122 DOI: > [10.1158/0008-5472.CAN-17-0334](https://www.doi.org/10.1158/0008-5472.CAN-17-0334) -This article is freely available on Pubmed Central: +This article is freely available on Pubmed Central. https://pubmed.ncbi.nlm.nih.gov/29092955/ + **Note:** If you use or find this repository helpful, please take the time to star this repository on Github. This is an easy way for us to assess adoption and it can help us obtain future funding for the project. diff --git a/platform/docs/docs/assets/img/measurement-panel-1.png b/platform/docs/docs/assets/img/measurement-panel-1.png new file mode 100644 index 000000000..cafeae72c Binary files /dev/null and b/platform/docs/docs/assets/img/measurement-panel-1.png differ diff --git a/platform/docs/docs/assets/img/measurement-panel-prompt.png b/platform/docs/docs/assets/img/measurement-panel-prompt.png new file mode 100644 index 000000000..12d21a0a7 Binary files /dev/null and b/platform/docs/docs/assets/img/measurement-panel-prompt.png differ diff --git a/platform/docs/docs/assets/img/measurement-panel-tracked.png b/platform/docs/docs/assets/img/measurement-panel-tracked.png new file mode 100644 index 000000000..90758691b Binary files /dev/null and b/platform/docs/docs/assets/img/measurement-panel-tracked.png differ diff --git a/platform/docs/docs/assets/img/measurement-temporary.png b/platform/docs/docs/assets/img/measurement-temporary.png new file mode 100644 index 000000000..9d46fd319 Binary files /dev/null and b/platform/docs/docs/assets/img/measurement-temporary.png differ diff --git a/platform/docs/docs/assets/img/measurements-prevNext.png b/platform/docs/docs/assets/img/measurements-prevNext.png new file mode 100644 index 000000000..d4bd71bb6 Binary files /dev/null and b/platform/docs/docs/assets/img/measurements-prevNext.png differ diff --git a/platform/docs/docs/assets/img/mode-archs.png b/platform/docs/docs/assets/img/mode-archs.png index ed53f954f..f931818c3 100644 Binary files a/platform/docs/docs/assets/img/mode-archs.png and b/platform/docs/docs/assets/img/mode-archs.png differ diff --git a/platform/docs/docs/assets/img/overview.png b/platform/docs/docs/assets/img/overview.png new file mode 100644 index 000000000..d504f5b14 Binary files /dev/null and b/platform/docs/docs/assets/img/overview.png differ diff --git a/platform/docs/docs/assets/img/toolbar-module.png b/platform/docs/docs/assets/img/toolbar-module.png new file mode 100644 index 000000000..57536695f Binary files /dev/null and b/platform/docs/docs/assets/img/toolbar-module.png differ diff --git a/platform/docs/docs/assets/img/toolbarModule.png b/platform/docs/docs/assets/img/toolbarModule.png deleted file mode 100644 index 910f19cf2..000000000 Binary files a/platform/docs/docs/assets/img/toolbarModule.png and /dev/null differ diff --git a/platform/docs/docs/assets/img/user-measurement-edit-name.png b/platform/docs/docs/assets/img/user-measurement-edit-name.png deleted file mode 100644 index 2daa7fde0..000000000 Binary files a/platform/docs/docs/assets/img/user-measurement-edit-name.png and /dev/null differ diff --git a/platform/docs/docs/assets/img/user-measurement-edit.png b/platform/docs/docs/assets/img/user-measurement-edit.png deleted file mode 100644 index a129f3704..000000000 Binary files a/platform/docs/docs/assets/img/user-measurement-edit.png and /dev/null differ diff --git a/platform/docs/docs/assets/img/user-measurement-name.png b/platform/docs/docs/assets/img/user-measurement-name.png deleted file mode 100644 index e1b3c4f00..000000000 Binary files a/platform/docs/docs/assets/img/user-measurement-name.png and /dev/null differ diff --git a/platform/docs/docs/assets/img/user-measurement-panel-modal.png b/platform/docs/docs/assets/img/user-measurement-panel-modal.png deleted file mode 100644 index 9f763e62b..000000000 Binary files a/platform/docs/docs/assets/img/user-measurement-panel-modal.png and /dev/null differ diff --git a/platform/docs/docs/assets/img/user-measurement-panel-tracked.png b/platform/docs/docs/assets/img/user-measurement-panel-tracked.png deleted file mode 100644 index 40102aa2c..000000000 Binary files a/platform/docs/docs/assets/img/user-measurement-panel-tracked.png and /dev/null differ diff --git a/platform/docs/docs/assets/img/user-measurement-prevnext.png b/platform/docs/docs/assets/img/user-measurement-prevnext.png deleted file mode 100644 index 5047cb043..000000000 Binary files a/platform/docs/docs/assets/img/user-measurement-prevnext.png and /dev/null differ diff --git a/platform/docs/docs/assets/img/user-toolbar-download.png b/platform/docs/docs/assets/img/user-toolbar-download.png deleted file mode 100644 index c69d03385..000000000 Binary files a/platform/docs/docs/assets/img/user-toolbar-download.png and /dev/null differ diff --git a/platform/docs/docs/assets/img/user-toolbarDownload.png b/platform/docs/docs/assets/img/user-toolbarDownload.png new file mode 100644 index 000000000..d39c9cbe0 Binary files /dev/null and b/platform/docs/docs/assets/img/user-toolbarDownload.png differ diff --git a/platform/docs/docs/assets/img/user-viewer-components.png b/platform/docs/docs/assets/img/user-viewer-components.png deleted file mode 100644 index ff0e8ea0a..000000000 Binary files a/platform/docs/docs/assets/img/user-viewer-components.png and /dev/null differ diff --git a/platform/docs/docs/development/testing.md b/platform/docs/docs/development/testing.md index a99d383d3..6f8221923 100644 --- a/platform/docs/docs/development/testing.md +++ b/platform/docs/docs/development/testing.md @@ -67,7 +67,7 @@ For running the OHIF e2e test you need to run the following steps: ![e2e-cypress-final](../assets/img/e2e-cypress-final.png) -## Testing Philosiphy +## Testing Philosophy > Testing is an opinionated topic. Here is a rough overview of our testing > philosophy. See something you want to discuss or think should be changed? Open @@ -87,7 +87,7 @@ Gaining the confidence we need to answer these questions after every change is costly. Good tests allow us to answer them without manual regression testing. What and how we choose to test to increase that confidence is nuanced. -## Kinds of Tests +## Further Reading: Kinds of Tests Test's buy us confidence, but not all tests are created equal. Each kind of test has a different cost to write and maintain. An expensive test is worth it if it @@ -149,9 +149,6 @@ We write integration tests to gain confidence that several units work together. Generally, we want to mock as little as possible for these tests. In practice, this means only mocking network requests. -#### When to use - -... ### End-to-End Tests @@ -165,13 +162,6 @@ Mission critical features and functionality, or to cover a large breadth of functionality until unit tests catch up. Unsure if we should have a test for feature `X` or scenario `Y`? Open an issue and let's discuss. -## Summary - -- Does your test increase confidence? -- Does the test type chosen balance the cost-to-confidence ratio? - -## Further Reading - ### General - [Assert(js) Conf 2018 Talks][assert-js-talks] @@ -187,9 +177,7 @@ feature `X` or scenario `Y`? Open an issue and let's discuss. - [Best Practices](https://docs.cypress.io/guides/references/best-practices.html) - [Example Recipes](https://docs.cypress.io/examples/examples/recipes.html) -## Testing Dorito -[![testing dorito][testing-dorito-img]][testing-dorito] Select a measurement tool and mark an image to initiate measurement tracking. A pop up will ask if you want to track measurements for the series on which the annotation was drawn. -![user-measurement-panel-modal](../../assets/img/user-measurement-panel-modal.png) - -If you select `Yes`, the series becomes a `tracked series`, and the current drawn measurement and next measurements will get shown up on the measurement panel on the right. +![user-measurement-panel-modal](../../assets/img/measurement-panel-prompt.png) -![user-measurement-panel-tracked](../../assets/img/user-measurement-panel-tracked.png) + + + +If you select `Yes`, the series becomes a `tracked series`, and the current drawn measurement and next measurements are shown on the measurement panel on the right. + +![user-measurement-panel-tracked](../../assets/img/measurement-panel-tracked.png) If you select `No`, the measurement becomes temporary. The next annotation made will repeat the measurement tracking prompt. If you select `No, do not ask again`, all annotations made on the study will be temporary. +![measurement-temporary](../../assets/img/measurement-temporary.png) + ## Labeling Measurements You can edit the measurement name by hovering over the measurement and selecting the edit icon. You can also label or relabel a measurement by right-clicking on it in the viewport. - -![user-measurement-edit](../../assets/img/user-measurement-edit.png) +![user-measurement-edit](../../assets/img/measurement-panel-1.png) -![user-measurement-edit-name](../../assets/img/user-measurement-edit-name.png) - -Result: - -![user-measurement-name](../../assets/img/user-measurement-name.png) ## Deleting a Measurement @@ -41,7 +40,8 @@ A measurement can be deleting by dragging it outside the image in the viewport o ## Jumping to a Measurement Measurement navigation inside the top viewport can be used to move to previous and next measurement. -![user-measurement-prevnext](../../assets/img/user-measurement-prevnext.png) + +![measurements-prevNext](../../assets/img/measurements-prevNext.png) If a series containing a measurement is currently being displayed in a viewport, you can jump to display the measurement in the viewport by clicking on it in the Measurement Panel. diff --git a/platform/docs/docs/user-guide/viewer/toolbar.md b/platform/docs/docs/user-guide/viewer/toolbar.md index b6e5ca1ad..928a3a96d 100644 --- a/platform/docs/docs/user-guide/viewer/toolbar.md +++ b/platform/docs/docs/user-guide/viewer/toolbar.md @@ -52,7 +52,7 @@ Click on the Camera icon to download a high quality image capture using common i In the opened modal, the filename, image's width and height, and filetype and can be configured before downloading the image to your local computer. -![user-toolbar-download](../../assets/img/user-toolbar-download.png) +![user-toolbarDownload](../../assets/img/user-toolbarDownload.png) @@ -66,10 +66,10 @@ Please see the `Viewport` section for details. - Flip Horizontally: Flips the image 180 degrees horizontally - Stack Scroll: Links all viewports containing images to scroll together - Magnify: Click on an image to magnify a particular area of interest -- Invert: Inverts the colorscale +- Invert: Inverts the color scale - Cine: Toggles the Cine player control in the currently selected viewport. Click the `x` on the Cine player or click the tool again to toggle off. - Angle: Measures an adjustable angle on an image - +- Probe: Drag the probe to see pixel values - Rectangle: Measures a rectangular area in mm^2 and HU When a tool is selected from the `More Tools` menu, it becomes the active tool until it is replaced by clicking on a different tool in the More Tools menu or main toolbar. diff --git a/platform/docs/docusaurus.config.js b/platform/docs/docusaurus.config.js index 652f3624c..a74edc7f2 100644 --- a/platform/docs/docusaurus.config.js +++ b/platform/docs/docusaurus.config.js @@ -191,9 +191,7 @@ const isI18nStaging = process.env.I18N_STAGING === 'true'; ], presets: [ [ - isBootstrapPreset - ? '@docusaurus/preset-bootstrap' - : '@docusaurus/preset-classic', + "@docusaurus/preset-classic", { debug: true, // force debug plugin usage docs: { @@ -251,11 +249,6 @@ const isI18nStaging = process.env.I18N_STAGING === 'true'; disableSwitch: false, // respectPrefersColorScheme: true, }, - // announcementBar: { - // id: 'v1-new-domain', - // content: - // '➡️ Docusaurus v1 documentation has moved to v1.docusaurus.io! 🔄', - // }, /* announcementBar: { id: 'supportus', @@ -267,7 +260,6 @@ const isI18nStaging = process.env.I18N_STAGING === 'true'; theme: require('prism-react-renderer/themes/github'), darkTheme: require('prism-react-renderer/themes/dracula'), }, - image: 'img/docusaurus-soc.png', // metadatas: [{name: 'twitter:card', content: 'summary'}], gtag: { trackingID: 'UA-110573590-2', @@ -350,8 +342,8 @@ const isI18nStaging = process.env.I18N_STAGING === 'true'; items: [ { html: ` - - + + `, }, @@ -398,21 +390,14 @@ const isI18nStaging = process.env.I18N_STAGING === 'true'; label: 'Twitter', to: 'https://twitter.com/OHIFviewer', }, - { - html: ` - - Deploys by Netlify - - `, - }, ], }, ], - // logo: { - // alt: 'OHIF ', - // src: 'img/ohif-logo.svg', - // href: 'https://ohif.org', - // }, + logo: { + alt: 'OHIF ', + src: 'img/netlify-color-accent.svg', + href: 'https://v3-demo.ohif.org/', + }, copyright: `OHIF is open source software released under the MIT license.`, }, }, diff --git a/platform/docs/src/css/custom.css b/platform/docs/src/css/custom.css index caf9daf94..8c12baa10 100644 --- a/platform/docs/src/css/custom.css +++ b/platform/docs/src/css/custom.css @@ -221,6 +221,10 @@ article header h3 { margin-right: 20%; } +.footer_logo { + margin-top: 0; +} + .DocSearch { display: none; } diff --git a/platform/docs/static/img/docusaurus.png b/platform/docs/static/img/docusaurus.png deleted file mode 100644 index f458149e3..000000000 Binary files a/platform/docs/static/img/docusaurus.png and /dev/null differ diff --git a/platform/docs/static/img/netlify-color-accent.svg b/platform/docs/static/img/netlify-color-accent.svg new file mode 100644 index 000000000..0efc28206 --- /dev/null +++ b/platform/docs/static/img/netlify-color-accent.svg @@ -0,0 +1,22 @@ + + + + netlify-callout-vertical-color-accent + Created with Sketch. + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/platform/docs/static/img/tutorial/docsVersionDropdown.png b/platform/docs/static/img/tutorial/docsVersionDropdown.png deleted file mode 100644 index ff1cbe688..000000000 Binary files a/platform/docs/static/img/tutorial/docsVersionDropdown.png and /dev/null differ diff --git a/platform/docs/static/img/tutorial/localeDropdown.png b/platform/docs/static/img/tutorial/localeDropdown.png deleted file mode 100644 index d7163f967..000000000 Binary files a/platform/docs/static/img/tutorial/localeDropdown.png and /dev/null differ diff --git a/platform/docs/static/img/undraw_docusaurus_mountain.svg b/platform/docs/static/img/undraw_docusaurus_mountain.svg deleted file mode 100644 index 431cef2f7..000000000 --- a/platform/docs/static/img/undraw_docusaurus_mountain.svg +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/platform/docs/static/img/undraw_docusaurus_react.svg b/platform/docs/static/img/undraw_docusaurus_react.svg deleted file mode 100644 index e41705043..000000000 --- a/platform/docs/static/img/undraw_docusaurus_react.svg +++ /dev/null @@ -1,169 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/platform/docs/static/img/undraw_docusaurus_tree.svg b/platform/docs/static/img/undraw_docusaurus_tree.svg deleted file mode 100644 index a05cc03dd..000000000 --- a/platform/docs/static/img/undraw_docusaurus_tree.svg +++ /dev/null @@ -1 +0,0 @@ -docu_tree \ No newline at end of file diff --git a/platform/ui/src/components/Button/Button.jsx b/platform/ui/src/components/Button/Button.jsx index be70718c3..2d9b8cf8b 100644 --- a/platform/ui/src/components/Button/Button.jsx +++ b/platform/ui/src/components/Button/Button.jsx @@ -23,10 +23,6 @@ const roundedClasses = { full: 'rounded-full', }; -const disabledClasses = { - true: 'cursor-not-allowed', - false: '', -}; const variantClasses = { text: { @@ -67,6 +63,20 @@ const variantClasses = { light: 'border bg-primary-light border-primary-light text-black hover:opacity-80 active:opacity-100 focus:opacity-80', }, + disabled: { + default: + 'cursor-not-allowed opacity-50 bg-primary-light text-black', + primary: + 'cursor-not-allowed opacity-50 bg-primary-main text-white', + secondary: + 'cursor-not-allowed opacity-50 bg-secondary-light text-white', + white: + 'cursor-not-allowed opacity-50 bg-white text-black', + black: + 'cursor-not-allowed opacity-50 bg-black text-white', + light: + 'cursor-not-allowed opacity-50 border bg-primary-light border-primary-light text-black', + }, }; const sizeClasses = { @@ -131,8 +141,8 @@ const Button = ({ roundedClasses[rounded], sizeClasses[size], fullWidthClasses[fullWidth], - disabledClasses[disabled] )} + disabled={disabled} ref={buttonElement} onClick={handleOnClick} type={type} diff --git a/platform/viewer/src/routes/WorkList/WorkList.jsx b/platform/viewer/src/routes/WorkList/WorkList.jsx index d47dc4520..c80aa2d3e 100644 --- a/platform/viewer/src/routes/WorkList/WorkList.jsx +++ b/platform/viewer/src/routes/WorkList/WorkList.jsx @@ -336,6 +336,7 @@ function WorkList({ {appConfig.modes.map((mode, i) => { const isFirst = i === 0; + const isValidMode = mode.isValidMode({ modalities }) // TODO: Modes need a default/target route? We mostly support a single one for now. // We should also be using the route path, but currently are not // mode.id @@ -350,8 +351,8 @@ function WorkList({ >