Loading...
Searching...
No Matches
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)
void | setInputXferSyntax (E_TransferSyntax xfer)
| set the input transfer syntax for reading a DICOM file (default: EXS_Unknown)
void | setExecString (const char *execString)
| set a command line string to be executed after the encapsulated document has been written to file
void | setInputFile (const char *fname)
| set the filename (path) for the DICOM file to be read
void | setOutputFile (const char *fname)
| set the filename (path) for the output file to be written
OFCondition | loadDICOMFile ()
| load the encapsulated DICOM file into memory.
OFCondition | writeEncapsulatedContentToFile ()
| extract the encapsulated document, remove a pad byte if necessary, and write the document to the output file
OFCondition | executeCommand ()
| execute the pre-defined command line, replacing the placeholder "#f" with the actual output filename.

## 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

References execString_.

## setInputFile()

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

inline

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

Parameters

  fname | input file name

References inputFname_.

## 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

References inputXfer_.

## setOutputFile()

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

inline

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

Parameters

  fname | output file name

References outputFname_.

## 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

References readMode_.

## 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 for DCMTK Version 3.7.0 by Doxygen 1.15.0