DCMTK Version 3.7.0 OFFIS DICOM Toolkit

Public Member Functions | Private Attributes | List of all members
DcmDocumentDecapsulator Class Reference

Helper class for extracting the encapsulated document from a DICOM encapsulated storage object to file. More...

## Public Member Functions
| DcmDocumentDecapsulator ()
| Constructor.
virtual | ~DcmDocumentDecapsulator ()
| Destructor.
void | setReadMode (E_FileReadMode mode)
| set the read mode for reading a DICOM file (default: ERM_autoDetect) More...
void | setInputXferSyntax (E_TransferSyntax xfer)
| set the input transfer syntax for reading a DICOM file (default: EXS_Unknown) More...
void | setExecString (const char *execString)
| set a command line string to be executed after the encapsulated document has been written to file More...
void | setInputFile (const char *fname)
| set the filename (path) for the DICOM file to be read More...
void | setOutputFile (const char *fname)
| set the filename (path) for the output file to be written More...
OFCondition | loadDICOMFile ()
| load the encapsulated DICOM file into memory. More...
OFCondition | writeEncapsulatedContentToFile ()
| extract the encapsulated document, remove a pad byte if necessary, and write the document to the output file More...
OFCondition | executeCommand ()
| execute the pre-defined command line, replacing the placeholder "#f" with the actual output filename. More...

## Private Attributes
E_FileReadMode | readMode_
| input file read mode
E_TransferSyntax | inputXfer_
| input transfer syntax
const char * | execString_
| command line string to be executed
const char * | inputFname_
| input filename
const char * | outputFname_
| output filename
DcmFileFormat | dicomFile_
| DICOM file.

## Detailed Description

Helper class for extracting the encapsulated document from a DICOM encapsulated storage object to file.

## Member Function Documentation

## ◆ executeCommand()

OFCondition DcmDocumentDecapsulator::executeCommand | ( |  | ) |

execute the pre-defined command line, replacing the placeholder "#f" with the actual output filename.

Returns
  EC_Normal upon success, an error code otherwise

## ◆ loadDICOMFile()

OFCondition DcmDocumentDecapsulator::loadDICOMFile | ( |  | ) |

load the encapsulated DICOM file into memory.

Returns
  EC_Normal upon success, an error code otherwise

## ◆ setExecString()

void DcmDocumentDecapsulator::setExecString | ( | const char * | execString | ) |
| inline

set a command line string to be executed after the encapsulated document has been written to file

Parameters

  execString | command line string

## ◆ setInputFile()

void DcmDocumentDecapsulator::setInputFile | ( | const char * | fname | ) |
| inline

set the filename (path) for the DICOM file to be read

Parameters

  fname | input file name

## ◆ setInputXferSyntax()

void DcmDocumentDecapsulator::setInputXferSyntax | ( | E_TransferSyntax | xfer | ) |
| inline

set the input transfer syntax for reading a DICOM file (default: EXS_Unknown)

Parameters

  xfer | new input transfer syntax

## ◆ setOutputFile()

void DcmDocumentDecapsulator::setOutputFile | ( | const char * | fname | ) |
| inline

set the filename (path) for the output file to be written

Parameters

  fname | output file name

## ◆ setReadMode()

void DcmDocumentDecapsulator::setReadMode | ( | E_FileReadMode | mode | ) |
| inline

set the read mode for reading a DICOM file (default: ERM_autoDetect)

Parameters

  mode | new read mode

## ◆ writeEncapsulatedContentToFile()

OFCondition DcmDocumentDecapsulator::writeEncapsulatedContentToFile | ( |  | ) |

extract the encapsulated document, remove a pad byte if necessary, and write the document to the output file

Returns
  EC_Normal upon success, an error code otherwise

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

- dcmdata/include/dcmtk/dcmdata/dcdocdec.h

Generated on Mon Dec 15 2025 for DCMTK Version 3.7.0 by Doxygen 1.9.1