Util/DicomDumper.pm

filter: Statementstmt 50.0% 11 / 22 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 60.0% 3 / 5 Podpod 100% 2 / 2 totaltotal 48.4% 16 / 33 CC 3 SCAR 17.7
CC
3
Cov
42%
dump
12.0
new
2.0
BEGIN
1.0
CRAP 5.9
« IO/CommonUtil.pm ↑ Summary Util/DicomAnonymizer.pm »
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 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 1 ▶use DicomPack::IO::DicomReader;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 1 our $VERSION = '0.95';
17  
18 sub new
19 0 ▶{
Subroutine new: not called CC=1 SCAR=6.9
Pod documented
20 0 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 0 ▶{
Subroutine dump: not called CC=3 SCAR=24.8
Pod documented
29 0 my $self = shift;
30 0 my $infile = shift;
31 0 my $verbose = shift;
32  
33 0 ▶ $verbose = 0 unless defined $verbose;
Branch: 1 branch
BranchTrueFalseTotal
unless defined $verbose 0 0 0
34 0 ▶ $verbose = 0 unless $verbose =~ /^[0-2]$/;
Branch: 1 branch
BranchTrueFalseTotal
unless $verbose =~ /^[0-2]$/ 0 0 0
35  
36 0 my $reader = DicomPack::IO::DicomReader->new($infile);
37  
38 0 $reader->showDicomField($verbose);
39 }
40  
41 1 1;
42  
43 __END__
« IO/CommonUtil.pm ↑ Summary Util/DicomAnonymizer.pm »