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

Transpose images when reading/writing images #39

Merged
merged 3 commits into from
Nov 28, 2019
Merged

Transpose images when reading/writing images #39

merged 3 commits into from
Nov 28, 2019

Conversation

notZaki
Copy link
Member

@notZaki notZaki commented Nov 21, 2019

While going back and forth between Julia and an external dicom viewer, I've noticed that the images are always transposed in Julia.
This is likely because Julia's arrays are column-major while dicom's pixel arrays are row-major.
The solution was to permute the first two dimensions, and this seems to be working well.

A special case was added for interleaved images, i.e. those with (0x0028, 0x0006) Planar Configuration = 0. These weren't fully supported before, but they should now be properly parsed.
However, these images will still not be written correctly unless Planar Configuration is set to 1.

(Unrelated: a few tags/fields for animal scans were also added.)

I will merge this early next week if there aren't any objections.

@codecov
Copy link

codecov bot commented Nov 21, 2019

Codecov Report

Merging #39 into master will decrease coverage by 0.15%.
The diff coverage is 86.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #39      +/-   ##
==========================================
- Coverage   88.97%   88.81%   -0.16%     
==========================================
  Files           1        1              
  Lines         272      286      +14     
==========================================
+ Hits          242      254      +12     
- Misses         30       32       +2
Impacted Files Coverage Δ
src/DICOM.jl 88.81% <86.66%> (-0.16%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 293fcde...ef59e85. Read the comment docs.

@notZaki notZaki merged commit 2b565e7 into JuliaHealth:master Nov 28, 2019
@notZaki notZaki deleted the dev branch December 9, 2019 18:52
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.

1 participant