def read(string, options={})
      if string.is_a?(String)
        @string = string
        r = NRead.new(string, options)
        # Store the data to the instance variables if the readout was a success:
        if r.success
          @read_success = true
          # Update instance variables based on the properties of the NRead object:
          @header = r.hdr
          @extended_header = r.extended_header
          if r.image_narray
            @image = r.image_narray
          elsif r.image_rubyarray
            @image = r.image_rubyarray
          end
        else
          @read_success = false
        end
        # If any messages have been recorded, send these to the message handling method:
        add_msg(r.msg) if r.msg.length > 0
      else
        raise ArgumentError, "Invalid argument. Expected String, got #{string.class}."
      end
    end
def read(string, options={})
      if string.is_a?(String)
        @string = string
        r = NRead.new(string, options)
        # Store the data to the instance variables if the readout was a success:
        if r.success
          @read_success = true
          # Update instance variables based on the properties of the NRead object:
          @header = r.hdr
          @extended_header = r.extended_header
          if r.image_narray
            @image = r.image_narray
          elsif r.image_rubyarray
            @image = r.image_rubyarray
          end
        else
          @read_success = false
        end
        # If any messages have been recorded, send these to the message handling method:
        add_msg(r.msg) if r.msg.length > 0
      else
        raise ArgumentError, "Invalid argument. Expected String, got #{string.class}."
      end
    end
Returns a NIFTI object by reading and parsing the specified file.
 This is accomplished by initializing the NRead class, which loads NIFTI information.

 === Notes

 This method is called automatically when initializing the NObject class with a file parameter,
 and in practice should not be called by users.