Dicom_UID 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/dicom_uid.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6712bfe70973f9bba94bc7e2c610813418e734f200bd34afd49401f1595b1c62
|
4
|
+
data.tar.gz: f0ebfd5e118fe348dff6ce77bb9143baa9d631aab88dad0e5818367c8425af72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a84f77886588c4e6633e40e39e21bc7b1b3f7437cab6772fdc07cb1b4c253daaf9d2e01ec7bde2efa2c449c3822fdc16aa51f29ec0045ead27d1fe4267c2db4
|
7
|
+
data.tar.gz: 27b192b405982ae33ebc585f0f2b387ca3a800da8e7212b5d9c791076df93a326f22706a824911529139286c89c331556bbcfe69dd23f6270f4ded36366550af
|
data/lib/dicom_uid.rb
CHANGED
@@ -42,14 +42,14 @@ class DicomUID
|
|
42
42
|
|
43
43
|
# Generate recursively a random dicom uid
|
44
44
|
def rand_duid uid = '', remain
|
45
|
-
comp =
|
45
|
+
comp = random_component remain
|
46
46
|
remain -= comp.length
|
47
47
|
uid << comp
|
48
48
|
|
49
49
|
return uid if remain <= 0
|
50
50
|
|
51
51
|
uid << '.'
|
52
|
-
|
52
|
+
rand_duid uid, remain - 1
|
53
53
|
end
|
54
54
|
|
55
55
|
|
@@ -70,7 +70,7 @@ class DicomUID
|
|
70
70
|
raise RangeError("Size of UID can't be negative") if fixed_size < 0
|
71
71
|
|
72
72
|
# building the suffix
|
73
|
-
|
73
|
+
rand_duid org_root, (fixed_size - org_root.length), odd_byte_boundary
|
74
74
|
end
|
75
75
|
|
76
76
|
end
|