NAME
DicomReader - A module to read Dicom Files
SYNOPSIS
use DicomPack::IO::DicomReader;
my $dicomFile = "your dicom file";
# get a DicomReader object
my $reader = DicomPack::IO::DicomReader->new($dicomFile);
# show the content of the Dicom file to std.
$reader->showDicomField(2);
# get patient name
my $patientName = $reader->getValue("PatientName");
# get the value of a complex structure. Return value is a sub Dicom field.
my $aDicomField = $reader->getValue("300a,0230/0/300a,0280/2/1001,01ff");
# show the above dicom structure to std.
$reader->showDicomField(2, $aDicomField);
# get the root Dicom field structure.
my $rootDicomField = $reader->getDicomField();
DESCRIPTION
This module reads a Dicom file.
Methods
new
-
Returns a new DicomReader object.
getValue
-
Get the value of a specified dicom field.
- Input Parameters:
-
Dicom tag path. Format: "TagID or TagName/SequenceNumber/TagID or TagName/SequenceNumber", e.g.,"300a,0230/0/300a,0280/2/1001,01ff/0/MaterialID".
mode (optional). When mode is 'native', the return value is in the native binary format prefixed 'vr:' (where vr is the VR value, e.g., 'UI').
- Return Value:
-
The value of the specified dicom field or a hash ref or an array ref.
getDicomField
-
Get a hash ref pointing to the root structure of the dicom fields.
showDicomField
-
Display the structure of a dicom field structure.
parseDicomString
-
Parse a string containing a Dicom binary field. The whole content of a Dicom file can be used as an input string.
isLittleEndian
-
Check the endianness of the current Dicom field structure.
isImplicitVR
-
Check if the current Dicom field structure is implicitly VRed.
AUTHOR
Baoshe Zhang, MCV Medical School, Virginia Commonwealth University