dicom 0.9.6 → 0.9.7

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source "http://www.rubygems.org"
2
-
1
+ source "http://www.rubygems.org"
2
+
3
3
  gemspec
@@ -1,47 +1,49 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dicom (0.9.6)
4
+ dicom (0.9.7)
5
5
 
6
6
  GEM
7
7
  remote: http://www.rubygems.org/
8
8
  specs:
9
9
  diff-lcs (1.2.5)
10
10
  metaclass (0.0.4)
11
- mini_magick (3.7.0)
12
- subexec (~> 0.2.1)
11
+ mini_magick (4.4.0)
13
12
  mocha (1.1.0)
14
13
  metaclass (~> 0.0.1)
15
- narray (0.6.0.8)
16
- rake (10.3.2)
17
- redcarpet (3.1.2)
18
- rmagick (2.13.2)
19
- rspec (3.0.0)
20
- rspec-core (~> 3.0.0)
21
- rspec-expectations (~> 3.0.0)
22
- rspec-mocks (~> 3.0.0)
23
- rspec-core (3.0.1)
24
- rspec-support (~> 3.0.0)
25
- rspec-expectations (3.0.1)
14
+ narray (0.6.1.1)
15
+ rake (10.5.0)
16
+ redcarpet (3.3.3)
17
+ rmagick (2.15.4)
18
+ rspec (3.4.0)
19
+ rspec-core (~> 3.4.0)
20
+ rspec-expectations (~> 3.4.0)
21
+ rspec-mocks (~> 3.4.0)
22
+ rspec-core (3.4.1)
23
+ rspec-support (~> 3.4.0)
24
+ rspec-expectations (3.4.0)
26
25
  diff-lcs (>= 1.2.0, < 2.0)
27
- rspec-support (~> 3.0.0)
28
- rspec-mocks (3.0.1)
29
- rspec-support (~> 3.0.0)
30
- rspec-support (3.0.0)
31
- subexec (0.2.3)
32
- yard (0.8.7.3)
26
+ rspec-support (~> 3.4.0)
27
+ rspec-mocks (3.4.0)
28
+ diff-lcs (>= 1.2.0, < 2.0)
29
+ rspec-support (~> 3.4.0)
30
+ rspec-support (3.4.0)
31
+ yard (0.8.7.6)
33
32
 
34
33
  PLATFORMS
35
34
  x86-mingw32
36
35
 
37
36
  DEPENDENCIES
38
- bundler (~> 1.6)
37
+ bundler (~> 1.11)
39
38
  dicom!
40
- mini_magick (~> 3.7)
39
+ mini_magick (~> 4.4)
41
40
  mocha (~> 1.1)
42
- narray (~> 0.6.0.8)
43
- rake (~> 10.3)
44
- redcarpet (~> 3.1)
45
- rmagick (~> 2.13.2)
46
- rspec (~> 3.0)
47
- yard (~> 0.8.7)
41
+ narray (~> 0.6, >= 0.6.1)
42
+ rake (~> 10.5)
43
+ redcarpet (~> 3.3)
44
+ rmagick (~> 2.15)
45
+ rspec (~> 3.4)
46
+ yard (~> 0.8, >= 0.8.7)
47
+
48
+ BUNDLED WITH
49
+ 1.11.2
data/README.md CHANGED
@@ -1,152 +1,154 @@
1
- # RUBY DICOM
2
-
3
- Ruby DICOM is a small and simple library for handling DICOM in Ruby. DICOM (Digital Imaging
4
- and Communications in Medicine) is a standard for handling, storing, printing,
5
- and transmitting information in medical imaging. It includes a file format definition
6
- and a network communications protocol. Ruby DICOM supports reading from, editing
7
- and writing to this file format. It also features basic support for select network
8
- communication modalities like querying, moving, sending and receiving files.
9
-
10
-
11
- ## INSTALLATION
12
-
13
- gem install dicom
14
-
15
-
16
- ## REQUIREMENTS
17
-
18
- * Ruby 1.9.3 (if you are still on Ruby 1.8, gems up to version 0.9.1 can be used)
19
-
20
-
21
- ## BASIC USAGE
22
-
23
- ### Load & Include
24
-
25
- require 'dicom'
26
- include DICOM
27
-
28
- ### Read, modify and write
29
-
30
- # Read file:
31
- dcm = DObject.read("some_file.dcm")
32
- # Extract the Patient's Name value:
33
- dcm.patients_name.value
34
- # Add or modify the Patient's Name element:
35
- dcm.patients_name = "Anonymous"
36
- # Remove a data element from the DICOM object:
37
- dcm.pixel_data = nil
38
- # Write to file:
39
- dcm.write("new_file.dcm")
40
-
41
- ### Modify using tag strings instead of dictionary method names
42
-
43
- # Extract the Patient's Name value:
44
- dcm.value("0010,0010")
45
- # Modify the Patient's Name element:
46
- dcm["0010,0010"].value = "Anonymous"
47
- # Delete a data element from the DICOM object:
48
- dcm.delete("7FE0,0010")
49
-
50
- ### Extracting information about the DICOM object
51
-
52
- # Display a short summary of the file's properties:
53
- dcm.summary
54
- # Print all data elements to screen:
55
- dcm.print
56
- # Convert the data element hierarchy to a nested hash:
57
- dcm.to_hash
58
-
59
- ### Handle pixel data
60
-
61
- # Retrieve the pixel data in a Ruby Array:
62
- dcm.pixels
63
- # Load the pixel data to an numerical array (NArray):
64
- dcm.narray
65
- # Load the pixel data to an RMagick image object and display it on screen (X):
66
- dcm.image.normalize.display
67
-
68
- ### Transmit a DICOM file
69
-
70
- # Send a local file to a server (PACS) over the network:
71
- node = DClient.new("10.1.25.200", 104)
72
- node.send("some_file.dcm")
73
-
74
- ### Start a DICOM server
75
-
76
- # Initiate a simple storage provider which can receive DICOM files of all modalities:
77
- s = DServer.new(104, :host_ae => "MY_DICOM_SERVER")
78
- s.start_scp("C:/temp/")
79
-
80
- ### Log settings
81
-
82
- # Change the log level so that only error messages are displayed:
83
- DICOM.logger.level = Logger::ERROR
84
- # Setting up a simple file log:
85
- l = Logger.new('my_logfile.log')
86
- DICOM.logger = l
87
- # Create a logger which ages logfile daily/monthly:
88
- DICOM.logger = Logger.new('foo.log', 'daily')
89
- DICOM.logger = Logger.new('foo.log', 'monthly')
90
-
91
-
92
- ### IRB Tip
93
-
94
- When working with Ruby DICOM in irb, you may be annoyed with all the information
95
- that is printed to screen, regardless if you have set verbose as false. This is because
96
- in irb every variable loaded in the program is automatically printed to the screen.
97
- A useful hack to avoid this effect is to append ";0" after a command.
98
- Example:
99
-
100
- dcm = DObject.read("some_file.dcm") ;0
101
-
102
-
103
- ## RESOURCES
104
-
105
- * [Official home page](http://dicom.rubyforge.org/)
106
- * [Discussion forum](http://groups.google.com/group/ruby-dicom)
107
- * [Documentation](http://rubydoc.info/gems/dicom/frames)
108
- * [Tutorials](http://dicom.rubyforge.org/tutorials.html)
109
- * [Source code repository](https://github.com/dicom/ruby-dicom)
110
-
111
-
112
- ## COPYRIGHT
113
-
114
- Copyright 2008-2014 Christoffer Lervåg
115
-
116
- This program is free software: you can redistribute it and/or modify
117
- it under the terms of the GNU General Public License as published by
118
- the Free Software Foundation, either version 3 of the License, or
119
- (at your option) any later version.
120
-
121
- This program is distributed in the hope that it will be useful,
122
- but WITHOUT ANY WARRANTY; without even the implied warranty of
123
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
124
- GNU General Public License for more details.
125
-
126
- You should have received a copy of the GNU General Public License
127
- along with this program. If not, see http://www.gnu.org/licenses/ .
128
-
129
-
130
- ## ABOUT THE AUTHOR
131
-
132
- * Name: Christoffer Lervåg
133
- * Location: Norway
134
- * Email: chris.lervag [@nospam.com] @gmail.com
135
-
136
- Please don't hesitate to email me if you have any feedback related to this project!
137
-
138
-
139
- ## CONTRIBUTORS
140
-
141
- * [Christoffer Lervåg](https://github.com/dicom)
142
- * [John Axel Eriksson](https://github.com/johnae)
143
- * [Kamil Bujniewicz](https://github.com/icdark)
144
- * [Jeff Miller](https://github.com/jeffmax)
145
- * [Donnie Millar](https://github.com/dmillar)
146
- * [Björn Albers](https://github.com/bjoernalbers)
147
- * [Felix Petriconi](https://github.com/FelixPetriconi)
148
- * [Greg Tangey](https://github.com/Ruxton)
149
- * [Cian Hughes](https://github.com/cian)
150
- * [Steven Bedrick](https://github.com/stevenbedrick)
151
- * [Lars Benner](https://github.com/Maturin)
152
- * [Brett Goulder](https://github.com/brettgoulder)
1
+ # RUBY DICOM
2
+
3
+ Ruby DICOM is a small and simple library for handling DICOM in Ruby. DICOM (Digital Imaging
4
+ and Communications in Medicine) is a standard for handling, storing, printing,
5
+ and transmitting information in medical imaging. It includes a file format definition
6
+ and a network communications protocol. Ruby DICOM supports reading from, editing
7
+ and writing to this file format. It also features basic support for select network
8
+ communication modalities like querying, moving, sending and receiving files.
9
+
10
+
11
+ ## INSTALLATION
12
+
13
+ gem install dicom
14
+
15
+
16
+ ## REQUIREMENTS
17
+
18
+ * Ruby 1.9.3 (if you are still on Ruby 1.8, gems up to version 0.9.1 can be used)
19
+
20
+
21
+ ## BASIC USAGE
22
+
23
+ ### Load & Include
24
+
25
+ require 'dicom'
26
+ include DICOM
27
+
28
+ ### Read, modify and write
29
+
30
+ # Read file:
31
+ dcm = DObject.read("some_file.dcm")
32
+ # Extract the Patient's Name value:
33
+ dcm.patients_name.value
34
+ # Add or modify the Patient's Name element:
35
+ dcm.patients_name = "Anonymous"
36
+ # Remove a data element from the DICOM object:
37
+ dcm.pixel_data = nil
38
+ # Write to file:
39
+ dcm.write("new_file.dcm")
40
+
41
+ ### Modify using tag strings instead of dictionary method names
42
+
43
+ # Extract the Patient's Name value:
44
+ dcm.value("0010,0010")
45
+ # Modify the Patient's Name element:
46
+ dcm["0010,0010"].value = "Anonymous"
47
+ # Delete a data element from the DICOM object:
48
+ dcm.delete("7FE0,0010")
49
+
50
+ ### Extracting information about the DICOM object
51
+
52
+ # Display a short summary of the file's properties:
53
+ dcm.summary
54
+ # Print all data elements to screen:
55
+ dcm.print
56
+ # Convert the data element hierarchy to a nested hash:
57
+ dcm.to_hash
58
+
59
+ ### Handle pixel data
60
+
61
+ # Retrieve the pixel data in a Ruby Array:
62
+ dcm.pixels
63
+ # Load the pixel data to an numerical array (NArray):
64
+ dcm.narray
65
+ # Load the pixel data to an RMagick image object and display it on screen (X):
66
+ dcm.image.normalize.display
67
+
68
+ ### Transmit a DICOM file
69
+
70
+ # Send a local file to a server (PACS) over the network:
71
+ node = DClient.new("10.1.25.200", 104)
72
+ node.send("some_file.dcm")
73
+
74
+ ### Start a DICOM server
75
+
76
+ # Initiate a simple storage provider which can receive DICOM files of all modalities:
77
+ s = DServer.new(104, :host_ae => "MY_DICOM_SERVER")
78
+ s.start_scp("C:/temp/")
79
+
80
+ ### Log settings
81
+
82
+ # Change the log level so that only error messages are displayed:
83
+ DICOM.logger.level = Logger::ERROR
84
+ # Setting up a simple file log:
85
+ l = Logger.new('my_logfile.log')
86
+ DICOM.logger = l
87
+ # Create a logger which ages logfile daily/monthly:
88
+ DICOM.logger = Logger.new('foo.log', 'daily')
89
+ DICOM.logger = Logger.new('foo.log', 'monthly')
90
+
91
+
92
+ ### IRB Tip
93
+
94
+ When working with Ruby DICOM in irb, you may be annoyed with all the information
95
+ that is printed to screen, regardless if you have set verbose as false. This is because
96
+ in irb every variable loaded in the program is automatically printed to the screen.
97
+ A useful hack to avoid this effect is to append ";0" after a command.
98
+ Example:
99
+
100
+ dcm = DObject.read("some_file.dcm") ;0
101
+
102
+
103
+ ## RESOURCES
104
+
105
+ * [Official home page](http://dicom.github.io/ruby-dicom/)
106
+ * [Discussion forum](http://groups.google.com/group/ruby-dicom)
107
+ * [Documentation](http://rubydoc.info/gems/dicom/frames)
108
+ * [Tutorials](http://dicom.github.io/ruby-dicom/tutorials.html)
109
+ * [Source code repository](https://github.com/dicom/ruby-dicom)
110
+
111
+
112
+ ## COPYRIGHT
113
+
114
+ Copyright 2008-2017 Christoffer Lervåg
115
+
116
+ This program is free software: you can redistribute it and/or modify
117
+ it under the terms of the GNU General Public License as published by
118
+ the Free Software Foundation, either version 3 of the License, or
119
+ (at your option) any later version.
120
+
121
+ This program is distributed in the hope that it will be useful,
122
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
123
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
124
+ GNU General Public License for more details.
125
+
126
+ You should have received a copy of the GNU General Public License
127
+ along with this program. If not, see http://www.gnu.org/licenses/ .
128
+
129
+
130
+ ## ABOUT THE AUTHOR
131
+
132
+ * Name: Christoffer Lervåg
133
+ * Location: Norway
134
+ * Email: chris.lervag [@nospam.com] @gmail.com
135
+
136
+ Please don't hesitate to email me if you have any feedback related to this project!
137
+
138
+
139
+ ## CONTRIBUTORS
140
+
141
+ * [Christoffer Lervåg](https://github.com/dicom)
142
+ * [John Axel Eriksson](https://github.com/johnae)
143
+ * [Kamil Bujniewicz](https://github.com/icdark)
144
+ * [Jeff Miller](https://github.com/jeffmax)
145
+ * [Donnie Millar](https://github.com/dmillar)
146
+ * [Björn Albers](https://github.com/bjoernalbers)
147
+ * [Felix Petriconi](https://github.com/FelixPetriconi)
148
+ * [Greg Tangey](https://github.com/Ruxton)
149
+ * [Cian Hughes](https://github.com/cian)
150
+ * [Steven Bedrick](https://github.com/stevenbedrick)
151
+ * [Lars Benner](https://github.com/Maturin)
152
+ * [Brett Goulder](https://github.com/brettgoulder)
153
+ * André Wuttke
154
+ * Thomas Koschel
@@ -1,31 +1,31 @@
1
- # encoding: UTF-8
2
-
3
- require File.expand_path('../lib/dicom/general/version', __FILE__)
4
-
5
- Gem::Specification.new do |s|
6
- s.platform = Gem::Platform::RUBY
7
- s.name = 'dicom'
8
- s.version = DICOM::VERSION
9
- s.date = Time.now
10
- s.summary = "Library for handling DICOM files and DICOM network communication."
11
- s.require_paths = ['lib']
12
- s.author = 'Christoffer Lervag'
13
- s.email = 'chris.lervag@gmail.com'
14
- s.homepage = 'http://dicom.rubyforge.org/'
15
- s.license = 'GPLv3'
16
- s.description = "DICOM is a standard widely used throughout the world to store and transfer medical image data. This library enables efficient and powerful handling of DICOM in Ruby, to the benefit of any student or professional who would like to use their favorite language to process DICOM files and communicate across the network."
17
- s.files = Dir["{lib}/**/*", "[A-Z]*"]
18
- s.rubyforge_project = 'dicom'
19
-
20
- s.required_ruby_version = '>= 1.9.3'
21
-
22
- s.add_development_dependency('bundler', '~> 1.6')
23
- s.add_development_dependency('mini_magick', '~> 3.7')
24
- s.add_development_dependency('mocha', '~> 1.1')
25
- s.add_development_dependency('narray', '~> 0.6', '>= 0.6.0.8')
26
- s.add_development_dependency('rake', '~> 10.3')
27
- s.add_development_dependency('redcarpet', '~> 3.1')
28
- s.add_development_dependency('rmagick', '~> 2.13', '>= 2.13.2')
29
- s.add_development_dependency('rspec', '~> 3.0')
30
- s.add_development_dependency('yard', '~> 0.8', '>= 0.8.7')
1
+ # encoding: UTF-8
2
+
3
+ require File.expand_path('../lib/dicom/general/version', __FILE__)
4
+
5
+ Gem::Specification.new do |s|
6
+ s.platform = Gem::Platform::RUBY
7
+ s.name = 'dicom'
8
+ s.version = DICOM::VERSION
9
+ s.date = Time.now
10
+ s.summary = "Library for handling DICOM files and DICOM network communication."
11
+ s.require_paths = ['lib']
12
+ s.author = 'Christoffer Lervag'
13
+ s.email = 'chris.lervag@gmail.com'
14
+ s.homepage = 'http://dicom.rubyforge.org/'
15
+ s.license = 'GPL-3.0'
16
+ s.description = "DICOM is a standard widely used throughout the world to store and transfer medical image data. This library enables efficient and powerful handling of DICOM in Ruby, to the benefit of any student or professional who would like to use their favorite language to process DICOM files and communicate across the network."
17
+ s.files = Dir["{lib}/**/*", "[A-Z]*"]
18
+ s.rubyforge_project = 'dicom'
19
+
20
+ s.required_ruby_version = '>= 2.2.2'
21
+
22
+ s.add_development_dependency('bundler', '~> 1.11')
23
+ s.add_development_dependency('mini_magick', '~> 4.4')
24
+ s.add_development_dependency('mocha', '~> 1.1')
25
+ s.add_development_dependency('narray', '~> 0.6', '>= 0.6.1')
26
+ s.add_development_dependency('rake', '~> 10.5')
27
+ s.add_development_dependency('redcarpet', '~> 3.3')
28
+ s.add_development_dependency('rmagick', '~> 2.15')
29
+ s.add_development_dependency('rspec', '~> 3.4')
30
+ s.add_development_dependency('yard', '~> 0.8', '>= 0.8.7')
31
31
  end