DCMTK
Version 3.6.6
OFFIS DICOM Toolkit
|
This class handles common functions of all command line applications for document encapsulation. More...
Public Member Functions | |
DcmEncapsulatedDocument () | |
Constructor. | |
~DcmEncapsulatedDocument () | |
Destructor. | |
OFString | XMLgetAllAttributeValues (XMLNode fileNode, OFString attr) |
This function is only used to process CDA files. More... | |
OFString | XMLgetAttribute (XMLNode fileNode, DcmTagKey attr) |
This function is only used to process CDA files. More... | |
int | getCDAData (const char *filename, OFLogger &appLogger) |
Retrieves patient, concept and document data from the CDA file and checks for data conflicts with series, study and user input. More... | |
OFBool | XMLsearchAttribute (XMLNode currnode, OFList< OFString > *results, OFString attr) |
Recursive function used by getAttributeValues to get all occurrences of an attribute as list. More... | |
void | addCDACommandlineOptions (OFCommandLine &cmd) |
Add CDA specific command line options to the OFCommandLine object passed to the constructor. More... | |
void | addPDFCommandlineOptions (OFCommandLine &cmd) |
Add PDF specific command line options to the OFCommandLine object passed to the constructor. More... | |
void | addSTLCommandlineOptions (OFCommandLine &cmd) |
Add STL specific command line options to the OFCommandLine object passed to the constructor. More... | |
void | addGeneralOptions (OFCommandLine &cmd) |
Add general command line options to the OFCommandLine object passed to the constructor. More... | |
void | addDocumentOptions (OFCommandLine &cmd) |
Add command line options specific for documents to the OFCommandLine object passed to the constructor. More... | |
void | addOutputOptions (OFCommandLine &cmd) |
Add command line options specific for output to the OFCommandLine object passed to the constructor. More... | |
void | parseArguments (OFConsoleApplication &app, OFCommandLine &cmd) |
Parse and evaluate the given command line arguments. More... | |
OFCondition | createHeader (DcmItem *dataset, OFLogger &logger) |
Includes basic information into the DICOM file. More... | |
int | insertEncapsulatedDocument (DcmItem *dataset, OFLogger &logger) |
Correctly inserts encapsulated document data. More... | |
OFCondition | createIdentifiers (OFLogger &appLogger) |
Get study or series data from provided file. More... | |
OFCondition | applyOverrideKeys (DcmDataset *outputDset) |
Copy override keys over existing keys in given dataset. More... | |
void | setOverrideKeys (const OFList< OFString > &ovkeys) |
Specifies some attributes that should be inserted after encapsulation They will override any identical attributes already existing in the resulting encapsulated DICOM object. More... | |
OFString | getInputFileName () |
Returns the input file name. More... | |
void | setInputFileName (OFString fName) |
Sets the input file name to the given string. More... | |
OFString | getOutputFileName () |
Returns the output file name. More... | |
void | setOutputFileName (OFString fName) |
Sets the output file name. More... | |
OFCondition | saveFile (DcmFileFormat fileformat) |
Attempt to save the output file . More... | |
E_TransferSyntax | getTransferSyntax () |
Returns the transfer syntax. More... | |
OFString | getFileType () |
Returns the current filetype. More... | |
void | setFileType (OFString fType) |
Sets the current filetype. More... | |
Private Attributes | |
OFString | opt_ifname |
input file name | |
OFString | opt_ofname |
output file name | |
OFString | opt_patientBirthdate |
optional parameters *patient data | |
OFString | opt_conceptCM |
*concept data | |
OFString | opt_documentTitle |
*document specific options | |
E_EncodingType | opt_oenctype |
*assign default values for file encoding and padding | |
OFBool | opt_readSeriesInfo |
*pre-existing series | |
OFList< OFString > | opt_overrideKeys |
These attributes are applied to the dataset after conversion (They are not checked by the isValid() function). | |
OFString | cda_mediaTypes |
CDA specific variables. | |
OFString | opt_frameOfReferenceUID |
STL specific variables Frame of Reference module. | |
OFString | opt_manufacturer |
Enhanced general equipment module Manufacturer (VM 1) | |
OFString | opt_manufacturerModelName |
Manufacturer's Model Name (VM 1) | |
OFString | opt_deviceSerialNumber |
Device Serial Number (VM 1) | |
OFString | opt_softwareVersions |
Software Version(s) (VM 1-n) | |
OFString | opt_measurementUnitsCM |
Manufacturing 3D Model Module 3d Model Measurement Units Code Meaning. | |
OFString | opt_measurementUnitsCSD |
3d Model Measurement Units Code Scheme Designator | |
OFString | opt_measurementUnitsCV |
3d Model Measurement Units Code Value | |
OFString | ftype |
Type of file currently being converted. | |
This class handles common functions of all command line applications for document encapsulation.
void DcmEncapsulatedDocument::addCDACommandlineOptions | ( | OFCommandLine & | cmd | ) |
Add CDA specific command line options to the OFCommandLine object passed to the constructor.
cmd | a reference to an OFCommandLine object used to parse the command line argument give to the calling application. |
void DcmEncapsulatedDocument::addDocumentOptions | ( | OFCommandLine & | cmd | ) |
Add command line options specific for documents to the OFCommandLine object passed to the constructor.
cmd | a reference to an OFCommandLine object used to parse the command line argument give to the calling application. |
void DcmEncapsulatedDocument::addGeneralOptions | ( | OFCommandLine & | cmd | ) |
Add general command line options to the OFCommandLine object passed to the constructor.
cmd | a reference to an OFCommandLine object used to parse the command line argument give to the calling application. |
void DcmEncapsulatedDocument::addOutputOptions | ( | OFCommandLine & | cmd | ) |
Add command line options specific for output to the OFCommandLine object passed to the constructor.
cmd | a reference to an OFCommandLine object used to parse the command line argument give to the calling application. |
void DcmEncapsulatedDocument::addPDFCommandlineOptions | ( | OFCommandLine & | cmd | ) |
Add PDF specific command line options to the OFCommandLine object passed to the constructor.
cmd | a reference to an OFCommandLine object used to parse the command line argument give to the calling application. |
void DcmEncapsulatedDocument::addSTLCommandlineOptions | ( | OFCommandLine & | cmd | ) |
Add STL specific command line options to the OFCommandLine object passed to the constructor.
cmd | a reference to an OFCommandLine object used to parse the command line argument give to the calling application. |
OFCondition DcmEncapsulatedDocument::applyOverrideKeys | ( | DcmDataset * | outputDset | ) |
Copy override keys over existing keys in given dataset.
outputDset | dataset to which the override keys are copied |
OFCondition DcmEncapsulatedDocument::createHeader | ( | DcmItem * | dataset, |
OFLogger & | logger | ||
) |
Includes basic information into the DICOM file.
dataset | a reference to a DcmItem containing the information to be included. |
logger | The logger of the application calling this method. |
OFCondition DcmEncapsulatedDocument::createIdentifiers | ( | OFLogger & | appLogger | ) |
Get study or series data from provided file.
Generate UID if none present.
appLogger | The logger of the application calling this method. |
int DcmEncapsulatedDocument::getCDAData | ( | const char * | filename, |
OFLogger & | appLogger | ||
) |
Retrieves patient, concept and document data from the CDA file and checks for data conflicts with series, study and user input.
It also retrieves all mediatypes found in the CDA document.
filename | The filename of the CDA document. |
appLogger | The logger of the application calling this method. |
OFString DcmEncapsulatedDocument::getFileType | ( | ) |
Returns the current filetype.
OFString DcmEncapsulatedDocument::getInputFileName | ( | ) |
Returns the input file name.
OFString DcmEncapsulatedDocument::getOutputFileName | ( | ) |
Returns the output file name.
E_TransferSyntax DcmEncapsulatedDocument::getTransferSyntax | ( | ) |
Returns the transfer syntax.
Correctly inserts encapsulated document data.
dataset | The dataset to which we should encapsulate this document. |
logger | The logger of the application calling this method. |
void DcmEncapsulatedDocument::parseArguments | ( | OFConsoleApplication & | app, |
OFCommandLine & | cmd | ||
) |
Parse and evaluate the given command line arguments.
app | a reference to an OFConsoleApplication object used in the calling application. |
cmd | a reference to an OFCommandLine object used to parse the command line argument give to the calling application. |
OFCondition DcmEncapsulatedDocument::saveFile | ( | DcmFileFormat | fileformat | ) |
Attempt to save the output file .
fileformat | the DICOM Fileformat including the output file params. |
void DcmEncapsulatedDocument::setFileType | ( | OFString | fType | ) |
Sets the current filetype.
fType | the current filetype. |
void DcmEncapsulatedDocument::setInputFileName | ( | OFString | fName | ) |
Sets the input file name to the given string.
fName | the file name to be set. |
void DcmEncapsulatedDocument::setOutputFileName | ( | OFString | fName | ) |
Sets the output file name.
fName | the file name to be set. |
Specifies some attributes that should be inserted after encapsulation They will override any identical attributes already existing in the resulting encapsulated DICOM object.
The override keys are applied at the very end of the conversion and do not undergo any validity checking.
ovkeys | override keys that can be tags, dictionary names and paths (see DcmPath for syntax). Also it is permitted to set a value if appropriate, e. g. "PatientName=Doe^John" would be a valid overridekey. |
This function is only used to process CDA files.
It retrieves all entries of an attribute and returns them separated by backslashes.
fileNode | the root XML node. |
attr | the attribute to search for. |
This function is only used to process CDA files.
It retrieves the value from the CDA document corresponding to the DCM Tag. According to Standard v. 2013 part20/sect_A.8.
fileNode | the root XML node. |
attr | the tag to search for in the CDA file. |
OFBool DcmEncapsulatedDocument::XMLsearchAttribute | ( | XMLNode | currnode, |
OFList< OFString > * | results, | ||
OFString | attr | ||
) |
Recursive function used by getAttributeValues to get all occurrences of an attribute as list.
currnode | the current XML node to be processed. |
results | a pointer to the list of strings where the results should be stored. |
attr | the attribute to search for. |