diff --git a/PETSUVMeasurements/.gagarin/.gitignore b/PETSUVMeasurements/.gagarin/.gitignore deleted file mode 100644 index 408303742..000000000 --- a/PETSUVMeasurements/.gagarin/.gitignore +++ /dev/null @@ -1 +0,0 @@ -local diff --git a/PETSUVMeasurements/.meteor/.finished-upgraders b/PETSUVMeasurements/.meteor/.finished-upgraders deleted file mode 100644 index a541808f2..000000000 --- a/PETSUVMeasurements/.meteor/.finished-upgraders +++ /dev/null @@ -1,16 +0,0 @@ -# This file contains information which helps Meteor properly upgrade your -# app when you run 'meteor update'. You should check it into version control -# with your project. - -notices-for-0.9.0 -notices-for-0.9.1 -0.9.4-platform-file -notices-for-facebook-graph-api-2 -1.2.0-standard-minifiers-package -1.2.0-meteor-platform-split -1.2.0-cordova-changes -1.2.0-breaking-changes -1.3.0-split-minifiers-package -1.3.5-remove-old-dev-bundle-link -1.4.0-remove-old-dev-bundle-link -1.4.1-add-shell-server-package diff --git a/PETSUVMeasurements/.meteor/.gitignore b/PETSUVMeasurements/.meteor/.gitignore deleted file mode 100644 index 501f92e4b..000000000 --- a/PETSUVMeasurements/.meteor/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -dev_bundle -local diff --git a/PETSUVMeasurements/.meteor/.id b/PETSUVMeasurements/.meteor/.id deleted file mode 100644 index f2d5540e8..000000000 --- a/PETSUVMeasurements/.meteor/.id +++ /dev/null @@ -1,7 +0,0 @@ -# This file contains a token that is unique to your project. -# Check it into your repository along with the rest of this directory. -# It can be used for purposes such as: -# - ensuring you don't accidentally deploy one app on top of another -# - providing package authors with aggregated statistics - -1q3vtk41m2yk4k1rqj08l diff --git a/PETSUVMeasurements/.meteor/nightwatch.json b/PETSUVMeasurements/.meteor/nightwatch.json deleted file mode 100644 index 3ddebe60d..000000000 --- a/PETSUVMeasurements/.meteor/nightwatch.json +++ /dev/null @@ -1,136 +0,0 @@ -{ - "starrynight": { - "version": "3.7.0" - }, - "nightwatch": { - "version": "0.8.6" - }, - "src_folders": [ - "./tests/nightwatch/walkthroughs" - ], - "output_folder": "./tests/nightwatch/reports", - "custom_commands_path": [ - "./tests/nightwatch/commands", - "./tests/nightwatch/commands/api/meteor", - "./tests/nightwatch/commands/actions", - "./tests/nightwatch/commands/components", - "./tests/nightwatch/commands/methods" - ], - "custom_assertions_path": [ - "./tests/nightwatch/assertions" - ], - "globals_path": "./tests/nightwatch/globals.json", - "selenium": { - "start_process": true, - "server_path": "${npm_config_prefix}/lib/node_modules/starrynight/node_modules/selenium-server-standalone-jar/jar/selenium-server-standalone-2.45.0.jar", - "log_path": "tests/nightwatch/logs", - "host": "127.0.0.1", - "port": 4444, - "cli_args": { - "webdriver.chrome.driver": "${npm_config_prefix}/lib/node_modules/starrynight/node_modules/chromedriver/bin/chromedriver" - } - }, - "test_settings": { - "default": { - "launch_url": "http://localhost:5000", - "selenium_host": "127.0.0.1", - "selenium_port": 4444, - "pathname": "/wd/hub", - "silent": true, - "disable_colors": false, - "firefox_profile": false, - "ie_driver": "", - "screenshots": { - "enabled": false, - "path": "./tests/nightwatch/screenshots" - }, - "desiredCapabilities": { - "browserName": "chrome", - "javascriptEnabled": true, - "acceptSslCerts": true, - "loggingPrefs": { - "browser": "ALL" - } - }, - "exclude": "./tests/nightwatch/unittests/*" - }, - "phantomjs": { - "desiredCapabilities": { - "browserName": "phantomjs", - "javascriptEnabled": true, - "databaseEnabled": false, - "locationContextEnabled": false, - "applicationCacheEnabled": false, - "browserConnectionEnabled": false, - "webStorageEnabled": false, - "acceptSslCerts": true, - "rotatable": false, - "nativeEvents": false, - "phantomjs.binary.path": "${npm_config_prefix}/lib/node_modules/starrynight/node_modules/phantomjs/bin/phantomjs" - } - }, - "travis": { - "launch_url": "http://localhost:3000", - "selenium_host": "127.0.0.1", - "selenium_port": 4444, - "pathname": "/wd/hub", - "silent": true, - "disable_colors": false, - "firefox_profile": false, - "screenshots": { - "enabled": false, - "path": "./tests/nightwatch/screenshots" - }, - "desiredCapabilities": { - "browserName": "firefox", - "javascriptEnabled": true, - "databaseEnabled": true, - "locationContextEnabled": true, - "applicationCacheEnabled": true, - "browserConnectionEnabled": true, - "webStorageEnabled": true, - "acceptSslCerts": true, - "rotatable": true, - "nativeEvents": true - } - }, - "travischrome": { - "launch_url": "http://localhost:3000", - "selenium_host": "127.0.0.1", - "selenium_port": 4444, - "pathname": "/wd/hub", - "silent": true, - "disable_colors": false, - "firefox_profile": false, - "screenshots": { - "enabled": false, - "path": "./tests/nightwatch/screenshots" - }, - "desiredCapabilities": { - "browserName": "chrome", - "javascriptEnabled": true, - "databaseEnabled": true, - "locationContextEnabled": true, - "applicationCacheEnabled": true, - "browserConnectionEnabled": true, - "webStorageEnabled": true, - "acceptSslCerts": true, - "rotatable": true, - "nativeEvents": true, - "chromeOptions": { - "args": [ - "--no-sandbox" - ] - } - } - }, - "unittests": { - "selenium": { - "start_process": false, - "start_session": false - }, - "filter": "./tests/nightwatch/unittests/*", - "exclude": "" - } - } -} diff --git a/PETSUVMeasurements/.meteor/packages b/PETSUVMeasurements/.meteor/packages deleted file mode 100644 index ed5c3298e..000000000 --- a/PETSUVMeasurements/.meteor/packages +++ /dev/null @@ -1,74 +0,0 @@ -# Meteor packages used by this project, one per line. -# Check this file (and the other files in this directory) into your repository. -# -# 'meteor add' and 'meteor remove' will edit this file for you, -# but you can also edit it by hand. - -npm-bcrypt@0.9.1 - -meteor-base@1.0.4 # Packages every Meteor app needs to have -mobile-experience@1.0.4 # Packages for a great mobile UX -mongo@1.1.12 # The database Meteor supports right now -blaze-html-templates@1.0.4 # Compile .html files into Meteor Blaze views -session@1.1.6 # Client-side reactive dictionary for your app -jquery@1.11.9 # Helpful client-side library -tracker@1.1.0 # Meteor's client-side reactive programming library - -es5-shim@4.6.14 # ECMAScript 5 compatibility for older browsers. -ecmascript@0.5.8 # Enable ECMAScript2015+ syntax in app code - -insecure - -clinical:router -clinical:extended-api -clinical:active-entry -clinical:error-pages -clinical:theming -clinical:fonts -clinical:hipaa-audit-log -clinical:hipaa-logger - -aldeed:simple-schema # Third party package to deal with schemas - -# OHIF Packages -design -ohif:core -ohif:cornerstone -ohif:viewerbase -ohif:study-list -ohif:dicom-services -ohif:hanging-protocols -ohif:user-management -ohif:petsuv - -accounts-base@1.2.11 -accounts-password@1.3.0 - -ian:accounts-ui-bootstrap-3 -twbs:bootstrap -http@1.2.9 -arsnebula:reactive-promise -promise@0.8.4 -stylus@2.513.5 -fortawesome:fontawesome -random@1.0.10 -reactive-var@1.0.10 -reactive-dict@1.1.8 -practicalmeteor:loglevel -momentjs:moment - -anti:gagarin@=0.4.11 -check@1.2.3 -aldeed:template-extension@4.0.0 -zuuk:stale-session -gilbertwat:bootstrap3-daterangepicker -email@1.1.17 -peppelg:bootstrap-3-modal -simple:reactive-method -fastclick@1.0.12 -standard-minifier-css@1.2.0 -standard-minifier-js@1.2.0 -johdirr:meteor-git-rev -u2622:persistent-session -shell-server -aldeed:collection2 \ No newline at end of file diff --git a/PETSUVMeasurements/.meteor/platforms b/PETSUVMeasurements/.meteor/platforms deleted file mode 100644 index efeba1b50..000000000 --- a/PETSUVMeasurements/.meteor/platforms +++ /dev/null @@ -1,2 +0,0 @@ -server -browser diff --git a/PETSUVMeasurements/.meteor/release b/PETSUVMeasurements/.meteor/release deleted file mode 100644 index 72980bc2f..000000000 --- a/PETSUVMeasurements/.meteor/release +++ /dev/null @@ -1 +0,0 @@ -METEOR@1.4.1.1 diff --git a/PETSUVMeasurements/.meteor/versions b/PETSUVMeasurements/.meteor/versions deleted file mode 100644 index 4f5b263d6..000000000 --- a/PETSUVMeasurements/.meteor/versions +++ /dev/null @@ -1,143 +0,0 @@ -accounts-base@1.2.11 -accounts-password@1.3.0 -aldeed:collection2@2.9.1 -aldeed:collection2-core@1.1.1 -aldeed:schema-deny@1.0.1 -aldeed:schema-index@1.0.1 -aldeed:simple-schema@1.5.3 -aldeed:template-extension@4.0.0 -allow-deny@1.0.5 -amplify@1.0.0 -anti:gagarin@0.4.11 -anti:i18n@0.4.3 -arsnebula:reactive-promise@0.9.1 -autoupdate@1.3.11 -babel-compiler@6.9.1 -babel-runtime@0.1.11 -base64@1.0.9 -binary-heap@1.0.9 -blaze@2.1.8 -blaze-html-templates@1.0.4 -blaze-tools@1.0.9 -boilerplate-generator@1.0.9 -caching-compiler@1.1.7 -caching-html-compiler@1.0.6 -callback-hook@1.0.9 -check@1.2.3 -clinical:active-entry@1.5.16 -clinical:auto-resizing@0.2.0 -clinical:error-pages@0.2.0 -clinical:extended-api@2.2.4 -clinical:fonts@1.1.1 -clinical:hipaa-audit-log@2.4.2 -clinical:hipaa-logger@1.0.1 -clinical:router@2.0.19 -clinical:router-location@2.1.0 -clinical:router-middleware-stack@2.1.2 -clinical:router-url@2.1.0 -clinical:theming@0.4.10 -coffeescript@1.2.4_1 -ddp@1.2.5 -ddp-client@1.3.1 -ddp-common@1.2.6 -ddp-rate-limiter@1.0.5 -ddp-server@1.3.10 -deps@1.0.12 -design@0.0.1 -diff-sequence@1.0.6 -ecmascript@0.5.8 -ecmascript-runtime@0.3.14 -ejson@1.0.12 -email@1.1.17 -es5-shim@4.6.14 -fastclick@1.0.12 -fortawesome:fontawesome@4.5.0 -geojson-utils@1.0.9 -gilbertwat:bootstrap3-daterangepicker@1.3.21_1 -grove:less@0.2.0 -hot-code-push@1.0.4 -html-tools@1.0.10 -htmljs@1.0.10 -http@1.2.9 -ian:accounts-ui-bootstrap-3@1.2.89 -id-map@1.0.8 -insecure@1.0.7 -iron:controller@1.0.12 -iron:core@1.0.11 -iron:dynamic-template@1.0.12 -iron:layout@1.0.12 -johdirr:meteor-git-rev@0.0.4 -jquery@1.11.9 -launch-screen@1.0.12 -livedata@1.0.18 -localstorage@1.0.11 -logging@1.1.15 -mdg:validation-error@0.5.1 -meteor@1.2.17 -meteor-base@1.0.4 -meteor-platform@1.2.6 -minifier-css@1.2.14 -minifier-js@1.2.14 -minimongo@1.0.17 -mobile-experience@1.0.4 -mobile-status-bar@1.0.12 -modules@0.7.6 -modules-runtime@0.7.6 -momentjs:moment@2.14.4 -mongo@1.1.12 -mongo-id@1.0.5 -mrt:moment@2.8.1 -natestrauser:select2@4.0.3 -npm-bcrypt@0.9.1 -npm-mongo@1.5.49 -observe-sequence@1.0.12 -ohif:core@0.0.1 -ohif:cornerstone@0.0.1 -ohif:dicom-services@0.0.1 -ohif:hanging-protocols@0.0.1 -ohif:measurements@0.0.1 -ohif:petsuv@0.0.1 -ohif:study-list@0.0.1 -ohif:user-management@0.0.1 -ohif:viewerbase@0.0.1 -ohif:wadoproxy@0.0.1 -ordered-dict@1.0.8 -peppelg:bootstrap-3-modal@1.0.4 -practicalmeteor:chai@2.1.0_1 -practicalmeteor:loglevel@1.2.0_2 -promise@0.8.4 -raix:eventemitter@0.1.3 -random@1.0.10 -rate-limit@1.0.5 -reactive-dict@1.1.8 -reactive-var@1.0.10 -reload@1.1.10 -retry@1.0.8 -routepolicy@1.0.11 -service-configuration@1.0.10 -session@1.1.6 -sha@1.0.8 -shell-server@0.2.1 -silentcicero:jszip@0.0.4 -simple:reactive-method@1.0.2 -spacebars@1.0.12 -spacebars-compiler@1.0.12 -srp@1.0.9 -standard-app-packages@1.0.9 -standard-minifier-css@1.2.0 -standard-minifier-js@1.2.0 -stylus@2.513.5 -templating@1.2.14 -templating-tools@1.0.4 -tracker@1.1.0 -twbs:bootstrap@3.3.6 -typ:accounts-ldap@1.0.1 -typ:ldapjs@0.7.3 -u2622:persistent-session@0.4.4 -ui@1.0.11 -underscore@1.0.9 -url@1.0.10 -validatejs@0.0.1 -webapp@1.3.11 -webapp-hashing@1.0.9 -zuuk:stale-session@1.0.8 diff --git a/PETSUVMeasurements/activeEntry.js b/PETSUVMeasurements/activeEntry.js deleted file mode 100644 index b1232d845..000000000 --- a/PETSUVMeasurements/activeEntry.js +++ /dev/null @@ -1,46 +0,0 @@ -if (Meteor.isClient){ - ActiveEntry.configure({ - logo: { - url: '/mini-circles.png', - displayed: true - }, - signIn: { - displayFullName: true, - destination: '/studylist' - }, - signUp: { - destination: '/studylist' - }, - themeColors: { - primary: "" - }, - passwordOptions: { - showPasswordStrengthIndicator: false, - requireRegexValidation: true, - //requireStrongPasswords: false - passwordHistoryCount: 6, - failedAttemptsLimit: 5 - } - - }); -} - -/* -if (Meteor.isServer){ - Accounts.emailTemplates.siteName = 'AwesomeSite'; - Accounts.emailTemplates.from = 'AwesomeSite Admin '; - Accounts.emailTemplates.enrollAccount.subject = function(user) { - return 'Welcome to Awesome Town, ' + user.profile.name; - }; - - Accounts.emailTemplates.enrollAccount.text = function(user, url) { - return 'You have been selected to participate in building a better future!' - + ' To activate your account, simply click the link below:\n\n' - + url; - }; - - Meteor.startup(function() { - //process.env.MAIL_URL = 'smtp://sandboxid.mailgun.org:mypassword@smtp.mailgun.org:587'; - }); -} -*/ diff --git a/PETSUVMeasurements/client/body.styl b/PETSUVMeasurements/client/body.styl deleted file mode 100644 index aaa17e8fb..000000000 --- a/PETSUVMeasurements/client/body.styl +++ /dev/null @@ -1,2 +0,0 @@ -body - background-color: black \ No newline at end of file diff --git a/PETSUVMeasurements/client/components/app/app.html b/PETSUVMeasurements/client/components/app/app.html deleted file mode 100644 index 18967a48a..000000000 --- a/PETSUVMeasurements/client/components/app/app.html +++ /dev/null @@ -1,38 +0,0 @@ - diff --git a/PETSUVMeasurements/client/components/app/app.js b/PETSUVMeasurements/client/components/app/app.js deleted file mode 100644 index d461c83ab..000000000 --- a/PETSUVMeasurements/client/components/app/app.js +++ /dev/null @@ -1,46 +0,0 @@ -const studylistContentId = 'studylistTab'; -const viewerContentId = 'viewerTab'; - -// Define the ViewerData global object -// If there is currently any Session data for this object, -// use this to repopulate the variable -Template.app.onCreated(() => { - ViewerData = Session.get('ViewerData') || {}; -}); - -Template.app.events({ - 'click .js-toggle-studyList'() { - const contentId = Session.get('activeContentId'); - - if (contentId !== studylistContentId) { - switchToTab(studylistContentId); - } else { - switchToTab(viewerContentId); - } - } -}); - -Template.app.helpers({ - studyListToggleText() { - const contentId = Session.get('activeContentId'); - - // If the Viewer has not been opened yet, 'Back to viewer' should - // not be displayed - const viewerContentExists = !!Object.keys(ViewerData).length; - if (!viewerContentExists) { - return; - } - - if (contentId === studylistContentId) { - return 'Back to viewer'; - } else if (contentId === viewerContentId) { - return 'Study list'; - } - }, - - onStudyList() { - return (Session.get('activeContentId') === 'studylistTab'); - } -}); - -Session.set('defaultSignInMessage', 'Tumor tracking in your browser.'); \ No newline at end of file diff --git a/PETSUVMeasurements/client/components/app/app.styl b/PETSUVMeasurements/client/components/app/app.styl deleted file mode 100644 index 7f13ff777..000000000 --- a/PETSUVMeasurements/client/components/app/app.styl +++ /dev/null @@ -1,87 +0,0 @@ -@import "{design}/app" - -$expandedHeight = 160px - -.logoImage - display: inline-block - height: 100% - float: left - -.topBar - height: $topBarHeight - padding: 10px 10px 0 - theme('color', '$textPrimaryColor') - theme('background-color', '$primaryBackgroundColor') - transition(all 0.5s ease) - - &>.clearfix - position: relative - - .brandSection - height: 30px - display: inline-block - text-decoration: none - - .logoImage - margin: 0 8px 0 0 - width: 30px - - .logoText - display: inline-block - font-family: $logoFontFamily - font-weight: $logoFontWeight - theme('color', '$textPrimaryColor') - line-height: 30px - - .studyListLinkSection - theme('border-left', '%s solid $uiBorderColor' % $uiBorderThickness) - margin: 3px 0 0 10px - padding: 0 0 0 10px - - .btn - theme('color', '$textSecondaryColor') - cursor: pointer - font-size: 13px - font-weight: 500 - line-height: 26px - - &:hover - theme('color', '$hoverColor') - - &:active - theme('color', '$activeColor') - - &.studyList - background-color: rgba(21, 25, 30, 0.7) - height: $expandedHeight - padding-left: $studyListPadding - padding-right: $studyListPadding - - .brandSection - height: 100% - width: 80% - line-height: $expandedHeight - 10px - - .logoImage - width: 50px - margin: 0 20px 0 0 - - .logoText - font-size: 30px - - .studyListLinkSection - border: none - left: 0 - margin: 0 - padding: 0 - position: absolute - top: 0 - -#studylistTabs - height: "calc(100% - %s)" % $topBarHeight - - .tab-pane - .viewerContainer - .loadingTextDiv - theme('color', '$textSecondaryColor') - font-size: 30px diff --git a/PETSUVMeasurements/client/components/toolbarSection/toolbarSection.html b/PETSUVMeasurements/client/components/toolbarSection/toolbarSection.html deleted file mode 100644 index 5e1e0ef62..000000000 --- a/PETSUVMeasurements/client/components/toolbarSection/toolbarSection.html +++ /dev/null @@ -1,33 +0,0 @@ - diff --git a/PETSUVMeasurements/client/components/toolbarSection/toolbarSection.js b/PETSUVMeasurements/client/components/toolbarSection/toolbarSection.js deleted file mode 100644 index d2d48e768..000000000 --- a/PETSUVMeasurements/client/components/toolbarSection/toolbarSection.js +++ /dev/null @@ -1,143 +0,0 @@ -import { OHIF } from 'meteor/ohif:core'; - -Template.toolbarSection.helpers({ - // Returns true if the view shall be split in two viewports - splitView() { - // Run this computation every time the viewports are updated - Session.get('LayoutManagerUpdated'); - - // Stops here if layout manager is not defined yet - if (!window.layoutManager) { - return; - } - - return window.layoutManager.viewportData.length > 1; - }, - - leftSidebarToggleButtonData() { - const instance = Template.instance(); - return { - toggleable: true, - key: 'leftSidebar', - value: instance.data.state, - options: [{ - value: 'studies', - svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-studies', - svgWidth: 15, - svgHeight: 13, - bottomLabel: 'Studies' - }] - }; - }, - - rightSidebarToggleButtonData() { - const instance = Template.instance(); - return { - toggleable: true, - key: 'rightSidebar', - value: instance.data.state, - options: [{ - value: 'measurements', - svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-measurements-lesions', - svgWidth: 18, - svgHeight: 10, - bottomLabel: 'Measurements' - }] - }; - }, - - toolbarButtons() { - // Check if the measure tools shall be disabled - const isToolDisabled = false; //!Template.instance().data.timepointApi; - - const buttonData = []; - - buttonData.push({ - id: 'zoom', - title: 'Zoom', - classes: 'imageViewerTool', - svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-zoom' - }); - - buttonData.push({ - id: 'wwwc', - title: 'Levels', - classes: 'imageViewerTool', - svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-levels' - }); - - buttonData.push({ - id: 'pan', - title: 'Pan', - classes: 'imageViewerTool', - svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-pan' - }); - - buttonData.push({ - id: 'ellipticalRoi', - title: 'Ellipse', - classes: 'imageViewerTool', - iconClasses: 'fa fa-circle-o' - }); - - return buttonData; - }, - - extraToolbarButtons() { - // Check if the measure tools shall be disabled - const isToolDisabled = false; //!Template.instance().data.timepointApi.currentTimepointId; - const buttonData = []; - - // TODO: Get real icons for CR / UN / EX - buttonData.push({ - id: 'crTool', - title: 'CR Tool', - classes: 'imageViewerTool toolbarSectionButton', - svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-temp', - disabled: isToolDisabled - }); - - buttonData.push({ - id: 'unTool', - title: 'UN Tool', - classes: 'imageViewerTool toolbarSectionButton', - svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-temp', - disabled: isToolDisabled - }); - - buttonData.push({ - id: 'exTool', - title: 'EX Tool', - classes: 'imageViewerTool toolbarSectionButton', - svgLink: '/packages/ohif_viewerbase/assets/icons.svg#icon-tools-measure-temp', - disabled: isToolDisabled - }); - - return buttonData; - } -}); - -Template.toolbarSection.events({ - 'click #toggleHUD'() { - const state = Session.get('measurementTableHudOpen'); - Session.set('measurementTableHudOpen', !state); - } -}); - -Template.toolbarSection.onRendered(function() { - // Set disabled/enabled tool buttons that are set in toolManager - const states = toolManager.getToolDefaultStates(); - const disabledToolButtons = states.disabledToolButtons; - const allToolbarButtons = $('#toolbar').find('button'); - if (disabledToolButtons && disabledToolButtons.length > 0) { - for (var i = 0; i < allToolbarButtons.length; i++) { - const toolbarButton = allToolbarButtons[i]; - $(toolbarButton).prop('disabled', false); - - const index = disabledToolButtons.indexOf($(toolbarButton).attr('id')); - if (index !== -1) { - $(toolbarButton).prop('disabled', true); - } - } - } -}); diff --git a/PETSUVMeasurements/client/components/toolbarSection/toolbarSection.styl b/PETSUVMeasurements/client/components/toolbarSection/toolbarSection.styl deleted file mode 100644 index f093294e2..000000000 --- a/PETSUVMeasurements/client/components/toolbarSection/toolbarSection.styl +++ /dev/null @@ -1,24 +0,0 @@ -@import "{design}/app" - -.toolbarSection - theme('border-bottom', '%s solid $uiBorderColor' % $uiBorderThickness) - flex: 0 0 auto - height: $toolbarHeight - overflow: hidden - padding-top: 6px - position: relative - transition(height 300ms ease) - width: 100% - - &.expanded - height: $toolbarHeight + $toolbarDrawerHeight - - .toolbarSectionEntry - theme('color', '$defaultColor') - cursor: pointer - display: inline-block - theme('fill', '$defaultColor') - margin-top: 3px - min-width: 30px - theme('stroke', '$defaultColor') - text-align: center diff --git a/PETSUVMeasurements/client/components/viewer/viewer.html b/PETSUVMeasurements/client/components/viewer/viewer.html deleted file mode 100644 index 9af9fba3e..000000000 --- a/PETSUVMeasurements/client/components/viewer/viewer.html +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/PETSUVMeasurements/client/components/viewer/viewer.js b/PETSUVMeasurements/client/components/viewer/viewer.js deleted file mode 100644 index 2e25e0634..000000000 --- a/PETSUVMeasurements/client/components/viewer/viewer.js +++ /dev/null @@ -1,65 +0,0 @@ -import { OHIF } from 'meteor/ohif:core'; -import { MeasurementsConfiguration } from 'meteor/ohif:measurements/both/configuration/measurements'; - -Session.set('MeasurementsReady', false); - -Template.viewer.onCreated(() => { - OHIF.viewer = OHIF.viewer || {}; - - const instance = Template.instance(); - - instance.data.state = new ReactiveDict(); - instance.data.state.set('leftSidebar', Session.get('leftSidebar')); - instance.data.state.set('rightSidebar', Session.get('rightSidebar')); - - const contentId = instance.data.contentId; - - if (ViewerData[contentId].loadedSeriesData) { - OHIF.log.info('Reloading previous loadedSeriesData'); - OHIF.viewer.loadedSeriesData = ViewerData[contentId].loadedSeriesData; - - } else { - OHIF.log.info('Setting default ViewerData'); - OHIF.viewer.loadedSeriesData = {}; - ViewerData[contentId].loadedSeriesData = {}; - Session.set('ViewerData', ViewerData); - } - - Session.set('activeViewport', ViewerData[contentId].activeViewport || false); - - // Update the ViewerStudies collection with the loaded studies - ViewerStudies.remove({}); - - instance.data.studies.forEach(study => { - study.selected = true; - study.displaySets = createStacks(study); - ViewerStudies.insert(study); - }); - - instance.data.measurementApi = new OHIF.measurements.MeasurementApi(); - const measurementsPromise = instance.data.measurementApi.retrieveMeasurements(); - measurementsPromise.then(() => { - Session.set('MeasurementsReady', true); - - instance.data.measurementApi.syncMeasurementsAndToolData(); - }); -}); - -Template.viewer.helpers({ - dataSourcesReady() { - // TODO: Find a better way to do this - return Session.get('MeasurementsReady'); - } -}); - -Template.viewer.events({ - 'CornerstoneToolsMeasurementAdded .imageViewerViewport'(event, instance, eventData) { - OHIF.measurements.MeasurementHandlers.onAdded(event, instance, eventData); - }, - 'CornerstoneToolsMeasurementModified .imageViewerViewport'(event, instance, eventData) { - OHIF.measurements.MeasurementHandlers.onModified(event, instance, eventData); - }, - 'CornerstoneToolsMeasurementRemoved .imageViewerViewport'(event, instance, eventData) { - OHIF.measurements.MeasurementHandlers.onRemoved(event, instance, eventData); - } -}); diff --git a/PETSUVMeasurements/client/components/viewer/viewer.styl b/PETSUVMeasurements/client/components/viewer/viewer.styl deleted file mode 100644 index 0e2f65bb1..000000000 --- a/PETSUVMeasurements/client/components/viewer/viewer.styl +++ /dev/null @@ -1,22 +0,0 @@ -@import "{design}/app" - -#viewer - background-color: black - height: 100% - width: 100% - -#imageViewerViewports - .viewportContainer - border: none !important - outline: 0 !important // Prevent blue outline in Chrome - - &:hover - &.active - &:hover.active - border: none !important - outline: 0 !important // Prevent blue outline in Chrome - - &:not(:last-child) - .removable - .imageViewerViewport - theme('border-right', '%s solid $uiBorderColor' % $uiBorderThickness) diff --git a/PETSUVMeasurements/client/components/viewerSection/viewerSection.html b/PETSUVMeasurements/client/components/viewerSection/viewerSection.html deleted file mode 100644 index 90ae1ae66..000000000 --- a/PETSUVMeasurements/client/components/viewerSection/viewerSection.html +++ /dev/null @@ -1,13 +0,0 @@ - diff --git a/PETSUVMeasurements/client/components/viewerSection/viewerSection.js b/PETSUVMeasurements/client/components/viewerSection/viewerSection.js deleted file mode 100644 index c04031890..000000000 --- a/PETSUVMeasurements/client/components/viewerSection/viewerSection.js +++ /dev/null @@ -1,19 +0,0 @@ -Template.viewerSection.events({ - 'transitionend .sidebarMenu'(event) { - if (!event.target.classList.contains('sidebarMenu')) { - return; - } - - handleResize(); - } -}); - -Template.viewerSection.helpers({ - leftSidebarOpen() { - return Template.instance().data.state.get('leftSidebar'); - }, - - rightSidebarOpen() { - return Template.instance().data.state.get('rightSidebar'); - } -}); diff --git a/PETSUVMeasurements/client/components/viewerSection/viewerSection.styl b/PETSUVMeasurements/client/components/viewerSection/viewerSection.styl deleted file mode 100644 index 7b59a1805..000000000 --- a/PETSUVMeasurements/client/components/viewerSection/viewerSection.styl +++ /dev/null @@ -1,78 +0,0 @@ -@import "{design}/app" - -.viewerSection - display: flex - flex: 1 - flex-flow: row nowrap - align-items: stretch - height: calc(100% - 78px); - width: 100% - - .sidebarMenu - height: 100% - // required transformation to make inner fixed elements relative to this one - transform(scale(1)) - transition($sidebarTransition) - - .sidebar-option - height: 100% - position: fixed - transform(translateX(100%)) - transition($sidebarTransition) - width: 100% - - &.active - transform(translateX(0%)) - - .sidebar-left - theme('border-right', '%s solid $uiBorderColor' % $uiBorderThickness) - flex: 1 - margin-left: - $studiesSidebarMenuWidth - max-width: $studiesSidebarMenuWidth - order: 1 - - &.sidebar-open - margin-left: 0 - - .mainContent - flex: 1 - order: 2 - width: 100% - height: 100% - overflow: hidden - transition($sidebarTransition) - - .sidebar-right - flex: 1 - margin-left: -12px - margin-right: - $lesionsSidebarMenuWidth - max-width: $lesionsSidebarMenuWidth - order: 3 - padding-left: 6px - position: relative - - &[data-timepoints="3"] - margin-right: - ($lesionsSidebarMenuWidth + 135.5px) - max-width: $lesionsSidebarMenuWidth + 135.5px - - &[data-timepoints="4"] - margin-right: - ($lesionsSidebarMenuWidth + 270px) - max-width: $lesionsSidebarMenuWidth + 270px - - &:before - theme('background-color', '$uiBorderColor') - content: '' - display: block - height: 100% - left: 5px - position: absolute - top: 0 - width: $uiBorderThickness - - &.sidebar-open - margin-right: 0 - - .studiesListedChanger - theme('border-bottom', '%s solid $uiBorderColor' % $uiBorderThickness) - padding: 20px 10px - text-align: center diff --git a/PETSUVMeasurements/client/head.html b/PETSUVMeasurements/client/head.html deleted file mode 100644 index ef408f13e..000000000 --- a/PETSUVMeasurements/client/head.html +++ /dev/null @@ -1,20 +0,0 @@ - - - Lesion Tracker - - - - - - - - - - - - - - - - - diff --git a/PETSUVMeasurements/client/lesionTrackerHangingProtocol.js b/PETSUVMeasurements/client/lesionTrackerHangingProtocol.js deleted file mode 100644 index ebf152653..000000000 --- a/PETSUVMeasurements/client/lesionTrackerHangingProtocol.js +++ /dev/null @@ -1,167 +0,0 @@ -// Define Baseline protocol -var proto = new HP.Protocol('LT_Baseline'); -proto.locked = true; - -var studyDescription = new HP.ProtocolMatchingRule(); -studyDescription.required = true; -studyDescription.attribute = 'studyDescription'; -studyDescription.constraint = { - contains: { - value: 'CT' - } -}; - -var isBaseline = new HP.ProtocolMatchingRule(); -isBaseline.required = true; -isBaseline.attribute = 'timepointType'; -isBaseline.constraint = { - equals: { - value: 'baseline' - } -}; - -proto.addProtocolMatchingRule(studyDescription); -proto.addProtocolMatchingRule(isBaseline); - -var oneByOne = new HP.ViewportStructure('grid', { - rows: 1, - columns: 1 -}); - -// Stage 1 -var single = new HP.Viewport(); - -var baseline = new HP.StudyMatchingRule(true); -baseline.required = true; -baseline.attribute = 'timepointType'; -baseline.constraint = { - equals: { - value: 'baseline' - } -}; - -var body = new HP.SeriesMatchingRule(); -body.attribute = 'seriesDescription'; -body.weight = 5; -body.constraint = { - contains: { - value: 'Body' - } -}; - -var chest = new HP.SeriesMatchingRule(); -chest.attribute = 'seriesDescription'; -chest.constraint = { - contains: { - value: 'CHEST' - } -}; - -single.studyMatchingRules.push(baseline); -single.seriesMatchingRules.push(body); -single.seriesMatchingRules.push(chest); - -var first = new HP.Stage(oneByOne, 'oneByOne'); -first.viewports.push(single); - -proto.addStage(first); - -HP.lesionTrackerBaselineProtocol = proto; -HP.lesionTrackerBaselineProtocol.id = 'lesionTrackerBaselineProtocol'; - - -// Define Followup Protocol -var proto = new HP.Protocol('LT_BaselineFollowup'); -proto.locked = true; - -var studyDescription = new HP.ProtocolMatchingRule(); -studyDescription.required = true; -studyDescription.attribute = 'studyDescription'; -studyDescription.constraint = { - contains: { - value: 'CT' - } -}; - -var isFollowup = new HP.ProtocolMatchingRule(); -isFollowup.required = true; -isFollowup.attribute = 'timepointType'; -isFollowup.constraint = { - equals: { - value: 'followup' - } -}; - -proto.addProtocolMatchingRule(studyDescription); -proto.addProtocolMatchingRule(isFollowup); - -var oneByTwo = new HP.ViewportStructure('grid', { - rows: 1, - columns: 2 -}); - -// Stage 1 -var left = new HP.Viewport(); -var right = new HP.Viewport(); - -var baseline = new HP.StudyMatchingRule(true); -baseline.required = true; -baseline.attribute = 'timepointType'; -baseline.constraint = { - equals: { - value: 'baseline' - } -}; - -var followup = new HP.StudyMatchingRule(); -followup.required = true; -followup.attribute = 'timepointType'; -followup.constraint = { - equals: { - value: 'followup' - } -}; - -var body = new HP.SeriesMatchingRule(); -body.attribute = 'seriesDescription'; -body.weight = 5; -body.constraint = { - contains: { - value: 'Body' - } -}; - -var chest = new HP.SeriesMatchingRule(); -chest.attribute = 'seriesDescription'; -chest.constraint = { - contains: { - value: 'CHEST' - } -}; - -left.studyMatchingRules.push(baseline); -//left.seriesMatchingRules.push(body); -//left.seriesMatchingRules.push(chest); - -right.studyMatchingRules.push(followup); -//right.seriesMatchingRules.push(body); -//right.seriesMatchingRules.push(chest); - -var first = new HP.Stage(oneByTwo, 'oneByTwo'); -first.viewports.push(left); -first.viewports.push(right); - -proto.addStage(first); - -HP.lesionTrackerFollowupProtocol = proto; -HP.lesionTrackerFollowupProtocol.id = 'lesionTrackerFollowupProtocol'; - -Meteor.call('removeHangingProtocolByID', HP.lesionTrackerBaselineProtocol.id, function() { - HangingProtocols.insert(HP.lesionTrackerBaselineProtocol); -}); - -Meteor.call('removeHangingProtocolByID', HP.lesionTrackerFollowupProtocol.id, function() { - HangingProtocols.insert(HP.lesionTrackerFollowupProtocol); -}); - -HangingProtocols.insert(HP.defaultProtocol); \ No newline at end of file diff --git a/PETSUVMeasurements/client/log.js b/PETSUVMeasurements/client/log.js deleted file mode 100644 index 037c63622..000000000 --- a/PETSUVMeasurements/client/log.js +++ /dev/null @@ -1,3 +0,0 @@ -// Create application logger using loglevel -// https://atmospherejs.com/spacejamio/loglevel -log = loglevel.createAppLogger('PETSUVMeasurements', defaultLevel = 'info'); diff --git a/PETSUVMeasurements/client/routes.js b/PETSUVMeasurements/client/routes.js deleted file mode 100644 index 990a70715..000000000 --- a/PETSUVMeasurements/client/routes.js +++ /dev/null @@ -1,55 +0,0 @@ -Session.setDefault('ViewerData', {}); - -// verifyEmail controls whether emailVerification template will be rendered or not -var verifyEmail = Meteor.settings && Meteor.settings.public && Meteor.settings.public.verifyEmail || false; - -Router.configure({ - layoutTemplate: 'layout', - loadingTemplate: 'layout' -}); - -Router.onBeforeAction('loading'); - -var data = { - additionalTemplates: [] -}; - -var routerOptions = { - data: data -}; - -Router.route('/', function() { - // Check user is logged in - if (Meteor.user() && Meteor.userId()) { - if (verifyEmail && Meteor.user().emails && !Meteor.user().emails[0].verified) { - this.render('emailVerification', routerOptions); - } else { - Session.set('activeContentId', 'studylistTab'); - this.render('app', routerOptions); - } - - } else { - this.render('entrySignIn', routerOptions); - } -}); - -Router.route('/viewer/timepoints/:_id', { - layoutTemplate: 'layout', - name: 'viewer', - onBeforeAction: function() { - var timepointId = this.params._id; - - this.render('app', routerOptions); - OHIF.lesiontracker.openNewTabWithTimepoint(timepointId); - } -}); - -Router.onBeforeAction(function() { - if (!Meteor.userId() && !Meteor.loggingIn()) { - this.render('entrySignIn'); - } else { - this.next(); - } -}, { - except: ['entrySignIn', 'entrySignUp', 'forgotPassword', 'resetPassword'] -}); diff --git a/PETSUVMeasurements/public/images/logo.png b/PETSUVMeasurements/public/images/logo.png deleted file mode 100644 index fc83b1354..000000000 Binary files a/PETSUVMeasurements/public/images/logo.png and /dev/null differ diff --git a/PETSUVMeasurements/server/dropAllCollections.js b/PETSUVMeasurements/server/dropAllCollections.js deleted file mode 100644 index eb418f1dc..000000000 --- a/PETSUVMeasurements/server/dropAllCollections.js +++ /dev/null @@ -1,14 +0,0 @@ -// Temporary fix to drop all Collections on server restart -// http://stackoverflow.com/questions/23891631/meteor-how-can-i-drop-all-mongo-collections-and-clear-all-data-on-startup -Meteor.startup(function() { - console.warn('Dropping all Collections!'); - for (var property in global) { - var object = global[property]; - if (object instanceof Meteor.Collection) { - if (!(/^server|currentServer$/).test(object._name)) { - console.warn('Dropping: ' + object._debugName); - object.remove({}); - } - } - } -}); diff --git a/PETSUVMeasurements/server/email.js b/PETSUVMeasurements/server/email.js deleted file mode 100644 index 535ce5549..000000000 --- a/PETSUVMeasurements/server/email.js +++ /dev/null @@ -1,50 +0,0 @@ -Meteor.startup(function () { - - // Mail server settings - var username = Meteor.settings && Meteor.settings.mailServerSettings && Meteor.settings.mailServerSettings.username || null; - var password = Meteor.settings && Meteor.settings.mailServerSettings && Meteor.settings.mailServerSettings.password || null; - var server = Meteor.settings && Meteor.settings.mailServerSettings && Meteor.settings.mailServerSettings.server || null; - var port = Meteor.settings && Meteor.settings.mailServerSettings && Meteor.settings.mailServerSettings.port || null; - var verifyEmail = Meteor.settings && Meteor.settings.public && Meteor.settings.public.verifyEmail || false; - var siteName = Meteor.settings && Meteor.settings.public && Meteor.settings.public.siteName || "Lesion Tracker"; - - if (username && password && server && port) { - Accounts.emailTemplates.siteName = siteName; - Accounts.emailTemplates.from = siteName+' Admin <'+username+'>'; - - process.env.MAIL_URL = 'smtp://' + - encodeURIComponent(username) + ':' + - encodeURIComponent(password) + '@' + - encodeURIComponent(server) + ':' + port; - - // Subject line of the email. - Accounts.emailTemplates.verifyEmail.subject = function(user) { - return 'Confirm Your Email Address for '+siteName; - }; - - // Email text - Accounts.emailTemplates.verifyEmail.text = function(user, url) { - return 'Thank you for registering. Please click on the following link to verify your email address: \r\n' + url; - }; - - // Reset password mail - Accounts.emailTemplates.resetPassword.subject = function() { - return 'Reset your '+siteName+' password' - }; - - Accounts.urls.resetPassword = function(token) { - return Meteor.absoluteUrl('resetPassword/' + token); - }; - - Accounts.emailTemplates.resetPassword.text = function(user, url) { - return "Hello " + user.profile.fullName + ",\n\n" + - "Click the following link to set your new password:\n" + - url + "\n\n"; - }; - - // Send email when account is created - Accounts.config({ - sendVerificationEmail: verifyEmail - }); - } -}); \ No newline at end of file diff --git a/Packages/ohif-lesiontracker/both/configuration/dataExchange.js b/Packages/ohif-lesiontracker/both/configuration/dataExchange.js index 97c649fbd..f4afbcb44 100644 --- a/Packages/ohif-lesiontracker/both/configuration/dataExchange.js +++ b/Packages/ohif-lesiontracker/both/configuration/dataExchange.js @@ -20,13 +20,13 @@ export const retrieveMeasurements = (filter) => { }); }; -export const storeMeasurements = (measurementData) => { +export const storeMeasurements = (measurementData, timepointIds) => { console.log('storeMeasurements'); // Here is where we should do any required data transformation and API calls return new Promise((resolve, reject) => { - Meteor.call('storeMeasurements', measurementData, (error, response) => { + Meteor.call('storeMeasurements', measurementData, timepointIds, (error, response) => { if (error) { reject(error); } else { diff --git a/Packages/ohif-lesiontracker/server/methods.js b/Packages/ohif-lesiontracker/server/methods.js index 4b5286c91..f44ff3a1f 100644 --- a/Packages/ohif-lesiontracker/server/methods.js +++ b/Packages/ohif-lesiontracker/server/methods.js @@ -97,7 +97,7 @@ Meteor.methods({ return Timepoints.find(filter || {}).fetch(); }, - storeMeasurements(measurementData) { + storeMeasurements(measurementData, filter = {}) { OHIF.log.info('Storing Measurements on the Server'); OHIF.log.info(JSON.stringify(measurementData, null, 2)); @@ -106,7 +106,7 @@ Meteor.methods({ return; } - MeasurementCollections[toolId].remove({}); + MeasurementCollections[toolId].remove(filter); const measurements = measurementData[toolId]; measurements.forEach(measurement => { diff --git a/Packages/ohif-measurements/both/configuration/measurements.js b/Packages/ohif-measurements/both/configuration/measurements.js index 4e7326ca8..32b6d73c0 100644 --- a/Packages/ohif-measurements/both/configuration/measurements.js +++ b/Packages/ohif-measurements/both/configuration/measurements.js @@ -58,7 +58,7 @@ class MeasurementApi { }); } - storeMeasurements(timepointId) { + storeMeasurements(timepoints) { const storeFn = configuration.dataExchange.store; if (!_.isFunction(storeFn)) { return; @@ -70,7 +70,16 @@ class MeasurementApi { measurementData[measurementTypeId] = this[measurementTypeId].find().fetch(); }); - storeFn(measurementData).then(() => { + const timepointIds = timepoints.map(t => t.timepointId); + const patientId = timepoints[0].patientId; + const filter = { + patientId, + timepointId: { + $in: timepointIds + } + }; + + storeFn(measurementData, filter).then(() => { OHIF.log.info('Measurement storage completed'); }); } diff --git a/Packages/ohif-measurements/client/components/caseProgress/caseProgress.js b/Packages/ohif-measurements/client/components/caseProgress/caseProgress.js index 2b0c0476f..c88b02c2b 100644 --- a/Packages/ohif-measurements/client/components/caseProgress/caseProgress.js +++ b/Packages/ohif-measurements/client/components/caseProgress/caseProgress.js @@ -124,7 +124,7 @@ Template.caseProgress.helpers({ }); Template.caseProgress.events({ - 'click .js-finish-case'(event) { + 'click .js-finish-case'(event, instance) { const $this = $(event.currentTarget); // Stop here if the tool is disabled @@ -132,8 +132,12 @@ Template.caseProgress.events({ return; } - const instance = Template.instance(); switchToTab('studylistTab'); - instance.data.measurementApi.storeMeasurements(); + + const timepointApi = instance.data.timepointApi; + const timepoints = timepointApi.all(); + OHIF.log.info('Saving Measurements for timepoints:') + OHIF.log.info(timepoints); + instance.data.measurementApi.storeMeasurements(timepoints); } }); diff --git a/Packages/ohif-petsuv/both/configuration/configuration.js b/Packages/ohif-petsuv/both/configuration/configuration.js deleted file mode 100644 index a8a9fba59..000000000 --- a/Packages/ohif-petsuv/both/configuration/configuration.js +++ /dev/null @@ -1,17 +0,0 @@ -import { OHIF } from 'meteor/ohif:core'; - -import { measurementTools } from './measurementTools'; -import { retrieveMeasurements, storeMeasurements } from './dataExchange'; -import { validateMeasurements } from './dataValidation'; - -console.log('OHIF-PET SUV: Defining Configuration for Measurements'); -OHIF.measurements.MeasurementApi.setConfiguration({ - measurementTools: measurementTools, - dataExchange: { - retrieve: retrieveMeasurements, - store: storeMeasurements - }, - dataValidation: { - validation: validateMeasurements - } -}); diff --git a/Packages/ohif-petsuv/both/configuration/dataExchange.js b/Packages/ohif-petsuv/both/configuration/dataExchange.js deleted file mode 100644 index fb882352a..000000000 --- a/Packages/ohif-petsuv/both/configuration/dataExchange.js +++ /dev/null @@ -1,37 +0,0 @@ -import { measurementTools } from './measurementTools'; - -export const retrieveMeasurements = () => { - console.log('retrieveMeasurements'); - - return new Promise((resolve, reject) => { - Meteor.call("retrieveMeasurements", (error, response) => { - if (error) { - reject(error); - } else { - console.log(response); - - /*measurementTools.forEach(tool => { - console.log('Retrieving tool: ' + tool.id); - });*/ - - resolve(response); - } - }); - }); -}; - -export const storeMeasurements = (measurementData) => { - console.log('storeMeasurements'); - - // Here is where we should do any required data transformation and API calls - - return new Promise((resolve, reject) => { - Meteor.call("storeMeasurements", measurementData, (error, response) => { - if (error) { - reject(error); - } else { - resolve(response); - } - }); - }); -}; \ No newline at end of file diff --git a/Packages/ohif-petsuv/both/configuration/dataValidation.js b/Packages/ohif-petsuv/both/configuration/dataValidation.js deleted file mode 100644 index 78b3fdb5d..000000000 --- a/Packages/ohif-petsuv/both/configuration/dataValidation.js +++ /dev/null @@ -1,5 +0,0 @@ -import { ellipse } from './ellipse'; - -export const validateMeasurements = () => { - console.log('validateMeasurements'); -}; \ No newline at end of file diff --git a/Packages/ohif-petsuv/both/configuration/ellipse.js b/Packages/ohif-petsuv/both/configuration/ellipse.js deleted file mode 100644 index 4b830bbcc..000000000 --- a/Packages/ohif-petsuv/both/configuration/ellipse.js +++ /dev/null @@ -1,103 +0,0 @@ -import { SimpleSchema } from 'meteor/aldeed:simple-schema'; -import { MeasurementSchemaTypes } from 'meteor/ohif:measurements/both/schema/measurements'; - -const CornerstoneHandleSchema = MeasurementSchemaTypes.CornerstoneHandleSchema; - -const EllipseHandlesSchema = new SimpleSchema({ - start: { - type: CornerstoneHandleSchema, - label: 'Start' - }, - end: { - type: CornerstoneHandleSchema, - label: 'End' - }, - textBox: { - type: CornerstoneHandleSchema, - label: 'Text Box' - }, -}); - -const MeanStdDevSchema = new SimpleSchema({ - count: { - type: Number, - label: 'Count' - }, - mean: { - type: Number, - label: 'Mean', - decimal: true - }, - variance: { - type: Number, - label: 'Variance', - decimal: true - }, - stdDev: { - type: Number, - label: 'Variance', - decimal: true - } -}); - -const MeanStdDevSUVSchema = new SimpleSchema({ - mean: { - type: Number, - label: 'Mean SUV', - decimal: true - }, - stdDev: { - type: Number, - label: 'St. Dev SUV', - decimal: true - } -}); - -const EllipseSchema = new SimpleSchema([MeasurementSchemaTypes.CornerstoneToolMeasurement, { - handles: { - type: EllipseHandlesSchema, - label: 'Handles' - }, - meanStdDev: { - type: MeanStdDevSchema, - label: 'Mean St.Dev', - optional: true - }, - meanStdDevSUV: { - type: MeanStdDevSUVSchema, - label: 'Mean St.Dev SUV', - optional: true - }, - area: { - type: Number, - decimal: true, - optional: true - } -}]); - -function numberWithCommas(x) { - // http://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript - var parts = x.toString().split('.'); - parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ','); - return parts.join('.'); -} - -function displayFunction(data) { - if (!data.area || - !data.meanStdDev || - data.meanStdDev.mean === undefined) { - return - } - - return numberWithCommas(data.meanStdDev.mean.toFixed(2)); -} - -export const ellipse = { - id: 'ellipse', - name: 'Mean', - cornerstoneToolType: 'ellipticalRoi', - showInMeasurementTable: true, - includeInCaseProgress: true, - schema: EllipseSchema, - displayFunction: displayFunction -} \ No newline at end of file diff --git a/Packages/ohif-petsuv/both/configuration/measurementTools.js b/Packages/ohif-petsuv/both/configuration/measurementTools.js deleted file mode 100644 index ad3ca9194..000000000 --- a/Packages/ohif-petsuv/both/configuration/measurementTools.js +++ /dev/null @@ -1,5 +0,0 @@ -import { ellipse } from './ellipse'; - -export const measurementTools = [ - ellipse -]; \ No newline at end of file diff --git a/Packages/ohif-petsuv/package.js b/Packages/ohif-petsuv/package.js deleted file mode 100644 index f0fc22650..000000000 --- a/Packages/ohif-petsuv/package.js +++ /dev/null @@ -1,36 +0,0 @@ -Package.describe({ - name: 'ohif:petsuv', - summary: 'OHIF PET SUV Measurement Tools', - version: '0.0.1' -}); - -Package.onUse(function(api) { - api.versionsFrom('1.4'); - - api.use('ecmascript'); - api.use('standard-app-packages'); - api.use('jquery'); - api.use('stylus'); - api.use('random'); - - api.use('validatejs'); - - // Template overriding - api.use('aldeed:template-extension@4.0.0'); - - // Our custom packages - api.use('design'); - api.use('ohif:core'); - api.use('ohif:study-list'); - api.use('ohif:cornerstone'); - api.use('ohif:measurements'); - - api.addFiles('both/configuration/ellipse.js', [ 'client', 'server' ]); - api.addFiles('both/configuration/measurementTools.js', [ 'client', 'server' ]); - - api.addFiles('both/configuration/dataExchange.js', [ 'client', 'server' ]); - api.addFiles('both/configuration/dataValidation.js', [ 'client', 'server' ]); - api.addFiles('both/configuration/configuration.js', [ 'client', 'server' ]); - - api.addFiles('server/methods.js', 'server'); -}); diff --git a/Packages/ohif-petsuv/server/methods.js b/Packages/ohif-petsuv/server/methods.js deleted file mode 100644 index c853d896f..000000000 --- a/Packages/ohif-petsuv/server/methods.js +++ /dev/null @@ -1,65 +0,0 @@ -import { Meteor } from 'meteor/meteor'; -import { Mongo } from 'meteor/mongo'; -import { measurementTools } from 'meteor/ohif:petsuv/both/configuration/measurementTools'; - -let MeasurementCollections = {}; -measurementTools.forEach(tool => { - MeasurementCollections[tool.id] = new Mongo.Collection(tool.id); -}); - - - -Timepoints = new Mongo.Collection('timepoints'); - -// Drop our collections for testing purposes -Meteor.startup(() => { - Timepoints.remove({}); - measurementTools.forEach(tool => { - MeasurementCollections[tool.id].remove({}); - }); -}) - - -// TODO: Make storage use update instead of clearing the entire collection and -// re-inserting everything. -Meteor.methods({ - storeTimepoints(timepoints) { - console.log('Storing Timepoints on the Server') - console.log(JSON.stringify(timepoints, null, 2)); - Timepoints.remove({}); - timepoints.forEach(timepoint => { - delete timepoint._id; - Timepoints.insert(timepoint); - }); - }, - - retrieveTimepoints() { - console.log('Retrieving Timepoints from the Server'); - return Timepoints.find().fetch(); - }, - - storeMeasurements(measurementData) { - console.log('Storing Measurements on the Server') - console.log(JSON.stringify(measurementData, null, 2)); - - Object.keys(measurementData).forEach(toolId => { - MeasurementCollections[toolId].remove({}); - - const measurements = measurementData[toolId]; - measurements.forEach(measurement => { - MeasurementCollections[toolId].insert(measurement); - }) - }); - }, - - retrieveMeasurements() { - console.log('Retrieving Measurements from the Server'); - let measurementData = {}; - - measurementTools.forEach(tool => { - measurementData[tool.id] = MeasurementCollections[tool.id].find().fetch(); - }); - - return measurementData; - } -});