def element_parents(dcm)
      parents = Array.new
      parents << dcm
      if @recursive
        dcm.sequences.each do |s|
          parents += element_parents_recursive(s)
        end
      end
      parents
    end
def element_parents(dcm)
      parents = Array.new
      parents << dcm
      if @recursive
        dcm.sequences.each do |s|
          parents += element_parents_recursive(s)
        end
      end
      parents
    end
Extracts all parents from a DObject instance which potentially
 have child (data) elements. This typically means the DObject
 instance itself as well as items (i.e. not sequences).
 Note that unless the @recursive attribute has been set,
 this method will only return the DObject (placed inside an array).

 @param [DObject] dcm a DICOM object
 @return [Array<DObject, Item>] an array containing either just a DObject or also all parental child items within the tag hierarchy