-
Notifications
You must be signed in to change notification settings - Fork 599
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
DICOM Writer #264
Comments
DWV has got a 'beta' class to write DICOM: dicomWriter. First written to anonymise data, it can also be used to create new data. You can see some example usage in the tests folder: dicom/anonymiser.html and dicom/generator.html. I used them to create test data, I hope they are still functional! |
Works just fine. I can properly create a JSON object, write elements and pixel data, export and open it in a DICOM viewer. The DICOM dictionary file is very helpful. Thanks for references. just wondering: to attach an image the default bits per pixel is 16. The images I am working with are 8bit per pixel. I changed the "BitsAllocated" in DICOM object to 8, which caused an error in the writer. My current workaround is to set "BitsStored" to 8 and "HighBit" to 7 and it works just fine. But I am guessing the generated pixel array is twice the necessary size. Do you have any suggestions for supporting 8bit images? |
The generated pixel data uses 16bits. You could modify the generator to create 8bit data, check from this line generator.html#L183 to the creation of the |
It can be an input argument in the writer call. For now I got around it by keeping pixel data as 2 bytes. If I get to fix the library, I will request a pull. Closing the issue for now. Thanks for the timely support. |
I think something got broken. |
Thanks @rafasoyyo, could you create a new issue with this problem? |
Does DWV currently support manipulating and exporting DICOM files? If not, is there is plan to implement this in the future?
The text was updated successfully, but these errors were encountered: