dicom 0.4 → 0.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,25 @@
1
+ # This file contains extensions to the Ruby library which are used by Ruby DICOM.
2
+
3
+ class Array
4
+
5
+ # Searching all indices, or a subset of indices, in an array, and returning all indices
6
+ # where the array's value equals the queried value.
7
+ def all_indices(array, value)
8
+ result = []
9
+ self.each do |pos|
10
+ result << pos if array[pos] == value
11
+ end
12
+ result
13
+ end
14
+
15
+ # Similar to method above, but this one returns the position of all strings that
16
+ # contain the query string (exact match not required).
17
+ def all_indices_partial_match(array, value)
18
+ result = []
19
+ self.each do |pos|
20
+ result << pos if array[pos].include?(value)
21
+ end
22
+ result
23
+ end
24
+
25
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dicom
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.4"
4
+ version: "0.5"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christoffer Lervag
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-02-03 00:00:00 +01:00
12
+ date: 2009-05-06 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -22,19 +22,22 @@ extensions: []
22
22
  extra_rdoc_files: []
23
23
 
24
24
  files:
25
- - lib/DLibrary.rb
26
- - lib/DWrite.rb
27
25
  - lib/DObject.rb
28
- - lib/Anonymizer.rb
29
- - lib/dicom.rb
30
26
  - lib/DRead.rb
27
+ - lib/DWrite.rb
28
+ - lib/dicom.rb
29
+ - lib/Anonymizer.rb
30
+ - lib/DLibrary.rb
31
+ - lib/ruby_extensions.rb
31
32
  - lib/Dictionary.rb
32
33
  - DOCUMENTATION
33
34
  - README
34
- - CHANGELOG
35
35
  - COPYING
36
+ - CHANGELOG
36
37
  has_rdoc: false
37
38
  homepage: http://dicom.rubyforge.org/
39
+ licenses: []
40
+
38
41
  post_install_message:
39
42
  rdoc_options: []
40
43
 
@@ -55,9 +58,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
55
58
  requirements: []
56
59
 
57
60
  rubyforge_project: dicom
58
- rubygems_version: 1.2.0
61
+ rubygems_version: 1.3.2
59
62
  signing_key:
60
- specification_version: 2
63
+ specification_version: 3
61
64
  summary: Library for reading, editing and writing DICOM files.
62
65
  test_files: []
63
66