gdcm 1.0.0 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 854120bce512df7e3a80fb22685e825f45f06a92598bbafe5d99aa19faca89ad
4
- data.tar.gz: 916dce2f8f78d51513972d186aa392fd192b0d8f7a995ca77bb57d6d2e4dee94
3
+ metadata.gz: cc745d51403090fbfea4e4ab29470b304a4283dc79fe49befb21cbf36b1cf704
4
+ data.tar.gz: 6c66ba835ce7d417a37d57ac0d07e86926f620a28658250fa73be30ba142c2e0
5
5
  SHA512:
6
- metadata.gz: 6514e8369d16786dddb8056f16e5ec6d14aacdf8ae7c54f4027006feace229d1bf9ba2eba3726f46be1ab70bc548c09daaa7e587face7404b4cc4bbc7076ada7
7
- data.tar.gz: e343afd083dde1ad00d03e1d082694293293b7ffac4aef77e9c2ff5a33d82fe425448b7e107ff41bcc1e3c44c6ae50ef15bfdd50b3aec3c189c8f04411d7875f
6
+ metadata.gz: 2334c4fdc9a375fbb7d19684e0e208b0892a19fb4471f460c46a277885181c8626fae1234451aa13d0df660c0a89e254da72183f45cfc67f65929153a9be4659
7
+ data.tar.gz: 57d7163acd4cfeb556f19ce8f0431a94118a985ac0baad86ef0e740e1668ef8ed38cbc0d8b4ac05d7238d1030c4ddc12278ad8218bf6fabbb345938ab6abb31a
data/README.md CHANGED
@@ -150,8 +150,8 @@ end #=> `gdcmconv --raw --verbose input.dcm output.dcm`
150
150
  convert = GDCM::Tool::Convert.new
151
151
  convert.raw
152
152
  convert.verbose
153
- convert << "input.jpg"
154
- convert << "output.jpg"
153
+ convert << "input.dcm"
154
+ convert << "output.dcm"
155
155
  convert.call #=> `gdcmconv --raw --verbose input.dcm output.dcm`
156
156
  ```
157
157
 
@@ -7,6 +7,15 @@ module GDCM
7
7
  @package_instance = package_instance
8
8
  end
9
9
 
10
+ def raw
11
+ dump.lines.each_with_object([]) do |line, memo|
12
+ case line
13
+ when /^\s*\((?<package>[0-9a-f]{4},[0-9a-f]{4})\)/
14
+ puts line
15
+ end
16
+ end
17
+ end
18
+
10
19
  def data
11
20
  if meta.respond_to?(:lines)
12
21
  meta.lines.each_with_object({}) do |line, memo|
@@ -32,6 +41,13 @@ module GDCM
32
41
  @meta = nil
33
42
  end
34
43
 
44
+ def dump
45
+ GDCM::Tool::Dump.new do |builder|
46
+ yield builder if block_given?
47
+ builder << package_instance.path
48
+ end
49
+ end
50
+
35
51
  def identify
36
52
  GDCM::Tool::Identify.new do |builder|
37
53
  yield builder if block_given?
@@ -0,0 +1,9 @@
1
+ module GDCM
2
+ class Tool
3
+ class Dump < GDCM::Tool
4
+ def initialize(*args)
5
+ super("gdcmdump", *args)
6
+ end
7
+ end
8
+ end
9
+ end
data/lib/gdcm/tool.rb CHANGED
@@ -213,5 +213,6 @@ module GDCM
213
213
  end
214
214
  end
215
215
 
216
+ require "gdcm/tool/dump"
216
217
  require "gdcm/tool/convert"
217
218
  require "gdcm/tool/identify"
data/lib/gdcm/version.rb CHANGED
@@ -9,7 +9,7 @@ module GDCM
9
9
  module VERSION
10
10
  MAJOR = 1
11
11
  MINOR = 0
12
- TINY = 0
12
+ TINY = 3
13
13
  PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gdcm
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanzstez
@@ -69,6 +69,7 @@ files:
69
69
  - lib/gdcm/shell.rb
70
70
  - lib/gdcm/tool.rb
71
71
  - lib/gdcm/tool/convert.rb
72
+ - lib/gdcm/tool/dump.rb
72
73
  - lib/gdcm/tool/identify.rb
73
74
  - lib/gdcm/utilities.rb
74
75
  - lib/gdcm/version.rb