📄 dsrtypes.h
字号:
/* * * Copyright (C) 2000-2005, OFFIS * * This software and supporting documentation were developed by * * Kuratorium OFFIS e.V. * Healthcare Information and Communication Systems * Escherweg 2 * D-26121 Oldenburg, Germany * * THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND OFFIS MAKES NO WARRANTY * REGARDING THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR * FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR * ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND * PERFORMANCE OF THE SOFTWARE IS WITH THE USER. * * Module: dcmsr * * Author: Joerg Riesmeier * * Purpose: * classes: DSRTypes * * Last Update: $Author: meichel $ * Update Date: $Date: 2005/12/08 16:05:30 $ * CVS/RCS Revision: $Revision: 1.46 $ * Status: $State: Exp $ * * CVS/RCS Log at end of file * */#ifndef DSRTYPES_H#define DSRTYPES_H#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */#include "dcmtk/dcmdata/dctk.h"#include "dcmtk/ofstd/ofstream.h"#include "dcmtk/ofstd/oftypes.h"#include "dcmtk/ofstd/ofcond.h"/*---------------------* * macro definitions * *---------------------*/// private coding scheme designator used for internal codes#define OFFIS_CODING_SCHEME_DESIGNATOR "99_OFFIS_DCMTK"// name of the private coding scheme#define OFFIS_CODING_SCHEME_NAME "OFFIS DCMTK Coding Scheme"// organization responsible for the private coding scheme#define OFFIS_RESPONSIBLE_ORGANIZATION "Kuratorium OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany"// protocol, hostname and CGI script name used for HTML hyperlinks to composite objects#define HTML_HYPERLINK_PREFIX_FOR_CGI "http://localhost/dicom.cgi"// URL of the DICOM toolkit DCMTK#define DCMTK_INTERNET_URL "http://dicom.offis.de/dcmtk"// XML namespace URI for dcmsr module#define DCMSR_XML_NAMESPACE_URI "http://dicom.offis.de/dcmsr"// XML Schema file for dcmsr module#define DCMSR_XML_XSD_FILE "dsr2xml.xsd"// XML Schema Instance URI#define XML_SCHEMA_INSTANCE_URI "http://www.w3.org/2001/XMLSchema-instance"/*------------------------* * forward declarations * *------------------------*/class DSRXMLCursor;class DSRXMLDocument;class DSRDocumentTreeNode;class DSRIODConstraintChecker;/*-----------------------* * contant definitions * *-----------------------*//** @name specific error conditions for module dcmsr. * These error codes can be used in addition to the general purpose * codes defined in module dcmdata. *///@{/// error: the document type (SOP class UID) is unknown or not supportedextern const OFCondition SR_EC_UnknownDocumentType;/// error: the document status is invalidextern const OFCondition SR_EC_InvalidDocument;/// error: the document tree is invalid (corrupted structure)extern const OFCondition SR_EC_InvalidDocumentTree;/// error: a mandatory attribute is missingextern const OFCondition SR_EC_MandatoryAttributeMissing;/// error: a value is invalid according to the standardextern const OFCondition SR_EC_InvalidValue;/// error: a value is not supported by this implementationextern const OFCondition SR_EC_UnsupportedValue;/// error: an unknown value type is usedextern const OFCondition SR_EC_UnknownValueType;/// error: an unknown relationship type is usedextern const OFCondition SR_EC_UnknownRelationshipType;/// error: the by-value relationship between two content items is not allowedextern const OFCondition SR_EC_InvalidByValueRelationship;/// error: the by-reference relationship between two content items is not allowedextern const OFCondition SR_EC_InvalidByReferenceRelationship;/// error: the specified SOP instance could not be foundextern const OFCondition SR_EC_SOPInstanceNotFound;/// error: a SOP instance has different SOP classesextern const OFCondition SR_EC_DifferentSOPClassesForAnInstance;/// error: the specified coding scheme designator could not be foundextern const OFCondition SR_EC_CodingSchemeNotFound;/// error: the XML structure is corrupted (XML parser error)extern const OFCondition SR_EC_CorruptedXMLStructure;//@}/*---------------------* * class declaration * *---------------------*//** General purpose class hiding global functions, constants and types from the * global namespace. Some of them might be moved to 'ofstd' later on. * All functions and constants are static and can, therefore, be accessed without * creating an instance of this class. */class DSRTypes{ public: // --- constant declarations --- /** @name read() flags. * These flags can be combined and passed to the read() methods. * The 'shortcut' flags can be used for common combinations. */ //@{ /// read digital signatures from dataset static const size_t RF_readDigitalSignatures; /// ignore relationship constraints for this document class static const size_t RF_ignoreRelationshipConstraints; /// do not abort on content item errors (e.g. missing value type specific attributes) static const size_t RF_ignoreContentItemErrors; /// do not abort when detecting an invalid content item, skip invalid sub-tree instead static const size_t RF_skipInvalidContentItems; /// print more detailed debug messages (verbose mode) static const size_t RF_verboseDebugMode; /// show the currently processed content item (e.g. "1.2.3") static const size_t RF_showCurrentlyProcessedItem; //@} /** @name renderHTML() flags. * These flags can be combined and passed to the renderHMTL() methods. * Please note that only the 'external' flags can be used from outside * this library. The 'shortcut' flags can be used for common combinations. */ //@{ /// external: never expand child nodes inline static const size_t HF_neverExpandChildrenInline; /// external: render codes even if they appear inline static const size_t HF_renderInlineCodes; /// external: render concept name codes (default: code meaning only) static const size_t HF_renderConceptNameCodes; /// external: render the code of the numeric measurement unit static const size_t HF_renderNumericUnitCodes; /// external: use code meaning for the numeric measurement unit (default: code value) static const size_t HF_useCodeMeaningAsUnit; /// external: use patient information as document title (default: document type) static const size_t HF_renderPatientTitle; /// external: render no general document information (header) static const size_t HF_renderNoDocumentHeader; /// external: render dcmtk/dcmsr comment at the end of the document static const size_t HF_renderDcmtkFootnote; /// external: render the full data of all content items static const size_t HF_renderFullData; /// external: copy Cascading Style Sheet (CSS) content to HTML file static const size_t HF_copyStyleSheetContent; /// external: output compatible to HTML version 3.2 (default: 4.0) static const size_t HF_version32Compatibility; /// external: add explicit reference to HTML document type (DTD) static const size_t HF_addDocumentTypeReference; /// internal: render items separately (for container with SEPARATE flag) static const size_t HF_renderItemsSeparately; /// internal: expand items inline when they are short and have no child nodes static const size_t HF_renderItemInline; /// internal: content item is rendered fully inside the annex static const size_t HF_currentlyInsideAnnex; /// internal: create footnote references static const size_t HF_createFootnoteReferences; /// internal: convert non-ASCII characters (> #127) to &#nnn; static const size_t HF_convertNonASCIICharacters; /// shortcut: render all codes static const size_t HF_renderAllCodes; /// shortcut: filter all flags that are only used internally static const size_t HF_internalUseOnly; //@} /** @name read/writeXML() flags. * These flags can be combined and passed to the read/writeXML() methods. * The 'shortcut' flags can be used for common combinations. */ //@{ /// write: write all tags even if their value is empty static const size_t XF_writeEmptyTags; /// write: write template identification information (TID and mapping resource) static const size_t XF_writeTemplateIdentification; /// write: always write item identifier "id", not only when item is referenced static const size_t XF_alwaysWriteItemIdentifier; /// write: encode code value, coding scheme designator and coding scheme version as attribute instead of element text static const size_t XF_codeComponentsAsAttribute; /// write: encode relationship type as attribute instead of element text static const size_t XF_relationshipTypeAsAttribute; /// write: encode value type as attribute instead of element text static const size_t XF_valueTypeAsAttribute; /// write: encode template identifier as attribute instead of element text static const size_t XF_templateIdentifierAsAttribute; /// write: add DCMSR namespace declaration to the XML output static const size_t XF_useDcmsrNamespace; /// write: add Schema reference to XML document static const size_t XF_addSchemaReference; /// read: validate content of XML document against Schema static const size_t XF_validateSchema; /// read: output 'libxml' error and warning messages static const size_t XF_enableLibxmlErrorOutput;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -