📄 dsrdoctn.h
字号:
inline OFBool hasChildNodes() const { return (Down != NULL); } /** check whether the current content item has any siblings ** @return OFTrue if there are any sibling nodes, OFFalse otherwise */ inline OFBool hasSiblingNodes() const { return (Prev != NULL) || (Next != NULL); } /** get ID of the current tree node ** @return ID of the current tree node (should never be 0) */ inline size_t getNodeID() const { return Ident; } /** get relationship type of the current content item ** @return relationship type of the current content item (might be RT_invalid) */ inline E_RelationshipType getRelationshipType() const { return RelationshipType; } /** get value type of the current content item ** @return value type of the current content item (might be VT_invalid) */ inline E_ValueType getValueType() const { return ValueType; } /** get reference to the concept name ** @return reference to the concept name (code, might be empty/invalid) */ inline const DSRCodedEntryValue &getConceptName() const { return ConceptName; } /** get copy of the concept name. * Code describing the concept represented by this content item. Also conveys the value * of document title and section headings in documents. ** @param conceptName reference to a variable where the code should be stored ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition getConceptName(DSRCodedEntryValue &conceptName) const; /** set the concept name. * Code describing the concept represented by this content item. Also conveys the value * of document title and section headings in documents. * If the new code is invalid the current one is not replaced. An empty code can * be used to clear the current concept name. ** @param conceptName code to be set as the new concept name (checked before set) ** @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition setConceptName(const DSRCodedEntryValue &conceptName); /** get observation date time. * This is the date and time on which this content item was completed. Might be empty * if the date and time do not differ from the content date and time, see DSRDocument. ** @return observation date and time of current content item (might be empty/invalid) */ inline const OFString &getObservationDateTime() const { return ObservationDateTime; } /** set observation date time. * This is the date and time on which this content item was completed. Might be empty * if the date and time do not differ from the content date and time, see DSRDocument. * Please use the correct DICOM format (YYYYMMDDHHMMSS) or an empty string to clear * the current value. Currently no check is performed on the parameter value! ** @param observationDateTime value to be set (might be an empty string) ** @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition setObservationDateTime(const OFString &observationDateTime); /** get template identifier and mapping resource. * This value pair identifies the template that was used to create this content item * (and its children). According to the DICOM standard it is "required if a template * was used to define the content of this Item, and the template consists of a single * CONTAINER with nested content, and it is the outermost invocation of a set of * nested templates that start with the same CONTAINER." However, this condition is * currently not checked. The identification is valid if both values are either present * (non-empty) or absent (empty). ** @param templateIdentifier identifier of the template (might be empty) * @param mappingResource mapping resource that defines the template (might be empty) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition getTemplateIdentification(OFString &templateIdentifier, OFString &mappingResource) const; /** set template identifier and mapping resource. * The identification is valid if both values are either present (non-empty) or absent * (empty). See getTemplateIdentification() for details. ** @param templateIdentifier identifier of the template to be set (VR=CS) * @param mappingResource mapping resource that defines the template (VR=CS) ** @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition setTemplateIdentification(const OFString &templateIdentifier, const OFString &mappingResource); /** remove digital signatures from content item. * This method clears the MACParametersSequence and the DigitalSignaturesSequence for * the current content item which have been filled during reading. */ void removeSignatures(); /** check if this tree node contains non-ASCII characters in one of the * strings affected by SpecificCharacterSet in DICOM * @return true if node contains non-ASCII characters, false otherwise */ virtual OFBool containsExtendedCharacters() const; protected: /** get pointer to the concept name ** @return pointer to the concept name (never NULL) */ inline DSRCodedEntryValue *getConceptNamePtr() { return &ConceptName; } /** create a new node and append it to the current one ** @param previousNode reference to the pointer to the previous node (sibling). * Used to decide whether the new node is a child (value=NULL) * or a sibling (!=NULL). NB: The value might be modified * inside this method (to store a reference to the previous node). * @param relationshipType relationship type of the new node with regard to the * current one * @param valueType value type of node to be added * @param constraintChecker checks relationship content constraints of the associated IOD ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition createAndAppendNewNode(DSRDocumentTreeNode *&previousNode, const E_RelationshipType relationshipType, const E_ValueType valueType, const DSRIODConstraintChecker *constraintChecker = NULL); /** read content item (value) from dataset. * This method does nothing for this base class, but derived classes overwrite it to read * the contents according to their value type. ** @param dataset DICOM dataset from which the content item should be read * @param logStream pointer to error/warning output stream (output disabled if NULL) ** @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition readContentItem(DcmItem &dataset, OFConsole *logStream); /** write content item (value) to dataset. * This method does nothing for this base class, but derived classes overwrite it to write * the contents according to their value type. ** @param dataset DICOM dataset to which the content item should be written * @param logStream pointer to error/warning output stream (output disabled if NULL) ** @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition writeContentItem(DcmItem &dataset, OFConsole *logStream) const; /** read content item specific XML data. * This method does nothing for this base class, but derived classes overwrite it to read * the contents according to their value type. ** @param doc document containing the XML file content * @param cursor cursor pointing to the starting node ** @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition readXMLContentItem(const DSRXMLDocument &doc, DSRXMLCursor cursor); /** render content item (value) in HTML format. * This method does nothing for this base class, but derived classes overwrite it to render * the contents according to their value type. ** @param docStream output stream to which the main HTML document is written * @param annexStream output stream to which the HTML document annex is written * @param nestingLevel current nesting level. Used to render section headings. * @param annexNumber reference to the variable where the current annex number is stored. * Value is increased automatically by 1 after a new entry has been added. * @param flags flag used to customize the output (see DSRTypes::HF_xxx) * @param logStream pointer to error/warning output stream (output disabled if NULL) ** @return status, EC_Normal if successful, an error code otherwise */ virtual OFCondition renderHTMLContentItem(ostream &docStream, ostream &annexStream, const size_t nestingLevel, size_t &annexNumber, const size_t flags, OFConsole *logStream) const; /** write common item start (XML tag) ** @param stream output stream to which the XML document is written * @param flags flag used to customize the output (see DSRTypes::XF_xxx) * @param closingBracket write closing bracket of XML start tag if OFTrue, otherwise the * bracket has to be closed in the calling method */ void writeXMLItemStart(ostream &stream, const size_t flags, const OFBool closingBracket = OFTrue) const; /** write common item start (XML tag) ** @param stream output stream to which the XML document is written * @param flags flag used to customize the output (see DSRTypes::XF_xxx) */ void writeXMLItemEnd(ostream &stream, const size_t flags) const; /** read SR document content module ** @param dataset DICOM dataset from which the data should be read * @param constraintChecker checks relationship content constraints of the associated IOD * @param flags flag used to customize the reading process (see DSRTypes::RF_xxx) * @param logStream pointer to error/warning output stream (output disabled if NULL) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition readSRDocumentContentModule(DcmItem &dataset, const DSRIODConstraintChecker *constraintChecker, const size_t flags, OFConsole *logStream); /** write SR document content module ** @param dataset DICOM dataset to which the data should be written * @param markedItems optional stack where pointers to all 'marked' content items * (DICOM datasets/items) are added to during the write process. * @param logStream pointer to error/warning output stream (output disabled if NULL) ** @return status, EC_Normal if successful, an error code otherwise */ OFCondition writeSRDocumentContentModule(DcmItem &dataset, DcmStack *markedItems, OFConsole *logStream);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -