feat: Add White Labelling, Hanging Protocols, and tons of Extensions / Mode fixes

* modified

* new files in existing extensions/libraries/modes

* fixed bugs and tests

* Clean up

* fix: viewport display fixed

* Fixed configs for deployment

* Removed unnecessary files and functions

* Fixed default HP module

* Added white labelling

* Fixed hash routing

* Removed unnecessary routers

Co-authored-by: Alireza Sedghi <ar.sedghi@gmail.com>
This commit is contained in:
Erik ZieglerandAlireza Sedghi authored and GitHub committed 2021-05-28 14:32:48 -04:00
1 parent 0db81b30f3
commit 99b8dc4759
93 files changed
+3825 -1293

No files matched your search

@@ -96,10 +96,13 @@ export default class DisplaySetService {
/**
*
* @param {*} input
* @param {*} param1
* @param {*} param1: settings: initialViewportSettings by HP or callbacks after rendering
* @returns {string[]} - added displaySetInstanceUIDs
*/
makeDisplaySets = (input, { batch = false, madeInClient = false } = {}) => {
makeDisplaySets = (
input,
{ batch = false, madeInClient = false, settings = {} } = {}
) => {
if (!input || !input.length) {
throw new Error('No instances were provided.');
}
@@ -116,12 +119,15 @@ export default class DisplaySetService {
if (batch) {
for (let i = 0; i < input.length; i++) {
const instances = input[i];
const displaySets = this.makeDisplaySetForInstances(instances);
const displaySets = this.makeDisplaySetForInstances(
instances,
settings
);
displaySetsAdded = [...displaySetsAdded, displaySets];
}
} else {
const displaySets = this.makeDisplaySetForInstances(input);
const displaySets = this.makeDisplaySetForInstances(input, settings);
displaySetsAdded = displaySets;
}
@@ -145,7 +151,7 @@ export default class DisplaySetService {
}
};
makeDisplaySetForInstances(instances) {
makeDisplaySetForInstances(instances, settings) {
const instance = instances[0];
const existingDisplaySets =
@@ -168,6 +174,13 @@ export default class DisplaySetService {
} else {
displaySets = handler.getDisplaySetsFromSeries(instances);
// applying hp-defined viewport settings to the displaysets
displaySets.forEach(ds => {
Object.keys(settings).forEach(key => {
ds[key] = settings[key];
});
});
this._addDisplaySetsToCache(displaySets);
this._addActiveDisplaySets(displaySets);
}