⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dsrdoctr.h

📁 转化为DIB位图再显示出来的dicom文件C++代码
💻 H
📖 第 1 页 / 共 2 页
字号:
    /** add specified by-reference relationship to the current content item.     *  If possible this method creates a new pseudo-node (relationship) and adds it to the     *  current one.  The method canAddByReferenceRelationship() is called internally to check     *  parameters first.  The internal cursor is automatically re-set to the current node.     ** @param  relationshipType  relationship type between current and referenced node     *  @param  referencedNodeID  node ID of the referenced content item     ** @return ID of new pseudo-node if successful, 0 otherwise     */    size_t addByReferenceRelationship(const E_RelationshipType relationshipType,                                      const size_t referencedNodeID);    /** remove current content item from tree.     *  Please note that not only the specified node but also all of its child nodes are     *  removed from the tree and then deleted.  The internal cursor is set automatically     *  to a new valid position.     ** @return ID of the node which became the current one after deletion, 0 if an error     *    occured or the tree is now empty.     */    size_t removeCurrentContentItem();    /** get reference to current content item.     *  This mechanism allows to access all content items without using pointers.     ** @return reference to current content item (might be invalid)     */    DSRContentItem &getCurrentContentItem();    /** set internal cursor to the named node.     *  If more than one node exists with the given concept name the first one will     *  be selected.  Use gotoNextNamedNode() in order to go to the next matching node.     ** @param  conceptName    concept name of the node to be searched for     *  @param  startFromRoot  flag indicating whether to start from the root node     *                         or the current one     *  @param  searchIntoSub  flag indicating whether to search into sub-trees     *                         ("deep search") or on the current level only     ** @return ID of the new current node if successful, 0 otherwise     */    size_t gotoNamedNode(const DSRCodedEntryValue &conceptName,                         const OFBool startFromRoot = OFTrue,                         const OFBool searchIntoSub = OFTrue);    /** set internal cursor to the next named node.     *  Starts from "next" node, i.e. either the first children of the current node     *  or the first sibling following the current node.     ** @param  conceptName    concept name of the node to be searched for     *  @param  searchIntoSub  flag indicating whether to search into sub-trees     *                         ("deep search") or on the current level only     ** @return ID of the new current node if successful, 0 otherwise     */    size_t gotoNextNamedNode(const DSRCodedEntryValue &conceptName,                             const OFBool searchIntoSub = OFTrue);    /** unmark all content items in the document tree.     *  Use method 'setMark' on node-level to mark and unmark a single content item.     *  Pointers to the DICOM dataset/item of marked content items are added to the optional     *  stack when calling the 'write' method.  This mechanism can e.g. be used to digitally     *  sign particular content items.     */    void unmarkAllContentItems();    /** remove digital signatures from the document tree.     *  This method clears the MACParametersSequence and the DigitalSignaturesSequence for     *  all content items which have been filled during reading.     */    void removeSignatures();    /** check if this object contains non-ASCII characters in one of the     *  strings affected by SpecificCharacterSet in DICOM     *  @return true if node contains non-ASCII characters, false otherwise     */    OFBool containsExtendedCharacters();  protected:    /** add new node to the current one.     *  Please note that no copy of the given node is created.  Therefore, the node     *  should be created with new() - do not use a reference to a local variable.     *  If the node could be added successfully the cursor is set to it automatically.     ** @param  node     pointer to the new node to be added     *  @param  addMode  flag specifying at which position to add the new node.     *                   (AM_afterCurrent, AM_beforeCurrent, AM_belowCurrent)     ** @return ID of the new added node if successful, 0 otherwise     */    virtual size_t addNode(DSRDocumentTreeNode *node,                           const E_AddMode addMode = AM_afterCurrent);    /** remove current node from tree.     *  Please note that not only the specified node but also all of his child nodes are     *  removed from the tree and deleted afterwards.  The cursor is set automatically to     *  a new valid position.     ** @return ID of the node which became the current one after deletion, 0 if an error     *    occured or the tree is now empty.     */    virtual size_t removeNode();    /** check the by-reference relationships (if any) for validity.     *  This function checks whether all by-reference relationships possibly contained     *  in the document tree are valid according to the following restrictions: source     *  and target node are not identical and the target node is not an ancestor of the     *  source node (requirement from the DICOM standard to prevent loops -> directed     *  acyclic graph, though this is not 100% true - see "reportlp.dcm" example).     *  In addition, the position strings (used to encode by-reference relationships     *  according to the DICOM standard) OR the node IDs (used internally to uniquely     *  identify nodes) can be updated.  Please note that the flags 'updateString' and     *  'updateNodeID' are mutually exclusive.     ** @param  updateString  update the position string using the node ID if OFTrue     *  @param  updateNodeID  update the node ID using the position string if OFTrue     ** @return status, EC_Normal if successful, an error code otherwise     */    OFCondition checkByReferenceRelationships(const OFBool updateString = OFFalse,                                              const OFBool updateNodeID = OFFalse);  private:    /** add new node to the current one.     *  This method just overwrites the method from the base class DSRTree.  Use the     *  above addNode() method instead.     ** @param  node     dummy parameter     *  @param  addMode  dummy parameter     ** @return always 0 (invalid)     */    virtual size_t addNode(DSRTreeNode *node,                           const E_AddMode addMode = AM_afterCurrent);    /// document type of the associated SR document    E_DocumentType DocumentType;    /// output stream for error messages, NULL for no messages    OFConsole     *LogStream;    /// current content item.  Introduced to avoid the external use of pointers.    DSRContentItem CurrentContentItem;    /// check relationship content constraints of the associated IOD    DSRIODConstraintChecker *ConstraintChecker; // --- declaration of default/copy constructor and assignment operator    DSRDocumentTree();    DSRDocumentTree(const DSRDocumentTree &);    DSRDocumentTree &operator=(const DSRDocumentTree &);};#endif/* *  CVS/RCS Log: *  $Log: dsrdoctr.h,v $ *  Revision 1.16  2005/12/08 16:05:01  meichel *  Changed include path schema for all DCMTK header files * *  Revision 1.15  2005/07/27 16:36:38  joergr *  Added methods that allow to go to a named node, i.e. using a given concept *  name. * *  Revision 1.14  2004/11/22 16:39:09  meichel *  Added method that checks if the SR document contains non-ASCII characters *    in any of the strings affected by SpecificCharacterSet. * *  Revision 1.13  2003/09/15 14:18:54  joergr *  Introduced new class to facilitate checking of SR IOD relationship content *  constraints. Replaced old implementation distributed over numerous classes. * *  Revision 1.12  2003/08/07 12:35:27  joergr *  Added readXML functionality. *  Updated documentation to get rid of doxygen warnings. * *  Revision 1.11  2002/04/11 13:02:34  joergr *  Corrected typo and/or enhanced documentation. * *  Revision 1.10  2001/11/09 16:10:49  joergr *  Added preliminary support for Mammography CAD SR. * *  Revision 1.9  2001/09/26 13:04:07  meichel *  Adapted dcmsr to class OFCondition * *  Revision 1.8  2001/04/03 08:24:01  joergr *  Added new command line option: ignore relationship content constraints *  specified for each SR document class. * *  Revision 1.7  2001/01/25 11:48:43  joergr *  Corrected typos / enhanced comments. * *  Revision 1.6  2001/01/18 15:53:34  joergr *  Added support for digital signatures. * *  Revision 1.5  2000/11/07 18:14:29  joergr *  Enhanced support for by-reference relationships. * *  Revision 1.4  2000/11/01 16:23:20  joergr *  Added support for conversion to XML. * *  Revision 1.3  2000/10/18 17:02:57  joergr *  Added doc++ comments. * *  Revision 1.2  2000/10/16 16:31:45  joergr *  Added doc++ comments. * *  Revision 1.1  2000/10/13 07:49:26  joergr *  Added new module 'dcmsr' providing access to DICOM structured reporting *  documents (supplement 23).  Doc++ documentation not yet completed. * * */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -