def actual_bit_depth
      raise "The 'Bits Allocated' Element is missing from this DICOM instance. Unable to encode/decode pixel data." unless exists?("0028,0100")
      if photometry == PI_PALETTE_COLOR
      # Only one channel is checked and it is assumed that all channels have the same number of bits.
        return self['0028,1101'].value.split("\\").last.to_i
      else
        return bit_depth
      end
    end
def actual_bit_depth
      raise "The 'Bits Allocated' Element is missing from this DICOM instance. Unable to encode/decode pixel data." unless exists?("0028,0100")
      if photometry == PI_PALETTE_COLOR
      # Only one channel is checked and it is assumed that all channels have the same number of bits.
        return self['0028,1101'].value.split("\\").last.to_i
      else
        return bit_depth
      end
    end
Gives the effective bit depth of the pixel data (considers a special case
 for Palette colored images).

 @raise [RuntimeError] if the 'Bits Allocated' element is missing
 @return [Integer] the effective bit depth of the pixel data