📄 dsrdoc.h
字号:
*/ OFCondition setPatientsName(const OFString &value); /** set patient's birth date. * The passed string must be a valid DICOM Date (DA). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setPatientsBirthDate(const OFString &value); /** set patient's sex. * The passed string must be a valid DICOM Code String (CS). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setPatientsSex(const OFString &value); /** set referring physicians name. * The passed string must be a valid DICOM Person Name (PN). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setReferringPhysiciansName(const OFString &value); /** set study description. * The passed string must be a valid DICOM Long String (LO). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setStudyDescription(const OFString &value); /** set series description. * The passed string must be a valid DICOM Long String (LO). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setSeriesDescription(const OFString &value); /** set manufacturer. * The passed string must be a valid DICOM Long String (LO). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setManufacturer(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). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setContentDate(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). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setContentTime(const OFString &value); /** set study ID. * The passed string must be a valid DICOM Short String (SH). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setStudyID(const OFString &value); /** set patient ID. * The passed string must be a valid DICOM Long String (LO). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setPatientID(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). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setSeriesNumber(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). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setInstanceNumber(const OFString &value); /** set accession number. * The passed string must be a valid DICOM Short String (SH). ** @param value character string specifying the value to be set ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition setAccessionNumber(const OFString &value); // --- document management functions --- /** 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 createNewStudy(); /** 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. */ void createNewSeries(); /** 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. ** @param studyUID study instance UID to be set (should be a valid UID) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition createNewSeriesInStudy(const OFString &studyUID); /** 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()). */ void createNewSOPInstance(); /** 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). ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition createNewDocument(); /** 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. ** @param documentType type of the SR document (see DSRTypes::E_DocumentType) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition createNewDocument(const E_DocumentType documentType); /** 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). * Not applicable to Key Object Selection Documents. * @param clearList clear list of predecessor documents before adding the current * document if OFTrue. Append current document to existing list otherwise. ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition createRevisedVersion(const OFBool clearList = OFTrue); /** 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. ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition completeDocument(); /** 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. ** @param description explanation of the value set for completion flag. (optional, see * previous method, VR=LO) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition completeDocument(const OFString &description); /** 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. ** @param observerName name of the person who has verified this document (required, VR=PN) * @param organization name of the organization to which the observer belongs (required, VR=LO) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition verifyDocument(const OFString &observerName, const OFString &organization); /** 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" :-/ ** @param observerName name of the person who has verified this document (required, VR=PN) * @param organization name of the organization to which the observer belongs (required, VR=LO) * @param dateTime verification date time (optional). If empty/absent the current date and * time are used. ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition verifyDocument(const OFString &observerName, const OFString &organization, const OFString &dateTime /*= ""*/); /** 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. ** @param observerName name of the person who has verified this document (required, VR=PN) * @param observerCode code identifying the verifying observer (optional, see previous method) * @param organization name of the organization to which the observer belongs (required, VR=LO) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition verifyDocument(const OFString &observerName, const DSRCodedEntryValue &observerCode, const OFString &organization); /** 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" :-/ ** @param observerName name of the person who has verified this document (required, VR=PN) * @param observerCode code identifying the verifying observer (optional, see previous method) * @param organization name of the organization to which the observer belongs (required, VR=LO) * @param dateTime verification date time (optional). If empty/absent the current date and * time are used. ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition verifyDocument(const OFString &observerName, const DSRCodedEntryValue &observerCode, const OFString &organization, const OFString &dateTime /*= ""*/); /** 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. */ void removeVerification(); /** 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. ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition finalizeDocument(); protected: /** read XML document header ** @param doc document containing the XML file content * @param cursor cursor pointing to the starting node * @param flags optional flag used to customize the reading process (see DSRTypes::XF_xxx) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition readXMLDocumentHeader(DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags); /** read XML "patient" data ** @param doc document containing the XML file content * @param cursor cursor pointing to the starting node * @param flags optional flag used to customize the reading process (see DSRTypes::XF_xxx) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition readXMLPatientData(const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags); /** read XML "study" data ** @param doc document containing the XML file content * @param cursor cursor pointing to the starting node * @param flags optional flag used to customize the reading process (see DSRTypes::XF_xxx) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition readXMLStudyData(const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags); /** read XML "series" data ** @param doc document containing the XML file content * @param cursor cursor pointing to the starting node * @param flags optional flag used to customize the reading process (see DSRTypes::XF_xxx) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition readXMLSeriesData(const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags); /** read XML "instance" data ** @param doc document containing the XML file content * @param cursor cursor pointing to the starting node * @param flags optional flag used to customize the reading process (see DSRTypes::XF_xxx) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition readXMLInstanceData(const DSRXMLDocument &doc, DSRXMLCursor cursor, const size_t flags); /** read XML "document" data
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -