00001 /* 00002 * 00003 * Copyright (C) 2000-2010, OFFIS e.V. 00004 * All rights reserved. See COPYRIGHT file for details. 00005 * 00006 * This software and supporting documentation were developed by 00007 * 00008 * OFFIS e.V. 00009 * R&D Division Health 00010 * Escherweg 2 00011 * D-26121 Oldenburg, Germany 00012 * 00013 * 00014 * Module: dcmsr 00015 * 00016 * Author: Joerg Riesmeier 00017 * 00018 * Purpose: 00019 * classes: DSRTypes 00020 * 00021 * Last Update: $Author: joergr $ 00022 * Update Date: $Date: 2010-11-05 11:06:53 $ 00023 * CVS/RCS Revision: $Revision: 1.68 $ 00024 * Status: $State: Exp $ 00025 * 00026 * CVS/RCS Log at end of file 00027 * 00028 */ 00029 00030 00031 #ifndef DSRTYPES_H 00032 #define DSRTYPES_H 00033 00034 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */ 00035 00036 #include "dcmtk/dcmdata/dctk.h" 00037 00038 #include "dcmtk/ofstd/ofstream.h" 00039 #include "dcmtk/ofstd/oftypes.h" 00040 #include "dcmtk/ofstd/ofcond.h" 00041 #include "dcmtk/oflog/oflog.h" 00042 00043 OFLogger DCM_dcmsrGetLogger(); 00044 00045 #define DCMSR_TRACE(msg) OFLOG_TRACE(DCM_dcmsrGetLogger(), msg) 00046 #define DCMSR_DEBUG(msg) OFLOG_DEBUG(DCM_dcmsrGetLogger(), msg) 00047 #define DCMSR_INFO(msg) OFLOG_INFO(DCM_dcmsrGetLogger(), msg) 00048 #define DCMSR_WARN(msg) OFLOG_WARN(DCM_dcmsrGetLogger(), msg) 00049 #define DCMSR_ERROR(msg) OFLOG_ERROR(DCM_dcmsrGetLogger(), msg) 00050 #define DCMSR_FATAL(msg) OFLOG_FATAL(DCM_dcmsrGetLogger(), msg) 00051 00052 00053 /*---------------------* 00054 * macro definitions * 00055 *---------------------*/ 00056 00057 // private coding scheme designator used for internal codes 00058 #define OFFIS_CODING_SCHEME_DESIGNATOR "99_OFFIS_DCMTK" 00059 // name of the private coding scheme 00060 #define OFFIS_CODING_SCHEME_NAME "OFFIS DCMTK Coding Scheme" 00061 // organization responsible for the private coding scheme 00062 #define OFFIS_RESPONSIBLE_ORGANIZATION "OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany" 00063 00064 // protocol, hostname and CGI script name used for HTML hyperlinks to composite objects 00065 #define HTML_HYPERLINK_PREFIX_FOR_CGI "http://localhost/dicom.cgi" 00066 // URL of the DICOM toolkit DCMTK 00067 #define DCMTK_INTERNET_URL "http://dicom.offis.de/dcmtk" 00068 00069 // XML namespace URI for dcmsr module 00070 #define DCMSR_XML_NAMESPACE_URI "http://dicom.offis.de/dcmsr" 00071 // XML Schema file for dcmsr module 00072 #define DCMSR_XML_XSD_FILE "dsr2xml.xsd" 00073 // XML Schema Instance URI 00074 #define XML_SCHEMA_INSTANCE_URI "http://www.w3.org/2001/XMLSchema-instance" 00075 00076 00077 /*------------------------* 00078 * forward declarations * 00079 *------------------------*/ 00080 00081 class DSRXMLCursor; 00082 class DSRXMLDocument; 00083 class DSRDocumentTreeNode; 00084 class DSRIODConstraintChecker; 00085 00086 00087 /*-----------------------* 00088 * contant definitions * 00089 *-----------------------*/ 00090 00096 00098 extern const OFCondition SR_EC_UnknownDocumentType; 00099 00101 extern const OFCondition SR_EC_InvalidDocument; 00102 00104 extern const OFCondition SR_EC_InvalidDocumentTree; 00105 00107 extern const OFCondition SR_EC_MandatoryAttributeMissing; 00108 00110 extern const OFCondition SR_EC_InvalidValue; 00111 00113 extern const OFCondition SR_EC_UnsupportedValue; 00114 00116 extern const OFCondition SR_EC_UnknownValueType; 00117 00119 extern const OFCondition SR_EC_UnknownRelationshipType; 00120 00122 extern const OFCondition SR_EC_InvalidByValueRelationship; 00123 00125 extern const OFCondition SR_EC_InvalidByReferenceRelationship; 00126 00128 extern const OFCondition SR_EC_SOPInstanceNotFound; 00129 00131 extern const OFCondition SR_EC_DifferentSOPClassesForAnInstance; 00132 00134 extern const OFCondition SR_EC_CodingSchemeNotFound; 00135 00137 extern const OFCondition SR_EC_CorruptedXMLStructure; 00139 00140 00141 /*---------------------* 00142 * class declaration * 00143 *---------------------*/ 00144 00150 class DSRTypes 00151 { 00152 00153 public: 00154 00155 // --- constant declarations --- 00156 00162 00164 static const size_t RF_readDigitalSignatures; 00165 00167 static const size_t RF_acceptUnknownRelationshipType; 00168 00170 static const size_t RF_ignoreRelationshipConstraints; 00171 00173 static const size_t RF_ignoreContentItemErrors; 00174 00176 static const size_t RF_skipInvalidContentItems; 00177 00179 static const size_t RF_showCurrentlyProcessedItem; 00181 00182 00189 00191 static const size_t HF_neverExpandChildrenInline; 00192 00194 static const size_t HF_alwaysExpandChildrenInline; 00195 00197 static const size_t HF_renderInlineCodes; 00198 00200 static const size_t HF_useCodeDetailsTooltip; 00201 00203 static const size_t HF_renderConceptNameCodes; 00204 00206 static const size_t HF_renderNumericUnitCodes; 00207 00209 static const size_t HF_useCodeMeaningAsUnit; 00210 00212 static const size_t HF_renderPatientTitle; 00213 00215 static const size_t HF_renderNoDocumentHeader; 00216 00218 static const size_t HF_renderDcmtkFootnote; 00219 00221 static const size_t HF_renderFullData; 00222 00224 static const size_t HF_renderSectionTitlesInline; 00225 00227 static const size_t HF_copyStyleSheetContent; 00228 00230 static const size_t HF_HTML32Compatibility; 00231 00233 static const size_t HF_XHTML11Compatibility; 00234 00236 static const size_t HF_addDocumentTypeReference; 00237 00239 static const size_t HF_omitGeneratorMetaElement; 00240 00242 static const size_t HF_renderItemsSeparately; 00243 00245 static const size_t HF_renderItemInline; 00246 00248 static const size_t HF_currentlyInsideAnnex; 00249 00251 static const size_t HF_createFootnoteReferences; 00252 00254 static const size_t HF_convertNonASCIICharacters; 00255 00257 static const size_t HF_renderAllCodes; 00258 00260 static const size_t HF_internalUseOnly; 00262 00263 00269 00271 static const size_t XF_writeEmptyTags; 00272 00274 static const size_t XF_writeTemplateIdentification; 00275 00277 static const size_t XF_alwaysWriteItemIdentifier; 00278 00280 static const size_t XF_codeComponentsAsAttribute; 00281 00283 static const size_t XF_relationshipTypeAsAttribute; 00284 00286 static const size_t XF_valueTypeAsAttribute; 00287 00289 static const size_t XF_templateIdentifierAsAttribute; 00290 00292 static const size_t XF_useDcmsrNamespace; 00293 00295 static const size_t XF_addSchemaReference; 00296 00298 static const size_t XF_validateSchema; 00299 00301 static const size_t XF_templateElementEnclosesItems; 00302 00304 static const size_t XF_encodeEverythingAsAttribute; 00306 00307 00313 00315 static const size_t PF_printItemPosition; 00316 00318 static const size_t PF_shortenLongItemValues; 00319 00321 static const size_t PF_printSOPInstanceUID; 00322 00324 static const size_t PF_printConceptNameCodes; 00325 00327 static const size_t PF_printNoDocumentHeader; 00328 00330 static const size_t PF_printTemplateIdentification; 00331 00333 static const size_t PF_printAllCodes; 00335 00336 00341 00343 static const size_t CM_updatePositionString; 00344 00346 static const size_t CM_updateNodeID; 00347 00349 static const size_t CM_resetReferenceTargetFlag; 00351 00352 00353 // --- type definitions --- 00354 00357 enum E_DocumentType 00358 { 00360 DT_invalid, 00362 DT_unknown = DT_invalid, 00364 DT_BasicTextSR, 00366 DT_EnhancedSR, 00368 DT_ComprehensiveSR, 00370 DT_KeyObjectSelectionDocument, 00372 DT_MammographyCadSR, 00374 DT_ChestCadSR, 00376 DT_ColonCadSR, 00378 DT_ProcedureLog, 00380 DT_XRayRadiationDoseSR, 00382 DT_SpectaclePrescriptionReport, 00384 DT_MacularGridThicknessAndVolumeReport, 00386 DT_ImplantationPlanSRDocument, 00388 DT_last = DT_ImplantationPlanSRDocument 00389 }; 00390 00393 enum E_RelationshipType 00394 { 00396 RT_invalid, 00398 RT_unknown, 00400 RT_isRoot, 00402 RT_contains, 00404 RT_hasObsContext, 00406 RT_hasAcqContext, 00408 RT_hasConceptMod, 00410 RT_hasProperties, 00412 RT_inferredFrom, 00414 RT_selectedFrom, 00416 RT_last = RT_selectedFrom 00417 }; 00418 00421 enum E_ValueType 00422 { 00424 VT_invalid, 00426 VT_Text, 00428 VT_Code, 00430 VT_Num, 00432 VT_DateTime, 00434 VT_Date, 00436 VT_Time, 00438 VT_UIDRef, 00440 VT_PName, 00442 VT_SCoord, 00444 VT_SCoord3D, 00446 VT_TCoord, 00448 VT_Composite, 00450 VT_Image, 00452 VT_Waveform, 00454 VT_Container, 00456 VT_byReference, 00458 VT_last = VT_byReference 00459 }; 00460 00463 enum E_GraphicType 00464 { 00466 GT_invalid, 00468 GT_unknown = GT_invalid, 00470 GT_Point, 00472 GT_Multipoint, 00474 GT_Polyline, 00476 GT_Circle, 00478 GT_Ellipse, 00480 GT_last = GT_Ellipse 00481 }; 00482 00485 enum E_GraphicType3D 00486 { 00488 GT3_invalid, 00490 GT3_unknown = GT3_invalid, 00492 GT3_Point, 00494 GT3_Multipoint, 00496 GT3_Polyline, 00498 GT3_Polygon, 00500 GT3_Ellipse, 00502 GT3_Ellipsoid, 00504 GT3_last = GT3_Ellipsoid 00505 }; 00506 00509 enum E_TemporalRangeType 00510 { 00512 TRT_invalid, 00514 TRT_unknown = TRT_invalid, 00516 TRT_Point, 00518 TRT_Multipoint, 00520 TRT_Segment, 00522 TRT_Multisegment, 00524 TRT_Begin, 00526 TRT_End, 00528 TRT_last = TRT_End 00529 }; 00530 00533 enum E_ContinuityOfContent 00534 { 00536 COC_invalid, 00538 COC_Separate, 00540 COC_Continuous, 00542 COC_last = COC_Continuous 00543 }; 00544 00547 enum E_PreliminaryFlag 00548 { 00550 PF_invalid, 00552 PF_Preliminary, 00554 PF_Final, 00556 PF_last = PF_Final 00557 }; 00558 00561 enum E_CompletionFlag 00562 { 00564 CF_invalid, 00566 CF_Partial, 00568 CF_Complete, 00570 CF_last = CF_Complete 00571 }; 00572 00575 enum E_VerificationFlag 00576 { 00578 VF_invalid, 00580 VF_Unverified, 00582 VF_Verified, 00584 VF_last = VF_Verified 00585 }; 00586 00589 enum E_CharacterSet 00590 { 00592 CS_invalid, 00594 CS_unknown = CS_invalid, 00596 CS_ASCII, 00598 CS_Latin1, 00600 CS_Latin2, 00602 CS_Latin3, 00604 CS_Latin4, 00606 CS_Cyrillic, 00608 CS_Arabic, 00610 CS_Greek, 00612 CS_Hebrew, 00614 CS_Latin5, 00616 CS_Japanese, 00618 CS_Thai, 00619 // UTF-8: Unicode in UTF-8 00620 CS_UTF8, 00622 CS_last = CS_UTF8 00623 }; 00624 00627 enum E_AddMode 00628 { 00630 AM_afterCurrent, 00632 AM_beforeCurrent, 00634 AM_belowCurrent 00635 }; 00636 00637 00638 // --- destructor --- 00639 00642 virtual ~DSRTypes(); 00643 00644 00645 // --- conversion functions --- 00646 00651 static const char *documentTypeToSOPClassUID(const E_DocumentType documentType); 00652 00657 static const char *documentTypeToModality(const E_DocumentType documentType); 00658 00664 static const char *documentTypeToReadableName(const E_DocumentType documentType); 00665 00672 static const char *documentTypeToDocumentTitle(const E_DocumentType documentType, 00673 OFString &documentTitle); 00674 00679 static OFBool requiresEnhancedEquipmentModule(const E_DocumentType documentType); 00680 00685 static const char *relationshipTypeToDefinedTerm(const E_RelationshipType relationshipType); 00686 00692 static const char *relationshipTypeToReadableName(const E_RelationshipType relationshipType); 00693 00698 static const char *valueTypeToDefinedTerm(const E_ValueType valueType); 00699 00704 static const char *valueTypeToXMLTagName(const E_ValueType valueType); 00705 00711 static const char *valueTypeToReadableName(const E_ValueType valueType); 00712 00717 static const char *graphicTypeToEnumeratedValue(const E_GraphicType graphicType); 00718 00724 static const char *graphicTypeToReadableName(const E_GraphicType graphicType); 00725 00730 static const char *graphicType3DToEnumeratedValue(const E_GraphicType3D graphicType); 00731 00737 static const char *graphicType3DToReadableName(const E_GraphicType3D graphicType); 00738 00743 static const char *temporalRangeTypeToEnumeratedValue(const E_TemporalRangeType temporalRangeType); 00744 00750 static const char *temporalRangeTypeToReadableName(const E_TemporalRangeType temporalRangeType); 00751 00756 static const char *continuityOfContentToEnumeratedValue(const E_ContinuityOfContent continuityOfContent); 00757 00762 static const char *preliminaryFlagToEnumeratedValue(const E_PreliminaryFlag preliminaryFlag); 00763 00768 static const char *completionFlagToEnumeratedValue(const E_CompletionFlag completionFlag); 00769 00774 static const char *verificationFlagToEnumeratedValue(const E_VerificationFlag verificationFlag); 00775 00780 static const char *characterSetToDefinedTerm(const E_CharacterSet characterSet); 00781 00787 static const char *characterSetToHTMLName(const E_CharacterSet characterSet); 00788 00794 static const char *characterSetToXMLName(const E_CharacterSet characterSet); 00795 00800 static E_DocumentType sopClassUIDToDocumentType(const OFString &sopClassUID); 00801 00806 static E_RelationshipType definedTermToRelationshipType(const OFString &definedTerm); 00807 00812 static E_ValueType definedTermToValueType(const OFString &definedTerm); 00813 00818 static E_ValueType xmlTagNameToValueType(const OFString &xmlTagName); 00819 00824 static E_GraphicType enumeratedValueToGraphicType(const OFString &enumeratedValue); 00825 00830 static E_GraphicType3D enumeratedValueToGraphicType3D(const OFString &enumeratedValue); 00831 00836 static E_TemporalRangeType enumeratedValueToTemporalRangeType(const OFString &enumeratedValue); 00837 00842 static E_ContinuityOfContent enumeratedValueToContinuityOfContent(const OFString &enumeratedValue); 00843 00848 static E_PreliminaryFlag enumeratedValueToPreliminaryFlag(const OFString &enumeratedValue); 00849 00854 static E_CompletionFlag enumeratedValueToCompletionFlag(const OFString &enumeratedValue); 00855 00860 static E_VerificationFlag enumeratedValueToVerificationFlag(const OFString &enumeratedValue); 00861 00866 static E_CharacterSet definedTermToCharacterSet(const OFString &definedTerm); 00867 00868 00869 // --- misc helper functions --- 00870 00877 static OFBool isDocumentTypeSupported(const E_DocumentType documentType); 00878 00884 static const OFString ¤tDate(OFString &dateString); 00885 00892 static const OFString ¤tTime(OFString &timeString); 00893 00902 static const OFString ¤tDateTime(OFString &dateTimeString); 00903 00910 static const OFString &dicomToReadableDate(const OFString &dicomDate, 00911 OFString &readableDate); 00912 00920 static const OFString &dicomToReadableTime(const OFString &dicomTime, 00921 OFString &readableTime); 00922 00930 static const OFString &dicomToReadableDateTime(const OFString &dicomDateTime, 00931 OFString &readableDateTime); 00932 00942 static const OFString &dicomToReadablePersonName(const OFString &dicomPersonName, 00943 OFString &readablePersonName); 00944 00956 static const OFString &dicomToXMLPersonName(const OFString &dicomPersonName, 00957 OFString &xmlPersonName, 00958 const OFBool writeEmptyValue = OFFalse); 00959 00965 static const char *numberToString(const size_t number, 00966 char *stringValue); 00967 00972 static size_t stringToNumber(const char *stringValue); 00973 00981 static const OFString &convertToPrintString(const OFString &sourceString, 00982 OFString &printString); 00983 00998 static const OFString &convertToHTMLString(const OFString &sourceString, 00999 OFString &markupString, 01000 const size_t flags = 0, 01001 const OFBool newlineAllowed = OFFalse); 01002 01010 static const OFString &convertToXMLString(const OFString &sourceString, 01011 OFString &markupString); 01012 01021 static OFBool checkForValidUIDFormat(const OFString &stringValue); 01022 01028 static DSRIODConstraintChecker *createIODConstraintChecker(const E_DocumentType documentType); 01029 01037 static DSRDocumentTreeNode *createDocumentTreeNode(const E_RelationshipType relationshipType, 01038 const E_ValueType valueType); 01039 01040 01041 // --- DICOM data structure access functions --- 01042 01056 static OFCondition addElementToDataset(OFCondition &result, 01057 DcmItem &dataset, 01058 DcmElement *delem, 01059 const OFString &vm, 01060 const OFString &type, 01061 const char *moduleName = NULL); 01062 01068 static void removeAttributeFromSequence(DcmSequenceOfItems &sequence, 01069 const DcmTagKey &tagKey); 01070 01078 static OFCondition getElementFromDataset(DcmItem &dataset, 01079 DcmElement &delem); 01080 01085 static const char *getStringValueFromElement(const DcmElement &delem); 01086 01092 static const OFString &getStringValueFromElement(const DcmElement &delem, 01093 OFString &stringValue); 01094 01100 static const OFString &getPrintStringFromElement(const DcmElement &delem, 01101 OFString &stringValue); 01102 01109 static const OFString &getMarkupStringFromElement(const DcmElement &delem, 01110 OFString &stringValue, 01111 const OFBool convertNonASCII = OFFalse); 01112 01121 static OFCondition getStringValueFromDataset(DcmItem &dataset, 01122 const DcmTagKey &tagKey, 01123 OFString &stringValue); 01124 01133 static OFCondition putStringValueToDataset(DcmItem &dataset, 01134 const DcmTag &tag, 01135 const OFString &stringValue, 01136 const OFBool allowEmpty = OFTrue); 01137 01149 static OFBool checkElementValue(DcmElement &delem, 01150 const OFString &vm, 01151 const OFString &type, 01152 const OFCondition &searchCond = EC_Normal, 01153 const char *moduleName = NULL); 01154 01167 static OFCondition getAndCheckElementFromDataset(DcmItem &dataset, 01168 DcmElement &delem, 01169 const OFString &vm, 01170 const OFString &type, 01171 const char *moduleName = NULL); 01172 01187 static OFCondition getAndCheckStringValueFromDataset(DcmItem &dataset, 01188 const DcmTagKey &tagKey, 01189 OFString &stringValue, 01190 const OFString &vm, 01191 const OFString &type, 01192 const char *moduleName = NULL); 01193 01194 // --- output functions --- 01195 01202 static void printInvalidContentItemMessage(const char *action, 01203 const DSRDocumentTreeNode *node, 01204 const char *location = NULL); 01205 01213 static void printContentItemErrorMessage(const char *action, 01214 const OFCondition &result, 01215 const DSRDocumentTreeNode *node, 01216 const char *location = NULL); 01217 01223 static void printUnknownValueWarningMessage(const char *valueName, 01224 const char *readValue = NULL, 01225 const char *action = "Reading"); 01226 01235 static OFBool writeStringValueToXML(STD_NAMESPACE ostream &stream, 01236 const OFString &stringValue, 01237 const OFString &tagName, 01238 const OFBool writeEmptyValue = OFFalse); 01239 01249 static OFBool writeStringFromElementToXML(STD_NAMESPACE ostream &stream, 01250 DcmElement &delem, 01251 const OFString &tagName, 01252 const OFBool writeEmptyValue = OFFalse); 01253 01265 static size_t createHTMLAnnexEntry(STD_NAMESPACE ostream &docStream, 01266 STD_NAMESPACE ostream &annexStream, 01267 const OFString &referenceText, 01268 size_t &annexNumber, 01269 const size_t flags = 0); 01270 01281 static size_t createHTMLFootnote(STD_NAMESPACE ostream &docStream, 01282 STD_NAMESPACE ostream &footnoteStream, 01283 size_t &footnoteNumber, 01284 const size_t nodeID, 01285 const size_t flags = 0); 01286 01294 static OFCondition appendStream(STD_NAMESPACE ostream &mainStream, 01295 OFOStringStream &tempStream, 01296 const char *heading = NULL); 01297 }; 01298 01299 01300 #endif 01301 01302 01303 /* 01304 * CVS/RCS Log: 01305 * $Log: dsrtypes.h,v $ 01306 * Revision 1.68 2010-11-05 11:06:53 joergr 01307 * Added support for new Implantation Plan SR Document Storage SOP Class. 01308 * 01309 * Revision 1.67 2010-11-05 09:30:27 joergr 01310 * Added support for checking the value multiplicity "9" (see Supplement 131). 01311 * 01312 * Revision 1.66 2010-10-21 09:06:48 joergr 01313 * Added virtual destructor in order to avoid warnings reported by gcc with 01314 * additional flags. 01315 * 01316 * Revision 1.65 2010-10-14 13:16:33 joergr 01317 * Updated copyright header. Added reference to COPYRIGHT file. 01318 * 01319 * Revision 1.64 2010-10-04 16:16:16 joergr 01320 * Fixed various Doxygen API documentation issues. 01321 * 01322 * Revision 1.63 2010-09-30 08:59:21 joergr 01323 * Added support for the Spectacle Prescription Report IOD. 01324 * Added support for the Macular Grid Thickness and Volume Report IOD. 01325 * Renamed class and enumeration related to the Key Object Selection Document. 01326 * 01327 * Revision 1.62 2010-09-29 15:16:45 joergr 01328 * Enhanced checking and reporting of standard violations in write() methods. 01329 * 01330 * Revision 1.61 2010-09-29 10:07:12 joergr 01331 * Added support for the recently introduced, optional PreliminaryFlag. 01332 * 01333 * Revision 1.60 2010-09-28 16:27:12 joergr 01334 * Added support for Enhanced General Equipment Module which is required for 01335 * both X-Ray Radiation Dose SR and Colon CAD SR. 01336 * 01337 * Revision 1.59 2010-09-28 14:08:14 joergr 01338 * Added support for Colon CAD SR which requires a new value type (SCOORD3D). 01339 * 01340 * Revision 1.58 2010-04-23 14:38:34 joergr 01341 * Enhanced checking of element values using the new DcmElement::checkValue() 01342 * method. 01343 * 01344 * Revision 1.57 2009-10-13 14:57:50 uli 01345 * Switched to logging mechanism provided by the "new" oflog module. 01346 * 01347 * Revision 1.56 2009-08-24 13:43:11 joergr 01348 * Fixed wrong/misleading comments. 01349 * 01350 * Revision 1.55 2009-07-27 15:32:29 joergr 01351 * Fixed possible memory leak in method addElementToDataset(). 01352 * 01353 * Revision 1.54 2008-12-11 15:48:55 joergr 01354 * Enhanced method checkElementValue(), e.g. added support for type 1C elements. 01355 * 01356 * Revision 1.53 2008-07-17 12:00:36 joergr 01357 * Removed getSequenceFromDataset() function. 01358 * 01359 * Revision 1.52 2008-06-27 10:49:51 joergr 01360 * Fixed condition that could lead to a wrong error message in method 01361 * checkElementValue(). 01362 * 01363 * Revision 1.51 2008-05-19 09:48:55 joergr 01364 * Added new flag that enables reading of SR documents with unknown/missing 01365 * relationship type(s). 01366 * Changed parameters of checkByReferenceRelationships() method. 01367 * 01368 * Revision 1.50 2007/11/15 16:32:48 joergr 01369 * Added support for output in XHTML 1.1 format. 01370 * Enhanced support for output in valid HTML 3.2 format. Migrated support for 01371 * standard HTML from version 4.0 to 4.01 (strict). 01372 * 01373 * Revision 1.49 2006/08/15 16:40:03 meichel 01374 * Updated the code in module dcmsr to correctly compile when 01375 * all standard C++ classes remain in namespace std. 01376 * 01377 * Revision 1.48 2006/07/25 13:21:29 joergr 01378 * Added new optional flags for the HTML rendering of SR documents: 01379 * HF_alwaysExpandChildrenInline, HF_useCodeDetailsTooltip and 01380 * HF_renderSectionTitlesInline. 01381 * 01382 * Revision 1.47 2006/05/11 09:18:21 joergr 01383 * Moved containsExtendedCharacters() from dcmsr to dcmdata module. 01384 * 01385 * Revision 1.46 2005/12/08 16:05:30 meichel 01386 * Changed include path schema for all DCMTK header files 01387 * 01388 * Revision 1.45 2005/11/30 12:00:24 joergr 01389 * Added support for X-Ray Radiation Dose SR documents. 01390 * 01391 * Revision 1.44 2004/11/29 17:11:01 joergr 01392 * Added warning message when character set is unknown, unsupported or cannot 01393 * be mapped to the output format. Fixed minor formatting issues. 01394 * 01395 * Revision 1.43 2004/11/22 16:35:38 meichel 01396 * Added helper methods to check strings and DICOM elements for presence of 01397 * extended (non-ASCII) characters 01398 * 01399 * Revision 1.42 2004/09/09 14:01:30 joergr 01400 * Added flags to control the way the template identification is encoded in 01401 * writeXML() and expected in readXML(). 01402 * 01403 * Revision 1.41 2004/01/20 15:35:54 joergr 01404 * Added new command line option which allows to write the item identifier "id" 01405 * (XML attribute) even if it is not required (because the item is not referenced 01406 * by any other item). Useful for debugging purposes. 01407 * 01408 * Revision 1.40 2004/01/05 14:36:02 joergr 01409 * Removed acknowledgements with e-mail addresses from CVS log. 01410 * 01411 * Revision 1.39 2003/12/01 15:46:18 joergr 01412 * Changed XML encoding of by-reference relationships if flag 01413 * XF_valueTypeAsAttribute is set. 01414 * 01415 * Revision 1.38 2003/10/30 17:51:00 joergr 01416 * Added new command line options which allow to print/write the template 01417 * identification of a content item. 01418 * 01419 * Revision 1.37 2003/10/09 12:53:12 joergr 01420 * Added support for Procedure Log. 01421 * 01422 * Revision 1.36 2003/10/06 09:52:58 joergr 01423 * Added new flag which allows to ignore content item errors when reading an SR 01424 * document (e.g. missing value type specific attributes). 01425 * 01426 * Revision 1.35 2003/09/15 14:18:54 joergr 01427 * Introduced new class to facilitate checking of SR IOD relationship content 01428 * constraints. Replaced old implementation distributed over numerous classes. 01429 * 01430 * Revision 1.34 2003/09/10 13:16:13 joergr 01431 * Replaced PrivateCodingSchemeUID by new CodingSchemeIdenticationSequence as 01432 * required by CP 324. 01433 * 01434 * Revision 1.33 2003/08/07 17:31:00 joergr 01435 * Removed libxml dependency from header files. Simplifies linking (MSVC). 01436 * 01437 * Revision 1.32 2003/08/07 13:05:26 joergr 01438 * Added readXML functionality. Added support for Chest CAD SR. 01439 * Added new option --add-schema-reference to command line tool dsr2xml. 01440 * Renamed parameters/variables "string" to avoid name clash with STL class. 01441 * 01442 * Revision 1.31 2003/04/17 18:57:38 joergr 01443 * Replace LF and CR by and in XML mode instead of ¶ (para). 01444 * 01445 * Revision 1.30 2003/04/01 14:59:13 joergr 01446 * Added support for XML namespaces. 01447 * 01448 * Revision 1.29 2002/08/02 12:38:32 joergr 01449 * Enhanced debug output of dcmsr::read() routines (e.g. add position string 01450 * of invalid content items to error messages). 01451 * 01452 * Revision 1.28 2002/07/22 14:21:20 joergr 01453 * Added new print flag to suppress the output of general document information. 01454 * 01455 * Revision 1.27 2002/05/14 08:14:51 joergr 01456 * Updated comments. 01457 * 01458 * Revision 1.26 2002/05/07 12:49:32 joergr 01459 * Added support for the Current Requested Procedure Evidence Sequence and the 01460 * Pertinent Other Evidence Sequence to the dcmsr module. 01461 * 01462 * Revision 1.25 2002/05/02 14:08:23 joergr 01463 * Added support for standard and non-standard string streams (which one is 01464 * supported is detected automatically via the configure mechanism). 01465 * 01466 * Revision 1.24 2002/04/16 13:50:52 joergr 01467 * Added configurable support for C++ ANSI standard includes (e.g. streams). 01468 * 01469 * Revision 1.23 2002/04/11 13:02:35 joergr 01470 * Corrected typo and/or enhanced documentation. 01471 * 01472 * Revision 1.22 2001/11/09 16:10:54 joergr 01473 * Added preliminary support for Mammography CAD SR. 01474 * 01475 * Revision 1.21 2001/10/10 15:28:04 joergr 01476 * Changed parameter DcmTagKey to DcmTag in DcmItem::putAndInsert... methods 01477 * to support elements which are not in the data dictionary (e.g. private 01478 * extensions). 01479 * 01480 * Revision 1.20 2001/10/02 12:05:46 joergr 01481 * Adapted module "dcmsr" to the new class OFCondition. Introduced module 01482 * specific error codes. 01483 * 01484 * Revision 1.19 2001/10/01 15:06:54 joergr 01485 * Introduced new general purpose functions to get/set person names, date, time 01486 * and date/time. 01487 * 01488 * Revision 1.18 2001/09/26 13:04:14 meichel 01489 * Adapted dcmsr to class OFCondition 01490 * 01491 * Revision 1.17 2001/06/20 15:03:00 joergr 01492 * Added minimal support for new SOP class Key Object Selection Document 01493 * (suppl. 59). 01494 * Added new debugging features (additional flags) to examine "corrupted" SR 01495 * documents. 01496 * 01497 * Revision 1.16 2001/04/03 08:24:00 joergr 01498 * Added new command line option: ignore relationship content constraints 01499 * specified for each SR document class. 01500 * 01501 * Revision 1.15 2001/02/13 16:36:05 joergr 01502 * Allow newline characters (encoded as ¶) in XML documents. 01503 * 01504 * Revision 1.14 2001/02/02 14:37:33 joergr 01505 * Added new option to dsr2xml allowing to specify whether value and/or 01506 * relationship type are to be encoded as XML attributes or elements. 01507 * 01508 * Revision 1.13 2001/01/25 11:47:43 joergr 01509 * Always remove signature sequences from certain dataset sequences (e.g. 01510 * VerifyingObserver or PredecessorDocuments). 01511 * 01512 * Revision 1.12 2001/01/18 15:52:11 joergr 01513 * Encode PN components in separate XML tags. 01514 * 01515 * Revision 1.11 2000/12/08 13:45:17 joergr 01516 * Removed optional fractional second part from time value. 01517 * 01518 * Revision 1.10 2000/11/09 20:32:08 joergr 01519 * Added support for non-ASCII characters in HTML 3.2 (use numeric value). 01520 * 01521 * Revision 1.9 2000/11/09 11:31:46 joergr 01522 * Reordered renderHTML flags (internal flags to the end). 01523 * 01524 * Revision 1.8 2000/11/07 18:14:05 joergr 01525 * Added new command line option allowing to choose code value or meaning to be 01526 * rendered as the numeric measurement unit. 01527 * Enhanced rendered HTML output of date, time, datetime and pname. 01528 * 01529 * Revision 1.7 2000/11/06 11:21:04 joergr 01530 * Changes structure of HTML hyperlinks to composite objects (now using pseudo 01531 * CGI script). 01532 * 01533 * Revision 1.6 2000/11/01 16:18:34 joergr 01534 * Added support for conversion to XML. 01535 * Added support for Cascading Style Sheet (CSS) used optionally for HTML 01536 * rendering. 01537 * Enhanced support for specific character sets. 01538 * 01539 * Revision 1.5 2000/10/26 14:22:09 joergr 01540 * Added support for "Comprehensive SR". 01541 * Added support for TCOORD content item. 01542 * Added new flag specifying whether to add a "dcmtk" footnote to the rendered 01543 * HTML document or not. 01544 * Added check routine for valid UID strings. 01545 * 01546 * Revision 1.4 2000/10/18 17:10:25 joergr 01547 * Added new method allowing to get and check string values from dataset. 01548 * 01549 * Revision 1.3 2000/10/16 16:31:09 joergr 01550 * Updated comments. 01551 * 01552 * Revision 1.2 2000/10/16 11:52:58 joergr 01553 * Added new options: number nested items instead of indenting them, print SOP 01554 * instance UID of referenced composite objects. 01555 * 01556 * Revision 1.1 2000/10/13 07:49:35 joergr 01557 * Added new module 'dcmsr' providing access to DICOM structured reporting 01558 * documents (supplement 23). Doc++ documentation not yet completed. 01559 * 01560 * 01561 */