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

Unable to parse the data at multipart file while calling dicomWebRetrieveStudy.js API #1545

Closed
nehawankar174 opened this issue Nov 19, 2019 · 6 comments
Assignees
Labels
type: question Request for information or clarification. Not an issue.

Comments

@nehawankar174
Copy link

nehawankar174 commented Nov 19, 2019

Hello,

I am trying to call dicomWebRetrieveStudy API by calling healthcare/dicom/dicomWebRetrieveStudy.js file, here I am able to create multipart file. The response type is arraybuffer. I have attached the screenshot for response what I am getting now.

study_file_output

But now I want to parse the response in JSON format. How can I achieve the responce in JSON format.

Can anyone help for the same.

Thanks

@fhinkel fhinkel added the type: question Request for information or clarification. Not an issue. label Nov 19, 2019
@fhinkel
Copy link
Contributor

fhinkel commented Nov 19, 2019

👋 @nehawankar174 Thanks for opening the issue. @noerog Could you have a look please. Thanks.

@noerog
Copy link
Contributor

noerog commented Nov 19, 2019

Hi Nehawankar, this method is used to retrieve a multipart study file that you can parse to get each individual DICOM file. It is not intended to give a JSON response. What are you expecting in the JSON?

@nehawankar174
Copy link
Author

Hi Noerog,

Thanks for your quick response :)
I am looking for DICOM tags in the JSON file format along with DICOM file for the study.
I was expecting the result in JSON format as below:

[
{
"00020002": {
"Value": [
"1.2.840.10008.5.1.4.1.1.7"
],
"vr": "UI"
},
"00020013": {
"Value": [
"dcm4che-1.4.35"
],
"vr": "SH"
},
"00080005": {
"Value": [
"ISO_IR 100"
],
"vr": "CS"
},
"00080023": {
"Value": [
"20160503"
],
"vr": "DA"
},
"00080033": {
"Value": [
"105946.779000"
],
"vr": "TM"
},
}
]

In addition, if I am retrieving study details after the inference from Inference store, how I can parse multiple DICOM files and multiple JSON Files (2 .dcm + 2 .json)

Thanks!

@noerog
Copy link
Contributor

noerog commented Nov 20, 2019

If you want to receive a JSON response with details about the study, you should use the Search transaction searchForStudies method (https://cloud.google.com/healthcare/docs/reference/rest/v1beta1/projects.locations.datasets.dicomStores/searchForStudies). We have some samples of how to use the Search transaction for instances in https://cloud.google.com/healthcare/docs/how-tos/dicomweb#searching_for_studies_series_instances_and_frames, but you can do the same thing with studies.

Can you clarify what you mean by inference store?

@nehawankar174
Copy link
Author

Hey Noerog,

searchForStudies method worked for us and getting the response in JSON format.
And "My Inference Store” is from below notebook,
https://github.com/GoogleCloudPlatform/healthcare/blob/master/imaging/ml_codelab/breast_density_auto_ml.ipynb

At the bottom, there’s reference for “My Inference Store

Thanks!

@noerog
Copy link
Contributor

noerog commented Nov 21, 2019

If you retrieve a study, you need to parse it based on the multipart boundaries. There are many Node.js libraries for doing this and for parsing JSON.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

3 participants