| 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
| |||||||||||
| 34 | 0 | ▶ | $verbose = 0 unless $verbose =~ /^[0-2]$/; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | |||||||||||
| 36 | 0 | my $reader = DicomPack::IO::DicomReader->new($infile); | |||||||||
| 37 | |||||||||||
| 38 | 0 | $reader->showDicomField($verbose); | |||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | 1 | 1; | |||||||||
| 42 | |||||||||||
| 43 | __END__ | ||||||||||