Inheritance diagram for DSRDocument:
Public Member Functions | |
DSRDocument (const E_DocumentType documentType=DT_BasicTextSR) | |
(default) constructor. | |
virtual | ~DSRDocument () |
destructor | |
void | clear () |
clear all internal member variables | |
OFBool | isValid () |
check whether the current internal state is valid. | |
OFBool | isFinalized () const |
check whether the document is finalized. | |
OFCondition | print (STD_NAMESPACE ostream &stream, const size_t flags=0) |
print current SR document to specified output stream. | |
OFCondition | read (DcmItem &dataset, const size_t flags=0) |
read SR document from DICOM dataset. | |
OFCondition | write (DcmItem &dataset, DcmStack *markedItems=NULL) |
write current SR document to DICOM dataset. | |
OFCondition | readXML (const OFString &filename, const size_t flags=0) |
read SR document from XML file. | |
OFCondition | writeXML (STD_NAMESPACE ostream &stream, const size_t flags=0) |
write current SR document in XML format. | |
OFCondition | renderHTML (STD_NAMESPACE ostream &stream, const size_t flags=0, const char *styleSheet=NULL) |
render current SR document in HTML/XHTML format. | |
E_DocumentType | getDocumentType () const |
get the current SR document type | |
DSRDocumentTree & | getTree () |
get document tree | |
E_CharacterSet | getSpecificCharacterSetType () const |
get specific character set type. | |
OFCondition | setSpecificCharacterSetType (const E_CharacterSet characterSet) |
set specific character set type. | |
E_PreliminaryFlag | getPreliminaryFlag () const |
get document preliminary flag. | |
E_CompletionFlag | getCompletionFlag () const |
get document completion flag. | |
const char * | getCompletionFlagDescription () const |
get document completion flag description. | |
const OFString & | getCompletionFlagDescription (OFString &description) const |
get document completion flag description. | |
E_VerificationFlag | getVerificationFlag () const |
get document verification flag. | |
size_t | getNumberOfVerifyingObservers () |
get number of verifying observers. | |
OFCondition | getVerifyingObserver (const size_t idx, OFString &dateTime, OFString &observerName, OFString &organization) |
get information about a verifying observer. | |
OFCondition | getVerifyingObserver (const size_t idx, OFString &dateTime, OFString &observerName, DSRCodedEntryValue &observerCode, OFString &organization) |
get information about a verifying observer. | |
DSRSOPInstanceReferenceList & | getPredecessorDocuments () |
get list of predecessor documents. | |
DSRSOPInstanceReferenceList & | getIdenticalDocuments () |
get list of identical documents. | |
DSRSOPInstanceReferenceList & | getCurrentRequestedProcedureEvidence () |
get list of referenced SOP instances (Current Requested Procedure Evidence). | |
DSRSOPInstanceReferenceList & | getPertinentOtherEvidence () |
get list of referenced SOP instances (Pertinent Other Evidence). | |
DSRCodingSchemeIdentificationList & | getCodingSchemeIdentification () |
get list of coding schemes used (Coding Scheme Identification). | |
const char * | getModality () const |
get modality | |
const char * | getSOPClassUID () const |
get SOP class UID | |
const char * | getStudyInstanceUID () const |
get study instance UID | |
const char * | getSeriesInstanceUID () const |
get series instance UID | |
const char * | getSOPInstanceUID () const |
get SOP instance UID | |
const char * | getInstanceCreatorUID () const |
get instance creator UID | |
const char * | getSpecificCharacterSet () const |
get specific character set | |
const char * | getPatientName () const |
get patient's name | |
const char * | getPatientBirthDate () const |
get patient's birth date | |
const char * | getPatientSex () const |
get patient's sex | |
const char * | getReferringPhysicianName () const |
get referring physicians name | |
const char * | getStudyDescription () const |
get study description | |
const char * | getSeriesDescription () const |
get series description | |
const char * | getManufacturer () const |
get manufacturer | |
const char * | getManufacturerModelName () const |
get manufacturer's model name | |
const char * | getDeviceSerialNumber () const |
get device serial number | |
const char * | getSoftwareVersions () const |
get software version(s) | |
const char * | getStudyDate () const |
get study date | |
const char * | getStudyTime () const |
get study time | |
const char * | getInstanceCreationDate () const |
get instance creation date | |
const char * | getInstanceCreationTime () const |
get instance creation time | |
const char * | getContentDate () const |
get content date | |
const char * | getContentTime () const |
get content time | |
const char * | getStudyID () const |
get study ID | |
const char * | getPatientID () const |
get patient ID | |
const char * | getSeriesNumber () const |
get series number | |
const char * | getInstanceNumber () const |
get instance number | |
const char * | getAccessionNumber () const |
get accession number | |
const OFString & | getModality (OFString &value) const |
get modality | |
const OFString & | getSOPClassUID (OFString &value) const |
get SOP class UID | |
const OFString & | getStudyInstanceUID (OFString &value) const |
get study instance UID | |
const OFString & | getSeriesInstanceUID (OFString &value) const |
get series instance UID | |
const OFString & | getSOPInstanceUID (OFString &value) const |
get SOP instance UID | |
const OFString & | getInstanceCreatorUID (OFString &value) const |
get instance creator UID | |
const OFString & | getSpecificCharacterSet (OFString &value) const |
get specific character set | |
const OFString & | getPatientName (OFString &value) const |
get patient's name | |
const OFString & | getPatientBirthDate (OFString &value) const |
get patient's birth date | |
const OFString & | getPatientSex (OFString &value) const |
get patient's sex | |
const OFString & | getReferringPhysicianName (OFString &value) const |
get referring physicians name | |
const OFString & | getStudyDescription (OFString &value) const |
get study description | |
const OFString & | getSeriesDescription (OFString &value) const |
get series description | |
const OFString & | getManufacturer (OFString &value) const |
get manufacturer | |
const OFString & | getManufacturerModelName (OFString &value) const |
get manufacturer's model name | |
const OFString & | getDeviceSerialNumber (OFString &value) const |
get device serial number | |
const OFString & | getSoftwareVersions (OFString &value) const |
get software version(s). | |
const OFString & | getStudyDate (OFString &value) const |
get study date | |
const OFString & | getStudyTime (OFString &value) const |
get study time | |
const OFString & | getInstanceCreationDate (OFString &value) const |
get instance creation date | |
const OFString & | getInstanceCreationTime (OFString &value) const |
get instance creation time | |
const OFString & | getContentDate (OFString &value) const |
get content date | |
const OFString & | getContentTime (OFString &value) const |
get content time | |
const OFString & | getStudyID (OFString &value) const |
get study ID | |
const OFString & | getPatientID (OFString &value) const |
get patient ID | |
const OFString & | getSeriesNumber (OFString &value) const |
get series number | |
const OFString & | getInstanceNumber (OFString &value) const |
get instance number | |
const OFString & | getAccessionNumber (OFString &value) const |
get accession number | |
OFCondition | setSpecificCharacterSet (const OFString &value) |
set specific character set. | |
OFCondition | setPreliminaryFlag (const E_PreliminaryFlag flag) |
set document preliminary flag. | |
OFCondition | setCompletionFlagDescription (const OFString &value) |
set document completion flag description. | |
OFCondition | setPatientName (const OFString &value) |
set patient's name. | |
OFCondition | setPatientBirthDate (const OFString &value) |
set patient's birth date. | |
OFCondition | setPatientSex (const OFString &value) |
set patient's sex. | |
OFCondition | setReferringPhysicianName (const OFString &value) |
set referring physicians name. | |
OFCondition | setStudyDescription (const OFString &value) |
set study description. | |
OFCondition | setSeriesDescription (const OFString &value) |
set series description. | |
OFCondition | setManufacturer (const OFString &value) |
set manufacturer. | |
OFCondition | setManufacturerModelName (const OFString &value) |
set manufacturer's model name. | |
OFCondition | setDeviceSerialNumber (const OFString &value) |
set device serial number. | |
OFCondition | setSoftwareVersions (const OFString &value) |
set software version(s). | |
OFCondition | setContentDate (const OFString &value) |
set content date. | |
OFCondition | setContentTime (const OFString &value) |
set content time. | |
OFCondition | setStudyID (const OFString &value) |
set study ID. | |
OFCondition | setPatientID (const OFString &value) |
set patient ID. | |
OFCondition | setSeriesNumber (const OFString &value) |
set series number. | |
OFCondition | setInstanceNumber (const OFString &value) |
set instance number. | |
OFCondition | setAccessionNumber (const OFString &value) |
set accession number. | |
void | createNewStudy () |
create new study. | |
void | createNewSeries () |
create a new series. | |
OFCondition | createNewSeriesInStudy (const OFString &studyUID) |
create a new series within a given study. | |
void | createNewSOPInstance () |
create a new SOP instance. | |
OFCondition | createNewDocument () |
create a new document. | |
OFCondition | createNewDocument (const E_DocumentType documentType) |
create a new document of the specified type. | |
OFCondition | createRevisedVersion (const OFBool clearList=OFTrue) |
create a revised version of the current document. | |
OFCondition | completeDocument () |
complete the current document. | |
OFCondition | completeDocument (const OFString &description) |
complete the current document and set a completion description. | |
OFCondition | verifyDocument (const OFString &observerName, const OFString &organization) |
verify the current document by a specific observer. | |
OFCondition | verifyDocument (const OFString &observerName, const OFString &organization, const OFString &dateTime) |
verify the current document by a specific observer. | |
OFCondition | verifyDocument (const OFString &observerName, const DSRCodedEntryValue &observerCode, const OFString &organization) |
verify the current document by a specific observer. | |
OFCondition | verifyDocument (const OFString &observerName, const DSRCodedEntryValue &observerCode, const OFString &organization, const OFString &dateTime) |
verify the current document by a specific observer. | |
void | removeVerification () |
remove verification information. | |
OFCondition | finalizeDocument () |
finalize the current state of the document. | |
Protected Member Functions | |
OFCondition | readXMLDocumentHeader (DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags) |
read XML document header | |
OFCondition | readXMLPatientData (const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags) |
read XML "patient" data | |
OFCondition | readXMLStudyData (const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags) |
read XML "study" data | |
OFCondition | readXMLSeriesData (const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags) |
read XML "series" data | |
OFCondition | readXMLInstanceData (const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags) |
read XML "instance" data | |
OFCondition | readXMLDocumentData (const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags) |
read XML "document" data | |
OFCondition | readXMLVerifyingObserverData (const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags) |
read XML verifying observer data | |
void | renderHTMLPatientData (STD_NAMESPACE ostream &stream, const size_t flags) |
render patient name, sex, birthdate and ID in HTML/XHTML format | |
void | renderHTMLReferenceList (STD_NAMESPACE ostream &stream, DSRSOPInstanceReferenceList &refList, const size_t flags) |
render list of referenced SOP instances in HTML/XHTML format | |
OFCondition | checkDatasetForReading (DcmItem &dataset, E_DocumentType &documentType) |
check the given dataset before reading. | |
void | updateAttributes (const OFBool updateAll=OFTrue) |
update several DICOM attributes. | |
Private Member Functions | |
DSRDocument (const DSRDocument &) | |
DSRDocument & | operator= (const DSRDocument &) |
Private Attributes | |
DSRDocumentTree | DocumentTree |
SR document tree. | |
OFBool | FinalizedFlag |
flag indicating whether is document is finalized or not | |
E_PreliminaryFlag | PreliminaryFlagEnum |
enumerated value: preliminary, final | |
E_CompletionFlag | CompletionFlagEnum |
enumerated value: partial, complete | |
E_VerificationFlag | VerificationFlagEnum |
enumerated value: unverified, verified | |
E_CharacterSet | SpecificCharacterSetEnum |
defined term: see class DSRTypes | |
DcmUniqueIdentifier | SOPClassUID |
SOP Class UID: (UI, 1, 1). | |
DcmUniqueIdentifier | SOPInstanceUID |
SOP Instance UID: (UI, 1, 1). | |
DcmCodeString | SpecificCharacterSet |
Specific Character Set: (CS, 1-n, 1C). | |
DcmDate | InstanceCreationDate |
Instance Creation Date: (DA, 1, 3). | |
DcmTime | InstanceCreationTime |
Instance Creation Time: (TM, 1, 3). | |
DcmUniqueIdentifier | InstanceCreatorUID |
Instance Creator UID: (UI, 1, 3). | |
DSRCodingSchemeIdentificationList | CodingSchemeIdentification |
Coding Scheme Identification Sequence: (SQ, 1, 3). | |
DcmUniqueIdentifier | StudyInstanceUID |
Study Instance UID: (UI, 1, 1). | |
DcmDate | StudyDate |
Study Date: (DA, 1, 2). | |
DcmTime | StudyTime |
StudyTime: (TM, 1, 2). | |
DcmPersonName | ReferringPhysicianName |
ReferringPhysicianName: (PN, 1, 2). | |
DcmShortString | StudyID |
Study ID: (SH, 1, 2). | |
DcmShortString | AccessionNumber |
Accession Number: (SH, 1, 2). | |
DcmLongString | StudyDescription |
Study Description: (LO, 1, 3). | |
DcmPersonName | PatientName |
Patient's Name: (PN, 1, 2). | |
DcmLongString | PatientID |
Patient ID: (LO, 1, 2). | |
DcmDate | PatientBirthDate |
Patient's Birth Date: (DA, 1, 2). | |
DcmCodeString | PatientSex |
Patient's Sex: (CS, 1, 2). | |
DcmLongString | Manufacturer |
Manufacturer: (LO, 1, 2). | |
DcmLongString | ManufacturerModelName |
Manufacturer's Model Name: (LO, 1, 3). | |
DcmLongString | DeviceSerialNumber |
Device Serial Number: (LO, 1, 3). | |
DcmLongString | SoftwareVersions |
Software Version(s): (LO, 1-n, 3). | |
DcmCodeString | Modality |
Modality: (CS, 1, 1). | |
DcmUniqueIdentifier | SeriesInstanceUID |
Series Instance Number: (UI, 1, 1). | |
DcmIntegerString | SeriesNumber |
Series Number: (IS, 1, 1). | |
DcmLongString | SeriesDescription |
Series Description: (LO, 1, 3). | |
DcmSequenceOfItems | ReferencedPerformedProcedureStep |
Referenced Performed Procedure Step Sequence: (SQ, 1, 2). | |
DcmIntegerString | InstanceNumber |
Instance Number: (IS, 1, 1). | |
DcmCodeString | PreliminaryFlag |
Preliminary Flag: (CS, 1, 3). | |
DcmCodeString | CompletionFlag |
Completion Flag: (CS, 1, 1). | |
DcmLongString | CompletionFlagDescription |
Completion Flag Description: (LO, 1, 3). | |
DcmCodeString | VerificationFlag |
Verification Flag: (CS, 1, 1). | |
DcmDate | ContentDate |
Content Date: (DA, 1, 1). | |
DcmTime | ContentTime |
Content Time: (TM, 1, 1). | |
DcmSequenceOfItems | VerifyingObserver |
Verifying Observer Sequence: (SQ, 1, 1C). | |
DSRSOPInstanceReferenceList | PredecessorDocuments |
Predecessor Documents Sequence: (SQ, 1, 1C). | |
DSRSOPInstanceReferenceList | IdenticalDocuments |
Identical Documents Sequence: (SQ, 1, 1C). | |
DcmSequenceOfItems | PerformedProcedureCode |
Performed Procedure Code Sequence: (SQ, 1, 2). | |
DSRSOPInstanceReferenceList | CurrentRequestedProcedureEvidence |
Current Requested Procedure Evidence Sequence: (SQ, 1, 1C). | |
DSRSOPInstanceReferenceList | PertinentOtherEvidence |
Pertinent Other Evidence Sequence: (SQ, 1, 1C). |
This class supports reading, writing, creation, printing and rendering of DICOM Structured Reporting (SR) documents. The list of supported SOP classes is available in file "dsrtypes.h".
Definition at line 52 of file dsrdoc.h.
DSRDocument::DSRDocument | ( | const E_DocumentType | documentType = DT_BasicTextSR |
) |
(default) constructor.
The parameter 'documentType' is optional and has a default value.
documentType | type of the SR document (see DSRTypes::E_DocumentType) |
OFBool DSRDocument::isValid | ( | ) |
check whether the current internal state is valid.
The SR document is valid if the corresponding document tree is valid and the SOP instance UID as well as the SOP class UID are not "empty".
OFBool DSRDocument::isFinalized | ( | ) | const |
check whether the document is finalized.
A new document is originally not finalized but can be finalized using the method finalizeDocument(). This flag is e.g. used to indicate whether the entire document is digitally signed and, therefore, each newly added verifying observer would corrupt all previous signatures.
OFCondition DSRDocument::print | ( | STD_NAMESPACE ostream & | stream, | |
const size_t | flags = 0 | |||
) |
print current SR document to specified output stream.
The output format is identical to that of the dsrdump command line tool.
stream | output stream (e.g. COUT from "ofconsol.h") | |
flags | optional flag used to customize the output (see DSRTypes::PF_xxx) |
OFCondition DSRDocument::read | ( | DcmItem & | dataset, | |
const size_t | flags = 0 | |||
) |
read SR document from DICOM dataset.
Please note that the current document is also deleted if the reading process fails. If the log stream is set and valid the reason for any error might be obtained from the error/warning output.
dataset | reference to DICOM dataset from which the document should be read | |
flags | optional flag used to customize the reading process (see DSRTypes::RF_xxx). E.g. RF_readDigitalSignatures indicates whether to read the digital signatures from the dataset or not. If set the MACParametersSequence and the DigitalSignaturesSequence are read for the general document header (equivilent to top-level content item) and each content item of the document tree. If not removed manually (with 'DSRDocumentTreeremoveSignatures') the signatures are written back to the dataset when the method 'write' is called. Please note that the two signature sequences for any other sequence (e.g. VerifyingObserver or PredecessorDocuments) are never read. |
OFCondition DSRDocument::write | ( | DcmItem & | dataset, | |
DcmStack * | markedItems = NULL | |||
) |
write current SR document to DICOM dataset.
Please note that the ContentTemplateSequence for the root content item is not written automatically for particular SOP Classes (e.g. Key Object Selection Document). Instead, the template identification has to be set manually for the root CONTAINER (see DSRDocumentTreeNode::setTemplateIdentification()). This is because the template constraints cannot be checked yet.
dataset | reference to DICOM dataset to which the current document should be written | |
markedItems | optional stack where pointers to all 'marked' content items (DICOM datasets/items) are added to during the write process. Can be used to digitally sign parts of the document tree. |
OFCondition DSRDocument::readXML | ( | const OFString & | filename, | |
const size_t | flags = 0 | |||
) |
read SR document from XML file.
The format (Schema) of the XML document is expected to conform to the output format of the writeXML() method. In addition, the document can be validated against an XML Schema by setting the flag XF_validateSchema. Digital signatures in the XML document are not yet supported. Please note that the current document is also deleted if the parsing process fails.
filename | name of the file from which the XML document is read ("-" for stdin) | |
flags | optional flag used to customize the reading process (see DSRTypes::XF_xxx) |
OFCondition DSRDocument::writeXML | ( | STD_NAMESPACE ostream & | stream, | |
const size_t | flags = 0 | |||
) |
write current SR document in XML format.
The output format is identical to that of the dsr2xml command line tool. Digital signatures in the XML document are not yet supported.
stream | output stream to which the XML document is written | |
flags | optional flag used to customize the output (see DSRTypes::XF_xxx) |
OFCondition DSRDocument::renderHTML | ( | STD_NAMESPACE ostream & | stream, | |
const size_t | flags = 0 , |
|||
const char * | styleSheet = NULL | |||
) |
render current SR document in HTML/XHTML format.
The output format is identical to that of the dsr2html command line tool.
stream | output stream to which the HTML/XHTML document is written | |
flags | optional flag used to customize the output (see DSRTypes::HF_xxx) | |
styleSheet | optional filename/URL of a Cascading Style Sheet (CSS) |
E_DocumentType DSRDocument::getDocumentType | ( | ) | const |
get the current SR document type
DSRDocumentTree& DSRDocument::getTree | ( | ) | [inline] |
get document tree
Definition at line 187 of file dsrdoc.h.
References DocumentTree.
E_CharacterSet DSRDocument::getSpecificCharacterSetType | ( | ) | const |
get specific character set type.
If the type is unknown the original DICOM defined term can be retrieved with the method getSpecificCharacterSet(). Please note that only the first of possibly multiple values is used to determine the type from the DICOM code string (multiple character sets are not yet supported).
OFCondition DSRDocument::setSpecificCharacterSetType | ( | const E_CharacterSet | characterSet | ) |
set specific character set type.
The DICOM defined term (see SpecificCharacterSet) is set accordingly.
E_PreliminaryFlag DSRDocument::getPreliminaryFlag | ( | ) | const |
get document preliminary flag.
Not applicable to Key Object Selection Documents.
E_CompletionFlag DSRDocument::getCompletionFlag | ( | ) | const |
get document completion flag.
Not applicable to Key Object Selection Documents.
const char* DSRDocument::getCompletionFlagDescription | ( | ) | const |
get document completion flag description.
Not applicable to Key Object Selection Documents.
get document completion flag description.
Not applicable to Key Object Selection Documents.
description | reference to character string in which the value should be stored |
E_VerificationFlag DSRDocument::getVerificationFlag | ( | ) | const |
get document verification flag.
Not applicable to Key Object Selection Documents.
size_t DSRDocument::getNumberOfVerifyingObservers | ( | ) |
get number of verifying observers.
A document can be verified more than once. The verification flag should be VERIFIED if any verifying observer is specified. The details on the observer can be retrieved using the getVerifyingObserver() methods. Not applicable to Key Object Selection Documents.
OFCondition DSRDocument::getVerifyingObserver | ( | const size_t | idx, | |
OFString & | dateTime, | |||
OFString & | observerName, | |||
OFString & | organization | |||
) |
get information about a verifying observer.
All reference variables are cleared before the information is retrieved, i.e. if an error occurs (return value != EC_Normal) non-empty variables do contain valid (empty) data. Not applicable to Key Object Selection Documents.
idx | index of the verifying observer to be retrieved (starting with 1). Use getNumberOfVerifyingObservers() to get the maximum value. | |
dateTime | reference to variable where the date and time when this document has been verified should be stored (required) | |
observerName | reference to variable where the name of the person who has verified this document should be stored (required) | |
organization | reference to variable where the name of the organization to which the observer belongs should be stored (required) |
OFCondition DSRDocument::getVerifyingObserver | ( | const size_t | idx, | |
OFString & | dateTime, | |||
OFString & | observerName, | |||
DSRCodedEntryValue & | observerCode, | |||
OFString & | organization | |||
) |
get information about a verifying observer.
All reference variables are cleared before the information is retrieved, i.e. if an error occurs (return value != EC_Normal) non-empty variables do contain valid (empty) data. Not applicable to Key Object Selection Documents.
idx | index of the verifying observer to be retrieved (starting with 1). Use getNumberOfVerifyingObservers() to get the maximum value. | |
dateTime | reference to variable where the date and time when this document has been verified should be stored (required) | |
observerName | reference to variable where the name of the person who has verified this document should be stored (required) | |
observerCode | reference to variable where the observer code should be stored. code identifying the verifying observer (optional, see previous method) | |
organization | reference to variable where the name of the organization to which the observer belongs should be stored (required) |
DSRSOPInstanceReferenceList& DSRDocument::getPredecessorDocuments | ( | ) |
get list of predecessor documents.
A document can have more than one (direct) predecessor document. This is e.g. the case when two or more documents have been merged to create it. The corresponding method createRevisedVersion() automatically adds a reference to the current document. The DICOM standard states: "[The Predecessor Documents Sequence] Shall refer to SR SOP Instances (e.g. prior or provisional reports) whose content has been wholly or partially included in this document with or without modification." and "[...] the use of the Predecessor Document Sequence allows tracing back to the input SR Document, which in this case is the previous version." Not applicable to Key Object Selection Documents.
DSRSOPInstanceReferenceList& DSRDocument::getIdenticalDocuments | ( | ) |
get list of identical documents.
Please note that currently the user is responsible for filling and modifying the content of this list. However, the list is automatically cleared when a new instance is created (incl. a revised version of the current document). Possibly, there will be a createDuplicate() method or the like in the future which creates an identical copy of the current document in a new study/series. The DICOM standard states: "If identical copies of an SR Document are to be included in multiple Studies then the entire SR Document shall be duplicated with appropriate changes for inclusion into the different Studies (i.e. Study Instance UID, Series Instance UID, SOP Instance UID, Identical Documents Sequence etc.). The Identical Documents Sequence Attribute in each SOP Instance shall contain references to all other duplicate SOP Instances."
DSRSOPInstanceReferenceList& DSRDocument::getCurrentRequestedProcedureEvidence | ( | ) |
get list of referenced SOP instances (Current Requested Procedure Evidence).
The DICOM standard states: "The intent of the Current Requested Procedure Evidence Sequence is to reference all evidence created in order to satisfy the current Requested Procedure(s) for this SR Document. This shall include, but is not limited to, all current evidence referenced in the content tree." and "For a completed SR Document satisfying (i.e., being the final report for) the current Requested Procedure(s), this sequence shall list the full set of Composite SOP Instances created for the current Requested Procedure(s). For other SOP Instances that include the SR Document General Module, this sequence shall contain at minimum the set of Composite SOP Instances from the current Requested Procedure(s) that are referenced in the content tree." and "In the context of the Key Object Selection, the current evidence is considered to be only the set of instances referenced within the Key Object Selection."
DSRSOPInstanceReferenceList& DSRDocument::getPertinentOtherEvidence | ( | ) |
get list of referenced SOP instances (Pertinent Other Evidence).
The DICOM standard states: "The Pertinent Other Evidence Sequence attribute is used to reference all other evidence considered pertinent for this SR Document that is not listed in the Current Requested Procedure Evidence Sequence. This requires that the same SOP Instance shall not be referenced in both of these Sequences." Not applicable to Key Object Selection Documents.
DSRCodingSchemeIdentificationList& DSRDocument::getCodingSchemeIdentification | ( | ) |
get list of coding schemes used (Coding Scheme Identification).
The Coding Scheme Identification Sequence maps Coding Scheme Designators to an external coding system registration, or to a private or local coding scheme. See DICOM standard for details.
const char* DSRDocument::getModality | ( | ) | const |
get modality
const char* DSRDocument::getSOPClassUID | ( | ) | const |
get SOP class UID
const char* DSRDocument::getStudyInstanceUID | ( | ) | const |
get study instance UID
const char* DSRDocument::getSeriesInstanceUID | ( | ) | const |
get series instance UID
const char* DSRDocument::getSOPInstanceUID | ( | ) | const |
get SOP instance UID
const char* DSRDocument::getInstanceCreatorUID | ( | ) | const |
get instance creator UID
const char* DSRDocument::getSpecificCharacterSet | ( | ) | const |
get specific character set
const char* DSRDocument::getPatientName | ( | ) | const |
get patient's name
const char* DSRDocument::getPatientBirthDate | ( | ) | const |
get patient's birth date
const char* DSRDocument::getPatientSex | ( | ) | const |
get patient's sex
const char* DSRDocument::getReferringPhysicianName | ( | ) | const |
get referring physicians name
const char* DSRDocument::getStudyDescription | ( | ) | const |
get study description
const char* DSRDocument::getSeriesDescription | ( | ) | const |
get series description
const char* DSRDocument::getManufacturer | ( | ) | const |
get manufacturer
const char* DSRDocument::getManufacturerModelName | ( | ) | const |
get manufacturer's model name
const char* DSRDocument::getDeviceSerialNumber | ( | ) | const |
get device serial number
const char* DSRDocument::getSoftwareVersions | ( | ) | const |
get software version(s)
const char* DSRDocument::getStudyDate | ( | ) | const |
get study date
const char* DSRDocument::getStudyTime | ( | ) | const |
get study time
const char* DSRDocument::getInstanceCreationDate | ( | ) | const |
get instance creation date
const char* DSRDocument::getInstanceCreationTime | ( | ) | const |
get instance creation time
const char* DSRDocument::getContentDate | ( | ) | const |
get content date
const char* DSRDocument::getContentTime | ( | ) | const |
get content time
const char* DSRDocument::getStudyID | ( | ) | const |
get study ID
const char* DSRDocument::getPatientID | ( | ) | const |
get patient ID
const char* DSRDocument::getSeriesNumber | ( | ) | const |
get series number
const char* DSRDocument::getInstanceNumber | ( | ) | const |
get instance number
const char* DSRDocument::getAccessionNumber | ( | ) | const |
get accession number
get modality
value | reference to character string in which the value should be stored |
get SOP class UID
value | reference to character string in which the value should be stored |
get study instance UID
value | reference to character string in which the value should be stored |
get series instance UID
value | reference to character string in which the value should be stored |
get SOP instance UID
value | reference to character string in which the value should be stored |
get instance creator UID
value | reference to character string in which the value should be stored |
get specific character set
value | reference to character string in which the value should be stored |
get patient's name
value | reference to character string in which the value should be stored |
get patient's birth date
value | reference to character string in which the value should be stored |
get patient's sex
value | reference to character string in which the value should be stored |
get referring physicians name
value | reference to character string in which the value should be stored |
get study description
value | reference to character string in which the value should be stored |
get series description
value | reference to character string in which the value should be stored |
get manufacturer
value | reference to character string in which the value should be stored |
get manufacturer's model name
value | reference to character string in which the value should be stored |
get device serial number
value | reference to character string in which the value should be stored |
get software version(s).
Please note that only the first component is returned.
value | reference to character string in which the value should be stored |
get study date
value | reference to character string in which the value should be stored |
get study time
value | reference to character string in which the value should be stored |
get instance creation date
value | reference to character string in which the value should be stored |
get instance creation time
value | reference to character string in which the value should be stored |
get content date
value | reference to character string in which the value should be stored |
get content time
value | reference to character string in which the value should be stored |
get study ID
value | reference to character string in which the value should be stored |
get patient ID
value | reference to character string in which the value should be stored |
get series number
value | reference to character string in which the value should be stored |
get instance number
value | reference to character string in which the value should be stored |
get accession number
value | reference to character string in which the value should be stored |
OFCondition DSRDocument::setSpecificCharacterSet | ( | const OFString & | value | ) |
set specific character set.
The passed string must be a valid DICOM Code String (CS). The internal enumerated value is set accordingly.
value | character string specifying the value to be set |
OFCondition DSRDocument::setPreliminaryFlag | ( | const E_PreliminaryFlag | flag | ) |
set document preliminary flag.
According to the DICOM standard, the concept of "completeness" is independent of the concept of "preliminary" or "final". Therefore, this flag can be specified separately.
flag | preliminary flag to be set (use PF_invalid to omit this optional value) |
OFCondition DSRDocument::setCompletionFlagDescription | ( | const OFString & | value | ) |
set document completion flag description.
The description can be removed from the DICOM dataset (type 3) by setting an empty string. Not applicable to Key Object Selection Documents.
value | explanation of the value set for completion flag (optional, VR=LO) |
OFCondition DSRDocument::setPatientName | ( | const OFString & | value | ) |
set patient's name.
The passed string must be a valid DICOM Person Name (PN).
value | character string specifying the value to be set |
OFCondition DSRDocument::setPatientBirthDate | ( | const OFString & | value | ) |
set patient's birth date.
The passed string must be a valid DICOM Date (DA).
value | character string specifying the value to be set |
OFCondition DSRDocument::setPatientSex | ( | const OFString & | value | ) |
set patient's sex.
The passed string must be a valid DICOM Code String (CS).
value | character string specifying the value to be set |
OFCondition DSRDocument::setReferringPhysicianName | ( | const OFString & | value | ) |
set referring physicians name.
The passed string must be a valid DICOM Person Name (PN).
value | character string specifying the value to be set |
OFCondition DSRDocument::setStudyDescription | ( | const OFString & | value | ) |
set study description.
The passed string must be a valid DICOM Long String (LO).
value | character string specifying the value to be set |
OFCondition DSRDocument::setSeriesDescription | ( | const OFString & | value | ) |
set series description.
The passed string must be a valid DICOM Long String (LO).
value | character string specifying the value to be set |
OFCondition DSRDocument::setManufacturer | ( | const OFString & | value | ) |
set manufacturer.
The passed string must be a valid DICOM Long String (LO).
value | character string specifying the value to be set |
OFCondition DSRDocument::setManufacturerModelName | ( | const OFString & | value | ) |
set manufacturer's model name.
The passed string must be a valid DICOM Long String (LO).
value | character string specifying the value to be set |
OFCondition DSRDocument::setDeviceSerialNumber | ( | const OFString & | value | ) |
set device serial number.
The passed string must be a valid DICOM Long String (LO).
value | character string specifying the value to be set |
OFCondition DSRDocument::setSoftwareVersions | ( | const OFString & | value | ) |
set software version(s).
The passed string must be a valid DICOM Long String (LO).
value | character string specifying the value to be set |
OFCondition DSRDocument::setContentDate | ( | const OFString & | value | ) |
set content date.
The passed string must be a valid DICOM Date (DA). If an empty string is passed the current date is set when displaying or writing the document since the corresponding DICOM attribute is type 1 (= mandatory).
value | character string specifying the value to be set |
OFCondition DSRDocument::setContentTime | ( | const OFString & | value | ) |
set content time.
The passed string must be a valid DICOM Time (TM). If an empty string is passed the current time is set when displaying or writing the document since the corresponding DICOM attribute is type 1 (= mandatory).
value | character string specifying the value to be set |
OFCondition DSRDocument::setStudyID | ( | const OFString & | value | ) |
set study ID.
The passed string must be a valid DICOM Short String (SH).
value | character string specifying the value to be set |
OFCondition DSRDocument::setPatientID | ( | const OFString & | value | ) |
set patient ID.
The passed string must be a valid DICOM Long String (LO).
value | character string specifying the value to be set |
OFCondition DSRDocument::setSeriesNumber | ( | const OFString & | value | ) |
set series number.
The passed string must be a valid DICOM Short String (SH). If an empty string is passed the value "1" is set when displaying or writing the document since the corresponding DICOM attribute is type 1 (= mandatory).
value | character string specifying the value to be set |
OFCondition DSRDocument::setInstanceNumber | ( | const OFString & | value | ) |
set instance number.
The passed string must be a valid DICOM Integer String (IS). If an empty string is passed the value "1" is set when displaying or writing the document since the corresponding DICOM attribute is type 1 (= mandatory).
value | character string specifying the value to be set |
OFCondition DSRDocument::setAccessionNumber | ( | const OFString & | value | ) |
set accession number.
The passed string must be a valid DICOM Short String (SH).
value | character string specifying the value to be set |
void DSRDocument::createNewStudy | ( | ) |
create new study.
After generating a new study instance UID the method createNewSeries() is called, i.e. also a new series instance UID and SOP instance UID are generated. This is a requirement of the DICOM standard.
void DSRDocument::createNewSeries | ( | ) |
create a new series.
After generating a new series instance UID the method createNewSOPInstance() is called, i.e. also a SOP instance UID is generated. This is a requirement of the DICOM standard.
OFCondition DSRDocument::createNewSeriesInStudy | ( | const OFString & | studyUID | ) |
create a new series within a given study.
After generating a new series instance UID within the given study the method createNewSOPInstance() is called, i.e. also a SOP instance UID is generated. This is a requirement of the DICOM standard.
studyUID | study instance UID to be set (should be a valid UID) |
void DSRDocument::createNewSOPInstance | ( | ) |
create a new SOP instance.
Generate a new SOP instance UID, set the instance creation date/time and reset the finalized flag (OFFalse). This method is used internally for createNewDocument(), createRevisedVersion() and during object initialization. It could also be used explicitly from the calling application if a new UID should be created (this is the case if the study instance UID or series instance UID has changed as well as any other attribute within the SR Document General Module or SR Document Content Module, see DICOM standard for details). This method also updates the other DICOM header attributes (calling updateAttributes()).
OFCondition DSRDocument::createNewDocument | ( | ) |
create a new document.
A new SOP instance is only created if the current document type was valid/supported. Please note that the current document is deleted (cleared).
OFCondition DSRDocument::createNewDocument | ( | const E_DocumentType | documentType | ) |
create a new document of the specified type.
A new SOP instance is only created if the current document type was valid/supported. Please note that the current document is deleted by this method.
documentType | type of the SR document (see DSRTypes::E_DocumentType) |
OFCondition DSRDocument::createRevisedVersion | ( | const OFBool | clearList = OFTrue |
) |
create a revised version of the current document.
A revised version can only be created if the current document is already completed (see completion flag). If so, a reference to the current document is added to the predecessor documents sequence. If all revised versions of a SR document are stored (written to datasets/files) it is possible to trace back the full chain of previous versions. A new SOP instance is created and the content date/time are set automatically. Furthermore, the verifying observer and identical documents sequence are deleted, the verification flag is set to UNVERIFIED, the completion flag is set to PARTIAL (i.e. not complete), the completion flag description is deleted, all digital signatures contained in the document tree are deleted and the finalized flag is reset (OFFalse). The preliminary flag is not modified by this method. Not applicable to Key Object Selection Documents.
clearList | clear list of predecessor documents before adding the current document if OFTrue. Append current document to existing list otherwise. |
OFCondition DSRDocument::completeDocument | ( | ) |
complete the current document.
Sets the completion flag to COMPLETE if not already done (fails otherwise). The completion flag description is set to an empty string (i.e. absent in DICOM dataset). Not applicable to Key Object Selection Documents.
OFCondition DSRDocument::completeDocument | ( | const OFString & | description | ) |
complete the current document and set a completion description.
Sets the completion flag to COMPLETE if not already done (fails otherwise). The completion flag description can be modified independently from the flag by means of the method setCompletionFlagDescription() - see above. Not applicable to Key Object Selection Documents.
description | explanation of the value set for completion flag. (optional, see previous method, VR=LO) |
OFCondition DSRDocument::verifyDocument | ( | const OFString & | observerName, | |
const OFString & | organization | |||
) |
verify the current document by a specific observer.
A document can be verified more than once. The observer information is added to a sequence stored in the dataset. The verification flag is automatically set to VERIFIED (if not already done) and the finalized flag is reset (set to OFFalse). Please note that only completed documents (see completion flag) can be verified and that a new SOP instance UID has to be generated (manually) according to the DICOM standard when creating a dataset/file from this document. Not applicable to Key Object Selection Documents.
observerName | name of the person who has verified this document (required, VR=PN) | |
organization | name of the organization to which the observer belongs (required, VR=LO) |
OFCondition DSRDocument::verifyDocument | ( | const OFString & | observerName, | |
const OFString & | organization, | |||
const OFString & | dateTime | |||
) |
verify the current document by a specific observer.
Same as above but allows to specify the verification date time value. Only required since Sun CC 2.0.1 compiler does not support default parameter values for "complex types" like OFString. Reports the error message: "Sorry not implemented" :-/
observerName | name of the person who has verified this document (required, VR=PN) | |
organization | name of the organization to which the observer belongs (required, VR=LO) | |
dateTime | verification date time (optional). If empty/absent the current date and time are used. |
OFCondition DSRDocument::verifyDocument | ( | const OFString & | observerName, | |
const DSRCodedEntryValue & | observerCode, | |||
const OFString & | organization | |||
) |
verify the current document by a specific observer.
A document can be verified more than once. The observer information is added to a sequence stored in the dataset. The verification flag is automatically set to VERIFIED (if not already done) and the finalized flag is reset (set to OFFalse). Please note that only completed documents (see completion flag) can be verified and that a new SOP instance UID has to be generated (manually) according to the DICOM standard when creating a dataset/file from this document. Not applicable to Key Object Selection Documents.
observerName | name of the person who has verified this document (required, VR=PN) | |
observerCode | code identifying the verifying observer (optional, see previous method) | |
organization | name of the organization to which the observer belongs (required, VR=LO) |
OFCondition DSRDocument::verifyDocument | ( | const OFString & | observerName, | |
const DSRCodedEntryValue & | observerCode, | |||
const OFString & | organization, | |||
const OFString & | dateTime | |||
) |
verify the current document by a specific observer.
Same as above but allows to specify the verification date time value. Only required since Sun CC 2.0.1 compiler does not support default parameter values for "complex types" like OFString. Reports the error message: "Sorry not implemented" :-/
observerName | name of the person who has verified this document (required, VR=PN) | |
observerCode | code identifying the verifying observer (optional, see previous method) | |
organization | name of the organization to which the observer belongs (required, VR=LO) | |
dateTime | verification date time (optional). If empty/absent the current date and time are used. |
void DSRDocument::removeVerification | ( | ) |
remove verification information.
The list of verifying observers is cleared, the verification flag is set to UNVERIFIED and the finalized flag is reset (set to OFFalse). Normally, there should be no need to call this method. On the other hand, it is useful to guarantee a consistent state when processing documents which have not been created with this module/toolkit.
OFCondition DSRDocument::finalizeDocument | ( | ) |
finalize the current state of the document.
A new document is originally not finalized but can be finalized using this method. This internal flag is e.g. used to indicate whether the entire document is digitally signed and, therefore, each newly added verifying observer would corrupt all previous signatures. NB: A document needs to be completed first in order to be finalized. Some of the above document management functions do reset the flag (i.e. set the FinalizedFlag to OFFalse), other methods (e.g. setXXX) do not change the flag though the state of the document is not finalized any more after they have been called. Not applicable to Key Object Selection Documents since there's no completion flag in this type of SR document. Please note that this method has nothing to do with the preliminary flag.
OFCondition DSRDocument::readXMLDocumentHeader | ( | DSRXMLDocument & | doc, | |
DSRXMLCursor | cursor, | |||
const size_t | flags | |||
) | [protected] |
read XML document header
doc | document containing the XML file content | |
cursor | cursor pointing to the starting node | |
flags | optional flag used to customize the reading process (see DSRTypes::XF_xxx) |
OFCondition DSRDocument::readXMLPatientData | ( | const DSRXMLDocument & | doc, | |
DSRXMLCursor | cursor, | |||
const size_t | flags | |||
) | [protected] |
read XML "patient" data
doc | document containing the XML file content | |
cursor | cursor pointing to the starting node | |
flags | optional flag used to customize the reading process (see DSRTypes::XF_xxx) |
OFCondition DSRDocument::readXMLStudyData | ( | const DSRXMLDocument & | doc, | |
DSRXMLCursor | cursor, | |||
const size_t | flags | |||
) | [protected] |
read XML "study" data
doc | document containing the XML file content | |
cursor | cursor pointing to the starting node | |
flags | optional flag used to customize the reading process (see DSRTypes::XF_xxx) |
OFCondition DSRDocument::readXMLSeriesData | ( | const DSRXMLDocument & | doc, | |
DSRXMLCursor | cursor, | |||
const size_t | flags | |||
) | [protected] |
read XML "series" data
doc | document containing the XML file content | |
cursor | cursor pointing to the starting node | |
flags | optional flag used to customize the reading process (see DSRTypes::XF_xxx) |
OFCondition DSRDocument::readXMLInstanceData | ( | const DSRXMLDocument & | doc, | |
DSRXMLCursor | cursor, | |||
const size_t | flags | |||
) | [protected] |
read XML "instance" data
doc | document containing the XML file content | |
cursor | cursor pointing to the starting node | |
flags | optional flag used to customize the reading process (see DSRTypes::XF_xxx) |
OFCondition DSRDocument::readXMLDocumentData | ( | const DSRXMLDocument & | doc, | |
DSRXMLCursor | cursor, | |||
const size_t | flags | |||
) | [protected] |
read XML "document" data
doc | document containing the XML file content | |
cursor | cursor pointing to the starting node | |
flags | optional flag used to customize the reading process (see DSRTypes::XF_xxx) |
OFCondition DSRDocument::readXMLVerifyingObserverData | ( | const DSRXMLDocument & | doc, | |
DSRXMLCursor | cursor, | |||
const size_t | flags | |||
) | [protected] |
read XML verifying observer data
doc | document containing the XML file content | |
cursor | cursor pointing to the starting node | |
flags | optional flag used to customize the reading process (see DSRTypes::XF_xxx) |
void DSRDocument::renderHTMLPatientData | ( | STD_NAMESPACE ostream & | stream, | |
const size_t | flags | |||
) | [protected] |
render patient name, sex, birthdate and ID in HTML/XHTML format
stream | output stream to which the HTML/XHTML document is written | |
flags | flag used to customize the output (see DSRTypes::HF_xxx) |
void DSRDocument::renderHTMLReferenceList | ( | STD_NAMESPACE ostream & | stream, | |
DSRSOPInstanceReferenceList & | refList, | |||
const size_t | flags | |||
) | [protected] |
render list of referenced SOP instances in HTML/XHTML format
stream | output stream to which the HTML/XHTML document is written | |
refList | list of referenced SOP instances to be rendered | |
flags | flag used to customize the output (see DSRTypes::HF_xxx) |
OFCondition DSRDocument::checkDatasetForReading | ( | DcmItem & | dataset, | |
E_DocumentType & | documentType | |||
) | [protected] |
check the given dataset before reading.
This methods checks whether the dataset contains at least the DICOM attributes SOP class UID and modality. Any incorrectness regarding these two attributes is reported to the log stream (if valid). Currently unsupported SOP classes are also reported as an error.
dataset | DICOM dataset to be checked | |
documentType | SR document type retrieved from the SOP class UID |
void DSRDocument::updateAttributes | ( | const OFBool | updateAll = OFTrue |
) | [protected] |
update several DICOM attributes.
(e.g. set the modality attribute, generate a new SOP instance UID if required, set date/time, etc.)
updateAll | flag indicating whether all DICOM attributes should be updated or only the completion and verification flag. (set DICOM defined terms from enum values) |