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

Change the dicom tags client side #23

Open
parthmehta17888 opened this issue Jul 3, 2017 · 6 comments
Open

Change the dicom tags client side #23

parthmehta17888 opened this issue Jul 3, 2017 · 6 comments

Comments

@parthmehta17888
Copy link

Hello team,

Basically I have two questions.

  1. I need to change the dicom tag values client side ? Can you please suggest a way ?

  2. I am using "http://dcmjs.org/organize/index.html" for the reference. I just started work on this. Can you please explain steps in brief.

@pieper
Copy link
Member

pieper commented Jul 3, 2017

Hi -

Basically with the cross-compiled dcmtk code you have access to the same utilities that dcmtk provides on a desktop or server system. So you could use dcmodify to change the tag values. It may be easiest to look at the dump example to see how to invoke a dcmtk utility from javascript.

In the 'organize' example, we took the approach of dumping the data and converting to a DOM that we could easily manipulate and then converting back to dicom for output. It's a little convoluted but it does work.

Also, just so you are aware, there is a new version of dcmjs at a very preliminary stage that implements some of the dcmtk-like functionality in pure javascript, so it's much lighter weight and more easily extensible. The new code is not yet ready for prime time, but we hope it is getting closer.

-Steve

@parthmehta17888
Copy link
Author

Hi Steve,

Thanks for the update. Please tell me once you done with the newer version of dcmjs. It will be very helpful for me.

Thanks,
PM

@AlexanderKoehn
Copy link

Just a note: the organize example does not work anymore, since the dump2dcm tool is not part of https://github.com/commontk/dcmjs.org/blob/gh-pages/javascripts/libs/dcmjs.js.
And unfortunately one can not recompile atm as described here: commontk/dcmjs#17
I will have a look at dcmjs pure js

@pieper
Copy link
Member

pieper commented Nov 20, 2018

Thanks for the report - yes, there's a of "mechanism" involved in the cross-compiling where the pure-javascript part can be dead simple. I've been meaning to port the 'organize' functionality but haven't gotten around to it. Would be glad to have help.

@AlexanderKoehn
Copy link

AlexanderKoehn commented Nov 23, 2018

Thanks for the report - yes, there's a of "mechanism" involved in the cross-compiling where the pure-javascript part can be dead simple. I've been meaning to port the 'organize' functionality but haven't gotten around to it. Would be glad to have help.

So you would port it using xml2dcm since this is ON or using the new js only dcmjs?

@pieper
Copy link
Member

pieper commented Nov 23, 2018

Originally I had planned to use dcm2xml and xml2dcm but it turned out the raw data save/restore path wasn't supported, so I couldn't recreate a valid dicom object with the pixel data. That's why there's the whole dcmdump/dump2dcm workaround. I was glad that it was able to work at all, but for porting I would definitely use the new dcmjs-org version. It's smaller, faster, more logical, etc.

The only real drawback is that it isn't as widely tested as dcmtk and no doubt there are features of dcmtk that are not supported in pure js currently.

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

No branches or pull requests

3 participants