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

Is there a documentation for this package somewhere? #46

Closed
sama2689 opened this issue Jan 31, 2020 · 4 comments
Closed

Is there a documentation for this package somewhere? #46

sama2689 opened this issue Jan 31, 2020 · 4 comments

Comments

@sama2689
Copy link

I have just gotten started with this package and was able to load a dicom image into a workspace, but I am not sure which functions are available to deal with it. e.g. which methods are available, how do I access the header information, how do I decipher the image info from the image?

I am used to matlab, in which conveniently provides the function dicomread and dicominfo that allow access to the image and the metadata separately. Is it possible to do something similar with this package?

Thanks

@notZaki
Copy link
Member

notZaki commented Jan 31, 2020

The readme provides some basic information, but proper documentation is currently lacking.
Anyways, I'll mention a few steps (from memory, so they might not be exactly correct).

dcm_parse() returns the header information in a dictionary where the keys are the hex codes. For example, to get the series description, the steps would be:

dcm_data = dcm_parse(input_file)
series_description = dcm_data[(0x0008, 0x103E)]

Since hex codes are not always memorable, an alternative is dcm_data[tag"Series Description"].

For the pixels/image data, the steps would be:

pixel_data = dcm_data[(0x7FE0, 0x0010)] # or: dcm_data[tag"Pixel Data"]

The above is equivalent to pixel_data = dicomread(...) in matlab.

The image can be viewed using other packages such as ImageView.jl or Plots.jl. An example using the latter would be:

using Plots
heatmap(pixel_data; color = :grays, yflip = true, aspect_ratio = :equal)

@sama2689
Copy link
Author

The readme provides some basic information, but proper documentation is currently lacking.
Anyways, I'll mention a few steps (from memory, so they might not be exactly correct).

dcm_parse() returns the header information in a dictionary where the keys are the hex codes. For example, to get the series description, the steps would be:

dcm_data = dcm_parse(input_file)
series_description = dcm_data[(0x0008, 0x103E)]

Since hex codes are not always memorable, an alternative is dcm_data[tag"Series Description"].

For the pixels/image data, the steps would be:

pixel_data = dcm_data[(0x7FE0, 0x0010)] # or: dcm_data[tag"Pixel Data"]

The above is equivalent to pixel_data = dicomread(...) in matlab.

The image can be viewed using other packages such as ImageView.jl or Plots.jl. An example using the latter would be:

using Plots
heatmap(pixel_data; color = :grays, yflip = true, aspect_ratio = :equal)

Thank you! That is indeed quite helpful. If not any documentation, is there a legend of all the hex codes and what they correspond to anywhere? That's really all I'd need to figure the rest of it out myself I think.

@Tokazama Tokazama pinned this issue Jan 31, 2020
@Tokazama Tokazama unpinned this issue Jan 31, 2020
@notZaki
Copy link
Member

notZaki commented Jan 31, 2020

Some of the hex codes are in src/dcm_dict.jl.

A more complete list is available at dicom.nema.

@sama2689
Copy link
Author

Some of the hex codes are in src/dcm_dict.jl.

A more complete list is available at dicom.nema.

Thank you so much!

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

2 participants