Skip to content
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

Problem viewing dicom #17

Open
camol opened this issue May 8, 2013 · 11 comments
Open

Problem viewing dicom #17

camol opened this issue May 8, 2013 · 11 comments

Comments

@camol
Copy link

camol commented May 8, 2013

Hi I have problem with for example this dicom I try to window it like in my desktop osirix viewer but I see only black color nothing else :. In osirix optimum windowing is 570 x 407.

http://www2.zshares.net/sik7a7vrs5u2

@daniel-lundin
Copy link
Member

Hi,

I just learned that MR-images usually don't contain rescale slope and rescale intercept, so that was part of the problem. (Fixed by the last commit) I still see a diff of ~132 in window level compared to Osirix when I view the image you attached here, don't know what causing it yet. Will have to look closer.

@camol
Copy link
Author

camol commented May 12, 2013

Thx I really apriciate this. Please keep my updated on this if it is not a problem ofcourse. Thx once again

Kamil Łęczycki

On Sunday, 12 May 2013 at 13:02, Daniel Erlandsson wrote:

Hi,
I just learned that MR-images usually don't contain rescale slope and rescale intercept, so that was part of the problem. (Fixed by the last commit) I still see a diff of ~132 in window level compared to Osirix when I view the image you attached here, don't know what causing it yet. Will have to look closer.


Reply to this email directly or view it on GitHub (#17 (comment)).

@camol
Copy link
Author

camol commented May 12, 2013

Great update the previous image works, however when I tried this one http://www2.zshares.net/wqegh35v2vdx sth. goes wrong with calculating WW and WL becouse I see there NaN symbol.

@daniel-lundin
Copy link
Member

It's nice of you to send images, haven't tested with so many different kinds.
If you try with the latest version it should be able to read that image as well.

@camol
Copy link
Author

camol commented May 12, 2013

Hi I have also these samples http://www2.zshares.net/9o4swewcju2c mialny from here http://www.osirix-viewer.com/datasets/ . Can't view them properly (tried to window them and now image displayed still). However like you said previous two are working so big thx for quick response. I also have a question what parts of your project should I extract to another app, becouse I want to provide only the displaying and windowing part without choosing the file. I want directly provide the path to the file somewhere in the code becouse it will work only for one file at the time.

@daniel-lundin
Copy link
Member

Hi, will have a look at the samples. All files from osirix-viewer.com are encoded in JPEG2000 which is not supported at the moment. For now you have to convert them to some other supported Transfer Syntax for them to work.
Regarding the extraction I'm planning on making it more embeddable. Hopefully this week.

@camol
Copy link
Author

camol commented May 13, 2013

Great. Looking forward to it!

Kamil Łęczycki
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Monday, 13 May 2013 at 09:12, Daniel Erlandsson wrote:

Hi, will have a look at the samples. All files from osirix-viewer.com (http://osirix-viewer.com) is encoded in JPEG2000 which is not supported at the moment. For now you have to convert them to some other supported Transfer Syntax for them to work.
Regarding the extraction I'm planning on making it more embeddable. Hopefully this week.


Reply to this email directly or view it on GitHub (#17 (comment)).

@png85
Copy link
Contributor

png85 commented May 13, 2013

FYI, the following sample sets from the Osirix page aren't using JPEG2000:

I've gone through all of them a while ago while looking for sample data for one of my own projects and maybe this can save you some time with the conversion ;)
Another good source for sample images is www.dicomserver.co.uk but it requires some configuration work since they just host a public PACS where one can use C-FIND and C-MOVE/C-GET requests to search for and download studies/series.

@camol
Copy link
Author

camol commented May 13, 2013

Great thx I will take a closer look on them :)

Kamil Łęczycki
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Monday, 13 May 2013 at 14:59, Peter Hille (png!das-system) wrote:

FYI, the following sample sets from the Osirix page aren't using JPEG2000:
BRAINIX - http://www.osirix-viewer.com/datasets/DATA/BRAINIX.zip
INCISIX - http://www.osirix-viewer.com/datasets/DATA/INCISIX.zip
PHENIX - http://www.osirix-viewer.com/datasets/DATA/PHENIX.zip

I've gone through all of them a while ago while looking for sample data for one of my own projects and maybe this can save you some time with the conversion ;)
Another good source for sample images is www.dicomserver.co.uk (http://www.dicomserver.co.uk) but it requires some configuration work since they just host a public PACS where one can use C-FIND and C-MOVE/C-GET requests to search for and download studies/series.


Reply to this email directly or view it on GitHub (#17 (comment)).

@camol
Copy link
Author

camol commented May 16, 2013

Hi,

I tried a bit to embadde it by myself but I have some problems with it. I'm trying to put only the windowing part in my own Ruby On Rails app. However the files are stored in the server that is why I don't need the "Choose file" part. My each stored dicom can be viewed (name of the file, tags etc.). I saw in your tests that you use a function which can decode the base64 to a another format "base64_to_typedarray" in https://github.com/Infogosoft/jsdicom/blob/master/test/glfuse.html and the result in being passed to DicomParser. I looked for DicomParser in the app.js and found it that is being used in load_file or sth. like that. So I somehow passed the result of ruby's http://www.ostools.net/uploads/apidocs/ruby-library/libdoc/base64/rdoc/Base64.html#method-i-encode64 with argument of read dicom file and I had access to it in JS. After that I tryied to use it by doing load_arraybuffer on window.load event and replacing this line:

var buffer = new Uint8Array(abuf);

var buffer = base64_to_typedarray(abuf)

abuf in this case is the encoded base64 string which comes from ruby. However I get sth. like "the DICM word did not found" and the whole thing won't start.

Kamil Łęczycki
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Monday, 13 May 2013 at 15:00, Kamil Łęczycki wrote:

Great thx I will take a closer look on them :)

Kamil Łęczycki
Sent with Sparrow (http://www.sparrowmailapp.com/?sig)

On Monday, 13 May 2013 at 14:59, Peter Hille (png!das-system) wrote:

FYI, the following sample sets from the Osirix page aren't using JPEG2000:
BRAINIX - http://www.osirix-viewer.com/datasets/DATA/BRAINIX.zip
INCISIX - http://www.osirix-viewer.com/datasets/DATA/INCISIX.zip
PHENIX - http://www.osirix-viewer.com/datasets/DATA/PHENIX.zip

I've gone through all of them a while ago while looking for sample data for one of my own projects and maybe this can save you some time with the conversion ;)
Another good source for sample images is www.dicomserver.co.uk (http://www.dicomserver.co.uk) but it requires some configuration work since they just host a public PACS where one can use C-FIND and C-MOVE/C-GET requests to search for and download studies/series.


Reply to this email directly or view it on GitHub (#17 (comment)).

@daniel-lundin
Copy link
Member

I think the easiest way if you want to load files from the server is to use the DcmApp.load_urllist_from_url(url) with the url pointed to some view in your rails app which should return a json-response in the following form:

[
    {
        'sopInstanceUID': 'xxx.xxxx.x.x',
        'href': '/url/to/actual/file1',
    },
    {
        'sopInstanceUID': 'xxx.xxxx.x.x',
        'href': '/url/to/actual/file2',
    },
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants