#!/usr/bin/ruby # Demonostrating RubyOSA and OsiriX # Ron Sweeney, 2008 # ClubPACS Western Michigan require 'rubygems' require 'rbosa' osirix = OSA.app('OsiriX') # Print the version to the console puts "Osirix Version: " + osirix.version # Brings Osirix to the Foreground as the Active Application osirix.activate # Screencast purposes sleep(3) # Goes out and gets a file from a url, loads it and selects it. osirix.downloadurlfile(1, "http://homepage.mac.com/rossetantoine/internet.dcm") # Screencast purposes sleep(10) # Opens the selected study osirix.openviewerforselected(1) # Screencast purposes sleep(6) # Unload Osirix osirix.quit