ivmartel / dwv-jqmobile

Medical image viewer using DWV (DICOM Web Viewer) and jQuery Mobile.
https://ivmartel.github.io/dwv-jqmobile/
GNU General Public License v3.0
31 stars 26 forks source link

dynamically open multiple images from folder in dicom web viewer #86

Closed shameerasl closed 1 year ago

shameerasl commented 2 years ago

how to open multiple dicom images from a folder dynamically into the dicom web viewer? I can open one image dynamically by passing url. but how do I open a folder and display all images in viewer dynamically.

ivmartel commented 2 years ago

Here is a multiple file example: https://jsfiddle.net/ivmartel/hmetaz6f/ (more examples at tutorial-examples).

shameerasl commented 2 years ago

can i use the above example in dwv-jq mobile viewer. i have used the code in ivnartel/dwv-jq mobile index.html .but it is not working .

var app = new dwv.App();
app.init({
  dataViewConfigs: {'*': [{divId: 'layerGroup0'}]},
  tools: {
    Scroll: {}
  }
});

app.addEventListener('load', function () {
  // alert("inside");
  app.setTool('Scroll');
});

app.loadURLs([
  'http://localhost:8080/DCTCDev/scripts/dwvimg/6.dcm',
  'http://localhost:8080/DCTCDev/scripts/dwvimg/7.dcm',
  'http://localhost:8080/DCTCDev/scripts/dwvimg/8.dcm'
]);

hope you can help me to load the files from a folder.

ivmartel commented 2 years ago

What error do you get?

shameerasl commented 2 years ago

it doesnot show any error , it loads only one image in the viewer. and scroll is not working.

shameerasl commented 2 years ago

image

I have also given as array in input url and it shows the above alert var farray=[]; farray.push('http://localhost:8080/DCTCDev/scripts/dwvimg/'+patient.pat_reg_id+'/6.dcm'); farray.push('http://localhost:8080/DCTCDev/scripts/dwvimg/'+patient.pat_reg_id+'/7.dcm'); var url = 'http://localhost:8080/DCTCDev/scripts/ivmartel/index.html'+'?input='+farray; window.open(url);

and also following error in console image

and in my script part i gave the following code

var app = new dwv.App();
app.init({
  dataViewConfigs: {'*': [{divId: 'layerGroup0'}]},
  tools: {
    Scroll: {}
  }
});

app.addEventListener('load', function () {

app.setTool('Scroll');
});
ivmartel commented 1 year ago

Sorry for now answering earlier... Difficult to tell from your snapshot, you would have to expand the error to get more details. Closing for now, feel free to comment if you need.