OFFIS DCMTK  Version 3.6.0
dsrtypes.h
1 /*
2  *
3  * Copyright (C) 2000-2010, OFFIS e.V.
4  * All rights reserved. See COPYRIGHT file for details.
5  *
6  * This software and supporting documentation were developed by
7  *
8  * OFFIS e.V.
9  * R&D Division Health
10  * Escherweg 2
11  * D-26121 Oldenburg, Germany
12  *
13  *
14  * Module: dcmsr
15  *
16  * Author: Joerg Riesmeier
17  *
18  * Purpose:
19  * classes: DSRTypes
20  *
21  * Last Update: $Author: joergr $
22  * Update Date: $Date: 2010-11-05 11:06:53 $
23  * CVS/RCS Revision: $Revision: 1.68 $
24  * Status: $State: Exp $
25  *
26  * CVS/RCS Log at end of file
27  *
28  */
29 
30 
31 #ifndef DSRTYPES_H
32 #define DSRTYPES_H
33 
34 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
35 
36 #include "dcmtk/dcmdata/dctk.h"
37 
38 #include "dcmtk/ofstd/ofstream.h"
39 #include "dcmtk/ofstd/oftypes.h"
40 #include "dcmtk/ofstd/ofcond.h"
41 #include "dcmtk/oflog/oflog.h"
42 
43 OFLogger DCM_dcmsrGetLogger();
44 
45 #define DCMSR_TRACE(msg) OFLOG_TRACE(DCM_dcmsrGetLogger(), msg)
46 #define DCMSR_DEBUG(msg) OFLOG_DEBUG(DCM_dcmsrGetLogger(), msg)
47 #define DCMSR_INFO(msg) OFLOG_INFO(DCM_dcmsrGetLogger(), msg)
48 #define DCMSR_WARN(msg) OFLOG_WARN(DCM_dcmsrGetLogger(), msg)
49 #define DCMSR_ERROR(msg) OFLOG_ERROR(DCM_dcmsrGetLogger(), msg)
50 #define DCMSR_FATAL(msg) OFLOG_FATAL(DCM_dcmsrGetLogger(), msg)
51 
52 
53 /*---------------------*
54  * macro definitions *
55  *---------------------*/
56 
57 // private coding scheme designator used for internal codes
58 #define OFFIS_CODING_SCHEME_DESIGNATOR "99_OFFIS_DCMTK"
59 // name of the private coding scheme
60 #define OFFIS_CODING_SCHEME_NAME "OFFIS DCMTK Coding Scheme"
61 // organization responsible for the private coding scheme
62 #define OFFIS_RESPONSIBLE_ORGANIZATION "OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany"
63 
64 // protocol, hostname and CGI script name used for HTML hyperlinks to composite objects
65 #define HTML_HYPERLINK_PREFIX_FOR_CGI "http://localhost/dicom.cgi"
66 // URL of the DICOM toolkit DCMTK
67 #define DCMTK_INTERNET_URL "http://dicom.offis.de/dcmtk"
68 
69 // XML namespace URI for dcmsr module
70 #define DCMSR_XML_NAMESPACE_URI "http://dicom.offis.de/dcmsr"
71 // XML Schema file for dcmsr module
72 #define DCMSR_XML_XSD_FILE "dsr2xml.xsd"
73 // XML Schema Instance URI
74 #define XML_SCHEMA_INSTANCE_URI "http://www.w3.org/2001/XMLSchema-instance"
75 
76 
77 /*------------------------*
78  * forward declarations *
79  *------------------------*/
80 
81 class DSRXMLCursor;
82 class DSRXMLDocument;
85 
86 
87 /*-----------------------*
88  * contant definitions *
89  *-----------------------*/
90 
96 
98 extern const OFCondition SR_EC_UnknownDocumentType;
99 
101 extern const OFCondition SR_EC_InvalidDocument;
102 
104 extern const OFCondition SR_EC_InvalidDocumentTree;
105 
107 extern const OFCondition SR_EC_MandatoryAttributeMissing;
108 
110 extern const OFCondition SR_EC_InvalidValue;
111 
113 extern const OFCondition SR_EC_UnsupportedValue;
114 
116 extern const OFCondition SR_EC_UnknownValueType;
117 
119 extern const OFCondition SR_EC_UnknownRelationshipType;
120 
122 extern const OFCondition SR_EC_InvalidByValueRelationship;
123 
125 extern const OFCondition SR_EC_InvalidByReferenceRelationship;
126 
128 extern const OFCondition SR_EC_SOPInstanceNotFound;
129 
131 extern const OFCondition SR_EC_DifferentSOPClassesForAnInstance;
132 
134 extern const OFCondition SR_EC_CodingSchemeNotFound;
135 
137 extern const OFCondition SR_EC_CorruptedXMLStructure;
139 
140 
141 /*---------------------*
142  * class declaration *
143  *---------------------*/
144 
150 class DSRTypes
151 {
152 
153  public:
154 
155  // --- constant declarations ---
156 
162 
164  static const size_t RF_readDigitalSignatures;
165 
167  static const size_t RF_acceptUnknownRelationshipType;
168 
170  static const size_t RF_ignoreRelationshipConstraints;
171 
173  static const size_t RF_ignoreContentItemErrors;
174 
176  static const size_t RF_skipInvalidContentItems;
177 
179  static const size_t RF_showCurrentlyProcessedItem;
181 
182 
189 
191  static const size_t HF_neverExpandChildrenInline;
192 
194  static const size_t HF_alwaysExpandChildrenInline;
195 
197  static const size_t HF_renderInlineCodes;
198 
200  static const size_t HF_useCodeDetailsTooltip;
201 
203  static const size_t HF_renderConceptNameCodes;
204 
206  static const size_t HF_renderNumericUnitCodes;
207 
209  static const size_t HF_useCodeMeaningAsUnit;
210 
212  static const size_t HF_renderPatientTitle;
213 
215  static const size_t HF_renderNoDocumentHeader;
216 
218  static const size_t HF_renderDcmtkFootnote;
219 
221  static const size_t HF_renderFullData;
222 
224  static const size_t HF_renderSectionTitlesInline;
225 
227  static const size_t HF_copyStyleSheetContent;
228 
230  static const size_t HF_HTML32Compatibility;
231 
233  static const size_t HF_XHTML11Compatibility;
234 
236  static const size_t HF_addDocumentTypeReference;
237 
239  static const size_t HF_omitGeneratorMetaElement;
240 
242  static const size_t HF_renderItemsSeparately;
243 
245  static const size_t HF_renderItemInline;
246 
248  static const size_t HF_currentlyInsideAnnex;
249 
251  static const size_t HF_createFootnoteReferences;
252 
254  static const size_t HF_convertNonASCIICharacters;
255 
257  static const size_t HF_renderAllCodes;
258 
260  static const size_t HF_internalUseOnly;
262 
263 
269 
271  static const size_t XF_writeEmptyTags;
272 
274  static const size_t XF_writeTemplateIdentification;
275 
277  static const size_t XF_alwaysWriteItemIdentifier;
278 
280  static const size_t XF_codeComponentsAsAttribute;
281 
283  static const size_t XF_relationshipTypeAsAttribute;
284 
286  static const size_t XF_valueTypeAsAttribute;
287 
289  static const size_t XF_templateIdentifierAsAttribute;
290 
292  static const size_t XF_useDcmsrNamespace;
293 
295  static const size_t XF_addSchemaReference;
296 
298  static const size_t XF_validateSchema;
299 
301  static const size_t XF_templateElementEnclosesItems;
302 
304  static const size_t XF_encodeEverythingAsAttribute;
306 
307 
313 
315  static const size_t PF_printItemPosition;
316 
318  static const size_t PF_shortenLongItemValues;
319 
321  static const size_t PF_printSOPInstanceUID;
322 
324  static const size_t PF_printConceptNameCodes;
325 
327  static const size_t PF_printNoDocumentHeader;
328 
330  static const size_t PF_printTemplateIdentification;
331 
333  static const size_t PF_printAllCodes;
335 
336 
341 
343  static const size_t CM_updatePositionString;
344 
346  static const size_t CM_updateNodeID;
347 
349  static const size_t CM_resetReferenceTargetFlag;
351 
352 
353  // --- type definitions ---
354 
358  {
389  };
390 
394  {
417  };
418 
422  {
459  };
460 
464  {
481  };
482 
486  {
505  };
506 
510  {
529  };
530 
534  {
543  };
544 
548  {
557  };
558 
562  {
571  };
572 
576  {
585  };
586 
590  {
619  // UTF-8: Unicode in UTF-8
620  CS_UTF8,
622  CS_last = CS_UTF8
623  };
624 
628  {
635  };
636 
637 
638  // --- destructor ---
639 
642  virtual ~DSRTypes();
643 
644 
645  // --- conversion functions ---
646 
651  static const char *documentTypeToSOPClassUID(const E_DocumentType documentType);
652 
657  static const char *documentTypeToModality(const E_DocumentType documentType);
658 
664  static const char *documentTypeToReadableName(const E_DocumentType documentType);
665 
672  static const char *documentTypeToDocumentTitle(const E_DocumentType documentType,
673  OFString &documentTitle);
674 
679  static OFBool requiresEnhancedEquipmentModule(const E_DocumentType documentType);
680 
685  static const char *relationshipTypeToDefinedTerm(const E_RelationshipType relationshipType);
686 
692  static const char *relationshipTypeToReadableName(const E_RelationshipType relationshipType);
693 
698  static const char *valueTypeToDefinedTerm(const E_ValueType valueType);
699 
704  static const char *valueTypeToXMLTagName(const E_ValueType valueType);
705 
711  static const char *valueTypeToReadableName(const E_ValueType valueType);
712 
717  static const char *graphicTypeToEnumeratedValue(const E_GraphicType graphicType);
718 
724  static const char *graphicTypeToReadableName(const E_GraphicType graphicType);
725 
730  static const char *graphicType3DToEnumeratedValue(const E_GraphicType3D graphicType);
731 
737  static const char *graphicType3DToReadableName(const E_GraphicType3D graphicType);
738 
743  static const char *temporalRangeTypeToEnumeratedValue(const E_TemporalRangeType temporalRangeType);
744 
750  static const char *temporalRangeTypeToReadableName(const E_TemporalRangeType temporalRangeType);
751 
756  static const char *continuityOfContentToEnumeratedValue(const E_ContinuityOfContent continuityOfContent);
757 
762  static const char *preliminaryFlagToEnumeratedValue(const E_PreliminaryFlag preliminaryFlag);
763 
768  static const char *completionFlagToEnumeratedValue(const E_CompletionFlag completionFlag);
769 
774  static const char *verificationFlagToEnumeratedValue(const E_VerificationFlag verificationFlag);
775 
780  static const char *characterSetToDefinedTerm(const E_CharacterSet characterSet);
781 
787  static const char *characterSetToHTMLName(const E_CharacterSet characterSet);
788 
794  static const char *characterSetToXMLName(const E_CharacterSet characterSet);
795 
800  static E_DocumentType sopClassUIDToDocumentType(const OFString &sopClassUID);
801 
806  static E_RelationshipType definedTermToRelationshipType(const OFString &definedTerm);
807 
812  static E_ValueType definedTermToValueType(const OFString &definedTerm);
813 
818  static E_ValueType xmlTagNameToValueType(const OFString &xmlTagName);
819 
824  static E_GraphicType enumeratedValueToGraphicType(const OFString &enumeratedValue);
825 
830  static E_GraphicType3D enumeratedValueToGraphicType3D(const OFString &enumeratedValue);
831 
836  static E_TemporalRangeType enumeratedValueToTemporalRangeType(const OFString &enumeratedValue);
837 
843 
848  static E_PreliminaryFlag enumeratedValueToPreliminaryFlag(const OFString &enumeratedValue);
849 
854  static E_CompletionFlag enumeratedValueToCompletionFlag(const OFString &enumeratedValue);
855 
860  static E_VerificationFlag enumeratedValueToVerificationFlag(const OFString &enumeratedValue);
861 
866  static E_CharacterSet definedTermToCharacterSet(const OFString &definedTerm);
867 
868 
869  // --- misc helper functions ---
870 
877  static OFBool isDocumentTypeSupported(const E_DocumentType documentType);
878 
884  static const OFString &currentDate(OFString &dateString);
885 
892  static const OFString &currentTime(OFString &timeString);
893 
902  static const OFString &currentDateTime(OFString &dateTimeString);
903 
910  static const OFString &dicomToReadableDate(const OFString &dicomDate,
911  OFString &readableDate);
912 
920  static const OFString &dicomToReadableTime(const OFString &dicomTime,
921  OFString &readableTime);
922 
930  static const OFString &dicomToReadableDateTime(const OFString &dicomDateTime,
931  OFString &readableDateTime);
932 
942  static const OFString &dicomToReadablePersonName(const OFString &dicomPersonName,
943  OFString &readablePersonName);
944 
956  static const OFString &dicomToXMLPersonName(const OFString &dicomPersonName,
957  OFString &xmlPersonName,
958  const OFBool writeEmptyValue = OFFalse);
959 
965  static const char *numberToString(const size_t number,
966  char *stringValue);
967 
972  static size_t stringToNumber(const char *stringValue);
973 
981  static const OFString &convertToPrintString(const OFString &sourceString,
982  OFString &printString);
983 
998  static const OFString &convertToHTMLString(const OFString &sourceString,
999  OFString &markupString,
1000  const size_t flags = 0,
1001  const OFBool newlineAllowed = OFFalse);
1002 
1010  static const OFString &convertToXMLString(const OFString &sourceString,
1011  OFString &markupString);
1012 
1021  static OFBool checkForValidUIDFormat(const OFString &stringValue);
1022 
1029 
1037  static DSRDocumentTreeNode *createDocumentTreeNode(const E_RelationshipType relationshipType,
1038  const E_ValueType valueType);
1039 
1040 
1041  // --- DICOM data structure access functions ---
1042 
1057  DcmItem &dataset,
1058  DcmElement *delem,
1059  const OFString &vm,
1060  const OFString &type,
1061  const char *moduleName = NULL);
1062 
1068  static void removeAttributeFromSequence(DcmSequenceOfItems &sequence,
1069  const DcmTagKey &tagKey);
1070 
1078  static OFCondition getElementFromDataset(DcmItem &dataset,
1079  DcmElement &delem);
1080 
1085  static const char *getStringValueFromElement(const DcmElement &delem);
1086 
1092  static const OFString &getStringValueFromElement(const DcmElement &delem,
1093  OFString &stringValue);
1094 
1100  static const OFString &getPrintStringFromElement(const DcmElement &delem,
1101  OFString &stringValue);
1102 
1109  static const OFString &getMarkupStringFromElement(const DcmElement &delem,
1110  OFString &stringValue,
1111  const OFBool convertNonASCII = OFFalse);
1112 
1122  const DcmTagKey &tagKey,
1123  OFString &stringValue);
1124 
1134  const DcmTag &tag,
1135  const OFString &stringValue,
1136  const OFBool allowEmpty = OFTrue);
1137 
1149  static OFBool checkElementValue(DcmElement &delem,
1150  const OFString &vm,
1151  const OFString &type,
1152  const OFCondition &searchCond = EC_Normal,
1153  const char *moduleName = NULL);
1154 
1168  DcmElement &delem,
1169  const OFString &vm,
1170  const OFString &type,
1171  const char *moduleName = NULL);
1172 
1188  const DcmTagKey &tagKey,
1189  OFString &stringValue,
1190  const OFString &vm,
1191  const OFString &type,
1192  const char *moduleName = NULL);
1193 
1194  // --- output functions ---
1195 
1202  static void printInvalidContentItemMessage(const char *action,
1203  const DSRDocumentTreeNode *node,
1204  const char *location = NULL);
1205 
1213  static void printContentItemErrorMessage(const char *action,
1214  const OFCondition &result,
1215  const DSRDocumentTreeNode *node,
1216  const char *location = NULL);
1217 
1223  static void printUnknownValueWarningMessage(const char *valueName,
1224  const char *readValue = NULL,
1225  const char *action = "Reading");
1226 
1235  static OFBool writeStringValueToXML(STD_NAMESPACE ostream &stream,
1236  const OFString &stringValue,
1237  const OFString &tagName,
1238  const OFBool writeEmptyValue = OFFalse);
1239 
1249  static OFBool writeStringFromElementToXML(STD_NAMESPACE ostream &stream,
1250  DcmElement &delem,
1251  const OFString &tagName,
1252  const OFBool writeEmptyValue = OFFalse);
1253 
1265  static size_t createHTMLAnnexEntry(STD_NAMESPACE ostream &docStream,
1266  STD_NAMESPACE ostream &annexStream,
1267  const OFString &referenceText,
1268  size_t &annexNumber,
1269  const size_t flags = 0);
1270 
1281  static size_t createHTMLFootnote(STD_NAMESPACE ostream &docStream,
1282  STD_NAMESPACE ostream &footnoteStream,
1283  size_t &footnoteNumber,
1284  const size_t nodeID,
1285  const size_t flags = 0);
1286 
1294  static OFCondition appendStream(STD_NAMESPACE ostream &mainStream,
1295  OFOStringStream &tempStream,
1296  const char *heading = NULL);
1297 };
1298 
1299 
1300 #endif
1301 
1302 
1303 /*
1304  * CVS/RCS Log:
1305  * $Log: dsrtypes.h,v $
1306  * Revision 1.68 2010-11-05 11:06:53 joergr
1307  * Added support for new Implantation Plan SR Document Storage SOP Class.
1308  *
1309  * Revision 1.67 2010-11-05 09:30:27 joergr
1310  * Added support for checking the value multiplicity "9" (see Supplement 131).
1311  *
1312  * Revision 1.66 2010-10-21 09:06:48 joergr
1313  * Added virtual destructor in order to avoid warnings reported by gcc with
1314  * additional flags.
1315  *
1316  * Revision 1.65 2010-10-14 13:16:33 joergr
1317  * Updated copyright header. Added reference to COPYRIGHT file.
1318  *
1319  * Revision 1.64 2010-10-04 16:16:16 joergr
1320  * Fixed various Doxygen API documentation issues.
1321  *
1322  * Revision 1.63 2010-09-30 08:59:21 joergr
1323  * Added support for the Spectacle Prescription Report IOD.
1324  * Added support for the Macular Grid Thickness and Volume Report IOD.
1325  * Renamed class and enumeration related to the Key Object Selection Document.
1326  *
1327  * Revision 1.62 2010-09-29 15:16:45 joergr
1328  * Enhanced checking and reporting of standard violations in write() methods.
1329  *
1330  * Revision 1.61 2010-09-29 10:07:12 joergr
1331  * Added support for the recently introduced, optional PreliminaryFlag.
1332  *
1333  * Revision 1.60 2010-09-28 16:27:12 joergr
1334  * Added support for Enhanced General Equipment Module which is required for
1335  * both X-Ray Radiation Dose SR and Colon CAD SR.
1336  *
1337  * Revision 1.59 2010-09-28 14:08:14 joergr
1338  * Added support for Colon CAD SR which requires a new value type (SCOORD3D).
1339  *
1340  * Revision 1.58 2010-04-23 14:38:34 joergr
1341  * Enhanced checking of element values using the new DcmElement::checkValue()
1342  * method.
1343  *
1344  * Revision 1.57 2009-10-13 14:57:50 uli
1345  * Switched to logging mechanism provided by the "new" oflog module.
1346  *
1347  * Revision 1.56 2009-08-24 13:43:11 joergr
1348  * Fixed wrong/misleading comments.
1349  *
1350  * Revision 1.55 2009-07-27 15:32:29 joergr
1351  * Fixed possible memory leak in method addElementToDataset().
1352  *
1353  * Revision 1.54 2008-12-11 15:48:55 joergr
1354  * Enhanced method checkElementValue(), e.g. added support for type 1C elements.
1355  *
1356  * Revision 1.53 2008-07-17 12:00:36 joergr
1357  * Removed getSequenceFromDataset() function.
1358  *
1359  * Revision 1.52 2008-06-27 10:49:51 joergr
1360  * Fixed condition that could lead to a wrong error message in method
1361  * checkElementValue().
1362  *
1363  * Revision 1.51 2008-05-19 09:48:55 joergr
1364  * Added new flag that enables reading of SR documents with unknown/missing
1365  * relationship type(s).
1366  * Changed parameters of checkByReferenceRelationships() method.
1367  *
1368  * Revision 1.50 2007/11/15 16:32:48 joergr
1369  * Added support for output in XHTML 1.1 format.
1370  * Enhanced support for output in valid HTML 3.2 format. Migrated support for
1371  * standard HTML from version 4.0 to 4.01 (strict).
1372  *
1373  * Revision 1.49 2006/08/15 16:40:03 meichel
1374  * Updated the code in module dcmsr to correctly compile when
1375  * all standard C++ classes remain in namespace std.
1376  *
1377  * Revision 1.48 2006/07/25 13:21:29 joergr
1378  * Added new optional flags for the HTML rendering of SR documents:
1379  * HF_alwaysExpandChildrenInline, HF_useCodeDetailsTooltip and
1380  * HF_renderSectionTitlesInline.
1381  *
1382  * Revision 1.47 2006/05/11 09:18:21 joergr
1383  * Moved containsExtendedCharacters() from dcmsr to dcmdata module.
1384  *
1385  * Revision 1.46 2005/12/08 16:05:30 meichel
1386  * Changed include path schema for all DCMTK header files
1387  *
1388  * Revision 1.45 2005/11/30 12:00:24 joergr
1389  * Added support for X-Ray Radiation Dose SR documents.
1390  *
1391  * Revision 1.44 2004/11/29 17:11:01 joergr
1392  * Added warning message when character set is unknown, unsupported or cannot
1393  * be mapped to the output format. Fixed minor formatting issues.
1394  *
1395  * Revision 1.43 2004/11/22 16:35:38 meichel
1396  * Added helper methods to check strings and DICOM elements for presence of
1397  * extended (non-ASCII) characters
1398  *
1399  * Revision 1.42 2004/09/09 14:01:30 joergr
1400  * Added flags to control the way the template identification is encoded in
1401  * writeXML() and expected in readXML().
1402  *
1403  * Revision 1.41 2004/01/20 15:35:54 joergr
1404  * Added new command line option which allows to write the item identifier "id"
1405  * (XML attribute) even if it is not required (because the item is not referenced
1406  * by any other item). Useful for debugging purposes.
1407  *
1408  * Revision 1.40 2004/01/05 14:36:02 joergr
1409  * Removed acknowledgements with e-mail addresses from CVS log.
1410  *
1411  * Revision 1.39 2003/12/01 15:46:18 joergr
1412  * Changed XML encoding of by-reference relationships if flag
1413  * XF_valueTypeAsAttribute is set.
1414  *
1415  * Revision 1.38 2003/10/30 17:51:00 joergr
1416  * Added new command line options which allow to print/write the template
1417  * identification of a content item.
1418  *
1419  * Revision 1.37 2003/10/09 12:53:12 joergr
1420  * Added support for Procedure Log.
1421  *
1422  * Revision 1.36 2003/10/06 09:52:58 joergr
1423  * Added new flag which allows to ignore content item errors when reading an SR
1424  * document (e.g. missing value type specific attributes).
1425  *
1426  * Revision 1.35 2003/09/15 14:18:54 joergr
1427  * Introduced new class to facilitate checking of SR IOD relationship content
1428  * constraints. Replaced old implementation distributed over numerous classes.
1429  *
1430  * Revision 1.34 2003/09/10 13:16:13 joergr
1431  * Replaced PrivateCodingSchemeUID by new CodingSchemeIdenticationSequence as
1432  * required by CP 324.
1433  *
1434  * Revision 1.33 2003/08/07 17:31:00 joergr
1435  * Removed libxml dependency from header files. Simplifies linking (MSVC).
1436  *
1437  * Revision 1.32 2003/08/07 13:05:26 joergr
1438  * Added readXML functionality. Added support for Chest CAD SR.
1439  * Added new option --add-schema-reference to command line tool dsr2xml.
1440  * Renamed parameters/variables "string" to avoid name clash with STL class.
1441  *
1442  * Revision 1.31 2003/04/17 18:57:38 joergr
1443  * Replace LF and CR by 
 and 
 in XML mode instead of ¶ (para).
1444  *
1445  * Revision 1.30 2003/04/01 14:59:13 joergr
1446  * Added support for XML namespaces.
1447  *
1448  * Revision 1.29 2002/08/02 12:38:32 joergr
1449  * Enhanced debug output of dcmsr::read() routines (e.g. add position string
1450  * of invalid content items to error messages).
1451  *
1452  * Revision 1.28 2002/07/22 14:21:20 joergr
1453  * Added new print flag to suppress the output of general document information.
1454  *
1455  * Revision 1.27 2002/05/14 08:14:51 joergr
1456  * Updated comments.
1457  *
1458  * Revision 1.26 2002/05/07 12:49:32 joergr
1459  * Added support for the Current Requested Procedure Evidence Sequence and the
1460  * Pertinent Other Evidence Sequence to the dcmsr module.
1461  *
1462  * Revision 1.25 2002/05/02 14:08:23 joergr
1463  * Added support for standard and non-standard string streams (which one is
1464  * supported is detected automatically via the configure mechanism).
1465  *
1466  * Revision 1.24 2002/04/16 13:50:52 joergr
1467  * Added configurable support for C++ ANSI standard includes (e.g. streams).
1468  *
1469  * Revision 1.23 2002/04/11 13:02:35 joergr
1470  * Corrected typo and/or enhanced documentation.
1471  *
1472  * Revision 1.22 2001/11/09 16:10:54 joergr
1473  * Added preliminary support for Mammography CAD SR.
1474  *
1475  * Revision 1.21 2001/10/10 15:28:04 joergr
1476  * Changed parameter DcmTagKey to DcmTag in DcmItem::putAndInsert... methods
1477  * to support elements which are not in the data dictionary (e.g. private
1478  * extensions).
1479  *
1480  * Revision 1.20 2001/10/02 12:05:46 joergr
1481  * Adapted module "dcmsr" to the new class OFCondition. Introduced module
1482  * specific error codes.
1483  *
1484  * Revision 1.19 2001/10/01 15:06:54 joergr
1485  * Introduced new general purpose functions to get/set person names, date, time
1486  * and date/time.
1487  *
1488  * Revision 1.18 2001/09/26 13:04:14 meichel
1489  * Adapted dcmsr to class OFCondition
1490  *
1491  * Revision 1.17 2001/06/20 15:03:00 joergr
1492  * Added minimal support for new SOP class Key Object Selection Document
1493  * (suppl. 59).
1494  * Added new debugging features (additional flags) to examine "corrupted" SR
1495  * documents.
1496  *
1497  * Revision 1.16 2001/04/03 08:24:00 joergr
1498  * Added new command line option: ignore relationship content constraints
1499  * specified for each SR document class.
1500  *
1501  * Revision 1.15 2001/02/13 16:36:05 joergr
1502  * Allow newline characters (encoded as ¶) in XML documents.
1503  *
1504  * Revision 1.14 2001/02/02 14:37:33 joergr
1505  * Added new option to dsr2xml allowing to specify whether value and/or
1506  * relationship type are to be encoded as XML attributes or elements.
1507  *
1508  * Revision 1.13 2001/01/25 11:47:43 joergr
1509  * Always remove signature sequences from certain dataset sequences (e.g.
1510  * VerifyingObserver or PredecessorDocuments).
1511  *
1512  * Revision 1.12 2001/01/18 15:52:11 joergr
1513  * Encode PN components in separate XML tags.
1514  *
1515  * Revision 1.11 2000/12/08 13:45:17 joergr
1516  * Removed optional fractional second part from time value.
1517  *
1518  * Revision 1.10 2000/11/09 20:32:08 joergr
1519  * Added support for non-ASCII characters in HTML 3.2 (use numeric value).
1520  *
1521  * Revision 1.9 2000/11/09 11:31:46 joergr
1522  * Reordered renderHTML flags (internal flags to the end).
1523  *
1524  * Revision 1.8 2000/11/07 18:14:05 joergr
1525  * Added new command line option allowing to choose code value or meaning to be
1526  * rendered as the numeric measurement unit.
1527  * Enhanced rendered HTML output of date, time, datetime and pname.
1528  *
1529  * Revision 1.7 2000/11/06 11:21:04 joergr
1530  * Changes structure of HTML hyperlinks to composite objects (now using pseudo
1531  * CGI script).
1532  *
1533  * Revision 1.6 2000/11/01 16:18:34 joergr
1534  * Added support for conversion to XML.
1535  * Added support for Cascading Style Sheet (CSS) used optionally for HTML
1536  * rendering.
1537  * Enhanced support for specific character sets.
1538  *
1539  * Revision 1.5 2000/10/26 14:22:09 joergr
1540  * Added support for "Comprehensive SR".
1541  * Added support for TCOORD content item.
1542  * Added new flag specifying whether to add a "dcmtk" footnote to the rendered
1543  * HTML document or not.
1544  * Added check routine for valid UID strings.
1545  *
1546  * Revision 1.4 2000/10/18 17:10:25 joergr
1547  * Added new method allowing to get and check string values from dataset.
1548  *
1549  * Revision 1.3 2000/10/16 16:31:09 joergr
1550  * Updated comments.
1551  *
1552  * Revision 1.2 2000/10/16 11:52:58 joergr
1553  * Added new options: number nested items instead of indenting them, print SOP
1554  * instance UID of referenced composite objects.
1555  *
1556  * Revision 1.1 2000/10/13 07:49:35 joergr
1557  * Added new module 'dcmsr' providing access to DICOM structured reporting
1558  * documents (supplement 23). Doc++ documentation not yet completed.
1559  *
1560  *
1561  */
static const size_t PF_shortenLongItemValues
shorten long item value (e.g. long texts)
Definition: dsrtypes.h:318
static OFCondition getElementFromDataset(DcmItem &dataset, DcmElement &delem)
get element from dataset
static OFCondition addElementToDataset(OFCondition &result, DcmItem &dataset, DcmElement *delem, const OFString &vm, const OFString &type, const char *moduleName=NULL)
add given element to the dataset.
static OFCondition getAndCheckStringValueFromDataset(DcmItem &dataset, const DcmTagKey &tagKey, OFString &stringValue, const OFString &vm, const OFString &type, const char *moduleName=NULL)
get string value from dataset and check it for correct value multipicity and type.
DICOM Graphic Type: MULTIPOINT.
Definition: dsrtypes.h:494
DICOM Relationship Type: INFERRED FROM.
Definition: dsrtypes.h:412
static const size_t HF_useCodeMeaningAsUnit
external: use code meaning for the numeric measurement unit (default: code value) ...
Definition: dsrtypes.h:209
static const char * documentTypeToDocumentTitle(const E_DocumentType documentType, OFString &documentTitle)
convert SR document type to document title.
a class representing a list of DICOM elements in which each element has a different tag and elements ...
Definition: dcitem.h:51
static const OFString & dicomToReadablePersonName(const OFString &dicomPersonName, OFString &readablePersonName)
convert DICOM person name to readable format.
static const char * characterSetToHTMLName(const E_CharacterSet characterSet)
convert character set to HTML name.
DICOM Graphic Type: POLYGON.
Definition: dsrtypes.h:498
static const char * valueTypeToReadableName(const E_ValueType valueType)
convert value type to readable name.
class maintaining a attribute tag (group and element number)
Definition: dctagkey.h:46
static const char * completionFlagToEnumeratedValue(const E_CompletionFlag completionFlag)
convert completion flag to DICOM enumerated value
static const size_t RF_readDigitalSignatures
read digital signatures from dataset
Definition: dsrtypes.h:164
Class for checking the content relationship constraints of an SR IOD (abstract)
Definition: dsriodcc.h:45
static OFBool checkElementValue(DcmElement &delem, const OFString &vm, const OFString &type, const OFCondition &searchCond=EC_Normal, const char *moduleName=NULL)
check element value for correct value multipicity and type.
Class for XML documents.
Definition: dsrxmld.h:63
internal type used to mark the last entry
Definition: dsrtypes.h:416
static const OFString & convertToHTMLString(const OFString &sourceString, OFString &markupString, const size_t flags=0, const OFBool newlineAllowed=OFFalse)
convert character string to HTML mnenonic string.
static const size_t RF_ignoreRelationshipConstraints
ignore relationship constraints for this document class
Definition: dsrtypes.h:170
static const size_t HF_renderPatientTitle
external: use patient information as document title (default: document type)
Definition: dsrtypes.h:212
internal type used to indicate an error
Definition: dsrtypes.h:424
ISO-IR 101: Latin alphabet No. 2.
Definition: dsrtypes.h:600
static const size_t HF_copyStyleSheetContent
external: copy Cascading Style Sheet (CSS) content to HTML file
Definition: dsrtypes.h:227
static const size_t HF_alwaysExpandChildrenInline
external: always expand child nodes inline
Definition: dsrtypes.h:194
abstract base class for all DICOM elements
Definition: dcelem.h:45
static const char * temporalRangeTypeToEnumeratedValue(const E_TemporalRangeType temporalRangeType)
convert temporal range type to DICOM enumerated value
DICOM enumerated value: PARTIAL.
Definition: dsrtypes.h:566
class representing a DICOM Sequence of Items (SQ).
Definition: dcsequen.h:47
ISO-IR 144: Cyrillic.
Definition: dsrtypes.h:606
static const size_t XF_valueTypeAsAttribute
write: encode value type as attribute instead of element text
Definition: dsrtypes.h:286
static const size_t XF_useDcmsrNamespace
write: add DCMSR namespace declaration to the XML output
Definition: dsrtypes.h:292
DICOM IOD: Implantation Plan SR Document.
Definition: dsrtypes.h:386
static const size_t PF_printAllCodes
shortcut: print all codes
Definition: dsrtypes.h:333
static const char * valueTypeToDefinedTerm(const E_ValueType valueType)
convert value type to DICOM defined term
static void printInvalidContentItemMessage(const char *action, const DSRDocumentTreeNode *node, const char *location=NULL)
print the warning message that the current content item is invalid/incomplete.
static const size_t PF_printItemPosition
print item position ("1.2.3") instead of line indentation
Definition: dsrtypes.h:315
DICOM Graphic Type: CIRCLE.
Definition: dsrtypes.h:476
DICOM Graphic Type: POINT.
Definition: dsrtypes.h:492
DICOM Graphic Type: ELLIPSE.
Definition: dsrtypes.h:478
static OFBool checkForValidUIDFormat(const OFString &stringValue)
check string for valid UID format.
DICOM IOD: Enhanced SR.
Definition: dsrtypes.h:366
DICOM Relationship Type: SELECTED FROM.
Definition: dsrtypes.h:414
static E_CompletionFlag enumeratedValueToCompletionFlag(const OFString &enumeratedValue)
convert DICOM enumerated value to completion flag
static const char * documentTypeToModality(const E_DocumentType documentType)
convert SR document type to modality
static const OFString & getPrintStringFromElement(const DcmElement &delem, OFString &stringValue)
get string value from element and convert to "print" format
static const size_t XF_relationshipTypeAsAttribute
write: encode relationship type as attribute instead of element text
Definition: dsrtypes.h:283
static const size_t XF_writeTemplateIdentification
write: write template identification information (TID and mapping resource)
Definition: dsrtypes.h:274
static const size_t XF_codeComponentsAsAttribute
write: encode code value, coding scheme designator and coding scheme version as attribute instead of ...
Definition: dsrtypes.h:280
static const size_t HF_renderAllCodes
shortcut: render all codes
Definition: dsrtypes.h:257
ISO-IR 127: Arabic.
Definition: dsrtypes.h:608
internal type used to indicate an unknown/unsupported character set
Definition: dsrtypes.h:594
static void removeAttributeFromSequence(DcmSequenceOfItems &sequence, const DcmTagKey &tagKey)
remove given attribute from the sequence.
static const size_t HF_renderNumericUnitCodes
external: render the code of the numeric measurement unit
Definition: dsrtypes.h:206
internal type used to mark the last entry
Definition: dsrtypes.h:542
internal type used to indicate an unknown graphic type (defined term)
Definition: dsrtypes.h:468
static E_VerificationFlag enumeratedValueToVerificationFlag(const OFString &enumeratedValue)
convert DICOM enumerated value to verification flag
DICOM IOD: Comprehensive SR.
Definition: dsrtypes.h:368
DICOM enumerated value: PRELIMINARY.
Definition: dsrtypes.h:552
static const size_t CM_resetReferenceTargetFlag
reset the reference target flag for all nodes
Definition: dsrtypes.h:349
internal type used to mark the last entry
Definition: dsrtypes.h:388
static const size_t HF_omitGeneratorMetaElement
external: omit generator meta element referring to the DCMTK
Definition: dsrtypes.h:239
static E_GraphicType3D enumeratedValueToGraphicType3D(const OFString &enumeratedValue)
convert DICOM enumerated value to graphic type (3D)
ISO-IR 166: Thai.
Definition: dsrtypes.h:618
static OFCondition getAndCheckElementFromDataset(DcmItem &dataset, DcmElement &delem, const OFString &vm, const OFString &type, const char *moduleName=NULL)
get element from dataset and check it for correct value multipicity and type.
static const char * graphicType3DToEnumeratedValue(const E_GraphicType3D graphicType)
convert graphic type (3D) to DICOM enumerated value
E_CompletionFlag
SR document completion flag.
Definition: dsrtypes.h:561
static OFCondition putStringValueToDataset(DcmItem &dataset, const DcmTag &tag, const OFString &stringValue, const OFBool allowEmpty=OFTrue)
put string value to dataset
DICOM Temporal Range Type: END.
Definition: dsrtypes.h:526
DICOM IOD: Chest CAD SR.
Definition: dsrtypes.h:374
static const size_t HF_addDocumentTypeReference
external: add explicit reference to HTML document type (DTD)
Definition: dsrtypes.h:236
DICOM IOD: Basic Text SR.
Definition: dsrtypes.h:364
static size_t createHTMLAnnexEntry(STD_NAMESPACE ostream &docStream, STD_NAMESPACE ostream &annexStream, const OFString &referenceText, size_t &annexNumber, const size_t flags=0)
create an HTML annex entry with hyperlinks.
ISO-IR 100: Latin alphabet No. 1.
Definition: dsrtypes.h:598
E_ContinuityOfContent
SR continuity of content flag.
Definition: dsrtypes.h:533
DICOM IOD: X-Ray Radiation Dose SR.
Definition: dsrtypes.h:380
static const char * graphicTypeToReadableName(const E_GraphicType graphicType)
convert graphic type to readable name.
add new node before current one (sibling)
Definition: dsrtypes.h:632
DICOM Value Type: DATE.
Definition: dsrtypes.h:434
static const size_t PF_printNoDocumentHeader
print no general document information (header)
Definition: dsrtypes.h:327
static E_ValueType xmlTagNameToValueType(const OFString &xmlTagName)
convert XML tag name to value type
static E_GraphicType enumeratedValueToGraphicType(const OFString &enumeratedValue)
convert DICOM enumerated value to graphic type
this class encapsulates an attribute tag (group, element) and a VR.
Definition: dctag.h:50
DICOM Value Type: IMAGE.
Definition: dsrtypes.h:450
internal type used to mark the last entry
Definition: dsrtypes.h:504
DICOM Value Type: TEXT.
Definition: dsrtypes.h:426
E_CharacterSet
Specific character set.
Definition: dsrtypes.h:589
internal type used to indicate an error
Definition: dsrtypes.h:592
DICOM IOD: Mammography CAD SR.
Definition: dsrtypes.h:372
static E_DocumentType sopClassUIDToDocumentType(const OFString &sopClassUID)
convert SOP class UID to SR document type
E_RelationshipType
SR relationship types.
Definition: dsrtypes.h:393
internal type used to indicate an unknown relationship type (defined term)
Definition: dsrtypes.h:398
static const char * valueTypeToXMLTagName(const E_ValueType valueType)
convert value type to XML tag name
static const char * graphicTypeToEnumeratedValue(const E_GraphicType graphicType)
convert graphic type to DICOM enumerated value
static const size_t HF_renderItemInline
internal: expand items inline when they are short and have no child nodes
Definition: dsrtypes.h:245
static size_t createHTMLFootnote(STD_NAMESPACE ostream &docStream, STD_NAMESPACE ostream &footnoteStream, size_t &footnoteNumber, const size_t nodeID, const size_t flags=0)
create an HTML footnote with hyperlinks
internal type used to mark the last entry
Definition: dsrtypes.h:584
ISO-IR 138: Hebrew.
Definition: dsrtypes.h:612
static const size_t HF_renderItemsSeparately
internal: render items separately (for container with SEPARATE flag)
Definition: dsrtypes.h:242
add new node below current one (after last child)
Definition: dsrtypes.h:634
static E_PreliminaryFlag enumeratedValueToPreliminaryFlag(const OFString &enumeratedValue)
convert DICOM enumerated value to preliminary flag
DICOM Temporal Range Type: SEGMENT.
Definition: dsrtypes.h:520
static const size_t RF_acceptUnknownRelationshipType
accept unknown/missing relationship type
Definition: dsrtypes.h:167
DICOM Value Type: COMPOSITE.
Definition: dsrtypes.h:448
static OFCondition getStringValueFromDataset(DcmItem &dataset, const DcmTagKey &tagKey, OFString &stringValue)
get string value from dataset
static const OFString & currentDateTime(OFString &dateTimeString)
get current date and time in DICOM 'DT' format.
static const size_t HF_internalUseOnly
shortcut: filter all flags that are only used internally
Definition: dsrtypes.h:260
static const size_t HF_renderNoDocumentHeader
external: render no general document information (header)
Definition: dsrtypes.h:215
DICOM IOD: Key Object Selection Document.
Definition: dsrtypes.h:370
static const size_t RF_showCurrentlyProcessedItem
show the currently processed content item (e.g. "1.2.3")
Definition: dsrtypes.h:179
E_AddMode
Add node mode.
Definition: dsrtypes.h:627
static const OFString & convertToXMLString(const OFString &sourceString, OFString &markupString)
convert character string to XML mnenonic string.
DICOM enumerated value: CONTINUOUS.
Definition: dsrtypes.h:540
static const OFString & dicomToReadableTime(const OFString &dicomTime, OFString &readableTime)
convert DICOM time string to readable format.
internal type used for the document root
Definition: dsrtypes.h:400
internal type used to mark the last entry
Definition: dsrtypes.h:556
static const size_t HF_renderSectionTitlesInline
external: render section titles inline (default: separate paragraph)
Definition: dsrtypes.h:224
static const size_t XF_validateSchema
read: validate content of XML document against Schema
Definition: dsrtypes.h:298
static OFBool isDocumentTypeSupported(const E_DocumentType documentType)
check whether specified SR document type is supported by this library.
DICOM Value Type: PNAME.
Definition: dsrtypes.h:440
DICOM Graphic Type: ELLIPSOID.
Definition: dsrtypes.h:502
static const OFString & getMarkupStringFromElement(const DcmElement &delem, OFString &stringValue, const OFBool convertNonASCII=OFFalse)
get string value from element and convert to HTML/XML
static E_ContinuityOfContent enumeratedValueToContinuityOfContent(const OFString &enumeratedValue)
convert DICOM enumerated value to continuity of content flag
DICOM Temporal Range Type: POINT.
Definition: dsrtypes.h:516
DICOM Value Type: CONTAINER.
Definition: dsrtypes.h:454
static const OFString & currentTime(OFString &timeString)
get current time in DICOM 'TM' format.
internal type used to indicate an unknown range type (defined term)
Definition: dsrtypes.h:514
static const char * temporalRangeTypeToReadableName(const E_TemporalRangeType temporalRangeType)
convert temporal range type to readable name.
static const char * getStringValueFromElement(const DcmElement &delem)
get string value from element
DICOM Relationship Type: HAS PROPERTIES.
Definition: dsrtypes.h:410
static const size_t XF_templateElementEnclosesItems
read/write: template identification element encloses content items
Definition: dsrtypes.h:301
static const size_t HF_HTML32Compatibility
external: output compatible to HTML version 3.2 (default: 4.01)
Definition: dsrtypes.h:230
virtual ~DSRTypes()
destructor.
static const char * documentTypeToSOPClassUID(const E_DocumentType documentType)
convert SR document type to SOP class UID
static const char * characterSetToDefinedTerm(const E_CharacterSet characterSet)
convert character set to DICOM defined term
static const size_t XF_alwaysWriteItemIdentifier
write: always write item identifier "id", not only when item is referenced
Definition: dsrtypes.h:277
static const OFString & dicomToReadableDate(const OFString &dicomDate, OFString &readableDate)
convert DICOM date string to readable format.
DICOM enumerated value: VERIFIED.
Definition: dsrtypes.h:582
ISO 646 (ISO-IR 6): ASCII.
Definition: dsrtypes.h:596
internal type used to indicate an error
Definition: dsrtypes.h:396
internal type used to indicate an unknown/unsupported document type
Definition: dsrtypes.h:362
DICOM IOD: Colon CAD SR.
Definition: dsrtypes.h:376
DICOM Graphic Type: MULTIPOINT.
Definition: dsrtypes.h:472
static const char * verificationFlagToEnumeratedValue(const E_VerificationFlag verificationFlag)
convert verification flag to DICOM enumerated value
DICOM Relationship Type: HAS OBS CONTEXT.
Definition: dsrtypes.h:404
static OFBool requiresEnhancedEquipmentModule(const E_DocumentType documentType)
check whether SR document type requires Enhanced General Equipment Module
static const size_t RF_ignoreContentItemErrors
do not abort on content item errors (e.g. missing value type specific attributes) ...
Definition: dsrtypes.h:173
E_VerificationFlag
SR document verification flag.
Definition: dsrtypes.h:575
internal type used to indicate an error
Definition: dsrtypes.h:564
internal type used to mark the last entry
Definition: dsrtypes.h:528
internal type used to indicate by-reference relationships
Definition: dsrtypes.h:456
static const char * graphicType3DToReadableName(const E_GraphicType3D graphicType)
convert graphic type (3D) to readable name.
internal type used to mark the last entry
Definition: dsrtypes.h:480
DICOM Value Type: NUM.
Definition: dsrtypes.h:430
static const size_t RF_skipInvalidContentItems
do not abort when detecting an invalid content item, skip invalid sub-tree instead ...
Definition: dsrtypes.h:176
static const size_t CM_updatePositionString
update the position string using the node ID
Definition: dsrtypes.h:343
internal type used to indicate an unknown graphic type (defined term)
Definition: dsrtypes.h:490
DICOM Value Type: SCOORD.
Definition: dsrtypes.h:442
DICOM Relationship Type: HAS ACQ CONTEXT.
Definition: dsrtypes.h:406
static const OFString & dicomToReadableDateTime(const OFString &dicomDateTime, OFString &readableDateTime)
convert DICOM date time string to readable format.
internal type used to indicate an error
Definition: dsrtypes.h:360
DICOM Value Type: TIME.
Definition: dsrtypes.h:436
internal type used to mark the last entry
Definition: dsrtypes.h:570
internal type used to mark the last entry
Definition: dsrtypes.h:622
static const char * preliminaryFlagToEnumeratedValue(const E_PreliminaryFlag preliminaryFlag)
convert preliminary flag to DICOM enumerated value
E_TemporalRangeType
SR temporal range types.
Definition: dsrtypes.h:509
static const size_t CM_updateNodeID
update the node ID using the position string
Definition: dsrtypes.h:346
DICOM Temporal Range Type: MULTISEGMENT.
Definition: dsrtypes.h:522
static const size_t PF_printTemplateIdentification
print template identification (TID and mapping resource)
Definition: dsrtypes.h:330
DICOM Value Type: WAVEFORM.
Definition: dsrtypes.h:452
DICOM Graphic Type: POINT.
Definition: dsrtypes.h:470
static const OFString & convertToPrintString(const OFString &sourceString, OFString &printString)
convert character string to print string.
internal type used to indicate an error
Definition: dsrtypes.h:488
ISO-IR 126: Greek.
Definition: dsrtypes.h:610
ISO-IR 13: Japanese (Katakana/Romaji)
Definition: dsrtypes.h:616
static E_ValueType definedTermToValueType(const OFString &definedTerm)
convert DICOM defined term to value type
DICOM enumerated value: UNVERIFIED.
Definition: dsrtypes.h:580
DICOM Graphic Type: ELLIPSE.
Definition: dsrtypes.h:500
add new node after current one (sibling)
Definition: dsrtypes.h:630
DICOM enumerated value: FINAL.
Definition: dsrtypes.h:554
static const char * relationshipTypeToDefinedTerm(const E_RelationshipType relationshipType)
convert relationship type to DICOM defined term
E_ValueType
SR value types.
Definition: dsrtypes.h:421
DICOM Graphic Type: POLYLINE.
Definition: dsrtypes.h:474
DICOM Relationship Type: HAS CONCEPT MOD.
Definition: dsrtypes.h:408
static const size_t XF_addSchemaReference
write: add Schema reference to XML document
Definition: dsrtypes.h:295
static const OFString & currentDate(OFString &dateString)
get current date in DICOM 'DA' format.
DICOM Graphic Type: POLYLINE.
Definition: dsrtypes.h:496
DICOM IOD: Procedure Log.
Definition: dsrtypes.h:378
static E_CharacterSet definedTermToCharacterSet(const OFString &definedTerm)
convert DICOM defined term to character set
static const char * characterSetToXMLName(const E_CharacterSet characterSet)
convert character set to XML name.
DICOM Value Type: UIDREF.
Definition: dsrtypes.h:438
static const size_t XF_templateIdentifierAsAttribute
write: encode template identifier as attribute instead of element text
Definition: dsrtypes.h:289
DICOM IOD: Spectacle Prescription Report.
Definition: dsrtypes.h:382
internal type used to mark the last entry
Definition: dsrtypes.h:458
static void printUnknownValueWarningMessage(const char *valueName, const char *readValue=NULL, const char *action="Reading")
print a warning message that an unknown/unsupported value has been determined
DICOM enumerated value: SEPARATE.
Definition: dsrtypes.h:538
static const size_t HF_currentlyInsideAnnex
internal: content item is rendered fully inside the annex
Definition: dsrtypes.h:248
static const char * documentTypeToReadableName(const E_DocumentType documentType)
convert SR document type to readable name.
Base class for content items.
Definition: dsrdoctn.h:54
E_GraphicType
SR graphic types.
Definition: dsrtypes.h:463
internal type used to indicate an error
Definition: dsrtypes.h:578
static const char * continuityOfContentToEnumeratedValue(const E_ContinuityOfContent continuityOfContent)
convert continuity of content flag to DICOM enumerated value
E_DocumentType
SR document types.
Definition: dsrtypes.h:357
internal type used to indicate an error
Definition: dsrtypes.h:536
static const char * numberToString(const size_t number, char *stringValue)
convert unsigned integer number to character string
static const size_t PF_printSOPInstanceUID
print SOP instance UID of referenced objects
Definition: dsrtypes.h:321
static OFBool writeStringValueToXML(STD_NAMESPACE ostream &stream, const OFString &stringValue, const OFString &tagName, const OFBool writeEmptyValue=OFFalse)
write string value to XML output stream.
General purpose class hiding global functions, constants and types from the global namespace...
Definition: dsrtypes.h:150
simple wrapper around the "low-level" Logger object to make it easier to switch to a different system...
Definition: oflog.h:49
static DSRIODConstraintChecker * createIODConstraintChecker(const E_DocumentType documentType)
create specified SR IOD content relationship contraint checker object.
E_GraphicType3D
SR graphic types (3D).
Definition: dsrtypes.h:485
a simple string class that implements a subset of std::string.
Definition: ofstring.h:86
static void printContentItemErrorMessage(const char *action, const OFCondition &result, const DSRDocumentTreeNode *node, const char *location=NULL)
print an error message for the current content item.
static const size_t HF_renderConceptNameCodes
external: render concept name codes (default: code meaning only)
Definition: dsrtypes.h:203
static const size_t PF_printConceptNameCodes
print coding scheme designator/version and code value of concept names
Definition: dsrtypes.h:324
DICOM Temporal Range Type: BEGIN.
Definition: dsrtypes.h:524
static const size_t HF_useCodeDetailsTooltip
external: render code details as a tooltip (not with HTML 3.2)
Definition: dsrtypes.h:200
static DSRDocumentTreeNode * createDocumentTreeNode(const E_RelationshipType relationshipType, const E_ValueType valueType)
create specified document tree node.
internal type used to indicate an error or the absence of this flag
Definition: dsrtypes.h:550
static size_t stringToNumber(const char *stringValue)
convert string to unsigned integer number
ISO-IR 109: Latin alphabet No. 3.
Definition: dsrtypes.h:602
DICOM Value Type: SCOORD3D.
Definition: dsrtypes.h:444
DICOM Relationship Type: CONTAINS.
Definition: dsrtypes.h:402
DICOM IOD: Macular Grid Thickness and Volume Report.
Definition: dsrtypes.h:384
static const size_t HF_XHTML11Compatibility
external: output compatible to XHTML version 1.1 (default: HTML 4.01)
Definition: dsrtypes.h:233
Class for XML document cursors.
Definition: dsrxmlc.h:73
ISO-IR 148: Latin alphabet No. 5.
Definition: dsrtypes.h:614
internal type used to indicate an error
Definition: dsrtypes.h:466
E_PreliminaryFlag
SR document preliminary flag.
Definition: dsrtypes.h:547
static const size_t HF_createFootnoteReferences
internal: create footnote references
Definition: dsrtypes.h:251
static const size_t HF_renderFullData
external: render the full data of all content items
Definition: dsrtypes.h:221
DICOM enumerated value: COMPLETE.
Definition: dsrtypes.h:568
static const size_t XF_writeEmptyTags
write: write all tags even if their value is empty
Definition: dsrtypes.h:271
static E_RelationshipType definedTermToRelationshipType(const OFString &definedTerm)
convert DICOM defined term to relationship type
static const OFString & dicomToXMLPersonName(const OFString &dicomPersonName, OFString &xmlPersonName, const OFBool writeEmptyValue=OFFalse)
convert DICOM person name to XML format.
static const char * relationshipTypeToReadableName(const E_RelationshipType relationshipType)
convert relationship type to readable name.
static OFCondition appendStream(STD_NAMESPACE ostream &mainStream, OFOStringStream &tempStream, const char *heading=NULL)
append one output stream to another.
static E_TemporalRangeType enumeratedValueToTemporalRangeType(const OFString &enumeratedValue)
convert DICOM enumerated value to temporal range type
static const size_t HF_renderInlineCodes
external: render codes even if they appear inline
Definition: dsrtypes.h:197
static const size_t HF_neverExpandChildrenInline
external: never expand child nodes inline
Definition: dsrtypes.h:191
static OFBool writeStringFromElementToXML(STD_NAMESPACE ostream &stream, DcmElement &delem, const OFString &tagName, const OFBool writeEmptyValue=OFFalse)
write string value from DICOM element to XML output stream.
DICOM Temporal Range Type: MULTIPOINT.
Definition: dsrtypes.h:518
static const size_t XF_encodeEverythingAsAttribute
shortcut: combines all XF_xxxAsAttribute write flags (see above)
Definition: dsrtypes.h:304
ISO-IR 110: Latin alphabet No. 4.
Definition: dsrtypes.h:604
DICOM Value Type: CODE.
Definition: dsrtypes.h:428
static const size_t HF_convertNonASCIICharacters
internal: convert non-ASCII characters (> #127) to &#nnn;
Definition: dsrtypes.h:254
internal type used to indicate an error
Definition: dsrtypes.h:512
DICOM Value Type: TCOORD.
Definition: dsrtypes.h:446
General purpose class for condition codes.
Definition: ofcond.h:305
static const size_t HF_renderDcmtkFootnote
external: render dcmtk/dcmsr comment at the end of the document
Definition: dsrtypes.h:218
DICOM Value Type: DATETIME.
Definition: dsrtypes.h:432


Generated on Wed Jan 4 2017 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.6