def open_file(file)
      if File.exist?(file)
        if File.readable?(file)
          if not File.directory?(file)
            if File.size(file) > 8
              begin
                @file = Zlib::GzipReader.new(File.new(file, "rb"))
              rescue Zlib::GzipFile::Error
                @file = File.new(file, "rb")
              end
            else
              @msg << "Error! File is too small to contain DICOM information (#{file})."
            end
          else
            @msg << "Error! File is a directory (#{file})."
          end
        else
          @msg << "Error! File exists but I don't have permission to read it (#{file})."
        end
      else
        @msg << "Error! The file you have supplied does not exist (#{file})."
      end
    end
def open_file(file)
      if File.exist?(file)
        if File.readable?(file)
          if not File.directory?(file)
            if File.size(file) > 8
              begin
                @file = Zlib::GzipReader.new(File.new(file, "rb"))
              rescue Zlib::GzipFile::Error
                @file = File.new(file, "rb")
              end
            else
              @msg << "Error! File is too small to contain DICOM information (#{file})."
            end
          else
            @msg << "Error! File is a directory (#{file})."
          end
        else
          @msg << "Error! File exists but I don't have permission to read it (#{file})."
        end
      else
        @msg << "Error! The file you have supplied does not exist (#{file})."
      end
    end
Tests if a file is readable, and if so, opens it.

 === Parameters

 * <tt>file</tt> -- A path/file string.