def write(file_name, options={})
      if file_name.is_a?(String)
        w = NWrite.new(self, file_name, options)
        w.write
        # Write process succesful?
        @write_success = w.success
        # If any messages has been recorded, send these to the message handling method:
        add_msg(w.msg) if w.msg.length > 0
      else
        raise ArgumentError, "Invalid file_name. Expected String, got #{file_name.class}."
      end
    end
def write(file_name, options={})
      if file_name.is_a?(String)
        w = NWrite.new(self, file_name, options)
        w.write
        # Write process succesful?
        @write_success = w.success
        # If any messages has been recorded, send these to the message handling method:
        add_msg(w.msg) if w.msg.length > 0
      else
        raise ArgumentError, "Invalid file_name. Expected String, got #{file_name.class}."
      end
    end
Passes the NObject to the DWrite class, which writes out the header and image to the specified file.

 === Parameters

 * <tt>file_name</tt> -- A string which identifies the path & name of the NIfTI file which is to be written to disk.
 * <tt>options</tt> -- A hash of parameters.

 === Options

 === Examples

   obj.write(path + "test.dcm")