class Orthanc::Client
Attributes
base_uri[RW]
Public Class Methods
new(host = "localhost", port = 8042)
click to toggle source
# File lib/orthanc/client.rb, line 20 def initialize(host = "localhost", port = 8042) self.base_uri = RestClient::Resource.new("http://#{host}:#{port}") end
Public Instance Methods
changes(params = {})
click to toggle source
GET /changes
# File lib/orthanc/client.rb, line 37 def changes(params = {}) # "last", "limit" and "since" arguments handle_response(base_uri["changes"].get({params: params})) end
delete_changes(params = {})
click to toggle source
DELETE /changes
# File lib/orthanc/client.rb, line 42 def delete_changes(params = {}) # "last", "limit" and "since" arguments handle_response(base_uri["changes"].delete({params: params})) end
delete_exports(params = {})
click to toggle source
DELETE /exports
# File lib/orthanc/client.rb, line 52 def delete_exports(params = {}) # "last", "limit" and "since" arguments handle_response(base_uri["exports"].delete({params: params})) end
exports(params = {})
click to toggle source
GET /exports
# File lib/orthanc/client.rb, line 47 def exports(params = {}) # "last", "limit" and "since" arguments handle_response(base_uri["exports"].get({params: params})) end
instances(id = nil)
click to toggle source
# File lib/orthanc/client.rb, line 187 def instances(id = nil) # As class instances, for method chaining if id return Instance.new(id) else a = [] handle_response(base_uri["instances"].get).each do |id| a << Instance.new(id) end return a end end
instances_list()
click to toggle source
————- Instances ————-
# File lib/orthanc/client.rb, line 183 def instances_list # Orthanc endpoint response handle_response(base_uri["instances"].get) end
modalities(dicom = nil)
click to toggle source
# File lib/orthanc/client.rb, line 92 def modalities(dicom = nil) # As class instances, for method chaining if dicom return Modality.new(dicom) else a = [] handle_response(base_uri["modalities"].get).each do |dicom| a << Modality.new(dicom) end return a end end
modalities_list()
click to toggle source
————- Modalities ————-
# File lib/orthanc/client.rb, line 88 def modalities_list # Orthanc endpoint response handle_response(base_uri["modalities"].get) end
patients(id = nil)
click to toggle source
# File lib/orthanc/client.rb, line 130 def patients(id = nil) # As class instances, for method chaining if id return Patient.new(id) else a = [] handle_response(base_uri["patients"].get).each do |id| a << Patient.new(id) end return a end end
patients_list()
click to toggle source
————- Patients ————-
# File lib/orthanc/client.rb, line 126 def patients_list # Orthanc endpoint response handle_response(base_uri["patients"].get) end
peers(peer = nil)
click to toggle source
# File lib/orthanc/client.rb, line 111 def peers(peer = nil) # As class instances, for method chaining if peer return Peer.new(peer) else a = [] handle_response(base_uri["peers"].get).each do |peer| a << Peer.new(peer) end return a end end
peers_list()
click to toggle source
————- Modalities ————-
# File lib/orthanc/client.rb, line 107 def peers_list # Orthanc endpoint response handle_response(base_uri["peers"].get) end
plugins(id = nil)
click to toggle source
GET /plugins
# File lib/orthanc/client.rb, line 65 def plugins(id = nil) # As class instances, for method chaining if id return Plugin.new(id) else a = [] handle_response(base_uri["plugins"].get).each do |id| a << Plugin.new(id) end return a end end
plugins_list()
click to toggle source
GET /plugins
# File lib/orthanc/client.rb, line 60 def plugins_list # Orthanc endpoint response handle_response(base_uri["plugins"].get) end
series(id = nil)
click to toggle source
# File lib/orthanc/client.rb, line 168 def series(id = nil) # As class instances, for method chaining if id return Series.new(id) else a = [] handle_response(base_uri["series"].get).each do |id| a << Series.new(id) end return a end end
series_list()
click to toggle source
————- Series
————-
# File lib/orthanc/client.rb, line 164 def series_list # Orthanc endpoint response handle_response(base_uri["series"].get) end
statistics()
click to toggle source
GET /statistics
# File lib/orthanc/client.rb, line 32 def statistics handle_response(base_uri["statistics"].get) end
studies(id = nil)
click to toggle source
# File lib/orthanc/client.rb, line 149 def studies(id = nil) # As class instances, for method chaining if id return Study.new(id) else a = [] handle_response(base_uri["studies"].get).each do |id| a << Study.new(id) end return a end end
studies_list()
click to toggle source
————- Studies ————-
# File lib/orthanc/client.rb, line 145 def studies_list # Orthanc endpoint response handle_response(base_uri["studies"].get) end
system()
click to toggle source
GET /system
# File lib/orthanc/client.rb, line 27 def system handle_response(base_uri["system"].get) end
tools()
click to toggle source
GET /tools
# File lib/orthanc/client.rb, line 81 def tools Tool.new end