line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
############################################################################## |
2
|
|
|
|
|
|
|
# DicomDumper.pm -- a module to dump the conent of a dicom file to stdout |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
# Copyright (c) 2010 Baoshe Zhang. All rights reserved. |
5
|
|
|
|
|
|
|
# This file is part of "DicomPack". DicomReader is free software. You can |
6
|
|
|
|
|
|
|
# redistribute it and/or modify it under the same terms as Perl itself. |
7
|
|
|
|
|
|
|
############################################################################## |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
package DicomPack::Util::DicomDumper; |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
1450
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
30
|
|
12
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
20
|
|
13
|
|
|
|
|
|
|
|
14
|
1
|
|
|
1
|
|
5
|
use DicomPack::IO::DicomReader; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
159
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
our $VERSION = '0.95'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new |
19
|
|
|
|
|
|
|
{ |
20
|
0
|
|
|
0
|
1
|
|
my $classname = shift; |
21
|
0
|
|
|
|
|
|
my $self = {}; |
22
|
0
|
|
|
|
|
|
bless $self, $classname; |
23
|
0
|
|
|
|
|
|
return $self; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
# dump the content of a dicom file |
27
|
|
|
|
|
|
|
sub dump |
28
|
|
|
|
|
|
|
{ |
29
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
30
|
0
|
|
|
|
|
|
my $infile = shift; |
31
|
0
|
|
|
|
|
|
my $verbose = shift; |
32
|
|
|
|
|
|
|
|
33
|
0
|
0
|
|
|
|
|
$verbose = 0 unless defined $verbose; |
34
|
0
|
0
|
|
|
|
|
$verbose = 0 unless $verbose =~ /^[0-2]$/; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
my $reader = DicomPack::IO::DicomReader->new($infile); |
37
|
|
|
|
|
|
|
|
38
|
0
|
|
|
|
|
|
$reader->showDicomField($verbose); |
39
|
|
|
|
|
|
|
} |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
1; |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
__END__ |