Improving new study browser and moving studies services to ohif:studies

This commit is contained in:
Bruno Alves de Faria committed 2017-10-25 22:09:08 -02:00
1 parent 0b51a53976
commit eb372bed03
54 files changed
+560 -495

No files matched your search

@@ -0,0 +1,18 @@
/**
* Converts the properties to URL query parameters. Based on:
* http://stackoverflow.com/questions/111529/create-query-parameters-in-javascript
*
* @param data
* @returns {string}
*/
encodeQueryData = function(data) {
var ret = [];
for (var d in data) {
if (data[d]) {
ret.push(encodeURIComponent(d) + '=' + encodeURIComponent(data[d]));
}
}
return ret.join('&');
};
@@ -0,0 +1,2 @@
import './remoteGetValue.js';
import './encodeQueryData.js';
@@ -0,0 +1,14 @@
export const parseFloatArray = function(obj) {
var result = [];
if (!obj) {
return result;
}
var objs = obj.split("\\");
for (var i = 0; i < objs.length; i++) {
result.push(parseFloat(objs[i]));
}
return result;
};
@@ -0,0 +1,3 @@
export const remoteGetValue = function(obj) {
return obj ? obj.Value : null;
};