Class: DcmDict::Dictionary::DataElementRecord

Inherits:
BaseRecord show all
Defined in:
lib/dcm_dict/dictionary/data_element_record.rb

Overview

Class to handle data element record from source dictionary data

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ DataElementRecord

Returns a new instance of DataElementRecord.



49
50
51
# File 'lib/dcm_dict/dictionary/data_element_record.rb', line 49

def initialize(data)
  super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class DcmDict::Dictionary::BaseRecord

Instance Method Details

#extract_multiple_tag_record(tag) ⇒ Object

Extract data from ‘multiple tag’ record using tag



64
65
66
67
68
69
70
# File 'lib/dcm_dict/dictionary/data_element_record.rb', line 64

def extract_multiple_tag_record(tag)
  if ( record_data[:tag_multiple] && match_tag?(tag) )
    DataElementRecord.new( record_data.merge( { tag_str: tag.to_tag_str,
                                                tag_ndm: tag.to_tag_ndm,
                                                tag_ary: tag.to_tag_ary } ))
  end
end

#tag_elementObject

Element of tag



59
60
61
# File 'lib/dcm_dict/dictionary/data_element_record.rb', line 59

def tag_element
  record_data[:tag_ary].tag_element_num
end

#tag_groupObject

Group of tag



54
55
56
# File 'lib/dcm_dict/dictionary/data_element_record.rb', line 54

def tag_group
  record_data[:tag_ary].tag_group_num
end