-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XNAT Connection #11
Comments
We did not wrap this feature as an XNAT plugin. So we will release a document to describe how to integrate BlueLight into XANT. |
Thank you @cylien look forward to see the updates. |
// download all selected scans
function downloadSelectedScans(){
var selectedScans = [];
scanTable.dataTable$.find('input.selectable-select-one:checked').each(function(){
selectedScans.push(this.value);
});
/* add those two lines to open a new windows with XNAT API */
var url = "/bluelight/html/start.html?experiments=" + exptId + "&scans=" + scanId + "&format=json";
window.open(url);
downloadIframe(url);
}
function readXNATRequest() {
var experiments = (getQueryVariable('experiments'));
var scans = (getQueryVariable('scans'));
var format = (getQueryVariable('format'));
if (experiments != false && scans != false && format != false) {
var url = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + "/data/experiments/"
+ experiments + "/scans/" + scans + "/files/" + "?format=json";
readJson2(url);
}
}
function readJson2(url) {
var requestURL = url;
var request = new XMLHttpRequest();
request.open('GET', requestURL);
request.responseType = 'json';
request.send();
request.onload = function () {
var superHeroes = request.response;
for (var i = 0; i < superHeroes["ResultSet"]["Result"].length; i++) {
if (superHeroes["ResultSet"]["Result"][i]["collection"] == "DICOM") {
var uri = window.location.protocol + "//" + window.location.hostname + ":" + window.location.port + superHeroes["ResultSet"]["Result"][i]["URI"];
url = "wadouri:" + uri;
series = virtualLoadImage(url, 0); // launch viewer, should be refined.
}
}
}
} |
add xnat.js as a plugin for this issue. 137ac44 BlueLight will query the XNAT's API to get the XML and retrieve the DICOM stored in experiments and its scans. http://{XNAT's hostname}/REST/projects/test/subjects/XNAT_S00001/experiments/XNAT_E00002/scans/1/files?format=json |
Hi!
I would like to know how it is possible the connection with XNAT. I see the way to connect to Orthanc but no way to see the solution for XNAT. Could you help me on that?
Great work with bluelight!
The text was updated successfully, but these errors were encountered: