cornerstoneWADOImageLoader
cornerstoneWADOImageLoader copied to clipboard
How to directly download DCM files
ladies and gentleman: I have a dicom file from one server like below URL: http://192.168.1.100/20200106/E1065587/I00013972180.dcm How to directly download DCM files use cornerstoneWADOImageLoader? I tested use the cornerstone main page's method but failed:
const element = document.getElementById('demo-element'); const imageId = 'http://192.168.1.100/20200106/E1065587/I00013972180.dcm'; //how to coding this part?
cornerstone.enable(element); cornerstone.loadAndCacheImage(imageId).then(function(image) { cornerstone.displayImage(element, image);
// Enable our tools cornerstoneTools.mouseInput.enable(element); cornerstoneTools.mouseWheelInput.enable(element); cornerstoneTools.wwwc.activate(element, 1); // Left Click cornerstoneTools.pan.activate(element, 2); // Middle Click cornerstoneTools.zoom.activate(element, 4); // Right Click cornerstoneTools.zoomWheel.activate(element); // Mouse Wheel });
thank you very much!
Very close! ImageId has to be prefixed with a "scheme". This is used to match the imageId with a registered loader. You can see a prefix being applied in this example here:
https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/master/examples/wadouri/index.html#L268
Dear Danny Brown: thank you for your replay so quickly When i tested the orginal URL on ../wadouri/index.html,it's work normal like below: but when i changed the URL address which i expect: http://120.55.190.118/D2/20200106/E1065587/I00013972180.dcm it shows object Object?
How to do ?please help me ,thank you very very very much!
Very close! ImageId has to be prefixed with a "scheme". This is used to match the imageId with a registered loader. You can see a prefix being applied in this example here:
https://github.com/cornerstonejs/cornerstoneWADOImageLoader/blob/master/examples/wadouri/index.html#L268
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
I'm not sure I understand what you're asking.
I am sorry I found the different between your demo server and My server Demo Server: https://raw.githubusercontent.com/cornerstonejs/cornerstoneWADOImageLoader/master/testImages/CT2_J2KR My Server: http://120.55.190.118/D2/20200106/E1065587/I00013972180.dcm My server is a IIS server what should I do on the server side?
------------------ 原始邮件 ------------------ 发件人: "notifications"<[email protected]>; 发送时间: 2020年1月16日(星期四) 上午9:42 收件人: "cornerstonejs/cornerstoneWADOImageLoader"<[email protected]>; 抄送: "缪林毅"<[email protected]>;"Author"<[email protected]>; 主题: Re: [cornerstonejs/cornerstoneWADOImageLoader] How to directly download DCM files (#298)
I'm not sure I understand what you're asking.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Is your IIS setup configured to support .dcm? Does it return those resources as static files with the correct mime type?
Dear :
thank you for your replay so quickly!
I already setup IIS support *.dcm
can you help me type the URL in your browser?
http://120.55.190.118/D2/20200106/E1065587/I00013972180.dcm
It can download any where
but when i input this URL address in ...examples/wadouri/index.html and click "Download and View" button
it show error: [object Object] like below:
------------------ 原始邮件 ------------------ 发件人: "notifications"<[email protected]>; 发送时间: 2020年1月20日(星期一) 晚上6:07 收件人: "cornerstonejs/cornerstoneWADOImageLoader"<[email protected]>; 抄送: "缪林毅"<[email protected]>;"Author"<[email protected]>; 主题: Re: [cornerstonejs/cornerstoneWADOImageLoader] How to directly download DCM files (#298)
Is your IIS setup configured to support .dcm? Does it return those resources as static files with the correct mime type?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
The example pages can only retrieve images that are either:
- Accessible via the same domain/port
- Have appropriate CORS Headers set
Because your resource is hosted on a different domain, it needs appropriate CORS headers, or else it can't be retrieved. If you are unable to set headers, the local file system example works as expected.
Dear dannyrb: thank you for your follow up my pubbzle!
It's solved ,please close this issue
Dear author:
i have used cornerstone.js build my viewer,
and found it's a easy to using and very good js tools!
how to enable ZoomTouchPinch when the html pages was loaded?
not when i clicked the ZoomTouchPinch button
hope your replay
thank you very much!