Class: DICOM::DObject
- Inherits:
-
Object
- Object
- DICOM::DObject
- Defined in:
- lib/metamri/dicom_additions.rb
Overview
Reopen DObject to make tag hash
Instance Method Summary collapse
-
#remove_elements_that_differ_from(other_dobj) ⇒ Object
Remove elements from a dobj that aren’t identical to self’s tags.
-
#to_hash ⇒ Object
Return hash of => values.
Instance Method Details
#remove_elements_that_differ_from(other_dobj) ⇒ Object
Remove elements from a dobj that aren’t identical to self’s tags.
48 49 50 51 52 53 54 55 |
# File 'lib/metamri/dicom_additions.rb', line 48 def remove_elements_that_differ_from(other_dobj) .each_key do |k| unless [k].eql? other_dobj[k] # pp k, [@tags[k].value, other_dobj[k].value] remove k end end end |
#to_hash ⇒ Object
Return hash of => values
41 42 43 44 45 |
# File 'lib/metamri/dicom_additions.rb', line 41 def to_hash taghash = {} .each_key {|k| taghash[k] = value(k) } return taghash end |