Skip to content

ENH: Add some conversions for DICOM values #419

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

Closed
wants to merge 3 commits into from

Conversation

moloney
Copy link
Contributor

@moloney moloney commented Mar 4, 2016

Adds conversions between DICOM 'TM' value representation and
seconds past midnight, as well as between 'AS' value representation
and years of age.



def tm_to_seconds(time_str):
'''Convert a DICOM time value (value representation of 'TM') to the number
Copy link
Member

Choose a reason for hiding this comment

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

Needs to be single descriptive line - maybe Convert DICOM time value (VR of 'TM') to seconds past midnight ?

@matthew-brett
Copy link
Member

I was playing with regexps for a long evening last night (had a few glasses of wine and wasn't sleeping), ended up with this: master...matthew-brett:419-using-regexps

Please feel totally free to ignore, but if you like it, will make a PR to your branch.

@matthew-brett
Copy link
Member

Brendan - anything I can do to help keep up the momentum?

@effigies
Copy link
Member

effigies commented Sep 5, 2017

@moloney Any interest in trying to finish these (including #416, #417 and #418 as well) before a new release?

moloney and others added 3 commits March 25, 2020 12:44
Adds conversions between DICOM 'TM' value representation and
seconds past midnight, as well as between 'AS' value representation
and years of age.
Also some numpy fancification of the nice error minimization of the AS
string selection.
@codecov
Copy link

codecov bot commented Mar 25, 2020

Codecov Report

Merging #419 into master will increase coverage by 0.00%.
The diff coverage is 94.73%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #419   +/-   ##
=======================================
  Coverage   91.70%   91.71%           
=======================================
  Files          96       96           
  Lines       12311    12349   +38     
  Branches     2173     2178    +5     
=======================================
+ Hits        11290    11326   +36     
- Misses        684      685    +1     
- Partials      337      338    +1     
Impacted Files Coverage Δ
nibabel/nicom/utils.py 96.66% <94.73%> (-3.34%) ⬇️

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 65d5fc6...198fc64. Read the comment docs.

@ZviBaratz
Copy link
Contributor

Implemented in dicom_parser, see Value Representation (particularly the Age String example and Time class).

@moloney
Copy link
Contributor Author

moloney commented Aug 9, 2021

Yes, I will close this one as we are moving to use dicom_parser for this functionality.

@moloney moloney closed this Aug 9, 2021
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.

4 participants