dicom 0.6.1 → 0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +42 -20
- data/DOCUMENTATION +117 -71
- data/README +3 -3
- data/lib/dicom.rb +23 -12
- data/lib/{Anonymizer.rb → dicom/Anonymizer.rb} +101 -79
- data/lib/{DClient.rb → dicom/DClient.rb} +12 -11
- data/lib/{DLibrary.rb → dicom/DLibrary.rb} +53 -31
- data/lib/dicom/DObject.rb +1579 -0
- data/lib/{DRead.rb → dicom/DRead.rb} +42 -43
- data/lib/{DServer.rb → dicom/DServer.rb} +34 -20
- data/lib/{DWrite.rb → dicom/DWrite.rb} +27 -31
- data/lib/{Dictionary.rb → dicom/Dictionary.rb} +434 -32
- data/lib/dicom/FileHandler.rb +50 -0
- data/lib/{Link.rb → dicom/Link.rb} +312 -167
- data/lib/{Stream.rb → dicom/Stream.rb} +1 -1
- data/lib/dicom/ruby_extensions.rb +47 -0
- metadata +16 -15
- data/lib/DObject.rb +0 -1194
- data/lib/ruby_extensions.rb +0 -36
data/lib/ruby_extensions.rb
DELETED
@@ -1,36 +0,0 @@
|
|
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
|
26
|
-
|
27
|
-
class String
|
28
|
-
|
29
|
-
# Check if a given string appears to be a valid tag:
|
30
|
-
def is_a_tag?
|
31
|
-
result = false
|
32
|
-
result = true if self.length == 9 and self[4..4] == ','
|
33
|
-
result
|
34
|
-
end
|
35
|
-
|
36
|
-
end
|