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

started working on DICOM support (stored in Media object) #116

Merged
merged 11 commits into from
Apr 5, 2023
Merged

Conversation

AnalogJ
Copy link
Member

@AnalogJ AnalogJ commented Mar 18, 2023

fixes #39

dicom_viewer_0012.zip

test file attached to this PR - extract it first.

The relevant files that my be broken are here:

DICOM display component

Resource Base64 decoding

DICOM file uploading (via Form)


instructions

  • us the Condition Creator to describe a new condition - http:https://localhost:XXXX/web/resource/create
    • make sure you attach the DCM file extracted from the zip file attached to this issue.
    • Category should be Diagnostic imaging study
    • File Type should be Image - DICOM
  • After submitting, you should be redirected to the Conditions Report. Find the new condition you created, expand the "show all" link.
  • Click Media
  • Figure out why the manually uploaded file works, but the Base64 encoded file in the Media resource is broken
    • is Sqlite truncating the content
    • is the Base64 decode -> Blob conversion broken?
    • are we only uploading a segment of the binary data instead of the full file.

Screen Shot 2023-03-24 at 8 42 07 AM

Screen Shot 2023-03-24 at 8 43 05 AM

Comment on lines 143 to 149
//TODO: THIS IS BROKEN. FIX IT
let files = [new File([
new Blob([this.displayModel.content])
], "dicom.dcm", {type: "application/dicom"})]
console.log("LOADED FILE FROM RESOURCE", files)

this.dwvApp.loadFiles(files);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: we need to figure out why this is broken.

Comment on lines 297 to 303
onFileChange(event) {
//TODO: This works correctly, but it's not the right way to do it (we should load from resource)
console.log("onFileChange");
console.log(event);
console.log(event.target.files);
this.dwvApp.loadFiles(event.target.files);
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: this works, but we need to remove it.

@AnalogJ AnalogJ merged commit 01b6cc3 into main Apr 5, 2023
@AnalogJ AnalogJ deleted the dicom_viewer branch April 5, 2023 02:25
@AnalogJ
Copy link
Member Author

AnalogJ commented Apr 15, 2023

DICOM

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

Successfully merging this pull request may close these issues.

Display Medical Imaging files - DICOM
1 participant