DCMTK  Version 3.6.1 20170228
OFFIS DICOM Toolkit
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Static Public Member Functions | List of all members
DcmDataUtil Class Reference

Class with helper functions used within the dcmdata module (and beyond) More...

Static Public Member Functions

static OFCondition getSOPInstanceFromFile (const OFFilename &filename, OFString &sopClassUID, OFString &sopInstanceUID, OFString &transferSyntaxUID, const E_FileReadMode readMode=ERM_fileOnly)
 Get SOP Class UID, SOP Instance UID and Transfer Syntax UID from a DICOM file. More...
 
static OFCondition getSOPInstanceFromDataset (DcmDataset *dataset, const E_TransferSyntax datasetXfer, OFString &sopClassUID, OFString &sopInstanceUID, OFString &transferSyntaxUID)
 Get SOP Class UID, SOP Instance UID and Transfer Syntax UID from a DICOM dataset. More...
 

Detailed Description

Class with helper functions used within the dcmdata module (and beyond)

Member Function Documentation

static OFCondition DcmDataUtil::getSOPInstanceFromDataset ( DcmDataset dataset,
const E_TransferSyntax  datasetXfer,
OFString sopClassUID,
OFString sopInstanceUID,
OFString transferSyntaxUID 
)
static

Get SOP Class UID, SOP Instance UID and Transfer Syntax UID from a DICOM dataset.

The first two UID values are directly copied from the dataset. The latter is either taken from the parameter 'datasetXfer' or, if it is unknown, determined automatically from the dataset (if possible).

Parameters
datasetDICOM dataset from which the SOP Class UID and SOP Instance UID values are retrieved
datasetXferTransfer syntax of the dataset (if known, otherwise set to set to EXS_Unknown and then it is determined automatically)
sopClassUIDVariable in which the value of the SOP Class UID is stored
sopInstanceUIDVariable in which the value of the SOP Instance UID is stored
transferSyntaxUIDVariable in which the value of the Transfer Syntax UID is stored
Returns
EC_Normal if successful, an error code otherwise
static OFCondition DcmDataUtil::getSOPInstanceFromFile ( const OFFilename filename,
OFString sopClassUID,
OFString sopInstanceUID,
OFString transferSyntaxUID,
const E_FileReadMode  readMode = ERM_fileOnly 
)
static

Get SOP Class UID, SOP Instance UID and Transfer Syntax UID from a DICOM file.

The first two UID values are either copied from the meta-header (preferred) or from the dataset. The latter is either copied from the meta-header (preferred) or determined automatically (if possible).

Parameters
filenameName of the DICOM file from which the SOP Class UID and SOP Instance UID values are retrieved
sopClassUIDVariable to which the value of the SOP Class UID is stored
sopInstanceUIDVariable to which the value of the SOP Instance UID is stored
transferSyntaxUIDVariable to which the value of the Transfer Syntax UID is stored
readModeRead mode passed to the DcmFileFormat::loadFile() method. If ERM_fileOnly, only the file meta information header is loaded, i.e. the behavior is identical to using ERM_metaOnly.
Returns
EC_Normal if successful, an error code otherwise

The documentation for this class was generated from the following file:


Generated on Tue Feb 28 2017 for DCMTK Version 3.6.1 20170228 by Doxygen 1.8.8