New upstream version 3.6.7
authorAndreas Tille <tille@debian.org>
Mon, 2 May 2022 13:52:45 +0000 (15:52 +0200)
committerAndreas Tille <tille@debian.org>
Mon, 2 May 2022 13:52:45 +0000 (15:52 +0200)
977 files changed:
.gitignore [new file with mode: 0644]
ANNOUNCE [changed mode: 0644->0755]
CMake/3rdparty.cmake
CMake/DCMTKConfig.cmake.in
CMake/DCMTKConfig.old_cmake.in
CMake/FindCharset.cmake [deleted file]
CMake/FindLIBCHARSET.cmake [new file with mode: 0644]
CMake/FindOpenJPEG.cmake
CMake/FindSNDFILE.cmake [new file with mode: 0644]
CMake/FindSndfile.cmake [deleted file]
CMake/FindWRAP.cmake [new file with mode: 0644]
CMake/FindWrap.cmake [deleted file]
CMake/GenerateCMakeExports.cmake
CMake/GenerateDCMTKConfigure.cmake
CMake/dcmtk.pc.in [new file with mode: 0644]
CMake/dcmtkAfterModules.cmake
CMake/dcmtkMacros.cmake
CMake/dcmtkPrepare.cmake
CMake/dcmtkTestCharSignedness.cc [deleted file]
CMake/osconfig.h.in
CMakeLists.txt
COPYRIGHT
CREDITS
INSTALL
README
VERSION
config/aclocal.m4
config/configure
config/configure.in
config/docs/macros.txt
config/include/dcmtk/config/osconfig.h.in
config/math.cc
config/stdcxx.m4
config/tests/arith.cc
dcmdata/apps/CMakeLists.txt
dcmdata/apps/Makefile.dep
dcmdata/apps/Makefile.in
dcmdata/apps/dcm2json.cc
dcmdata/apps/dcm2pdf.cc
dcmdata/apps/dcm2xml.cc
dcmdata/apps/dcmconv.cc
dcmdata/apps/dcmcrle.cc
dcmdata/apps/dcmdrle.cc
dcmdata/apps/dcmdump.cc
dcmdata/apps/dcmftest.cc
dcmdata/apps/dump2dcm.cc
dcmdata/apps/img2dcm.cc
dcmdata/apps/mdfconen.cc
dcmdata/apps/mdfdsman.cc
dcmdata/apps/mdfdsman.h
dcmdata/apps/xml2dcm.cc
dcmdata/data/OP_template_latin_1.xml [new file with mode: 0644]
dcmdata/data/OP_template_utf_8.xml [new file with mode: 0644]
dcmdata/data/dicom.dic
dcmdata/docs/cda2dcm.man
dcmdata/docs/datadict.txt
dcmdata/docs/dcm2json.man
dcmdata/docs/dcm2pdf.man
dcmdata/docs/dcm2xml.man
dcmdata/docs/dcmconv.man
dcmdata/docs/dcmcrle.man
dcmdata/docs/dcmdrle.man
dcmdata/docs/dcmdump.man
dcmdata/docs/dcmftest.man
dcmdata/docs/dcmgpdir.man
dcmdata/docs/dcmodify.man
dcmdata/docs/dump2dcm.man
dcmdata/docs/img2dcm.man
dcmdata/docs/pdf2dcm.man
dcmdata/docs/stl2dcm.man
dcmdata/docs/xml2dcm.man
dcmdata/include/dcmtk/dcmdata/dcchrstr.h
dcmdata/include/dcmtk/dcmdata/dcddirif.h
dcmdata/include/dcmtk/dcmdata/dcdeftag.h
dcmdata/include/dcmtk/dcmdata/dcdicdir.h
dcmdata/include/dcmtk/dcmdata/dcdicent.h
dcmdata/include/dcmtk/dcmdata/dcdict.h
dcmdata/include/dcmtk/dcmdata/dcdirrec.h
dcmdata/include/dcmtk/dcmdata/dcelem.h
dcmdata/include/dcmtk/dcmdata/dcencdoc.h
dcmdata/include/dcmtk/dcmdata/dcerror.h
dcmdata/include/dcmtk/dcmdata/dcfcache.h
dcmdata/include/dcmtk/dcmdata/dchashdi.h
dcmdata/include/dcmtk/dcmdata/dcistrmf.h
dcmdata/include/dcmtk/dcmdata/dcistrms.h [new file with mode: 0644]
dcmdata/include/dcmtk/dcmdata/dcitem.h
dcmdata/include/dcmtk/dcmdata/dcjson.h
dcmdata/include/dcmtk/dcmdata/dclist.h
dcmdata/include/dcmtk/dcmdata/dcobject.h
dcmdata/include/dcmtk/dcmdata/dcostrmf.h
dcmdata/include/dcmtk/dcmdata/dcostrms.h [new file with mode: 0644]
dcmdata/include/dcmtk/dcmdata/dcpcache.h
dcmdata/include/dcmtk/dcmdata/dcpixel.h
dcmdata/include/dcmtk/dcmdata/dcrleenc.h
dcmdata/include/dcmtk/dcmdata/dcstack.h
dcmdata/include/dcmtk/dcmdata/dctagkey.h
dcmdata/include/dcmtk/dcmdata/dctypes.h
dcmdata/include/dcmtk/dcmdata/dcuid.h
dcmdata/include/dcmtk/dcmdata/dcvrae.h
dcmdata/include/dcmtk/dcmdata/dcvrcs.h
dcmdata/include/dcmtk/dcmdata/dcvrda.h
dcmdata/include/dcmtk/dcmdata/dcvrdt.h
dcmdata/include/dcmtk/dcmdata/dcvrlo.h
dcmdata/include/dcmtk/dcmdata/dcvrobow.h
dcmdata/include/dcmtk/dcmdata/dcvrod.h
dcmdata/include/dcmtk/dcmdata/dcvrof.h
dcmdata/include/dcmtk/dcmdata/dcvrol.h
dcmdata/include/dcmtk/dcmdata/dcvrov.h
dcmdata/include/dcmtk/dcmdata/dcvrpn.h
dcmdata/include/dcmtk/dcmdata/dcvrpobw.h
dcmdata/include/dcmtk/dcmdata/dcvrsh.h
dcmdata/include/dcmtk/dcmdata/dcvrtm.h
dcmdata/include/dcmtk/dcmdata/dcvrui.h
dcmdata/include/dcmtk/dcmdata/dcvrur.h
dcmdata/include/dcmtk/dcmdata/libi2d/i2d.h
dcmdata/include/dcmtk/dcmdata/libi2d/i2dbmps.h
dcmdata/include/dcmtk/dcmdata/libi2d/i2djpgs.h
dcmdata/include/dcmtk/dcmdata/libi2d/i2doutpl.h
dcmdata/include/dcmtk/dcmdata/libi2d/i2dplnsc.h
dcmdata/include/dcmtk/dcmdata/libi2d/i2dplop.h [new file with mode: 0644]
dcmdata/include/dcmtk/dcmdata/libi2d/i2dplsc.h
dcmdata/include/dcmtk/dcmdata/libi2d/i2dplvlp.h
dcmdata/include/dcmtk/dcmdata/xml2dcm.h [new file with mode: 0644]
dcmdata/libi2d/CMakeLists.txt
dcmdata/libi2d/Makefile.dep
dcmdata/libi2d/Makefile.in
dcmdata/libi2d/i2d.cc
dcmdata/libi2d/i2dbmps.cc
dcmdata/libi2d/i2djpgs.cc
dcmdata/libi2d/i2doutpl.cc [new file with mode: 0644]
dcmdata/libi2d/i2dplnsc.cc
dcmdata/libi2d/i2dplop.cc [new file with mode: 0644]
dcmdata/libi2d/i2dplsc.cc
dcmdata/libi2d/i2dplvlp.cc
dcmdata/libsrc/CMakeLists.txt
dcmdata/libsrc/Makefile.dep
dcmdata/libsrc/Makefile.in
dcmdata/libsrc/cmdlnarg.cc
dcmdata/libsrc/dcbytstr.cc
dcmdata/libsrc/dcchrstr.cc
dcmdata/libsrc/dcdatset.cc
dcmdata/libsrc/dcddirif.cc
dcmdata/libsrc/dcdicdir.cc
dcmdata/libsrc/dcdicent.cc
dcmdata/libsrc/dcdict.cc
dcmdata/libsrc/dcdictbi.cc
dcmdata/libsrc/dcdirrec.cc
dcmdata/libsrc/dcelem.cc
dcmdata/libsrc/dcencdoc.cc
dcmdata/libsrc/dcerror.cc
dcmdata/libsrc/dcfilefo.cc
dcmdata/libsrc/dchashdi.cc
dcmdata/libsrc/dcistrmf.cc
dcmdata/libsrc/dcistrms.cc [new file with mode: 0644]
dcmdata/libsrc/dcitem.cc
dcmdata/libsrc/dcjson.cc
dcmdata/libsrc/dcmetinf.cc
dcmdata/libsrc/dcobject.cc
dcmdata/libsrc/dcostrmf.cc
dcmdata/libsrc/dcostrms.cc [new file with mode: 0644]
dcmdata/libsrc/dcpath.cc
dcmdata/libsrc/dcpixseq.cc
dcmdata/libsrc/dcpxitem.cc
dcmdata/libsrc/dcrlecce.cc
dcmdata/libsrc/dcsequen.cc
dcmdata/libsrc/dcstack.cc
dcmdata/libsrc/dctag.cc
dcmdata/libsrc/dctagkey.cc
dcmdata/libsrc/dcuid.cc
dcmdata/libsrc/dcvr.cc
dcmdata/libsrc/dcvrat.cc
dcmdata/libsrc/dcvrcs.cc
dcmdata/libsrc/dcvrda.cc
dcmdata/libsrc/dcvrdt.cc
dcmdata/libsrc/dcvrfd.cc
dcmdata/libsrc/dcvrfl.cc
dcmdata/libsrc/dcvris.cc
dcmdata/libsrc/dcvrlo.cc
dcmdata/libsrc/dcvrobow.cc
dcmdata/libsrc/dcvrpn.cc
dcmdata/libsrc/dcvrsh.cc
dcmdata/libsrc/dcvrsl.cc
dcmdata/libsrc/dcvrss.cc
dcmdata/libsrc/dcvrsv.cc
dcmdata/libsrc/dcvrtm.cc
dcmdata/libsrc/dcvruc.cc
dcmdata/libsrc/dcvrui.cc
dcmdata/libsrc/dcvrul.cc
dcmdata/libsrc/dcvrulup.cc
dcmdata/libsrc/dcvrus.cc
dcmdata/libsrc/dcvruv.cc
dcmdata/libsrc/dcxfer.cc
dcmdata/libsrc/mkdictbi.cc
dcmdata/libsrc/vrscan.cc
dcmdata/libsrc/vrscanl.c
dcmdata/libsrc/xml2dcm.cc [new file with mode: 0644]
dcmdata/tests/CMakeLists.txt
dcmdata/tests/Makefile.dep
dcmdata/tests/Makefile.in
dcmdata/tests/dctmacro.h
dcmdata/tests/tests.cc
dcmdata/tests/titem.cc [new file with mode: 0644]
dcmdata/tests/tpread.cc
dcmdata/tests/tsequen.cc
dcmect/libsrc/CMakeLists.txt
dcmect/libsrc/Makefile.dep
dcmect/libsrc/enhanced_ct.cc
dcmect/tests/CMakeLists.txt
dcmect/tests/Makefile.dep
dcmect/tests/t_huge_concat.cc
dcmect/tests/t_roundtrip.cc
dcmfg/include/dcmtk/dcmfg/concatenationcreator.h
dcmfg/include/dcmtk/dcmfg/fgctexposure.h
dcmfg/libsrc/CMakeLists.txt
dcmfg/libsrc/Makefile.dep
dcmfg/libsrc/concatenationcreator.cc
dcmfg/libsrc/concatenationloader.cc
dcmfg/libsrc/fgbase.cc
dcmfg/libsrc/fgctacquisitiontype.cc
dcmfg/libsrc/fgctadditionalxraysource.cc
dcmfg/libsrc/fgctexposure.cc
dcmfg/libsrc/fgctposition.cc
dcmfg/libsrc/fgcttabledynamics.cc
dcmfg/libsrc/fgctxraydetails.cc
dcmfg/libsrc/fgfact.cc
dcmfg/libsrc/fginterface.cc
dcmfg/libsrc/stackinterface.cc
dcmfg/tests/CMakeLists.txt
dcmfg/tests/Makefile.dep
dcmfg/tests/t_concatenation_loader.cc
dcmimage/apps/CMakeLists.txt
dcmimage/apps/Makefile.dep
dcmimage/apps/dcm2pnm.cc
dcmimage/apps/dcmquant.cc
dcmimage/apps/dcmscale.cc
dcmimage/docs/dcm2pnm.man
dcmimage/docs/dcmicmp.man
dcmimage/docs/dcmquant.man
dcmimage/docs/dcmscale.man
dcmimage/include/dcmtk/dcmimage/dcmicmph.h
dcmimage/include/dcmtk/dcmimage/dicoopx.h
dcmimage/include/dcmtk/dcmimage/dihsvpxt.h
dcmimage/include/dcmtk/dcmimage/diqthash.h
dcmimage/include/dcmtk/dcmimage/diqtpbox.h
dcmimage/include/dcmtk/dcmimage/diqtstab.h
dcmimage/include/dcmtk/dcmimage/diquant.h
dcmimage/include/dcmtk/dcmimage/diybrpxt.h
dcmimage/include/dcmtk/dcmimage/diyf2pxt.h
dcmimage/include/dcmtk/dcmimage/diyp2pxt.h
dcmimage/libsrc/CMakeLists.txt
dcmimage/libsrc/Makefile.dep
dcmimage/libsrc/dcmicmph.cc
dcmimage/libsrc/dicoimg.cc
dcmimage/libsrc/dipipng.cc
dcmimage/libsrc/diqtctab.cc
dcmimage/libsrc/diqtfs.cc
dcmimage/libsrc/diqtpbox.cc
dcmimgle/apps/CMakeLists.txt
dcmimgle/apps/Makefile.dep
dcmimgle/apps/dcod2lum.cc
dcmimgle/apps/dconvlum.cc
dcmimgle/docs/dcmdspfn.man
dcmimgle/docs/dcod2lum.man
dcmimgle/docs/dconvlum.man
dcmimgle/include/dcmtk/dcmimgle/dicrvfit.h
dcmimgle/include/dcmtk/dcmimgle/didocu.h
dcmimgle/include/dcmtk/dcmimgle/digsdfn.h
dcmimgle/include/dcmtk/dcmimgle/diimage.h
dcmimgle/include/dcmtk/dcmimgle/diinpxt.h
dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h
dcmimgle/include/dcmtk/dcmimgle/dimoopxt.h
dcmimgle/include/dcmtk/dcmimgle/diovpln.h
dcmimgle/include/dcmtk/dcmimgle/diplugin.h
dcmimgle/include/dcmtk/dcmimgle/displint.h
dcmimgle/libsrc/CMakeLists.txt
dcmimgle/libsrc/Makefile.dep
dcmimgle/libsrc/dcmimage.cc
dcmimgle/libsrc/diciefn.cc
dcmimgle/libsrc/dicielut.cc
dcmimgle/libsrc/didislut.cc
dcmimgle/libsrc/didispfn.cc
dcmimgle/libsrc/didocu.cc
dcmimgle/libsrc/digsdfn.cc
dcmimgle/libsrc/digsdlut.cc
dcmimgle/libsrc/diimage.cc
dcmimgle/libsrc/diluptab.cc
dcmimgle/libsrc/dimoimg.cc
dcmimgle/libsrc/diovlay.cc
dcmimgle/libsrc/diovpln.cc
dcmimgle/libsrc/diutils.cc
dcmiod/include/dcmtk/dcmiod/cielabutil.h
dcmiod/include/dcmtk/dcmiod/iodimage.h
dcmiod/include/dcmtk/dcmiod/iodrules.h
dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h
dcmiod/include/dcmtk/dcmiod/modsopcommon.h
dcmiod/libsrc/CMakeLists.txt
dcmiod/libsrc/Makefile.dep
dcmiod/libsrc/cielabutil.cc
dcmiod/libsrc/iodmacro.cc
dcmiod/libsrc/iodutil.cc
dcmiod/libsrc/modmultiframedimension.cc
dcmiod/tests/CMakeLists.txt
dcmiod/tests/Makefile.dep
dcmjpeg/apps/CMakeLists.txt
dcmjpeg/apps/Makefile.dep
dcmjpeg/apps/dcmcjpeg.cc
dcmjpeg/apps/dcmdjpeg.cc
dcmjpeg/docs/dcmcjpeg.man
dcmjpeg/docs/dcmdjpeg.man
dcmjpeg/docs/dcmj2pnm.man
dcmjpeg/docs/dcmmkdir.man
dcmjpeg/include/dcmtk/dcmjpeg/djcodece.h
dcmjpeg/include/dcmtk/dcmjpeg/djcparam.h
dcmjpeg/include/dcmtk/dcmjpeg/djencbas.h
dcmjpeg/include/dcmtk/dcmjpeg/djencext.h
dcmjpeg/include/dcmtk/dcmjpeg/djenclol.h
dcmjpeg/include/dcmtk/dcmjpeg/djencpro.h
dcmjpeg/include/dcmtk/dcmjpeg/djencsps.h
dcmjpeg/include/dcmtk/dcmjpeg/djencsv1.h
dcmjpeg/libijg12/CMakeLists.txt
dcmjpeg/libijg12/Makefile.dep
dcmjpeg/libijg12/jccoefct.c
dcmjpeg/libijg12/jccolor.c
dcmjpeg/libijg12/jcdctmgr.c
dcmjpeg/libijg12/jcdiffct.c
dcmjpeg/libijg12/jclhuff.c
dcmjpeg/libijg12/jcmarker.c
dcmjpeg/libijg12/jcphuff.c
dcmjpeg/libijg12/jcpred.c
dcmjpeg/libijg12/jcsample.c
dcmjpeg/libijg12/jcscale.c
dcmjpeg/libijg12/jcshuff.c
dcmjpeg/libijg12/jctrans.c
dcmjpeg/libijg12/jdatasrc.c
dcmjpeg/libijg12/jdcoefct.c
dcmjpeg/libijg12/jdcolor.c
dcmjpeg/libijg12/jddiffct.c
dcmjpeg/libijg12/jdhuff.c
dcmjpeg/libijg12/jdmarker.c
dcmjpeg/libijg12/jdmerge.c
dcmjpeg/libijg12/jdpostct.c
dcmjpeg/libijg12/jdpred.c
dcmjpeg/libijg12/jdsample.c
dcmjpeg/libijg12/jdscale.c
dcmjpeg/libijg12/jerror12.h
dcmjpeg/libijg12/jmemmgr.c
dcmjpeg/libijg12/jmemnobs.c
dcmjpeg/libijg12/jpeglib12.h
dcmjpeg/libijg12/jquant1.c
dcmjpeg/libijg12/jquant2.c
dcmjpeg/libijg16/CMakeLists.txt
dcmjpeg/libijg16/Makefile.dep
dcmjpeg/libijg16/jccoefct.c
dcmjpeg/libijg16/jccolor.c
dcmjpeg/libijg16/jcdctmgr.c
dcmjpeg/libijg16/jcdiffct.c
dcmjpeg/libijg16/jclhuff.c
dcmjpeg/libijg16/jcmarker.c
dcmjpeg/libijg16/jcphuff.c
dcmjpeg/libijg16/jcpred.c
dcmjpeg/libijg16/jcsample.c
dcmjpeg/libijg16/jcscale.c
dcmjpeg/libijg16/jcshuff.c
dcmjpeg/libijg16/jctrans.c
dcmjpeg/libijg16/jdatasrc.c
dcmjpeg/libijg16/jdcoefct.c
dcmjpeg/libijg16/jdcolor.c
dcmjpeg/libijg16/jddiffct.c
dcmjpeg/libijg16/jdhuff.c
dcmjpeg/libijg16/jdmarker.c
dcmjpeg/libijg16/jdmerge.c
dcmjpeg/libijg16/jdpostct.c
dcmjpeg/libijg16/jdpred.c
dcmjpeg/libijg16/jdsample.c
dcmjpeg/libijg16/jdscale.c
dcmjpeg/libijg16/jerror16.h
dcmjpeg/libijg16/jmemmgr.c
dcmjpeg/libijg16/jmemnobs.c
dcmjpeg/libijg16/jpeglib16.h
dcmjpeg/libijg16/jquant1.c
dcmjpeg/libijg16/jquant2.c
dcmjpeg/libijg8/CMakeLists.txt
dcmjpeg/libijg8/Makefile.dep
dcmjpeg/libijg8/jccoefct.c
dcmjpeg/libijg8/jccolor.c
dcmjpeg/libijg8/jcdctmgr.c
dcmjpeg/libijg8/jcdiffct.c
dcmjpeg/libijg8/jclhuff.c
dcmjpeg/libijg8/jcmarker.c
dcmjpeg/libijg8/jcphuff.c
dcmjpeg/libijg8/jcpred.c
dcmjpeg/libijg8/jcsample.c
dcmjpeg/libijg8/jcscale.c
dcmjpeg/libijg8/jcshuff.c
dcmjpeg/libijg8/jctrans.c
dcmjpeg/libijg8/jdatasrc.c
dcmjpeg/libijg8/jdcoefct.c
dcmjpeg/libijg8/jdcolor.c
dcmjpeg/libijg8/jddiffct.c
dcmjpeg/libijg8/jdhuff.c
dcmjpeg/libijg8/jdmarker.c
dcmjpeg/libijg8/jdmerge.c
dcmjpeg/libijg8/jdpostct.c
dcmjpeg/libijg8/jdpred.c
dcmjpeg/libijg8/jdsample.c
dcmjpeg/libijg8/jdscale.c
dcmjpeg/libijg8/jerror8.h
dcmjpeg/libijg8/jmemmgr.c
dcmjpeg/libijg8/jmemnobs.c
dcmjpeg/libijg8/jpeglib8.h
dcmjpeg/libijg8/jquant1.c
dcmjpeg/libijg8/jquant2.c
dcmjpeg/libsrc/CMakeLists.txt
dcmjpeg/libsrc/Makefile.dep
dcmjpeg/libsrc/dipijpeg.cc
dcmjpeg/libsrc/djcodece.cc
dcmjpeg/libsrc/djdijg12.cc
dcmjpeg/libsrc/djdijg16.cc
dcmjpeg/libsrc/djdijg8.cc
dcmjpeg/libsrc/djeijg12.cc
dcmjpeg/libsrc/djeijg16.cc
dcmjpeg/libsrc/djeijg8.cc
dcmjpeg/libsrc/djutils.cc
dcmjpls/apps/CMakeLists.txt
dcmjpls/apps/Makefile.dep
dcmjpls/apps/dcmcjpls.cc
dcmjpls/apps/dcmdjpls.cc
dcmjpls/docs/dcmcjpls.man
dcmjpls/docs/dcmdjpls.man
dcmjpls/docs/dcml2pnm.man
dcmjpls/libcharls/CMakeLists.txt
dcmjpls/libcharls/Makefile.dep
dcmjpls/libcharls/config.h
dcmjpls/libcharls/encodstr.h
dcmjpls/libcharls/lokuptbl.h
dcmjpls/libcharls/scan.h
dcmjpls/libcharls/streams.h
dcmjpls/libcharls/util.h
dcmjpls/libsrc/CMakeLists.txt
dcmjpls/libsrc/djcodecd.cc
dcmjpls/libsrc/djcodece.cc
dcmnet/apps/CMakeLists.txt
dcmnet/apps/Makefile.dep
dcmnet/apps/echoscu.cc
dcmnet/apps/findscu.cc
dcmnet/apps/getscu.cc
dcmnet/apps/movescu.cc
dcmnet/apps/storescp.cc
dcmnet/apps/storescu.cc
dcmnet/apps/termscu.cc
dcmnet/docs/cptscp.dox
dcmnet/docs/dcmrecv.man
dcmnet/docs/dcmsend.man
dcmnet/docs/echoscu.man
dcmnet/docs/findscu.man
dcmnet/docs/getscu.man
dcmnet/docs/movescu.man
dcmnet/docs/storescp.man
dcmnet/docs/storescu.man
dcmnet/docs/termscu.man
dcmnet/etc/storescp.cfg
dcmnet/etc/storescu.cfg
dcmnet/include/dcmtk/dcmnet/assoc.h
dcmnet/include/dcmtk/dcmnet/cond.h
dcmnet/include/dcmtk/dcmnet/dcasccff.h
dcmnet/include/dcmtk/dcmnet/dcasccfg.h
dcmnet/include/dcmtk/dcmnet/dccfenmp.h
dcmnet/include/dcmtk/dcmnet/dcmlayer.h
dcmnet/include/dcmtk/dcmnet/dcmtrans.h
dcmnet/include/dcmtk/dcmnet/dcompat.h
dcmnet/include/dcmtk/dcmnet/dfindscu.h
dcmnet/include/dcmtk/dcmnet/dicom.h
dcmnet/include/dcmtk/dcmnet/dul.h
dcmnet/include/dcmtk/dcmnet/dulstruc.h [new file with mode: 0644]
dcmnet/include/dcmtk/dcmnet/helpers.h [new file with mode: 0644]
dcmnet/include/dcmtk/dcmnet/scp.h
dcmnet/libsrc/CMakeLists.txt
dcmnet/libsrc/Makefile.dep
dcmnet/libsrc/Makefile.in
dcmnet/libsrc/assoc.cc
dcmnet/libsrc/cond.cc
dcmnet/libsrc/dcasccff.cc
dcmnet/libsrc/dccfenmp.cc
dcmnet/libsrc/dccfrsmp.cc
dcmnet/libsrc/dccfuidh.cc
dcmnet/libsrc/dcmtrans.cc
dcmnet/libsrc/dcompat.cc
dcmnet/libsrc/dcuserid.cc
dcmnet/libsrc/dfindscu.cc
dcmnet/libsrc/dimcancl.cc
dcmnet/libsrc/dimcmd.cc
dcmnet/libsrc/dimdump.cc
dcmnet/libsrc/dimecho.cc
dcmnet/libsrc/dimfind.cc
dcmnet/libsrc/dimget.cc
dcmnet/libsrc/dimmove.cc
dcmnet/libsrc/dimse.cc
dcmnet/libsrc/dimstore.cc
dcmnet/libsrc/diutil.cc
dcmnet/libsrc/dstorscp.cc
dcmnet/libsrc/dstorscu.cc
dcmnet/libsrc/dul.cc
dcmnet/libsrc/dulconst.cc
dcmnet/libsrc/dulextra.cc
dcmnet/libsrc/dulfsm.cc
dcmnet/libsrc/dulparse.cc
dcmnet/libsrc/dulpres.cc
dcmnet/libsrc/dulstruc.h [deleted file]
dcmnet/libsrc/helpers.cc [new file with mode: 0644]
dcmnet/libsrc/scp.cc
dcmnet/libsrc/scu.cc
dcmnet/tests/CMakeLists.txt
dcmnet/tests/Makefile.dep
dcmnet/tests/tdimse.cc
dcmnet/tests/tscuscp.cc
dcmnet/tests/tscusession.cc
dcmpmap/libsrc/CMakeLists.txt
dcmpmap/libsrc/Makefile.dep
dcmpmap/libsrc/dpmparametricmapbase.cc
dcmpmap/libsrc/dpmparametricmapiod.cc
dcmpstat/apps/CMakeLists.txt
dcmpstat/apps/Makefile.dep
dcmpstat/apps/dcmmklut.cc
dcmpstat/apps/dcmprscp.cc
dcmpstat/apps/dcmprscu.cc
dcmpstat/apps/dcmpschk.cc
dcmpstat/apps/dcmpsmk.cc
dcmpstat/apps/dcmpsprt.cc
dcmpstat/apps/dcmpsrcv.cc
dcmpstat/apps/dcmpssnd.cc
dcmpstat/docs/dcmmkcrv.man
dcmpstat/docs/dcmmklut.man
dcmpstat/docs/dcmp2pgm.man
dcmpstat/docs/dcmprscp.man
dcmpstat/docs/dcmprscu.man
dcmpstat/docs/dcmpschk.man
dcmpstat/docs/dcmpsmk.man
dcmpstat/docs/dcmpsprt.man
dcmpstat/docs/dcmpsrcv.man
dcmpstat/docs/dcmpssnd.man
dcmpstat/include/dcmtk/dcmpstat/dviface.h
dcmpstat/include/dcmtk/dcmpstat/dvpsfs.h
dcmpstat/include/dcmtk/dcmpstat/dvpsga.h
dcmpstat/include/dcmtk/dcmpstat/dvpsgr.h
dcmpstat/include/dcmtk/dcmpstat/dvpsgrl.h
dcmpstat/include/dcmtk/dcmpstat/dvpsibl.h
dcmpstat/include/dcmtk/dcmpstat/dvpsmsg.h
dcmpstat/include/dcmtk/dcmpstat/dvpsovl.h
dcmpstat/include/dcmtk/dcmpstat/dvpspr.h
dcmpstat/include/dcmtk/dcmpstat/dvpsrs.h
dcmpstat/include/dcmtk/dcmpstat/dvpssp.h
dcmpstat/include/dcmtk/dcmpstat/dvpstxl.h
dcmpstat/include/dcmtk/dcmpstat/dvpstyp.h
dcmpstat/include/dcmtk/dcmpstat/dvpsvl.h
dcmpstat/include/dcmtk/dcmpstat/dvsighdl.h
dcmpstat/libsrc/CMakeLists.txt
dcmpstat/libsrc/Makefile.dep
dcmpstat/libsrc/dcmpstat.cc
dcmpstat/libsrc/dviface.cc
dcmpstat/libsrc/dvpscf.cc
dcmpstat/libsrc/dvpsda.cc
dcmpstat/libsrc/dvpsfs.cc
dcmpstat/libsrc/dvpsgl.cc
dcmpstat/libsrc/dvpshlp.cc
dcmpstat/libsrc/dvpsmsg.cc
dcmpstat/libsrc/dvpspll.cc
dcmpstat/libsrc/dvpsprt.cc
dcmpstat/libsrc/dvpsri.cc
dcmpstat/libsrc/dvpssp.cc
dcmpstat/libsrc/dvpsspl.cc
dcmpstat/libsrc/dvpssvl.cc
dcmpstat/libsrc/dvpstat.cc
dcmpstat/libsrc/dvpstx.cc
dcmpstat/libsrc/dvpsvw.cc
dcmpstat/libsrc/dvsighdl.cc
dcmpstat/tests/CMakeLists.txt
dcmpstat/tests/Makefile.dep
dcmpstat/tests/msgserv.cc
dcmqrdb/apps/CMakeLists.txt
dcmqrdb/apps/Makefile.dep
dcmqrdb/apps/dcmqridx.cc
dcmqrdb/apps/dcmqrscp.cc
dcmqrdb/apps/dcmqrti.cc
dcmqrdb/docs/dcmqridx.man
dcmqrdb/docs/dcmqrscp.man
dcmqrdb/docs/dcmqrti.man
dcmqrdb/etc/dcmqrprf.cfg
dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbs.h
dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcnf.h
dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h
dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h
dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h
dcmqrdb/include/dcmtk/dcmqrdb/dcmqrptb.h
dcmqrdb/libsrc/CMakeLists.txt
dcmqrdb/libsrc/Makefile.dep
dcmqrdb/libsrc/dcmqrcbf.cc
dcmqrdb/libsrc/dcmqrcbg.cc
dcmqrdb/libsrc/dcmqrcbm.cc
dcmqrdb/libsrc/dcmqrcnf.cc
dcmqrdb/libsrc/dcmqrdbi.cc
dcmqrdb/libsrc/dcmqrdbs.cc
dcmqrdb/libsrc/dcmqropt.cc
dcmqrdb/libsrc/dcmqrptb.cc
dcmqrdb/libsrc/dcmqrsrv.cc
dcmqrdb/libsrc/dcmqrtis.cc
dcmrt/apps/CMakeLists.txt
dcmrt/apps/drtdump.cc
dcmrt/docs/drtdump.man
dcmrt/include/dcmtk/dcmrt/drmdose.h
dcmrt/include/dcmtk/dcmrt/drmimage.h
dcmrt/include/dcmtk/dcmrt/drmplan.h
dcmrt/include/dcmtk/dcmrt/drmstrct.h
dcmrt/include/dcmtk/dcmrt/drtimage.h
dcmrt/libsrc/CMakeLists.txt
dcmrt/libsrc/drmdose.cc
dcmrt/libsrc/drtajcs.cc
dcmrt/libsrc/drtcs.cc
dcmrt/libsrc/drtionpl.cc
dcmrt/libsrc/drtplan.cc
dcmrt/libsrc/drttypes.cc
dcmrt/tests/CMakeLists.txt
dcmrt/tests/Makefile.dep
dcmrt/tests/Makefile.in
dcmrt/tests/tcontour.cc [new file with mode: 0644]
dcmrt/tests/tests.cc
dcmseg/include/dcmtk/dcmseg/segdoc.h
dcmseg/include/dcmtk/dcmseg/segment.h
dcmseg/include/dcmtk/dcmseg/segtypes.h
dcmseg/libsrc/CMakeLists.txt
dcmseg/libsrc/Makefile.dep
dcmseg/libsrc/segdoc.cc
dcmseg/libsrc/segment.cc
dcmseg/libsrc/segtypes.cc
dcmseg/libsrc/segutils.cc
dcmseg/tests/CMakeLists.txt
dcmseg/tests/Makefile.dep
dcmseg/tests/Makefile.in
dcmseg/tests/tbigdim.cc [new file with mode: 0644]
dcmseg/tests/tests.cc
dcmseg/tests/troundtrip.cc
dcmsign/apps/CMakeLists.txt
dcmsign/apps/Makefile.dep
dcmsign/apps/dcmsign.cc
dcmsign/docs/dcmsign.man
dcmsign/include/dcmtk/dcmsign/dcsignat.h
dcmsign/include/dcmtk/dcmsign/sicert.h
dcmsign/include/dcmtk/dcmsign/sicertvf.h
dcmsign/include/dcmtk/dcmsign/sidsa.h [deleted file]
dcmsign/include/dcmtk/dcmsign/siecdsa.h [deleted file]
dcmsign/include/dcmtk/dcmsign/simaccon.h
dcmsign/include/dcmtk/dcmsign/simd5.h [deleted file]
dcmsign/include/dcmtk/dcmsign/simdmac.h [new file with mode: 0644]
dcmsign/include/dcmtk/dcmsign/sipkey.h [new file with mode: 0644]
dcmsign/include/dcmtk/dcmsign/siripemd.h [deleted file]
dcmsign/include/dcmtk/dcmsign/sirsa.h [deleted file]
dcmsign/include/dcmtk/dcmsign/sisha1.h [deleted file]
dcmsign/include/dcmtk/dcmsign/sisha256.h [deleted file]
dcmsign/include/dcmtk/dcmsign/sisha384.h [deleted file]
dcmsign/include/dcmtk/dcmsign/sisha512.h [deleted file]
dcmsign/include/dcmtk/dcmsign/sisprof.h
dcmsign/libsrc/CMakeLists.txt
dcmsign/libsrc/Makefile.dep
dcmsign/libsrc/Makefile.in
dcmsign/libsrc/dcsighlp.cc
dcmsign/libsrc/dcsignat.cc
dcmsign/libsrc/sicert.cc
dcmsign/libsrc/sidsa.cc [deleted file]
dcmsign/libsrc/siecdsa.cc [deleted file]
dcmsign/libsrc/simd5.cc [deleted file]
dcmsign/libsrc/simdmac.cc [new file with mode: 0644]
dcmsign/libsrc/sipkey.cc [new file with mode: 0644]
dcmsign/libsrc/siprivat.cc
dcmsign/libsrc/siripemd.cc [deleted file]
dcmsign/libsrc/sirsa.cc [deleted file]
dcmsign/libsrc/sisha1.cc [deleted file]
dcmsign/libsrc/sisha256.cc [deleted file]
dcmsign/libsrc/sisha384.cc [deleted file]
dcmsign/libsrc/sisha512.cc [deleted file]
dcmsign/libsrc/sitstamp.cc
dcmsr/apps/CMakeLists.txt
dcmsr/apps/Makefile.dep
dcmsr/data/dsr2xml.xsd
dcmsr/docs/dsr2html.man
dcmsr/docs/dsr2xml.man
dcmsr/docs/dsrdump.man
dcmsr/docs/xml2dsr.man
dcmsr/include/dcmtk/dcmsr/cmr/cid100.h
dcmsr/include/dcmtk/dcmsr/cmr/cid10013.h
dcmsr/include/dcmtk/dcmsr/cmr/cid10033.h
dcmsr/include/dcmtk/dcmsr/cmr/cid11.h
dcmsr/include/dcmtk/dcmsr/cmr/cid244.h
dcmsr/include/dcmtk/dcmsr/cmr/cid247.h [new file with mode: 0644]
dcmsr/include/dcmtk/dcmsr/cmr/cid29.h
dcmsr/include/dcmtk/dcmsr/cmr/cid4020.h
dcmsr/include/dcmtk/dcmsr/cmr/cid4021.h
dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h
dcmsr/include/dcmtk/dcmsr/cmr/cid42.h
dcmsr/include/dcmtk/dcmsr/cmr/cid6147.h
dcmsr/include/dcmtk/dcmsr/cmr/cid7021.h
dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h
dcmsr/include/dcmtk/dcmsr/cmr/cid7445.h
dcmsr/include/dcmtk/dcmsr/cmr/cid7452.h
dcmsr/include/dcmtk/dcmsr/cmr/cid7453.h
dcmsr/include/dcmtk/dcmsr/cmr/cid7464.h
dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h
dcmsr/include/dcmtk/dcmsr/cmr/srnumvl.h
dcmsr/include/dcmtk/dcmsr/cmr/srnumvlu.h
dcmsr/include/dcmtk/dcmsr/cmr/tid1411.h
dcmsr/include/dcmtk/dcmsr/cmr/tid1419m.h
dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h
dcmsr/include/dcmtk/dcmsr/cmr/tid1501.h
dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h
dcmsr/include/dcmtk/dcmsr/codes/dcm.h
dcmsr/include/dcmtk/dcmsr/codes/ncit.h
dcmsr/include/dcmtk/dcmsr/codes/umls.h
dcmsr/include/dcmtk/dcmsr/dsrcomvl.h
dcmsr/include/dcmtk/dcmsr/dsrdoc.h
dcmsr/include/dcmtk/dcmsr/dsrimgvl.h
dcmsr/include/dcmtk/dcmsr/dsrnumvl.h
dcmsr/include/dcmtk/dcmsr/dsrtlist.h
dcmsr/include/dcmtk/dcmsr/dsrtypes.h
dcmsr/include/dcmtk/dcmsr/dsrwavvl.h
dcmsr/include/dcmtk/dcmsr/dsrxmlc.h
dcmsr/libcmr/CMakeLists.txt
dcmsr/libcmr/Makefile.dep
dcmsr/libcmr/Makefile.in
dcmsr/libcmr/cid100.cc
dcmsr/libcmr/cid10013.cc
dcmsr/libcmr/cid10033.cc
dcmsr/libcmr/cid11.cc
dcmsr/libcmr/cid244.cc
dcmsr/libcmr/cid247.cc [new file with mode: 0644]
dcmsr/libcmr/cid29.cc
dcmsr/libcmr/cid4020.cc
dcmsr/libcmr/cid4021.cc
dcmsr/libcmr/cid4031.cc
dcmsr/libcmr/cid42.cc
dcmsr/libcmr/cid6147.cc
dcmsr/libcmr/cid7021.cc
dcmsr/libcmr/cid7181.cc
dcmsr/libcmr/cid7445.cc
dcmsr/libcmr/cid7452.cc
dcmsr/libcmr/cid7453.cc
dcmsr/libcmr/cid7464.cc
dcmsr/libcmr/cid7469.cc
dcmsr/libcmr/tid1411.cc
dcmsr/libcmr/tid1500.cc
dcmsr/libcmr/tid1501.cc
dcmsr/libcmr/tid1600.cc
dcmsr/libsrc/CMakeLists.txt
dcmsr/libsrc/Makefile.dep
dcmsr/libsrc/dsracqcc.cc
dcmsr/libsrc/dsrbascc.cc
dcmsr/libsrc/dsrc3dcc.cc
dcmsr/libsrc/dsrchecc.cc
dcmsr/libsrc/dsrcolcc.cc
dcmsr/libsrc/dsrcomcc.cc
dcmsr/libsrc/dsrcomvl.cc
dcmsr/libsrc/dsrdoc.cc
dcmsr/libsrc/dsrenhcc.cc
dcmsr/libsrc/dsrimgfr.cc
dcmsr/libsrc/dsrimgse.cc
dcmsr/libsrc/dsrimgvl.cc
dcmsr/libsrc/dsrimpcc.cc
dcmsr/libsrc/dsrkeycc.cc
dcmsr/libsrc/dsrmaccc.cc
dcmsr/libsrc/dsrmamcc.cc
dcmsr/libsrc/dsrnumvl.cc
dcmsr/libsrc/dsrpficc.cc
dcmsr/libsrc/dsrplicc.cc
dcmsr/libsrc/dsrprdcc.cc
dcmsr/libsrc/dsrprocc.cc
dcmsr/libsrc/dsrrrdcc.cc
dcmsr/libsrc/dsrrsdcc.cc
dcmsr/libsrc/dsrsaecc.cc
dcmsr/libsrc/dsrsc3gr.cc
dcmsr/libsrc/dsrscogr.cc
dcmsr/libsrc/dsrspecc.cc
dcmsr/libsrc/dsrtcosp.cc
dcmsr/libsrc/dsrtcoto.cc
dcmsr/libsrc/dsrtypes.cc
dcmsr/libsrc/dsrwavch.cc
dcmsr/libsrc/dsrwavvl.cc
dcmsr/libsrc/dsrxmld.cc
dcmsr/libsrc/dsrxrdcc.cc
dcmsr/tests/CMakeLists.txt
dcmsr/tests/Makefile.dep
dcmsr/tests/mkreport.cc
dcmsr/tests/tests.cc
dcmsr/tests/tsrcmr.cc
dcmsr/tests/tsrdoc.cc
dcmsr/tests/tsrnumvl.cc
dcmtls/docs/CMakeLists.txt
dcmtls/docs/Makefile.in
dcmtls/docs/certstor.dox [new file with mode: 0644]
dcmtls/docs/certstor.txt [deleted file]
dcmtls/docs/dcmtls.dox
dcmtls/include/dcmtk/dcmtls/tlsciphr.h
dcmtls/include/dcmtk/dcmtls/tlscond.h
dcmtls/include/dcmtk/dcmtls/tlslayer.h
dcmtls/include/dcmtk/dcmtls/tlsopt.h
dcmtls/include/dcmtk/dcmtls/tlsscu.h
dcmtls/include/dcmtk/dcmtls/tlstrans.h
dcmtls/libsrc/CMakeLists.txt
dcmtls/libsrc/Makefile.dep
dcmtls/libsrc/tlsciphr.cc
dcmtls/libsrc/tlscond.cc
dcmtls/libsrc/tlslayer.cc
dcmtls/libsrc/tlsopt.cc
dcmtls/libsrc/tlsscu.cc
dcmtls/libsrc/tlstrans.cc
dcmtls/tests/CMakeLists.txt
dcmtls/tests/tscuscptls.cc
dcmtract/libsrc/CMakeLists.txt
dcmwlm/apps/CMakeLists.txt
dcmwlm/apps/Makefile.dep
dcmwlm/docs/wlmscpfs.man
dcmwlm/include/dcmtk/dcmwlm/wlds.h
dcmwlm/include/dcmtk/dcmwlm/wlfsim.h
dcmwlm/include/dcmtk/dcmwlm/wlmactmg.h
dcmwlm/libsrc/CMakeLists.txt
dcmwlm/libsrc/Makefile.dep
dcmwlm/libsrc/wldsfs.cc
dcmwlm/libsrc/wlmactmg.cc
dcmwlm/tests/CMakeLists.txt
dcmwlm/tests/Makefile.dep
dcmwlm/tests/wltest.cc
docs/ANNOUNCE.366 [new file with mode: 0644]
docs/CHANGES.367 [new file with mode: 0644]
doxygen/htmldocs.cfg
doxygen/manpages.cfg
doxygen/manpages/man1/cda2dcm.1
doxygen/manpages/man1/dcm2json.1
doxygen/manpages/man1/dcm2pdf.1
doxygen/manpages/man1/dcm2pnm.1
doxygen/manpages/man1/dcm2xml.1
doxygen/manpages/man1/dcmcjpeg.1
doxygen/manpages/man1/dcmcjpls.1
doxygen/manpages/man1/dcmconv.1
doxygen/manpages/man1/dcmcrle.1
doxygen/manpages/man1/dcmdjpeg.1
doxygen/manpages/man1/dcmdjpls.1
doxygen/manpages/man1/dcmdrle.1
doxygen/manpages/man1/dcmdspfn.1
doxygen/manpages/man1/dcmdump.1
doxygen/manpages/man1/dcmftest.1
doxygen/manpages/man1/dcmgpdir.1
doxygen/manpages/man1/dcmicmp.1
doxygen/manpages/man1/dcmj2pnm.1
doxygen/manpages/man1/dcml2pnm.1
doxygen/manpages/man1/dcmmkcrv.1
doxygen/manpages/man1/dcmmkdir.1
doxygen/manpages/man1/dcmmklut.1
doxygen/manpages/man1/dcmodify.1
doxygen/manpages/man1/dcmp2pgm.1
doxygen/manpages/man1/dcmprscp.1
doxygen/manpages/man1/dcmprscu.1
doxygen/manpages/man1/dcmpschk.1
doxygen/manpages/man1/dcmpsmk.1
doxygen/manpages/man1/dcmpsprt.1
doxygen/manpages/man1/dcmpsrcv.1
doxygen/manpages/man1/dcmpssnd.1
doxygen/manpages/man1/dcmqridx.1
doxygen/manpages/man1/dcmqrscp.1
doxygen/manpages/man1/dcmqrti.1
doxygen/manpages/man1/dcmquant.1
doxygen/manpages/man1/dcmrecv.1
doxygen/manpages/man1/dcmscale.1
doxygen/manpages/man1/dcmsend.1
doxygen/manpages/man1/dcmsign.1
doxygen/manpages/man1/dcod2lum.1
doxygen/manpages/man1/dconvlum.1
doxygen/manpages/man1/drtdump.1
doxygen/manpages/man1/dsr2html.1
doxygen/manpages/man1/dsr2xml.1
doxygen/manpages/man1/dsrdump.1
doxygen/manpages/man1/dump2dcm.1
doxygen/manpages/man1/echoscu.1
doxygen/manpages/man1/findscu.1
doxygen/manpages/man1/getscu.1
doxygen/manpages/man1/img2dcm.1
doxygen/manpages/man1/movescu.1
doxygen/manpages/man1/pdf2dcm.1
doxygen/manpages/man1/stl2dcm.1
doxygen/manpages/man1/storescp.1
doxygen/manpages/man1/storescu.1
doxygen/manpages/man1/termscu.1
doxygen/manpages/man1/wlmscpfs.1
doxygen/manpages/man1/xml2dcm.1
doxygen/manpages/man1/xml2dsr.1
oflog/include/dcmtk/oflog/config.h
oflog/include/dcmtk/oflog/helpers/strhelp.h
oflog/include/dcmtk/oflog/spi/filter.h
oflog/include/dcmtk/oflog/syslogap.h
oflog/include/dcmtk/oflog/thread/impl/syncwin.h
oflog/include/dcmtk/oflog/thread/syncpub.h
oflog/libsrc/CMakeLists.txt
oflog/libsrc/globinit.cc
oflog/libsrc/hierlock.cc
oflog/libsrc/lockfile.cc
oflog/libsrc/snprintf.cc
oflog/libsrc/syslogap.cc
ofstd/include/dcmtk/ofstd/diag/asincond.def [new file with mode: 0644]
ofstd/include/dcmtk/ofstd/diag/cnvrsn.def
ofstd/include/dcmtk/ofstd/diag/constexp.def [new file with mode: 0644]
ofstd/include/dcmtk/ofstd/diag/ignrattr.def [new file with mode: 0644]
ofstd/include/dcmtk/ofstd/diag/memacces.def [new file with mode: 0644]
ofstd/include/dcmtk/ofstd/diag/overflow.def
ofstd/include/dcmtk/ofstd/diag/pessmove.def [new file with mode: 0644]
ofstd/include/dcmtk/ofstd/diag/pop.def
ofstd/include/dcmtk/ofstd/diag/push.def
ofstd/include/dcmtk/ofstd/diag/shadow.def
ofstd/include/dcmtk/ofstd/diag/signcmp.def
ofstd/include/dcmtk/ofstd/diag/slfassov.def [new file with mode: 0644]
ofstd/include/dcmtk/ofstd/diag/stralias.def [new file with mode: 0644]
ofstd/include/dcmtk/ofstd/diag/unreachb.def [new file with mode: 0644]
ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def [new file with mode: 0644]
ofstd/include/dcmtk/ofstd/diag/vsobjdes.def [new file with mode: 0644]
ofstd/include/dcmtk/ofstd/ofassert.h
ofstd/include/dcmtk/ofstd/ofbmanip.h
ofstd/include/dcmtk/ofstd/ofcmdln.h
ofstd/include/dcmtk/ofstd/ofcond.h
ofstd/include/dcmtk/ofstd/ofconfig.h
ofstd/include/dcmtk/ofstd/ofconsol.h
ofstd/include/dcmtk/ofstd/ofdefine.h
ofstd/include/dcmtk/ofstd/ofdeprec.h [new file with mode: 0644]
ofstd/include/dcmtk/ofstd/ofdiag.h
ofstd/include/dcmtk/ofstd/oferror.h
ofstd/include/dcmtk/ofstd/offile.h
ofstd/include/dcmtk/ofstd/offilsys.h
ofstd/include/dcmtk/ofstd/oflimits.h
ofstd/include/dcmtk/ofstd/oflist.h
ofstd/include/dcmtk/ofstd/ofset.h
ofstd/include/dcmtk/ofstd/ofsockad.h
ofstd/include/dcmtk/ofstd/ofstack.h
ofstd/include/dcmtk/ofstd/ofstd.h
ofstd/include/dcmtk/ofstd/ofstdinc.h
ofstd/include/dcmtk/ofstd/ofstream.h
ofstd/include/dcmtk/ofstd/ofstring.h
ofstd/include/dcmtk/ofstd/oftest.h
ofstd/include/dcmtk/ofstd/oftime.h
ofstd/include/dcmtk/ofstd/oftypes.h
ofstd/include/dcmtk/ofstd/ofvector.h
ofstd/include/dcmtk/ofstd/ofvriant.h
ofstd/include/dcmtk/ofstd/ofxml.h
ofstd/libsrc/CMakeLists.txt
ofstd/libsrc/Makefile.dep
ofstd/libsrc/ofchrenc.cc
ofstd/libsrc/ofcmdln.cc
ofstd/libsrc/ofconapp.cc
ofstd/libsrc/ofconfig.cc
ofstd/libsrc/ofconsol.cc
ofstd/libsrc/ofdate.cc
ofstd/libsrc/ofdatime.cc
ofstd/libsrc/oferror.cc
ofstd/libsrc/offile.cc
ofstd/libsrc/offilsys.cc
ofstd/libsrc/offname.cc
ofstd/libsrc/ofrand.cc
ofstd/libsrc/ofsockad.cc
ofstd/libsrc/ofstd.cc
ofstd/libsrc/ofstring.cc
ofstd/libsrc/oftempf.cc
ofstd/libsrc/ofthread.cc
ofstd/libsrc/oftime.cc
ofstd/libsrc/ofuuid.cc
ofstd/libsrc/ofxml.cc
ofstd/tests/CMakeLists.txt
ofstd/tests/Makefile.dep
ofstd/tests/tatof.cc
ofstd/tests/tfilsys.cc
ofstd/tests/tmem.cc
ofstd/tests/toffile.cc
ofstd/tests/tofstd.cc
ofstd/tests/tthread.cc
ofstd/tests/ttuple.cc
ofstd/tests/tuuid.cc

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..44b3b5a
--- /dev/null
@@ -0,0 +1,101 @@
+# Ignore all kinds of object and library files
+*.o
+*.so
+*.a
+build
+
+# Ignore all Makefiles except the top-level one
+Makefile
+!/Makefile
+
+# Files generated by various configure scripts
+config.status
+config.log
+config/Makefile.def
+config/include/dcmtk/config/arith.h
+config/include/dcmtk/config/osconfig.h
+
+# Directories created by autoconf
+config/autom4te.cache/
+
+# Ignore all temporary and log files
+*.tmp
+*.log
+*.*~
+
+# Patch files
+*.patch
+
+# HTML documentation
+doxygen/htmldocs/
+doxygen/dcmtk.tag
+
+# Built binary files
+*/tests/tests
+config/arith
+config/lzwtest.tif
+dcmdata/apps/cda2dcm
+dcmdata/apps/dcm2json
+dcmdata/apps/dcm2pdf
+dcmdata/apps/dcm2xml
+dcmdata/apps/dcmconv
+dcmdata/apps/dcmcrle
+dcmdata/apps/dcmdrle
+dcmdata/apps/dcmdump
+dcmdata/apps/dcmftest
+dcmdata/apps/dcmgpdir
+dcmdata/apps/dcmodify
+dcmdata/apps/dump2dcm
+dcmdata/apps/img2dcm
+dcmdata/apps/pdf2dcm
+dcmdata/apps/stl2dcm
+dcmdata/apps/xml2dcm
+dcmdata/libsrc/mkdeftag
+dcmdata/libsrc/mkdictbi
+dcmimage/apps/dcm2pnm
+dcmimage/apps/dcmicmp
+dcmimage/apps/dcmquant
+dcmimage/apps/dcmscale
+dcmimgle/apps/dcmdspfn
+dcmimgle/apps/dcod2lum
+dcmimgle/apps/dconvlum
+dcmjpeg/apps/dcmcjpeg
+dcmjpeg/apps/dcmdjpeg
+dcmjpeg/apps/dcmj2pnm
+dcmjpeg/apps/dcmmkdir
+dcmjpls/apps/dcmcjpls
+dcmjpls/apps/dcmdjpls
+dcmjpls/apps/dcml2pnm
+dcmnet/apps/dcmrecv
+dcmnet/apps/dcmsend
+dcmnet/apps/echoscu
+dcmnet/apps/findscu
+dcmnet/apps/getscu
+dcmnet/apps/movescu
+dcmnet/apps/storescp
+dcmnet/apps/storescu
+dcmnet/apps/termscu
+dcmpstat/apps/dcmmkcrv
+dcmpstat/apps/dcmmklut
+dcmpstat/apps/dcmp2pgm
+dcmpstat/apps/dcmprscp
+dcmpstat/apps/dcmprscu
+dcmpstat/apps/dcmpschk
+dcmpstat/apps/dcmpsmk
+dcmpstat/apps/dcmpsprt
+dcmpstat/apps/dcmpsrcv
+dcmpstat/apps/dcmpssnd
+dcmpstat/tests/msgserv
+dcmqrdb/apps/dcmqridx
+dcmqrdb/apps/dcmqrscp
+dcmqrdb/apps/dcmqrti
+dcmrt/apps/drtdump
+dcmrt/tests/drttest
+dcmsign/apps/dcmsign
+dcmsr/apps/dsr2html
+dcmsr/apps/dsr2xml
+dcmsr/apps/dsrdump
+dcmsr/apps/xml2dsr
+dcmsr/tests/mkreport
+dcmwlm/apps/wlmscpfs
+dcmwlm/tests/wltest
old mode 100644 (file)
new mode 100755 (executable)
index 9a4534b..9e337be
--- a/ANNOUNCE
+++ b/ANNOUNCE
@@ -1,12 +1,12 @@
 ANNOUNCEMENT
 
-Version 3.6.6 of the OFFIS DCMTK (DICOM ToolKit) software is now available for
+Version 3.6.7 of the OFFIS DCMTK (DICOM toolkit) software is now available for
 public release.  This release includes the following main changes over the
-previous version 3.6.5:
+previous version 3.6.6:
 
-- DCMTK 3.6.6 builds correctly on older and up-to-date versions of GNU gcc
-  (4.2.1 to 10.2.0) Clang (3.4.2 to 11.0.0), Apple Clang 11.0.0,
-  Microsoft Visual Studio (2008 to 2019) and SunPro CC (5.14 and 5.15).
+- DCMTK 3.6.7 builds correctly on older and up-to-date versions of GNU gcc
+  (4.8.5 to 10.2.0) Clang (3.4.2 to 13.0.0), Apple Clang 11.0.0, and Microsoft
+  Visual Studio (2010 to 2022).
 
 - Tested with the following operating systems/environments:
   - Android on arm64
@@ -17,104 +17,154 @@ previous version 3.6.5:
   - NetBSD on x86_64
   - OpenBSD on x86_64
   - OpenIndiana on x86
-  - Solaris on x86
   - Windows (including MinGW and Cygwin) on x86_64 and x86
 
   For a complete list of tested systems and compilers, see the INSTALL file.
 
 - Updated data dictionary, SOP classes, well-known frame of references,
-  transfer syntaxes, code definitions and supported context group classes for
-  DICOM standard release 2020e.
+  transfer syntaxes [*], code definitions, supported context group classes,
+  and directory record types for DICOM standard release 2022b.
 
-- Added new DCMTK module dcmect, which facilitates creation, loading, (partly)
-  modification and storing Enhanced CT objects:
+  [*] Support for the Encapsulated Uncompressed Explicit VR Little Endian
+      Transfer Syntax (introduced with CP-2083) is still missing.
 
-  - Also included is a general Concatenation API that allows for creating and
-    re-assembling Concatenations from given DICOM datasets. Right now, only
-    uncompressed ("unencapsulated") pixel data is supported.
+- Added support for creating multi-frame images and instances of the Ophthalmic
+  Photography SOP Classes to img2dcm.  This tool now also allows for importing
+  a DICOM dataset from XML file.
 
-  - The existing Segmentation API (dcmseg) as well as the new Enhanced CT API
-    (dcmect) both support writing and reading Concatenations via dedicated
-    methods.
+- Added typical error handling options to xml2dcm, i.e. as known from other
+  tools such as dump2dcm.
 
-  - Thanks to GE Aviation for sponsoring this feature.
+- All command line tools that read or write DICOM files now support reading
+  DICOM files/datasets from stdin and writing DICOM files/datasets to stdout.
+  Support of stdin and stdout is also available for the underlying classes.
 
-- Major revision of JSON export tool (dcm2json), which should now be fully
-  standard compliant.
+- All command line tools now output more build options with --version.
 
-- Major revision of the dcmsign module, which now supports Elliptic Curve
-  (ECDSA) signatures, the DICOM SR RSA Digital Signature Profile, and CRLs in
-  hashed certificate directories.  During signature verification the chain of
-  trust for the signer certificates are now fully checked and there is limited
-  support for the creation and verification of trusted timestamps.
+- Further enhanced DICOM Structured Reporting (SR) module "dcmsr":
 
-- Added support for the Rendition Selection Document IOD, which has been
-  introduced with Supplement 202 (Real-Time Video), to the dcmsr module.
+  - Added the Enhanced X-Ray Radiation Dose SR IOD / SOP Class introduced with
+    Supplement 214 to the list of known (but not yet supported) document types
+    in the dcmsr module.  Full support for this IOD and SOP Class will follow
+    in a future release, as this requires the new Value Type "TABLE".
 
-- Added support for the new Waveform Storage SOP Classes that have been
-  introduced with Supplement 217 (Neurophysiology Waveforms) to the DICOMDIR
-  generation code and to the dcmsr module.
+  - Added support for the optional attributes Patient's Size and Patient's
+    Weight from the Patient Study Module.
 
-- Added support for the new 2nd generation RT Storage SOP Classes that have
-  been introduced with Supplement 175, 176 and 199, as well as for the new
-  Encapsulated OBJ and MTL Storage SOP Classes (Supplement 208) to the
-  DICOMDIR generation code.
+  - Added support for Context Group CID 247 "Laterality Left-Right Only".
 
-- Added TLS support to the DcmSCP and DcmSCPPool classes and to the dcmrecv
-  command line tool.
+  - Implemented support for CP-2023, CP-2053 and CP-2084, i.e. changes to the
+    IOD-specific Relationship Content Constraints and regarding missing numeric
+    measurement value.
 
-- Updated and completely revised DIMSE Status Code definitions.  Now, the
-  definitions and also the log output are consistent with the current edition
-  of the DICOM standard.
+  - Also implemented support for CP-1789 and CP-1998 to the submodule "cmr".
+    Both CPs relax requirements for the presence of content items or included
+    templates in TID 1500 "Measurement Report".
 
-- Significant performance enhancements for code that gets an item from or
-  inserts an item into a sequence with a large number of items.
+- Moved xml2dcm functionality into a class to facilitate its use in programs.
+  This also means that dcmdata now depends on libxml2 (if support enabled).
 
-- DCMTK now successfully compiles when UNICODE/_UNICODE is defined on Windows.
+- Modified DicomImage's rendering of overlay planes for multi-frame images
+  by implementing support for CP-1974 "Overlay usage with Multi-frame Image
+  unclear".
 
-- When compiling on Windows, new CMake options can now be used to control the
-  Win32 build model (multi-threaded or multi-threaded DLL).
+- Fixed issue in module "dcmseg" that caused the maximum number of frames in
+  segmentation objects to be limited to 65,535.
 
-- Fixed various issues that occurred after the official 3.6.5 release.
+- Implemented various changes to the module "dcmtls":
+
+  - Added functions for offline certificate verification.
+
+  - Added support for intermediate CAs and CRLs.
+
+  - Explicitly set a 32-bit random number as TLS session ID and disable TLS
+    session caching in OpenSSL.
+
+  - Changed the default security profile from the BCP 195 TLS profile to the
+    Non-downgrading BCP 195 TLS Profile.
+
+  - Revised error handling: Replaced the DcmTransportLayerStatus enumeration
+    by proper OFCondition error codes.
+
+- Improved support of the OpenSSL library:
+
+  - Added support for OpenSSL 3.0.x.
+
+  - Introduced a set of new configure tests for the various functions, header
+    files and macros that have changed between different OpenSSL versions and
+    require special handling in DCMTK.  This approach replaces the conditional
+    compilation based on version numbers.
+
+  - Introduced a new advanced CMake variable that allows for adding a custom
+    postfix to all file names of all libraries that change their ABI when
+    linking against OpenSSL.
+
+- Harmonized the configure options for using DICOM data dictionaries, both
+  the built-in and external ones.
+
+- CMake-related enhancements and other changes:
+
+  - Added CMake option that helps with the generation of binary executables
+    that run on different distributions.
+
+  - Introduced a CMake option for static linking.
+
+  - Added support for the PkgConfig package.
+
+  - Enhanced support for cross-compiling.
+
+  - Changed minimum required CMake version to 3.0.0.
+
+  - Enabled various compiler warnings by default.
+
+- Removed macro USE_STD_CXX_INCLUDES which allowed to include old C headers
+  instead of using their respective counterpart coming with C++.
+
+- Fixed various issues that occurred after the official 3.6.6 release.
   See CHANGES file for details.
 
 Many people have contributed to this new release of DCMTK, appearing here in
 alphabetical order.  Thank you very much for your support!
 
-  Michel Amat (GitHub user "amatm")
-  Bartosz Bialoskorski <bartoszbialoskorski@gmail.com>
-  Jesper Bojesen <jbojesen@vitalimages.com>
-  Marcel Claus <Marcel.Claus@med.uni-jena.de>
-  Jake Cobb <Jake.Cobb@varian.com>
-  Martin Czarnowski <czarnowski@examion.com>
+  Jinsheng Ba <bajinsheng@u.nus.edu>
+  Sharon Brizinov <sharon.b@claroty.com> and Noam Moshe
+  Daniel Calvo <dcalvo@fitec.org.br>
+  Tai Chi Minh Ralph Eastwood <raea@ambu.com>
   Matthias Gierlings <matthias.gierlings@ruhr-uni-bochum.de>
-  Niklas Johansson (GitHub user "Raphexion")
-  Andreas Keizers <an-kei@web.de>
-  Peter Klotz <Peter.Klotz@ith-icoserve.com>
-  Damien Lerat
-  Mathieu Malaterre <malat@debian.org>
-  Robert Mulcahey <rob@asteris.com>
-  Maria Nedyak <mashanedyak@gmail.com>
-  Steve Pieper <pieper@isomics.com>
-  Sergey Razuvaev <Sergey.Razuvaev@waveaccess.ru>
-  Markus Sabin <Markus.Sabin@soft-gate.de>
-  Maria Samoylova <mashanedyak@gmail.com>
-  Adrian Schmidt-Foehre <A.Schmidt-Foehre@mint-medical.de>
-  Waldo Valenzuela <waldo.valenzuela@artorg.unibe.ch>
-
-  DCMTK forum users "CStarkey", "JustSomeGuy", "Shaeto", and "ruben.cruz"
-  GitHub user "iboB"
+  Daniel Grieger <Daniel.Grieger@ith-icoserve.com>
+  Helmut Grohne <helmut@subdivi.de>
+  Igor Kostyukov <Igor.Kostyukov@waveaccess.ru>
+  W. Adam Koszek <wkoszek@segmed.ai>
+  Jason Lambert <lambert@dosisoft.fr>
+  Par Lidberg <Par.Lidberg@elekta.com>
+  Mathieu Malaterre <mathieu.malaterre@gmail.com>
+  Abdallah Maouche <abdallahmaouche98@gmail.com>
+  Gilles Mevel <gilles.mevel@groupe-nehs.com>
+  Jasper den Otter <jasper@segmed.ai>
+  Alex Reinking <alex_reinking@berkeley.edu>
+  Claus Stovgaard <clst@ambu.com>
+  Waldo Valenzuela <waldo.valenzuela@hotmail.com>
+  Christian Wetzel <wetzel@phoenix-pacs.de>
+
+  DCMTK forum users "alciregi", "alciregi", "Shaeto", "st80rules",
+  "upnorth173", "wrenashe"
+
+  GitHub users "gsmethells", "kayarre", "malaterre", "Staars"
 
 Members of the DCMTK Team who have worked on this release are:
 
-  Pedro Arizpe Gomez <arizpegomez@offis.de>
   Marco Eichelberg <eichelberg@offis.de>
   Michael Onken <onken@open-connections.de>
   Joerg Riesmeier <dicom@jriesmeier.com>
   Jan Schlamelcher <schlamelcher@offis.de>
 
+Student associates:
+
+  Marcel Baumann <marcel.baumann@uni-oldenburg.de>
+  Nikolas Goldhammer <dicom@offis.de>
+
 The DCMTK software can be downloaded via:
 
   https://dicom.offis.de/dcmtk or https://www.dcmtk.org/
 
-OFFIS e.V., Oldenburg, Germany, 2021-01-14
+OFFIS e.V., Oldenburg, Germany, 2022-04-22
index 43aa282efe25c315656b4d037226c7f9dadc8e8f..47e34763b07588cde1b47869fda3ad21b16e70ae 100644 (file)
@@ -38,7 +38,7 @@ if(DCMTK_USE_FIND_PACKAGE)
         message(STATUS "Info: DCMTK TIFF support will be enabled")
         include_directories(${TIFF_INCLUDE_DIR} ${JPEG_INCLUDE_DIR})
       endif()
-      set(LIBTIFF_LIBS ${TIFF_LIBRARY} ${JPEG_LIBRARY})
+      set(LIBTIFF_LIBS ${TIFF_LIBRARY} ${TIFF_EXTRA_LIBS_STATIC} ${JPEG_LIBRARY})
     endif()
   endif()
 
@@ -75,7 +75,7 @@ if(DCMTK_USE_FIND_PACKAGE)
         message(STATUS "Info: DCMTK OPENSSL support will be enabled")
         set(WITH_OPENSSL 1)
         include_directories(${OPENSSL_INCLUDE_DIR})
-        set(OPENSSL_LIBS ${OPENSSL_LIBRARIES})
+        set(OPENSSL_LIBS ${OPENSSL_LIBRARIES} ${OPENSSL_EXTRA_LIBS_STATIC})
         CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_LIBDL)
         if(HAVE_LIBDL)
           set(OPENSSL_LIBS ${OPENSSL_LIBS} dl)
@@ -99,7 +99,7 @@ if(DCMTK_USE_FIND_PACKAGE)
       message(STATUS "Info: DCMTK XML support will be enabled")
       set(WITH_LIBXML 1)
       include_directories(${LIBXML2_INCLUDE_DIR})
-      set(LIBXML_LIBS ${LIBXML2_LIBRARIES})
+      set(LIBXML_LIBS ${LIBXML2_LIBRARIES} ${LIBXML2_EXTRA_LIBS_STATIC})
     endif()
   endif()
 
@@ -120,7 +120,7 @@ if(DCMTK_USE_FIND_PACKAGE)
 
   # Find libsndfile
   if(DCMTK_WITH_SNDFILE)
-    find_package(Sndfile QUIET)
+    find_package(SNDFILE QUIET)
     if(NOT SNDFILE_LIBS)
       message(STATUS "Warning: SNDFILE support will be disabled because libsndfile was not found.")
       set(WITH_SNDFILE "")
@@ -129,14 +129,14 @@ if(DCMTK_USE_FIND_PACKAGE)
       message(STATUS "Info: DCMTK SNDFILE support will be enabled")
       set(WITH_SNDFILE 1)
       include_directories(${SNDFILE_INCLUDE_DIRS})
-      set(SNDFILE_LIBS ${SNDFILE_LIBRARIES})
+      set(SNDFILE_LIBS ${SNDFILE_LIBRARIES} ${SNDFILE_EXTRA_LIBS_STATIC})
     endif()
   endif()
 
   # Find libiconv
   if(DCMTK_WITH_ICONV)
     find_package(Iconv QUIET)
-    find_package(Charset QUIET)
+    find_package(LIBCHARSET QUIET)
     if(ICONV_FOUND)
         if(NOT Iconv_IS_BUILT_IN)
             set(LIBICONV_FOUND ${ICONV_FOUND})
@@ -165,7 +165,7 @@ if(DCMTK_USE_FIND_PACKAGE)
 
   # Find libwrap
   if(DCMTK_WITH_WRAP)
-    find_package(Wrap QUIET)
+    find_package(WRAP QUIET)
     if(NOT WRAP_FOUND)
       message(STATUS "Warning: WRAP support will be disabled because libwrap was not found.")
       set(WITH_TCPWRAPPER "")
@@ -174,13 +174,20 @@ if(DCMTK_USE_FIND_PACKAGE)
       message(STATUS "Info: DCMTK WRAP support will be enabled")
       set(WITH_TCPWRAPPER 1)
       include_directories(${WRAP_INCLUDE_DIRS})
-      set(WRAP_LIBS ${WRAP_LIBRARIES})
+      set(WRAP_LIBS ${WRAP_LIBRARIES} ${WRAP_EXTRA_LIBS_STATIC})
     endif()
   endif()
 
   # Find OpenJPEG
   if(DCMTK_WITH_OPENJPEG)
-    find_package(OpenJPEG QUIET)
+    if(DCMTK_USE_OWN_FINDOPENJPEG_MODULE)
+      # PREPEND and POP_FRONT can only be used since version 3.15.so we use more compatible commands.
+      list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/${DCMTK_CMAKE_INCLUDE}/CMake/")
+      find_package(OpenJPEG QUIET MODULE)
+      list(REMOVE_AT CMAKE_MODULE_PATH 0)
+    else()
+      find_package(OpenJPEG QUIET PATH_SUFFIXES "openjpeg-2.4.0" "openjpeg-2.3.1" "openjpeg-2.3.0")
+    endif()
     if(NOT OPENJPEG_FOUND)
       message(STATUS "Warning: OpenJPEG support will be disabled because the OpenJPEG library was not found.")
       set(WITH_OPENJPEG "")
@@ -188,8 +195,8 @@ if(DCMTK_USE_FIND_PACKAGE)
     else()
       message(STATUS "Info: DCMTK OpenJPEG support will be enabled")
       set(WITH_OPENJPEG 1)
-      include_directories(${OPENJPEG_INCLUDE_DIRS})
-      set(OPENJPEG_LIBS ${OPENJPEG_LIBRARIES})
+      include_directories(BEFORE ${OPENJPEG_INCLUDE_DIRS})
+      set(OPENJPEG_LIBS ${OPENJPEG_LIBRARIES} ${OPENJPEG_EXTRA_LIBS_STATIC})
     endif()
   endif()
 else()
@@ -397,7 +404,7 @@ if(DCMTK_WITH_ICU)
     message(STATUS "Info: DCMTK ICU support will be enabled")
     set(WITH_ICU 1)
     set(ICU_INCDIR ${ICU_INCLUDE_DIR})
-    set(ICU_LIBS ${ICU_LIBRARIES})
+    set(ICU_LIBS ${ICU_LIBRARIES} ${ICU_EXTRA_LIBS_STATIC})
     include_directories(${ICU_INCLUDE_DIR})
   endif()
 endif()
index 4190503698fd2d2819605afd32ec3712d45c3d3b..159de4ba3d80ed23af92a1ba83443bd135694da6 100644 (file)
@@ -28,8 +28,13 @@ set(DCMTK_WITH_OPENJPEG @DCMTK_WITH_OPENJPEG@)
 set(DCMTK_WITH_DOXYGEN @DCMTK_WITH_DOXYGEN@)
 
 # Dictionary-related
-set(DCMTK_ENABLE_BUILTIN_DICTIONARY @DCMTK_ENABLE_BUILTIN_DICTIONARY@)
-set(DCMTK_ENABLE_EXTERNAL_DICTIONARY @DCMTK_ENABLE_EXTERNAL_DICTIONARY@)
+
+# Define the type of standard dictionary that we want to use:
+#   0 - Do not load any default dictionary on startup
+#   1 - Load builtin dictionary on startup
+#   2 - Load external (i.e. file-based) dictionary on startup
+set(DCM_DICT_DEFAULT @DCM_DICT_DEFAULT@)
+set(DCM_DICT_USE_DCMDICTPATH @DCM_DICT_USE_DCMDICTPATH@)
 set(DCMTK_ENABLE_PRIVATE_TAGS @DCMTK_ENABLE_PRIVATE_TAGS@)
 
 # Compiler / standard library features
index 765c4ca7018c441cab14113a9ace413c00dbd08c..e6dd18baa09b79d434cf2ccbf5ff75860b669a9a 100644 (file)
@@ -31,8 +31,13 @@ set(DCMTK_WITH_OPENJPEG @DCMTK_WITH_OPENJPEG@)
 SET(DCMTK_WITH_DOXYGEN @DCMTK_WITH_DOXYGEN@)
 
 # Dictionary-related
-SET(DCMTK_ENABLE_BUILTIN_DICTIONARY @DCMTK_ENABLE_BUILTIN_DICTIONARY@)
-SET(DCMTK_ENABLE_EXTERNAL_DICTIONARY @DCMTK_ENABLE_EXTERNAL_DICTIONARY@)
+
+# Define the type of standard dictionary that we want to use:
+#   0 - Do not load any default dictionary on startup
+#   1 - Load builtin dictionary on startup
+#   2 - Load external (i.e. file-based) dictionary on startup
+SET(DCM_DICT_DEFAULT @DCM_DICT_DEFAULT@)
+SET(DCM_DICT_USE_DCMDICTPATH @DCM_DICT_USE_DCMDICTPATH@)
 SET(DCMTK_ENABLE_PRIVATE_TAGS @DCMTK_ENABLE_PRIVATE_TAGS@)
 
 # Compiler / standard library features
diff --git a/CMake/FindCharset.cmake b/CMake/FindCharset.cmake
deleted file mode 100644 (file)
index f779d17..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# Find charset library
-#
-#  LIBCHARSET_INCLUDE_DIRS - where to find localcharset.h, etc
-#  LIBCHARSET_LIBRARIES    - Lists of libraries when using charset
-#  LIBCHARSET_FOUND        - True if charset found
-
-include(FindPackageHandleStandardArgs)
-
-# Look for the header file
-find_path(LIBCHARSET_INCLUDE_DIR NAMES localcharset.h)
-mark_as_advanced(LIBCHARSET_INCLUDE_DIR)
-
-set(LIBCHARSET_LIBS charset)
-find_library(LIBCHARSET_LIBRARY NAMES ${LIBCHARSET_LIBS})
-mark_as_advanced(LIBCHARSET_LIBRARY)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBCHARSET REQUIRED_VARS LIBCHARSET_LIBRARY LIBCHARSET_INCLUDE_DIR)
-
-if(LIBCHARSET_FOUND)
-  set(LIBCHARSET_INCLUDE_DIRS ${LIBCHARSET_INCLUDE_DIR})
-  set(LIBCHARSET_LIBRARIES ${LIBCHARSET_LIBRARY})
-endif()
diff --git a/CMake/FindLIBCHARSET.cmake b/CMake/FindLIBCHARSET.cmake
new file mode 100644 (file)
index 0000000..f779d17
--- /dev/null
@@ -0,0 +1,22 @@
+# Find charset library
+#
+#  LIBCHARSET_INCLUDE_DIRS - where to find localcharset.h, etc
+#  LIBCHARSET_LIBRARIES    - Lists of libraries when using charset
+#  LIBCHARSET_FOUND        - True if charset found
+
+include(FindPackageHandleStandardArgs)
+
+# Look for the header file
+find_path(LIBCHARSET_INCLUDE_DIR NAMES localcharset.h)
+mark_as_advanced(LIBCHARSET_INCLUDE_DIR)
+
+set(LIBCHARSET_LIBS charset)
+find_library(LIBCHARSET_LIBRARY NAMES ${LIBCHARSET_LIBS})
+mark_as_advanced(LIBCHARSET_LIBRARY)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBCHARSET REQUIRED_VARS LIBCHARSET_LIBRARY LIBCHARSET_INCLUDE_DIR)
+
+if(LIBCHARSET_FOUND)
+  set(LIBCHARSET_INCLUDE_DIRS ${LIBCHARSET_INCLUDE_DIR})
+  set(LIBCHARSET_LIBRARIES ${LIBCHARSET_LIBRARY})
+endif()
index 8589edcdaac07108ccffc06886e636f67842868c..23b25a24d57f26347d6c4499413cdb354aa2ecf0 100644 (file)
@@ -21,7 +21,7 @@ set(OPENJPEG_LIBS openjp2)
 find_library(OPENJPEG_LIBRARY NAMES ${OPENJPEG_LIBS} HINTS ${OPENJPEG_PKGCONF_LIBRARY_DIRS})
 mark_as_advanced(OPENJPEG_LIBRARY)
 
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(OPENJPEG REQUIRED_VARS OPENJPEG_LIBRARY OPENJPEG_INCLUDE_DIR)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenJPEG REQUIRED_VARS OPENJPEG_LIBRARY OPENJPEG_INCLUDE_DIR)
 
 # Copy the result to output variables
 if(OPENJPEG_FOUND)
diff --git a/CMake/FindSNDFILE.cmake b/CMake/FindSNDFILE.cmake
new file mode 100644 (file)
index 0000000..ca5e8c3
--- /dev/null
@@ -0,0 +1,32 @@
+# Find sndfile library
+#
+# Released under BSD license
+#
+#  SNDFILE_INCLUDE_DIRS - where to find sndfile.h, etc
+#  SNDFILE_LIBRARIES    - Lists of libraries when using sndfile
+#  SNDFILE_FOUND        - True if sndfile found
+
+include(FindPackageHandleStandardArgs)
+
+# Look for the header file
+find_path(SNDFILE_INCLUDE_DIR NAMES sndfile.h)
+mark_as_advanced(SNDFILE_INCLUDE_DIR)
+
+# Look for the library
+set(SNDFILE_LIBS sndfile)
+find_library(SNDFILE_LIBRARY NAMES ${SNDFILE_LIBS})
+mark_as_advanced(SNDFILE_LIBRARY)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(SNDFILE REQUIRED_VARS SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
+
+# Copy the result to output variables
+if(SNDFILE_FOUND)
+  set(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY})
+  set(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR})
+else()
+  set(SNDFILE_LIBS)
+  set(SNDFILE_LIBRARY)
+  set(SNDFILE_LIBRARIES)
+  set(SNDFILE_INCLUDE_DIR)
+  set(SNDFILE_INCLUDE_DIRS)
+endif()
diff --git a/CMake/FindSndfile.cmake b/CMake/FindSndfile.cmake
deleted file mode 100644 (file)
index ca5e8c3..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# Find sndfile library
-#
-# Released under BSD license
-#
-#  SNDFILE_INCLUDE_DIRS - where to find sndfile.h, etc
-#  SNDFILE_LIBRARIES    - Lists of libraries when using sndfile
-#  SNDFILE_FOUND        - True if sndfile found
-
-include(FindPackageHandleStandardArgs)
-
-# Look for the header file
-find_path(SNDFILE_INCLUDE_DIR NAMES sndfile.h)
-mark_as_advanced(SNDFILE_INCLUDE_DIR)
-
-# Look for the library
-set(SNDFILE_LIBS sndfile)
-find_library(SNDFILE_LIBRARY NAMES ${SNDFILE_LIBS})
-mark_as_advanced(SNDFILE_LIBRARY)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SNDFILE REQUIRED_VARS SNDFILE_LIBRARY SNDFILE_INCLUDE_DIR)
-
-# Copy the result to output variables
-if(SNDFILE_FOUND)
-  set(SNDFILE_LIBRARIES ${SNDFILE_LIBRARY})
-  set(SNDFILE_INCLUDE_DIRS ${SNDFILE_INCLUDE_DIR})
-else()
-  set(SNDFILE_LIBS)
-  set(SNDFILE_LIBRARY)
-  set(SNDFILE_LIBRARIES)
-  set(SNDFILE_INCLUDE_DIR)
-  set(SNDFILE_INCLUDE_DIRS)
-endif()
diff --git a/CMake/FindWRAP.cmake b/CMake/FindWRAP.cmake
new file mode 100644 (file)
index 0000000..27955bf
--- /dev/null
@@ -0,0 +1,32 @@
+# Find wrap library
+#
+# Released under BSD license
+#
+#  WRAP_INCLUDE_DIRS - where to find tcpd.h, etc
+#  WRAP_LIBRARIES    - Lists of libraries when using libwrap
+#  WRAP_FOUND        - True if wrap found
+
+include(FindPackageHandleStandardArgs)
+
+# Look for the header file
+find_path(WRAP_INCLUDE_DIR NAMES tcpd.h)
+mark_as_advanced(WRAP_INCLUDE_DIR)
+
+# Look for the library
+set(WRAP_LIBS wrap)
+find_library(WRAP_LIBRARY NAMES ${WRAP_LIBS})
+mark_as_advanced(WRAP_LIBRARY)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(WRAP REQUIRED_VARS WRAP_LIBRARY WRAP_INCLUDE_DIR)
+
+# Copy the result to output variables
+if(WRAP_FOUND)
+  set(WRAP_LIBRARIES ${WRAP_LIBRARY})
+  set(WRAP_INCLUDE_DIRS ${WRAP_INCLUDE_DIR})
+else()
+  set(WRAP_LIBS)
+  set(WRAP_LIBRARY)
+  set(WRAP_LIBRARIES)
+  set(WRAP_INCLUDE_DIR)
+  set(WRAP_INCLUDE_DIRS)
+endif()
diff --git a/CMake/FindWrap.cmake b/CMake/FindWrap.cmake
deleted file mode 100644 (file)
index 27955bf..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-# Find wrap library
-#
-# Released under BSD license
-#
-#  WRAP_INCLUDE_DIRS - where to find tcpd.h, etc
-#  WRAP_LIBRARIES    - Lists of libraries when using libwrap
-#  WRAP_FOUND        - True if wrap found
-
-include(FindPackageHandleStandardArgs)
-
-# Look for the header file
-find_path(WRAP_INCLUDE_DIR NAMES tcpd.h)
-mark_as_advanced(WRAP_INCLUDE_DIR)
-
-# Look for the library
-set(WRAP_LIBS wrap)
-find_library(WRAP_LIBRARY NAMES ${WRAP_LIBS})
-mark_as_advanced(WRAP_LIBRARY)
-
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(WRAP REQUIRED_VARS WRAP_LIBRARY WRAP_INCLUDE_DIR)
-
-# Copy the result to output variables
-if(WRAP_FOUND)
-  set(WRAP_LIBRARIES ${WRAP_LIBRARY})
-  set(WRAP_INCLUDE_DIRS ${WRAP_INCLUDE_DIR})
-else()
-  set(WRAP_LIBS)
-  set(WRAP_LIBRARY)
-  set(WRAP_LIBRARIES)
-  set(WRAP_INCLUDE_DIR)
-  set(WRAP_INCLUDE_DIRS)
-endif()
index 9a9feb360e87bb67baa56101d6a8439ed154d646..4512624c253c11f6b5c121447f4b3770aac11c7f 100644 (file)
 # DCMTKConfigVersion.cmake provides checking of DCMTK version compatibility
 # DCMTKConfig.cmake will contain options used to build this DCMTK package
 
+# Start with clean DCMTKTargets.cmake and fill it by appending
+file(WRITE "${CMAKE_BINARY_DIR}/DCMTKTargets.cmake" "")
+
 # Get and store all executable targets to DCMTKTargets.cmake within build's main dir
 get_property(DCMTK_EXECUTABLE_TARGETS GLOBAL PROPERTY DCMTK_EXECUTABLE_TARGETS)
-export(TARGETS ${DCMTK_EXECUTABLE_TARGETS} FILE "${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake")
+export(TARGETS ${DCMTK_EXECUTABLE_TARGETS} APPEND FILE "${CMAKE_BINARY_DIR}/DCMTKTargets.cmake" NAMESPACE DCMTK::)
 
 # Get and store libraries to DCMTKTargets.cmake within the build's main dir
 get_property(DCMTK_LIBRARY_TARGETS GLOBAL PROPERTY DCMTK_LIBRARY_TARGETS)
-export(TARGETS ${DCMTK_LIBRARY_TARGETS} APPEND FILE "${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake")
+export(TARGETS config ${DCMTK_LIBRARY_TARGETS} APPEND FILE "${CMAKE_BINARY_DIR}/DCMTKTargets.cmake" NAMESPACE DCMTK::)
+
+# Add interface library for conveniently linking to all libraries via DCMTK::DCMTK
+export(TARGETS DCMTK APPEND FILE "${CMAKE_BINARY_DIR}/DCMTKTargets.cmake" NAMESPACE DCMTK::)
 
 # Create DCMTConfigVersion.cmake with basic DCMTK version information (build tree)
-set(DCMTK_CONFIG_VERSION "${DCMTK_BUILD_CMKDIR}/DCMTKConfigVersion.cmake")
+set(DCMTK_CONFIG_VERSION "${CMAKE_BINARY_DIR}/DCMTKConfigVersion.cmake")
 WRITE_BASIC_PACKAGE_VERSION_FILE(
     ${DCMTK_CONFIG_VERSION}
     VERSION ${DCMTK_MAJOR_VERSION}.${DCMTK_MINOR_VERSION}.${DCMTK_BUILD_VERSION}
@@ -36,7 +42,7 @@ WRITE_BASIC_PACKAGE_VERSION_FILE(
 # build and install tree versions of the file.
 
 # Case 1: Configure 'DCMTKConfig.cmake' for a build tree.
-set(DCMTK_CMKDIR_CONFIG "${DCMTK_BUILD_CMKDIR}")
+set(DCMTK_CMKDIR_CONFIG "${CMAKE_BINARY_DIR}")
 # Collect include paths
 set(DCMTK_INCLUDE_DIR_CONFIGS
     "SET_AND_CHECK(DCMTK_config_INCLUDE_DIR \"${DCMTK_BINARY_DIR}/config/include/dcmtk/config\")")
@@ -50,7 +56,7 @@ foreach(module ${DCMTK_MODULES})
     set(DCMTK_CONFIG_CODE "${DCMTK_CONFIG_CODE}list(APPEND DCMTK_INCLUDE_DIRS \"${DCMTK_SOURCE_DIR}/${module}/include\")\n")
 endforeach()
 set(DCMTK_CONFIG_CODE "${DCMTK_CONFIG_CODE}##################################################")
-set(dcmtk_config "${DCMTK_BUILD_CMKDIR}/DCMTKConfig.cmake")
+set(dcmtk_config "${CMAKE_BINARY_DIR}/DCMTKConfig.cmake")
 # Actually configure file and write it to build's main directory
 CONFIGURE_PACKAGE_CONFIG_FILE(
     ${DCMTK_SOURCE_DIR}/CMake/DCMTKConfig.cmake.in
index 5f2ef72bcb5aa243c095aa43aaf4091286a11473..11e49b269777bbbd96d110a98426da2c6664969e 100644 (file)
@@ -5,26 +5,36 @@ else()
   set(CMAKE_TRY_COMPILE_CONFIGURATION "Release")
 endif()
 
-# Compiled-in dictionary support
-if(DCMTK_ENABLE_BUILTIN_DICTIONARY)
-  set(ENABLE_BUILTIN_DICTIONARY 1)
-  message(STATUS "Info: DCMTK will compile with built-in (compiled-in) dictionary")
+# Select between built-in, external or no default dictionary support
+if(DCMTK_DEFAULT_DICT STREQUAL "builtin")
+  message(STATUS "Info: DCMTK will compile with built-in (compiled-in) default dictionary")
+  set(DCM_DICT_DEFAULT 1)
   # No extra variable needed since its only evaluated in CMake files
+elseif(DCMTK_DEFAULT_DICT STREQUAL "external")
+  message(STATUS "Info: DCMTK will compile with external default dictionary")
+  set(DCM_DICT_DEFAULT 2)
 else()
-  set(ENABLE_BUILTIN_DICTIONARY "")
-  message(STATUS "Info: DCMTK will compile without built-in (compiled-in) dictionary")
-  # No extra variable needed since its only evaluated in CMake files
+  message(STATUS "Info: DCMTK will compile without any default dictionary")
+  set(DCM_DICT_DEFAULT 0)
 endif()
 
-# External dictionary support
-if(DCMTK_ENABLE_EXTERNAL_DICTIONARY)
-  set(ENABLE_EXTERNAL_DICTIONARY 1)
-  message(STATUS "Info: DCMTK will try to load external dictionary from default path on startup")
-else()
-  set(ENABLE_EXTERNAL_DICTIONARY "")
-  message(STATUS "Info: DCMTK will not try to load external dictionary from default path on startup")
+
+# Evaluation of old DCMDICTPATH environment variable (deprecation warning)
+if(DEFINED DCMTK_ENABLE_BUILTIN_DICTIONARY)
+  message(WARNING "Usage of DCMTK_ENABLE_BUILTIN_DICTIONARY has been deprecated, see DCMTK_DEFAULT_DICT")
+endif()
+if(DEFINED DCMTK_ENABLE_EXTERNAL_DICTIONARY)
+  message(WARNING "Usage of DCMTK_ENABLE_EXTERNAL_DICTIONARY has been deprecated, see DCMTK_USE_DCMDICTPATH")
 endif()
 
+# Evaluation of DCMDICTPATH environment variable
+if(DCMTK_USE_DCMDICTPATH)
+  set(DCM_DICT_USE_DCMDICTPATH 1)
+  message(STATUS "Info: DCMTK will load dictionaries defined by DCMDICTPATH environment variable")
+else()
+  set(DCM_DICT_USE_DCMDICTPATH "")
+  message(STATUS "Info: DCMTK will not load dictionaries defined by DCMDICTPATH environment variable")
+endif()
 
 # Private tags
 if(DCMTK_ENABLE_PRIVATE_TAGS)
@@ -66,7 +76,7 @@ if(NOT DCMTK_ENABLE_CHARSET_CONVERSION)
   set(DCMTK_ENABLE_CHARSET_CONVERSION_DOCSTRING "Select character set conversion implementation.")
   if(DCMTK_WITH_ICONV)
     if(DCMTK_WITH_ICU)
-      message(WARNING "Warning: Both ICU and the libiconv are available, using libiconv. Modify DCMTK_ENABLE_CHARSET_CONVERSION for switching to ICU")
+      message(STATUS "Info: Both ICU and the libiconv are available, using libiconv. Modify DCMTK_ENABLE_CHARSET_CONVERSION for switching to ICU")
     endif()
     set(DCMTK_ENABLE_CHARSET_CONVERSION "libiconv" CACHE STRING "${DCMTK_ENABLE_CHARSET_CONVERSION_DOCSTRING}")
   elseif(DCMTK_WITH_ICU)
@@ -106,19 +116,22 @@ else()
   set(DCMTK_ENABLE_CHARSET_CONVERSION OFF)
 endif()
 
-# Standard C++ headers (currently hard-coded)
-#if(VTK_USE_ANSI_STDLIB)
-  set(USE_STD_CXX_INCLUDES 1)
-#else()
-#  set(USE_STD_CXX_INCLUDES "")
-#endif()
-
 # Configure file
 
 # Windows being windows, it lies about its processor type to 32 bit binaries
 set(SYSTEM_PROCESSOR "$ENV{PROCESSOR_ARCHITEW6432}")
 if(NOT SYSTEM_PROCESSOR)
-  set(SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}")
+  if(WIN32 AND NOT CYGWIN)
+    if(CMAKE_GENERATOR_PLATFORM)
+      set(SYSTEM_PROCESSOR "${CMAKE_GENERATOR_PLATFORM}")
+    elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
+      set(SYSTEM_PROCESSOR "x64")
+    elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+      set(SYSTEM_PROCESSOR "Win32")
+    endif()
+  else()
+    set(SYSTEM_PROCESSOR "${CMAKE_SYSTEM_PROCESSOR}")
+  endif()
 endif()
 # CMake doesn't provide a configure-style system type string
 set(CANONICAL_HOST_TYPE "${SYSTEM_PROCESSOR}-${CMAKE_SYSTEM_NAME}")
@@ -133,7 +146,7 @@ if(WIN32 AND NOT CYGWIN)
   set(PATH_SEPARATOR "\\\\")
   set(ENVIRONMENT_PATH_SEPARATOR ";")
   # Set dictionary path to the data dir inside install main dir (prefix)
-  if(DCMTK_ENABLE_EXTERNAL_DICTIONARY)
+  if(DCMTK_DEFAULT_DICT STREQUAL "external")
     set(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}\\\\${CMAKE_INSTALL_DATADIR}\\\\dcmtk\\\\dicom.dic")
     # If private dictionary should be utilized, add it to default dictionary path.
     if(ENABLE_PRIVATE_TAGS)
@@ -154,7 +167,7 @@ else()
   set(PATH_SEPARATOR "/")
   set(ENVIRONMENT_PATH_SEPARATOR ":")
   # Set dictionary path to the data dir inside install main dir (prefix).
-  if(DCMTK_ENABLE_EXTERNAL_DICTIONARY)
+  if(DCMTK_DEFAULT_DICT STREQUAL "external")
     set(DCM_DICT_DEFAULT_PATH "${DCMTK_PREFIX}/${CMAKE_INSTALL_DATADIR}/dcmtk/dicom.dic")
     # If private dictionary should be utilized, add it to default dictionary path.
     if(ENABLE_PRIVATE_TAGS)
@@ -377,6 +390,10 @@ endif()
 
   set(HEADERS)
 
+  if(HAVE_IEEEFP_H)
+    set(HEADERS ${HEADERS} ieeefp.h)
+  endif()
+
   if(HAVE_IO_H)
     set(HEADERS ${HEADERS} io.h)
   endif()
@@ -546,7 +563,6 @@ endif()
   CHECK_FUNCTION_EXISTS(bcmp HAVE_BCMP)
   CHECK_FUNCTION_EXISTS(bcopy HAVE_BCOPY)
   CHECK_FUNCTION_EXISTS(bind HAVE_BIND)
-  CHECK_FUNCTION_EXISTS(bzero HAVE_BZERO)
   CHECK_FUNCTION_EXISTS(cuserid HAVE_CUSERID)
   CHECK_FUNCTION_EXISTS(_doprnt HAVE_DOPRNT)
   CHECK_FUNCTION_EXISTS(finite HAVE_FINITE)
@@ -623,7 +639,6 @@ endif()
   CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyname_r "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYNAME_R)
   CHECK_FUNCTIONWITHHEADER_EXISTS(gethostbyaddr_r "${HEADERS}" HAVE_PROTOTYPE_GETHOSTBYADDR_R)
   CHECK_FUNCTIONWITHHEADER_EXISTS(gethostid "${HEADERS}" HAVE_PROTOTYPE_GETHOSTID)
-  CHECK_FUNCTIONWITHHEADER_EXISTS(bzero "${HEADERS}" HAVE_PROTOTYPE_BZERO)
   CHECK_FUNCTIONWITHHEADER_EXISTS(gethostname "${HEADERS}" HAVE_PROTOTYPE_GETHOSTNAME)
   CHECK_FUNCTIONWITHHEADER_EXISTS(waitpid "${HEADERS}" HAVE_PROTOTYPE_WAITPID)
   CHECK_FUNCTIONWITHHEADER_EXISTS(wait3 "${HEADERS}" HAVE_PROTOTYPE_WAIT3)
@@ -636,6 +651,8 @@ endif()
   CHECK_FUNCTIONWITHHEADER_EXISTS(setsockopt "${HEADERS}" HAVE_PROTOTYPE_SETSOCKOPT)
   CHECK_FUNCTIONWITHHEADER_EXISTS(socket "${HEADERS}" HAVE_PROTOTYPE_SOCKET)
   CHECK_FUNCTIONWITHHEADER_EXISTS(listen "${HEADERS}" HAVE_PROTOTYPE_LISTEN)
+# the following functions are partially C99 and partially nonstandard and may
+# not be defined in the standard C++ headers.
   CHECK_FUNCTIONWITHHEADER_EXISTS(_vsnprintf_s "${HEADERS}" HAVE__VSNPRINTF_S)
   CHECK_FUNCTIONWITHHEADER_EXISTS(vfprintf_s "${HEADERS}" HAVE_VFPRINTF_S)
   CHECK_FUNCTIONWITHHEADER_EXISTS(vprintf "${HEADERS}" HAVE_VPRINTF)
@@ -673,6 +690,7 @@ endif()
   CHECK_FUNCTIONWITHHEADER_EXISTS(nanosleep "${HEADERS}" HAVE_PROTOTYPE_NANOSLEEP)
   CHECK_FUNCTIONWITHHEADER_EXISTS("&passwd::pw_gecos" "${HEADERS}" HAVE_PASSWD_GECOS)
   CHECK_FUNCTIONWITHHEADER_EXISTS("TryAcquireSRWLockShared((PSRWLOCK)0)" "${HEADERS}" HAVE_PROTOTYPE_TRYACQUIRESRWLOCKSHARED)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("fp_except_t definition" "${HEADERS}" HAVE_DECLARATION_FP_EXCEPT_T)
 
   # Check for some type definitions needed by JasPer and defines them if necessary
   # Even if not functions but types are looked for, the script works fine.
@@ -692,22 +710,18 @@ endif()
   CHECK_FUNCTIONWITHHEADER_EXISTS("char16_t definition" "${HEADERS}" HAVE_CHAR16_T)
 
   # File access stuff
+  # fpos64_t and off64_t are not available in the C++ headers
   CHECK_FUNCTIONWITHHEADER_EXISTS("fpos64_t definition" "${HEADERS}" HAVE_FPOS64_T)
   CHECK_FUNCTIONWITHHEADER_EXISTS("off64_t definition" "${HEADERS}" HAVE_OFF64_T)
   # Check if the POSIX functions are available (even on Windows). They are preferred
   # to the Microsoft specific functions on compilers like MinGW.
+  # popen and pclose are nonstandard and may not be available in the C++ headers
   CHECK_FUNCTIONWITHHEADER_EXISTS("popen" "${HEADERS}" HAVE_POPEN)
   CHECK_FUNCTIONWITHHEADER_EXISTS("pclose" "${HEADERS}" HAVE_PCLOSE)
 
   # Signal handling functions
   CHECK_FUNCTIONWITHHEADER_EXISTS("sigjmp_buf definition" "setjmp.h" HAVE_SIGJMP_BUF)
 
-if(DCMTK_WITH_OPENSSL)
-  # Check if OpenSSL provides the SSL_CTX_get0_param function
-  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get0_param" "openssl/ssl.h" HAVE_SSL_CTX_GET0_PARAM ${OPENSSL_LIBS})
-  CHECK_FUNCTIONWITHHEADER_EXISTS("RAND_egd" "openssl/rand.h" HAVE_RAND_EGD ${OPENSSL_LIBS})
-endif()
-
 if(HAVE_LOCKF AND ANDROID)
   # When Android introduced lockf, they forgot to put the constants like F_LOCK in the
   # appropriate headers, this tests if they are defined and disables lockf if they are not
@@ -719,6 +733,13 @@ endif()
 
 # Tests that require a try-compile
 
+# We are using DCMTK_NO_TRY_RUN to disable the try_run parts, and only do the compile part.
+# To prevent the CMake Warning: Manually-specified variables were not used by the project:
+# we need to ignore it else
+if(DEFINED DCMTK_NO_TRY_RUN)
+  set(DCMTK_NO_TRY_RUN DDCMTK_NO_TRY_RUN CACHE INTERNAL "Disable compile try as part of config")
+endif()
+
 if(HAVE_MATH_H)
   if(HAVE_LIBC_H)
     # checks if <libc.h> and <math.h> cause a problem if libc.h is included extern "C"
@@ -758,24 +779,24 @@ int main()
   endif()
 endif()
 
-
 if(NOT DEFINED C_CHAR_UNSIGNED)
-  message(STATUS "Checking signedness of char")
-  DCMTK_TRY_RUN(C_CHAR_SIGNED C_CHAR_SIGNED_COMPILED "${CMAKE_BINARY_DIR}/CMakeTmp/Char"
-          "${DCMTK_SOURCE_DIR}/CMake/dcmtkTestCharSignedness.cc"
-          COMPILE_OUTPUT_VARIABLE C_CHAR_SIGNED_COMPILE_OUTPUT)
-  if(C_CHAR_SIGNED_COMPILED)
-    if(C_CHAR_SIGNED)
-      message(STATUS "Checking signedness of char -- signed")
-      set(C_CHAR_UNSIGNED 0 CACHE INTERNAL "Whether char is unsigned.")
-    else()
-      message(STATUS "Checking signedness of char -- unsigned")
-      set(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.")
-    endif()
-  else()
-    message(STATUS "Checking signedness of char -- failed")
-  endif()
-endif()
+   message(STATUS "Checking signedness of char")
+   DCMTK_TRY_COMPILE(C_CHAR_SIGNED_COMPILED "char is signed"
+"// Fail compile for unsigned char.
+int main()
+{
+  unsigned char uc = 255;
+  char *unused_array[(*reinterpret_cast<char*>(&uc) < 0)?1:-1];
+  return 0;
+}")
+   if(C_CHAR_SIGNED_COMPILED)
+     message(STATUS "Checking signedness of char -- signed")
+     set(C_CHAR_UNSIGNED 0 CACHE INTERNAL "Whether char is unsigned.")
+   else()
+     message(STATUS "Checking signedness of char -- unsigned")
+     set(C_CHAR_UNSIGNED 1 CACHE INTERNAL "Whether char is unsigned.")
+   endif()
+ endif()
 
 # Check for thread type
 if(HAVE_WINDOWS_H)
@@ -967,13 +988,7 @@ function(DCMTK_CHECK_ENABLE_LFS)
     message(STATUS "${MESSAGE}")
     # determine size of fpos_t (for the strange LFS implementation on Windows)
     set(CMAKE_EXTRA_INCLUDE_FILES)
-    if(HAVE_STDIO_H)
-      # prefer stdio.h so that is not in namespace std
-      set(CMAKE_EXTRA_INCLUDE_FILES "stdio.h")
-    elseif(HAVE_CSTDIO)
-      # use cstdio as the fallback
-      set(CMAKE_EXTRA_INCLUDE_FILES "cstdio")
-    endif()
+    set(CMAKE_EXTRA_INCLUDE_FILES "stdio.h")
     CHECK_TYPE_SIZE("fpos_t" SIZEOF_FPOS_T)
     # assume sizeof off_t to be correct, will be removed if below tests fail
     set(SIZEOF_OFF_T 8)
@@ -1258,6 +1273,13 @@ int main()
     return 0;
 }")
 
+DCMTK_TRY_COMPILE(HAVE_CXX14_DEPRECATED_ATTRIBUTE "the compiler supports [[deprecated]]" "[[deprecated]] int main(){return 0;}")
+DCMTK_TRY_COMPILE(HAVE_CXX14_DEPRECATED_ATTRIBUTE_MSG "the compiler supports [[deprecated(\"message\")]]" "[[deprecated(\"message\")]] int main(){return 0;}")
+DCMTK_TRY_COMPILE(HAVE_ATTRIBUTE_DEPRECATED "the compiler supports __attribute__((deprecated))" "__attribute__((deprecated)) int main(){return 0;}")
+DCMTK_TRY_COMPILE(HAVE_ATTRIBUTE_DEPRECATED_MSG "the compiler supports __attribute__((deprecated(\"message\")))" "__attribute__((deprecated(\"message\"))) int main(){return 0;}")
+DCMTK_TRY_COMPILE(HAVE_DECLSPEC_DEPRECATED "the compiler supports __declspec(deprecated)" "__declspec(deprecated) int main(){return 0;}")
+DCMTK_TRY_COMPILE(HAVE_DECLSPEC_DEPRECATED_MSG "the compiler supports __declspec(deprecated(\"message\"))" "__declspec(deprecated(\"message\")) int main(){return 0;}")
+
 function(DCMTK_CHECK_ITERATOR_CATEGORY CATEGORY)
     if(HAVE_ITERATOR_HEADER)
         string(TOUPPER "${CATEGORY}" CAT)
@@ -1294,23 +1316,32 @@ function(ANALYZE_ICONV_FLAGS)
                 COMPILE_DEFINITIONS "-DLIBICONV_SECOND_ARGUMENT_CONST=${LIBICONV_SECOND_ARGUMENT_CONST}"
             )
         endif()
-        DCMTK_TRY_RUN(RUN_RESULT COMPILE_RESULT
-            "${CMAKE_BINARY_DIR}/CMakeTmp/Iconv"
-            "${DCMTK_SOURCE_DIR}/config/tests/iconv.cc"
-            ${EXTRA_ARGS}
-            COMPILE_OUTPUT_VARIABLE CERR
-            RUN_OUTPUT_VARIABLE OUTPUT
-        )
-        if(COMPILE_RESULT)
-            set(DCMTK_ICONV_FLAGS_ANALYZED TRUE CACHE INTERNAL "")
-            if(RUN_RESULT EQUAL 0)
-                message(STATUS "${TEXT} - ${OUTPUT}")
-                set(DCMTK_FIXED_ICONV_CONVERSION_FLAGS "${OUTPUT}" CACHE INTERNAL "")
-            else()
-                message(STATUS "${TEXT} - unknown")
-            endif()
+        if(NOT DEFINED DCMTK_NO_TRY_RUN)
+          DCMTK_TRY_RUN(RUN_RESULT COMPILE_RESULT
+              "${CMAKE_BINARY_DIR}/CMakeTmp/Iconv"
+              "${DCMTK_SOURCE_DIR}/config/tests/iconv.cc"
+              ${EXTRA_ARGS}
+              COMPILE_OUTPUT_VARIABLE CERR
+              RUN_OUTPUT_VARIABLE OUTPUT
+          )
+          if(COMPILE_RESULT)
+              set(DCMTK_ICONV_FLAGS_ANALYZED TRUE CACHE INTERNAL "")
+              if(RUN_RESULT EQUAL 0)
+                  message(STATUS "${TEXT} - ${OUTPUT}")
+                  set(DCMTK_FIXED_ICONV_CONVERSION_FLAGS "${OUTPUT}" CACHE INTERNAL "")
+              else()
+                  message(STATUS "${TEXT} - unknown")
+              endif()
+          else()
+              message(FATAL_ERROR "${CERR}")
+          endif()
         else()
-            message(FATAL_ERROR "${CERR}")
+          if(NOT DEFINED DCMTK_ICONV_FLAGS_ANALYZED)
+            message(FATAL_ERROR "When using DCMTK_NO_TRY_RUN, set DCMTK_ICONV_FLAGS_ANALYZED")
+          endif()
+          if(NOT DEFINED DCMTK_FIXED_ICONV_CONVERSION_FLAGS)
+            message(FATAL_ERROR "When using DCMTK_NO_TRY_RUN, set DCMTK_FIXED_ICONV_CONVERSION_FLAGS")
+          endif()
         endif()
     endif()
 endfunction()
@@ -1324,21 +1355,27 @@ function(ANALYZE_STDLIBC_ICONV_DEFAULT_ENCODING)
         set(TEXT "Checking whether iconv_open() accepts \"\" as an argument")
         message(STATUS "${TEXT}")
         set(EXTRA_ARGS)
-        DCMTK_TRY_RUN(RUN_RESULT COMPILE_RESULT
-            "${CMAKE_BINARY_DIR}/CMakeTmp/lciconv"
-            "${DCMTK_SOURCE_DIR}/config/tests/lciconv.cc"
-            COMPILE_OUTPUT_VARIABLE CERR
-        )
-        if(COMPILE_RESULT)
-            if(RUN_RESULT EQUAL 0)
-                message(STATUS "${TEXT} - yes")
-                set(DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING 1 CACHE INTERNAL "")
-            else()
-                message(STATUS "${TEXT} - no")
-                set(DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING CACHE INTERNAL "")
-            endif()
+        if(NOT DEFINED DCMTK_NO_TRY_RUN)
+          DCMTK_TRY_RUN(RUN_RESULT COMPILE_RESULT
+              "${CMAKE_BINARY_DIR}/CMakeTmp/lciconv"
+              "${DCMTK_SOURCE_DIR}/config/tests/lciconv.cc"
+              COMPILE_OUTPUT_VARIABLE CERR
+          )
+          if(COMPILE_RESULT)
+              if(RUN_RESULT EQUAL 0)
+                  message(STATUS "${TEXT} - yes")
+                  set(DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING 1 CACHE INTERNAL "")
+              else()
+                  message(STATUS "${TEXT} - no")
+                  set(DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING CACHE INTERNAL "")
+              endif()
+          else()
+              message(FATAL_ERROR "${CERR}")
+          endif()
         else()
-            message(FATAL_ERROR "${CERR}")
+          if(NOT DEFINED DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING)
+            message(FATAL_ERROR "When using DCMTK_NO_TRY_RUN, set DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING")
+          endif()
         endif()
     endif()
 endfunction()
@@ -1374,28 +1411,32 @@ function(INSPECT_FUNDAMENTAL_ARITHMETIC_TYPES)
         set(ARITH_H_FILE "${ANDROID_TEMPORARY_FILES_LOCATION}/arith.h")
       endif()
     endif()
-    DCMTK_TRY_RUN(
-      RESULT COMPILED
-      "${DCMTK_BINARY_DIR}/CMakeTmp/Arith"
-      "${DCMTK_SOURCE_DIR}/config/tests/arith.cc"
-      COMPILE_DEFINITIONS -I"${DCMTK_BINARY_DIR}/config/include" -I"${DCMTK_SOURCE_DIR}/ofstd/include" -I"${DCMTK_SOURCE_DIR}/ofstd/libsrc"
-      RUN_OUTPUT_VARIABLE OUTPUT
-      COMPILE_OUTPUT_VARIABLE CERR
-      ARGS "\\\"${ARITH_H_FILE}\\\""
-    )
-    if(COMPILED)
-      if(NOT RESULT)
-        message(STATUS "${OUTPUT}")
-        if(CMAKE_CROSSCOMPILING)
-          if(ANDROID)
-            DCMTK_ANDROID_PULL(DCMTK_ANDROID_EMULATOR_INSTANCE "${ARITH_H_FILE}" DESTINATION "${ARITH_H_DESTINATION}")
+    if(NOT DEFINED DCMTK_NO_TRY_RUN)
+      DCMTK_TRY_RUN(
+        RESULT COMPILED
+        "${DCMTK_BINARY_DIR}/CMakeTmp/Arith"
+        "${DCMTK_SOURCE_DIR}/config/tests/arith.cc"
+        COMPILE_DEFINITIONS -I"${DCMTK_BINARY_DIR}/config/include" -I"${DCMTK_SOURCE_DIR}/ofstd/include" -I"${DCMTK_SOURCE_DIR}/ofstd/libsrc"
+        RUN_OUTPUT_VARIABLE OUTPUT
+        COMPILE_OUTPUT_VARIABLE CERR
+        ARGS "\\\"${ARITH_H_FILE}\\\""
+      )
+      if(COMPILED)
+        if(NOT RESULT)
+          message(STATUS "${OUTPUT}")
+          if(CMAKE_CROSSCOMPILING)
+            if(ANDROID)
+              DCMTK_ANDROID_PULL(DCMTK_ANDROID_EMULATOR_INSTANCE "${ARITH_H_FILE}" DESTINATION "${ARITH_H_DESTINATION}")
+            endif()
           endif()
+        else()
+          message(FATAL_ERROR "${OUTPUT}")
         endif()
       else()
-        message(FATAL_ERROR "${OUTPUT}")
+        message(FATAL_ERROR "${CERR}")
       endif()
     else()
-      message(FATAL_ERROR "${CERR}")
+      message("Be sure to copy arith.h to ${ARITH_H_FILE} before build")
     endif()
   endif() # file needs update
 endfunction()
@@ -1483,15 +1524,19 @@ function(DCMTK_TEST_ENABLE_STL_FEATURE NAME)
     else()
       set(MESSAGE "Checking whether STL ${NAME} works correctly")
       message(STATUS "${MESSAGE}")
-      DCMTK_TRY_RUN(RUN_RESULT COMPILE_RESULT "${CMAKE_BINARY_DIR}" "${DCMTK_SOURCE_DIR}/config/tests/${SOURCEFILE}.cc")
-      if(COMPILE_RESULT AND RUN_RESULT EQUAL 0)
-        set(RESULT 1)
-        set(TEXT_RESULT "enabled")
-        message(STATUS "${MESSAGE} -- yes")
+      if(NOT DEFINED DCMTK_NO_TRY_RUN)
+        DCMTK_TRY_RUN(RUN_RESULT COMPILE_RESULT "${CMAKE_BINARY_DIR}" "${DCMTK_SOURCE_DIR}/config/tests/${SOURCEFILE}.cc")
+        if(COMPILE_RESULT AND RUN_RESULT EQUAL 0)
+          set(RESULT 1)
+          set(TEXT_RESULT "enabled")
+          message(STATUS "${MESSAGE} -- yes")
+        else()
+          message(STATUS "${MESSAGE} -- no")
+        endif()
+        set(HAVE_STL_${FEATURE}_TEST_RESULT ${RESULT} CACHE INTERNAL "Caches the configuration test result for STL ${NAME}")
       else()
-        message(STATUS "${MESSAGE} -- no")
+        message(FATAL_ERROR "When using DCMTK_NO_TRY_RUN and STL set HAVE_STL_${FEATURE}_TEST_RESULT")
       endif()
-      set(HAVE_STL_${FEATURE}_TEST_RESULT ${RESULT} CACHE INTERNAL "Caches the configuration test result for STL ${NAME}")
     endif()
   endif()
   set(HAVE_STL_${FEATURE} ${RESULT} CACHE INTERNAL "Set to 1 if the compiler/OS provides a working STL ${NAME} implementation.")
@@ -1514,3 +1559,4 @@ DCMTK_TEST_ENABLE_STL_FEATURE("system_error" "syserr")
 if(CMAKE_CROSSCOMPILING)
   set(DCMTK_CROSS_COMPILING ${CMAKE_CROSSCOMPILING})
 endif()
+
diff --git a/CMake/dcmtk.pc.in b/CMake/dcmtk.pc.in
new file mode 100644 (file)
index 0000000..13c79c0
--- /dev/null
@@ -0,0 +1,14 @@
+ prefix="@CMAKE_INSTALL_PREFIX@"
+ exec_prefix="${prefix}"
+ libdir="${prefix}/@CMAKE_INSTALL_LIBDIR@"
+ includedir="${prefix}/include/"
+
+ Name: DCMTK
+ Description: DICOM Toolkit (DCMTK)
+ URL: https://dcmtk.org
+ Version: @DCMTK_MAJOR_VERSION@.@DCMTK_MINOR_VERSION@.@DCMTK_BUILD_VERSION@
+ Requires: @PKGCONF_REQ_PUB@
+ Requires.private: @PKGCONF_REQ_PRIV@
+ Cflags: -I"${includedir}"
+ Libs: -L"${libdir}" @PKGCONF_LIBS@
+ Libs.private: -L"${libdir}" @PKGCONF_LIBS_PRIV@
index 480ce4f5639eb72d42a926d1fa2f6ee17105510e..2e6cd29d68c168ef05a6548279a70ba79cf704d6 100644 (file)
@@ -16,6 +16,7 @@ if(BUILD_SINGLE_SHARED_LIBRARY)
 
   # Export target for build tree
   set_property(GLOBAL APPEND PROPERTY DCMTK_LIBRARY_TARGETS dcmtk)
+  target_link_libraries(DCMTK INTERFACE dcmtk)
 
   # Declare installation files. Also export libs and executables to DCMTKTargets.cmake.
   install(TARGETS dcmtk
index cdf17d78947b67ce7c00483dcbd45f3b51a0c8f6..6cbce0a913650449d3de02a060f5ad0c72543de2 100644 (file)
@@ -90,16 +90,24 @@ macro(DCMTK_ADD_LIBRARY LIBRARY)
         set_target_properties(${LIBRARY}${DCMTK_LIBRARY_SUFFIX} PROPERTIES COMPILE_DEFINITIONS "${LIBRARY}_EXPORTS")
     endif()
 
+    get_filename_component(DCMTK_ADD_LIBRARY_PARENT_DIR "${CMAKE_CURRENT_SOURCE_DIR}" PATH)
+    target_include_directories(${LIBRARY}${DCMTK_LIBRARY_SUFFIX} PUBLIC
+      $<BUILD_INTERFACE:${DCMTK_ADD_LIBRARY_PARENT_DIR}/include>
+      $<INSTALL_INTERFACE:include>
+    )
+
     if(NOT BUILD_SINGLE_SHARED_LIBRARY)
         # Remember export target for writing it to build tree later
         set_property(GLOBAL APPEND PROPERTY DCMTK_LIBRARY_TARGETS ${LIBRARY}${DCMTK_LIBRARY_SUFFIX})
+        target_link_libraries(DCMTK INTERFACE ${LIBRARY}${DCMTK_LIBRARY_SUFFIX})
 
         # Declare installation files
         install(TARGETS ${LIBRARY}${DCMTK_LIBRARY_SUFFIX}
           EXPORT DCMTKTargets
           RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" COMPONENT bin
           LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT shlib
-          ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib)
+          ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" COMPONENT lib
+        )
     endif()
 endmacro()
 
@@ -186,3 +194,52 @@ function(DCMTK_UPPER_BOUND LIST COMP VAR)
   endforeach()
   set("${VAR}" ${N} PARENT_SCOPE)
 endfunction()
+
+function(DCMTK_CREATE_INSTALL_EXPORTS)
+    # DCMTKTargets.cmake will contain list of executables and libraries produced
+    # DCMTKConfigVersion.cmake will contain DCMTK version information
+    # DCMTKConfig.cmake will contain options used to build DCMTK
+    #
+    # All three files are created within the build tree's main directory (handled in
+    # CMake/GenerateCMakeExports.cmake, and are installed to locations (OS-specific
+    # under the main install dir (handled directly below).
+
+    # Only create fully-fledged CMake export files if we have the related commands
+    include("${DCMTK_MACROS_DIR}/CheckCMakeCommandExists.cmake")
+    include(CMakePackageConfigHelpers OPTIONAL)
+    CHECK_CMAKE_COMMAND_EXISTS("CONFIGURE_PACKAGE_CONFIG_FILE")
+    CHECK_CMAKE_COMMAND_EXISTS("WRITE_BASIC_PACKAGE_VERSION_FILE")
+
+    if(HAVE_CONFIGURE_PACKAGE_CONFIG_FILE AND HAVE_WRITE_BASIC_PACKAGE_VERSION_FILE)
+
+      # Create and configure CMake export files
+      include("${DCMTK_MACROS_DIR}/GenerateCMakeExports.cmake")
+
+      # ${DCMTK_INSTALL_CONFIG} and ${DCMTK_CONFIG_VERSION} are
+      # defined within CMake/GenerateCMakeExports.cmake.
+      # Install DCMTKTargets.cmake to install tree
+      install(EXPORT DCMTKTargets FILE DCMTKTargets.cmake NAMESPACE DCMTK::
+              DESTINATION "${DCMTK_INSTALL_CMKDIR}" COMPONENT cmake)
+
+      # Install DCMTKConfig.cmake and DCMTKConfigVersion.cmake
+      install(FILES "${DCMTK_INSTALL_CONFIG}" "${DCMTK_CONFIG_VERSION}"
+              DESTINATION "${DCMTK_INSTALL_CMKDIR}" COMPONENT cmake)
+
+    else()
+
+      # Warning that we use old "configure_file" command
+      message(STATUS "Warning: Using old configure_file() mechanism to produce DCMTKConfig.cmake")
+
+      # Actually configure file
+      configure_file("${DCMTK_MACROS_DIR}/DCMTKConfig.old_cmake.in"
+                     "${DCMTK_BINARY_DIR}/DCMTKConfig.cmake" @ONLY)
+
+      # Install DCMTKConfig.cmake and DCMTKConfigVersion.cmake
+      install(FILES "${DCMTK_BINARY_DIR}/DCMTKConfig.cmake" "${DCMTK_BINARY_DIR}/DCMTKConfigVersion.cmake"
+              DESTINATION "${DCMTK_INSTALL_CMKDIR}"
+              COMPONENT cmake)
+
+    endif()
+endfunction()
+
+set(DCMTK_MACROS_DIR "${CMAKE_CURRENT_LIST_DIR}" CACHE INTERNAL "")
index 23a9278cb3a55b213432b1d891a4499a13ae1134..2f83c5acb7e9ba77a24924ecca6b1e393231af48 100644 (file)
@@ -7,11 +7,6 @@ if(DEFINED DCMTK_CONFIGURATION_DONE)
 endif()
 set(DCMTK_CONFIGURATION_DONE true)
 
-# Latest CMake version tested
-if(CMAKE_BACKWARDS_COMPATIBILITY GREATER 3.18.4)
-  set(CMAKE_BACKWARDS_COMPATIBILITY 3.18.4 CACHE STRING "Latest version of CMake when this project was released." FORCE)
-endif()
-
 # CMAKE_BUILD_TYPE is set to value "Release" if none is specified by the
 # selected build file generator. For those generators that support multiple
 # configuration types (e.g. Debug, Release), CMAKE_CONFIGURATION_TYPES holds
@@ -38,14 +33,14 @@ endif()
 #  a development snapshot and an even number indicates an official release.)
 set(DCMTK_MAJOR_VERSION 3)
 set(DCMTK_MINOR_VERSION 6)
-set(DCMTK_BUILD_VERSION 6)
+set(DCMTK_BUILD_VERSION 7)
 # The ABI is not guaranteed to be stable between different snapshots/releases,
 # so this particular version number is increased for each snapshot or release.
-set(DCMTK_ABI_VERSION 16)
+set(DCMTK_ABI_VERSION 17)
 
 # Package "release" settings (some are currently unused and, therefore, disabled)
 set(DCMTK_PACKAGE_NAME "dcmtk")
-set(DCMTK_PACKAGE_DATE "2021-01-14")
+set(DCMTK_PACKAGE_DATE "2022-04-22")
 set(DCMTK_PACKAGE_VERSION "${DCMTK_MAJOR_VERSION}.${DCMTK_MINOR_VERSION}.${DCMTK_BUILD_VERSION}")
 set(DCMTK_PACKAGE_VERSION_NUMBER ${DCMTK_MAJOR_VERSION}${DCMTK_MINOR_VERSION}${DCMTK_BUILD_VERSION})
 set(DCMTK_PACKAGE_VERSION_SUFFIX "")
@@ -54,8 +49,95 @@ set(DCMTK_PACKAGE_VERSION_SUFFIX "")
 #set(DCMTK_PACKAGE_BUGREPORT "bugs@dcmtk.org")
 #set(DCMTK_PACKAGE_URL "http://www.dcmtk.org/")
 
-# Shared library version information
-SET(DCMTK_LIBRARY_PROPERTIES VERSION "${DCMTK_ABI_VERSION}.${DCMTK_PACKAGE_VERSION}" SOVERSION "${DCMTK_ABI_VERSION}")
+option(DCMTK_LINK_STATIC "Statically link all libraries and tools with the runtime and third party libraries." OFF)
+# Modify linker flags and libraries for static builds if enabled by the user
+if(DCMTK_LINK_STATIC)
+    set(CMAKE_EXE_LINKER_FLAGS "-static")
+    set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+    # remove "-Wl,-Bdynamic"
+    list(REMOVE_ITEM CMAKE_EXE_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
+    list(REMOVE_ITEM CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS "-Wl,-Bdynamic")
+    # remove -fPIC
+    list(REMOVE_ITEM CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
+    list(REMOVE_ITEM CMAKE_SHARED_LIBRARY_CXX_FLAGS "-fPIC")
+    # remove -rdynamic
+    list(REMOVE_ITEM CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "-rdynamic")
+    list(REMOVE_ITEM CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "-rdynamic")
+    # not sure about this one, maybe static libraries don't need it:
+    set(DCMTK_LIBRARY_PROPERTIES VERSION "${DCMTK_ABI_VERSION}.${DCMTK_PACKAGE_VERSION}")
+else()
+    # Shared library version information
+    set(DCMTK_LIBRARY_PROPERTIES VERSION "${DCMTK_ABI_VERSION}.${DCMTK_PACKAGE_VERSION}" SOVERSION "${DCMTK_ABI_VERSION}")
+endif()
+
+option(DCMTK_PORTABLE_LINUX_BINARIES "Create ELF binaries while statically linking all third party libraries and libstdc++." OFF)
+if(DCMTK_PORTABLE_LINUX_BINARIES)
+    if (DCMTK_LINK_STATIC)
+        message(FATAL_ERROR "Options DCMTK_LINK_STATIC and DCMTK_PORTABLE_LINUX_BINARIES are mutually exclusive.")
+    endif()
+    # only use static versions of third party libraries
+    set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
+
+    # When using gcc and clang, use the static version of libgcc/libstdc++.
+    if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
+        (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR
+        (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") OR
+        (CMAKE_CXX_COMPILER_ID STREQUAL "ARMClang") OR
+        (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang"))
+        set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libgcc -static-libstdc++")
+    endif()
+endif()
+
+function(get_static_library STATIC_NAME LIBRARYNAME)
+    find_library("${STATIC_NAME}" "${LIBRARYNAME}")
+    if("${${STATIC_NAME}}" STREQUAL "${STATIC_NAME}-NOTFOUND")
+        # If the library is not found we probably do not need is as dependency. In the worst case it
+        # needs to be installed, but then it should also be found.
+        set("${STATIC_NAME}" "" PARENT_SCOPE)
+    else()
+        set("${STATIC_NAME}" "${${STATIC_NAME}}" PARENT_SCOPE)
+    endif()
+endfunction()
+
+# Define additional library dependencies for statically linking the third-party libraries.
+# This is difficult and error-prone, because we cannot know which extra libraries were used
+# during compilation on a specific operating system.
+# This should possibly be enhanced by using find_package() at some point. The best solution
+# would probably be to compile all third-party libraries ourself.
+if(DCMTK_LINK_STATIC OR DCMTK_PORTABLE_LINUX_BINARIES)
+    get_static_library("STATIC_DL" "libdl.a")
+    set(ICU_EXTRA_LIBS_STATIC "${STATIC_DL}")
+    get_static_library("STATIC_LZMA" "liblzma.a")
+    get_static_library("STATIC_ZLIB" "libz.a")
+    get_static_library("STATIC_ICUUC" "libicuuc.a")
+    get_static_library("STATIC_ICUDATA" "libicudata.a")
+    set(LIBXML2_EXTRA_LIBS_STATIC "${STATIC_LZMA}" "${STATIC_ZLIB}" "${STATIC_ICUUC}" "${STATIC_ICUDATA}" "${STATIC_DL}")
+    get_static_library("STATIC_PTHREAD" "libpthread.a")
+    set(OPENJPEG_EXTRA_LIBS_STATIC "${STATIC_PTHREAD}")
+    set(OPENSSL_EXTRA_LIBS_STATIC "${STATIC_DL}")
+    get_static_library("STATIC_OGG" "libogg.a")
+    get_static_library("STATIC_VORBIS" "libvorbis.a")
+    get_static_library("STATIC_VORBISENC" "libvorbisenc.a")
+    get_static_library("STATIC_OPUS" "libopus.a")
+    get_static_library("STATIC_FLAC" "libFLAC.a")
+    set(SNDFILE_EXTRA_LIBS_STATIC "${STATIC_VORBIS}" "${STATIC_OGG}" "${STATIC_VORBISENC}" "${STATIC_OPUS}" "${STATIC_FLAC}")
+    get_static_library("STATIC_WEBP" "libwebp.a")
+    get_static_library("STATIC_ZSTD" "libzstd.a")
+    get_static_library("STATIC_JBIG" "libjbig.a")
+    get_static_library("STATIC_JPEG" "libjpeg.a")
+    get_static_library("STATIC_DEFLATE" "libdeflate.a")
+    set(TIFF_EXTRA_LIBS_STATIC "${STATIC_WEBP}" "${STATIC_ZSTD}" "${STATIC_LZMA}" "${STATIC_JBIG}" "${STATIC_JBIG}" "${STATIC_DEFLATE}" "${STATIC_ZLIB}")
+    get_static_library("STATIC_NSL" "libnsl.a")
+    set(WRAP_EXTRA_LIBS_STATIC "${STATIC_NSL}")
+else()
+    set(ICU_EXTRA_LIBS_STATIC)
+    set(LIBXML2_EXTRA_LIBS_STATIC)
+    set(OPENJPEG_EXTRA_LIBS_STATIC)
+    set(OPENSSL_EXTRA_LIBS_STATIC)
+    set(SNDFILE_EXTRA_LIBS_STATIC)
+    set(TIFF_EXTRA_LIBS_STATIC)
+    set(WRAP_EXTRA_LIBS_STATIC)
+endif()
 
 # Gather information about the employed CMake version's behavior
 set(DCMTK_CMAKE_HAS_CXX_STANDARD FALSE)
@@ -76,6 +158,7 @@ option(BUILD_SHARED_LIBS "Build with shared libraries." OFF)
 option(BUILD_SINGLE_SHARED_LIBRARY "Build a single DCMTK library." OFF)
 mark_as_advanced(BUILD_SINGLE_SHARED_LIBRARY)
 set(CMAKE_DEBUG_POSTFIX "" CACHE STRING "Library postfix for debug builds. Usually left blank.")
+set(DCMTK_TLS_LIBRARY_POSTFIX "" CACHE STRING "Postfix for libraries that change their ABI when using OpenSSL.")
 # add our CMake modules to the module path, but prefer the ones from CMake.
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_ROOT}/Modules" "${CMAKE_CURRENT_SOURCE_DIR}/${DCMTK_CMAKE_INCLUDE}/CMake/")
 if(BUILD_SINGLE_SHARED_LIBRARY)
@@ -124,27 +207,31 @@ DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_TUPLE "Enable use of STL tuple.")
 DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_STL_SYSTEM_ERROR "Enable use of STL system_error.")
 DCMTK_INFERABLE_OPTION(DCMTK_ENABLE_CXX11 "Enable use of native C++11 features (eg. move semantics).")
 
-# Built-in (compiled-in) dictionary enabled on Windows per default, otherwise
-# disabled. Loading of external dictionary via run-time is, per default,
-# configured the the opposite way since most users won't be interested in using
-# the external default dictionary if it is already compiled in.
+# On Windows, the built-in dictionary is default, on Unix the external one.
+# It is not possible to use both, built-in plus external default dictionary.
 if(WIN32 OR MINGW)
-  option(DCMTK_ENABLE_BUILTIN_DICTIONARY "Configure DCMTK with compiled-in data dictionary." ON)
-  option(DCMTK_ENABLE_EXTERNAL_DICTIONARY "Configure DCMTK to load external dictionary from default path on startup." ON)
+  set(DCMTK_DEFAULT_DICT "builtin" CACHE STRING "Denotes whether DCMTK will use built-in (compiled-in), external (file), or no default dictionary on startup")
 else() # built-in dictionary turned off on Unix per default
-  option(DCMTK_ENABLE_BUILTIN_DICTIONARY "Configure DCMTK with compiled-in data dictionary." OFF)
-  option(DCMTK_ENABLE_EXTERNAL_DICTIONARY "Configure DCMTK to load external dictionary from default path on startup." ON)
+  set(DCMTK_DEFAULT_DICT "external" CACHE STRING "Denotes whether DCMTK will use built-in (compiled-in), external (file), or no default dictionary on startup")
 endif()
-if (NOT DCMTK_ENABLE_EXTERNAL_DICTIONARY AND NOT DCMTK_ENABLE_BUILTIN_DICTIONARY)
-  message(WARNING "Either external or built-in dictionary should be enabled, otherwise dictionary must be loaded manually on startup!")
+set_property(CACHE DCMTK_DEFAULT_DICT PROPERTY STRINGS builtin external none)
+if (DCMTK_DEFAULT_DICT EQUAL "none")
+  message(WARNING "Denotes whether DCMTK will use built-in (compiled-in), external (file), or no default dictionary on startup")
 endif()
 
+# Per default, we allow users to load user-defined dictionaries pointed to via
+# environment variable DCMDICTPATH.
+option(DCMTK_USE_DCMDICTPATH "Enable reading dictionary that is defined through DCMDICTPATH environment variable." ON)
+
+
 # Mark various settings as "advanced"
+mark_as_advanced(DCMTK_USE_DCMDICTPATH)
 mark_as_advanced(CMAKE_DEBUG_POSTFIX)
 mark_as_advanced(FORCE EXECUTABLE_OUTPUT_PATH LIBRARY_OUTPUT_PATH)
 mark_as_advanced(SNDFILE_DIR DCMTK_WITH_SNDFILE) # not yet needed in public DCMTK
 mark_as_advanced(DCMTK_GENERATE_DOXYGEN_TAGFILE)
 mark_as_advanced(DCMTK_WITH_OPENJPEG) # only needed by DCMJP2K module
+mark_as_advanced(DCMTK_TLS_LIBRARY_POSTFIX)
 
 if(NOT WIN32)
   # support for wide char file I/O functions is currently Windows-specific
@@ -216,14 +303,11 @@ elseif(WIN32)
 endif()
 
 #-----------------------------------------------------------------------------
-# Build directories
+# Interface target to collect all DCMTK libraries
 #-----------------------------------------------------------------------------
-set(DCMTK_BUILD_CMKDIR "${CMAKE_BINARY_DIR}")
-
-#-----------------------------------------------------------------------------
-# Start with clean DCMTKTargets.cmake, filled in GenerateCMakeExports.cmake
-#-----------------------------------------------------------------------------
-file(WRITE "${DCMTK_BUILD_CMKDIR}/DCMTKTargets.cmake" "")
+add_library(DCMTK INTERFACE)
+install(TARGETS DCMTK EXPORT DCMTKTargets)
+target_link_libraries(DCMTK INTERFACE config)
 
 #-----------------------------------------------------------------------------
 # Platform-independent settings
@@ -370,7 +454,11 @@ if(WIN32)   # special handling for Windows systems
             -D_CRT_VCCLRIT_NO_DEPRECATE
             -D_SCL_SECURE_NO_DEPRECATE
             )
+          # suppress linker warning LNK4099 about missing .pdb files when compiling in debug mode
+          set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /ignore:4099")
+          set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /ignore:4099")
         endif()
+        # Enable various warnings
       endif()
     endif()
   endif()
@@ -385,7 +473,13 @@ else()   # ... for non-Windows systems
   elseif(CMAKE_SYSTEM_NAME MATCHES "NetBSD")
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_NETBSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L")
     set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_NETBSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L")
+  # Compiler flags for DragonFly BSD
+  elseif(CMAKE_SYSTEM_NAME MATCHES "DragonFly")
+    # On DragonFly BSD, we don't set any of the feature macros because they are not needed and
+    # actually cause problems such as strlcpy() not being declared in <cstring>.
   # Solaris, FreeBSD and newer versions of OpenBSD fail with these flags
+  elseif(CMAKE_SYSTEM_NAME MATCHES "Android")
+    # On Android, we don't set any of the feature macros
   elseif(NOT CMAKE_SYSTEM_NAME MATCHES "SunOS" AND NOT CMAKE_SYSTEM_NAME MATCHES "FreeBSD" AND (NOT CMAKE_SYSTEM_NAME MATCHES "OpenBSD" OR CMAKE_SYSTEM_VERSION VERSION_LESS 4))
     # Compiler flags for all other non-Windows systems
     set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_XOPEN_SOURCE_EXTENDED -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_DEFAULT_SOURCE -D_BSD_COMPAT -D_OSF_SOURCE -D_POSIX_C_SOURCE=199506L")
@@ -469,16 +563,48 @@ define_property(GLOBAL PROPERTY DCMTK_MODERN_CXX_STANDARDS
 set_property(GLOBAL PROPERTY DCMTK_MODERN_CXX_STANDARDS 11 14 17)
 
 #-----------------------------------------------------------------------------
-# Third party libraries
+# Enable various warnings by default
 #-----------------------------------------------------------------------------
 
-include(${DCMTK_CMAKE_INCLUDE}CMake/3rdparty.cmake)
+# fallback implementation of add_compile_options()
+if(CMAKE_MAJOR_VERSION LESS 3 AND NOT CMAKE_VERSION VERSION_EQUAL 2.8.12)
+  function(add_compile_options)
+    foreach(OPTION ${ARGN})
+        foreach(FLAG C CXX)
+            string(FIND "${CMAKE_${FLAG}_FLAGS}" "${OPTION}" IDX)
+            if(IDX EQUAL -1)
+                set("CMAKE_${FLAG}_FLAGS" "${CMAKE_${FLAG}_FLAGS} ${OPTION}" PARENT_SCOPE)
+            endif()
+        endforeach()
+    endforeach()
+  endfunction()
+endif()
+
+if(MSVC)
+    # This code removes existing warning flags to prevent MSVC warning D9025.
+    # Remove it once our minimum CMake version is >= 3.15, since those newer
+    # CMake versions no longer add those flags by default.
+    foreach(FLAG C CXX)
+        string(REGEX REPLACE "[ \t\r\n]+/[wW][0-9]" "" "CMAKE_${FLAG}_FLAGS" "${CMAKE_${FLAG}_FLAGS}")
+        string(REGEX REPLACE "/[wW][0-9][ \t\r\n]*" "" "CMAKE_${FLAG}_FLAGS" "${CMAKE_${FLAG}_FLAGS}")
+    endforeach()
+    add_compile_options("/W4")
+else()
+    # Add -Wall to the compiler flags if we are compiling with gcc or Clang.
+    if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR
+        (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR
+        (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang") OR
+        (CMAKE_CXX_COMPILER_ID STREQUAL "ARMClang") OR
+        (CMAKE_CXX_COMPILER_ID STREQUAL "XLClang"))
+        add_compile_options("-Wall")
+    endif()
+endif()
 
 #-----------------------------------------------------------------------------
-# DCMTK libraries
+# Third party libraries
 #-----------------------------------------------------------------------------
 
-include(${DCMTK_CMAKE_INCLUDE}CMake/GenerateDCMTKConfigure.cmake)
+include(${DCMTK_CMAKE_INCLUDE}CMake/3rdparty.cmake)
 
 #-----------------------------------------------------------------------------
 # Dart configuration (disabled per default)
@@ -492,6 +618,12 @@ include(${DCMTK_CMAKE_INCLUDE}CMake/GenerateDCMTKConfigure.cmake)
 #   enable_testing()
 # endif()
 
+#-----------------------------------------------------------------------------
+# DCMTK libraries
+#-----------------------------------------------------------------------------
+
+include(${DCMTK_CMAKE_INCLUDE}CMake/GenerateDCMTKConfigure.cmake)
+
 #-----------------------------------------------------------------------------
 # Thread support
 #-----------------------------------------------------------------------------
@@ -520,6 +652,70 @@ if(WITH_THREADS)
   endif()
 endif()
 
+#-----------------------------------------------------------------------------
+# OpenSSL functions (these tests must be run after THREAD_LIBS is set)
+#-----------------------------------------------------------------------------
+
+# Run the OpenSSL feature tests only if OpenSSL was detected and is enabled
+if(DCMTK_WITH_OPENSSL)
+  # save previous value of CMAKE_REQUIRED_LIBRARIES
+  set(CMAKE_REQUIRED_LIBRARIES_TEMP ${CMAKE_REQUIRED_LIBRARIES})
+
+  # add OpenSSL libraries
+  set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} ${OPENSSL_LIBS} ${THREAD_LIBS})
+
+  # check whether we have <openssl/provider.h>
+  CHECK_INCLUDE_FILE_CXX("openssl/provider.h" HAVE_OPENSSL_PROVIDER_H)
+
+  # test presence of functions, constants and macros needed for the dcmtls module
+  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get0_param" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("RAND_egd" "openssl/rand.h" HAVE_OPENSSL_PROTOTYPE_RAND_EGD)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("DH_bits" "openssl/dh.h" HAVE_OPENSSL_PROTOTYPE_DH_BITS)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_RSA_PSS" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_base_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get_cert_store" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_get_ciphers" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set0_tmp_dh_pkey" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set1_curves(0,0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set1_sigalgs" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_ecdh_auto(0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_max_proto_version(0,0)" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_CTX_set_security_level" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_ASYNC" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_ASYNC_JOB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("SSL_ERROR_WANT_CLIENT_HELLO_CB" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("TLS_method" "openssl/ssl.h" HAVE_OPENSSL_PROTOTYPE_TLS_METHOD)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("X509_STORE_get0_param" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get_signature_nid" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID)
+
+  # test presence of functions, constants and macros needed for the dcmsign module
+  CHECK_FUNCTIONWITHHEADER_EXISTS("ASN1_STRING_get0_data" "openssl/asn1.h" HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_get0_EC_KEY" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_get_group_name" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("EVP_PKEY_id" "openssl/evp.h" HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("OSSL_PROVIDER_load" "openssl/provider.h" HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_STATUS_INFO_get0_failure_info" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_STATUS_INFO_get0_status" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_STATUS_INFO_get0_text" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTS_set_certs(0,0)" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTX_set_data" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTX_set_flags" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("TS_VERIFY_CTX_set_store" "openssl/ts.h" HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get0_notAfter" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("X509_get0_notBefore" "openssl/x509.h" HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE)
+
+  # check if type EVP_MD_CTX is defined as typedef for "struct evp_md_ctx_st" (new) or "struct env_md_ctx_st" (old)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("struct evp_md_ctx_st *a; EVP_MD_CTX *b=a" "openssl/evp.h" HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX)
+
+  # check if the first parameter passed to X509_ALGOR_get0() should be "const ASN1_OBJECT **" (new) or "ASN1_OBJECT **" (old)
+  CHECK_FUNCTIONWITHHEADER_EXISTS("const ASN1_OBJECT *a; X509_ALGOR_get0(&a,0,0,0)" "openssl/x509.h" HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM)
+
+  # restore previous value of CMAKE_REQUIRED_LIBRARIES
+  set(CMAKE_REQUIRED_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES_TEMP})
+endif()
+
+
 #-----------------------------------------------------------------------------
 # Test for socket libraries if needed (Solaris)
 #-----------------------------------------------------------------------------
diff --git a/CMake/dcmtkTestCharSignedness.cc b/CMake/dcmtkTestCharSignedness.cc
deleted file mode 100644 (file)
index a25633c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-/* Return 1 for char signed and 0 for char unsigned.  */
-int main()
-{
-  unsigned char uc = 255;
-  return (*reinterpret_cast<char*>(&uc) < 0)?1:0;
-}
index c3cf55c598eccad89bcebbe144c74d4c351e7888..13dadf425bf2dee4fb19278a126f0af984df911b 100644 (file)
 /* Define the default data dictionary path for the dcmdata library package */
 #define DCM_DICT_DEFAULT_PATH "@DCM_DICT_DEFAULT_PATH@"
 
-/* Define if we want a populated builtin dictionary */
-#cmakedefine ENABLE_BUILTIN_DICTIONARY "@ENABLE_BUILTIN_DICTIONARY@"
+/* Define the type of standard dictionary that we want to use:
+   0 - Do not load any default dictionary on startup
+   1 - Load builtin dictionary on startup
+   2 - Load external (i.e. file-based) dictionary on startup
+*/
+#define DCM_DICT_DEFAULT @DCM_DICT_DEFAULT@
 
-/* Define if we want load external dictionaries */
-#cmakedefine ENABLE_EXTERNAL_DICTIONARY "@ENABLE_EXTERNAL_DICTIONARY@"
+/* Define whether dictionaries defined through DCMDICTPATH variable should be loaded */
+#cmakedefine DCM_DICT_USE_DCMDICTPATH @DCM_DICT_USE_DCMDICTPATH@
 
 /* Define the environment variable path separator */
 #define ENVIRONMENT_PATH_SEPARATOR '@ENVIRONMENT_PATH_SEPARATOR@'
@@ -86,9 +90,6 @@
 /* Define to 1 if you have the `bind' function. */
 #cmakedefine HAVE_BIND @HAVE_BIND@
 
-/* Define to 1 if you have the `bzero' function. */
-#cmakedefine HAVE_BZERO @HAVE_BZERO@
-
 /* Define if your C++ compiler can work with class templates */
 #define HAVE_CLASS_TEMPLATE 1
 
 /* Define if "const" is supported by the C compiler */
 #define HAVE_C_CONST 1
 
+/* Define if your system has a declaration for fp_except_t in ieeefp.h */
+#cmakedefine HAVE_DECLARATION_FP_EXCEPT_T @HAVE_DECLARATION_FP_EXCEPT_T@
+
 /* Define if your system has a declaration for socklen_t in sys/types.h
    sys/socket.h */
 #cmakedefine HAVE_DECLARATION_SOCKLEN_T @HAVE_DECLARATION_SOCKLEN_T@
 /* Define if your system has a prototype for bind in sys/types.h sys/socket.h */
 #cmakedefine HAVE_PROTOTYPE_BIND @HAVE_PROTOTYPE_BIND@
 
-/* Define if your system has a prototype for bzero in string.h strings.h
-   libc.h unistd.h stdlib.h */
-#cmakedefine HAVE_PROTOTYPE_BZERO @HAVE_PROTOTYPE_BZERO@
-
 /* Define if your system has a prototype for connect in sys/types.h
    sys/socket.h */
 #cmakedefine HAVE_PROTOTYPE_CONNECT @HAVE_PROTOTYPE_CONNECT@
 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
 /* #undef TM_IN_SYS_TIME */
 
-/* Define if ANSI standard C++ includes are used */
-#cmakedefine USE_STD_CXX_INCLUDES
-
 /* Define if we are compiling with libiconv support. */
 #cmakedefine WITH_LIBICONV
 
@@ -1094,6 +1091,24 @@ typedef unsigned long ulong;
 /* Define if the compiler supports static_assert */
 #cmakedefine HAVE_STATIC_ASSERT @HAVE_STATIC_ASSERT@
 
+/* Define if the compiler supports [[deprecated]] */
+#cmakedefine HAVE_CXX14_DEPRECATED_ATTRIBUTE @HAVE_CXX14_DEPRECATED_ATTRIBUTE@
+
+/* Define if the compiler supports [[deprecated("message")]] */
+#cmakedefine HAVE_CXX14_DEPRECATED_ATTRIBUTE_MSG @HAVE_CXX14_DEPRECATED_ATTRIBUTE_MSG@
+
+/* Define if the compiler supports __attribute__((deprecated)) */
+#cmakedefine HAVE_ATTRIBUTE_DEPRECATED @HAVE_ATTRIBUTE_DEPRECATED@
+
+/* Define if the compiler supports __attribute__((deprecated("message"))) */
+#cmakedefine HAVE_ATTRIBUTE_DEPRECATED_MSG @HAVE_ATTRIBUTE_DEPRECATED_MSG@
+
+/* Define if the compiler supports __declspec(deprecated) */
+#cmakedefine HAVE_DECLSPEC_DEPRECATED @HAVE_DECLSPEC_DEPRECATED@
+
+/* Define if the compiler supports __declspec(deprecated("message")) */
+#cmakedefine HAVE_DECLSPEC_DEPRECATED_MSG @HAVE_DECLSPEC_DEPRECATED_MSG@
+
 /* Define if your system has a prototype for std::vfprintf in stdarg.h */
 #cmakedefine HAVE_PROTOTYPE_STD__VFPRINTF @HAVE_PROTOTYPE_STD__VFPRINTF@
 
@@ -1112,12 +1127,6 @@ typedef unsigned long ulong;
 /* Define if your system provides sigjmp_buf as conditional jmp_buf alternative */
 #cmakedefine HAVE_SIGJMP_BUF @HAVE_SIGJMP_BUF@
 
-/* Define if your OpenSSL library provides the SSL_CTX_GET0_PARAM function */
-#cmakedefine HAVE_SSL_CTX_GET0_PARAM @HAVE_SSL_CTX_GET0_PARAM@
-
-/* Define if your OpenSSL library provides the RAND_egd function */
-#cmakedefine HAVE_RAND_EGD @HAVE_RAND_EGD@
-
 /* Always define STDIO_NAMESPACE to ::, because MSVC6 gets mad if you don't. */
 #define STDIO_NAMESPACE ::
 
@@ -1220,4 +1229,117 @@ DCMTK was configured to use C++17 features, but your compiler does not or was no
 /* Define if the input iterator category is supported */
 #cmakedefine HAVE_CONTIGUOUS_ITERATOR_CATEGORY @HAVE_CONTIGUOUS_ITERATOR_CATEGORY@
 
+/* Feature Tests for the OpenSSL Library */
+
+/* Define if your OpenSSL library provides the SSL_CTX_GET0_PARAM function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM@
+
+/* Define if your OpenSSL library provides the RAND_egd function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_RAND_EGD @HAVE_OPENSSL_PROTOTYPE_RAND_EGD@
+
+/* Define if we have OpenSSL with the DH_bits() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_DH_BITS @HAVE_OPENSSL_PROTOTYPE_DH_BITS@
+
+/* Define if we have OpenSSL with the SSL_ERROR_WANT_ASYNC error code */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC @HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC@
+
+/* Define if we have OpenSSL with the SSL_ERROR_WANT_ASYNC_JOB error code */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB @HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB@
+
+/* Define if we have OpenSSL with the SSL_ERROR_WANT_CLIENT_HELLO_CB error code */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB @HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB@
+
+/* Define if we have OpenSSL with the EVP_PKEY_base_id error code */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID @HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID@
+
+/* Define if we have OpenSSL with the EVP_PKEY_RSA_PSS macro */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS @HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS@
+
+/* Define if we have OpenSSL with the SSL_CTX_get_cert_store() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE@
+
+/* Define if we have OpenSSL with the SSL_CTX_get_ciphers() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS@
+
+/* Define if we have OpenSSL with the SSL_CTX_set0_tmp_dh_pkey() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY@
+
+/* Define if we have OpenSSL with the SSL_CTX_set1_curves() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES@
+
+/* Define if we have OpenSSL with the SSL_CTX_set1_sigalgs() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS@
+
+/* Define if we have OpenSSL with the SSL_CTX_set_ecdh_auto() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO@
+
+/* Define if we have OpenSSL with the SSL_CTX_set_max_proto_version() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION@
+
+/* Define if we have OpenSSL with the SSL_CTX_set_security_level() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL @HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL@
+
+/* Define if we have OpenSSL with the TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 macro */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 @HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305@
+
+/* Define if we have OpenSSL with the TLS_method() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_TLS_METHOD @HAVE_OPENSSL_PROTOTYPE_TLS_METHOD@
+
+/* Define if we have OpenSSL with the X509_get_signature_nid() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID @HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID@
+
+/* Define if we have OpenSSL with the X509_STORE_get0_param() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM @HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM@
+
+/* Define if we have OpenSSL with the ASN1_STRING_get0_data() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA @HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA@
+
+/* Define if we have OpenSSL with the new typedef of EVP_MD_CTX as struct evp_md_ctx_st */
+#cmakedefine HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX @HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX@
+
+/* Define if we have OpenSSL with the EVP_PKEY_get0_EC_KEY() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY @HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY@
+
+/* Define if we have OpenSSL with the EVP_PKEY_get_group_name() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME @HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME@
+
+/* Define if we have OpenSSL with the EVP_PKEY_id() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID @HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID@
+
+/* Define if we have OpenSSL with the OSSL_PROVIDER_load() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD @HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD@
+
+/* Define if we have the <openssl/provider.h> header file*/
+#cmakedefine HAVE_OPENSSL_PROVIDER_H @HAVE_OPENSSL_PROVIDER_H@
+
+/* Define if we have OpenSSL with the TS_STATUS_INFO_get0_failure_info() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO @HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO@
+
+/* Define if we have OpenSSL with the TS_STATUS_INFO_get0_status() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS @HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS@
+
+/* Define if we have OpenSSL with the TS_STATUS_INFO_get0_text() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT @HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT@
+
+/* Define if we have OpenSSL with the TS_VERIFY_CTS_set_certs() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS @HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS@
+
+/* Define if we have OpenSSL with the TS_VERIFY_CTX_set_data() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA @HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA@
+
+/* Define if we have OpenSSL with the TS_VERIFY_CTX_set_flags() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS @HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS@
+
+/* Define if we have OpenSSL with the TS_VERIFY_CTX_set_store() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE @HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE@
+
+/* Define if we have OpenSSL with the X509_ALGOR_get0() function expecting a const pointer as first parameter */
+#cmakedefine HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM @HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM@
+
+/* Define if we have OpenSSL with the X509_get0_notAfter() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER @HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER@
+
+/* Define if we have OpenSSL with the X509_get0_notBefore() function */
+#cmakedefine HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE @HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE@
+
 #endif /* !OSCONFIG_H*/
index 028e1d17181870fd682b7084ea2e268419ffa456..9f8d268f3bf936e008f001f452b0fbfab1ec6eef 100644 (file)
@@ -1,19 +1,5 @@
 # Minimum CMake version required
-cmake_minimum_required(VERSION 2.8.5 FATAL_ERROR)
-
-# As of 2018-12-26 DCMTK has been validated to build with CMake 3.13.2 policies.
-set(DCMTK_MAX_CMAKE_POLICY_VERSION 3.13.2)
-
-# Set and use the newest CMake policies that are validated to work
-# (VERSION_LESS comparison is only defined for CMake 3 and newer)
-if(CMAKE_MAJOR_VERSION LESS 3)
-    set(DCMTK_CMAKE_POLICY_VERSION "${CMAKE_VERSION}")
-elseif(CMAKE_VERSION VERSION_LESS DCMTK_MAX_CMAKE_POLICY_VERSION)
-    set(DCMTK_CMAKE_POLICY_VERSION "${CMAKE_VERSION}")
-else()
-    set(DCMTK_CMAKE_POLICY_VERSION "${DCMTK_MAX_CMAKE_POLICY_VERSION}")
-endif()
-cmake_policy(VERSION "${DCMTK_CMAKE_POLICY_VERSION}")
+cmake_minimum_required(VERSION 3.0.0...3.13.2 FATAL_ERROR)
 
 # Declare project
 project(DCMTK)
@@ -29,6 +15,14 @@ set(DCMTK_MODULES ofstd oflog dcmdata dcmimgle
   dcmseg dcmtract dcmpmap dcmect
   CACHE STRING "List of modules that should be built.")
 
+# Provide an interface target to elegantly include the config directory
+add_library(config INTERFACE)
+target_include_directories(config INTERFACE
+  $<BUILD_INTERFACE:${DCMTK_BINARY_DIR}/config/include>
+  $<INSTALL_INTERFACE:include>
+)
+install(TARGETS config EXPORT DCMTKTargets)
+
 # Include directories
 set(DCMTK_INCLUDE_DIR "${DCMTK_BINARY_DIR}/config/include")
 foreach(inc ${DCMTK_MODULES})
@@ -109,50 +103,9 @@ install(DIRECTORY docs/ DESTINATION "${CMAKE_INSTALL_DOCDIR}"
 #-----------------------------------------------------------------------------
 # Create an install configuration files for external projects
 #-----------------------------------------------------------------------------
-#
-# DCMTKTargets.cmake will contain list of executables and libraries produced
-# DCMTKConfigVersion.cmake will contain DCMTK version information
-# DCMTKConfig.cmake will contain options used to build DCMTK
-#
-# All three files are created within the build tree's main directory (handled in
-# CMake/GenerateCMakeExports.cmake, and are installed to locations (OS-specific
-# under the main install dir (handled directly below).
-
-# Only create fully-fledged CMake export files if we have the related commands
-include(CMake/CheckCMakeCommandExists.cmake)
-include(CMakePackageConfigHelpers OPTIONAL)
-CHECK_CMAKE_COMMAND_EXISTS("CONFIGURE_PACKAGE_CONFIG_FILE")
-CHECK_CMAKE_COMMAND_EXISTS("WRITE_BASIC_PACKAGE_VERSION_FILE")
-
-if(HAVE_CONFIGURE_PACKAGE_CONFIG_FILE AND HAVE_WRITE_BASIC_PACKAGE_VERSION_FILE)
-
-  # Create and configure CMake export files
-  include(CMake/GenerateCMakeExports.cmake)
-
-  # ${DCMTK_INSTALL_CONFIG} and ${DCMTK_CONFIG_VERSION} are
-  # defined within CMake/GenerateCMakeExports.cmake.
-  # Install DCMTKTargets.cmake to install tree
-  install(EXPORT DCMTKTargets FILE DCMTKTargets.cmake
-          DESTINATION "${DCMTK_INSTALL_CMKDIR}" COMPONENT cmake)
-
-  # Install DCMTKConfig.cmake and DCMTKConfigVersion.cmake
-  install(FILES "${DCMTK_INSTALL_CONFIG}" "${DCMTK_CONFIG_VERSION}"
-          DESTINATION "${DCMTK_INSTALL_CMKDIR}" COMPONENT cmake)
-
-else()
-
-  # Warning that we use old "configure_file" command
-  message(STATUS "Warning: Using old configure_file() mechanism to produce DCMTKConfig.cmake")
-
-  # Actually configure file
-  configure_file("${DCMTK_SOURCE_DIR}/CMake/DCMTKConfig.old_cmake.in"
-                 "${DCMTK_BINARY_DIR}/DCMTKConfig.cmake" @ONLY)
-
-  # Install DCMTKConfig.cmake and DCMTKConfigVersion.cmake
-  install(FILES "${DCMTK_BINARY_DIR}/DCMTKConfig.cmake" "${DCMTK_BINARY_DIR}/DCMTKConfigVersion.cmake"
-          DESTINATION "${DCMTK_INSTALL_CMKDIR}"
-          COMPONENT cmake)
 
+if(NOT DCMTK_NO_EXPORT)
+    dcmtk_create_install_exports()
 endif()
 
 #-----------------------------------------------------------------------------
@@ -195,3 +148,65 @@ else()
     "${DCMTK_RUN_CTEST_SCRIPT}" ESCAPE_QUOTES @ONLY
   )
 endif()
+
+#-----------------------------------------------------------------------------
+# Generate pkgconfig
+#-----------------------------------------------------------------------------
+
+if(DCMTK_WITH_ICONV)
+    # libiconv does not provide a .pc file
+    set(PKGCONF_LIBS_PRIV "${PKGCONF_LIBS_PRIV} ${Iconv_LIBRARY} ${LIBCHARSET_LIBRARY}")
+endif()
+
+if(DCMTK_WITH_ICU)
+    set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} icu-uc")
+endif()
+
+if(DCMTK_WITH_LIBXML)
+    set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} libxml-2.0")
+endif()
+
+if(DCMTK_WITH_LIBPNG)
+    set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} libpng")
+endif()
+
+if(DCMTK_WITH_OPENJPEG)
+    set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} libopenjp2")
+endif()
+
+if(DCMTK_WITH_OPENSSL)
+    set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} libssl libcrypto")
+endif()
+
+if(DCMTK_WITH_SNDFILE)
+    set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} sndfile")
+endif()
+
+if(DCMTK_WITH_TIFF)
+    set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} libtiff-4")
+endif()
+
+if(DCMTK_WITH_WRAP)
+    # libwrap does not provide a .pc file
+    set(PKGCONF_LIBS_PRIV "${PKGCONF_LIBS_PRIV} ${WRAP_LIBRARY}")
+endif()
+
+if(DCMTK_WITH_ZLIB)
+    set(PKGCONF_REQ_PRIV "${PKGCONF_REQ_PRIV} zlib")
+endif()
+
+get_property(DCMTK_LIBRARY_TARGETS GLOBAL PROPERTY DCMTK_LIBRARY_TARGETS)
+
+foreach(T ${DCMTK_LIBRARY_TARGETS})
+    set(PKGCONF_LIBS "${PKGCONF_LIBS} -l${T}")
+endforeach()
+
+configure_file(
+    ${DCMTK_SOURCE_DIR}/CMake/dcmtk.pc.in
+    ${DCMTK_BINARY_DIR}/dcmtk.pc
+    @ONLY
+)
+
+install(FILES "${DCMTK_BINARY_DIR}/dcmtk.pc"
+    DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig
+)
index 6de6e4eb7bac85163938019adde5d87fc1fa97e9..fae0da19bfc0d9f08b56131dd777011cfb01d6bc 100644 (file)
--- a/COPYRIGHT
+++ b/COPYRIGHT
@@ -5,7 +5,7 @@ Unless otherwise specified, the DCMTK software package has the following
 copyright:
 
 /*
- *  Copyright (C) 1994-2021, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.
  *
  *  This software and supporting documentation were developed by
@@ -501,8 +501,8 @@ The dcmrt sub-package is covered by the following copyright:
 
 ---------------------------------------------------------------------------
 
-Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
-Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany
+Copyright (C) 2008-2022, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
+Copyright (C) 2013-2022, J. Riesmeier, Oldenburg, Germany
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
@@ -537,7 +537,7 @@ Parts of the dcmsr sub-package are covered by the following copyright:
 
 ---------------------------------------------------------------------------
 
-Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany
+Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
 All rights reserved.
 
 Redistribution and use in source and binary forms, with or without
diff --git a/CREDITS b/CREDITS
index b4a3902fe2fa8ff0376bcbc1dc0fad65970de0a3..20288f89f5700aab70bfe4607914682852ced417 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -5,7 +5,7 @@ We would like to thank the following individuals, companies and organizations
 (in alphabetical order) for supporting the development and maintenance of the
 Open Source DICOM Toolkit DCMTK:
 
-Carl Zeiss Meditec: The preparation and publication of the DCMTK 3.6.2 release 
+Carl Zeiss Meditec: The preparation and publication of the DCMTK 3.6.2 release
   as well as several extensions in wlmscpfs and dcmqrscp were supported by
   funding from Carl Zeiss Meditec AG (Muenchen, Germany).
 
@@ -43,6 +43,10 @@ QIICR: The work on various DCMTK modules was supported in part by funding from
   Cancer Research (ITCR) initiative to the Quantitative Image Informatics for
   Cancer Research (QIICR) project, award U24 CA180918.
 
+Segmed: The support for reading DICOM files or datasets from stdin and writing
+  DICOM files or datasets to stdout was contributed by Jasper den Otter and
+  W. Adam Koszek of Segmed, Inc. (Palo Alto, CA, United States).
+
 SlicerDMRI: The work on DCMTK Tractography modules was supported in part by
   funding from the National Institutes of Health National Institute of
   Biomedical Imaging and Bioengineering (NIBIB), to project Neuroimage Analysis
@@ -61,4 +65,4 @@ YXLON: The work on the initial version of the DICONDE data dictionary was
 Please note that this list does not claim to be exhaustive.  Just send us an
 email if you think that you or your company/organization should also be listed.
 
-DCMTK Team, 2021-01-14
+DCMTK Team, 2022-02-08
diff --git a/INSTALL b/INSTALL
index 24f317cdc0ef73cd57a2682e1db732399beca02d..2105c1fa9dee719f9e2d10eca1e3c5f762e67bf5 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,3 +1,4 @@
+==================================
 DICOM TOOLKIT (DCMTK) INSTALLATION
 ==================================
 
@@ -6,15 +7,13 @@ PRE-REQUISITES
 ==============
 
 The DICOM toolkit (DCMTK) needs to be compiled with a C++ compiler.  We
-recommend using the GNU C++ compiler in versions higher than 4.2.1 (most of the
-development for this release was done using GNU C++ 6.3.0 on Debian Linux).
-The software is also known to compile using the SUNPro C++ compiler, Clang and
-Microsoft Visual Studio.
+recommend using the GNU C++ compiler in versions higher than 4.8.5 (most of the
+development for this release was done using GNU gcc 10.2.1 on Debian Linux and
+GNU gcc 9.4.0 on Ubuntu Linux).  The software is also known to compile using
+Clang and Microsoft Visual Studio.
 
 Compatibility with other C++ compilers is unknown, however, we have tried to
-keep language demands to a minimum (newer C++ features such as Exceptions and
-RTTI have been avoided and fall back implementations for all used STL classes
-are provided).
+keep language demands to a minimum.
 
 You will need several hundred Mbytes of disk space to compile all the software.
 
@@ -33,26 +32,27 @@ system / hardware / compiler combinations:
 
    Windows 7       / Intel x86    / Microsoft Visual C++ 2010 Express (VS 10)
    Windows 7       / Intel x86    / Microsoft Visual C++ 2015 Community (VS 14)
+   Windows 7       / Intel x86    / Microsoft Visual C++ 2017 Community (VS 15)
+   Windows 7       / Intel x86    / Microsoft Visual C++ 2019 Community (VS 16)
+   Windows 7       / Intel x86    / MinGW gcc 9.2.0 (i686-w64-mingw32)
    Windows 7       / amd64|x86_64 / Microsoft Visual C++ 2010 Express (VS 10)
    Windows 7       / amd64|x86_64 / Microsoft Visual C++ 2015 Community (VS 14)
-   Windows 10      / Intel x86    / Microsoft Visual C++ 2008 Express (VS 9)
-   Windows 10      / Intel x86    / Microsoft Visual C++ 2010 Express (VS 10)
-   Windows 10      / Intel x86    / Microsoft Visual C++ 2012 Express (VS 11)
-   Windows 10      / Intel x86    / Microsoft Visual C++ 2013 Express (VS 12)
+   Windows 7       / amd64|x86_64 / Microsoft Visual C++ 2017 Community (VS 15)
+   Windows 7       / amd64|x86_64 / Microsoft Visual C++ 2019 Community (VS 16)
+   Windows 7       / amd64|x86_64 / MinGW gcc 9.2.0 (x86_64-w64-mingw32)
+   Windows 7       / amd64|x86_64 / Cygwin GCC 7.4.0 (x86_64-pc-cygwin)
    Windows 10      / Intel x86    / Microsoft Visual C++ 2015 Community (VS 14)
    Windows 10      / Intel x86    / Microsoft Visual C++ 2017 Community (VS 15)
    Windows 10      / Intel x86    / Microsoft Visual C++ 2019 Community (VS 16)
-   Windows 10      / Intel x86    / MinGW gcc 9.2.0 (i686-w64-mingw32)
-   Windows 10      / Intel x86    / MinGW gcc 10.2.0 (i686-w64-mingw32)
-   Windows 10      / Intel x86    / MinGW Clang 10.0.1 (i686-w64-mingw32)
-   Windows 10      / amd64|x86_64 / Microsoft Visual C++ 2012 Express (VS 11)
-   Windows 10      / amd64|x86_64 / Microsoft Visual C++ 2013 Express (VS 12)
+   Windows 10      / Intel x86    / Microsoft Visual C++ 2022 Community (VS 17)
+   Windows 10      / Intel x86    / MinGW gcc 11.2.0 (i686-w64-mingw32)
+   Windows 10      / Intel x86    / MinGW Clang 13.0.0 (i686-w64-windows-gnu)
    Windows 10      / amd64|x86_64 / Microsoft Visual C++ 2015 Community (VS 14)
    Windows 10      / amd64|x86_64 / Microsoft Visual C++ 2017 Community (VS 15)
    Windows 10      / amd64|x86_64 / Microsoft Visual C++ 2019 Community (VS 16)
-   Windows 10      / amd64|x86_64 / MinGW gcc 9.2.0 (x86_64-w64-mingw32)
-   Windows 10      / amd64|x86_64 / MinGW gcc 10.2.0 (x86_64-w64-mingw32)
-   Windows 10      / amd64|x86_64 / MinGW Clang 10.0.1 (x86_64-w64-mingw32)
+   Windows 10      / amd64|x86_64 / Microsoft Visual C++ 2022 Community (VS 17)
+   Windows 10      / amd64|x86_64 / MinGW gcc 11.2.0 (x86_64-w64-mingw32)
+   Windows 10      / amd64|x86_64 / MinGW Clang 13.0.0 (x86_64-w64-windows-gnu)
 
 Unix (or lookalikes)
 --------------------
@@ -61,29 +61,60 @@ The current DCMTK software release successfully compiles on the following
 operating system / hardware / compiler combinations using the instructions
 given below:
 
-   FreeBSD 12.2    / amd64|x86_64 / Clang 10.0.1
-   Linux 3.2.0     / amd64|x86_64 / GNU gcc 4.4.7     (Debian 7.11)
+   FreeBSD 13.0    / amd64|x86_64 / Clang 11.0.1
    Linux 3.10.0    / amd64|x86_64 / Clang 3.4.2       (CentOS 7.9)
    Linux 3.10.0    / amd64|x86_64 / GNU gcc 4.8.5     (CentOS 7.9)
+   Linux 4.19.0    / amd64|x86_64 / Clang 7.0.1       (Debian 10)
+   Linux 4.19.0    / amd64|x86_64 / GNU 10.3.1        (Alpine 3.15.0 with musl libc)
+   Linux 4.19.0    / amd64|x86_64 / GNU gcc 8.3.0     (Debian 10)
+   Linux 4.19.0    / amd64|x86_64 / GNU gcc 8.3.0     (Debian 10)
+   Linux 5.10.0    / Intel x86    / Clang 11.0.1      (Debian 11)
+   Linux 5.10.0    / Intel x86    / GNU gcc 10.2.1    (Debian 11)
+   Linux 5.4.0     / amd64|x86_64 / Clang 10.0.0      (Ubuntu 20.04)
+   Linux 5.4.0     / amd64|x86_64 / Clang 9.0.1       (Ubuntu 20.04)
+   Linux 5.4.0     / amd64|x86_64 / GNU gcc 10.3.0    (Ubuntu 20.04)
+   Linux 5.4.0     / amd64|x86_64 / GNU gcc 9.3.0     (Ubuntu 20.04)
+   Linux 5.13.0    / amd64|x86_64 / Clang 13.0.0-2    (Ubuntu 21.10)
+   Linux 5.13.0    / amd64|x86_64 / GNU gcc 11.2.0    (Ubuntu 21.10)
+   MacOS X 10.15   / amd64|x86_64 / Apple Clang 11.0.0
+   MacOS X 10.15   / amd64|x86_64 / GNU gcc 9.2.0
+   NetBSD 9.0      / amd64|x86_64 / Clang 10.0.1
+   NetBSD 9.0      / amd64|x86_64 / GNU gcc 7.5.0
+   OpenBSD 7.0     / amd64|x86_64 / Clang 11.1.1
+   OpenIndiana     / amd64|x86_64 / GNU gcc 10.3.0    (OpenIndiana 2021.10)
+
+Cross Compiling
+---------------
+
+For target platforms other than Android, see section "CROSS COMPILING WITH CMAKE"
+below.  For Android, the current DCMTK release can be cross-compiled targeting
+the following platform:
+
+   Android         / arm64        / GNU gcc 8.3.0     (API 24, ABI arm64-v8a)
+
+Cross compiling support with running configuration and unit tests is provided
+using CMake and requires the use of the Android emulator or Wine when targeting
+Android or Windows respectively.  Other versions of Android will most likely
+also work, but the above mentioned one is currently the only one that is being
+regularly tested.
+
+Other Platforms
+---------------
+
+The previous minor release DCMTK 3.6.6 was also tested on the following
+platforms that may still work, but were not tested again for this minor release:
+
+   FreeBSD 12.2    / amd64|x86_64 / Clang 10.0.1
    Linux 3.13.0    / amd64|x86_64 / Clang 3.9.1       (Linux Mint 17.3)
    Linux 3.13.0    / amd64|x86_64 / GNU gcc 4.8.5     (Linux Mint 17.3)
    Linux 3.13.0    / amd64|x86_64 / GNU gcc 5.5.0     (Linux Mint 17.3)
    Linux 3.13.0    / amd64|x86_64 / GNU gcc 6.5.0     (Linux Mint 17.3)
    Linux 3.13.0    / amd64|x86_64 / GNU gcc 7.5.0     (Linux Mint 17.3)
    Linux 3.13.0    / amd64|x86_64 / GNU gcc 8.4.0     (Linux Mint 17.3)
+   Linux 3.2.0     / amd64|x86_64 / GNU gcc 4.4.7     (Debian 7.11)
    Linux 4.19.0    / Intel x86    / Clang 7.0.1       (Debian 10)
    Linux 4.19.0    / Intel x86    / GNU gcc 8.3.0     (Debian 10)
-   Linux 4.19.0    / amd64|x86_64 / Clang 7.0.1       (Debian 10)
-   Linux 4.19.0    / amd64|x86_64 / GNU gcc 8.3.0     (Debian 10)
    Linux 4.19.41   / amd64|x86_64 / GNU 8.3.0         (Alpine 3.9.4 with musl libc)
-   Linux 5.4.0     / amd64|x86_64 / Clang 9.0.1       (Ubuntu 20.04)
-   Linux 5.4.0     / amd64|x86_64 / Clang 10.0.0      (Ubuntu 20.04)
-   Linux 5.4.0     / amd64|x86_64 / GNU gcc 9.3.0     (Ubuntu 20.04)
-   Linux 5.4.0     / amd64|x86_64 / GNU gcc 10.2.0    (Ubuntu 20.04)
-   Linux 5.8.0     / amd64|x86_64 / GNU gcc 10.2.0    (Ubuntu 20.10)
-   Linux 5.8.0     / amd64|x86_64 / Clang 11.0.0      (Ubuntu 20.10)
-   MacOS X 10.15   / amd64|x86_64 / Apple Clang 11.0.0
-   MacOS X 10.15   / amd64|x86_64 / GNU gcc 9.2.0
    NetBSD 9.0      / amd64|x86_64 / Clang 9.0.1
    NetBSD 9.0      / amd64|x86_64 / GNU gcc 7.4.0
    OpenBSD 6.8     / amd64|x86_64 / Clang 10.0.1
@@ -93,23 +124,14 @@ given below:
    Solaris 11.3    / Intel x86    / GNU gcc 4.8.2
    Solaris 11.3    / Intel x86    / SunPro CC 5.14    (Oracle Developer Studio 12.5)
    Solaris 11.3    / Intel x86    / SunPro CC 5.15    (Oracle Developer Studio 12.6)
-
-Cross Compiling
----------------
-
-The current DCMTK release can be cross-compiled targeting the following
-platforms:
-
-   Android         / arm64        / GNU gcc 8.3.0     (API 24, ABI arm64-v8a)
-
-Cross compiling support with running configuration and unit tests is currently
-only provided using CMake and requires the use of the Android emulator or Wine
-when targeting Android or Windows respectively.  Other versions of Android will
-most likely also work, but the above mentioned one is currently the only one
-that is being regularly tested.
-
-Other Platforms
----------------
+   Windows 10      / Intel x86    / Microsoft Visual C++ 2008 Express (VS 9)
+   Windows 10      / Intel x86    / Microsoft Visual C++ 2010 Express (VS 10)
+   Windows 10      / Intel x86    / Microsoft Visual C++ 2012 Express (VS 11)
+   Windows 10      / Intel x86    / Microsoft Visual C++ 2013 Express (VS 12)
+   Windows 10      / Intel x86    / MinGW Clang 10.0.1 (i686-w64-mingw32)
+   Windows 10      / Intel x86    / MinGW gcc 10.2.0 (i686-w64-mingw32)
+   Windows 10      / amd64|x86_64 / Microsoft Visual C++ 2012 Express (VS 11)
+   Windows 10      / amd64|x86_64 / Microsoft Visual C++ 2013 Express (VS 12)
 
 The previous minor release DCMTK 3.6.5 was also tested on the following
 platforms that may still work, but were not tested again for this minor release:
@@ -149,20 +171,6 @@ platforms that may still work, but were not tested again for this minor release:
    Windows 7       / amd64|x86_64 / CygWin 2.8.0      (gcc 6.3.0)
    OpenIndiana     / Intel x86    / Clang 4.0.0       (OpenIndiana 2017.04)
 
-The previous release DCMTK 3.6.2 was also tested on the following platforms
-that may still work, but were not tested again for this minor release:
-
-   QNX 6.5         / Intel x86    / GNU gcc 4.4.2 (see note *1)
-   Windows 8.1     / Intel x86    / Microsoft Visual C++ 2008 Express (VS 9)
-   Windows 8.1     / Intel x86    / Microsoft Visual C++ 2010 Express (VS 10)
-   Windows 8.1     / Intel x86    / Microsoft Visual C++ 2012 Express (VS 11)
-   Windows 8.1     / Intel x86    / Microsoft Visual C++ 2015 Express (VS 14)
-   Windows 8.1     / Intel x86    / Microsoft Visual C++ 2017 Community (VS 15)
-   Windows 8.1     / amd64|x86_64 / Microsoft Visual C++ 2010 Express (VS 10)
-   Windows 8.1     / amd64|x86_64 / Microsoft Visual C++ 2012 Express (VS 11)
-   Windows 8.1     / amd64|x86_64 / Microsoft Visual C++ 2015 Express (VS 14)
-   Windows 8.1     / amd64|x86_64 / Microsoft Visual C++ 2017 Community (VS 15)
-
 Cross compilers:
 
    Windows 7       / Intel x86    / MinGW gcc 4.9.1 (Linux host)
@@ -170,15 +178,8 @@ Cross compilers:
 
 Earlier releases of the DCMTK are known to also compile on further platforms
 which are not available to us for testing purposes any more, e.g. AIX, HP-UX,
-IRIX, NeXTStep, OSF/1, Solaris/SunOS, Ultrix.  Also the Intel C++ Compiler and
-other compilers might still work but we haven't tested them this time.
-
-Platform Notes
---------------
-
-(*1) QNX 6.5 requires to remove or disable the define "HAVE_IEEEFP_H" in
-     "config/include/dcmtk/config/osconfig.h" after running the configure
-     process but before starting the compilation.
+IRIX, NeXTStep, OSF/1, QNX, Solaris/SunOS, Ultrix. Also the Intel C++ Compiler
+and other compilers might still work but we haven't tested them this time.
 
 
 OPENSSL SUPPORT
@@ -194,14 +195,7 @@ the use of OpenSSL 1.0.2 or newer, however, since some  optional functions
 recommended by RFC 7525 / BCP 195 are only available  starting with this
 OpenSSL release.  Furthermore, users should make care that the most recent
 OpenSSL patch level is applied.  This release of DCMTK is known to compile with
-the OpenSSL releases 1.0.1 to 1.1.1i.
-
-Note: DCMTK 3.6.6 is explicitly NOT approved for use with the upcoming
-OpenSSL 3.0.0 library, which is currently in "alpha" status. OpenSSL 3.0
-will NOT work correctly with the dcmsign module, as it requires some additional
-code to load the RIPEMD160 routines, which have been moved to the so-called
-"legacy provider" that is not active by default; the required modifications
-will be included in the next DCMTK release.
+the OpenSSL releases 1.0.1 to 3.0.0.
 
 When using CMake, if support for security enhancements is desired, a compiled
 version of the OpenSSL libraries and include files must be available during
@@ -210,6 +204,23 @@ and enables support automatically if present.  By default, DCMTK checks the
 standard paths on Unix platforms.  For Windows platforms, check the discussion
 on CMake below.
 
+Known Issues related to OpenSSL
+-------------------------------
+
+The ABI of various DCMTK libraries changes when DCMTK is built with or without
+OpenSSL.  This may result in hard to locate bugs e.g. when using a command line
+tool that depend on one of those libraries while mixing a non OpenSSL build
+with an OpenSSL enabled build of DCMTK (for example when installing an OpenSSL
+enabled DCMTK on top of a DCMTK installation without OpenSSL support).  We have
+introduced a CMake variable called "DCMTK_TLS_LIBRARY_POSTFIX" as a workaround.
+If you plan on mixing OpenSSL and non OpenSSL enabled builds (or can't be sure
+that your builds won't be mixed by somebody else), we suggest setting
+"DCMTK_TLS_LIBRARY_POSTFIX" to some different string for the different builds
+(e.g. an empty string for the non OpenSSL build and "-openssl" for the other).
+This way, all affected libraries will be named including the chosen postfix,
+effectively preventing the unintended mixing and, therefore, preventing the
+bugs.
+
 
 ZLIB SUPPORT
 ============
@@ -217,8 +228,8 @@ ZLIB SUPPORT
 Starting with release 3.5.2, DCMTK supports the "Deflated Explicit VR Little
 Endian" Transfer Syntax, i.e. ZIP-compressed network transmission and media
 storage.  DCMTK relies on the zlib toolkit (www.zlib.org) for the underlying
-compression routines.  This release of DCMTK is known to compile with the zlib
-releases 1.2.8 to 1.2.11, although other releases may work as well.
+compression routines.  This release of DCMTK is known to compile with zlib
+releases 1.2.11, although other releases may work as well.
 
 When using CMake, a compiled version of the zlib libraries and include files
 must be available during compilation of DCMTK.  See discussion on CMake below.
@@ -229,11 +240,8 @@ LIBTIFF SUPPORT
 
 Starting with release 3.5.1, DCMTK supports the conversion of DICOM images to
 TIFF.  DCMTK relies on the libtiff toolkit (www.libtiff.org) for this purpose.
-This release of DCMTK is known to compile with the libtiff releases 3.8.2 to
-4.1.0, although other releases may work as well.  However, libtiff releases
-prior to version 3.7.0 will not work since the TIFFCleanup() function was not
-yet available.  On Windows, libtiff 3.7.4 or higher is required due to
-incompatible API changes in libtiff.
+This release of DCMTK is known to compile with libtiff release 4.3.0,
+although other releases may work as well.
 
 When using CMake, a compiled version of the libtiff libraries and include files
 must be available during compilation of DCMTK.  See discussion on CMake below.
@@ -244,8 +252,8 @@ LIBPNG SUPPORT
 
 Starting with release 3.5.3, DCMTK supports the conversion of DICOM images to
 PNG.  DCMTK relies on the libpng toolkit (www.libpng.org) for this purpose.
-This release of DCMTK is known to compile with the current libpng releases
-1.2.50 to 1.6.37, although other releases may work as well.
+This release of DCMTK is known to compile with libpng release 1.6.37,
+although other releases may work as well.
 
 When using CMake, a compiled version of the libpng libraries and include
 files must be available during compilation of DCMTK.  See discussion on CMake
@@ -257,8 +265,8 @@ LIBXML2 SUPPORT
 
 Starting with release 3.5.3, DCMTK supports the conversion of XML documents to
 DICOM files.  DCMTK relies on the libxml2 toolkit (www.libxml.org) for this
-purpose.  This release of DCMTK is known to compile with the libxml2 releases
-2.9.4 to 2.9.10, although other releases may work as well.
+purpose.  This release of DCMTK is known to compile with libxml2 release
+2.9.12, although other releases may work as well.
 
 When using CMake, if support for XML import is desired, a compiled version of
 the libxml2 (and possibly iconv) libraries and include files must be available
@@ -310,7 +318,7 @@ LIBICONV SUPPORT
 
 The libiconv toolkit (www.gnu.org/s/libiconv/) may be used as DCMTK's underlying
 character set conversion implementation.  This release of DCMTK is known to
-compile with the libiconv release 1.15, although other releases may work as
+compile with the libiconv release 1.16, although other releases may work as
 well.
 
 When using CMake, a compiled version of the libiconv and libcharset libraries
@@ -322,15 +330,14 @@ ICU SUPPORT
 
 DCMTK supports the International Components for Unicode (ICU) library as an
 alternative to the above mentioned libiconv.  This release of DCMTK is known to
-compile with the ICU releases 59.1 to 68.1.0, although other releases may work
-as well.
+compile with ICU release 70.1, although other releases may work as well.
 
 The ICU may be easier to integrate on some more modern Linux distributions
 (e.g. Arch Linux) and Windows than the libiconv but (due to the way it is
 currently integrated) lacks support for converting the following character sets:
 
-  ISO 2022 IR 87
-  ISO 2022 IR 159
+  ISO 2022 IR 87 (JIS X0208)
+  ISO 2022 IR 159 (JIS X0212)
 
 Furthermore, the ICU-based implementation currently does not support
 transliteration.
@@ -433,8 +440,8 @@ directories.  In detail, these "CMakeLists.txt" files will serve as an input to
 CMake which will generate suitable build files for all of DCMTK's projects from
 these files.
 
-DCMTK 3.6.6 requires CMake version 2.8.5 or later.  We recommend using the
-latest stable release of CMake (currently version 3.19.2) since newer versions
+DCMTK 3.6.7 requires CMake version 2.8.8 or later.  We recommend using the
+latest stable release of CMake (currently version 3.22.2) since newer versions
 of CMake often provide better output in case of errors and are generally easier
 to use (for example by providing better support for detecting the availability
 of third party libraries).  If possible, use the CMake version your operating
@@ -488,17 +495,13 @@ projects by using CMake's find_package() mechanism in "CONFIG" mode in order to
 adapt their own build configuration, and directly make use of all available
 target libraries and executables.
 
-On systems using CMake versions equal or greater than 2.8.8, these files are
-written during installation to the installation directory's subfolder "/cmake"
-on Windows systems, and "/lib/cmake/dcmtk" on Unix-like systems.  Additionally,
-these files are written to the main directory of CMake's build tree during the
-build, with all content (e.g. the include paths within DCMTConfig.cmake)
-pointing to the correct values for the build tree.  Thus even a DCMTK build tree
-can be used by external projects that process these two files.
-
-On systems using CMake versions lower than 2.8.8, only a simplified
-DCMTKConfig.cmake is created, which is only available in the install tree.
-DCMTKTargets.cmake is not created at all.
+These files are written during installation to the installation directory's
+subfolder "/cmake" on Windows systems, and "/lib/cmake/dcmtk" on Unix-like
+systems.  Additionally, these files are written to the main directory of
+CMake's build tree during the build, with all content (e.g. the include
+paths within DCMTConfig.cmake) pointing to the correct values for the build
+tree.  Thus even a DCMTK build tree can be used by external projects that
+process these two files.
 
 Microsoft Windows with CMake
 ----------------------------
@@ -518,7 +521,7 @@ CMake, perform the following steps:
 1. Go Start -> Programs -> CMake -> "CMake" or "CMake (cmake-gui)" to start the
    CMake utility through which the configuration can be done.
 2. In the entry field "Where is the source code:" enter the directory in which
-   the DCMTK source code resides, e.g. "C:\dcmtk-3.6.6".
+   the DCMTK source code resides, e.g. "C:\dcmtk-3.6.7".
 3. In the entry field "Where to build the binaries:" enter the directory in
    which the libraries and binaries are to be built, e.g. "C:\dcmtk-msvc15".
 4. In the combobox "Build for:" or "Specify the generator for this project:"
@@ -532,7 +535,7 @@ CMake, perform the following steps:
    example, in order to turn on libxml2 support, set the value of variable
    "DCMTK_WITH_XML" to "ON" and set the value of variable "WITH_LIBXMLINC"
    to the path where the include files and libraries of libxml2 can be found,
-   e.g. "C:\libxml2-2.9.7".  The support of all other external libraries can
+   e.g. "C:\libxml2-2.9.12".  The support of all other external libraries can
    be turned on in a similar way:
 
      libpng support:
@@ -541,11 +544,11 @@ CMake, perform the following steps:
 
      libtiff support:
        set "DCMTK_WITH_TIFF" to "ON" and
-       set "WITH_LIBTIFFINC" e.g. to "C:\libtiff-4.1.0"
+       set "WITH_LIBTIFFINC" e.g. to "C:\libtiff-4.3.0"
 
      OpenSSL support:
        set "DCMTK_WITH_OPENSSL" to "ON" and
-       set "WITH_OPENSSLINC" e.g. to "C:\openssl-1.1.1i"
+       set "WITH_OPENSSLINC" e.g. to "C:\openssl-1.1.1n"
 
      zlib support:
        set "DCMTK_WITH_ZLIB" to "ON" and
@@ -613,10 +616,10 @@ CMake, perform the following steps:
    libraries can be downloaded from https://www.dcmtk.org/dcmtk#lib-win.
 
    In the CMake GUI, there are a few more settings that can be modified
-   to affect the way DCMTK is compiled. The most important of these are:
+   to affect the way DCMTK is compiled.  The most important of these are:
 
     - DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS: By default, DCMTK will compile
-      using the default compiler options selected by CMake. When this macro
+      using the default compiler options selected by CMake.  When this macro
       is enabled, these default options are modified based on the value
       of the DCMTK_COMPILE_WIN32_MULTITHREADED_DLL setting (see below).
       Default: ON.
@@ -634,7 +637,7 @@ CMake, perform the following steps:
       Default: OFF.
     - BUILD_SINGLE_SHARED_LIBRARY: Build a single shared library for the
       whole toolkit. This setting overrides the value of the option
-      BUILD_SHARED_LIBS, which is set to ON. Default: OFF.
+      BUILD_SHARED_LIBS, which is set to ON.  Default: OFF.
 
 7. Go "Configure" a second time.  (CMake will adjust the configuration
    according to the displayed specifications.)
@@ -659,19 +662,10 @@ default, all command line applications are built and installed.
 Please note that other Windows compilers, e.g. Borland C++ Builder, are
 currently not actively supported.  However, they may work.
 
-Known limitations of DCMTK on the Windows platform.
-
-1. The dcmqrscp tool cannot spark multiple processes.  Every association must
-   be handled completely before a new association is possible.
-2. Visual C++ contains two different implementations of I/O streams which
-   should never be mixed within one application because this may cause
-   application errors that are hard to find.  The old, now deprecated
-   implementation uses the traditional cfront header files <iostream.h> etc.
-   The new implementation uses <iostream> etc. as defined in ANSI/ISO C++.
-   DCMTK can be configured to use either of the two interfaces.  This behavior
-   can be changed in "config/include/dcmtk/config/osconfig.h" in the build
-   directory where the symbol USE_STD_CXX_INCLUDES is declared.
+Known limitations of DCMTK on the Windows platform:
 
+- The dcmqrscp tool cannot spark multiple processes.  Every association must be
+  handled completely before a new association is possible.
 
 Unix with CMake
 ---------------
@@ -692,41 +686,41 @@ https://cmake.org/cmake/help/latest/module/FindZLIB.html .
 The typical way to build DCMTK on Unix like systems with CMake is as follows
 (if not using the GUI, in that case look at the description for Windows above):
 
-    mkdir dcmtk-3.6.6-build
-    cd dcmtk-3.6.6-build
-    cmake ../dcmtk-3.6.6
+    mkdir dcmtk-3.6.7-build
+    cd dcmtk-3.6.7-build
+    cmake ../dcmtk-3.6.7
     make -j8
-    make DESTDIR=../dcmtk-3.6.6-install install
+    make DESTDIR=../dcmtk-3.6.7-install install
 
 The above commands assume that the DCMTK source code was extracted to the
-current working directory into a folder named dcmtk-3.6.6.  DCMTK will be
+current working directory into a folder named dcmtk-3.6.7.  DCMTK will be
 configured using CMake with the default options, detecting and including all
 available support libraries and then compiled using eight CPU cores
 ('make -j8', adjust as needed).  The result will be installed to the directory
-"dcmtk-3.6.6-install" next to the source code directory.
+"dcmtk-3.6.7-install" next to the source code directory.
 
 If you want to modify your build configuration, like enabling or disabling
 some features of DCMTK (e.g. PNG support), or if you need to modify the
-predefined build-variables, you can use the curses based cmake configuration
+predefined build-variables, you can use the curses based CMake configuration
 tool 'ccmake'.  First, create the initial build setup (system check) and then
-call ccmake:
+call 'ccmake':
 
-    mkdir dcmtk-3.6.6-build
-    cd dcmtk-3.6.6-build
-    cmake ../dcmtk-3.6.6
-    ccmake ../dcmtk-3.6.6
+    mkdir dcmtk-3.6.7-build
+    cd dcmtk-3.6.7-build
+    cmake ../dcmtk-3.6.7
+    ccmake ../dcmtk-3.6.7
 
 Now you can modify the configuration values.  Please see the help on the bottom
 of the screen.  When finished, press 'c' to generate a new build configuration,
-then quit ccmake.  Now you can continue to build by calling 'make' etc.
+then quit 'ccmake'.  Now you can continue to build by calling 'make' etc.
 
 If you already know the variable names, types and values to set, you can skip
 the 'ccmake' step above and can call 'cmake' directly with the values set.
 Example for a build with TCP wrapper disabled:
 
-    mkdir dcmtk-3.6.6-build
-    cd dcmtk-3.6.6-build
-    cmake -DDCMTK_WITH_WRAP:BOOL=FALSE ../dcmtk-3.6.6
+    mkdir dcmtk-3.6.7-build
+    cd dcmtk-3.6.7-build
+    cmake -DDCMTK_WITH_WRAP:BOOL=FALSE ../dcmtk-3.6.7
     ...
 
 The format is NAME:TYPE=VALUE.  Use 'ccmake' to find out the variable names and
@@ -738,8 +732,9 @@ variables are:
       Default: OFF.
     - CMAKE_BUILD_TYPE: Debug or Release build, default: Release.
     - CMAKE_INSTALL_PREFIX: Installation prefix, default: /usr/local.
-    - DCMTK_ENABLE_BUILTIN_DICTIONARY: Activate the built-in DICOM data
-      dictionary? Default: ON on Windows, OFF on Linux/Posix.
+    - DCMTK_DEFAULT_DICT: Activate the builtin, external or no DICOM data
+      dictionary on DCMTK startup? Default: builtin on Windows, external on
+      Linux/Posix.
     - DCMTK_ENABLE_CXX11: Assume the compiler is C++11 compliant. Default: OFF.
     - DCMTK_ENABLE_STL: Replace DCMTK's OFString, OFList, OFVector etc. by
       the STL classes std::string, std::list, std::vector etc. Default: OFF.
@@ -753,7 +748,7 @@ HTML DOCUMENTATION AND MAN PAGES
 Most DCMTK modules have been documented with Doxygen (www.doxygen.org), a free
 source code documentation system similar to Javadoc.  Unix users who have
 Doxygen installed can create a hypertext documentation with "make html" in the
-"dcmtk-3.6.6" or "doxygen" directory; Windows and other CMake users should
+"dcmtk-3.6.7" or "doxygen" directory; Windows and other CMake users should
 build the "DOXYGEN" subproject.  A project file for Microsoft's HTML Help
 Workshop can also be generated allowing to create a single CHM file (compressed
 HTML) from the documentation.  Other output formats (e.g. LaTeX) can be enabled
@@ -826,16 +821,79 @@ will add the module name as a prefix to this file's name, e.g. "ofstd_tests".
 For more information, call this program with the --help option.
 
 
+CROSS COMPILING WITH CMAKE
+==========================
+
+The main challenge when cross-compiling DCMTK is that some of the feature tests
+performed by CMake require certain small test programs to be compiled and run,
+which does not work in a cross-compilation setting.  Starting with DCMTK 3.6.7,
+basic support for cross-compilation has been added.  This can be enabled by
+setting the CMake variable "DCMTK_NO_TRY_RUN":
+
+  cmake -DDCMTK_NO_TRY_RUN:BOOL=TRUE
+
+In this case, CMake expects all test results that are normally achieved by
+executing certain test programs to be provided by the user on the command line.
+In detail, these are the variables that need to be provided:
+
+  The following variables are only used when compiling with libiconv support
+  and can otherwise be set to default values:
+  - DCMTK_ICONV_FLAGS_ANALYZED: should always be set to TRUE
+  - DCMTK_FIXED_ICONV_CONVERSION_FLAGS: The output printed by the test program
+    config/tests/iconv.cc, when run on the target platform. This value is only
+    used when compiling with old libiconv versions (older than libiconv 1.8)
+    and determines the iconv behaviour when encountering illegal byte sequences
+    during a character set conversion. Possible values are:
+    - "AbortTranscodingOnIllegalSequence" (use as default)
+    - "DiscardIllegalSequences"
+  - DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING: true if the test program
+    config/tests/lciconv.cc exits with a return code of zero, false otherwise.
+    This test determines if libiconv has a default encoding, i.e. if
+    iconv_open() accepts "" as an argument. Use FALSE as default.
+
+  The following variables are only used when compiling with DCMTK_ENABLE_STL
+  and can otherwise be set to 0:
+  - HAVE_STL_VECTOR_TEST_RESULT: 1 if the platform provides a working
+    <vector> implementation, 0 otherwise
+  - HAVE_STL_ALGORITHM_TEST_RESULT: 1 if the platform provides a working
+    <algorithm> implementation, 0 otherwise
+  - HAVE_STL_LIMITS_TEST_RESULT: 1 if the platform provides a working
+    <limits> implementation, 0 otherwise
+  - HAVE_STL_LIST_TEST_RESULT: 1 if the platform provides a working
+    <list> implementation, 0 otherwise
+  - HAVE_STL_MAP_TEST_RESULT: 1 if the platform provides a working
+    <map> implementation, 0 otherwise
+  - HAVE_STL_MEMORY_TEST_RESULT: 1 if the platform provides a working
+    <memory> implementation, 0 otherwise
+  - HAVE_STL_STACK_TEST_RESULT: 1 if the platform provides a working
+    <stack> implementation, 0 otherwise
+  - HAVE_STL_STRING_TEST_RESULT: 1 if the platform provides a working
+    <string> implementation, 0 otherwise
+  - HAVE_STL_TYPE_TRAITS_TEST_RESULT: 1 if the platform provides a working
+    <type_traits> implementation, 0 otherwise
+  - HAVE_STL_TUPLE_TEST_RESULT: 1 if the platform provides a working
+    <tuple> implementation, 0 otherwise
+  - HAVE_STL_SYSTEM_ERROR_TEST_RESULT: 1 if the platform provides a working
+    <system_error> implementation, 0 otherwise
+
+  Furthermore, the file "arith.h" must be generated and copied to
+  config/include/dcmtk/config/arith.h in the **build** directory.
+  This file can be generated by compiling config/tests/arith.cc
+  and running the executable on the target platform.
+
+For further information on cross-compiling DCMTK, see:
+https://support.dcmtk.org/redmine/projects/dcmtk/wiki/Cross_Compiling
+
+
 BUILDING (Unix with Autoconf)
 =============================
 
-Configuring a DCMTK build with GNU Autoconf has been deprecated with DCMTK
-release 3.6.6 and will be removed in future releases.  In the current release,
-the "configure" script in DCMTK's top-level main directory has been removed
-as the final warning for users of the Autoconf toolchain.  If you prefer to
-build DCMTK with Autoconf, however, this is still possible.  Perform the
-following steps from the top-level (dcmtk-3.6.6) directory to compile and
-install the software:
+Configuring a DCMTK build with GNU Autoconf has been deprecated and will be
+removed in future releases.  In the current release, the "configure" script in
+DCMTK's top-level main directory has been removed as the final warning for users
+of the Autoconf toolchain.  If you prefer to build DCMTK with Autoconf, however,
+this is still possible.  Perform the following steps from the top-level
+(dcmtk-3.6.7) directory to compile and install the software:
 
 Step 0:
     cd config
@@ -865,15 +923,15 @@ in which OpenSSL is installed.  This is usually the directory that has been
 used as --prefix when compiling and installing OpenSSL.
 
 For example, if you wish to enable the security enhancements, and OpenSSL is
-installed in "/usr/local/apps/openssl-1.1.1i", then you should start configure
+installed in "/usr/local/apps/openssl-1.1.1n", then you should start configure
 as:
 
     ./configure --ignore-deprecation
-                --with-opensslinc=/usr/local/apps/openssl-1.1.1i
+                --with-opensslinc=/usr/local/apps/openssl-1.1.1n
 
 Configure will assume that the OpenSSL include files are installed in
-"/usr/local/apps/openssl-1.1.1i/include" and will expect the library in
-"/usr/local/apps/openssl-1.1.1i/lib".  Appropriate options will be passed to
+"/usr/local/apps/openssl-1.1.1n/include" and will expect the library in
+"/usr/local/apps/openssl-1.1.1n/lib".  Appropriate options will be passed to
 the compiler and the linker.
 
 Support for zlib, libtiff, libpng, libxml2, libwrap and libiconv can be enabled
@@ -882,13 +940,13 @@ path):
 
     ./configure --ignore-deprecation
                 --with-libzlibinc=/usr/local/apps/zlib-1.2.11
-                --with-libtiffinc=/usr/local/apps/libtiff-4.1.0
+                --with-libtiffinc=/usr/local/apps/libtiff-4.0.10
                 --with-libpnginc=/usr/local/apps/libpng-1.6.37
-                --with-libxmlinc=/usr/local/apps/libxml2-2.9.10
+                --with-libxmlinc=/usr/local/apps/libxml2-2.9.9
                 --with-libwrapinc=/usr/local/apps/tcp_wrappers-7.6
-                --with-libiconvinc=/usr/local/apps/libiconv-1.16
+                --with-libiconvinc=/usr/local/apps/libiconv-1.15
            <or>
-                --with-libicuinc=/usr/local/apps/icu-68.1.0
+                --with-libicuinc=/usr/local/apps/icu-65.1
 
 Different configure options can be combined in any order.  configure --help
 will print a list of all existing configure options.  configure --help=short
@@ -901,14 +959,11 @@ options are:
   --disable-threads       compile without MT support
   --enable-lfs=TYPE       compile with LFS support (lfs/lfs64/auto=default)
   --disable-lfs           compile without LFS support
-  --enable-std-includes   use C++ ANSI standard includes
-  --disable-std-includes  use old C++ includes
+  --enable-default-dict=TYPE  enable default dictionary and specify type
+                          (external=default/builtin)
+  --disable-default-dict  disable default dictionary
   --enable-private-tags   enable private tag dictionary
   --disable-private-tags  don't enable private tag dictionary (default)
-  --enable-external-dict  enable loading of external dictionary (default)
-  --disable-external-dict don't load external dictionary
-  --enable-builtin-dict   enable loading of built-in dictionary
-  --disable-builtin-dict  don't load built-in dictionary (default)
   --disable-rpath         do not hardcode runtime library paths
   --enable-charconv=TYPE  enable character set conversion support
                           (libiconv/libicu/stdlibc/auto=default)
@@ -954,8 +1009,8 @@ following commands:
 This generates a new Makefile and configure script in the top-level toolkit
 directory.
 
-Solving configuration and compilation problems with Autoconf
-------------------------------------------------------------
+Solving configuration and compilation problems
+----------------------------------------------
 
 The configure script might not be able to guess the correct compiler and
 compiler flags to use.  For example, we have noticed that use of the -pedantic
@@ -985,7 +1040,7 @@ See also the FAQ at https://forum.dcmtk.org/faq for more hints.
 
 Have fun.
 
-M. Eichelberg, J. Riesmeier, M. Onken, J. Schlamelcher, P. Arizpe Gomez
+M. Eichelberg, J. Riesmeier, M. Onken, J. Schlamelcher
 DCMTK Development Team, Oldenburg, Germany.
 
-Last revised: 2021-01-14 (Onken)
+Last revised: 2022-04-07 (Onken)
diff --git a/README b/README
index 3d5960dd3d8bb37a53fb633f4d0400e1ca09e6d2..0d7b12ac5e36d89d8cf44b21667f5f0638b20e43 100644 (file)
--- a/README
+++ b/README
@@ -40,12 +40,12 @@ information see the COPYRIGHT file.  For information about the history of
 this software see the HISTORY file.  For answers to frequently asked
 questions please consult the FAQ:
 
-        http://forum.dcmtk.org/faq/
+        https://forum.dcmtk.org/faq/
 
 In addition to the API documentation, there is also a Wiki system where
 further information (e.g. HOWTOs) can be found:
 
-        http://support.dcmtk.org/wiki/
+        https://support.dcmtk.org/wiki/
 
 If you find bugs or other problems with this software, we would appreciate
 hearing about them.  Please send electronic mail to:
@@ -56,4 +56,4 @@ Please try to describe the problem in detail and if possible give a
 suggested fix.  For general questions on how to compile, install or use
 the toolkit we recommend the public discussion forum at:
 
-        http://forum.dcmtk.org/
+        https://forum.dcmtk.org/
diff --git a/VERSION b/VERSION
index 4f2c1d15f6df48073057472403968720cb96e72b..5b3413147c957b8ea5c1233ea0409dfa13288fc0 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-3.6.6
+3.6.7
index 0520105061ff5702967573837f0015cd9fc4db86..9e3a47701f09db667460b36dbf84baddcf332cf7 100644 (file)
@@ -3,7 +3,7 @@ dnl Filename: aclocal.m4
 dnl
 dnl Purpose: additional M4 macros for GNU autoconf
 dnl
-dnl Authors: Andreas Barth, Marco Eichelberg
+dnl Authors: Andreas Barth, Marco Eichelberg, Joerg Riesmeier, Jan Schlamelcher
 dnl
 
 
@@ -12,7 +12,7 @@ dnl   This additional macro is necessary because the /bin/sh will
 dnl   not allow you to define a variable "ac_cv_lib_g++" and
 dnl   thus AC_CHECK_LIB will fail for libg++.
 dnl   All symbols #defined by this macro replace G++ by GXX.
-
+dnl
 dnl AC_CHECK_GXXLIB
 AC_DEFUN(AC_CHECK_GXXLIB,
 [AC_MSG_CHECKING([for -lg++])
@@ -38,28 +38,25 @@ ifelse([$4], , , [$4
 fi
 ])
 
+
 dnl AC_CHECK_PROTOTYPE checks if there is a prototype declaration
 dnl   for the given function. If header file(s) are given as argument 2, they
 dnl   are #included in the search. Otherwise only predefined functions will
-dnl   be found.  The header files are only included in the search if they
-dnl   have already been found using the AC_CHECK_HEADERS(header) macro.
-dnl Note:
-dnl   Since GNU autoheader does not support this macro, you must create entries
-dnl   in your acconfig.h for each function which is tested.
+dnl   be found. The header files are only included in the search if they have
+dnl   already been found using the AC_CHECK_HEADERS(header) macro.
 dnl Examples:
 dnl   in configure.in:
 dnl     AC_CHECK_PROTOTYPE(setsockopt, sys/types.h sys/socket.h)
 dnl     AC_CHECK_PROTOTYPE(gethostid)
-dnl   in acconfig.h:
+dnl   in osconfig.h.in:
 dnl     #undef HAVE_PROTOTYPE_SETSOCKOPT
 dnl     #undef HAVE_PROTOTYPE_GETHOSTID
-
+dnl
 dnl AC_CHECK_PROTOTYPE(FUNCTION, HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_CHECK_PROTOTYPE,
 [AC_MSG_CHECKING([ifelse([$2], , [predefined prototype for $1], [prototype for $1 (in $2)])])
 AH_TEMPLATE(AS_TR_CPP(HAVE_PROTOTYPE_$1), [Define if your system has a prototype for $1 in $2.])
 ifelse([$3], , :, [$3])
-
 ifelse([$2], , [ac_includes=""
 ],
 [ac_includes=""
@@ -90,10 +87,7 @@ dummyStruct $1(dummyStruct);
 , ,eval "ac_cv_prototype_$tmp_save_1=no", eval "ac_cv_prototype_$tmp_save_1=yes")])dnl
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED([$ac_tr_prototype])
+  AC_DEFINE(AS_TR_CPP(HAVE_PROTOTYPE_$1))
   ifelse([$3], , :, [$3])
 else
   AC_MSG_RESULT(no)
@@ -102,13 +96,70 @@ ifelse([$4], , , [$4
 fi
 ])
 
+
+dnl AC_CHECK_EXT_LIB_PROTOTYPE checks if there is a prototype declaration for
+dnl   the given function in an external library. The name of the library has to
+dnl   be specified as argument 2, the  header file(s) as argument 3. The header
+dnl   files are only included in the search if they have already been found
+dnl   using the AC_CHECK_HEADERS(header) macro.
+dnl Examples:
+dnl   in configure.in:
+dnl     AC_CHECK_EXT_LIB_PROTOTYPE(DH_bits, OpenSSL, openssl/dh.h)
+dnl     AC_CHECK_EXT_LIB_PROTOTYPE(EVP_PKEY_base_id, OpenSSL, openssl/evp.h)
+dnl   in osconfig.h.in:
+dnl     #undef HAVE_OPENSSL_PROTOTYPE_DH_BITS
+dnl     #undef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID
+dnl
+dnl AC_CHECK_EXT_LIB_PROTOTYPE(FUNCTION, LIBRARY, HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
+AC_DEFUN(AC_CHECK_EXT_LIB_PROTOTYPE,
+[AC_MSG_CHECKING([whether $2 provides a prototype for $1 (in $3)])
+AH_TEMPLATE(AS_TR_CPP(HAVE_$2_PROTOTYPE_$1), [Define if $2 provides a prototype for $1 in <$3>.])
+ifelse([$4], , :, [$4])
+ac_includes=""
+for ac_header in $3
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo $1 | tr ' :' '__'`
+AC_CACHE_VAL(ac_cv_prototype_$tmp_save_1,
+[AC_TRY_COMPILE(
+[#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct $1(dummyStruct);
+]
+, ,eval "ac_cv_prototype_$tmp_save_1=no", eval "ac_cv_prototype_$tmp_save_1=yes")])dnl
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(AS_TR_CPP(HAVE_$2_PROTOTYPE_$1))
+  ifelse([$4], , :, [$4])
+else
+  AC_MSG_RESULT(no)
+ifelse([$5], , , [$5
+])dnl
+fi
+])
+
+
 dnl AC_CHECK_COMPILES verifies that the given code fragment can be compiled.
 dnl   It is assumed that successfully compiling means that the specified
 dnl   function is available. If header file(s) are given as argument 2, they
-dnl   #included in the search. Otherwise only predefined functions will be
+dnl   are included in the search. Otherwise only predefined functions will be
 dnl   available. The header files are only included in the search if they have
 dnl   already been found using the AC_CHECK_HEADERS(header) macro.
-
+dnl
 dnl AC_CHECK_COMPILES(FUNCTION, HEADER-FILE..., CODE, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_CHECK_COMPILES,
 [AC_MSG_CHECKING([ifelse([$2], , [for $1], [for $1 (in $2)])])
@@ -130,10 +181,7 @@ AC_CACHE_VAL(ac_cv_compiles_$tmp_save_1,
 eval "ac_cv_compiles_$tmp_save_1=yes", eval "ac_cv_compiles_$tmp_save_1=no")])dnl
 if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED([$ac_tr_prototype])
+  AC_DEFINE(AS_TR_CPP(HAVE_PROTOTYPE_$1))
   ifelse([$4], , :, [$4])
 else
   AC_MSG_RESULT(no)
@@ -142,12 +190,48 @@ ifelse([$5], , , [$5
 fi
 ])
 
-dnl AC_CHECK_DECLARATION checks if a certain type is declared in the include files given as argument 2 or 3.
+
+dnl AC_CHECK_EXT_LIB_COMPILES verifies that the given code fragment can be
+dnl   compiled. It is assumed that successfully compiling means that the
+dnl   specified function is available in the header file(s) given as argument 3.
+dnl   The name of the external library has to be specified as argument 2 but is
+dnl   only used to generate the name of the define in osconfig.h.in.  The header
+dnl   files are only included in the search if they have already been found
+dnl   using the AC_CHECK_HEADERS(header) macro.
+dnl
+dnl AC_CHECK_EXT_LIB_COMPILES(FUNCTION, LIBRARY, HEADER-FILE..., CODE, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
+AC_DEFUN(AC_CHECK_EXT_LIB_COMPILES,
+[AC_MSG_CHECKING(whether $2 provides a prototype for $1 (in $3))
+AH_TEMPLATE(AS_TR_CPP(HAVE_$2_PROTOTYPE_$1), [Define if $2 provides a prototype for $1 in <$3>.])
+ac_includes=""
+for ac_header in $3
+do
+  ac_includes="$ac_includes
+#include<$ac_header>"
+done
+tmp_save_1=`echo $1 | tr ' :' '__'`
+AC_CACHE_VAL(ac_cv_compiles_$tmp_save_1,
+[AC_TRY_COMPILE([$ac_includes], [$4],
+eval "ac_cv_compiles_$tmp_save_1=yes", eval "ac_cv_compiles_$tmp_save_1=no")])dnl
+if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(AS_TR_CPP(HAVE_$2_PROTOTYPE_$1))
+  ifelse([$5], , :, [$5])
+else
+  AC_MSG_RESULT(no)
+ifelse([$6], , , [$6
+])dnl
+fi
+])
+
+
+dnl AC_CHECK_DECLARATION checks if a certain type is declared in the include
+dnl   files given as argument 2 or 3.
 dnl   Files given as argument 2 are included extern "C" in C++ mode,
 dnl   files given as argument 3 are included "as is".
 dnl   Header files are only included in the search if they
 dnl   have already been found using the AC_CHECK_HEADERS(header) macro.
-
+dnl
 dnl AC_CHECK_DECLARATION(FUNCTION, C-HEADER-FILE..., C++-HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_CHECK_DECLARATION,
 [
@@ -194,10 +278,7 @@ $1 dummy;
 , ,eval "$ac_cv_declaration=yes", eval "$ac_cv_declaration=no")])dnl
 if eval "test \"\$$ac_cv_declaration\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_declaration=HAVE_DECLARATION_`echo $1 | tr ' :[a-z]' '__[A-Z]'`
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED([$ac_tr_declaration])
+  AC_DEFINE(AS_TR_CPP(HAVE_DECLARATION_$1))
   ifelse([$4], , :, [$4])
 else
   AC_MSG_RESULT(no)
@@ -211,12 +292,12 @@ unset ac_cv_declaration
 dnl AC_CHECK_INTP_SELECT checks if the prototype for select()
 dnl   specifies arguments 2-4 to be int* instead of struct fd_set *.
 dnl   This is true for HP UX 9.x and causes C++ code to break.
-
+dnl
 dnl AC_CHECK_INTP_SELECT(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_CHECK_INTP_SELECT,
 [AC_MSG_CHECKING([ifelse([$1], , [if select() needs int* parameters],
 [if select() needs int* parameters (in $1)])])
-AH_TEMPLATE([HAVE_INTP_SELECT], [Define if your system declares argument 2-4 of select()
+AH_TEMPLATE(HAVE_INTP_SELECT, [Define if your system declares argument 2-4 of select()
    as int * instead of struct fd_set *.])
 ifelse([$1], , [ac_includes=""
 ],
@@ -264,10 +345,7 @@ $ac_includes
 eval "ac_cv_prototype_intp_select=yes", eval "ac_cv_prototype_intp_select=no")])])
 if eval "test \"`echo $ac_cv_prototype_intp_select`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_prototype=HAVE_INTP_SELECT
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_prototype)
+  AC_DEFINE(HAVE_INTP_SELECT)
   ifelse([$2], , :, [$2])
 else
   AC_MSG_RESULT(no)
@@ -276,12 +354,11 @@ fi
 ])
 
 
-
 dnl AC_TRY_COMPILE_AND_LINK compiles a Source file into an object file
 dnl  and links the object file. This can create a different behaviour
 dnl  than compiling and linking the object file directly (e.g.
 dnl  Sun C++ 3.0.1 with template functions)
-
+dnl
 dnl AC_TRY_COMPILE_AND_LINK(SOURCE, MAIN_BODY
 dnl                         [, ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]])
 AC_DEFUN(AC_TRY_COMPILE_AND_LINK,
@@ -316,13 +393,14 @@ ifelse([$4], , , [  rm -rf conftest*
 fi
 rm -f conftest*])
 
+
 dnl AC_CHECK_STD_NAMESPACE checks if the C++-Compiler supports the
 dnl   standard name space.
-
+dnl
 dnl AC_CHECK_STD_NAMESPACE
 AC_DEFUN(AC_CHECK_STD_NAMESPACE,
 [AC_MSG_CHECKING([for C++ standard namespace])
-AH_TEMPLATE([HAVE_STD_NAMESPACE], [Define if ANSI standard C++ includes use std namespace.])
+AH_TEMPLATE(HAVE_STD_NAMESPACE, [Define if ANSI standard C++ includes use std namespace.])
 AC_CACHE_VAL(ac_cv_check_std_namespace,
 [AC_TRY_COMPILE_AND_LINK([
 #include <iostream>
@@ -333,25 +411,21 @@ using namespace std;
 ])dnl
 if eval "test \"`echo '$ac_cv_check_std_namespace'`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_std_namespace=HAVE_STD_NAMESPACE
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_std_namespace)
+  AC_DEFINE(HAVE_STD_NAMESPACE)
 else
   AC_MSG_RESULT(no)
 fi
 ])
 
 
-
 dnl AC_CHECK_CLASS_TEMPLATE checks if the C++-Compiler is capable of
 dnl   using class templates in the easiest form i. e. all methods are
 dnl   inline, no template methods and no typedefs in the class
-
+dnl
 dnl AC_CHECK_CLASS_TEMPLATE
 AC_DEFUN(AC_CHECK_CLASS_TEMPLATE,
 [AC_MSG_CHECKING([for C++ class template])
-AH_TEMPLATE([HAVE_CLASS_TEMPLATE], [Define if your C++ compiler can work with class templates.])
+AH_TEMPLATE(HAVE_CLASS_TEMPLATE, [Define if your C++ compiler can work with class templates.])
 AC_CACHE_VAL(ac_cv_check_class_template,
 [AC_TRY_COMPILE_AND_LINK([
 template <class T>
@@ -375,24 +449,20 @@ public:
 ])dnl
 if eval "test \"`echo '$ac_cv_check_class_template'`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_class_template=HAVE_CLASS_TEMPLATE
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_class_template)
+  AC_DEFINE(HAVE_CLASS_TEMPLATE)
 else
   AC_MSG_RESULT(no)
 fi
 ])
 
 
-
 dnl AC_CHECK_FUNCTION_TEMPLATE checks if the C++-Compiler is capable of
 dnl   using function templates.
-
+dnl
 dnl AC_CHECK_FUNCTION_TEMPLATE
 AC_DEFUN(AC_CHECK_FUNCTION_TEMPLATE,
 [AC_MSG_CHECKING([for C++ function template])
-AH_TEMPLATE([HAVE_FUNCTION_TEMPLATE], [Define if your C++ compiler can work with function templates.])
+AH_TEMPLATE(HAVE_FUNCTION_TEMPLATE, [Define if your C++ compiler can work with function templates.])
 AC_CACHE_VAL(ac_cv_check_function_template,
 [AC_TRY_COMPILE_AND_LINK([
 template <class T>
@@ -408,10 +478,7 @@ int f(T* a)
 ])dnl
 if eval "test \"`echo '$ac_cv_check_function_template'`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_function_template=HAVE_FUNCTION_TEMPLATE
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_function_template)
+  AC_DEFINE(HAVE_FUNCTION_TEMPLATE)
 else
   AC_MSG_RESULT(no)
 fi
@@ -420,11 +487,11 @@ fi
 
 dnl AC_CHECK_STATIC_TEMPLATE_METHOD checks if the C++-Compiler is capable of
 dnl   using static methods in template classes
-
+dnl
 dnl AC_CHECK_STATIC_TEMPLATE_METHOD
 AC_DEFUN(AC_CHECK_STATIC_TEMPLATE_METHOD,
 [AC_MSG_CHECKING([for C++ static methods in class templates])
-AH_TEMPLATE([HAVE_STATIC_TEMPLATE_METHOD], [Define if your C++ compiler can work with static methods in class templates.])
+AH_TEMPLATE(HAVE_STATIC_TEMPLATE_METHOD, [Define if your C++ compiler can work with static methods in class templates.])
 AC_CACHE_VAL(ac_cv_check_static_template_method,
 [AC_TRY_COMPILE_AND_LINK([
 void additive(int & i)
@@ -448,10 +515,7 @@ public:
 ])dnl
 if eval "test \"`echo '$ac_cv_check_static_template_method'`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_static_template_method=HAVE_STATIC_TEMPLATE_METHOD
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_static_template_method)
+  AC_DEFINE(HAVE_STATIC_TEMPLATE_METHOD)
 else
   AC_MSG_RESULT(no)
 fi
@@ -461,11 +525,11 @@ fi
 dnl AC_CHECK_EXPLICIT_TEMPLATE_SPECIALIZATION checks if the C++-Compiler
 dnl   supports the explicit template specialization syntax, i.e.
 dnl     template<> int classname<int>::functionname()
-
+dnl
 dnl AC_CHECK_EXPLICIT_TEMPLATE_SPECIALIZATION
 AC_DEFUN(AC_CHECK_EXPLICIT_TEMPLATE_SPECIALIZATION,
 [AC_MSG_CHECKING([for C++ explicit template specialization syntax])
-AH_TEMPLATE([HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION], [Define if your C++ compiler supports the explicit template specialization syntax.])
+AH_TEMPLATE(HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION, [Define if your C++ compiler supports the explicit template specialization syntax.])
 AC_CACHE_VAL(ac_cv_check_explicit_template_specialization,
 [AC_TRY_COMPILE([
 template<class T>
@@ -484,10 +548,7 @@ int X<int>::fn()
 ])dnl
 if eval "test \"`echo '$ac_cv_check_explicit_template_specialization'`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_explicit_template_specialization=HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_explicit_template_specialization)
+  AC_DEFINE(HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION)
 else
   AC_MSG_RESULT(no)
 fi
@@ -498,8 +559,8 @@ dnl AC_CHECK_GNU_LIBTOOL checks whether libtool is GNU libtool.
 dnl   This macro requires that 'libtool' exists in the current path,
 dnl   i.e. AC_CHECK_PROGS(LIBTOOL, libtool, :) should be executed and evaluated
 dnl   before performing this test.
-dnl   If libtool is identified as GNU libtool, the environment variable $ac_cv_check_gnu_libtool
-dnl   is set to the value "yes", otherwise to "no".
+dnl   If libtool is identified as GNU libtool, the environment variable
+dnl   $ac_cv_check_gnu_libtool is set to the value "yes", otherwise to "no".
 dnl
 dnl AC_CHECK_GNU_LIBTOOL
 AC_DEFUN(AC_CHECK_GNU_LIBTOOL,
@@ -520,7 +581,6 @@ AC_CACHE_VAL(ac_cv_check_gnu_libtool,
 ])
 
 
-
 dnl AC_CHECK_HEADER_WITH_INCLUDES works like AC_CHECK_HEADER but allows to specify
 dnl additional code to be put into the test program before the #include statement
 dnl generated by AC_CHECK_HEADER.
@@ -547,6 +607,7 @@ ifelse([$4], , , [$4
 fi
 ])
 
+
 dnl AC_CHECK_HEADERS_WITH_INCLUDES works like AC_CHECK_HEADERS but allows to specify
 dnl additional code to be put into the test program before the #include statement
 dnl generated by AC_CHECK_HEADERS.
@@ -575,7 +636,7 @@ dnl AC_CHECK_POLL_H([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
 AC_DEFUN(AC_CHECK_POLL_H,
 [
 AC_MSG_CHECKING([for usable poll.h])
-AH_TEMPLATE(AS_TR_CPP(DCMTK_HAVE_POLL), [Define if your system has a usable <poll.h>.])
+AH_TEMPLATE(DCMTK_HAVE_POLL, [Define if your system has a usable <poll.h>.])
 AC_CACHE_VAL(ac_cv_header_poll_h,
 [
 case "${host}" in
@@ -589,7 +650,7 @@ esac
 ])
 if eval "test \"`echo '$ac_cv_header_poll_h'`\" = yes"; then
   AC_MSG_RESULT(yes)
-  AC_DEFINE_UNQUOTED(DCMTK_HAVE_POLL)
+  AC_DEFINE(DCMTK_HAVE_POLL)
   ifelse([$1], , :, [$1])
 else
   AC_MSG_RESULT(no)
@@ -639,14 +700,15 @@ else
 fi
 ])
 
+
 dnl AC_CHECK_INTP_ACCEPT checks if the prototype for accept()
 dnl   specifies arguments 2-4 to be int* instead of size_t *.
-
+dnl
 dnl AC_CHECK_INTP_ACCEPT(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_CHECK_INTP_ACCEPT,
 [AC_MSG_CHECKING([ifelse([$1], , [if accept() needs int* parameters],
 [if accept() needs int* parameters (in $1)])])
-AH_TEMPLATE([HAVE_INTP_ACCEPT], [Define if your system declares argument 3 of accept()
+AH_TEMPLATE(HAVE_INTP_ACCEPT, [Define if your system declares argument 3 of accept()
    as int * instead of size_t * or socklen_t *.])
 ifelse([$1], , [ac_includes=""
 ],
@@ -699,10 +761,7 @@ $ac_includes
 eval "ac_cv_prototype_intp_accept=yes", eval "ac_cv_prototype_intp_accept=no")])])
 if eval "test \"`echo $ac_cv_prototype_intp_accept`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_prototype=HAVE_INTP_ACCEPT
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_prototype)
+  AC_DEFINE(HAVE_INTP_ACCEPT)
   ifelse([$2], , :, [$2])
 else
   AC_MSG_RESULT(no)
@@ -711,15 +770,13 @@ fi
 ])
 
 
-
-
 dnl AC_CHECK_PTHREAD_OPTION checks whether the compiler requires the
 dnl -pthread option to correctly link code containing posix thread calls.
 dnl This is true for example on FreeBSD.
 dnl This test assumes that <pthread.h> is available.
-
+dnl
 dnl If the test is positive, -pthread is added to CFLAGS and CXXFLAGS.
-
+dnl
 dnl AC_CHECK_PTHREAD_OPTION
 AC_DEFUN(AC_CHECK_PTHREAD_OPTION,
 [AC_MSG_CHECKING(whether compiler requires -pthread option for posix threads)
@@ -772,12 +829,11 @@ fi
 ])
 
 
-
 dnl AC_MY_C_INLINE works like the standard script AC_C_INLINE
 dnl but defines C_INLINE instead of redefining "inline" directly.
-
+dnl
 AC_DEFUN(AC_MY_C_INLINE,
-[AH_TEMPLATE([C_INLINE], [Define to the inline keyword supported by the C compiler, if any, or to the empty string])
+[AH_TEMPLATE(C_INLINE, [Define to the inline keyword supported by the C compiler, if any, or to the empty string.])
 AC_CACHE_CHECK([for inline], ac_cv_my_c_inline,
 [ac_cv_my_c_inline=no
 for ac_kw in inline __inline__ __inline; do
@@ -794,9 +850,9 @@ esac
 
 dnl AC_MY_C_CONST works like the standard script AC_C_CONST
 dnl but defines HAVE_C_CONST instead of redefining "const" directly.
-
+dnl
 AC_DEFUN(AC_MY_C_CONST,
-[AH_TEMPLATE([HAVE_C_CONST], [Define if "const" is supported by the C compiler.])
+[AH_TEMPLATE(HAVE_C_CONST, [Define if "const" is supported by the C compiler.])
 dnl This message is consistent in form with the other checking messages,
 dnl and with the result message.
 AC_CACHE_CHECK([for working const], ac_cv_my_c_const,
@@ -848,16 +904,16 @@ ccp = (char const *const *) p;
 changequote([, ])dnl
 ac_cv_my_c_const=yes, ac_cv_my_c_const=no)])
 if test $ac_cv_my_c_const = yes; then
-  AC_DEFINE_UNQUOTED(HAVE_C_CONST)
+  AC_DEFINE(HAVE_C_CONST)
 fi
 ])
 
 
 dnl AC_MY_C_CHAR_UNSIGNED works like the standard script AC_C_CHAR_UNSIGNED
 dnl but defines C_CHAR_UNSIGNED instead of __CHAR_UNSIGNED__.
-
+dnl
 AC_DEFUN(AC_MY_C_CHAR_UNSIGNED,
-[AH_TEMPLATE([C_CHAR_UNSIGNED], [Define if char is unsigned on the C compiler.])
+[AH_TEMPLATE(C_CHAR_UNSIGNED, [Define if char is unsigned on the C compiler.])
 AC_CACHE_CHECK(whether char is unsigned, ac_cv_my_c_char_unsigned,
 [if test "$GCC" = yes; then
   # GCC predefines this symbol on systems where it applies.
@@ -884,9 +940,9 @@ fi
 
 dnl AC_MY_C_RIGHTSHIFT_UNSIGNED checks whether the right shift operation
 dnl is unsigned and, if yes, defines C_RIGHTSHIFT_UNSIGNED.
-
+dnl
 AC_DEFUN(AC_MY_C_RIGHTSHIFT_UNSIGNED,
-[AH_TEMPLATE([C_RIGHTSHIFT_UNSIGNED], [Define if >> is unsigned on the C compiler])
+[AH_TEMPLATE(C_RIGHTSHIFT_UNSIGNED, [Define if >> is unsigned on the C compiler.])
 AC_CACHE_CHECK(whether right shift is unsigned, ac_cv_my_c_rightshift_unsigned,
 [
 AC_TRY_RUN(
@@ -915,18 +971,18 @@ int main()
 ], ac_cv_my_c_rightshift_unsigned=yes, ac_cv_my_c_rightshift_unsigned=no)
 ])
 if test $ac_cv_my_c_rightshift_unsigned = yes ; then
-  AC_DEFINE(C_CHAR_UNSIGNED)
+  AC_DEFINE(C_RIGHTSHIFT_UNSIGNED)
 fi
 ])
 
 
 dnl AC_CHECK_IOS_NOCREATE checks if the flag ios::nocreate is defined.
-
+dnl
 dnl AC_CHECK_IOS_NOCREATE(IOS-Name, header [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
 AC_DEFUN(AC_CHECK_IOS_NOCREATE,
 [
 AC_MSG_CHECKING([declaration of ios::nocreate (in $2)])
-AH_TEMPLATE([HAVE_IOS_NOCREATE], [Define if your system defines ios::nocreate in iostream.h])
+AH_TEMPLATE(HAVE_IOS_NOCREATE, [Define if your system defines ios::nocreate in iostream.h.])
 ac_cv_declaration=ac_cv_declaration_ios_nocreate
 AC_CACHE_VAL($ac_cv_declaration,
 [AC_TRY_COMPILE([
@@ -936,10 +992,7 @@ using namespace std;
 ifstream file("name", $1::nocreate)] ,eval "$ac_cv_declaration=yes", eval "$ac_cv_declaration=no")])dnl
 if eval "test \"\$$ac_cv_declaration\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_declaration=HAVE_IOS_NOCREATE
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_declaration)
+  AC_DEFINE(HAVE_IOS_NOCREATE)
   ifelse([$3], , :, [$3])
 else
   AC_MSG_RESULT(no)
@@ -950,7 +1003,6 @@ unset ac_cv_declaration
 ])
 
 
-
 dnl AC_CHECK_OLD_READDIR_R checks if there is a function readdir_r
 dnl   conforming to the Posix 1.c Draft 6 interface, i.e.
 dnl     struct dirent *readdir_r(DIR *dirp, struct dirent *entry);
@@ -963,7 +1015,7 @@ dnl AC_CHECK_OLD_READDIR_R([ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
 AC_DEFUN(AC_CHECK_OLD_READDIR_R,
 [
 AC_MSG_CHECKING([if declaration of readdir_r conforms to Posix 1.c draft 6])
-AH_TEMPLATE([HAVE_OLD_READDIR_R], [Define if your system supports readdir_r with the obsolete
+AH_TEMPLATE(HAVE_OLD_READDIR_R, [Define if your system supports readdir_r with the obsolete
    Posix 1.c draft 6 declaration (2 arguments) instead of the
    Posix 1.c declaration with 3 arguments.])
 ac_cv_result=ac_cv_old_readdir_r
@@ -996,10 +1048,7 @@ extern "C" {
 ], eval "$ac_cv_result=yes", eval "$ac_cv_result=no")])dnl
 if eval "test \"\$$ac_cv_result\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_cv_result=HAVE_OLD_READDIR_R
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_cv_result)
+  AC_DEFINE(HAVE_OLD_READDIR_R)
   ifelse([$1], , , [$1
 ])dnl
 else
@@ -1013,12 +1062,12 @@ unset ac_cv_result
 
 dnl AC_CHECK_INTP_GETSOCKOPT checks if the prototype for getsockopt()
 dnl   specifies arguments 5 to be int* instead of size_t *.
-
+dnl
 dnl AC_CHECK_INTP_GETSOCKOPT(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_CHECK_INTP_GETSOCKOPT,
 [AC_MSG_CHECKING([ifelse([$1], , [if getsockopt() needs int* parameters],
 [if getsockopt() needs int* parameters (in $1)])])
-AH_TEMPLATE([HAVE_INTP_GETSOCKOPT], [Define if your system declares argument 5 of getsockopt()
+AH_TEMPLATE(HAVE_INTP_GETSOCKOPT, [Define if your system declares argument 5 of getsockopt()
    as int * instead of size_t * or socklen_t.])
 ifelse([$1], , [ac_includes=""
 ],
@@ -1063,10 +1112,7 @@ $ac_includes
 eval "ac_cv_prototype_intp_getsockopt=yes", eval "ac_cv_prototype_intp_getsockopt=no")])])
 if eval "test \"`echo $ac_cv_prototype_intp_getsockopt`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_prototype=HAVE_INTP_GETSOCKOPT
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_prototype)
+  AC_DEFINE(HAVE_INTP_GETSOCKOPT)
   ifelse([$2], , :, [$2])
 else
   AC_MSG_RESULT(no)
@@ -1079,12 +1125,12 @@ dnl AC_CHECK_ELLIPSE_SIGNAL_HANDLER checks if the prototype for the
 dnl   callback function passed to signal() needs an ellipse (...)
 dnl   as parameter.  Needed for example on Irix 5.
 dnl   The header files for signal() have to be specified.
-
+dnl
 dnl AC_CHECK_ELLIPSE_SIGNAL_HANDLER(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_CHECK_ELLIPSE_SIGNAL_HANDLER,
 [AC_MSG_CHECKING([ifelse([$1], , [if signal() callback needs ellipse],
 [if signal() callback needs ellipse (in $1)])])
-AH_TEMPLATE([SIGNAL_HANDLER_WITH_ELLIPSE], [Define if signal handlers need ellipse (...) parameters.])
+AH_TEMPLATE(SIGNAL_HANDLER_WITH_ELLIPSE, [Define if signal handlers need ellipse (...) parameters.])
 ifelse([$1], , [ac_includes=""
 ],
 [ac_includes=""
@@ -1132,10 +1178,7 @@ $ac_includes
 eval "ac_cv_signal_handler_with_ellipse=yes", eval "ac_cv_signal_handler_with_ellipse=no")])])
 if eval "test \"`echo $ac_cv_signal_handler_with_ellipse`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_prototype=SIGNAL_HANDLER_WITH_ELLIPSE
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_prototype)
+  AC_DEFINE(SIGNAL_HANDLER_WITH_ELLIPSE)
   ifelse([$2], , :, [$2])
 else
   AC_MSG_RESULT(no)
@@ -1144,15 +1187,14 @@ fi
 ])
 
 
-
 dnl AC_INCLUDE_MATH_H_AS_CXX checks if <math.h> must be included as a C++
 dnl   include file (i.e. without extern "C"). Some sytems (Win32, HP/UX 10)
 dnl   use C++ language features in <math.h>.
-
+dnl
 dnl AC_INCLUDE_MATH_H_AS_CXX(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_INCLUDE_MATH_H_AS_CXX,
 [AC_MSG_CHECKING([if <math.h> fails if included extern "C"])
-AH_TEMPLATE([INCLUDE_MATH_H_AS_CXX], [Define if <math.h> fails if included extern "C".])
+AH_TEMPLATE(INCLUDE_MATH_H_AS_CXX, [Define if <math.h> fails if included extern "C".])
 AC_CACHE_VAL(ac_cv_include_math_h_as_cxx,
 [AC_TRY_COMPILE([
 extern "C"
@@ -1171,10 +1213,7 @@ eval "ac_cv_include_math_h_as_cxx=no",
 eval "ac_cv_include_math_h_as_cxx=yes", eval "ac_cv_include_math_h_as_cxx=no")])])
 if eval "test \"`echo $ac_cv_include_math_h_as_cxx`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_prototype=INCLUDE_MATH_H_AS_CXX
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_prototype)
+  AC_DEFINE(INCLUDE_MATH_H_AS_CXX)
   ifelse([$2], , :, [$2])
 else
   AC_MSG_RESULT(no)
@@ -1182,13 +1221,14 @@ else
 fi
 ])
 
+
 dnl AC_CHECK_CXX_VOLATILE checks if volatile is a built-in C++ keyword
 dnl   (which is not the case on older compilers).
-
+dnl
 dnl AC_CHECK_CXX_VOLATILE(ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND])
 AC_DEFUN(AC_CHECK_CXX_VOLATILE,
 [AC_MSG_CHECKING([if volatile is known keyword])
-AH_TEMPLATE([HAVE_CXX_VOLATILE], [Define if volatile is a known keyword])
+AH_TEMPLATE(HAVE_CXX_VOLATILE, [Define if volatile is a known keyword.])
 AC_CACHE_VAL(ac_cv_have_cxx_volatile,
 [AC_TRY_COMPILE([],[
 volatile int i=0;
@@ -1197,10 +1237,7 @@ eval "ac_cv_have_cxx_volatile=yes",
 eval "ac_cv_have_cxx_volatile=no")])
 if eval "test \"`echo $ac_cv_have_cxx_volatile`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_prototype=HAVE_CXX_VOLATILE
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_prototype, ,[Define if volatile is a known keyword.])
+  AC_DEFINE(HAVE_CXX_VOLATILE)
   ifelse([$1], , :, [$1])
 else
   AC_MSG_RESULT(no)
@@ -1213,7 +1250,7 @@ dnl Available from the GNU Autoconf Macro Archive at:
 dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_typename.html
 dnl
 AC_DEFUN([AC_CXX_TYPENAME],
-[AH_TEMPLATE([HAVE_TYPENAME], [Define if typename is a known keyword])
+[AH_TEMPLATE(HAVE_TYPENAME, [Define if typename is a known keyword.])
 AC_CACHE_CHECK(whether the compiler recognizes typename,
 ac_cv_cxx_typename,
 [AC_LANG_SAVE
@@ -1224,7 +1261,7 @@ ac_cv_cxx_typename,
  AC_LANG_RESTORE
 ])
 if test "$ac_cv_cxx_typename" = yes; then
-  AC_DEFINE(HAVE_TYPENAME,,[Define if the compiler recognizes typename.])
+  AC_DEFINE(HAVE_TYPENAME)
 fi
 ])
 
@@ -1233,7 +1270,7 @@ dnl Available from the GNU Autoconf Macro Archive at:
 dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_const_cast.html
 dnl
 AC_DEFUN([AC_CXX_CONST_CAST],
-[AH_TEMPLATE([HAVE_CONST_CAST], [Define if the compiler supports const_cast<>])
+[AH_TEMPLATE(HAVE_CONST_CAST, [Define if the compiler supports const_cast<>.])
 AC_CACHE_CHECK(whether the compiler supports const_cast<>,
 ac_cv_cxx_const_cast,
 [AC_LANG_SAVE
@@ -1243,7 +1280,7 @@ ac_cv_cxx_const_cast,
  AC_LANG_RESTORE
 ])
 if test "$ac_cv_cxx_const_cast" = yes; then
-  AC_DEFINE(HAVE_CONST_CAST,,[Define if the compiler supports const_cast<>.])
+  AC_DEFINE(HAVE_CONST_CAST)
 fi
 ])
 
@@ -1252,7 +1289,7 @@ dnl Available from the GNU Autoconf Macro Archive at:
 dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_dynamic_cast.html
 dnl
 AC_DEFUN([AC_CXX_DYNAMIC_CAST],
-[AH_TEMPLATE([HAVE_DYNAMIC_CAST], [Define if the compiler supports dynamic_cast<>])
+[AH_TEMPLATE(HAVE_DYNAMIC_CAST, [Define if the compiler supports dynamic_cast<>.])
 AC_CACHE_CHECK(whether the compiler supports dynamic_cast<>,
 ac_cv_cxx_dynamic_cast,
 [AC_LANG_SAVE
@@ -1265,7 +1302,7 @@ Derived d; Base& b=d; return dynamic_cast<Derived*>(&b) ? 0 : 1;],
  AC_LANG_RESTORE
 ])
 if test "$ac_cv_cxx_dynamic_cast" = yes; then
-  AC_DEFINE(HAVE_DYNAMIC_CAST,,[Define if the compiler supports dynamic_cast<>.])
+  AC_DEFINE(HAVE_DYNAMIC_CAST)
 fi
 ])
 
@@ -1274,7 +1311,7 @@ dnl Available from the GNU Autoconf Macro Archive at:
 dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_reinterpret_cast.html
 dnl
 AC_DEFUN([AC_CXX_REINTERPRET_CAST],
-[AH_TEMPLATE([HAVE_REINTERPRET_CAST], [Define if the compiler supports reinterpret_cast<>])
+[AH_TEMPLATE(HAVE_REINTERPRET_CAST, [Define if the compiler supports reinterpret_cast<>.])
 AC_CACHE_CHECK(whether the compiler supports reinterpret_cast<>,
 ac_cv_cxx_reinterpret_cast,
 [AC_LANG_SAVE
@@ -1289,8 +1326,7 @@ Derived d;Base& b=d;Unrelated& e=reinterpret_cast<Unrelated&>(b);return g(e);],
  AC_LANG_RESTORE
 ])
 if test "$ac_cv_cxx_reinterpret_cast" = yes; then
-  AC_DEFINE(HAVE_REINTERPRET_CAST,,
-            [Define if the compiler supports reinterpret_cast<>.])
+  AC_DEFINE(HAVE_REINTERPRET_CAST)
 fi
 ])
 
@@ -1299,7 +1335,7 @@ dnl Available from the GNU Autoconf Macro Archive at:
 dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_cxx_static_cast.html
 dnl
 AC_DEFUN([AC_CXX_STATIC_CAST],
-[AH_TEMPLATE([HAVE_STATIC_CAST], [Define if the compiler supports static_cast<>])
+[AH_TEMPLATE(HAVE_STATIC_CAST, [Define if the compiler supports static_cast<>.])
 AC_CACHE_CHECK(whether the compiler supports static_cast<>,
 ac_cv_cxx_static_cast,
 [AC_LANG_SAVE
@@ -1313,17 +1349,16 @@ Derived d; Base& b = d; Derived& s = static_cast<Derived&> (b); return g (s);],
  AC_LANG_RESTORE
 ])
 if test "$ac_cv_cxx_static_cast" = yes; then
-  AC_DEFINE(HAVE_STATIC_CAST,,
-            [Define if the compiler supports static_cast<>.])
+  AC_DEFINE(HAVE_STATIC_CAST)
 fi
 ])
 
 
 dnl AC_CXX_STD_NOTHROW checks if the compiler supports non-throwing new using
 dnl std::nothrow.
-
+dnl
 AC_DEFUN([AC_CXX_STD_NOTHROW],
-[AH_TEMPLATE([HAVE_STD__NOTHROW], [Define if the compiler supports std::nothrow])
+[AH_TEMPLATE(HAVE_STD__NOTHROW, [Define if the compiler supports std::nothrow.])
 AC_CACHE_CHECK(whether the compiler supports std::nothrow,
 ac_cv_cxx_std_nothrow,
 [AC_LANG_SAVE
@@ -1333,16 +1368,16 @@ ac_cv_cxx_std_nothrow,
  AC_LANG_RESTORE
 ])
 if test "$ac_cv_cxx_std_nothrow" = yes; then
-  AC_DEFINE(HAVE_STD__NOTHROW,, [Define if the compiler supports std::nothrow.])
+  AC_DEFINE(HAVE_STD__NOTHROW)
 fi
 ])
 
 
 dnl AC_CXX_NOTHROW_DELETE checks if the compiler supports non-throwing delete using
 dnl std::nothrow.
-
+dnl
 AC_DEFUN([AC_CXX_NOTHROW_DELETE],
-[AH_TEMPLATE([HAVE_NOTHROW_DELETE], [Define if the compiler supports operator delete (std::nothrow.)])
+[AH_TEMPLATE(HAVE_NOTHROW_DELETE, [Define if the compiler supports operator delete (std::nothrow).])
 AC_CACHE_CHECK(whether the compiler supports operator delete (std::nothrow),
 ac_cv_cxx_nothrow_delete,
 [AC_LANG_SAVE
@@ -1352,16 +1387,16 @@ ac_cv_cxx_nothrow_delete,
  AC_LANG_RESTORE
 ])
 if test "$ac_cv_cxx_nothrow_delete" = yes; then
-  AC_DEFINE(HAVE_NOTHROW_DELETE,, [Define if the compiler supports operator delete (std::nothrow.)])
+  AC_DEFINE(HAVE_NOTHROW_DELETE)
 fi
 ])
 
 
 dnl AC_CXX_NOTHROW_DELETE checks if the compiler supports non-throwing delete using
 dnl std::nothrow.
-
+dnl
 AC_DEFUN([AC_CXX_STATIC_ASSERT],
-[AH_TEMPLATE([HAVE_STATIC_ASSERT], [Define if the compiler supports static_assert])
+[AH_TEMPLATE(HAVE_STATIC_ASSERT, [Define if the compiler supports static_assert.])
 AC_CACHE_CHECK(whether the compiler supports static_assert,
 ac_cv_cxx_static_assert,
 [AC_LANG_SAVE
@@ -1371,7 +1406,7 @@ ac_cv_cxx_static_assert,
  AC_LANG_RESTORE
 ])
 if test "$ac_cv_cxx_static_assert" = yes; then
-  AC_DEFINE(HAVE_STATIC_ASSERT,, [Define if the compiler supports static_assert])
+  AC_DEFINE(HAVE_STATIC_ASSERT)
 fi
 ])
 
@@ -1379,9 +1414,9 @@ fi
 dnl AC_CXX_LIBC_H_EXTERN_C checks if <libc.h> and <math.h> cause a problem if
 dnl   libc.h is included extern "C" and math.h is not. This is the case on QNX
 dnl   6.2.x and 6.5.x.
-
+dnl
 AC_DEFUN([AC_CXX_LIBC_H_EXTERN_C],
-[AH_TEMPLATE([INCLUDE_LIBC_H_AS_CXX], [Define if libc.h should be treated as a C++ header])
+[AH_TEMPLATE(INCLUDE_LIBC_H_AS_CXX, [Define if libc.h should be treated as a C++ header.])
 AC_CACHE_CHECK(whether libc.h should be treated as a C++ header,
 ac_cv_cxx_libc_h_is_cxx,
 [AC_LANG_SAVE
@@ -1394,7 +1429,7 @@ ac_cv_cxx_libc_h_is_cxx,
  AC_LANG_RESTORE
 ])
 if test "$ac_cv_cxx_libc_h_is_cxx" = yes; then
-  AC_DEFINE(INCLUDE_LIBC_H_AS_CXX,, [Define if libc.h should be treated as a C++ header])
+  AC_DEFINE(INCLUDE_LIBC_H_AS_CXX)
 fi
 ])
 
@@ -1406,11 +1441,11 @@ dnl   have already been found using the AC_CHECK_HEADERS(header) macro.
 dnl Examples:
 dnl     AC_CHECK_POINTER_TYPE(pthread_d, pthread.h)
 dnl     AC_CHECK_POINTER_TYPE(void *)
-
+dnl
 dnl AC_CHECK_POINTER_TYPE(FUNCTION, HEADER-FILE...)
 AC_DEFUN(AC_CHECK_POINTER_TYPE,
 [AC_MSG_CHECKING([ifelse([$2], , [if $1 is a pointer type], [if $1 is a pointer type (in $2)])])
-AH_TEMPLATE(AS_TR_CPP(HAVE_POINTER_TYPE_$1), [Define if $1 is a pointer type on your system])
+AH_TEMPLATE(AS_TR_CPP(HAVE_POINTER_TYPE_$1), [Define if $1 is a pointer type on your system.])
 ifelse([$2], , [ac_includes=""
 ],
 [ac_includes=""
@@ -1447,10 +1482,7 @@ $1 p; unsigned long l = p
 eval "ac_cv_pointer_type_$tmp_save_1=no", eval "ac_cv_pointer_type_$tmp_save_1=yes")])dnl
 if eval "test \"`echo '$''{'ac_cv_pointer_type_$tmp_save_1'}'`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_prototype=HAVE_POINTER_TYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED([$ac_tr_prototype])
+  AC_DEFINE(AS_TR_CPP(HAVE_POINTER_TYPE_$1))
   ifelse([$3], , :, [$3])
 else
   AC_MSG_RESULT(no)
@@ -1458,12 +1490,11 @@ fi
 ])
 
 
-dnl
 dnl CHECK_VLA checks if the C Compiler supports variable-length arrays
 dnl
 AC_DEFUN(CHECK_VLA,
 [AC_MSG_CHECKING([whether variable-length arrays are supported])
-AH_TEMPLATE([HAVE_VLA], [Define if variable-length arrays are supported in C])
+AH_TEMPLATE(HAVE_VLA, [Define if variable-length arrays are supported in C.])
 AC_LANG_SAVE
 AC_LANG_C
 AC_TRY_COMPILE([], [
@@ -1519,8 +1550,8 @@ AC_TYPEDEF_HELPER([$1],[],[AC_DEFINE_UNQUOTED(AC_TYPEDEF_TEMP, [1], [Define `$1'
 # when _LARGEFILE64_SOURCE is defined
 #
 AC_DEFUN([AC_LFS64],
-[ AH_TEMPLATE([DCMTK_ENABLE_LFS], [Select LFS mode (defined above) that shall be used or don't define it])
-  AH_TEMPLATE([_LARGEFILE64_SOURCE], [Define to enable LFS64 (explicit large file support) if available])
+[ AH_TEMPLATE(DCMTK_ENABLE_LFS, [Select LFS mode (defined above) that shall be used or don't define it.])
+  AH_TEMPLATE(_LARGEFILE64_SOURCE, [Define to enable LFS64 (explicit large file support) if available.])
   AC_MSG_CHECKING([for explicit large file support])
   ac_cv_lfs64_support=no
   AC_LANG_SAVE
@@ -1532,8 +1563,8 @@ AC_DEFUN([AC_LFS64],
 
   if test "$ac_cv_lfs64_support" = yes; then
     AC_MSG_RESULT([yes])
-    AC_DEFINE(DCMTK_ENABLE_LFS, DCMTK_LFS64, [Select LFS mode (defined above) that shall be used or don't define it])
-    AC_DEFINE(_LARGEFILE64_SOURCE, 1, [Define to enable LFS64 (explicit large file support) if available])
+    AC_DEFINE(DCMTK_ENABLE_LFS, DCMTK_LFS64)
+    AC_DEFINE(_LARGEFILE64_SOURCE)
   else
     AC_MSG_RESULT([no])
   fi
@@ -1551,15 +1582,15 @@ m4_define([MY_AC_SYS_LARGEFILE_TEST_INCLUDES],
     incorrectly reject 9223372036854775807.  */
 @%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1]];[]dnl
+                    && LARGE_OFF_T % 2147483647 == 1)
+                    ? 1 : -1]];[]dnl
 ])
 
 
 # MY_AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
-#                              CACHE-VAR,
-#                              DESCRIPTION,
-#                              PROLOGUE, [FUNCTION-BODY])
+#                                 CACHE-VAR,
+#                                 DESCRIPTION,
+#                                 PROLOGUE, [FUNCTION-BODY])
 # Copied from autoconf 2.60 repository of specific tests and renamed
 # ----------------------------------------------------------
 m4_define([MY_AC_SYS_LARGEFILE_MACRO_VALUE],
@@ -1567,10 +1598,10 @@ m4_define([MY_AC_SYS_LARGEFILE_MACRO_VALUE],
 [while :; do
   $3=no
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$5], [$6])],
-                   [ac_cv_lfs_support=yes; break])
+    [ac_cv_lfs_support=yes; break])
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([@%:@define $1 $2
 $5], [$6])],
-                   [$3=$2; ac_cv_lfs_support=yes; break])
+    [$3=$2; ac_cv_lfs_support=yes; break])
   break
 done])
 if test "$$3" != no; then
@@ -1597,13 +1628,13 @@ AC_DEFUN([MY_AC_SYS_LARGEFILE],
        AC_LANG_C
        ac_save_CC=$CC
        while :; do
-        # IRIX 6.2 and later do not support large files by default,
-        # so use the C compiler's -n32 option if that helps.
-        AC_LANG_CONFTEST([AC_LANG_PROGRAM([MY_AC_SYS_LARGEFILE_TEST_INCLUDES])])
-        AC_COMPILE_IFELSE([], [break])
-        CC="$CC -n32"
-        AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
-        break
+        # IRIX 6.2 and later do not support large files by default,
+        # so use the C compiler's -n32 option if that helps.
+        AC_LANG_CONFTEST([AC_LANG_PROGRAM([MY_AC_SYS_LARGEFILE_TEST_INCLUDES])])
+        AC_COMPILE_IFELSE([], [break])
+        CC="$CC -n32"
+        AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
+        break
        done
        CC=$ac_save_CC
        rm -f conftest.$ac_ext
@@ -1615,7 +1646,7 @@ AC_DEFUN([MY_AC_SYS_LARGEFILE],
   fi
 
   ac_cv_lfs64_support=no
-  AH_TEMPLATE([DCMTK_ENABLE_LFS], [Select LFS mode (defined above) that shall be used or don't define it])
+  AH_TEMPLATE(DCMTK_ENABLE_LFS, [Select LFS mode (defined above) that shall be used or don't define it.])
   MY_AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
     ac_cv_sys_file_offset_bits,
     [Number of bits in a file offset, on hosts where this is settable.],
@@ -1626,7 +1657,7 @@ AC_DEFUN([MY_AC_SYS_LARGEFILE],
     [MY_AC_SYS_LARGEFILE_TEST_INCLUDES])
 
   if test "$ac_cv_lfs_support" = yes; then
-    AC_DEFINE(DCMTK_ENABLE_LFS, DCMTK_LFS, [Select LFS mode (defined above) that shall be used or don't define it])
+    AC_DEFINE(DCMTK_ENABLE_LFS, DCMTK_LFS)
   fi
 
 ])# MY_AC_SYS_LARGEFILE
@@ -1639,16 +1670,12 @@ AC_DEFUN([MY_AC_SYS_LARGEFILE],
 # in namespace standard or in global namespace.
 #
 AC_DEFUN([AC_STDIO_NAMESPACE],
-[ AH_TEMPLATE([STDIO_NAMESPACE], [Namespace for ANSI C functions in standard C++ headers])
+[ AH_TEMPLATE(STDIO_NAMESPACE, [Namespace for ANSI C functions in standard C++ headers.])
   ac_cv_stdio_namespace_is_std=no
   AC_LANG_SAVE
   AC_LANG_CPLUSPLUS
   AC_TRY_COMPILE([
-#ifdef USE_STD_CXX_INCLUDES
 #include <cstdio>
-#else
-#include <stdio.h>
-#endif
 ],[FILE *f = ::fopen("name", "r");],
   ac_cv_stdio_namespace_is_std=no, ac_cv_stdio_namespace_is_std=yes)
   AC_LANG_RESTORE
@@ -1669,8 +1696,8 @@ dnl AC_CHECK_CHARP_STRERROR_R(HEADER-FILE..., ACTION-IF-FOUND [, ACTION-IF-NOT-F
 AC_DEFUN(AC_CHECK_CHARP_STRERROR_R,
 [AC_MSG_CHECKING([ifelse([$1], , [if strerror_r() returns a char *],
 [if strerror_r() returns a char * (in $1)])])
-AH_TEMPLATE([HAVE_CHARP_STRERROR_R], [Define if your system declares the return type of strerror_r
-   as char * instead of int])
+AH_TEMPLATE(HAVE_CHARP_STRERROR_R, [Define if your system declares the return type of strerror_r
+   as char * instead of int.])
 ifelse([$1], , [ac_includes=""
 ],
 [ac_includes=""
@@ -1699,10 +1726,7 @@ eval "ac_cv_prototype_charp_strerror_r=yes"
 )])
 if eval "test \"`echo $ac_cv_prototype_charp_strerror_r`\" = yes"; then
   AC_MSG_RESULT(yes)
-changequote(, )dnl
-  ac_tr_prototype=HAVE_CHARP_STRERROR_R
-changequote([, ])dnl
-  AC_DEFINE_UNQUOTED($ac_tr_prototype)
+  AC_DEFINE(HAVE_CHARP_STRERROR_R)
   ifelse([$2], , :, [$2])
 else
   AC_MSG_RESULT(no)
@@ -1963,61 +1987,11 @@ dnl
 dnl AC_MY_SYMBOL_EXISTS(SYMBOL)
 AC_DEFUN([AC_MY_SYMBOL_EXISTS],
 [
-    AH_TEMPLATE([HAVE_$1_MACRO], [Define if the compiler supports $1.])dnl
+    AH_TEMPLATE(HAVE_$1_MACRO, [Define if the compiler supports $1.])dnl
     AC_CACHE_CHECK([for $1 macro], [ac_cv_have_$1_macro], [dnl
         AC_TRY_COMPILE([], [const char * func = $1;], [ac_cv_have_$1_macro=yes], [ac_cv_have_$1_macro=no])dnl
     ])
     if test "x$ac_cv_have_$1_macro" = "xyes"; then
-        AC_DEFINE([HAVE_$1_MACRO])
+        AC_DEFINE(HAVE_$1_MACRO)
     fi
 ])
-
-dnl
-dnl This macro checks if OpenSSL provides the SSL_CTX_get0_param function
-dnl
-dnl AC_CHECK_SSL_CTX_GET0_PARAM
-AC_DEFUN([AC_CHECK_SSL_CTX_GET0_PARAM],
-[
-    AH_TEMPLATE([HAVE_SSL_CTX_GET0_PARAM], [Define if OpenSSL provides the SSL_CTX_get0_param function.])dnl
-    SAVELIBS=$LIBS
-    HAVE_SSL_CTX_GET0_PARAM=yes
-    LIBS="$LIBS $OPENSSLLIBS"
-    AC_MSG_CHECKING([whether OpenSSL provides the SSL_CTX_get0_param function])
-    AC_COMPILE_IFELSE(
-    [
-        AC_LANG_PROGRAM([[#include <openssl/ssl.h>]],[[&SSL_CTX_get0_param;]])
-    ],
-    [
-        AC_MSG_RESULT([yes])
-        AC_DEFINE([HAVE_SSL_CTX_GET0_PARAM])
-    ],
-    [
-        AC_MSG_RESULT([no])
-    ])
-    LIBS=$SAVELIBS
-])
-
-dnl
-dnl This macro checks if OpenSSL provides the RAND_egd function
-dnl
-dnl AC_CHECK_RAND_EGD
-AC_DEFUN([AC_CHECK_RAND_EGD],
-[
-    AH_TEMPLATE([HAVE_RAND_EGD], [Define if OpenSSL provides the RAND_egd function.])dnl
-    SAVELIBS=$LIBS
-    HAVE_RAND_EGD=yes
-    LIBS="$LIBS $OPENSSLLIBS"
-    AC_MSG_CHECKING([whether OpenSSL provides the RAND_egd function])
-    AC_COMPILE_IFELSE(
-    [
-        AC_LANG_PROGRAM([[#include <openssl/rand.h>]],[[&RAND_egd;]])
-    ],
-    [
-        AC_MSG_RESULT([yes])
-        AC_DEFINE([HAVE_RAND_EGD])
-    ],
-    [
-        AC_MSG_RESULT([no])
-    ])
-    LIBS=$SAVELIBS
-])
index 9592c9c75cc319f77125825e91fe5a5da66ec15d..8ecb4ca91871dabf14823b4ebaec37f7a125e9c8 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for dcmtk 3.6.6.
+# Generated by GNU Autoconf 2.69 for dcmtk 3.6.7.
 #
 # Report bugs to <bugs@dcmtk.org>.
 #
@@ -579,9 +579,9 @@ MAKEFLAGS=
 
 # Identity of this package.
 PACKAGE_NAME='dcmtk'
-PACKAGE_TARNAME='dcmtk-3.6.6'
-PACKAGE_VERSION='3.6.6'
-PACKAGE_STRING='dcmtk 3.6.6'
+PACKAGE_TARNAME='dcmtk-3.6.7'
+PACKAGE_VERSION='3.6.7'
+PACKAGE_STRING='dcmtk 3.6.7'
 PACKAGE_BUGREPORT='bugs@dcmtk.org'
 PACKAGE_URL='http://www.dcmtk.org/'
 
@@ -722,10 +722,9 @@ enable_option_checking
 enable_debug
 enable_threads
 enable_lfs
-enable_std_includes
+enable_default_dict
+enable_dcmdictpath
 enable_private_tags
-enable_external_dict
-enable_builtin_dict
 enable_rpath
 with_opensslinc
 with_openssl
@@ -1324,7 +1323,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures dcmtk 3.6.6 to adapt to many kinds of systems.
+\`configure' configures dcmtk 3.6.7 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1390,7 +1389,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dcmtk 3.6.6:";;
+     short | recursive ) echo "Configuration of dcmtk 3.6.7:";;
    esac
   cat <<\_ACEOF
 
@@ -1404,14 +1403,14 @@ Optional Features:
   --disable-threads       compile without MT support
   --enable-lfs=TYPE       compile with LFS support (lfs/lfs64/auto=default)
   --disable-lfs           compile without LFS support
-  --enable-std-includes   use C++ ANSI standard includes (default: auto)
-  --disable-std-includes  use old C++ includes
+  --enable-default-dict=TYPE
+                          enable default dictionary and specify type
+                          (external=default/builtin)
+  --disable-default-dict  disable default dictionary
+  --enable-dcmdictpath    enable DCMDICTPATH environment variable (default)
+  --disable-dcmdictpath   disable DCMDICTPATH environment variable
   --enable-private-tags   enable private tag dictionary
   --disable-private-tags  don't enable private tag dictionary (default)
-  --enable-external-dict  enable loading of external dictionary (default)
-  --disable-external-dict don't load external dictionary
-  --enable-builtin-dict   enable loading of built-in dictionary
-  --disable-builtin-dict  don't load built-in dictionary (default)
   --disable-rpath         do not hardcode runtime library paths
   --enable-charconv=TYPE  enable character set conversion support
                           (libiconv/libicu/stdlibc/auto=default)
@@ -1563,7 +1562,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-dcmtk configure 3.6.6
+dcmtk configure 3.6.7
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2423,7 +2422,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by dcmtk $as_me 3.6.6, which was
+It was created by dcmtk $as_me 3.6.7, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2845,10 +2844,10 @@ ac_config_headers="$ac_config_headers include/dcmtk/config/osconfig.h"
 
 
 
-PACKAGE_VERSION_NUMBER=366
-PACKAGE_VERSION_SUFFIX=""
-PACKAGE_DATE="2021-01-14"
 
+PACKAGE_VERSION_NUMBER=367
+PACKAGE_VERSION_SUFFIX=""
+PACKAGE_DATE="2022-04-22"
 
 cat >>confdefs.h <<_ACEOF
 #define PACKAGE_VERSION_NUMBER ${PACKAGE_VERSION_NUMBER}
@@ -5340,9 +5339,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_my_c_const" >&5
 $as_echo "$ac_cv_my_c_const" >&6; }
 if test $ac_cv_my_c_const = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define HAVE_C_CONST 1
-_ACEOF
+  $as_echo "#define HAVE_C_CONST 1" >>confdefs.h
 
 fi
 
@@ -5457,7 +5454,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_my_c_rightshift_unsigned" >&5
 $as_echo "$ac_cv_my_c_rightshift_unsigned" >&6; }
 if test $ac_cv_my_c_rightshift_unsigned = yes ; then
-  $as_echo "#define C_CHAR_UNSIGNED 1" >>confdefs.h
+  $as_echo "#define C_RIGHTSHIFT_UNSIGNED 1" >>confdefs.h
 
 fi
 
@@ -6062,7 +6059,7 @@ _ACEOF
 fi
 done
 
-for ac_func in strerror strdup bzero index rindex access
+for ac_func in strerror strdup index rindex access
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -6453,8 +6450,7 @@ int value = ENAMETOOLONG;
 }
 _ACEOF
 if ac_fn_c_try_compile "$LINENO"; then :
-
-$as_echo "#define HAVE_ENAMETOOLONG /**/" >>confdefs.h
+  $as_echo "#define HAVE_ENAMETOOLONG 1" >>confdefs.h
 
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
@@ -6525,8 +6521,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_const_cast" >&5
 $as_echo "$ac_cv_cxx_const_cast" >&6; }
 if test "$ac_cv_cxx_const_cast" = yes; then
-
-$as_echo "#define HAVE_CONST_CAST /**/" >>confdefs.h
+  $as_echo "#define HAVE_CONST_CAST 1" >>confdefs.h
 
 fi
 
@@ -6574,8 +6569,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_dynamic_cast" >&5
 $as_echo "$ac_cv_cxx_dynamic_cast" >&6; }
 if test "$ac_cv_cxx_dynamic_cast" = yes; then
-
-$as_echo "#define HAVE_DYNAMIC_CAST /**/" >>confdefs.h
+  $as_echo "#define HAVE_DYNAMIC_CAST 1" >>confdefs.h
 
 fi
 
@@ -6625,8 +6619,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_reinterpret_cast" >&5
 $as_echo "$ac_cv_cxx_reinterpret_cast" >&6; }
 if test "$ac_cv_cxx_reinterpret_cast" = yes; then
-
-$as_echo "#define HAVE_REINTERPRET_CAST /**/" >>confdefs.h
+  $as_echo "#define HAVE_REINTERPRET_CAST 1" >>confdefs.h
 
 fi
 
@@ -6675,8 +6668,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_static_cast" >&5
 $as_echo "$ac_cv_cxx_static_cast" >&6; }
 if test "$ac_cv_cxx_static_cast" = yes; then
-
-$as_echo "#define HAVE_STATIC_CAST /**/" >>confdefs.h
+  $as_echo "#define HAVE_STATIC_CAST 1" >>confdefs.h
 
 fi
 
@@ -6721,8 +6713,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_std_nothrow" >&5
 $as_echo "$ac_cv_cxx_std_nothrow" >&6; }
 if test "$ac_cv_cxx_std_nothrow" = yes; then
-
-$as_echo "#define HAVE_STD__NOTHROW /**/" >>confdefs.h
+  $as_echo "#define HAVE_STD__NOTHROW 1" >>confdefs.h
 
 fi
 
@@ -6767,8 +6758,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_nothrow_delete" >&5
 $as_echo "$ac_cv_cxx_nothrow_delete" >&6; }
 if test "$ac_cv_cxx_nothrow_delete" = yes; then
-
-$as_echo "#define HAVE_NOTHROW_DELETE /**/" >>confdefs.h
+  $as_echo "#define HAVE_NOTHROW_DELETE 1" >>confdefs.h
 
 fi
 
@@ -6813,8 +6803,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_static_assert" >&5
 $as_echo "$ac_cv_cxx_static_assert" >&6; }
 if test "$ac_cv_cxx_static_assert" = yes; then
-
-$as_echo "#define HAVE_STATIC_ASSERT /**/" >>confdefs.h
+  $as_echo "#define HAVE_STATIC_ASSERT 1" >>confdefs.h
 
 fi
 
@@ -8841,9 +8830,7 @@ fi
 if eval "test \"`echo '$ac_cv_header_poll_h'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  cat >>confdefs.h <<_ACEOF
-#define DCMTK_HAVE_POLL 1
-_ACEOF
+  $as_echo "#define DCMTK_HAVE_POLL 1" >>confdefs.h
 
   :
 else
@@ -8899,8 +8886,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_libc_h_is_cxx" >&5
 $as_echo "$ac_cv_cxx_libc_h_is_cxx" >&6; }
 if test "$ac_cv_cxx_libc_h_is_cxx" = yes; then
-
-$as_echo "#define INCLUDE_LIBC_H_AS_CXX /**/" >>confdefs.h
+  $as_echo "#define INCLUDE_LIBC_H_AS_CXX 1" >>confdefs.h
 
 fi
 
@@ -8964,10 +8950,7 @@ fi
 if eval "test \"`echo '$''{'ac_cv_pointer_type_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_POINTER_TYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_POINTER_TYPE_PTHREAD_T 1" >>confdefs.h
 
   :
 else
@@ -9258,7 +9241,7 @@ $as_echo "$ac_cv_lib_pthread_pthread_rwlock_init" >&6; }
 if test "x$ac_cv_lib_pthread_pthread_rwlock_init" = xyes; then :
 
 
-$as_echo "#define HAVE_PTHREAD_RWLOCK /**/" >>confdefs.h
+$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
 
                             POSIXRWLOCKSAVAILABLE="yes"
     case "${host}" in
@@ -9313,7 +9296,7 @@ if ac_fn_cxx_try_link "$LINENO"; then :
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define HAVE_PTHREAD_RWLOCK /**/" >>confdefs.h
+$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
 
                             POSIXRWLOCKSAVAILABLE="yes"
     case "${host}" in
@@ -9368,7 +9351,7 @@ $as_echo "yes, solaris threads" >&6; }
     CXXFLAGS="-D_REENTRANT $CXXFLAGS"
     CFLAGS="-D_REENTRANT $CFLAGS"
 
-$as_echo "#define WITH_THREADS /**/" >>confdefs.h
+$as_echo "#define WITH_THREADS 1" >>confdefs.h
 
     ;;
   posix)
@@ -9382,7 +9365,7 @@ $as_echo "yes, posix threads without rwlock" >&6; }
     CXXFLAGS="-D_REENTRANT $CXXFLAGS"
     CFLAGS="-D_REENTRANT $CFLAGS"
 
-$as_echo "#define WITH_THREADS /**/" >>confdefs.h
+$as_echo "#define WITH_THREADS 1" >>confdefs.h
 
     ;;
   *)
@@ -9434,11 +9417,9 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   if test "$ac_cv_lfs64_support" = yes; then
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
+    $as_echo "#define DCMTK_ENABLE_LFS DCMTK_LFS64" >>confdefs.h
 
-$as_echo "#define DCMTK_ENABLE_LFS DCMTK_LFS64" >>confdefs.h
-
-
-$as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
+    $as_echo "#define _LARGEFILE64_SOURCE 1" >>confdefs.h
 
   else
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -9467,9 +9448,9 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
        ac_save_CC=$CC
        while :; do
-        # IRIX 6.2 and later do not support large files by default,
-        # so use the C compiler's -n32 option if that helps.
-        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+        # IRIX 6.2 and later do not support large files by default,
+        # so use the C compiler's -n32 option if that helps.
+        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/types.h>
  /* Check that off_t can represent 2**63 - 1 correctly.
@@ -9478,8 +9459,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
     incorrectly reject 9223372036854775807.  */
 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
+                    && LARGE_OFF_T % 2147483647 == 1)
+                    ? 1 : -1];
 int
 main ()
 {
@@ -9488,16 +9469,16 @@ main ()
   return 0;
 }
 _ACEOF
-        if ac_fn_c_try_compile "$LINENO"; then :
+        if ac_fn_c_try_compile "$LINENO"; then :
   break
 fi
 rm -f core conftest.err conftest.$ac_objext
-        CC="$CC -n32"
-        if ac_fn_c_try_compile "$LINENO"; then :
+        CC="$CC -n32"
+        if ac_fn_c_try_compile "$LINENO"; then :
   ac_cv_sys_largefile_CC=' -n32'; break
 fi
 rm -f core conftest.err conftest.$ac_objext
-        break
+        break
        done
        CC=$ac_save_CC
        rm -f conftest.$ac_ext
@@ -9534,8 +9515,8 @@ else
     incorrectly reject 9223372036854775807.  */
 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
+                    && LARGE_OFF_T % 2147483647 == 1)
+                    ? 1 : -1];
 int
 main ()
 {
@@ -9558,8 +9539,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     incorrectly reject 9223372036854775807.  */
 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
+                    && LARGE_OFF_T % 2147483647 == 1)
+                    ? 1 : -1];
 int
 main ()
 {
@@ -9601,8 +9582,8 @@ else
     incorrectly reject 9223372036854775807.  */
 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
+                    && LARGE_OFF_T % 2147483647 == 1)
+                    ? 1 : -1];
 int
 main ()
 {
@@ -9625,8 +9606,8 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
     incorrectly reject 9223372036854775807.  */
 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
-                      && LARGE_OFF_T % 2147483647 == 1)
-                     ? 1 : -1];
+                    && LARGE_OFF_T % 2147483647 == 1)
+                    ? 1 : -1];
 int
 main ()
 {
@@ -9654,8 +9635,7 @@ fi
 rm -f conftest*
 
   if test "$ac_cv_lfs_support" = yes; then
-
-$as_echo "#define DCMTK_ENABLE_LFS DCMTK_LFS" >>confdefs.h
+    $as_echo "#define DCMTK_ENABLE_LFS DCMTK_LFS" >>confdefs.h
 
   fi
 
@@ -10187,7 +10167,6 @@ $as_echo "$ac_cv_have___func___macro" >&6; }
 $as_echo_n "checking prototype for feenableexcept (in fenv.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in fenv.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_FEENABLEEXCEPT 1" >>confdefs.h
 
   :
 else
@@ -10250,7 +10226,6 @@ fi
 $as_echo_n "checking prototype for _stricmp (in string.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in string.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE__STRICMP 1" >>confdefs.h
 
   :
 else
@@ -10313,7 +10285,6 @@ fi
 $as_echo_n "checking prototype for accept (in sys/types.h sys/socket.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in sys/types.h sys/socket.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_ACCEPT 1" >>confdefs.h
 
   :
 else
 if eval "test \"`echo $ac_cv_prototype_intp_accept`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_INTP_ACCEPT
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_INTP_ACCEPT 1" >>confdefs.h
 
   :
 else
@@ -10472,7 +10437,6 @@ fi
 $as_echo_n "checking prototype for bind (in sys/types.h sys/socket.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in sys/types.h sys/socket.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
-
-  :
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking prototype for bzero (in string.h strings.h libc.h unistd.h stdlib.h)" >&5
-$as_echo_n "checking prototype for bzero (in string.h strings.h libc.h unistd.h stdlib.h)... " >&6; }
-
-:
-
-ac_includes=""
-for ac_header in string.h strings.h libc.h unistd.h stdlib.h
-do
-  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
-  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
-    ac_includes="$ac_includes
-#include<$ac_header>"
-  fi
-done
-tmp_save_1=`echo bzero | tr ' :' '__'`
-if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __cplusplus
-extern "C" {
-#endif
-$ac_includes
-#ifdef __cplusplus
-}
-#endif
-typedef union { int member; } dummyStruct;
-#ifdef __cplusplus
-extern "C"
-#endif
-dummyStruct bzero(dummyStruct);
-
-
-int
-main ()
-{
-
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_cxx_try_compile "$LINENO"; then :
-  eval "ac_cv_prototype_$tmp_save_1=no"
-else
-  eval "ac_cv_prototype_$tmp_save_1=yes"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_BIND 1" >>confdefs.h
 
   :
 else
@@ -10598,7 +10496,6 @@ fi
 $as_echo_n "checking prototype for connect (in sys/types.h sys/socket.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in sys/types.h sys/socket.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_CONNECT 1" >>confdefs.h
 
   :
 else
@@ -10661,7 +10555,6 @@ fi
 $as_echo_n "checking prototype for finite (in math.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in math.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_FINITE 1" >>confdefs.h
 
   :
 else
@@ -10724,7 +10614,6 @@ fi
 $as_echo_n "checking prototype for isinf (in math.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in math.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_ISINF 1" >>confdefs.h
 
   :
 else
@@ -10787,7 +10673,6 @@ fi
 $as_echo_n "checking prototype for isnan (in math.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in math.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_ISNAN 1" >>confdefs.h
 
   :
 else
@@ -10850,7 +10732,6 @@ fi
 $as_echo_n "checking prototype for std::finite (in cmath)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in cmath
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_STD__FINITE 1" >>confdefs.h
 
   :
 else
@@ -10913,7 +10791,6 @@ fi
 $as_echo_n "checking prototype for std::isinf (in cmath)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in cmath
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_STD__ISINF 1" >>confdefs.h
 
   :
 else
@@ -10976,7 +10850,6 @@ fi
 $as_echo_n "checking prototype for std::isnan (in cmath)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in cmath
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_STD__ISNAN 1" >>confdefs.h
 
   :
 else
@@ -11039,7 +10909,6 @@ fi
 $as_echo_n "checking prototype for flock (in sys/file.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in sys/file.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_FLOCK 1" >>confdefs.h
 
   :
 else
@@ -11102,7 +10968,6 @@ fi
 $as_echo_n "checking prototype for gethostbyname (in libc.h unistd.h stdlib.h netdb.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in libc.h unistd.h stdlib.h netdb.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_GETHOSTBYNAME 1" >>confdefs.h
 
   :
 else
@@ -11165,7 +11027,6 @@ fi
 $as_echo_n "checking prototype for gethostbyname_r (in libc.h unistd.h stdlib.h netdb.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in libc.h unistd.h stdlib.h netdb.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_GETHOSTBYNAME_R 1" >>confdefs.h
 
   :
 else
@@ -11228,7 +11086,6 @@ fi
 $as_echo_n "checking prototype for gethostbyaddr_r (in libc.h unistd.h stdlib.h netdb.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in libc.h unistd.h stdlib.h netdb.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_GETHOSTBYADDR_R 1" >>confdefs.h
 
   :
 else
@@ -11291,7 +11145,6 @@ fi
 $as_echo_n "checking prototype for gethostid (in libc.h unistd.h stdlib.h netdb.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in libc.h unistd.h stdlib.h netdb.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_GETHOSTID 1" >>confdefs.h
 
   :
 else
@@ -11354,7 +11204,6 @@ fi
 $as_echo_n "checking prototype for gethostname (in unistd.h libc.h stdlib.h netdb.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in unistd.h libc.h stdlib.h netdb.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_GETHOSTNAME 1" >>confdefs.h
 
   :
 else
@@ -11417,7 +11263,6 @@ fi
 $as_echo_n "checking prototype for getsockname (in sys/types.h sys/socket.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in sys/types.h sys/socket.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_GETSOCKNAME 1" >>confdefs.h
 
   :
 else
@@ -11480,7 +11322,6 @@ fi
 $as_echo_n "checking prototype for getsockopt (in sys/types.h sys/socket.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in sys/types.h sys/socket.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_GETSOCKOPT 1" >>confdefs.h
 
   :
 else
@@ -11543,7 +11381,6 @@ fi
 $as_echo_n "checking prototype for strerror_r (in string.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in string.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_STRERROR_R 1" >>confdefs.h
 
   :
 else
 if eval "test \"`echo $ac_cv_prototype_charp_strerror_r`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_CHARP_STRERROR_R
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_CHARP_STRERROR_R 1" >>confdefs.h
 
   :
 else
 if eval "test \"`echo $ac_cv_prototype_intp_getsockopt`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_INTP_GETSOCKOPT
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_INTP_GETSOCKOPT 1" >>confdefs.h
 
   :
 else
@@ -11754,7 +11582,6 @@ fi
 $as_echo_n "checking prototype for gettimeofday (in sys/time.h unistd.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in sys/time.h unistd.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_GETTIMEOFDAY 1" >>confdefs.h
 
   :
 else
@@ -11817,7 +11641,6 @@ fi
 $as_echo_n "checking prototype for listen (in sys/types.h sys/socket.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in sys/types.h sys/socket.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_LISTEN 1" >>confdefs.h
 
   :
 else
@@ -11880,7 +11700,6 @@ fi
 $as_echo_n "checking prototype for mktemp (in libc.h unistd.h stdlib.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in libc.h unistd.h stdlib.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_MKTEMP 1" >>confdefs.h
 
   :
 else
@@ -11943,7 +11759,6 @@ fi
 $as_echo_n "checking prototype for mkstemp (in libc.h unistd.h stdlib.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in libc.h unistd.h stdlib.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_MKSTEMP 1" >>confdefs.h
 
   :
 else
@@ -12006,7 +11818,6 @@ fi
 $as_echo_n "checking prototype for select (in sys/select.h sys/types.h sys/socket.h sys/time.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in sys/select.h sys/types.h sys/socket.h sys/time.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_SELECT 1" >>confdefs.h
 
   :
 else
 if eval "test \"`echo $ac_cv_prototype_intp_select`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_INTP_SELECT
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_INTP_SELECT 1" >>confdefs.h
 
   :
 else
@@ -12160,7 +11965,6 @@ fi
 $as_echo_n "checking prototype for setsockopt (in sys/types.h sys/socket.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in sys/types.h sys/socket.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_SETSOCKOPT 1" >>confdefs.h
 
   :
 else
@@ -12223,7 +12024,6 @@ fi
 $as_echo_n "checking prototype for socket (in sys/types.h sys/socket.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in sys/types.h sys/socket.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_SOCKET 1" >>confdefs.h
 
   :
 else
@@ -12286,7 +12083,6 @@ fi
 $as_echo_n "checking prototype for strcasecmp (in string.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in string.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_STRCASECMP 1" >>confdefs.h
 
   :
 else
@@ -12349,7 +12142,6 @@ fi
 $as_echo_n "checking prototype for strncasecmp (in string.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in string.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_STRNCASECMP 1" >>confdefs.h
 
   :
 else
@@ -12412,7 +12201,6 @@ fi
 $as_echo_n "checking prototype for usleep (in libc.h unistd.h stdlib.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in libc.h unistd.h stdlib.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_USLEEP 1" >>confdefs.h
 
   :
 else
@@ -12475,7 +12260,6 @@ fi
 $as_echo_n "checking prototype for vsnprintf (in stdio.h stdarg.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in stdio.h stdarg.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_VSNPRINTF 1" >>confdefs.h
 
   :
 else
@@ -12538,7 +12319,6 @@ fi
 $as_echo_n "checking prototype for wait3 (in libc.h sys/wait.h sys/time.h sys/resource.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in libc.h sys/wait.h sys/time.h sys/resource.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_WAIT3 1" >>confdefs.h
 
   :
 else
@@ -12601,7 +12378,6 @@ fi
 $as_echo_n "checking prototype for waitpid (in sys/wait.h sys/time.h sys/resource.h)... " >&6; }
 
 :
-
 ac_includes=""
 for ac_header in sys/wait.h sys/time.h sys/resource.h
 do
 if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_WAITPID 1" >>confdefs.h
 
   :
 else
 if eval "test \"\$$ac_cv_declaration\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_declaration=HAVE_DECLARATION_`echo struct utimbuf | tr ' :[a-z]' '__[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_declaration 1
-_ACEOF
+  $as_echo "#define HAVE_DECLARATION_STRUCT_UTIMBUF 1" >>confdefs.h
 
   :
 else
 if eval "test \"\$$ac_cv_declaration\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_declaration=HAVE_DECLARATION_`echo socklen_t | tr ' :[a-z]' '__[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_declaration 1
-_ACEOF
+  $as_echo "#define HAVE_DECLARATION_SOCKLEN_T 1" >>confdefs.h
 
   :
 else
 if eval "test \"\$$ac_cv_result\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_cv_result=HAVE_OLD_READDIR_R
-  cat >>confdefs.h <<_ACEOF
-#define $ac_cv_result 1
-_ACEOF
+  $as_echo "#define HAVE_OLD_READDIR_R 1" >>confdefs.h
 
   else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 if eval "test \"`echo $ac_cv_signal_handler_with_ellipse`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=SIGNAL_HANDLER_WITH_ELLIPSE
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define SIGNAL_HANDLER_WITH_ELLIPSE 1" >>confdefs.h
 
   :
 else
 if eval "test \"`echo $ac_cv_include_math_h_as_cxx`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=INCLUDE_MATH_H_AS_CXX
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define INCLUDE_MATH_H_AS_CXX 1" >>confdefs.h
 
   :
 else
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use C++ standard includes" >&5
-$as_echo_n "checking whether to use C++ standard includes... " >&6; }
-ac_use_std_includes="auto"
-# Check whether --enable-std-includes was given.
-if test "${enable_std_includes+set}" = set; then :
-  enableval=$enable_std_includes;  case "$enableval" in
-  yes)
-   ac_use_std_includes="yes"
-   ;;
-
-  *)
-    ac_use_std_includes="no"
-    ;;
-  esac
-
-fi
-
-
-if test "$ac_cv_header_fstream" = "yes" -a "$ac_cv_header_iostream" = "yes" -a "$ac_cv_header_iomanip" = "yes"; then
-   ac_have_std_includes="yes"
-else
-   ac_have_std_includes="no"
-fi
-
-if test "$ac_cv_header_fstream_h" = "yes" -a "$ac_cv_header_iostream_h" = "yes" -a "$ac_cv_header_iomanip_h" = "yes"; then
-   ac_have_old_includes="yes"
-else
-   ac_have_old_includes="no"
-fi
-
-if test "$ac_use_std_includes" = "yes"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define USE_STD_CXX_INCLUDES /**/" >>confdefs.h
-
-elif test "$ac_use_std_includes" = "no"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-elif test "$ac_have_std_includes" = "yes"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define USE_STD_CXX_INCLUDES /**/" >>confdefs.h
-
-   ac_use_std_includes="yes"
-else
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-   ac_use_std_includes="no"
-fi
-
-if test "$ac_use_std_includes" = "yes"; then
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ standard namespace" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ standard namespace" >&5
 $as_echo_n "checking for C++ standard namespace... " >&6; }
 
 if ${ac_cv_check_std_namespace+:} false; then :
@@ -13074,7 +12779,7 @@ if ${ac_cv_check_std_namespace+:} false; then :
 else
   ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5'
 cat > conftest.$ac_ext <<EOF
-#line 13076 "configure"
+#line 12782 "configure"
 #include "confdefs.h"
 
 #include <iostream>
 if eval "test \"`echo '$ac_cv_check_std_namespace'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_std_namespace=HAVE_STD_NAMESPACE
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_std_namespace 1
-_ACEOF
+  $as_echo "#define HAVE_STD_NAMESPACE 1" >>confdefs.h
 
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 if eval "test \"\$$ac_cv_declaration\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_declaration=HAVE_DECLARATION_`echo std::ios_base::openmode | tr ' :[a-z]' '__[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_declaration 1
-_ACEOF
+  $as_echo "#define HAVE_DECLARATION_STD__IOS_BASE__OPENMODE 1" >>confdefs.h
 
   :
 else
 if eval "test \"\$$ac_cv_declaration\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_declaration=HAVE_IOS_NOCREATE
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_declaration 1
-_ACEOF
+  $as_echo "#define HAVE_IOS_NOCREATE 1" >>confdefs.h
 
   :
 else
@@ -13234,7 +12930,7 @@ $as_echo "no" >&6; }
 fi
 unset ac_cv_declaration
 
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vfprintf (in cstdarg cstdio)" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vfprintf (in cstdarg cstdio)" >&5
 $as_echo_n "checking for std::vfprintf (in cstdarg cstdio)... " >&6; }
 
 ac_includes=""
 if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_STD__VFPRINTF 1" >>confdefs.h
 
   :
 else
@@ -13282,7 +12975,7 @@ else
 $as_echo "no" >&6; }
 fi
 
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vsnprintf (in cstdarg cstdio)" >&5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vsnprintf (in cstdarg cstdio)" >&5
 $as_echo_n "checking for std::vsnprintf (in cstdarg cstdio)... " >&6; }
 
 ac_includes=""
 if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_STD__VSNPRINTF 1" >>confdefs.h
 
   :
 else
@@ -13330,32 +13020,89 @@ else
 $as_echo "no" >&6; }
 fi
 
-else
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration for std::ios_base::openmode (in iostream.h)" >&5
-$as_echo_n "checking declaration for std::ios_base::openmode (in iostream.h)... " >&6; }
-
-ac_includes=""
 
-ac_cpp_includes=""
-for ac_header in iostream.h
-do
-  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
-  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
-    ac_cpp_includes="$ac_cpp_includes
-#include<$ac_header>"
-  fi
-done
 
-ac_cv_declaration=`echo 'ac_cv_declaration_std::ios_base::openmode' | tr ' :' '__'`
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ standard namespace" >&5
+$as_echo_n "checking for C++ standard namespace... " >&6; }
 
-if eval \${$ac_cv_declaration+:} false; then :
+if ${ac_cv_check_std_namespace+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#ifdef __cplusplus
-extern "C" {
+  ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5'
+cat > conftest.$ac_ext <<EOF
+#line 13033 "configure"
+#include "confdefs.h"
+
+#include <iostream>
+using namespace std;
+
+int main() {
+
+  cout << "Hello World" << endl;
+
+; return 0; }
+EOF
+if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link_o\""; } >&5
+  (eval $ac_link_o) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+    rm -rf conftest*
+    eval "ac_cv_check_std_namespace=yes"
+  else
+    echo "configure: failed link was:" >&5
+    cat conftest.$ac_ext >&5
+      rm -rf conftest*
+      eval "ac_cv_check_std_namespace=no"
+      fi
+else
+  echo "configure: failed compile was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_check_std_namespace=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_check_std_namespace'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_STD_NAMESPACE 1" >>confdefs.h
+
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration for std::ios_base::openmode (in iostream)" >&5
+$as_echo_n "checking declaration for std::ios_base::openmode (in iostream)... " >&6; }
+
+ac_includes=""
+
+ac_cpp_includes=""
+for ac_header in iostream
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_cpp_includes="$ac_cpp_includes
+#include<$ac_header>"
+  fi
+done
+
+ac_cv_declaration=`echo 'ac_cv_declaration_std::ios_base::openmode' | tr ' :' '__'`
+
+if eval \${$ac_cv_declaration+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
 #endif
 $ac_includes
 #ifdef __cplusplus
 if eval "test \"\$$ac_cv_declaration\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_declaration=HAVE_DECLARATION_`echo std::ios_base::openmode | tr ' :[a-z]' '__[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_declaration 1
-_ACEOF
+  $as_echo "#define HAVE_DECLARATION_STD__IOS_BASE__OPENMODE 1" >>confdefs.h
 
   :
 else
@@ -13396,8 +13140,8 @@ fi
 unset ac_cv_declaration
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of ios::nocreate (in fstream.h)" >&5
-$as_echo_n "checking declaration of ios::nocreate (in fstream.h)... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking declaration of ios::nocreate (in fstream)" >&5
+$as_echo_n "checking declaration of ios::nocreate (in fstream)... " >&6; }
 
 ac_cv_declaration=ac_cv_declaration_ios_nocreate
 if eval \${$ac_cv_declaration+:} false; then :
@@ -13406,14 +13150,14 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <fstream.h>
+#include <fstream>
 
 int
 main ()
 {
 namespace std { }
 using namespace std;
-ifstream file("name", ios::nocreate)
+ifstream file("name", std::ios::nocreate)
   ;
   return 0;
 }
 if eval "test \"\$$ac_cv_declaration\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_declaration=HAVE_IOS_NOCREATE
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_declaration 1
-_ACEOF
+  $as_echo "#define HAVE_IOS_NOCREATE 1" >>confdefs.h
 
   :
 else
@@ -13440,11 +13181,11 @@ $as_echo "no" >&6; }
 fi
 unset ac_cv_declaration
 
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vfprintf (in stdarg.h stdio.h)" >&5
-$as_echo_n "checking for std::vfprintf (in stdarg.h stdio.h)... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vfprintf (in cstdarg cstdio)" >&5
+$as_echo_n "checking for std::vfprintf (in cstdarg cstdio)... " >&6; }
 
 ac_includes=""
-for ac_header in stdarg.h stdio.h
+for ac_header in cstdarg cstdio
 do
   ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
 if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_STD__VFPRINTF 1" >>confdefs.h
 
   :
 else
@@ -13488,11 +13226,11 @@ else
 $as_echo "no" >&6; }
 fi
 
-   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vsnprintf (in stdarg.h stdio.h)" >&5
-$as_echo_n "checking for std::vsnprintf (in stdarg.h stdio.h)... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::vsnprintf (in cstdarg cstdio)" >&5
+$as_echo_n "checking for std::vsnprintf (in cstdarg cstdio)... " >&6; }
 
 ac_includes=""
-for ac_header in stdarg.h stdio.h
+for ac_header in cstdarg cstdio
 do
   ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
   if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
 if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_PROTOTYPE_`echo $tmp_save_1 | tr '[a-z]' '[A-Z]'`
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype 1
-_ACEOF
+  $as_echo "#define HAVE_PROTOTYPE_STD__VSNPRINTF 1" >>confdefs.h
 
   :
 else
@@ -13536,7 +13271,6 @@ else
 $as_echo "no" >&6; }
 fi
 
-fi
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ class template" >&5
 $as_echo_n "checking for C++ class template... " >&6; }
@@ -13546,7 +13280,7 @@ if ${ac_cv_check_class_template+:} false; then :
 else
   ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5'
 cat > conftest.$ac_ext <<EOF
-#line 13548 "configure"
+#line 13283 "configure"
 #include "confdefs.h"
 
 template <class T>
 if eval "test \"`echo '$ac_cv_check_class_template'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_class_template=HAVE_CLASS_TEMPLATE
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_class_template 1
-_ACEOF
+  $as_echo "#define HAVE_CLASS_TEMPLATE 1" >>confdefs.h
 
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -13618,7 +13349,7 @@ if ${ac_cv_check_static_template_method+:} false; then :
 else
   ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5'
 cat > conftest.$ac_ext <<EOF
-#line 13620 "configure"
+#line 13352 "configure"
 #include "confdefs.h"
 
 void additive(int & i)
 if eval "test \"`echo '$ac_cv_check_static_template_method'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_static_template_method=HAVE_STATIC_TEMPLATE_METHOD
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_static_template_method 1
-_ACEOF
+  $as_echo "#define HAVE_STATIC_TEMPLATE_METHOD 1" >>confdefs.h
 
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -13690,7 +13418,7 @@ if ${ac_cv_check_function_template+:} false; then :
 else
   ac_link_o='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.o $LIBS 1>&5'
 cat > conftest.$ac_ext <<EOF
-#line 13692 "configure"
+#line 13421 "configure"
 #include "confdefs.h"
 
 template <class T>
 if eval "test \"`echo '$ac_cv_check_function_template'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_function_template=HAVE_FUNCTION_TEMPLATE
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_function_template 1
-_ACEOF
+  $as_echo "#define HAVE_FUNCTION_TEMPLATE 1" >>confdefs.h
 
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 if eval "test \"`echo '$ac_cv_check_explicit_template_specialization'`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_explicit_template_specialization=HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION
-  cat >>confdefs.h <<_ACEOF
-#define $ac_tr_explicit_template_specialization 1
-_ACEOF
+  $as_echo "#define HAVE_EXPLICIT_TEMPLATE_SPECIALIZATION 1" >>confdefs.h
 
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 if eval "test \"`echo $ac_cv_have_cxx_volatile`\" = yes"; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-  ac_tr_prototype=HAVE_CXX_VOLATILE
-
-cat >>confdefs.h <<_ACEOF
-#define $ac_tr_prototype /**/
-_ACEOF
+  $as_echo "#define HAVE_CXX_VOLATILE 1" >>confdefs.h
 
   :
 else
@@ -13880,8 +13598,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_typename" >&5
 $as_echo "$ac_cv_cxx_typename" >&6; }
 if test "$ac_cv_cxx_typename" = yes; then
-
-$as_echo "#define HAVE_TYPENAME /**/" >>confdefs.h
+  $as_echo "#define HAVE_TYPENAME 1" >>confdefs.h
 
 fi
 
@@ -13897,11 +13614,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#ifdef USE_STD_CXX_INCLUDES
 #include <cstdio>
-#else
-#include <stdio.h>
-#endif
 
 int
 main ()
@@ -13934,79 +13647,90 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable private tag dictionary" >&5
-$as_echo_n "checking whether to enable private tag dictionary... " >&6; }
-# Check whether --enable-private-tags was given.
-if test "${enable_private_tags+set}" = set; then :
-  enableval=$enable_private_tags;  case "$enableval" in
-  yes)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
 
-$as_echo "#define ENABLE_PRIVATE_TAGS /**/" >>confdefs.h
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable default dictionary" >&5
+$as_echo_n "checking whether to enable default dictionary... " >&6; }
+# Check whether --enable-default-dict was given.
+if test "${enable_default_dict+set}" = set; then :
+  enableval=$enable_default_dict;  case "$enableval" in
+  external|yes)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, type=external" >&5
+$as_echo "yes, type=external" >&6; }
 
+$as_echo "#define DCM_DICT_DEFAULT 2" >>confdefs.h
 
-cat >>confdefs.h <<_ACEOF
-#define DCM_DICT_DEFAULT_PATH "${DATA_DIR}/dicom.dic:${DATA_DIR}/private.dic"
-_ACEOF
+    ;;
+  builtin)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, type=builtin" >&5
+$as_echo "yes, type=builtin" >&6; }
+
+$as_echo "#define DCM_DICT_DEFAULT 1" >>confdefs.h
 
     ;;
-  *)
+  no)
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+
+$as_echo "#define DCM_DICT_DEFAULT 0" >>confdefs.h
+
     ;;
   esac
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define DCM_DICT_DEFAULT 2" >>confdefs.h
+
 
 fi
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable loading external dictionary from default path" >&5
-$as_echo_n "checking whether to enable loading external dictionary from default path... " >&6; }
-# Check whether --enable-external-dict was given.
-if test "${enable_external_dict+set}" = set; then :
-  enableval=$enable_external_dict;  case "$enableval" in
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to evaluate DCMDICTPATH environment variable" >&5
+$as_echo_n "checking whether to evaluate DCMDICTPATH environment variable... " >&6; }
+# Check whether --enable-dcmdictpath was given.
+if test "${enable_dcmdictpath+set}" = set; then :
+  enableval=$enable_dcmdictpath;  case "$enableval" in
   yes)
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define ENABLE_EXTERNAL_DICTIONARY /**/" >>confdefs.h
+$as_echo "#define DCM_DICT_USE_DCMDICTPATH 1" >>confdefs.h
 
     ;;
   *)
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define DCM_DICT_DEFAULT_PATH ""
-_ACEOF
-
     ;;
   esac
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define ENABLE_EXTERNAL_DICTIONARY /**/" >>confdefs.h
+$as_echo "#define DCM_DICT_USE_DCMDICTPATH 1" >>confdefs.h
 
 
 fi
 
 
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable built-in dictionary loading" >&5
-$as_echo_n "checking whether to enable built-in dictionary loading... " >&6; }
-# Check whether --enable-builtin-dict was given.
-if test "${enable_builtin_dict+set}" = set; then :
-  enableval=$enable_builtin_dict;  case "$enableval" in
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable private tag dictionary" >&5
+$as_echo_n "checking whether to enable private tag dictionary... " >&6; }
+# Check whether --enable-private-tags was given.
+if test "${enable_private_tags+set}" = set; then :
+  enableval=$enable_private_tags;  case "$enableval" in
   yes)
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-$as_echo "#define ENABLE_BUILTIN_DICTIONARY /**/" >>confdefs.h
+$as_echo "#define ENABLE_PRIVATE_TAGS 1" >>confdefs.h
+
+
+cat >>confdefs.h <<_ACEOF
+#define DCM_DICT_DEFAULT_PATH "${DATA_DIR}/dicom.dic:${DATA_DIR}/private.dic"
+_ACEOF
 
     ;;
   *)
 
 
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wl,-rpath is supported" >&5
-$as_echo_n "checking whether -Wl,-rpath is supported... " >&6; }
-if ${dcmtk_cv_rpath_works+:} false; then :
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wl,-rpath is supported" >&5
+$as_echo_n "checking whether -Wl,-rpath is supported... " >&6; }
+if ${dcmtk_cv_rpath_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+  enableval=$enable_rpath; dcmtk_cv_rpath_works=$enableval
+else
+  old_LDFLAGS="$LDFLAGS"
+                                 LDFLAGS="-Wl,-rpath,$srcdir $LDFLAGS"
+                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+  dcmtk_cv_rpath_works=yes
+else
+  dcmtk_cv_rpath_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+                                 LDFLAGS="$old_LDFLAGS"
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dcmtk_cv_rpath_works" >&5
+$as_echo "$dcmtk_cv_rpath_works" >&6; }
+
+
+
+# Check whether --with-opensslinc was given.
+if test "${with_opensslinc+set}" = set; then :
+  withval=$with_opensslinc; case $withval in #(
+  yes|no) :
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-opensslinc called without argument - will use default" >&5
+$as_echo "$as_me: WARNING: --with-opensslinc called without argument - will use default" >&2;}
+       ;; #(
+  *) :
+
+        if test ! -d ${withval}; then
+          as_fn_error $? "called with --with-opensslinc but OpenSSL base directory ${withval} does not exist or is not a directory." "$LINENO" 5
+        fi
+
+        CPPFLAGS="-I${withval}/include $CPPFLAGS"
+        LDFLAGS="-L${withval}/lib $LDFLAGS"
+        if test "x$dcmtk_cv_rpath_works" = "xyes"; then
+          LDFLAGS="-Wl,-rpath,${withval}/lib $LDFLAGS"
+        fi
+       ;;
+esac
+
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include OpenSSL support" >&5
+$as_echo_n "checking whether to include OpenSSL support... " >&6; }
+
+OPENSSL_WORKS=""
+
+# Check whether --with-openssl was given.
+if test "${with_openssl+set}" = set; then :
+  withval=$with_openssl;  case "$withval" in
+  yes)
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <openssl/ssl.h>
+int
+main ()
+{
+
+#if OPENSSL_VERSION_NUMBER < 0x10001000L
+#error OpenSSL too old
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+    $as_echo "#define WITH_OPENSSL 1" >>confdefs.h
+
+    OPENSSL_WORKS="yes"
+    OPENSSLLIBS="-lssl -lcrypto $OPENSSLLIBS"
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - DCMTK requires OpenSSL version 1.0.1 or newer" >&5
+$as_echo "no - DCMTK requires OpenSSL version 1.0.1 or newer" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+    ;;
+  *)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+    ;;
+  esac
+else
+   SAVELIBS="$LIBS"
+  LIBS="$LIBS -lssl -lcrypto $OPENSSLLIBS"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <openssl/ssl.h>
+int
+main ()
+{
+(void) TLSv1_method()
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_link "$LINENO"; then :
+
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <openssl/ssl.h>
+int
+main ()
+{
+
+#if OPENSSL_VERSION_NUMBER < 0x10001000L
+#error OpenSSL too old
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+      $as_echo "#define WITH_OPENSSL 1" >>confdefs.h
+
+      OPENSSL_WORKS="yes"
+      OPENSSLLIBS="-lssl -lcrypto $OPENSSLLIBS"
+else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - DCMTK requires OpenSSL version 1.0.1 or newer" >&5
+$as_echo "no - DCMTK requires OpenSSL version 1.0.1 or newer" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+  LIBS="$SAVELIBS"
+fi
+
+
+if test "$OPENSSL_WORKS" = "yes"; then
+
+for ac_header in openssl/asn1.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/asn1.h" "ac_cv_header_openssl_asn1_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_asn1_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_ASN1_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in openssl/dh.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/dh.h" "ac_cv_header_openssl_dh_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_dh_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_DH_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in openssl/evp.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/evp.h" "ac_cv_header_openssl_evp_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_evp_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_EVP_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in openssl/ssl.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/ssl.h" "ac_cv_header_openssl_ssl_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ssl_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_SSL_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in openssl/ts.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/ts.h" "ac_cv_header_openssl_ts_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_ts_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_TS_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in openssl/x509.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/x509.h" "ac_cv_header_openssl_x509_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_x509_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_X509_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_header in openssl/provider.h
+do :
+  ac_fn_cxx_check_header_mongrel "$LINENO" "openssl/provider.h" "ac_cv_header_openssl_provider_h" "$ac_includes_default"
+if test "x$ac_cv_header_openssl_provider_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_OPENSSL_PROVIDER_H 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for DH_bits (in openssl/dh.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for DH_bits (in openssl/dh.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/dh.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo DH_bits | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct DH_bits(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_DH_BITS 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for EVP_PKEY_RSA_PSS (in openssl/evp.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for EVP_PKEY_RSA_PSS (in openssl/evp.h)... " >&6; }
+
+ac_includes=""
+for ac_header in openssl/evp.h
+do
+  ac_includes="$ac_includes
+#include<$ac_header>"
+done
+tmp_save_1=`echo EVP_PKEY_RSA_PSS | tr ' :' '__'`
+if eval \${ac_cv_compiles_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes
+int
+main ()
+{
+EVP_PKEY_RSA_PSS
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_compiles_$tmp_save_1=yes"
+else
+  eval "ac_cv_compiles_$tmp_save_1=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for EVP_PKEY_base_id (in openssl/evp.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for EVP_PKEY_base_id (in openssl/evp.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/evp.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo EVP_PKEY_base_id | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct EVP_PKEY_base_id(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for RAND_egd (in openssl/rand.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for RAND_egd (in openssl/rand.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/rand.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo RAND_egd | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct RAND_egd(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_RAND_EGD 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for SSL_CTX_get_cert_store (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_get_cert_store (in openssl/ssl.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo SSL_CTX_get_cert_store | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct SSL_CTX_get_cert_store(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for SSL_CTX_get_ciphers (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_get_ciphers (in openssl/ssl.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo SSL_CTX_get_ciphers | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct SSL_CTX_get_ciphers(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for SSL_CTX_get0_param (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_get0_param (in openssl/ssl.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo SSL_CTX_get0_param | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct SSL_CTX_get0_param(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for SSL_CTX_set0_tmp_dh_pkey (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_set0_tmp_dh_pkey (in openssl/ssl.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo SSL_CTX_set0_tmp_dh_pkey | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct SSL_CTX_set0_tmp_dh_pkey(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for SSL_CTX_set1_curves (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_set1_curves (in openssl/ssl.h)... " >&6; }
+
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_includes="$ac_includes
+#include<$ac_header>"
+done
+tmp_save_1=`echo SSL_CTX_set1_curves | tr ' :' '__'`
+if eval \${ac_cv_compiles_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes
+int
+main ()
+{
+SSL_CTX_set1_curves(0,0,0)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_compiles_$tmp_save_1=yes"
+else
+  eval "ac_cv_compiles_$tmp_save_1=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for SSL_CTX_set1_sigalgs (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_set1_sigalgs (in openssl/ssl.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo SSL_CTX_set1_sigalgs | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct SSL_CTX_set1_sigalgs(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for SSL_CTX_set_ecdh_auto (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_set_ecdh_auto (in openssl/ssl.h)... " >&6; }
+
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_includes="$ac_includes
+#include<$ac_header>"
+done
+tmp_save_1=`echo SSL_CTX_set_ecdh_auto | tr ' :' '__'`
+if eval \${ac_cv_compiles_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes
+int
+main ()
+{
+SSL_CTX_set_ecdh_auto(0,0)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_compiles_$tmp_save_1=yes"
+else
+  eval "ac_cv_compiles_$tmp_save_1=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for SSL_CTX_set_max_proto_version (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_set_max_proto_version (in openssl/ssl.h)... " >&6; }
+
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_includes="$ac_includes
+#include<$ac_header>"
+done
+tmp_save_1=`echo SSL_CTX_set_max_proto_version | tr ' :' '__'`
+if eval \${ac_cv_compiles_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes
+int
+main ()
+{
+SSL_CTX_set_max_proto_version(0,0)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_compiles_$tmp_save_1=yes"
+else
+  eval "ac_cv_compiles_$tmp_save_1=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for SSL_CTX_set_security_level (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for SSL_CTX_set_security_level (in openssl/ssl.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo SSL_CTX_set_security_level | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct SSL_CTX_set_security_level(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for SSL_ERROR_WANT_ASYNC (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for SSL_ERROR_WANT_ASYNC (in openssl/ssl.h)... " >&6; }
+
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_includes="$ac_includes
+#include<$ac_header>"
+done
+tmp_save_1=`echo SSL_ERROR_WANT_ASYNC | tr ' :' '__'`
+if eval \${ac_cv_compiles_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes
+int
+main ()
+{
+SSL_ERROR_WANT_ASYNC
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_compiles_$tmp_save_1=yes"
+else
+  eval "ac_cv_compiles_$tmp_save_1=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for SSL_ERROR_WANT_ASYNC_JOB (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for SSL_ERROR_WANT_ASYNC_JOB (in openssl/ssl.h)... " >&6; }
+
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_includes="$ac_includes
+#include<$ac_header>"
+done
+tmp_save_1=`echo SSL_ERROR_WANT_ASYNC_JOB | tr ' :' '__'`
+if eval \${ac_cv_compiles_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes
+int
+main ()
+{
+SSL_ERROR_WANT_ASYNC_JOB
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_compiles_$tmp_save_1=yes"
+else
+  eval "ac_cv_compiles_$tmp_save_1=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for SSL_ERROR_WANT_CLIENT_HELLO_CB (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for SSL_ERROR_WANT_CLIENT_HELLO_CB (in openssl/ssl.h)... " >&6; }
+
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_includes="$ac_includes
+#include<$ac_header>"
+done
+tmp_save_1=`echo SSL_ERROR_WANT_CLIENT_HELLO_CB | tr ' :' '__'`
+if eval \${ac_cv_compiles_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes
+int
+main ()
+{
+SSL_ERROR_WANT_CLIENT_HELLO_CB
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_compiles_$tmp_save_1=yes"
+else
+  eval "ac_cv_compiles_$tmp_save_1=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 (in openssl/ssl.h)... " >&6; }
+
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_includes="$ac_includes
+#include<$ac_header>"
+done
+tmp_save_1=`echo TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 | tr ' :' '__'`
+if eval \${ac_cv_compiles_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes
+int
+main ()
+{
+TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_compiles_$tmp_save_1=yes"
+else
+  eval "ac_cv_compiles_$tmp_save_1=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for TLS_method (in openssl/ssl.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for TLS_method (in openssl/ssl.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ssl.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo TLS_method | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct TLS_method(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TLS_METHOD 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for X509_STORE_get0_param (in openssl/x509.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for X509_STORE_get0_param (in openssl/x509.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/x509.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo X509_STORE_get0_param | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct X509_STORE_get0_param(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for X509_get_signature_nid (in openssl/x509.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for X509_get_signature_nid (in openssl/x509.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/x509.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo X509_get_signature_nid | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct X509_get_signature_nid(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for ASN1_STRING_get0_data (in openssl/asn1.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for ASN1_STRING_get0_data (in openssl/asn1.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/asn1.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo ASN1_STRING_get0_data | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct ASN1_STRING_get0_data(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for EVP_PKEY_get0_EC_KEY (in openssl/evp.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for EVP_PKEY_get0_EC_KEY (in openssl/evp.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/evp.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo EVP_PKEY_get0_EC_KEY | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct EVP_PKEY_get0_EC_KEY(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for EVP_PKEY_get_group_name (in openssl/evp.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for EVP_PKEY_get_group_name (in openssl/evp.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/evp.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo EVP_PKEY_get_group_name | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct EVP_PKEY_get_group_name(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for EVP_PKEY_id (in openssl/evp.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for EVP_PKEY_id (in openssl/evp.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/evp.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo EVP_PKEY_id | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct EVP_PKEY_id(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for OSSL_PROVIDER_load (in openssl/provider.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for OSSL_PROVIDER_load (in openssl/provider.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/provider.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo OSSL_PROVIDER_load | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct OSSL_PROVIDER_load(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for TS_STATUS_INFO_get0_failure_info (in openssl/ts.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for TS_STATUS_INFO_get0_failure_info (in openssl/ts.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ts.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo TS_STATUS_INFO_get0_failure_info | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct TS_STATUS_INFO_get0_failure_info(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for TS_STATUS_INFO_get0_status (in openssl/ts.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for TS_STATUS_INFO_get0_status (in openssl/ts.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ts.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo TS_STATUS_INFO_get0_status | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct TS_STATUS_INFO_get0_status(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for TS_STATUS_INFO_get0_text (in openssl/ts.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for TS_STATUS_INFO_get0_text (in openssl/ts.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ts.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo TS_STATUS_INFO_get0_text | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct TS_STATUS_INFO_get0_text(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for TS_VERIFY_CTS_set_certs (in openssl/ts.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for TS_VERIFY_CTS_set_certs (in openssl/ts.h)... " >&6; }
+
+ac_includes=""
+for ac_header in openssl/ts.h
+do
+  ac_includes="$ac_includes
+#include<$ac_header>"
+done
+tmp_save_1=`echo TS_VERIFY_CTS_set_certs | tr ' :' '__'`
+if eval \${ac_cv_compiles_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes
+int
+main ()
+{
+TS_VERIFY_CTS_set_certs(0,0)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_compiles_$tmp_save_1=yes"
+else
+  eval "ac_cv_compiles_$tmp_save_1=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_compiles_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for TS_VERIFY_CTX_set_data (in openssl/ts.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for TS_VERIFY_CTX_set_data (in openssl/ts.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ts.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo TS_VERIFY_CTX_set_data | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct TS_VERIFY_CTX_set_data(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for TS_VERIFY_CTX_set_flags (in openssl/ts.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for TS_VERIFY_CTX_set_flags (in openssl/ts.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ts.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo TS_VERIFY_CTX_set_flags | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct TS_VERIFY_CTX_set_flags(dummyStruct);
+
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
+else
+  eval "ac_cv_prototype_$tmp_save_1=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for TS_VERIFY_CTX_set_store (in openssl/ts.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for TS_VERIFY_CTX_set_store (in openssl/ts.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/ts.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo TS_VERIFY_CTX_set_store | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
   $as_echo_n "(cached) " >&6
 else
-  # Check whether --enable-rpath was given.
-if test "${enable_rpath+set}" = set; then :
-  enableval=$enable_rpath; dcmtk_cv_rpath_works=$enableval
-else
-  old_LDFLAGS="$LDFLAGS"
-                                 LDFLAGS="-Wl,-rpath,$srcdir $LDFLAGS"
-                                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct TS_VERIFY_CTX_set_store(dummyStruct);
+
 
 int
 main ()
@@ -14045,210 +15712,194 @@ main ()
   return 0;
 }
 _ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
-  dcmtk_cv_rpath_works=yes
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  eval "ac_cv_prototype_$tmp_save_1=no"
 else
-  dcmtk_cv_rpath_works=no
+  eval "ac_cv_prototype_$tmp_save_1=yes"
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-                                 LDFLAGS="$old_LDFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE 1" >>confdefs.h
 
-
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
 fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dcmtk_cv_rpath_works" >&5
-$as_echo "$dcmtk_cv_rpath_works" >&6; }
-
-
-
-# Check whether --with-opensslinc was given.
-if test "${with_opensslinc+set}" = set; then :
-  withval=$with_opensslinc; case $withval in #(
-  yes|no) :
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-opensslinc called without argument - will use default" >&5
-$as_echo "$as_me: WARNING: --with-opensslinc called without argument - will use default" >&2;}
-       ;; #(
-  *) :
-
-        if test ! -d ${withval}; then
-          as_fn_error $? "called with --with-opensslinc but OpenSSL base directory ${withval} does not exist or is not a directory." "$LINENO" 5
-        fi
-
-        CPPFLAGS="-I${withval}/include $CPPFLAGS"
-        LDFLAGS="-L${withval}/lib $LDFLAGS"
-        if test "x$dcmtk_cv_rpath_works" = "xyes"; then
-          LDFLAGS="-Wl,-rpath,${withval}/lib $LDFLAGS"
-        fi
-       ;;
-esac
 
-fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for X509_get0_notAfter (in openssl/x509.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for X509_get0_notAfter (in openssl/x509.h)... " >&6; }
 
+:
+ac_includes=""
+for ac_header in openssl/x509.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo X509_get0_notAfter | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
+}
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct X509_get0_notAfter(dummyStruct);
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include OpenSSL support" >&5
-$as_echo_n "checking whether to include OpenSSL support... " >&6; }
 
-# Check whether --with-openssl was given.
-if test "${with_openssl+set}" = set; then :
-  withval=$with_openssl;  case "$withval" in
-  yes)
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <openssl/ssl.h>
 int
 main ()
 {
 
-#if OPENSSL_VERSION_NUMBER < 0x10001000L
-#error OpenSSL too old
-#endif
-
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define WITH_OPENSSL /**/" >>confdefs.h
-
-    OPENSSLLIBS="-lssl -lcrypto $OPENSSLLIBS"
+  eval "ac_cv_prototype_$tmp_save_1=no"
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - DCMTK requires OpenSSL version 1.0.1 or newer" >&5
-$as_echo "no - DCMTK requires OpenSSL version 1.0.1 or newer" >&6; }
+  eval "ac_cv_prototype_$tmp_save_1=yes"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    ;;
-  *)
-    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER 1" >>confdefs.h
+
+  :
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-    ;;
-  esac
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides a prototype for X509_get0_notBefore (in openssl/x509.h)" >&5
+$as_echo_n "checking whether OpenSSL provides a prototype for X509_get0_notBefore (in openssl/x509.h)... " >&6; }
+
+:
+ac_includes=""
+for ac_header in openssl/x509.h
+do
+  ac_safe=`echo "$ac_header" | sed 'y%./+-%__p_%'`
+  if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'}'`\" = yes"; then
+    ac_includes="$ac_includes
+#include<$ac_header>"
+  fi
+done
+tmp_save_1=`echo X509_get0_notBefore | tr ' :' '__'`
+if eval \${ac_cv_prototype_$tmp_save_1+:} false; then :
+  $as_echo_n "(cached) " >&6
 else
-   SAVELIBS="$LIBS"
-  LIBS="$LIBS $OPENSSLLIBS -lssl -lcrypto"
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-#include <openssl/ssl.h>
-int
-main ()
-{
-(void) TLSv1_method()
-  ;
-  return 0;
+#ifdef __cplusplus
+extern "C" {
+#endif
+$ac_includes
+#ifdef __cplusplus
 }
-_ACEOF
-if ac_fn_cxx_try_link "$LINENO"; then :
+#endif
+typedef union { int member; } dummyStruct;
+#ifdef __cplusplus
+extern "C"
+#endif
+dummyStruct X509_get0_notBefore(dummyStruct);
+
 
-      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-#include <openssl/ssl.h>
 int
 main ()
 {
 
-#if OPENSSL_VERSION_NUMBER < 0x10001000L
-#error OpenSSL too old
-#endif
-
   ;
   return 0;
 }
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
-   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-$as_echo "#define WITH_OPENSSL /**/" >>confdefs.h
-
-      OPENSSLLIBS="-lssl -lcrypto $OPENSSLLIBS"
+  eval "ac_cv_prototype_$tmp_save_1=no"
 else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - DCMTK requires OpenSSL version 1.0.1 or newer" >&5
-$as_echo "no - DCMTK requires OpenSSL version 1.0.1 or newer" >&6; }
+  eval "ac_cv_prototype_$tmp_save_1=yes"
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+if eval "test \"`echo '$''{'ac_cv_prototype_$tmp_save_1'}'`\" = yes"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  $as_echo "#define HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE 1" >>confdefs.h
+
+  :
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
 fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-  LIBS="$SAVELIBS"
-fi
 
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL defines the new typedef of EVP_MD_CTX as struct evp_md_ctx_st" >&5
+$as_echo_n "checking whether OpenSSL defines the new typedef of EVP_MD_CTX as struct evp_md_ctx_st... " >&6; }
 
-        SAVELIBS=$LIBS
-    HAVE_SSL_CTX_GET0_PARAM=yes
-    LIBS="$LIBS $OPENSSLLIBS"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides the SSL_CTX_get0_param function" >&5
-$as_echo_n "checking whether OpenSSL provides the SSL_CTX_get0_param function... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-        #include <openssl/ssl.h>
+#include <openssl/evp.h>
 int
 main ()
 {
-&SSL_CTX_get0_param;
+struct evp_md_ctx_st *a; EVP_MD_CTX *b=a
   ;
   return 0;
 }
-
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-        $as_echo "#define HAVE_SSL_CTX_GET0_PARAM 1" >>confdefs.h
-
+    $as_echo "#define HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX 1" >>confdefs.h
 
 else
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    LIBS=$SAVELIBS
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL defines the first parameter of function X509_ALGOR_get0() const" >&5
+$as_echo_n "checking whether OpenSSL defines the first parameter of function X509_ALGOR_get0() const... " >&6; }
 
-        SAVELIBS=$LIBS
-    HAVE_RAND_EGD=yes
-    LIBS="$LIBS $OPENSSLLIBS"
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL provides the RAND_egd function" >&5
-$as_echo_n "checking whether OpenSSL provides the RAND_egd function... " >&6; }
-    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
-
-        #include <openssl/rand.h>
+#include <openssl/x509.h>
 int
 main ()
 {
-&RAND_egd;
+const ASN1_OBJECT *a; X509_ALGOR_get0(&a,0,0,0)
   ;
   return 0;
 }
-
 _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-        $as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
-
+    $as_echo "#define HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM 1" >>confdefs.h
 
 else
-
-        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
-
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-    LIBS=$SAVELIBS
+
+fi
 
 
 
@@ -14343,6 +15994,7 @@ fi
 
 
 
+
 # Check whether --with-zlibinc was given.
 if test "${with_zlibinc+set}" = set; then :
   withval=$with_zlibinc; case $withval in #(
@@ -14372,14 +16024,14 @@ ZLIBLIBS=""
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include zlib support" >&5
 $as_echo_n "checking whether to include zlib support... " >&6; }
 
+
 # Check whether --with-zlib was given.
 if test "${with_zlib+set}" = set; then :
   withval=$with_zlib;  case "$withval" in
   yes)
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_ZLIB /**/" >>confdefs.h
+    $as_echo "#define WITH_ZLIB 1" >>confdefs.h
 
     ZLIBLIBS="-lz"
     ;;
@@ -14405,8 +16057,7 @@ _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_ZLIB /**/" >>confdefs.h
+      $as_echo "#define WITH_ZLIB 1" >>confdefs.h
 
       ZLIBLIBS="-lz"
 else
@@ -14422,6 +16073,7 @@ fi
 
 
 
+
 # Check whether --with-libtiffinc was given.
 if test "${with_libtiffinc+set}" = set; then :
   withval=$with_libtiffinc; case $withval in #(
@@ -14451,14 +16103,14 @@ TIFFLIBS=""
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libtiff support" >&5
 $as_echo_n "checking whether to include libtiff support... " >&6; }
 
+
 # Check whether --with-libtiff was given.
 if test "${with_libtiff+set}" = set; then :
   withval=$with_libtiff;  case "$withval" in
   yes)
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_LIBTIFF /**/" >>confdefs.h
+    $as_echo "#define WITH_LIBTIFF 1" >>confdefs.h
 
     TIFFLIBS="-ltiff $JPEGLIBS $ZLIBLIBS"
     ;;
@@ -14484,8 +16136,7 @@ _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_LIBTIFF /**/" >>confdefs.h
+      $as_echo "#define WITH_LIBTIFF 1" >>confdefs.h
 
       TIFFLIBS="-ltiff $JPEGLIBS $ZLIBLIBS"
 
@@ -14545,6 +16196,7 @@ PNGLIBS=""
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libpng support" >&5
 $as_echo_n "checking whether to include libpng support... " >&6; }
 
+
 # Check whether --with-libpng was given.
 if test "${with_libpng+set}" = set; then :
   withval=$with_libpng;  case "$withval" in
@@ -14552,8 +16204,7 @@ if test "${with_libpng+set}" = set; then :
     if test "x$ZLIBLIBS" != x; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_LIBPNG /**/" >>confdefs.h
+        $as_echo "#define WITH_LIBPNG 1" >>confdefs.h
 
         PNGLIBS="-lpng"
     else
@@ -14589,8 +16240,7 @@ _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_LIBPNG /**/" >>confdefs.h
+          $as_echo "#define WITH_LIBPNG 1" >>confdefs.h
 
           PNGLIBS="-lpng"
 else
@@ -14612,6 +16262,7 @@ fi
 
 
 
+
 # Check whether --with-libxmlinc was given.
 if test "${with_libxmlinc+set}" = set; then :
   withval=$with_libxmlinc; case $withval in #(
@@ -14648,14 +16299,14 @@ XMLLIBS=""
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libxml support" >&5
 $as_echo_n "checking whether to include libxml support... " >&6; }
 
+
 # Check whether --with-libxml was given.
 if test "${with_libxml+set}" = set; then :
   withval=$with_libxml;  case "$withval" in
   yes)
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_LIBXML /**/" >>confdefs.h
+    $as_echo "#define WITH_LIBXML 1" >>confdefs.h
 
     XMLLIBS=$LIBXMLLIBS
     ;;
@@ -14681,8 +16332,7 @@ _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_LIBXML /**/" >>confdefs.h
+      $as_echo "#define WITH_LIBXML 1" >>confdefs.h
 
       XMLLIBS=$LIBXMLLIBS
 else
@@ -14727,14 +16377,14 @@ TCPWRAPPERLIBS=""
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libwrap support" >&5
 $as_echo_n "checking whether to include libwrap support... " >&6; }
 
+
 # Check whether --with-libwrap was given.
 if test "${with_libwrap+set}" = set; then :
   withval=$with_libwrap;  case "$withval" in
   yes)
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_TCPWRAPPER /**/" >>confdefs.h
+    $as_echo "#define WITH_TCPWRAPPER 1" >>confdefs.h
 
     TCPWRAPPERLIBS="-lwrap"
     ;;
@@ -14776,8 +16426,7 @@ _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_TCPWRAPPER /**/" >>confdefs.h
+      $as_echo "#define WITH_TCPWRAPPER 1" >>confdefs.h
 
     TCPWRAPPERLIBS="-lwrap"
 else
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include OpenJPEG support" >&5
 $as_echo_n "checking whether to include OpenJPEG support... " >&6; }
 
+
 # Check whether --with-libwrap was given.
 if test "${with_libwrap+set}" = set; then :
   withval=$with_libwrap;  case "$withval" in
   yes)
     { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_OPENJPEG /**/" >>confdefs.h
+    $as_echo "#define WITH_OPENJPEG 1" >>confdefs.h
 
     OPENJPEGLIBS="-lopenjp2 $OPENJPEGLIBS"
     ;;
@@ -14863,8 +16512,7 @@ _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_OPENJPEG /**/" >>confdefs.h
+      $as_echo "#define WITH_OPENJPEG 1" >>confdefs.h
 
     OPENJPEGLIBS="-lopenjp2 $OPENJPEGLIBS"
 else
@@ -14910,14 +16558,14 @@ SNDFILELIBS=""
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libsndfile support" >&5
 $as_echo_n "checking whether to include libsndfile support... " >&6; }
 
+
 # Check whether --with-libsndfile was given.
 if test "${with_libsndfile+set}" = set; then :
   withval=$with_libsndfile;  case "$withval" in
     yes)
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_SNDFILE /**/" >>confdefs.h
+      $as_echo "#define WITH_SNDFILE 1" >>confdefs.h
 
       SNDFILELIBS="-lsndfile"
       ;;
@@ -14943,8 +16591,7 @@ _ACEOF
 if ac_fn_cxx_try_link "$LINENO"; then :
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define WITH_SNDFILE /**/" >>confdefs.h
+        $as_echo "#define WITH_SNDFILE 1" >>confdefs.h
 
         SNDFILELIBS="-lsndfile"
 else
@@ -14985,12 +16632,12 @@ esac
 
 fi
 
-
 WITH_LIBICONV=no
 ICONVLIBS=""
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to include libiconv support" >&5
 $as_echo_n "checking whether to include libiconv support... " >&6; }
 
+
 # Check whether --with-libiconv was given.
 if test "${with_libiconv+set}" = set; then :
   withval=$with_libiconv;  case "$withval" in
@@ -15033,6 +16680,7 @@ $as_echo "$WITH_LIBICONV" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the second argument to iconv() is const" >&5
 $as_echo_n "checking whether the second argument to iconv() is const... " >&6; }
+
 SAVELIBS="$LIBS"
 LIBS="$LIBS $ICONVLIBS"
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -15049,8 +16697,7 @@ _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define LIBICONV_SECOND_ARGUMENT_CONST /**/" >>confdefs.h
+    $as_echo "#define LIBICONV_SECOND_ARGUMENT_CONST 1" >>confdefs.h
 
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -16129,7 +17776,6 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_enable_stl" >&5
 $as_echo "$ac_enable_stl" >&6; }
 
-
 ac_enable_stl_vector="auto"
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable STL vector support" >&5
 $as_echo_n "checking whether to enable STL vector support... " >&6; }
@@ -16163,7 +17809,7 @@ else
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
 
-$as_echo "#define HAVE_STL_VECTOR /**/" >>confdefs.h
+$as_echo "#define HAVE_STL_VECTOR 1" >>confdefs.h
 
 else
   ac_enable_stl_vector="unsupported -> no"
@@ -16209,7 +17855,7 @@ else
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
 
-$as_echo "#define HAVE_STL_ALGORITHM /**/" >>confdefs.h
+$as_echo "#define HAVE_STL_ALGORITHM 1" >>confdefs.h
 
 else
   ac_enable_stl_algorithm="unsupported -> no"
@@ -16255,7 +17901,7 @@ else
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
 
-$as_echo "#define HAVE_STL_LIMITS /**/" >>confdefs.h
+$as_echo "#define HAVE_STL_LIMITS 1" >>confdefs.h
 
 else
   ac_enable_stl_limits="unsupported -> no"
@@ -16301,7 +17947,7 @@ else
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
 
-$as_echo "#define HAVE_STL_LIST /**/" >>confdefs.h
+$as_echo "#define HAVE_STL_LIST 1" >>confdefs.h
 
 else
   ac_enable_stl_list="unsupported -> no"
@@ -16347,7 +17993,7 @@ else
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
 
-$as_echo "#define HAVE_STL_MAP /**/" >>confdefs.h
+$as_echo "#define HAVE_STL_MAP 1" >>confdefs.h
 
 else
   ac_enable_stl_map="unsupported -> no"
@@ -16393,7 +18039,7 @@ else
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
 
-$as_echo "#define HAVE_STL_MEMORY /**/" >>confdefs.h
+$as_echo "#define HAVE_STL_MEMORY 1" >>confdefs.h
 
 else
   ac_enable_stl_memory="unsupported -> no"
@@ -16439,7 +18085,7 @@ else
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
 
-$as_echo "#define HAVE_STL_STACK /**/" >>confdefs.h
+$as_echo "#define HAVE_STL_STACK 1" >>confdefs.h
 
 else
   ac_enable_stl_stack="unsupported -> no"
@@ -16485,7 +18131,7 @@ else
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
 
-$as_echo "#define HAVE_STL_STRING /**/" >>confdefs.h
+$as_echo "#define HAVE_STL_STRING 1" >>confdefs.h
 
 else
   ac_enable_stl_string="unsupported -> no"
@@ -16531,7 +18177,7 @@ else
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
 
-$as_echo "#define HAVE_STL_TYPE_TRAITS /**/" >>confdefs.h
+$as_echo "#define HAVE_STL_TYPE_TRAITS 1" >>confdefs.h
 
 else
   ac_enable_stl_type_traits="unsupported -> no"
@@ -16577,7 +18223,7 @@ else
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
 
-$as_echo "#define HAVE_STL_TUPLE /**/" >>confdefs.h
+$as_echo "#define HAVE_STL_TUPLE 1" >>confdefs.h
 
 else
   ac_enable_stl_tuple="unsupported -> no"
@@ -16623,7 +18269,7 @@ else
 _ACEOF
 if ac_fn_cxx_try_run "$LINENO"; then :
 
-$as_echo "#define HAVE_STL_SYSTEM_ERROR /**/" >>confdefs.h
+$as_echo "#define HAVE_STL_SYSTEM_ERROR 1" >>confdefs.h
 
 else
   ac_enable_stl_system_error="unsupported -> no"
@@ -16840,6 +18486,7 @@ $as_echo "no" >&6; }
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct pwd contains the field pw_gecos" >&5
 $as_echo_n "checking whether struct pwd contains the field pw_gecos... " >&6; }
+
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <pwd.h>
@@ -16854,8 +18501,7 @@ _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_PASSWD_GECOS /**/" >>confdefs.h
+    $as_echo "#define HAVE_PASSWD_GECOS 1" >>confdefs.h
 
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -16866,6 +18512,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SYS_gettid in sys/syscall.h" >&5
 $as_echo_n "checking for SYS_gettid in sys/syscall.h... " >&6; }
+
 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <sys/syscall.h>
@@ -16880,8 +18527,7 @@ _ACEOF
 if ac_fn_cxx_try_compile "$LINENO"; then :
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
-
-$as_echo "#define HAVE_SYS_GETTID /**/" >>confdefs.h
+    $as_echo "#define HAVE_SYS_GETTID 1" >>confdefs.h
 
 else
   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -17597,7 +19243,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by dcmtk $as_me 3.6.6, which was
+This file was extended by dcmtk $as_me 3.6.7, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -17660,7 +19306,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-dcmtk config.status 3.6.6
+dcmtk config.status 3.6.7
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
index dfd2321756a63839f3128652a34145f65eab9b2e..5255dcc473553a2034280c851c81a8818adf51f7 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(dcmtk, 3.6.6, [bugs@dcmtk.org], [dcmtk-3.6.6], [http://www.dcmtk.org/])
+AC_INIT(dcmtk, 3.6.7, [bugs@dcmtk.org], [dcmtk-3.6.7], [http://www.dcmtk.org/])
 AC_PREREQ(2.60)
 AC_CONFIG_SRCDIR(Makefile.in)
 AC_CONFIG_HEADERS(include/dcmtk/config/osconfig.h)
@@ -10,9 +10,9 @@ dnl -------------------------------------------------------
 dnl Additional Package Information
 dnl -------------------------------------------------------
 
-PACKAGE_VERSION_NUMBER=366
+PACKAGE_VERSION_NUMBER=367
 PACKAGE_VERSION_SUFFIX=""
-PACKAGE_DATE="2021-01-14"
+PACKAGE_DATE="2022-04-22"
 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_NUMBER,${PACKAGE_VERSION_NUMBER},[Define to the version number of this package.])
 AC_DEFINE_UNQUOTED(PACKAGE_VERSION_SUFFIX,"${PACKAGE_VERSION_SUFFIX}",[Define to the version suffix of this package.])
 AC_DEFINE_UNQUOTED(PACKAGE_DATE,"${PACKAGE_DATE}",[Define to the release date of this package.])
@@ -23,7 +23,7 @@ AC_SUBST(PACKAGE_DATE)
 
 dnl -------------------------------------------------------
 dnl Identify the host platform we're compiling for,
-dnl using config.guess and config.sub.
+dnl using config.guess and config.sub
 dnl -------------------------------------------------------
 
 AC_CANONICAL_HOST
@@ -83,7 +83,7 @@ AH_TOP([#ifndef OSCONFIG_H
 #define OSCONFIG_H
 
 /*
-** Define enclosures for include files with C linkage (mostly system headers)
+** Define enclosures for include files with C linkage (mostly system headers).
 */
 #ifdef __cplusplus
 #define BEGIN_EXTERN_C extern "C" {
@@ -196,19 +196,19 @@ AC_AIX
 AC_ISC_POSIX
 AC_SYS_LONG_FILE_NAMES
 
-dnl -------------------------------------------------------
+dnl ----------------------------------------------------------
 dnl Perform some tests with the C compiler, needed for dcmjpeg
-dnl -------------------------------------------------------
+dnl ----------------------------------------------------------
 
 AC_MY_C_INLINE
 AC_MY_C_CONST
 AC_MY_C_CHAR_UNSIGNED
 AC_MY_C_RIGHTSHIFT_UNSIGNED
 
-dnl -------------------------------------------------------
+dnl --------------------------------------------------------
 dnl Check some typedefs versus definitions in <sys/types.h>,
 dnl needed for JasPer support
-dnl -------------------------------------------------------
+dnl --------------------------------------------------------
 
 AC_TYPEDEF(uchar, unsigned char)
 AC_TYPEDEF(ushort, unsigned short)
@@ -237,7 +237,7 @@ AC_CHECK_TYPES(char16_t)
 AC_CHECK_TYPES([sigjmp_buf], [], [], [[#include <setjmp.h>]])
 
 dnl -------------------------------------------------------
-dnl Checks for libc library functions.
+dnl Check for libc library functions
 dnl -------------------------------------------------------
 
 AC_FUNC_MEMCMP
@@ -250,7 +250,7 @@ AC_CHECK_FUNCS(memcpy memset memmove memcmp bcopy bcmp)
 AC_CHECK_FUNCS(getpid mktemp tempnam tmpnam getenv mkstemp)
 AC_CHECK_FUNCS(stat)
 AC_CHECK_FUNCS(malloc_debug)
-AC_CHECK_FUNCS(strerror strdup bzero index rindex access)
+AC_CHECK_FUNCS(strerror strdup index rindex access)
 AC_CHECK_FUNCS(uname cuserid getlogin getlogin_r)
 AC_CHECK_FUNCS(usleep)
 AC_CHECK_FUNCS(flock lockf)
@@ -273,12 +273,12 @@ AC_FUNC_FSEEKO
 
 
 dnl -------------------------------------------------------
-dnl Checks for libcs library functions needed by oflog
+dnl Check for libcs library functions needed by oflog
 dnl -------------------------------------------------------
 
 AC_DEFUN([TYPE_SOCKLEN_T],
 [
-AH_TEMPLATE([socklen_t], [Define to int if undefined.])
+AH_TEMPLATE(socklen_t, [Define to int if undefined.])
 AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
 [
   AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
@@ -295,13 +295,13 @@ AC_CHECK_HEADERS(netinet/in.h)
 AC_CHECK_HEADERS(syslog.h)
 TYPE_SOCKLEN_T
 
-AH_TEMPLATE([HAVE_ENAMETOOLONG])
+AH_TEMPLATE(HAVE_ENAMETOOLONG, [Define if your system provides ENAMETOOLONG errno value.])
 AC_COMPILE_IFELSE(
   [AC_LANG_PROGRAM([#include <errno.h>], [int value = ENAMETOOLONG;])],
-  [AC_DEFINE([HAVE_ENAMETOOLONG], , [Define if your system provides ENAMETOOLONG errno value.])])
+  [AC_DEFINE(HAVE_ENAMETOOLONG)])
 
 dnl -------------------------------------------------------
-dnl Checks for libm library functions.
+dnl Check for libm library functions
 dnl -------------------------------------------------------
 
 SAVELIBS="$LIBS"
@@ -416,7 +416,7 @@ AC_ARG_ENABLE(lfs,
 )
 
 dnl -------------------------------------------------------
-dnl Checks for libraries.
+dnl Check for libraries
 dnl -------------------------------------------------------
 
 AC_CHECK_GXXLIB
@@ -472,7 +472,7 @@ LIBS="$LIBS -lnetapi32"
 ])
 
 dnl -------------------------------------------------------
-dnl Checks for header files.
+dnl Check for header files
 dnl -------------------------------------------------------
 
 AC_HEADER_STDC
@@ -564,10 +564,10 @@ if test $ac_cv_header_libc_h = yes ; then
   fi
 fi
 
-dnl -------------------------------------------------------
+dnl --------------------------------------------------------
 dnl Tests for pointer vs. integer types
 dnl These tests REQUIRE as a prerequisite AC_CXX_STATIC_CAST
-dnl -------------------------------------------------------
+dnl --------------------------------------------------------
 
 if test $ac_cv_header_pthread_h = yes ; then
   AC_CHECK_POINTER_TYPE(pthread_t, pthread.h)
@@ -636,7 +636,7 @@ if test $THREADSUPPORT = posix ; then
   dnl
   POSIXRWLOCKSAVAILABLE="no"
   AC_CHECK_LIB(pthread, pthread_rwlock_init, [
-    AC_DEFINE(HAVE_PTHREAD_RWLOCK, , [Define if your system supports POSIX read/write locks.])
+    AC_DEFINE(HAVE_PTHREAD_RWLOCK, 1, [Define if your system supports POSIX read/write locks.])
     dnl
     dnl we're going to use POSIX threads with read/write locks.
     dnl Linux 2.2.x only declares all prototypes if _XOPEN_SOURCE=500 and _BSD_SOURCE
@@ -685,7 +685,7 @@ if test $THREADSUPPORT = posix ; then
     AC_TRY_LINK([extern "C" int pthread_rwlock_init(void *rwlock, void *attr);
       ] , [(void) pthread_rwlock_init(NULL, NULL);], [
     AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_PTHREAD_RWLOCK, , [Define if your system supports POSIX read/write locks.])
+    AC_DEFINE(HAVE_PTHREAD_RWLOCK, 1, [Define if your system supports POSIX read/write locks.])
     dnl
     dnl we're going to use POSIX threads with read/write locks.
     dnl Linux 2.2.x only declares all prototypes if _XOPEN_SOURCE=500 and _BSD_SOURCE
@@ -735,7 +735,7 @@ case "$THREADSUPPORT" in
     AC_MSG_RESULT([yes, solaris threads])
     CXXFLAGS="-D_REENTRANT $CXXFLAGS"
     CFLAGS="-D_REENTRANT $CFLAGS"
-    AC_DEFINE(WITH_THREADS, , [Define if we are compiling with any type of multi-thread support.])
+    AC_DEFINE(WITH_THREADS, 1, [Define if we are compiling with any type of multi-thread support.])
     ;;
   posix)
     if test $POSIXRWLOCKSAVAILABLE = yes ; then
@@ -745,7 +745,7 @@ case "$THREADSUPPORT" in
     fi
     CXXFLAGS="-D_REENTRANT $CXXFLAGS"
     CFLAGS="-D_REENTRANT $CFLAGS"
-    AC_DEFINE(WITH_THREADS, , [Define if we are compiling with any type of multi-thread support.])
+    AC_DEFINE(WITH_THREADS, 1, [Define if we are compiling with any type of multi-thread support.])
     ;;
   *)
     AC_MSG_RESULT(none)
@@ -767,9 +767,9 @@ if test $LFSSUPPORT = auto -o $LFSSUPPORT = lfs; then
   MY_AC_SYS_LARGEFILE
 fi
 
-dnl -------------------------------------------------------
-dnl Checks for typedefs, structures, and compiler characteristics.
-dnl -------------------------------------------------------
+dnl ------------------------------------------------------------
+dnl Check for typedefs, structures, and compiler characteristics
+dnl ------------------------------------------------------------
 
 AC_TYPEDEF(size_t, unsigned)
 AC_TYPEDEF(ssize_t, long)
@@ -788,7 +788,7 @@ AC_MY_SYMBOL_EXISTS([__PRETTY_FUNCTION__])
 AC_MY_SYMBOL_EXISTS([__func__])
 
 dnl -------------------------------------------------------
-dnl Checks for prototypes
+dnl Check for prototypes
 dnl -------------------------------------------------------
 dnl
 dnl The following AC_CHECK_* macros _must_ have corresponding entries in
@@ -802,7 +802,6 @@ if test $ac_cv_prototype_accept = yes ; then
 AC_CHECK_INTP_ACCEPT(sys/types.h sys/socket.h)
 fi
 AC_CHECK_PROTOTYPE(bind, sys/types.h sys/socket.h)
-AC_CHECK_PROTOTYPE(bzero, string.h strings.h libc.h unistd.h stdlib.h)
 AC_CHECK_PROTOTYPE(connect, sys/types.h sys/socket.h)
 AC_CHECK_PROTOTYPE(finite, math.h)
 AC_CHECK_PROTOTYPE(isinf, math.h)
@@ -851,67 +850,25 @@ fi
 
 
 dnl -------------------------------------------------------
-dnl Checks for the usage of standard C++ headers.
+dnl Check for the usage of standard C++ headers
 dnl -------------------------------------------------------
 
-AC_MSG_CHECKING(whether to use C++ standard includes)
-ac_use_std_includes="auto"
-AC_ARG_ENABLE(std-includes,
-[  --enable-std-includes   use C++ ANSI standard includes (default: auto)
-  --disable-std-includes  use old C++ includes ],
-[ case "$enableval" in
-  yes)
-   ac_use_std_includes="yes"
-   ;;
-
-  *)
-    ac_use_std_includes="no"
-    ;;
-  esac ]
-)
-
-if test "$ac_cv_header_fstream" = "yes" -a "$ac_cv_header_iostream" = "yes" -a "$ac_cv_header_iomanip" = "yes"; then
-   ac_have_std_includes="yes"
-else
-   ac_have_std_includes="no"
-fi
+AC_CHECK_STD_NAMESPACE
+AC_CHECK_DECLARATION(std::ios_base::openmode, , iostream)
+AC_CHECK_IOS_NOCREATE(std::ios, fstream)
+AC_CHECK_COMPILES(std::vfprintf, cstdarg cstdio,
+  [FILE *stream; va_list ap; std::vfprintf(stream, "", ap);])
+AC_CHECK_COMPILES(std::vsnprintf, cstdarg cstdio,
+  [char buf[256]; va_list ap; std::vsnprintf(buf, 0, "", ap);])
 
-if test "$ac_cv_header_fstream_h" = "yes" -a "$ac_cv_header_iostream_h" = "yes" -a "$ac_cv_header_iomanip_h" = "yes"; then
-   ac_have_old_includes="yes"
-else
-   ac_have_old_includes="no"
-fi
 
-if test "$ac_use_std_includes" = "yes"; then
-   AC_MSG_RESULT(yes)
-   AC_DEFINE(USE_STD_CXX_INCLUDES, , [Define if ANSI standard C++ includes are used.])
-elif test "$ac_use_std_includes" = "no"; then
-   AC_MSG_RESULT(no)
-elif test "$ac_have_std_includes" = "yes"; then
-   AC_MSG_RESULT(yes)
-   AC_DEFINE(USE_STD_CXX_INCLUDES, , [Define if ANSI standard C++ includes are used.])
-   ac_use_std_includes="yes"
-else
-   AC_MSG_RESULT(no)
-   ac_use_std_includes="no"
-fi
-
-if test "$ac_use_std_includes" = "yes"; then
-   AC_CHECK_STD_NAMESPACE
-   AC_CHECK_DECLARATION(std::ios_base::openmode, , iostream)
-   AC_CHECK_IOS_NOCREATE(std::ios, fstream)
-   AC_CHECK_COMPILES(std::vfprintf, cstdarg cstdio,
-     [FILE *stream; va_list ap; std::vfprintf(stream, "", ap);])
-   AC_CHECK_COMPILES(std::vsnprintf, cstdarg cstdio,
-     [char buf[256]; va_list ap; std::vsnprintf(buf, 0, "", ap);])
-else
-   AC_CHECK_DECLARATION(std::ios_base::openmode, , iostream.h)
-   AC_CHECK_IOS_NOCREATE(ios, fstream.h)
-   AC_CHECK_COMPILES(std::vfprintf, stdarg.h stdio.h,
-     [FILE *stream; va_list ap; std::vfprintf(stream, "", ap);])
-   AC_CHECK_COMPILES(std::vsnprintf, stdarg.h stdio.h,
-     [char buf[256]; va_list ap; std::vsnprintf(buf, 0, "", ap);])
-fi
+AC_CHECK_STD_NAMESPACE
+AC_CHECK_DECLARATION(std::ios_base::openmode, , iostream)
+AC_CHECK_IOS_NOCREATE(std::ios, fstream)
+AC_CHECK_COMPILES(std::vfprintf, cstdarg cstdio,
+  [FILE *stream; va_list ap; std::vfprintf(stream, "", ap);])
+AC_CHECK_COMPILES(std::vsnprintf, cstdarg cstdio,
+  [char buf[256]; va_list ap; std::vsnprintf(buf, 0, "", ap);])
 
 AC_CHECK_CLASS_TEMPLATE
 AC_CHECK_STATIC_TEMPLATE_METHOD
@@ -921,62 +878,83 @@ AC_CHECK_CXX_VOLATILE
 AC_CXX_TYPENAME
 AC_STDIO_NAMESPACE
 
+
 dnl -------------------------------------------------------
-dnl Check for Private Tag support
+dnl Check whether to load a default dictionary
 dnl -------------------------------------------------------
 
-AC_MSG_CHECKING(whether to enable private tag dictionary)
-AC_ARG_ENABLE(private-tags,
-[  --enable-private-tags   enable private tag dictionary
-  --disable-private-tags  don't enable private tag dictionary (default)],
+AC_MSG_CHECKING(whether to enable default dictionary)
+AC_ARG_ENABLE(default-dict,
+[  --enable-default-dict=TYPE
+                          enable default dictionary and specify type
+                          (external=default/builtin)
+  --disable-default-dict  disable default dictionary],
 [ case "$enableval" in
-  yes)
-    AC_MSG_RESULT(yes)
-    AC_DEFINE(ENABLE_PRIVATE_TAGS, , [Define if we are compiling for enabling external private tag dictionary.])
-    AC_DEFINE_UNQUOTED(DCM_DICT_DEFAULT_PATH, "${DATA_DIR}/dicom.dic:${DATA_DIR}/private.dic", [Define the default data dictionary path for the dcmdata library package.])
+  external|yes)
+    AC_MSG_RESULT([yes, type=external])
+    AC_DEFINE(DCM_DICT_DEFAULT, 2, [Define the type of default dictionary that we want to use: \
+       Do not load any default dictionary on startup (0), \
+       load builtin dictionary on startup (1), or \
+       load external (i.e. file-based) dictionary on startup (2).])
     ;;
-  *)
+  builtin)
+    AC_MSG_RESULT([yes, type=builtin])
+    AC_DEFINE(DCM_DICT_DEFAULT, 1, [Define the type of default dictionary that we want to use: \
+       Do not load any default dictionary on startup (0), \
+       load builtin dictionary on startup (1), or \
+       load external (i.e. file-based) dictionary on startup (2).])
+    ;;
+  no)
     AC_MSG_RESULT(no)
+    AC_DEFINE(DCM_DICT_DEFAULT, 0, [Define the type of default dictionary that we want to use: \
+       Do not load any default dictionary on startup (0), \
+       load builtin dictionary on startup (1), or \
+       load external (i.e. file-based) dictionary on startup (2).])
     ;;
   esac ],
-  AC_MSG_RESULT(no)
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(DCM_DICT_DEFAULT, 2, [Define the type of default dictionary that we want to use: \
+       Do not load any default dictionary on startup (0), \
+       load builtin dictionary on startup (1), or \
+       load external (i.e. file-based) dictionary on startup (2).])
 )
 
-dnl -------------------------------------------------------
-dnl Check for External Dictionary support
-dnl -------------------------------------------------------
 
-AC_MSG_CHECKING(whether to enable loading external dictionary from default path)
-AC_ARG_ENABLE(external-dict,
-[  --enable-external-dict  enable loading of external dictionary (default)
-  --disable-external-dict don't load external dictionary],
+dnl ----------------------------------------------------------
+dnl Check whether to evaluate DCMDICTPATH environment variable
+dnl ----------------------------------------------------------
+
+AC_MSG_CHECKING(whether to evaluate DCMDICTPATH environment variable)
+AC_ARG_ENABLE(dcmdictpath,
+[  --enable-dcmdictpath    enable DCMDICTPATH environment variable (default)
+  --disable-dcmdictpath   disable DCMDICTPATH environment variable],
 [ case "$enableval" in
   yes)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(ENABLE_EXTERNAL_DICTIONARY, , [Define if we are compiling for loading external dictionary from default path.])
+    AC_DEFINE(DCM_DICT_USE_DCMDICTPATH, 1, [Define whether dictionaries defined through DCMDICTPATH environment variable should be loaded.])
     ;;
   *)
     AC_MSG_RESULT(no)
-    dnl Reset default path so the dictionary is not loaded automatically on startup
-    AC_DEFINE_UNQUOTED(DCM_DICT_DEFAULT_PATH, "", [Define the default data dictionary path for the dcmdata library package.])
     ;;
   esac ],
   AC_MSG_RESULT(yes)
-  AC_DEFINE(ENABLE_EXTERNAL_DICTIONARY, , [Define if we are compiling for loading external dictionary from default path.])
+  AC_DEFINE(DCM_DICT_USE_DCMDICTPATH, 1, [Define whether dictionaries defined through DCMDICTPATH environment variable should be loaded.])
 )
 
+
 dnl -------------------------------------------------------
-dnl Check for Built-in (compiled-in) Dictionary support
+dnl Check for Private Tag support
 dnl -------------------------------------------------------
 
-AC_MSG_CHECKING(whether to enable built-in dictionary loading)
-AC_ARG_ENABLE(builtin-dict,
-[  --enable-builtin-dict   enable loading of built-in dictionary
-  --disable-builtin-dict  don't load built-in dictionary (default)],
+AC_MSG_CHECKING(whether to enable private tag dictionary)
+AC_ARG_ENABLE(private-tags,
+[  --enable-private-tags   enable private tag dictionary
+  --disable-private-tags  don't enable private tag dictionary (default)],
 [ case "$enableval" in
   yes)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(ENABLE_BUILTIN_DICTIONARY, , [Define if we are compiling with built-in (compiled-in) dictionary enabled.])
+    AC_DEFINE(ENABLE_PRIVATE_TAGS, 1, [Define if we are compiling for enabling external private tag dictionary.])
+    AC_DEFINE_UNQUOTED(DCM_DICT_DEFAULT_PATH, "${DATA_DIR}/dicom.dic:${DATA_DIR}/private.dic", [Define the default data dictionary path for the dcmdata library package.])
     ;;
   *)
     AC_MSG_RESULT(no)
@@ -985,6 +963,7 @@ AC_ARG_ENABLE(builtin-dict,
   AC_MSG_RESULT(no)
 )
 
+
 dnl -------------------------------------------------------
 dnl Check for OpenSSL support
 dnl -------------------------------------------------------
@@ -992,6 +971,8 @@ dnl -------------------------------------------------------
 AC_MY_LIB_PATH([openssl], [OpenSSL])
 
 AC_MSG_CHECKING([whether to include OpenSSL support])
+AH_TEMPLATE(WITH_OPENSSL, [Define if we are compiling with OpenSSL support.])
+OPENSSL_WORKS=""
 AC_ARG_WITH(openssl,
 [AS_HELP_STRING([--with-openssl], [include OpenSSL support (default: auto)])
 AS_HELP_STRING([--without-openssl], [don't include OpenSSL support])],
@@ -1003,16 +984,17 @@ AS_HELP_STRING([--without-openssl], [don't include OpenSSL support])],
 #endif
 ],
    [ AC_MSG_RESULT(yes)
-    AC_DEFINE(WITH_OPENSSL, , [Define if we are compiling with OpenSSL support.])
+    AC_DEFINE(WITH_OPENSSL)
+    OPENSSL_WORKS="yes"
     OPENSSLLIBS="-lssl -lcrypto $OPENSSLLIBS" ],
-    [AC_MSG_RESULT(no - DCMTK requires OpenSSL version 1.0.1 or newer)] )
+   AC_MSG_RESULT(no - DCMTK requires OpenSSL version 1.0.1 or newer)] )
     ;;
   *)
     AC_MSG_RESULT(no)
     ;;
   esac ],
 [ SAVELIBS="$LIBS"
-  LIBS="$LIBS $OPENSSLLIBS -lssl -lcrypto"
+  LIBS="$LIBS -lssl -lcrypto $OPENSSLLIBS"
   AC_TRY_LINK([#include <openssl/ssl.h>], [(void) TLSv1_method()],
     [
       AC_TRY_COMPILE([#include <openssl/ssl.h>], [
@@ -1021,18 +1003,85 @@ AS_HELP_STRING([--without-openssl], [don't include OpenSSL support])],
 #endif
 ],
       [ AC_MSG_RESULT(yes)
-      AC_DEFINE(WITH_OPENSSL, , [Define if we are compiling with OpenSSL support.])
+      AC_DEFINE(WITH_OPENSSL)
+      OPENSSL_WORKS="yes"
       OPENSSLLIBS="-lssl -lcrypto $OPENSSLLIBS" ],
-     [AC_MSG_RESULT(no - DCMTK requires OpenSSL version 1.0.1 or newer)] )],
+      [ AC_MSG_RESULT(no - DCMTK requires OpenSSL version 1.0.1 or newer)] )],
     [AC_MSG_RESULT(no)])
   LIBS="$SAVELIBS"] )
 
-AC_CHECK_SSL_CTX_GET0_PARAM
-AC_CHECK_RAND_EGD
+if test "$OPENSSL_WORKS" = "yes"; then
+
+AC_CHECK_HEADERS(openssl/asn1.h)
+AC_CHECK_HEADERS(openssl/dh.h)
+AC_CHECK_HEADERS(openssl/evp.h)
+AC_CHECK_HEADERS(openssl/ssl.h)
+AC_CHECK_HEADERS(openssl/ts.h)
+AC_CHECK_HEADERS(openssl/x509.h)
+AC_CHECK_HEADERS(openssl/provider.h)
+
+dnl test presence of functions, constants and macros needed for the dcmtls module
+AC_CHECK_EXT_LIB_PROTOTYPE(DH_bits, OpenSSL, openssl/dh.h)
+AC_CHECK_EXT_LIB_COMPILES(EVP_PKEY_RSA_PSS, OpenSSL, openssl/evp.h, [EVP_PKEY_RSA_PSS])
+AC_CHECK_EXT_LIB_PROTOTYPE(EVP_PKEY_base_id, OpenSSL, openssl/evp.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(RAND_egd, OpenSSL, openssl/rand.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(SSL_CTX_get_cert_store, OpenSSL, openssl/ssl.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(SSL_CTX_get_ciphers, OpenSSL, openssl/ssl.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(SSL_CTX_get0_param, OpenSSL, openssl/ssl.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(SSL_CTX_set0_tmp_dh_pkey, OpenSSL, openssl/ssl.h)
+AC_CHECK_EXT_LIB_COMPILES(SSL_CTX_set1_curves, OpenSSL, openssl/ssl.h, [SSL_CTX_set1_curves(0,0,0)])
+AC_CHECK_EXT_LIB_PROTOTYPE(SSL_CTX_set1_sigalgs, OpenSSL, openssl/ssl.h)
+AC_CHECK_EXT_LIB_COMPILES(SSL_CTX_set_ecdh_auto, OpenSSL, openssl/ssl.h, [SSL_CTX_set_ecdh_auto(0,0)])
+AC_CHECK_EXT_LIB_COMPILES(SSL_CTX_set_max_proto_version, OpenSSL, openssl/ssl.h, [SSL_CTX_set_max_proto_version(0,0)])
+AC_CHECK_EXT_LIB_PROTOTYPE(SSL_CTX_set_security_level, OpenSSL, openssl/ssl.h)
+AC_CHECK_EXT_LIB_COMPILES(SSL_ERROR_WANT_ASYNC, OpenSSL, openssl/ssl.h, [SSL_ERROR_WANT_ASYNC])
+AC_CHECK_EXT_LIB_COMPILES(SSL_ERROR_WANT_ASYNC_JOB, OpenSSL, openssl/ssl.h, [SSL_ERROR_WANT_ASYNC_JOB])
+AC_CHECK_EXT_LIB_COMPILES(SSL_ERROR_WANT_CLIENT_HELLO_CB, OpenSSL, openssl/ssl.h, [SSL_ERROR_WANT_CLIENT_HELLO_CB])
+AC_CHECK_EXT_LIB_COMPILES(TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305, OpenSSL, openssl/ssl.h, [TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305])
+AC_CHECK_EXT_LIB_PROTOTYPE(TLS_method, OpenSSL, openssl/ssl.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(X509_STORE_get0_param, OpenSSL, openssl/x509.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(X509_get_signature_nid, OpenSSL, openssl/x509.h)
+
+dnl test presence of functions, constants and macros needed for the dcmsign module
+AC_CHECK_EXT_LIB_PROTOTYPE(ASN1_STRING_get0_data, OpenSSL, openssl/asn1.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(EVP_PKEY_get0_EC_KEY, OpenSSL, openssl/evp.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(EVP_PKEY_get_group_name, OpenSSL, openssl/evp.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(EVP_PKEY_id, OpenSSL, openssl/evp.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(OSSL_PROVIDER_load, OpenSSL, openssl/provider.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(TS_STATUS_INFO_get0_failure_info, OpenSSL, openssl/ts.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(TS_STATUS_INFO_get0_status, OpenSSL, openssl/ts.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(TS_STATUS_INFO_get0_text, OpenSSL, openssl/ts.h)
+AC_CHECK_EXT_LIB_COMPILES(TS_VERIFY_CTS_set_certs, OpenSSL, openssl/ts.h, [TS_VERIFY_CTS_set_certs(0,0)])
+AC_CHECK_EXT_LIB_PROTOTYPE(TS_VERIFY_CTX_set_data, OpenSSL, openssl/ts.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(TS_VERIFY_CTX_set_flags, OpenSSL, openssl/ts.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(TS_VERIFY_CTX_set_store, OpenSSL, openssl/ts.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(X509_get0_notAfter, OpenSSL, openssl/x509.h)
+AC_CHECK_EXT_LIB_PROTOTYPE(X509_get0_notBefore, OpenSSL, openssl/x509.h)
+
+dnl check if type EVP_MD_CTX is defined as typedef for "struct evp_md_ctx_st" (new) or "struct env_md_ctx_st" (old)
+AC_MSG_CHECKING(whether OpenSSL defines the new typedef of EVP_MD_CTX as struct evp_md_ctx_st)
+AH_TEMPLATE(HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX, [Define if OpenSSL provides the new typedef EVP_MD_CTX defined as struct evp_md_ctx_st.])
+ AC_TRY_COMPILE([#include <openssl/evp.h>],
+  [struct evp_md_ctx_st *a; EVP_MD_CTX *b=a],
+  [ AC_MSG_RESULT(yes)
+    AC_DEFINE(HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX) ],
+  [AC_MSG_RESULT(no)])
 
-dnl -------------------------------------------------------
+dnl check if the first parameter passed to X509_ALGOR_get0() should be "const ASN1_OBJECT **" (new) or "ASN1_OBJECT **" (old)
+AC_MSG_CHECKING(whether OpenSSL defines the first parameter of function X509_ALGOR_get0() const)
+AH_TEMPLATE(HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM, [Define if OpenSSL provides the X509_ALGOR_get0() function that expects a const pointer as first parameter.])
+AC_TRY_COMPILE([#include <openssl/x509.h>],
+  [const ASN1_OBJECT *a; X509_ALGOR_get0(&a,0,0,0)],
+  [ AC_MSG_RESULT(yes)
+    AC_DEFINE(HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM) ],
+  [AC_MSG_RESULT(no)])
+
+fi
+
+
+dnl ---------------------------------------------------------------
 dnl Check for libjpeg, which is needed by libtiff on some platforms
-dnl -------------------------------------------------------
+dnl ---------------------------------------------------------------
 
 JPEGLIBS=""
 AC_CHECK_LIB(jpeg, jpeg_set_defaults,[
@@ -1044,6 +1093,7 @@ JPEGLIBS="-ljpeg"
 ])
 fi
 
+
 dnl -------------------------------------------------------
 dnl Check for zlib support
 dnl -------------------------------------------------------
@@ -1052,13 +1102,14 @@ AC_MY_LIB_PATH([zlib])
 
 ZLIBLIBS=""
 AC_MSG_CHECKING(whether to include zlib support)
+AH_TEMPLATE(WITH_ZLIB, [Define if we are compiling with zlib support.])
 AC_ARG_WITH(zlib,
 [AS_HELP_STRING([--with-zlib], [include zlib support (default: auto)])
 AS_HELP_STRING([--without-zlib], [don't include zlib support])],
 [ case "$withval" in
   yes)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(WITH_ZLIB, , [Define if we are compiling with zlib support.])
+    AC_DEFINE(WITH_ZLIB)
     ZLIBLIBS="-lz"
     ;;
   *)
@@ -1069,11 +1120,12 @@ AS_HELP_STRING([--without-zlib], [don't include zlib support])],
   LIBS="$LIBS -lz"
   AC_TRY_LINK([#include <zlib.h>], [(void) zlibVersion()],
     [ AC_MSG_RESULT(yes)
-      AC_DEFINE(WITH_ZLIB, , [Define if we are compiling with zlib support.])
+      AC_DEFINE(WITH_ZLIB)
       ZLIBLIBS="-lz" ],
     [AC_MSG_RESULT(no)])
   LIBS="$SAVELIBS"] )
 
+
 dnl -------------------------------------------------------
 dnl Check for libtiff support
 dnl -------------------------------------------------------
@@ -1082,13 +1134,14 @@ AC_MY_LIB_PATH([libtiff])
 
 TIFFLIBS=""
 AC_MSG_CHECKING(whether to include libtiff support)
+AH_TEMPLATE(WITH_LIBTIFF, [Define if we are compiling with libtiff support.])
 AC_ARG_WITH(libtiff,
 [AS_HELP_STRING([--with-libtiff], [include libtiff support (default: auto)])
 AS_HELP_STRING([--without-libtiff], [don't include libtiff support])],
 [ case "$withval" in
   yes)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(WITH_LIBTIFF, , [Define if we are compiling with libtiff support.])
+    AC_DEFINE(WITH_LIBTIFF)
     TIFFLIBS="-ltiff $JPEGLIBS $ZLIBLIBS"
     ;;
   *)
@@ -1099,7 +1152,7 @@ AS_HELP_STRING([--without-libtiff], [don't include libtiff support])],
   LIBS="$LIBS -ltiff $JPEGLIBS $ZLIBLIBS"
   AC_TRY_LINK([#include <tiffio.h>], [(void) TIFFGetVersion()],
     [ AC_MSG_RESULT(yes)
-      AC_DEFINE(WITH_LIBTIFF, , [Define if we are compiling with libtiff support.])
+      AC_DEFINE(WITH_LIBTIFF)
       TIFFLIBS="-ltiff $JPEGLIBS $ZLIBLIBS"
     ],
     [AC_MSG_RESULT(no)])
@@ -1117,6 +1170,7 @@ AC_CHECK_HEADERS(libpng/png.h)
 
 PNGLIBS=""
 AC_MSG_CHECKING(whether to include libpng support)
+AH_TEMPLATE(WITH_LIBPNG, [Define if we are compiling with libpng support.])
 AC_ARG_WITH(libpng,
 [AS_HELP_STRING([--with-libpng], [include libpng support (default: auto)])
 AS_HELP_STRING([--without-libpng], [don't include libpng support])],
@@ -1124,7 +1178,7 @@ AS_HELP_STRING([--without-libpng], [don't include libpng support])],
   yes)
     if test "x$ZLIBLIBS" != x; then
         AC_MSG_RESULT(yes)
-        AC_DEFINE(WITH_LIBPNG, , [Define if we are compiling with libpng support.])
+        AC_DEFINE(WITH_LIBPNG)
         PNGLIBS="-lpng"
     else
         AC_MSG_RESULT(no because libpng requires zlib)
@@ -1144,7 +1198,7 @@ AS_HELP_STRING([--without-libpng], [don't include libpng support])],
 #include <png.h>
 #endif], [(void) png_access_version_number()],
         [ AC_MSG_RESULT(yes)
-          AC_DEFINE(WITH_LIBPNG, , [Define if we are compiling with libpng support.])
+          AC_DEFINE(WITH_LIBPNG)
           PNGLIBS="-lpng" ],
         [AC_MSG_RESULT(no)])
 
@@ -1154,6 +1208,7 @@ AS_HELP_STRING([--without-libpng], [don't include libpng support])],
   fi
 ] )
 
+
 dnl -------------------------------------------------------
 dnl Check for libxml support
 dnl -------------------------------------------------------
@@ -1169,13 +1224,14 @@ LIBXMLLIBS=`xml2-config --libs 2>/dev/null`
 
 XMLLIBS=""
 AC_MSG_CHECKING(whether to include libxml support)
+AH_TEMPLATE(WITH_LIBXML, [Define if we are compiling with libxml support.])
 AC_ARG_WITH(libxml,
 [AS_HELP_STRING([--with-libxml], [include libxml support (default: auto)])
 AS_HELP_STRING([--without-libxml], [don't include libxml support])],
 [ case "$withval" in
   yes)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(WITH_LIBXML, , [Define if we are compiling with libxml support.])
+    AC_DEFINE(WITH_LIBXML)
     XMLLIBS=$LIBXMLLIBS
     ;;
   *)
@@ -1186,7 +1242,7 @@ AS_HELP_STRING([--without-libxml], [don't include libxml support])],
   LIBS="$LIBS $LIBXMLLIBS"
   AC_TRY_LINK([#include <libxml/parser.h>], [(void) xmlInitParser()],
     [ AC_MSG_RESULT(yes)
-      AC_DEFINE(WITH_LIBXML, , [Define if we are compiling with libxml support.])
+      AC_DEFINE(WITH_LIBXML)
       XMLLIBS=$LIBXMLLIBS ],
     [AC_MSG_RESULT(no)])
   LIBS="$SAVELIBS"] )
@@ -1199,13 +1255,14 @@ AC_MY_LIB_PATH([libwrap])
 
 TCPWRAPPERLIBS=""
 AC_MSG_CHECKING(whether to include libwrap support)
+AH_TEMPLATE(WITH_TCPWRAPPER, [Define if we are compiling with libwrap (TCP wrapper) support.])
 AC_ARG_WITH(libwrap,
 [AS_HELP_STRING([--with-libwrap], [include libwrap support (default: auto)])
 AS_HELP_STRING([--without-libwrap], [don't include libwrap support])],
 [ case "$withval" in
   yes)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(WITH_TCPWRAPPER, , [Define if we are compiling with libwrap (TCP wrapper) support.])
+    AC_DEFINE(WITH_TCPWRAPPER)
     TCPWRAPPERLIBS="-lwrap"
     ;;
   *)
@@ -1233,7 +1290,7 @@ AS_HELP_STRING([--without-libwrap], [don't include libwrap support])],
     int deny_severity = 0;
     int allow_severity = 0;], [struct request_info r; (void) hosts_access(&r)],
     [ AC_MSG_RESULT(yes)
-      AC_DEFINE(WITH_TCPWRAPPER, , [Define if we are compiling with libwrap (TCP wrapper) support.])
+      AC_DEFINE(WITH_TCPWRAPPER)
     TCPWRAPPERLIBS="-lwrap" ],
     [AC_MSG_RESULT(no)])
   LIBS="$SAVELIBS"] )
@@ -1246,13 +1303,14 @@ dnl -------------------------------------------------------
 AC_MY_OPENJPEG_PATH()
 
 AC_MSG_CHECKING(whether to include OpenJPEG support)
+AH_TEMPLATE(WITH_OPENJPEG, [Define if we are compiling with OpenJPEG support.])
 AC_ARG_WITH(libwrap,
 [AS_HELP_STRING([--with-openjpeg], [include OpenJPEG support (default: auto)])
 AS_HELP_STRING([--without-openjpeg], [don't include OpenJPEG support])],
 [ case "$withval" in
   yes)
     AC_MSG_RESULT(yes)
-    AC_DEFINE(WITH_OPENJPEG, , [Define if we are compiling with OpenJPEG support.])
+    AC_DEFINE(WITH_OPENJPEG)
     OPENJPEGLIBS="-lopenjp2 $OPENJPEGLIBS"
     ;;
   *)
@@ -1263,7 +1321,7 @@ AS_HELP_STRING([--without-openjpeg], [don't include OpenJPEG support])],
   LIBS="-lopenjp2 $OPENJPEGLIBS $LIBS"
   AC_TRY_LINK([#include <openjpeg.h>], [(void) opj_version()],
     [ AC_MSG_RESULT(yes)
-      AC_DEFINE(WITH_OPENJPEG, , [Define if we are compiling with OpenJPEG support.])
+      AC_DEFINE(WITH_OPENJPEG)
     OPENJPEGLIBS="-lopenjp2 $OPENJPEGLIBS" ],
     [AC_MSG_RESULT(no)])
   LIBS="$SAVELIBS"] )
@@ -1277,13 +1335,14 @@ AC_MY_LIB_PATH([libsndfile])
 
 SNDFILELIBS=""
 AC_MSG_CHECKING(whether to include libsndfile support)
+AH_TEMPLATE(WITH_SNDFILE, [Define if we are compiling with libsndfile support.])
 AC_ARG_WITH(libsndfile,
   [AS_HELP_STRING([--with-libsndfile], [include libsndfile support (default: auto)])
 AS_HELP_STRING([--without-libsndfile], [don't include libsndfile support])],
   [ case "$withval" in
     yes)
       AC_MSG_RESULT(yes)
-      AC_DEFINE(WITH_SNDFILE, , [Define if we are compiling with libsndfile support.])
+      AC_DEFINE(WITH_SNDFILE)
       SNDFILELIBS="-lsndfile"
       ;;
     *)
@@ -1294,7 +1353,7 @@ AS_HELP_STRING([--without-libsndfile], [don't include libsndfile support])],
     LIBS="$LIBS -lsndfile"
     AC_TRY_LINK([#include <sndfile.h>], [char buffer [128]; sf_command (NULL, SFC_GET_LIB_VERSION, buffer, sizeof (buffer));],
       [ AC_MSG_RESULT(yes)
-        AC_DEFINE(WITH_SNDFILE, , [Define if we are compiling with libsndfile support.])
+        AC_DEFINE(WITH_SNDFILE)
         SNDFILELIBS="-lsndfile" ],
       [AC_MSG_RESULT(no)])
     LIBS="$SAVELIBS"]
@@ -1305,10 +1364,10 @@ dnl Check for libiconv support
 dnl -------------------------------------------------------
 
 AC_MY_LIB_PATH([libiconv])
-AH_TEMPLATE(WITH_LIBICONV, [Define if we are compiling with libiconv support.])
 WITH_LIBICONV=no
 ICONVLIBS=""
 AC_MSG_CHECKING(whether to include libiconv support)
+AH_TEMPLATE(WITH_LIBICONV, [Define if we are compiling with libiconv support.])
 AC_ARG_WITH(libiconv,
 [AS_HELP_STRING([--with-libiconv], [include libiconv support (default: auto)])
 AS_HELP_STRING([--without-libiconv], [don't include libiconv support])],
@@ -1331,11 +1390,12 @@ AS_HELP_STRING([--without-libiconv], [don't include libiconv support])],
 AC_MSG_RESULT($WITH_LIBICONV)
 
 AC_MSG_CHECKING(whether the second argument to iconv() is const)
+AH_TEMPLATE(LIBICONV_SECOND_ARGUMENT_CONST, [Define if the second argument to iconv() is const.])
 SAVELIBS="$LIBS"
 LIBS="$LIBS $ICONVLIBS"
 AC_TRY_COMPILE([#include <iconv.h>], [iconv_t cd = iconv_open("", ""); const char *in = 0; iconv(cd, &in, 0, 0, 0); iconv_close(cd);],
   [ AC_MSG_RESULT(yes)
-    AC_DEFINE(LIBICONV_SECOND_ARGUMENT_CONST, , [Define if the second argument to iconv() is const.]) ],
+    AC_DEFINE(LIBICONV_SECOND_ARGUMENT_CONST) ],
   [AC_MSG_RESULT(no)])
 LIBS="$SAVELIBS"
 
@@ -1343,7 +1403,7 @@ dnl -------------------------------------------------------
 dnl Check for iconv inside C standard library
 dnl -------------------------------------------------------
 
-AH_TEMPLATE([WITH_STDLIBC_ICONV], [Define if the C standard library has iconv builtin.])dnl
+AH_TEMPLATE(WITH_STDLIBC_ICONV, [Define if the C standard library has iconv builtin.])dnl
 WITH_STDLIBC_ICONV=no
 AC_MSG_CHECKING([whether the C standard library provides iconv functionality])
 SAVELIBS="$LIBS"
@@ -1359,7 +1419,7 @@ dnl Check for libicu support
 dnl -------------------------------------------------------
 
 AC_MY_LIB_PATH([libicu])
-AH_TEMPLATE([WITH_LIBICU], [Define if we are compiling with ICU support.])
+AH_TEMPLATE(WITH_LIBICU, [Define if we are compiling with ICU support.])
 WITH_LIBICU=no
 AC_ARG_WITH(libicu,
 [AS_HELP_STRING([--with-libicu], [include libicu support (default: auto)])
@@ -1393,7 +1453,7 @@ AS_HELP_STRING([--without-libicu], [don't include libicu support])],
 AC_MSG_RESULT($WITH_LIBICU)
 
 dnl -------------------------------------------------------
-dnl character set conversion support
+dnl Check for character set conversion support
 dnl -------------------------------------------------------
 
 AH_VERBATIM([DCMTK_CHARSET_CONVERSION_CONSTANTS], [/* character set conversion constants. */
@@ -1450,7 +1510,7 @@ fi
 AC_RUN_IFELSE(
     [AC_LANG_SOURCE([[#include "tests/iconv.cc"]])],
     [
-        AC_DEFINE_UNQUOTED(DCMTK_FIXED_ICONV_CONVERSION_FLAGS, [`./conftest$EXEEXT`], [Try to define the iconv behavior as conversion flags])
+        AC_DEFINE_UNQUOTED(DCMTK_FIXED_ICONV_CONVERSION_FLAGS, [`./conftest$EXEEXT`], [Try to define the iconv behavior as conversion flags.])
         AC_MSG_RESULT()
     ],
     [AC_MSG_RESULT([unknown])]
@@ -1464,7 +1524,7 @@ if test "$WITH_STDLIBC_ICONV" == "yes"; then
     AC_RUN_IFELSE(
         [AC_LANG_SOURCE([[#include "tests/lciconv.cc"]])],
         [
-            AC_DEFINE(DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING, 1, [Define if iconv_open() accepts "" as an argument])
+            AC_DEFINE(DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING, 1, [Define if iconv_open() accepts "" as an argument.])
             AC_MSG_RESULT(yes)
         ],
         [AC_MSG_RESULT(no)]
@@ -1537,7 +1597,7 @@ AC_MSG_RESULT($ac_enable_cxx11)
 
 
 dnl -------------------------------------------------------
-dnl Enable/disable STL support.
+dnl Enable/disable STL support
 dnl -------------------------------------------------------
 
 ac_enable_stl="no"
@@ -1557,7 +1617,6 @@ AC_ARG_ENABLE(stl,
 )
 AC_MSG_RESULT($ac_enable_stl)
 
-
 ac_enable_stl_vector="auto"
 AC_MSG_CHECKING(whether to enable STL vector support)
 AC_ARG_ENABLE(stl-vector,
@@ -1577,7 +1636,7 @@ if test "$ac_enable_stl_vector" = "auto"; then
   ac_enable_stl_vector="$ac_enable_stl"
 fi
 if test "$ac_enable_stl_vector" = "yes"; then
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/vector.cc"]])], [AC_DEFINE(HAVE_STL_VECTOR, , [Define if STL's vector should be used.])], [ac_enable_stl_vector="unsupported -> no"])
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/vector.cc"]])], [AC_DEFINE(HAVE_STL_VECTOR, 1, [Define if STL's vector should be used.])], [ac_enable_stl_vector="unsupported -> no"])
 fi
 AC_MSG_RESULT($ac_enable_stl_vector)
 
@@ -1600,7 +1659,7 @@ if test "$ac_enable_stl_algorithm" = "auto"; then
   ac_enable_stl_algorithm="$ac_enable_stl"
 fi
 if test "$ac_enable_stl_algorithm" = "yes"; then
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/algo.cc"]])], [AC_DEFINE(HAVE_STL_ALGORITHM, , [Define if STL's algorithm should be used.])], [ac_enable_stl_algorithm="unsupported -> no"])
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/algo.cc"]])], [AC_DEFINE(HAVE_STL_ALGORITHM, 1, [Define if STL's algorithm should be used.])], [ac_enable_stl_algorithm="unsupported -> no"])
 fi
 AC_MSG_RESULT($ac_enable_stl_algorithm)
 
@@ -1623,7 +1682,7 @@ if test "$ac_enable_stl_limits" = "auto"; then
   ac_enable_stl_limits="$ac_enable_stl"
 fi
 if test "$ac_enable_stl_limits" = "yes"; then
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/limits.cc"]])], [AC_DEFINE(HAVE_STL_LIMITS, , [Define if STL's limits should be used.])], [ac_enable_stl_limits="unsupported -> no"])
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/limits.cc"]])], [AC_DEFINE(HAVE_STL_LIMITS, 1, [Define if STL's limits should be used.])], [ac_enable_stl_limits="unsupported -> no"])
 fi
 AC_MSG_RESULT($ac_enable_stl_limits)
 
@@ -1646,7 +1705,7 @@ if test "$ac_enable_stl_list" = "auto"; then
   ac_enable_stl_list="$ac_enable_stl"
 fi
 if test "$ac_enable_stl_list" = "yes"; then
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/list.cc"]])], [AC_DEFINE(HAVE_STL_LIST, , [Define if STL's list should be used.])], [ac_enable_stl_list="unsupported -> no"])
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/list.cc"]])], [AC_DEFINE(HAVE_STL_LIST, 1, [Define if STL's list should be used.])], [ac_enable_stl_list="unsupported -> no"])
 fi
 AC_MSG_RESULT($ac_enable_stl_list)
 
@@ -1669,7 +1728,7 @@ if test "$ac_enable_stl_map" = "auto"; then
   ac_enable_stl_map="$ac_enable_stl"
 fi
 if test "$ac_enable_stl_map" = "yes"; then
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/map.cc"]])], [AC_DEFINE(HAVE_STL_MAP, , [Define if STL's map should be used.])], [ac_enable_stl_map="unsupported -> no"])
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/map.cc"]])], [AC_DEFINE(HAVE_STL_MAP, 1, [Define if STL's map should be used.])], [ac_enable_stl_map="unsupported -> no"])
 fi
 AC_MSG_RESULT($ac_enable_stl_map)
 
@@ -1692,7 +1751,7 @@ if test "$ac_enable_stl_memory" = "auto"; then
   ac_enable_stl_memory="$ac_enable_stl"
 fi
 if test "$ac_enable_stl_memory" = "yes"; then
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/memory.cc"]])], [AC_DEFINE(HAVE_STL_MEMORY, , [Define if STL's memory should be used.])], [ac_enable_stl_memory="unsupported -> no"])
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/memory.cc"]])], [AC_DEFINE(HAVE_STL_MEMORY, 1, [Define if STL's memory should be used.])], [ac_enable_stl_memory="unsupported -> no"])
 fi
 AC_MSG_RESULT($ac_enable_stl_memory)
 
@@ -1715,7 +1774,7 @@ if test "$ac_enable_stl_stack" = "auto"; then
   ac_enable_stl_stack="$ac_enable_stl"
 fi
 if test "$ac_enable_stl_stack" = "yes"; then
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/stack.cc"]])], [AC_DEFINE(HAVE_STL_STACK, , [Define if STL's stack should be used.])], []ac_enable_stl_stack="unsupported -> no")
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/stack.cc"]])], [AC_DEFINE(HAVE_STL_STACK, 1, [Define if STL's stack should be used.])], []ac_enable_stl_stack="unsupported -> no")
 fi
 AC_MSG_RESULT($ac_enable_stl_stack)
 
@@ -1738,7 +1797,7 @@ if test "$ac_enable_stl_string" = "auto"; then
   ac_enable_stl_string="$ac_enable_stl"
 fi
 if test "$ac_enable_stl_string" = "yes"; then
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/string.cc"]])], [AC_DEFINE(HAVE_STL_STRING, , [Define if STL's string should be used.])], [ac_enable_stl_string="unsupported -> no"])
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/string.cc"]])], [AC_DEFINE(HAVE_STL_STRING, 1, [Define if STL's string should be used.])], [ac_enable_stl_string="unsupported -> no"])
 fi
 AC_MSG_RESULT($ac_enable_stl_string)
 
@@ -1763,7 +1822,7 @@ if test "$ac_enable_stl_type_traits" = "auto"; then
   ac_enable_stl_type_traits="$ac_enable_stl"
 fi
 if test "$ac_enable_stl_type_traits" = "yes"; then
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/ttraits.cc"]])], [AC_DEFINE(HAVE_STL_TYPE_TRAITS, , [Define if STL's type traits should be used.])], [ac_enable_stl_type_traits="unsupported -> no"])
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/ttraits.cc"]])], [AC_DEFINE(HAVE_STL_TYPE_TRAITS, 1, [Define if STL's type traits should be used.])], [ac_enable_stl_type_traits="unsupported -> no"])
 fi
 AC_MSG_RESULT($ac_enable_stl_type_traits)
 
@@ -1786,7 +1845,7 @@ if test "$ac_enable_stl_tuple" = "auto"; then
   ac_enable_stl_tuple="$ac_enable_stl"
 fi
 if test "$ac_enable_stl_tuple" = "yes"; then
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/tuple.cc"]])], [AC_DEFINE(HAVE_STL_TUPLE, , [Define if STL's tuple should be used.])], [ac_enable_stl_tuple="unsupported -> no"])
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/tuple.cc"]])], [AC_DEFINE(HAVE_STL_TUPLE, 1, [Define if STL's tuple should be used.])], [ac_enable_stl_tuple="unsupported -> no"])
 fi
 AC_MSG_RESULT($ac_enable_stl_tuple)
 
@@ -1811,7 +1870,7 @@ if test "$ac_enable_stl_system_error" = "auto"; then
   ac_enable_stl_system_error="$ac_enable_stl"
 fi
 if test "$ac_enable_stl_system_error" = "yes"; then
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/syserr.cc"]])], [AC_DEFINE(HAVE_STL_SYSTEM_ERROR, , [Define if STL's system_error should be used.])], [ac_enable_stl_system_error="unsupported -> no"])
+  AC_RUN_IFELSE([AC_LANG_SOURCE([[#include "tests/syserr.cc"]])], [AC_DEFINE(HAVE_STL_SYSTEM_ERROR, 1, [Define if STL's system_error should be used.])], [ac_enable_stl_system_error="unsupported -> no"])
 fi
 AC_MSG_RESULT($ac_enable_stl_system_error)
 
@@ -1832,10 +1891,11 @@ dnl Test if passwd has the pw_gecos field
 dnl -------------------------------------------------------
 
 AC_MSG_CHECKING(whether struct pwd contains the field pw_gecos)
+AH_TEMPLATE(HAVE_PASSWD_GECOS, [Define if passwd::pw_gecos is available.])
 AC_TRY_COMPILE([#include <pwd.h>],
   [&passwd::pw_gecos;],
   [ AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_PASSWD_GECOS, , [Define if passwd::pw_gecos is available.]) ],
+    AC_DEFINE(HAVE_PASSWD_GECOS) ],
   [AC_MSG_RESULT(no)])
 
 dnl -------------------------------------------------------
@@ -1843,10 +1903,11 @@ dnl Test if SYS_gettid is available
 dnl -------------------------------------------------------
 
 AC_MSG_CHECKING(for SYS_gettid in sys/syscall.h)
+AH_TEMPLATE(HAVE_SYS_GETTID, [Define if your system has a prototype for gettid.])
 AC_TRY_COMPILE([#include <sys/syscall.h>],
   [SYS_gettid;],
   [ AC_MSG_RESULT(yes)
-    AC_DEFINE(HAVE_SYS_GETTID, , [Define if your system has a prototype for gettid.]) ],
+    AC_DEFINE(HAVE_SYS_GETTID) ],
   [AC_MSG_RESULT(no)])
 
 
@@ -1869,7 +1930,7 @@ CFLAGS="$DEBUGCFLAGS $CFLAGS"
 CXXFLAGS="$DEBUGCXXFLAGS $CXXFLAGS"
 
 dnl -------------------------------------------------------
-dnl Special Definitions for output
+dnl Special definitions for output
 dnl -------------------------------------------------------
 AC_SUBST(CXXFLAGS)
 AC_SUBST(OPENSSLLIBS)
index 5da0ea2f4e9a9afd58e0a0a8d06cc60d8012f2a1..08e465945d1f542f5d1996d4bfa9eebce558b083 100644 (file)
@@ -2,31 +2,34 @@
 DCMTK COMPILE TIME FLAGS AND MACROS
 ===================================
 
-The behavior of several DCMTK tools and libraries can be modified by
-a number of compile time flags (macros), which are explained below.
-Most of these macros enable experimental or rarely needed features
-in DCMTK, others disable certain functions.  So please, use with care!
+The behavior of several DCMTK tools and libraries can be modified by a number
+of compile time flags (macros), which are explained below.
+Most of these macros enable experimental or rarely needed features in DCMTK,
+others disable certain functions.  So please, use with care!
+
+Note: CMake users simply need to add a new definition to CXXFLAGS, e.g.:
+
+  CXXFLAGS=-DENABLE_DCMJPLS_INTERLEAVE_NONE && cmake [...] /path/to/dcmtk
 
 ALLOW_ILLUMINATION_OVERRIDE
   Affected: dcmprscu
   Type of modification: Activates experimental or rarely used feature
-  Explanation: Allows the settings for Illumination and Reflected
-    Ambient Light, which are stored in a Stored Print object, to be
-    overridden from the print job command file.
+  Explanation: Allows the settings for Illumination and Reflected Ambient Light,
+    which are stored in a Stored Print object, to be overridden from the print
+    job command file.
 
 BUGGY_IMPLEMENTATION_CLASS_UID_PREFIX
   Affected: storescp
   Type of modification: Activates workaround for known bug in other product
   Explanation: The dcmnet module contains a workaround that allows to
     communicate with some buggy Storage SCUs.  If the global flag
-    dcmPeerRequiresExactUIDCopy is enabled, an illegal space padding in
-    the Affected SOP Instance UID field of the C-STORE-RQ message is
-    retained in the corresponding C-STORE-RSP message.  When this
-    preprocessor macro is defined, it should contain the prefix of an
-    implementation class UID of an implementation known to exhibit the
-    buggy behavior.  The workaround is then activated in storescp
-    whenever a Storage SCU with the given implementation class UID root
-    connects.
+    dcmPeerRequiresExactUIDCopy is enabled, an illegal space padding in the
+    Affected SOP Instance UID field of the C-STORE-RQ message is retained in the
+    corresponding C-STORE-RSP message.  When this preprocessor macro is defined,
+    it should contain the prefix of an implementation class UID of an
+    implementation known to exhibit the buggy behavior.  The workaround is then
+    activated in storescp whenever a Storage SCU with the given implementation
+    class UID root connects.
 
 DCMTK_BUILD_DATE
   Affected: dcmdata
@@ -55,32 +58,40 @@ DCMTK_UNDEF_SANITIZER
     raised by the sanitizer and thus prevent the CMake configure phase from
     completing.
 
+DCMTK_ENABLE_STRICT_HUFFMAN_TABLE_CHECK
+  Affected: dcmjpeg
+  Type of modification: Activates feature
+  Explanation: DCMTK releases up to 3.6.6 contained a relatively strict check
+    for the validity of Huffman tables for DC components in the JPEG decoder.
+    At least one JPEG implementation produces valid JPEG images that fail this
+    test (see DCMTK issue #1018).  The test has, therefore, been disabled.  This
+    macro re-enables the old behavior.
+
 DCMTK_ENABLE_UNSAFE_VSNPRINTF
   Affected: ofstd
   Type of modification: Activates feature
-  Explanation: DCMTK requires the snprintf(3)/vsnprintf(3) function, which
-    was introduced with C99 and may not be supported by very old compilers.
-    As a "last resort", an implementation interally using sprintf/vsprintf
-    can be enabled with this macro, which allows the user to compile DCMTK
-    on platforms that do not have the new functions.
-    The implementation allocates a buffer that is 1 kByte larger than
-    the "size" parameter, formats the string into that buffer, and then
-    uses strlcpy() to copy the formatted string into the output buffer,
-    truncating if necessary.
-    This will work in most cases, since few snprintf calls should overrun
-    their buffer by more than 1K, but it can be easily abused by
-    a malicious attacker to cause a buffer overrun.
-    Therefore, this implementation should only be used as a "last resort"
-    and we strongly advise against using it in production code.
+  Explanation: DCMTK requires the snprintf(3)/vsnprintf(3) function, which was
+    introduced with C99 and may not be supported by very old compilers.  As a
+    "last resort", an implementation interally using sprintf/vsprintf can be
+    enabled with this macro, which allows the user to compile DCMTK on platforms
+    that do not have the new functions.
+    The implementation allocates a buffer that is 1 kByte larger than the "size"
+    parameter, formats the string into that buffer, and then uses strlcpy() to
+    copy the formatted string into the output buffer, truncating if necessary.
+    This will work in most cases, since few snprintf calls should overrun their
+    buffer by more than 1K, but it can be easily abused by a malicious attacker
+    to cause a buffer overrun.
+    Therefore, this implementation should only be used as a "last resort" and we
+    strongly advise against using it in production code.
 
 DCMTK_GUI
   Affected: all modules
   Type of modification: Activates experimental or rarely used feature
-  Explanation: When this macro is defined, DCMTK re-assigns the standard
-    output and error streams maintained by ofConsole to string streams.
-    This will allow a GUI based application to extract the messages and
-    either present them to the user or store them in a log file.  See
-    comments in ofstd/include/dcmtk/ofstd/ofconsol.h.
+  Explanation: When this macro is defined, DCMTK re-assigns the standard output
+    and error streams maintained by ofConsole to string streams.  This will
+    allow a GUI based application to extract the messages and either present
+    them to the user or store them in a log file.  See comments in
+    ofstd/include/dcmtk/ofstd/ofconsol.h.
 
 DCMTK_LOG4CPLUS_AVOID_WIN32_FLS
   Affected: oflog
@@ -89,80 +100,89 @@ DCMTK_LOG4CPLUS_AVOID_WIN32_FLS
     instead of thread local storage in the oflog module on Windows to store
     thread-specific information.  This has the advantage that a callback can
     be (and is) registered that automatically cleans up the memory when a
-    thread ends.  The old behaviour can be re-activated with this macro.
+    thread ends.  The old behavior can be re-activated with this macro.
     This may be necessary when an application wants to use multiple fibers
     within a single thread.  In that case, before ending a thread,
     dcmtk::log4cplus::threadCleanup() should be called by the user code in
     order to clean-up oflog's thread local storage.
 
+DCMTK_MERGE_STDERR_TO_STDOUT
+  Affected: dcmdata
+  Type of modification: Activates feature
+  Explanation: DCMTK releases up to 3.6.6 redirected the stderr stream to stdout
+    on Windows to make it easier to pipe the output of the command line tools to
+    "more".  With the introduction of the ability to write DICOM files to
+    stdout, this feature has been disabled as debug output will otherwise get
+    mixed into the DICOM file.  The old behavior can be re-activated by
+    compiling with this macro.  In this case, DICOM files should never be
+    written to stdout as this will be unreliable.
+
 DICOMDIR_WITHOUT_BACKUP
   Affected: dcmdata
   Type of modification: Disables feature
   Explanation: By default, DCMTK creates a backup of an existing DICOMDIR
-    (using the name DICOMDIR.$$$) when a DcmDicomDir object is written
-    to file.  The creation of the backup can be disabled with this macro.
+    (using the name DICOMDIR.$$$) when a DcmDicomDir object is written to file.
+    The creation of the backup can be disabled with this macro.
 
 DISABLE_COMPRESSION_EXTENSION
   Affected: dcmqrdb
   Type of modification: Disables feature
-  Explanation: Disables the support of compression (various transfer
-    syntaxes) in dcmqrdb, a feature which is still experimental.
+  Explanation: Disables the support of compression (various transfer syntaxes)
+    in dcmqrdb, a feature which is still experimental.
 
 DISABLE_FF_JPEG_BITSTREAM_PADDING
   Affected: dcmjpeg, dcmjpls (dcmjpls only up to DCMTK 3.6.4)
   Type of modification: Disables feature
   Explanation: Starting with release 3.6.2, DCMTK pads JPEG and JPEG-LS
     bitstreams that have odd length with an "extended" end of image (EOI)
-    marker, writing ff/ff/d9 instead of adding a zero byte after the
-    EOI marker, i.e. writing ff/d9/00. The old behaviour can be restored
-    by defining this macro.
-    In the dcmjpls module, the macro has been replaced by a codec
-    parameter that can be set at runtime starting with DCMTK 3.6.5.
+    marker, writing "ff/ff/d9" instead of adding a zero byte after the EOI
+    marker, i.e. writing "ff/d9/00".  The old behavior can be restored by
+    defining this macro.
+    In the dcmjpls module, the macro has been replaced by a codec parameter that
+    can be set at runtime starting with DCMTK 3.6.5.
 
 DISABLE_NAGLE_ALGORITHM
   Affected: dcmnet
   Type of modification: Disables feature
-  Explanation: By default, DCMTK does not disable the so-called Nagle
-    algorithm, which allows for improving the efficiency of TCP/IP networks
-    by reducing the number of packets that need to be sent over the network.
-    When compiled with this macro, the Nagle algorithm is disabled for each
-    DICOM transport connection. This was the default in earlier versions of
-    the DCMTK but does not seem to be appropriate anymore for most modern
-    operating systems. The default behavior can be changed by setting the
-    environment variable TCP_NODELAY accordingly (see config/docs/envvars.txt
-    or /usr/local/share/doc/dcmtk/envvars.txt).
+  Explanation: By default, DCMTK does not disable the so-called Nagle algorithm,
+    which allows for improving the efficiency of TCP/IP networks by reducing the
+    number of packets that need to be sent over the network.  When compiled with
+    this macro, the Nagle algorithm is disabled for each DICOM transport
+    connection.  This was the default in earlier versions of the DCMTK but does
+    not seem to be appropriate anymore for most modern operating systems.
+    The default behavior can be changed by setting the environment variable
+    TCP_NODELAY accordingly (see config/docs/envvars.txt or
+    /usr/local/share/doc/dcmtk/envvars.txt).
 
 DISABLE_OFSTD_ATOF
   Affected: all modules
   Type of modification: Disables feature
-  Explanation: By default, DCMTK uses its own implementation of atof()
-    to convert strings to double numbers in a locale-independent manner.
-    This flag forces DCMTK to use the standard sscanf() function
-    instead, which is normally much faster and gives a higher precision
-    than DCMTK's built in code, but is locale dependent, i.e. cannot be
-    used with locales such as German since DICOM decimal strings always
-    use the Posix locale.
+  Explanation: By default, DCMTK uses its own implementation of atof() to
+    convert strings to double numbers in a locale-independent manner.
+    This flag forces DCMTK to use the standard sscanf() function instead, which
+    is normally much faster and gives a higher precision than DCMTK's built in
+    code, but is locale dependent, i.e. cannot be used with locales such as
+    German since DICOM decimal strings always use the Posix locale.
 
 DISABLE_OFSTD_FTOA
   Affected: all modules
   Type of modification: Disables feature
-  Explanation: By default, DCMTK uses its own implementation to convert
-    double numbers to strings to in a locale-independent manner.
-    This flag forces DCMTK to use the standard sprintf() function
-    instead, which is locale dependent, i.e. cannot be used with locales
-    such as German since DICOM decimal strings always use the Posix
-    locale.
+  Explanation: By default, DCMTK uses its own implementation to convert double
+    numbers to strings to in a locale-independent manner.
+    This flag forces DCMTK to use the standard sprintf() function instead, which
+    is locale dependent, i.e. cannot be used with locales such as German since
+    DICOM decimal strings always use the Posix locale.
 
 DISABLE_PORT_PERMISSION_CHECK
   Affected: most/all network server tools
   Type of modification: Disables feature
-  Explanation: By default, most network server tools (e.g. storescp) check
-    for sufficient privileges to listen on the specified port (if geteuid()
-    is available on the particular system).  For examples, on Unix systems
-    listening on port < 1024 usually requires root privileges.  However,
-    the port permission check might prevent the tool from being run on such
-    ports on systems with fine-grained permission control (e.g. Linux).
-    Therefore, this check can be disabled using this flag.
+  Explanation: By default, most network server tools (e.g. storescp) check for
+    sufficient privileges to listen on the specified port (if geteuid() is
+    available on the particular system).  For examples, on Unix systems
+    listening on port < 1024 usually requires root privileges.  However, the
+    port permission check might prevent the tool from being run on such ports on
+    systems with fine-grained permission control (e.g. Linux).  Therefore, this
+    check can be disabled using this flag.
 
 DISABLE_RECV_TIMEOUT
   This macro is not supported anymore since the timeout for the recv() function
@@ -176,65 +196,47 @@ DONT_DISABLE_NAGLE_ALGORITHM
   This macro is not supported anymore since the Nagle algorithm is no longer
   disabled by default.  See DISABLE_NAGLE_ALGORITHM for details.
 
-DONT_LOAD_EXTERNAL_DICTIONARIES
-  This macro is not supported anymore since it has been superseded by macro
-  ENABLE_EXTERNAL_DICTIONARY.  See ENABLE_EXTERNAL_DICTIONARY for details.
-
 DOXYGEN
   Affected: everything
   Type of modification: Hides complexity from Doxygen
-  Explanation: Doxygen is unable to parse some complex statements correctly
-    and it is sometimes sufficient to provide documentation for the basic
+  Explanation: Doxygen is unable to parse some complex statements correctly and
+    it is sometimes sufficient to provide documentation for the basic
     functionality instead of documenting every detail.
     This macro is defined when creating the documentation with Doxygen and
     should NEVER be defined when compiling DCMTK with a C/C++ compiler.
-    NOTE: Doxygen is still unable to expand some macros correctly
-    (e.g. HAVE_WINDOWS_H). Using this macro at the appropriate locations
-    could be a solution for this problem.
+    NOTE: Doxygen is still unable to expand some macros correctly (e.g.
+          HAVE_WINDOWS_H).  Using this macro at the appropriate locations could
+          be a solution for this problem.
 
-ENABLE_BUILTIN_DICTIONARY
+DCM_DICT_DEFAULT
+  Affected: dcmdata
+  Type of modification: Activates feature
+  Explanation: This macro controls which kind of default dictionary is loaded
+    on startup.  Three settings are possible:
+      0: Do not load any default dictionary on startup
+      1: Load builtin dictionary on startup
+      2: Load external (i.e. file-based) dictionary on startup
+    See dcmtk/dcmdata/docs/datadict.txt for further details.
+
+DCM_DICT_USE_DCMDICTPATH
   Affected: dcmdata
   Type of modification: Activates feature
-  Explanation: If enabled, DCMTK's global builtin dictionary, that is always
-    loaded on startup, is populated with known DICOM tags.  Otherwise, the
-    builtin dictionary stays empty.  For further information about dictionary
-    configuration read dcmdata/docs/datadict.txt.
+  Explanation: This macro controls whether DCMDICTPATH environment variable is
+    evaluated on startup.  If so, any dictionary files provided through
+    DCMDICTPATH will be loaded on startup.
+    See dcmtk/dcmdata/docs/datadict.txt for further details.
 
 ENABLE_DCMJPLS_INTERLEAVE_NONE
   Affected: dcmjpls
   Type of modification: Enables feature
   Explanation: Re-enables the option for uninterleaved encoding
     (--interleave-none) in the JPEG-LS encoder on command line and library
-    level. This option was removed after DCMTK 3.6.5 since it may in certain
+    level.  This option was removed after DCMTK 3.6.5 since it may in certain
     cases (color image with BitsStored > 12) create compressed images that
     are correct but cannot be decoded by the JPEG-LS library due to a known
-    bug (DCMTK issue #892). The option will be re-enabled permanently once
-    DCMTK has been ported to CharLS 2.x, another branch of the JPEG-LS
-    library that requires a C++14 compiler, however.
-
-ENABLE_EXTERNAL_DICTIONARY
-  Affected: dcmdata
-  Type of modification: Enables feature
-  Explanation: DCMTK is able to load DICOM data dictionaries from files at
-    application start (before the main function is called).  These files
-    are either specified by the DCMDICTPATH environment variable or the
-    default files are used.  This flag enables the loading of external
-    dictionaries from file at application start.  Disabling it might be useful
-    when only the builtin dictionary should be used.  However, if no
-    dictionary gets loaded, this is likely to cause unexpected behavior.
-    Even if this flag is disabled, the reloadDictionaries() method can be
-    used to load the external dictionaries after application start.
-    However, the environment variable DCMDICTPATH has to point to one or more
-    related dictionary files in that case, since if ENABLE_EXTERNAL_DICTIONARY
-    is disabled, no default dictionary path is set within the DCMTK code.
-    On Unix-like systems this flag is enabled by default while on Windows it is
-    disabled.  For more information about dictionary configuration read
-    dcmdata/docs/datadict.txt.
-    Note that in former versions of DCMTK a macro called
-    DONT_LOAD_EXTERNAL_DICTIONARIES has been specified which now has been
-    replaced with ENABLE_EXTERNAL_DICTIONARY in order to be consistent with
-    the existing Autoconf and CMake configuration switches. See also entry for
-    DONT_LOAD_EXTERNAL_DICTIONARIES.
+    bug (DCMTK issue #892).  The option will be re-enabled permanently once
+    DCMTK has been ported to CharLS 2.x, another branch of the JPEG-LS library
+    that requires a C++14 compiler, however.
 
 EXPERIMENTAL_READ_FROM_FILE
   Affected: dump2dcm
@@ -245,15 +247,15 @@ EXPERIMENTAL_READ_FROM_FILE
 LOCK_IMAGE_FILES
   Affected: dcmpstat, dcmqrdb
   Type of modification: Activates experimental or rarely used feature
-  Explanation: When this macro is defined, the DICOM image file to be
-    send or received/created is locked exclusively.
+  Explanation: When this macro is defined, the DICOM image file to be send or
+    received/created is locked exclusively.
 
 LOG4CPLUS_DISABLE_xxx
 (where xxx is one of TRACE, DEBUG, INFO, WARN, ERROR and FATAL)
   Affected: oflog
   Type of modification: Disables feature
-  Explanation: When one of these macros is defined all log message of
-    this type and lower are disabled and optimized away.
+  Explanation: When one of these macros is defined, all log message of this type
+    and lower are disabled and optimized away.
 
 NO_GET_SUPPORT
   Affected: dcmqrdb
@@ -263,119 +265,113 @@ NO_GET_SUPPORT
 NO_PATIENTSTUDYONLY_SUPPORT
   Affected: dcmqrdb
   Type of modification: Disables feature
-  Explanation: Disables support for the Patient/Study Only Query/Retrieve
-    Model in dcmqrdb.
+  Explanation: Disables support for the Patient/Study Only Query/Retrieve Model
+    in dcmqrdb.
 
 OFCONDITION_IMPLICIT_BOOL_CONVERSION
   Affected: ofstd
   Type of modification: Activates experimental or rarely used feature
-  Explanation: Activates an implicit conversion from OFCondition to
-    OFBool, i.e. operator OFBool().  Implicit conversion might not always
-    be a good idea since it can hide unwanted constructs.  Therefore,
-    this operator is disabled by default.
+  Explanation: Activates an implicit conversion from OFCondition to OFBool, i.e.
+    operator OFBool().  Implicit conversion might not always be a good idea
+    since it can hide unwanted constructs.  Therefore, this operator is disabled
+    by default.
 
 ON_THE_FLY_COMPRESSION
   Affected: storescu
   Type of modification: Activates experimental or rarely used feature
-  Explanation: When this macro is defined, the storescu tries to compress
-    or decompress the DICOM image to be sent (if required) depending on
-    the negotiated transfer syntax.
+  Explanation: When this macro is defined, the storescu tries to compress or
+    decompress the DICOM image to be sent (if required) depending on the
+    negotiated transfer syntax.
 
 OLD_USER_INFO_SUB_ITEM_ORDER
   Affected: dcmnet
   Type of modification: Activates experimental or rarely used feature
-  Explanation: Prior DCMTK releases did not encode A-ASSOCIATE user
-    information sub-items in ascending order, i.e. they sent 55H
-    followed by 54H and 56H.  This behavior has been "legalized" by
-    DICOM CP 280 but is known to create problems with some other
-    toolkits.  The current DCMTK release always sends the user
-    information sub-items in ascending order, but can be "forced" with
-    this macro to revert to the old behavior.  It should be re-activated
-    for testing purposes only.
+  Explanation: Prior DCMTK releases did not encode A-ASSOCIATE user information
+    sub-items in ascending order, i.e. they sent 55H followed by 54H and 56H.
+    This behavior has been "legalized" by DICOM CP-280, but is known to create
+    problems with some other toolkits.  The current DCMTK release always sends
+    the user information sub-items in ascending order, but can be "forced" with
+    this macro to revert to the old behavior.  It should be re-activated for
+    testing purposes only.
 
 PASTEL_COLOR_OUTPUT
   Affected: dcmimgle, dcmimage
   Type of modification: Activates experimental or rarely used feature
-  Explanation: Activates experimental code in dcmimgle/dcmimage that
-    renders monochrome images with pastel colors.
+  Explanation: Activates experimental code in dcmimgle/dcmimage that renders
+    monochrome images with pastel colors.
 
 PDV_TEST
   Affected: dcmnet
   Type of modification: Activates experimental or rarely used feature
-  Explanation: Causes the network module to insert a false, zero-length
-    PDV (2 byte header) into each P-DATA-PDU.
+  Explanation: Causes the network module to insert a false, zero-length PDV
+    (2-byte header) into each P-DATA-PDU.
 
 PIXELSTACK_MEMORY_LEAK_WORKAROUND
   Affected: dcmdata
   Type of modification: Activates experimental or rarely used feature
   Explanation: On certain platforms there seems to be a memory leak in
-    DcmDataset::chooseRepresentation().  The work-around activated by
-    this macro should solve this issue.
+    DcmDataset::chooseRepresentation().  The work-around activated by this macro
+    should solve this issue.
 
 PRINT_REPLACED_DICTIONARY_ENTRIES
   Affected: dcmdata
   Type of modification: Activates experimental or rarely used feature
-  Explanation: When reading the data dictionary, duplicate entries (i.e.
-    entries replacing an older entry in the dictionary) are reported on
-    console if compiled with this macro.  Useful for testing a new
-    dictionary version.
+  Explanation: When reading the data dictionary, duplicate entries (i.e. entries
+    replacing an older entry in the dictionary) are reported on console if
+    compiled with this macro.  Useful for testing a new dictionary version.
 
 REJECT_FILE_IF_META_GROUP_LENGTH_ABSENT
   Affected: dcmdata
   Type of modification: Disables feature
-  Explanation: When reading the a file that contains an incorrect meta
-    header where meta header group length (0002,0000) is absent, DCMTK
-    since release 3.5.4 nevertheless tries to parse the file, unless this
-    macro is enabled, in which case the behavior up to DCMTK 3.5.3 is
-    retained.
+  Explanation: When reading the a file that contains an incorrect meta header
+    where meta header group length (0002,0000) is absent, DCMTK since release
+    3.5.4 nevertheless tries to parse the file, unless this macro is enabled, in
+    which case the behavior up to DCMTK 3.5.3 is retained.
 
 RETAIN_ASSOCIATION
   Affected: dcmqrti
   Type of modification: Activates experimental or rarely used feature
   Explanation: Keeps association to remote Query SCP open after
-    study/series/image listing.  Default behavior is to open new
-    association for each query.
+    study/series/image listing.  Default behavior is to open a new association
+    for each query.
 
 REVERSE_OVERLAY_ORIGIN_ORDER
   Affected: dcmimgle
   Type of modification: Activates experimental or rarely used feature
-  Explanation: When compiled with this macro, dcmimgle assumes that the
-    values in DCM_ImageFrameOrigin are in reverse order, i.e. X\Y
-    instead of Y\X.
+  Explanation: When compiled with this macro, dcmimgle assumes that the values
+    in Overlay Origin (60xx,0050) are in reverse order, i.e. X\Y instead of Y\X.
 
 SITE_UID_ROOT
   Affected: dcmdata
   Type of modification: Site customization
   Explanation: dcmdata contains a routine that generates DICOM unique
-    identifiers (UIDs).  By default, these are constructed from the OFFIS
-    UID namespace, i.e. using the OFFIS UID Root "1.2.276.0.7230010.3".
-    Users who prefer to let the toolkit generate UIDs from their own UID
-    namespace should compile DCMTK with SITE_UID_ROOT defined to their own
-    UID root.  Please make sure that the resulting UIDs do not exceed the
-    64 characters limit!
-    DCMTK may add a maximum of 44 characters to the UID root when
-    generating UIDs. Therefore, the root must not be longer than 20
-    characters in order to avoid UID truncation.
+    identifiers (UIDs).  By default, these are constructed from the OFFIS UID
+    namespace, i.e. using the OFFIS UID Root "1.2.276.0.7230010.3".  Users who
+    prefer to let the toolkit generate UIDs from their own UID namespace should
+    compile DCMTK with SITE_UID_ROOT defined to their own UID root.  Please make
+    sure that the resulting UIDs do not exceed the 64 characters limit!
+    DCMTK may add a maximum of 44 characters to the UID root when generating
+    UIDs.  Therefore, the root must not be longer than 20 characters in order to
+    avoid UID truncation.
 
 STARVIEW
   Affected: dcmimgle, dcmimage
   Type of modification: Activates experimental or rarely used feature
-  Explanation: Enables support for old StarView 2 GUI class library from
-    Star Division.
+  Explanation: Enables support for old StarView 2 GUI class library from Star
+    Division.
 
 SUPPRESS_CREATE_STAMP
   Affected: dcmdata
   Type of modification: Activates experimental or rarely used feature
-  Explanation: When defined, suppresses the creation of a time stamp
-    comment when re-generating dcdeftag.h and dcdictbi.cc.
+  Explanation: When defined, suppresses the creation of a time stamp comment
+    when re-generating dcdeftag.h and dcdictbi.cc.
 
 USE__LOCKING
   Affected: dcmnet
   Type of modification: Activates alternative implementation
-  Explanation: Activates an alternative emulation of flock() on Win32
-    platforms using _locking().  This version should only be used on
-    compilers where _get_osfhandle() is not available since it does not
-    implement shared locks.
+  Explanation: Activates an alternative emulation of flock() on Win32 platforms
+    using _locking().  This version should only be used on compilers where
+    _get_osfhandle() is not available since it does not implement shared locks.
 
 USE_BINARY_MODE_FOR_STDOUT_ON_WINDOWS
   Affected: dcmdata
@@ -390,30 +386,30 @@ USE_BINARY_MODE_FOR_STDOUT_ON_WINDOWS
 USE_NULL_SAFE_OFSTRING
   Affected: ofstd
   Type of modification: Activates feature
-  Explanation: When this macro is defined, OFString(NULL) results in an
-    empty string.  If this macro is not defined, OFString(NULL) causes a
-    NULL pointer dereference.  This macro has no effect when HAVE_STL_STRING
-    is also defined.  Currently, this macro is always defined by DCMTK's
-    Makefiles.  This will change in future releases.
+  Explanation: When this macro is defined, OFString(NULL) results in an empty
+    string.  If this macro is not defined, OFString(NULL) causes a NULL pointer
+    dereference.  This macro has no effect when HAVE_STL_STRING is also defined.
+    Currently, this macro is always defined by DCMTK's Makefiles.  This will
+    change in future releases.
 
 USE_WIN32_CREATE_MUTEX
   Affected: ofstd
   Type of modification: Activates alternative implementation
-  Explanation: Starting with DCMTK 3.6.2, the Win32 version of the
-    OFMutex class uses critical sections instead of Win32 mutexes, because
-    critical sections are much faster.  Their only drawback is that they
-    cannot be shared across processes.  Users who want to revert to the
-    behavior of older DCMTK releases can define this macro.
+  Explanation: Starting with DCMTK 3.6.2, the Win32 version of the OFMutex class
+    uses critical sections instead of Win32 mutexes, because critical sections
+    are much faster.  Their only drawback is that they cannot be shared across
+    processes.  Users who want to revert to the behavior of older DCMTK releases
+    can define this macro.
 
 USE_WIN32_READ_WRITE_LOCK_HELPER
   Affected: ofstd
   Type of modification: Re-activated behavior of earlier DCMTK releases
   Explanation: Starting with DCMTK 3.6.4, the Win32 version of the
-    OFReadWriteLock class uses Slim Reader/Writer (SRW) Locks,
-    which are available since Windows Vista, instead of the older
-    implementation based on a Mutex, a Semaphore and a counter, because
-    SRW locks are much faster.  Users who want to revert to the
-    behavior of older DCMTK releases can define this macro.
+    OFReadWriteLock class uses Slim Reader/Writer (SRW) Locks, which are
+    available since Windows Vista, instead of the older implementation based on
+    a Mutex, a Semaphore and a counter, because SRW locks are much faster.
+    Users who want to revert to the behavior of older DCMTK releases can define
+    this macro.
 
 USING_STD_NAMESPACE
   Affected: all modules
@@ -430,10 +426,10 @@ WIDE_CHAR_FILE_IO_FUNCTIONS
   Type of modification: Activates feature
   Explanation: In addition to the standard file I/O functions, the OFFile class
     also defines the corresponding wide character functions from C99 standard.
-    Since these functions are not yet supported by all compilers and the
-    current implementation is Windows-specific, this feature is disabled by
-    default.  When using CMake, you can enable this macro by setting the CMake
-    option DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS to "on".
+    Since these functions are not yet supported by all compilers and the current
+    implementation is Windows-specific, this feature is disabled by default.
+    When using CMake, you can enable this macro by setting the CMake option
+    DCMTK_WIDE_CHAR_FILE_IO_FUNCTIONS to "on".
 
 WIDE_CHAR_MAIN_FUNCTION
   Affected: currently not used
index fcde418dd57813cf17e053dff406f746a3afa0bf..f86e492e1be251f3942fabf1561ee2ccfebf037b 100644 (file)
@@ -4,7 +4,7 @@
 #define OSCONFIG_H
 
 /*
-** Define enclosures for include files with C linkage (mostly system headers)
+** Define enclosures for include files with C linkage (mostly system headers).
 */
 #ifdef __cplusplus
 #define BEGIN_EXTERN_C extern "C" {
 #undef C_CHAR_UNSIGNED
 
 /* Define to the inline keyword supported by the C compiler, if any, or to the
-   empty string */
+   empty string. */
 #undef C_INLINE
 
-/* Define if >> is unsigned on the C compiler */
+/* Define if >> is unsigned on the C compiler. */
 #undef C_RIGHTSHIFT_UNSIGNED
 
 /* character set conversion constants. */
 /* Define to select character set conversion implementation. */
 #undef DCMTK_ENABLE_CHARSET_CONVERSION
 
-/* Select LFS mode (defined above) that shall be used or don't define it */
+/* Select LFS mode (defined above) that shall be used or don't define it. */
 #undef DCMTK_ENABLE_LFS
 
-/* Try to define the iconv behavior as conversion flags */
+/* Try to define the iconv behavior as conversion flags. */
 #undef DCMTK_FIXED_ICONV_CONVERSION_FLAGS
 
 /* Define if your system has a usable <poll.h>. */
 /* Define the DCMTK default path. */
 #undef DCMTK_PREFIX
 
-/* Define if iconv_open() accepts "" as an argument */
+/* Define if iconv_open() accepts "" as an argument. */
 #undef DCMTK_STDLIBC_ICONV_HAS_DEFAULT_ENCODING
 
+/* Define the type of default dictionary that we want to use: Do not load any
+   default dictionary on startup (0), load builtin dictionary on startup (1),
+   or load external (i.e. file-based) dictionary on startup (2). */
+#undef DCM_DICT_DEFAULT
+
 /* Define the default data dictionary path for the dcmdata library package. */
 #undef DCM_DICT_DEFAULT_PATH
 
+/* Define whether dictionaries defined through DCMDICTPATH environment
+   variable should be loaded. */
+#undef DCM_DICT_USE_DCMDICTPATH
+
 /* Define the default directory where configuration files reside. */
 #undef DEFAULT_CONFIGURATION_DIR
 
 /* Define the default directory where support data files reside. */
 #undef DEFAULT_SUPPORT_DATA_DIR
 
-/* Define if we are compiling with built-in (compiled-in) dictionary enabled.
-   */
-#undef ENABLE_BUILTIN_DICTIONARY
-
-/* Define if we are compiling for loading external dictionary from default
-   path. */
-#undef ENABLE_EXTERNAL_DICTIONARY
-
 /* Define if we are compiling for enabling external private tag dictionary. */
 #undef ENABLE_PRIVATE_TAGS
 
 /* Define to 1 if you have the `bind' function. */
 #undef HAVE_BIND
 
-/* Define to 1 if you have the `bzero' function. */
-#undef HAVE_BZERO
-
 /* Define to 1 if the system has the type `char16_t'. */
 #undef HAVE_CHAR16_T
 
 /* Define if your system declares the return type of strerror_r as char *
-   instead of int */
+   instead of int. */
 #undef HAVE_CHARP_STRERROR_R
 
 /* Define if your C++ compiler can work with class templates. */
 /* Define to 1 if you have the `cuserid' function. */
 #undef HAVE_CUSERID
 
-/* define if the compiler supports basic C++11 syntax */
+/* Define if the compiler supports basic C++11 syntax. */
 #undef HAVE_CXX11
 
-/* Define if volatile is a known keyword */
+/* Define if volatile is a known keyword. */
 #undef HAVE_CXX_VOLATILE
 
 /* Define if "const" is supported by the C compiler. */
 #undef HAVE_DECLARATION_SOCKLEN_T
 
 /* Define if your system has a declaration for std::ios_base::openmode in
-   iostream.h. */
+   iostream. */
 #undef HAVE_DECLARATION_STD__IOS_BASE__OPENMODE
 
 /* Define if your system has a declaration for struct utimbuf in sys/types.h
 /* Define to 1 if you have the <iostream.h> header file. */
 #undef HAVE_IOSTREAM_H
 
-/* Define if your system defines ios::nocreate in iostream.h */
+/* Define if your system defines ios::nocreate in iostream.h. */
 #undef HAVE_IOS_NOCREATE
 
 /* Define to 1 if you have the <io.h> header file. */
 /* Define to 1 if you have the <new.h> header file. */
 #undef HAVE_NEW_H
 
-/* Define if the compiler supports operator delete (std::nothrow.) */
+/* Define if the compiler supports operator delete (std::nothrow). */
 #undef HAVE_NOTHROW_DELETE
 
 /* Define `pid_t' to `int' if <sys/types.h> does not define. */
@@ -563,6 +561,169 @@ typedef unsigned short ushort;
    arguments. */
 #undef HAVE_OLD_READDIR_R
 
+/* Define to 1 if you have the <openssl/asn1.h> header file. */
+#undef HAVE_OPENSSL_ASN1_H
+
+/* Define if OpenSSL provides the new typedef EVP_MD_CTX defined as struct
+   evp_md_ctx_st. */
+#undef HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX
+
+/* Define to 1 if you have the <openssl/dh.h> header file. */
+#undef HAVE_OPENSSL_DH_H
+
+/* Define to 1 if you have the <openssl/evp.h> header file. */
+#undef HAVE_OPENSSL_EVP_H
+
+/* Define if OpenSSL provides a prototype for ASN1_STRING_get0_data in
+   <openssl/asn1.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA
+
+/* Define if OpenSSL provides a prototype for DH_bits in <openssl/dh.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_DH_BITS
+
+/* Define if OpenSSL provides a prototype for EVP_PKEY_base_id in
+   <openssl/evp.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID
+
+/* Define if OpenSSL provides a prototype for EVP_PKEY_get0_EC_KEY in
+   <openssl/evp.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY
+
+/* Define if OpenSSL provides a prototype for EVP_PKEY_get_group_name in
+   <openssl/evp.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME
+
+/* Define if OpenSSL provides a prototype for EVP_PKEY_id in <openssl/evp.h>.
+   */
+#undef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID
+
+/* Define if OpenSSL provides a prototype for EVP_PKEY_RSA_PSS in
+   <openssl/evp.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS
+
+/* Define if OpenSSL provides a prototype for OSSL_PROVIDER_load in
+   <openssl/provider.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD
+
+/* Define if OpenSSL provides a prototype for RAND_egd in <openssl/rand.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_RAND_EGD
+
+/* Define if OpenSSL provides a prototype for SSL_CTX_get0_param in
+   <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM
+
+/* Define if OpenSSL provides a prototype for SSL_CTX_get_cert_store in
+   <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE
+
+/* Define if OpenSSL provides a prototype for SSL_CTX_get_ciphers in
+   <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS
+
+/* Define if OpenSSL provides a prototype for SSL_CTX_set0_tmp_dh_pkey in
+   <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY
+
+/* Define if OpenSSL provides a prototype for SSL_CTX_set1_curves in
+   <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES
+
+/* Define if OpenSSL provides a prototype for SSL_CTX_set1_sigalgs in
+   <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS
+
+/* Define if OpenSSL provides a prototype for SSL_CTX_set_ecdh_auto in
+   <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO
+
+/* Define if OpenSSL provides a prototype for SSL_CTX_set_max_proto_version in
+   <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION
+
+/* Define if OpenSSL provides a prototype for SSL_CTX_set_security_level in
+   <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL
+
+/* Define if OpenSSL provides a prototype for SSL_ERROR_WANT_ASYNC in
+   <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC
+
+/* Define if OpenSSL provides a prototype for SSL_ERROR_WANT_ASYNC_JOB in
+   <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB
+
+/* Define if OpenSSL provides a prototype for SSL_ERROR_WANT_CLIENT_HELLO_CB
+   in <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB
+
+/* Define if OpenSSL provides a prototype for
+   TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305 in <openssl/ssl.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305
+
+/* Define if OpenSSL provides a prototype for TLS_method in <openssl/ssl.h>.
+   */
+#undef HAVE_OPENSSL_PROTOTYPE_TLS_METHOD
+
+/* Define if OpenSSL provides a prototype for TS_STATUS_INFO_get0_failure_info
+   in <openssl/ts.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO
+
+/* Define if OpenSSL provides a prototype for TS_STATUS_INFO_get0_status in
+   <openssl/ts.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS
+
+/* Define if OpenSSL provides a prototype for TS_STATUS_INFO_get0_text in
+   <openssl/ts.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT
+
+/* Define if OpenSSL provides a prototype for TS_VERIFY_CTS_set_certs in
+   <openssl/ts.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS
+
+/* Define if OpenSSL provides a prototype for TS_VERIFY_CTX_set_data in
+   <openssl/ts.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA
+
+/* Define if OpenSSL provides a prototype for TS_VERIFY_CTX_set_flags in
+   <openssl/ts.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS
+
+/* Define if OpenSSL provides a prototype for TS_VERIFY_CTX_set_store in
+   <openssl/ts.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE
+
+/* Define if OpenSSL provides a prototype for X509_get0_notAfter in
+   <openssl/x509.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER
+
+/* Define if OpenSSL provides a prototype for X509_get0_notBefore in
+   <openssl/x509.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE
+
+/* Define if OpenSSL provides a prototype for X509_get_signature_nid in
+   <openssl/x509.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID
+
+/* Define if OpenSSL provides a prototype for X509_STORE_get0_param in
+   <openssl/x509.h>. */
+#undef HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM
+
+/* Define to 1 if you have the <openssl/provider.h> header file. */
+#undef HAVE_OPENSSL_PROVIDER_H
+
+/* Define to 1 if you have the <openssl/ssl.h> header file. */
+#undef HAVE_OPENSSL_SSL_H
+
+/* Define to 1 if you have the <openssl/ts.h> header file. */
+#undef HAVE_OPENSSL_TS_H
+
+/* Define if OpenSSL provides the X509_ALGOR_get0() function that expects a
+   const pointer as first parameter. */
+#undef HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM
+
+/* Define to 1 if you have the <openssl/x509.h> header file. */
+#undef HAVE_OPENSSL_X509_H
+
 /* Define if the output iterator category is supported. */
 #undef HAVE_OUTPUT_ITERATOR_CATEGORY
 
@@ -572,7 +733,7 @@ typedef unsigned short ushort;
 /* Define to 1 if you have the `pclose' function. */
 #undef HAVE_PCLOSE
 
-/* Define if pthread_t is a pointer type on your system */
+/* Define if pthread_t is a pointer type on your system. */
 #undef HAVE_POINTER_TYPE_PTHREAD_T
 
 /* Define to 1 if you have the `popen' function. */
@@ -586,10 +747,6 @@ typedef unsigned short ushort;
    */
 #undef HAVE_PROTOTYPE_BIND
 
-/* Define if your system has a prototype for bzero in string.h strings.h
-   libc.h unistd.h stdlib.h. */
-#undef HAVE_PROTOTYPE_BZERO
-
 /* Define if your system has a prototype for connect in sys/types.h
    sys/socket.h. */
 #undef HAVE_PROTOTYPE_CONNECT
@@ -674,12 +831,12 @@ typedef unsigned short ushort;
 /* Define if your system has a prototype for std::isnan in cmath. */
 #undef HAVE_PROTOTYPE_STD__ISNAN
 
-/* Define if your system has a prototype for std::vfprintf in stdarg.h
-   stdio.h. */
+/* Define if your system has a prototype for std::vfprintf in cstdarg cstdio.
+   */
 #undef HAVE_PROTOTYPE_STD__VFPRINTF
 
-/* Define if your system has a prototype for std::vsnprintf in stdarg.h
-   stdio.h. */
+/* Define if your system has a prototype for std::vsnprintf in cstdarg cstdio.
+   */
 #undef HAVE_PROTOTYPE_STD__VSNPRINTF
 
 /* Define if your system has a prototype for strcasecmp in string.h. */
@@ -721,9 +878,6 @@ typedef unsigned short ushort;
 /* Define if the random_access iterator category is supported. */
 #undef HAVE_RANDOM_ACCESS_ITERATOR_CATEGORY
 
-/* Define if OpenSSL provides the RAND_egd function. */
-#undef HAVE_RAND_EGD
-
 /* Define to 1 if you have the `readdir_r' function. */
 #undef HAVE_READDIR_R
 
@@ -760,9 +914,6 @@ typedef unsigned short ushort;
 /* Define to 1 if you have the `socket' function. */
 #undef HAVE_SOCKET
 
-/* Define if OpenSSL provides the SSL_CTX_get0_param function. */
-#undef HAVE_SSL_CTX_GET0_PARAM
-
 /* Define to 1 if you have the <sstream> header file. */
 #undef HAVE_SSTREAM
 
@@ -772,7 +923,7 @@ typedef unsigned short ushort;
 /* Define to 1 if you have the `stat' function. */
 #undef HAVE_STAT
 
-/* Define if the compiler supports static_assert */
+/* Define if the compiler supports static_assert. */
 #undef HAVE_STATIC_ASSERT
 
 /* Define if the compiler supports static_cast<>. */
@@ -964,7 +1115,7 @@ typedef unsigned short ushort;
 /* Define to 1 if you have the `tmpnam' function. */
 #undef HAVE_TMPNAM
 
-/* Define if the compiler recognizes typename. */
+/* Define if typename is a known keyword. */
 #undef HAVE_TYPENAME
 
 /* Define to 1 if the system has the type `uint64_t'. */
@@ -991,7 +1142,7 @@ typedef unsigned short ushort;
 /* Define to 1 if you have the <utime.h> header file. */
 #undef HAVE_UTIME_H
 
-/* Define if variable-length arrays are supported in C */
+/* Define if variable-length arrays are supported in C. */
 #undef HAVE_VLA
 
 /* Define to 1 if you have the `vprintf' function. */
@@ -1028,7 +1179,7 @@ typedef unsigned short ushort;
 /* Define if the compiler supports __func__. */
 #undef HAVE___func___MACRO
 
-/* Define if libc.h should be treated as a C++ header */
+/* Define if libc.h should be treated as a C++ header. */
 #undef INCLUDE_LIBC_H_AS_CXX
 
 /* Define if <math.h> fails if included extern "C". */
@@ -1097,15 +1248,12 @@ typedef unsigned short ushort;
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
-/* Namespace for ANSI C functions in standard C++ headers */
+/* Namespace for ANSI C functions in standard C++ headers. */
 #undef STDIO_NAMESPACE
 
 /* Define to 1 if your <sys/time.h> declares `struct tm'. */
 #undef TM_IN_SYS_TIME
 
-/* Define if ANSI standard C++ includes are used. */
-#undef USE_STD_CXX_INCLUDES
-
 /* Enable extensions on AIX 3, Interix.  */
 #ifndef _ALL_SOURCE
 # undef _ALL_SOURCE
@@ -1167,7 +1315,7 @@ typedef unsigned short ushort;
 /* Number of bits in a file offset, on hosts where this is settable. */
 #undef _FILE_OFFSET_BITS
 
-/* Define to enable LFS64 (explicit large file support) if available */
+/* Define to enable LFS64 (explicit large file support) if available. */
 #undef _LARGEFILE64_SOURCE
 
 /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
index bdfca251fc29cddb5774939ba3b26bc0a1cc4393..701927649cb891052ab6cb9f6b07e06ba3e510e7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, OFFIS e.V.
+ *  Copyright (C) 2015-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CMATH
-#define INCLUDE_CFLOAT
-#define INCLUDE_IOSTREAM
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cfloat>
+#include <cmath>
+#include <climits>
+#include <csignal>
+#include <csetjmp>
+#include <iostream>
+
 #include "dcmtk/ofstd/oftypes.h"
+#include "dcmtk/ofstd/ofstream.h"
+
+#ifdef HAVE_IEEEFP_H
+#include <ieeefp.h>
+#endif
 
 #ifdef HAVE_WINDOWS_H
 #define WIN32_LEAN_AND_MEAN
index f99ce5415533cddd5ca63575d94c2910fe6a353a..a655f34505c0e7e9416be311c079b33656039ab9 100644 (file)
@@ -134,8 +134,8 @@ AC_DEFUN([AX_CXX_COMPILE_STDCXX], [dnl
     AC_MSG_NOTICE([No compiler with C++$1 support was found])
   else
     HAVE_CXX$1=1
-    AC_DEFINE(HAVE_CXX$1,1,
-              [define if the compiler supports basic C++$1 syntax])
+    AC_DEFINE(HAVE_CXX$1, 1,
+              [Define if the compiler supports basic C++$1 syntax.])
   fi
   AC_SUBST(HAVE_CXX$1)
 ])
@@ -977,4 +977,4 @@ namespace cxx17
 
 #endif  // __cplusplus <= 201402L
 
-]])
\ No newline at end of file
+]])
index 12371170b6d2aa65477b7c552d3e55bfdd435ade..d1949366d94eb0556daf36cb1775926cb408b852 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014-2019, OFFIS e.V.
+ *  Copyright (C) 2014-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 //       although it is part of configure testing itself.
 //       Therefore, ensure osconfig.h has already been generated
 //       before this program is used.
-#define INCLUDE_CLIMITS
-#define INCLUDE_CMATH
-#define INCLUDE_CSETJMP
-#define INCLUDE_CSIGNAL
 #include "../math.cc"
 
 #ifdef HAVE_FENV_H
@@ -40,7 +36,7 @@
 #include <ieeefp.h>
 #endif
 
-#ifdef __APPLE__
+#if defined(__APPLE__) && !defined(__aarch64__)
 // For controlling floating point exceptions on OS X.
 #include <xmmintrin.h>
 #endif
@@ -340,13 +336,17 @@ static void provoke_snan()
 #ifdef HAVE_WINDOWS_H
     _clearfp();
     _controlfp( _controlfp(0,0) & ~_EM_INVALID, _MCW_EM );
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) && !defined(__aarch64__)
     _MM_SET_EXCEPTION_MASK( _MM_GET_EXCEPTION_MASK() & ~_MM_MASK_INVALID );
 #elif defined(HAVE_FENV_H) && defined(HAVE_PROTOTYPE_FEENABLEEXCEPT)
     feenableexcept( FE_INVALID );
 #elif defined(HAVE_IEEEFP_H) && !defined(__CYGWIN__)
     // Cygwin unfortunately seems to have <ieeefp.h> but no implementation of fgetmask/fpsetmask
+#ifdef HAVE_DECLARATION_FP_EXCEPT_T
+    fp_except_t cw = fpgetmask();
+#else
     fp_except cw = fpgetmask();
+#endif
 
 #ifdef FP_X_DX
     // on some systems, the devide-by-zero flag is called FP_X_DX
@@ -382,13 +382,17 @@ static int test_snan( STD_NAMESPACE ostream& out, const char* name )
     _controlfp( _controlfp(0,0) | _EM_INVALID, _MCW_EM );
 #elif defined(HAVE_FENV_H)
     feclearexcept( FE_INVALID );
-#ifdef __APPLE__
+#if defined(__APPLE__) && !defined(__aarch64__)
     _MM_SET_EXCEPTION_MASK( _MM_GET_EXCEPTION_MASK() | _MM_MASK_INVALID );
 #elif defined(HAVE_FENV_H) && defined(HAVE_PROTOTYPE_FEENABLEEXCEPT)
     fedisableexcept( FE_INVALID );
 #elif defined(HAVE_IEEEFP_H) && !defined(__CYGWIN__)
     // Cygwin unfortunately seems to have <ieeefp.h> but no implementation of fgetmask/fpsetmask
+#ifdef HAVE_DECLARATION_FP_EXCEPT_T
+    fp_except_t cw = fpgetmask();
+#else
     fp_except cw = fpgetmask();
+#endif
 
 #ifdef FP_X_DX
     // on some systems, the devide-by-zero flag is called FP_X_DX
index 4d896d4e9c0049e04a876d1e117e2b3505528520..372d23539f420f732c58f8b58acb100026525918 100644 (file)
@@ -3,9 +3,12 @@ include_directories(${LIBXML_INCDIR})
 
 # declare executables
 foreach(PROGRAM dcm2xml dcmconv dcmcrle dcmdrle dcmdump dcmftest dcmgpdir dump2dcm xml2dcm stl2dcm pdf2dcm dcm2pdf img2dcm dcm2json cda2dcm)
-  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM})
+  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc)
 endforeach()
-DCMTK_ADD_EXECUTABLE(dcmodify dcmodify mdfconen mdfdsman)
+DCMTK_ADD_EXECUTABLE(dcmodify
+  dcmodify.cc
+  mdfconen.cc
+  mdfdsman.cc)
 
 # make sure executables are linked to the corresponding libraries
 foreach(PROGRAM dcm2xml dcmconv dcmcrle dcmdrle dcmdump dcmgpdir dcmodify dump2dcm xml2dcm stl2dcm pdf2dcm dcm2pdf img2dcm dcm2json cda2dcm)
@@ -13,5 +16,4 @@ foreach(PROGRAM dcm2xml dcmconv dcmcrle dcmdrle dcmdump dcmgpdir dcmodify dump2d
 endforeach()
 
 DCMTK_TARGET_LINK_MODULES(dcmftest ofstd)
-DCMTK_TARGET_LINK_LIBRARIES(xml2dcm ${LIBXML_LIBS})
 DCMTK_TARGET_LINK_MODULES(img2dcm i2d dcmdata)
index 5ea5d2d37c7dae04f962ed1b6c88f741066622ff..18a504782df7eea1668b84bf506438fd2f8992d6 100644 (file)
@@ -174,7 +174,6 @@ dcm2json.o: dcm2json.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofexit.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcm2pdf.o: dcm2pdf.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -182,6 +181,7 @@ dcm2pdf.o: dcm2pdf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -350,7 +350,6 @@ dcm2xml.o: dcm2xml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofexit.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -358,6 +357,7 @@ dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -439,7 +439,6 @@ dcmconv.o: dcmconv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcostrmz.h ../include/dcmtk/dcmdata/dcistrmz.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcmcrle.o: dcmcrle.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -447,6 +446,7 @@ dcmcrle.o: dcmcrle.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -527,7 +527,6 @@ dcmcrle.o: dcmcrle.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofexit.h \
  ../include/dcmtk/dcmdata/dcrleerg.h
 dcmdrle.o: dcmdrle.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -535,6 +534,7 @@ dcmdrle.o: dcmdrle.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -616,6 +616,7 @@ dcmdrle.o: dcmdrle.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcrledrg.h
 dcmdump.o: dcmdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dctk.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -623,7 +624,6 @@ dcmdump.o: dcmdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -704,13 +704,13 @@ dcmdump.o: dcmdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcistrmz.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcmftest.o: dcmftest.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcmetinf.h ../include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
@@ -898,13 +898,13 @@ dcmodify.o: dcmodify.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
  ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h
 dump2dcm.o: dump2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -989,9 +989,9 @@ img2dcm.o: img2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
@@ -1047,12 +1047,14 @@ img2dcm.o: img2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/libi2d/i2define.h \
  ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \
  ../include/dcmtk/dcmdata/dcpixel.h ../include/dcmtk/dcmdata/dcvrpobw.h \
- ../include/dcmtk/dcmdata/dcvrobow.h \
+ ../include/dcmtk/dcmdata/dcvrobow.h ../include/dcmtk/dcmdata/dcofsetl.h \
  ../include/dcmtk/dcmdata/libi2d/i2djpgs.h \
  ../include/dcmtk/dcmdata/libi2d/i2dbmps.h \
  ../include/dcmtk/dcmdata/libi2d/i2dplsc.h \
  ../include/dcmtk/dcmdata/libi2d/i2dplvlp.h \
- ../include/dcmtk/dcmdata/libi2d/i2dplnsc.h
+ ../include/dcmtk/dcmdata/libi2d/i2dplnsc.h \
+ ../include/dcmtk/dcmdata/libi2d/i2dplop.h \
+ ../include/dcmtk/dcmdata/xml2dcm.h
 mdfconen.o: mdfconen.cc ../../config/include/dcmtk/config/osconfig.h \
  mdfconen.h ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -1485,4 +1487,4 @@ xml2dcm.o: xml2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofexit.h \
- ../include/dcmtk/dcmdata/dcostrmz.h
+ ../include/dcmtk/dcmdata/dcostrmz.h ../include/dcmtk/dcmdata/xml2dcm.h
index 2a4b50b423b86bfde35588adc416c6e029e0628c..af3286e83494e9dda52e68c474ac2f842d00e45a 100644 (file)
@@ -57,7 +57,7 @@ dcm2xml: dcm2xml.o
        $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 xml2dcm: xml2dcm.o
-       $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(XMLLIBS) $(LOCALLIBS) $(LIBS)
+       $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(XMLLIBS) $(LIBS)
 
 dcmodify: dcmodify.o mdfconen.o mdfdsman.o
        $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o mdfconen.o mdfdsman.o $(LOCALLIBS) $(LIBS)
@@ -75,7 +75,7 @@ dcm2pdf: dcm2pdf.o
        $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
 
 img2dcm: img2dcm.o
-       $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LIBI2D) $(LOCALLIBS) $(LIBS)
+       $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LIBI2D) $(LOCALLIBS) $(XMLLIBS) $(LIBS)
 
 dcm2json: dcm2json.o
        $(CXX) $(CXXFLAGS) $(LIBDIRS) $(LDFLAGS) -o $@ $@.o $(LOCALLIBS) $(LIBS)
index db97e15ebd13f18ce744a1b027ca2272aaad3530..fdce52716318935b8cb977a80bc3cf1d19877a11 100644 (file)
@@ -1,6 +1,6 @@
 /*
 *
-*  Copyright (C) 2016-2020, OFFIS e.V.
+*  Copyright (C) 2016-2021, OFFIS e.V.
 *  All rights reserved.  See COPYRIGHT file for details.
 *
 *  This software and supporting documentation were developed by
@@ -239,8 +239,24 @@ int main(int argc, char *argv[])
             OFString csetString;
             if (dset->findAndGetOFStringArray(DCM_SpecificCharacterSet, csetString).good())
             {
-                if (csetString.compare("ISO_IR 192") != 0 && csetString.compare("ISO_IR 6") != 0)
+                if (csetString.compare("ISO_IR 6") == 0)
                 {
+                    /* SpecificCharacterSet indicates ASCII without extended characters.
+                     * If this is true, no conversion is necessary. Check for extended characters.
+                     */
+                    if (dset->containsExtendedCharacters(OFFalse /*checkAllStrings*/))
+                    {
+                        OFLOG_FATAL(dcm2jsonLogger, "dataset contains extended characters but SpecificCharacterSet (0008,0005) is 'ISO_IR 6'");
+                        result = EXITCODE_CANNOT_CONVERT_TO_UNICODE;
+                    }
+                }
+                else if (csetString.compare("ISO_IR 192") == 0)
+                {
+                    /* DICOM dataset is already in UTF-8, no conversion necessary */
+                }
+                else
+                {
+                    /* we have a character set other than ASCII or UTF-8. Perform conversion. */
 #ifdef DCMTK_ENABLE_CHARSET_CONVERSION
                     /* convert all DICOM strings to UTF-8 */
                     OFLOG_INFO(dcm2jsonLogger, "converting all element values that are affected by SpecificCharacterSet (0008,0005) to UTF-8");
@@ -256,6 +272,16 @@ int main(int argc, char *argv[])
 #endif
                 }
             }
+            else
+            {
+              /* SpecificCharacterSet not present */
+              if (dset->containsExtendedCharacters(OFFalse /*checkAllStrings*/))
+              {
+                  OFLOG_FATAL(dcm2jsonLogger, "dataset contains extended characters but no SpecificCharacterSet (0008,0005)");
+                  result = EXITCODE_CANNOT_CONVERT_TO_UNICODE;
+              }
+            }
+
             if (result == 0)
             {
                 /* if second parameter is present, it is treated as the output filename ("stdout" otherwise) */
index 67453aa50d969ff54f94114ae3cd4aef43247394..d7fcc09c582d90391581c2a6776b09abfc4613e6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2019, OFFIS e.V.
+ *  Copyright (C) 2007-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>       /* for O_RDONLY */
index 825abc60508e2666933442bd2ccdb5b6a97ef8b7..63ede4ad9f783cc8abf3f6dd3db6fd3612ef6b1b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2019, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -534,11 +534,16 @@ int main(int argc, char *argv[])
 #endif
             if (result == 0)
             {
-                /* if second parameter is present, it is treated as the output filename ("stdout" otherwise) */
+                /* if second parameter is present, it is treated as the output filename,
+                 * unless it is "-". If the name is absent or equal to "-", write to stdout */
+                const char *ofname = NULL;
                 if (cmd.getParamCount() == 2)
                 {
-                    const char *ofname = NULL;
                     cmd.getParam(2, ofname);
+                }
+
+                if (ofname && (strcmp(ofname, "-") != 0))
+                {
                     STD_NAMESPACE ofstream stream(ofname);
                     if (stream.good())
                     {
index 0930cdab025d5567ce0816228a79537a616a122b..3eec487067da6c0ce8d5c1ba5fea171d529c0a98 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
index 0d773dbd7c9d27f07bfe9450bf05560b7e8eb257..b79087122a2f5364ac0d21fa532951df09bd97db 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2018, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
index 52086ff1001d783b1083399088dbd7a093e78bc3..1405587e2b380f8e1b8f9bab515b4bdb7e398aa6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2017, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
index cf751eb755f6b8cdfb6c2f8f4d2c16cfb44f0ce8..949c9c9c951c8f0e3296a2651e7a570022d2636c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcuid.h"      /* for dcmtk version name */
 #include "dcmtk/dcmdata/dcistrmz.h"   /* for dcmZlibExpectRFC1950Encoding */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef WITH_ZLIB
 #include <zlib.h>                     /* for zlibVersion() */
 #endif
index b477122663b8d8f35907f9d55c8ac6b50f375097..168ecfb83435034cae0f79854ac6802069b66897 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2012, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_LIBC
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dcmetinf.h"
 #include "dcmtk/ofstd/ofconapp.h"
 #include "dcmtk/dcmdata/dcuid.h"    /* for dcmtk version name */
index 81e6cdf976d64dcf0839ad56a85afa5d6a4ba3fa..522475a1c4b40fbf60780e9150149d0442ef6136 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 // if defined, use createValueFromTempFile() for large binary data files
 //#define EXPERIMENTAL_READ_FROM_FILE
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
index 141e05115a174991661aa9ccd815d7a1c1222394..15d9e54ef2753cddc027faa1d8681658b486a3a0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2020, OFFIS e.V.
+ *  Copyright (C) 2007-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -32,6 +32,8 @@
 #include "dcmtk/dcmdata/libi2d/i2dplsc.h"
 #include "dcmtk/dcmdata/libi2d/i2dplvlp.h"
 #include "dcmtk/dcmdata/libi2d/i2dplnsc.h"
+#include "dcmtk/dcmdata/libi2d/i2dplop.h"
+#include "dcmtk/dcmdata/xml2dcm.h"
 
 #define OFFIS_CONSOLE_APPLICATION "img2dcm"
 static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" OFFIS_DCMTK_VERSION " " OFFIS_DCMTK_RELEASEDATE " $";
@@ -39,22 +41,56 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v" OFFIS_DCMTK_VERS
 #define SHORTCOL 4
 #define LONGCOL 21
 
+enum InputFormat
+{
+  InputFormatJPEG,
+  InputFormatBMP
+};
+
 static OFLogger img2dcmLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APPLICATION);
 
-static OFCondition evaluateFromFileOptions(OFCommandLine& cmd,
-                                           Image2Dcm& converter)
+static OFCondition evaluateFromFileOptions(
+#ifdef WITH_LIBXML
+  OFConsoleApplication& app,
+#else
+  OFConsoleApplication& /* app */,
+#endif
+  OFCommandLine& cmd,
+  Image2Dcm& converter)
 {
   OFCondition cond;
+#ifdef WITH_LIBXML
+  OFBool dataset_from = OFFalse;
+#endif
+
   // Parse command line options dealing with DICOM file import
   if ( cmd.findOption("--dataset-from") )
   {
+#ifdef WITH_LIBXML
+    dataset_from = OFTrue;
+#endif
+    OFString tempStr;
+    OFCommandLine::E_ValueStatus valStatus;
+    valStatus = cmd.getValue(tempStr);
+    if (valStatus != OFCommandLine::VS_Normal)
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to read value of --dataset-from option");
+    converter.setTemplateFile(tempStr);
+    converter.setTemplateFileIsXML(OFFalse);
+  }
+
+#ifdef WITH_LIBXML
+  if ( cmd.findOption("--dataset-from-xml") )
+  {
+    app.checkConflict("--dataset-from-xml", "--dataset-from", dataset_from);
     OFString tempStr;
     OFCommandLine::E_ValueStatus valStatus;
     valStatus = cmd.getValue(tempStr);
     if (valStatus != OFCommandLine::VS_Normal)
       return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to read value of --dataset-from option");
     converter.setTemplateFile(tempStr);
+    converter.setTemplateFileIsXML(OFTrue);
   }
+#endif
 
   if (cmd.findOption("--study-from"))
   {
@@ -86,7 +122,7 @@ static OFCondition evaluateFromFileOptions(OFCommandLine& cmd,
 
 static void addCmdLineOptions(OFCommandLine& cmd)
 {
-  cmd.addParam("imgfile-in",  "image input filename");
+  cmd.addParam("imgfile-in",  "image input filename", OFCmdParam::PM_MultiMandatory);
   cmd.addParam("dcmfile-out", "DICOM output filename");
 
   cmd.addGroup("general options:", LONGCOL, SHORTCOL + 2);
@@ -96,10 +132,14 @@ static void addCmdLineOptions(OFCommandLine& cmd)
 
   cmd.addGroup("input options:", LONGCOL, SHORTCOL + 2);
     cmd.addSubGroup("general:");
-      cmd.addOption("--input-format",        "-i",   1, "[i]nput file format: string", "supported formats: JPEG (default), BMP");
+      cmd.addOption("--input-format",        "-i",   1, "[i]nput file format: string",
+                                                        "supported formats: JPEG (default), BMP");
       cmd.addOption("--dataset-from",        "-df",  1, "[f]ilename: string",
                                                         "use dataset from DICOM file f");
-
+#ifdef WITH_LIBXML
+      cmd.addOption("--dataset-from-xml",    "-dx",  1, "[f]ilename: string",
+                                                        "use dataset from XML file f");
+#endif
       cmd.addOption("--study-from",          "-stf", 1, "[f]ilename: string",
                                                         "read patient/study from DICOM file f");
       cmd.addOption("--series-from",         "-sef", 1, "[f]ilename: string",
@@ -110,6 +150,12 @@ static void addCmdLineOptions(OFCommandLine& cmd)
       cmd.addOption("--disable-ext",         "-de",     "disable support for extended sequential JPEG");
       cmd.addOption("--insist-on-jfif",      "-jf",     "insist on JFIF header");
       cmd.addOption("--keep-appn",           "-ka",     "keep APPn sections (except JFIF)");
+      cmd.addOption("--remove-com",          "-rc",     "remove COM segment");
+#ifdef WITH_LIBXML
+    cmd.addSubGroup("XML validation:");
+      cmd.addOption("--validate-document",   "+Vd",     "validate XML document against DTD");
+      cmd.addOption("--check-namespace",     "+Vn",     "check XML namespace in document root");
+#endif
 
   cmd.addGroup("processing options:", LONGCOL, SHORTCOL + 2);
     cmd.addSubGroup("attribute checking:");
@@ -119,9 +165,9 @@ static void addCmdLineOptions(OFCommandLine& cmd)
       cmd.addOption("--no-type2-insert",     "-i2",     "do not insert missing type 2 attributes \n(only with --do-checks)");
       cmd.addOption("--invent-type1",        "+i1",     "invent missing type 1 attributes (default)\n(only with --do-checks)");
       cmd.addOption("--no-type1-invent",     "-i1",     "do not invent missing type 1 attributes\n(only with --do-checks)");
-    cmd.addSubGroup("character set:");
-      cmd.addOption("--latin1",              "+l1",     "set latin-1 as standard character set (default)");
-      cmd.addOption("--no-latin1",           "-l1",     "keep 7-bit ASCII as standard character set");
+    cmd.addSubGroup("character set conversion of study/series file:");
+      cmd.addOption("--transliterate",       "-Ct",     "try to approximate characters that cannot be\nrepresented through similar looking characters");
+      cmd.addOption("--discard-illegal",     "-Cd",     "discard characters that cannot be represented\nin destination character set");
     cmd.addSubGroup("other processing options:");
       cmd.addOption("--key",                 "-k",   1, "[k]ey: gggg,eeee=\"str\", path or dict. name=\"str\"",
                                                         "add further attribute");
@@ -131,6 +177,7 @@ static void addCmdLineOptions(OFCommandLine& cmd)
       cmd.addOption("--sec-capture",         "-sc",     "write Secondary Capture SOP class (default)");
       cmd.addOption("--new-sc",              "-nsc",    "write new Secondary Capture SOP classes");
       cmd.addOption("--vl-photo",            "-vlp",    "write Visible Light Photographic SOP class");
+      cmd.addOption("--oph-photo",           "-oph",    "write Ophthalmic Photography SOP classes");
 
     cmd.addSubGroup("output file format:");
       cmd.addOption("--write-file",          "+F",      "write file format (default)");
@@ -149,25 +196,23 @@ static void addCmdLineOptions(OFCommandLine& cmd)
 }
 
 
-static OFCondition startConversion(OFCommandLine& cmd,
-                                   int argc,
-                                   char *argv[])
+static I2DImgSource *createInputPlugin(InputFormat ifrm)
 {
-  // Parse command line and exclusive options
-  prepareCmdLineArgs(argc, argv, OFFIS_CONSOLE_APPLICATION);
-  OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION, "Convert standard image formats into DICOM format", rcsid);
-  if (app.parseCommandLine(cmd, argc, argv))
+  switch (ifrm)
   {
-    /* check exclusive options first */
-    if (cmd.hasExclusiveOption())
-    {
-      if (cmd.findOption("--version"))
-      {
-        app.printHeader(OFTrue /*print host identifier*/);
-        exit(0);
-      }
-    }
+    case InputFormatBMP:
+      return new I2DBmpSource();
+    case InputFormatJPEG:
+    default:
+      return new I2DJpegSource();
   }
+}
+
+
+static OFCondition startConversion(
+  OFConsoleApplication& app,
+  OFCommandLine& cmd)
+{
 
   /* print resource identifier */
   OFLOG_DEBUG(img2dcmLogger, rcsid << OFendl);
@@ -194,72 +239,83 @@ static OFCondition startConversion(OFCommandLine& cmd,
   OFList<OFString> overrideKeys;
   // The transfer syntax proposed to be written by output plugin
   E_TransferSyntax writeXfer;
+  // the input file format
+  InputFormat inForm = InputFormatJPEG;
 
   // Parse rest of command line options
   OFLog::configureFromCommandLine(cmd, app);
 
-  OFString pixDataFile, outputFile, tempStr;
-  cmd.getParam(1, tempStr);
-
-  if (tempStr.empty())
+  // create list of input files
+  OFString paramValue;
+  OFString outputFile;
+  OFList<OFString> inputFiles;
+  const int paramCount = cmd.getParamCount();
+  for (int i = 1; i < paramCount; i++)
   {
-    OFLOG_ERROR(img2dcmLogger, "No image input filename specified");
-    return EC_IllegalCall;
+    cmd.getParam(i, paramValue);
+    inputFiles.push_back(paramValue);
   }
-  else
-    pixDataFile = tempStr;
 
-  cmd.getParam(2, tempStr);
-  if (tempStr.empty())
-  {
-    OFLOG_ERROR(img2dcmLogger, "No DICOM output filename specified");
-    return EC_IllegalCall;
-  }
-  else
-    outputFile = tempStr;
+  // get output filename
+  cmd.getParam(paramCount, outputFile);
 
+  OFString tempStr;
   if (cmd.findOption("--input-format"))
   {
     app.checkValue(cmd.getValue(tempStr));
     if (tempStr == "JPEG")
     {
-      inputPlug = new I2DJpegSource();
+      inForm = InputFormatJPEG;
     }
     else if (tempStr == "BMP")
     {
-      inputPlug = new I2DBmpSource();
+      inForm = InputFormatBMP;
     }
     else
     {
       return makeOFCondition(OFM_dcmdata, 18, OF_error, "No plugin for selected input format available");
     }
-    if (!inputPlug)
-    {
-      return EC_MemoryExhausted;
-    }
-  }
-  else // default is JPEG
-  {
-    inputPlug = new I2DJpegSource();
   }
+
+  inputPlug = createInputPlugin(inForm);
   OFLOG_INFO(img2dcmLogger, OFFIS_CONSOLE_APPLICATION ": Instantiated input plugin: " << inputPlug->inputFormat());
 
- // Find out which plugin to use
+ // Find out which output plugin to use
   cmd.beginOptionBlock();
   if (cmd.findOption("--sec-capture"))
+  {
     outPlug = new I2DOutputPlugSC();
+  }
+  if (cmd.findOption("--new-sc"))
+  {
+    outPlug = new I2DOutputPlugNewSC();
+  }
   if (cmd.findOption("--vl-photo"))
   {
     outPlug = new I2DOutputPlugVLP();
   }
-  if (cmd.findOption("--new-sc"))
-    outPlug = new I2DOutputPlugNewSC();
+  if (cmd.findOption("--oph-photo"))
+  {
+    outPlug = new I2DOutputPlugOphthalmicPhotography();
+  }
+
   cmd.endOptionBlock();
   if (!outPlug) // default is the old Secondary Capture object
     outPlug = new I2DOutputPlugSC();
   if (outPlug == NULL) return EC_MemoryExhausted;
   OFLOG_INFO(img2dcmLogger, OFFIS_CONSOLE_APPLICATION ": Instantiated output plugin: " << outPlug->ident());
 
+  if (inputFiles.size() > 1)
+  {
+    // check if the output format supports multiframe
+    if (! outPlug->supportsMultiframe())
+    {
+      OFLOG_ERROR(img2dcmLogger, outPlug->ident() << " does not support multiframe images");
+      delete outPlug;
+      return EC_SOPClassMismatch;
+    }
+  }
+
   cmd.beginOptionBlock();
   if (cmd.findOption("--write-file"))    writeMode = EWM_fileformat;
   if (cmd.findOption("--write-dataset")) writeMode = EWM_dataset;
@@ -303,15 +359,12 @@ static OFCondition startConversion(OFCommandLine& cmd,
   }
   i2d.setOverrideKeys(overrideKeys);
 
-  // Test for ISO Latin 1 option
-  OFBool insertLatin1 = OFTrue;
-  cmd.beginOptionBlock();
-  if (cmd.findOption("--latin1"))
-    insertLatin1 = OFTrue;
-  if (cmd.findOption("--no-latin1"))
-    insertLatin1 = OFFalse;
-  cmd.endOptionBlock();
-  i2d.setISOLatin1(insertLatin1);
+  size_t conversionFlags = 0;
+  if (cmd.findOption("--transliterate"))
+    conversionFlags |= DCMTypes::CF_transliterate;
+  if (cmd.findOption("--discard-illegal"))
+    conversionFlags |= DCMTypes::CF_discardIllegal;
+  i2d.setConversionFlags(conversionFlags);
 
   // evaluate validity checking options
   OFBool insertType2 = OFTrue;
@@ -340,9 +393,25 @@ static OFCondition startConversion(OFCommandLine& cmd,
   i2d.setValidityChecking(doChecks, insertType2, inventType1);
   outPlug->setValidityChecking(doChecks, insertType2, inventType1);
 
+#ifdef WITH_LIBXML
+  // evaluate XML parsing options
+  if (cmd.findOption("--validate-document"))
+  {
+    app.checkDependence("--validate-document", "--dataset-from-xml", cmd.findOption("--dataset-from-xml"));
+    i2d.setXMLvalidation(OFTrue);
+  } else i2d.setXMLvalidation(OFFalse);
+
+  if (cmd.findOption("--check-namespace"))
+  {
+    app.checkDependence("--check-namespace", "--dataset-from-xml", cmd.findOption("--dataset-from-xml"));
+    i2d.setXMLnamespaceCheck(OFTrue);
+  }
+  else i2d.setXMLnamespaceCheck(OFFalse);
+#endif
+
   // evaluate --xxx-from options and transfer syntax options
   OFCondition cond;
-  cond = evaluateFromFileOptions(cmd, i2d);
+  cond = evaluateFromFileOptions(app, cmd, i2d);
   if (cond.bad())
   {
     delete outPlug; outPlug = NULL;
@@ -367,8 +436,9 @@ static OFCondition startConversion(OFCommandLine& cmd,
       jpgSource->setInsistOnJFIF(OFTrue);
     if ( cmd.findOption("--keep-appn") )
       jpgSource->setKeepAPPn(OFTrue);
+    if ( cmd.findOption("--remove-com") )
+      jpgSource->setKeepCOM(OFFalse);
   }
-  inputPlug->setImageFile(pixDataFile);
 
   /* make sure data dictionary is loaded */
   if (!dcmDataDict.isDictionaryLoaded())
@@ -379,14 +449,36 @@ static OFCondition startConversion(OFCommandLine& cmd,
 
   DcmDataset *resultObject = NULL;
   OFLOG_INFO(img2dcmLogger, OFFIS_CONSOLE_APPLICATION ": Starting image conversion");
-  cond = i2d.convert(inputPlug, outPlug, resultObject, writeXfer);
+
+  OFListIterator(OFString) if_iter = inputFiles.begin();
+  OFListIterator(OFString) if_last = inputFiles.end();
+
+  inputPlug->setImageFile(*if_iter++); // we are guaranteed to have at least one input file
+  cond = i2d.convertFirstFrame(inputPlug, outPlug, inputFiles.size(), resultObject, writeXfer);
+  size_t frameNum = 1;
+
+  // iterate over all extra input filenames
+  while (cond.good() && (if_iter != if_last))
+  {
+    // create a new input format plugin for each file to be processed
+    delete inputPlug;
+    inputPlug = createInputPlugin(inForm);
+    inputPlug->setImageFile(*if_iter++);
+    cond = i2d.convertNextFrame(inputPlug, ++frameNum);
+  }
+
+  // update offset table if image type is encapsulated
+  if (cond.good()) cond = i2d.updateOffsetTable();
+
+  // update attributes related to lossy compression
+  if (cond.good()) cond = i2d.updateLossyCompressionInfo(inputPlug, inputFiles.size(), resultObject);
 
   // Save
   if (cond.good())
   {
     OFLOG_INFO(img2dcmLogger, OFFIS_CONSOLE_APPLICATION ": Saving output DICOM to file " << outputFile);
     DcmFileFormat dcmff(resultObject);
-    cond = dcmff.saveFile(outputFile.c_str(), writeXfer, lengthEnc,  grpLengthEnc, padEnc, OFstatic_cast(Uint32, filepad), OFstatic_cast(Uint32, itempad), writeMode);
+    cond = dcmff.saveFile(outputFile, writeXfer, lengthEnc,  grpLengthEnc, padEnc, OFstatic_cast(Uint32, filepad), OFstatic_cast(Uint32, itempad), writeMode);
   }
 
   // Cleanup and return
@@ -400,21 +492,55 @@ static OFCondition startConversion(OFCommandLine& cmd,
 
 int main(int argc, char *argv[])
 {
-
-  // variables for command line
-  OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION, "Convert image file to DICOM", rcsid);
+  // Parse command line and exclusive options
+  OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION, "Convert standard image formats into DICOM format", rcsid);
   OFCommandLine cmd;
 
   cmd.setOptionColumns(LONGCOL, SHORTCOL);
   cmd.setParamColumn(LONGCOL + SHORTCOL + 4);
   addCmdLineOptions(cmd);
 
-  OFCondition cond = startConversion(cmd, argc, argv);
+  prepareCmdLineArgs(argc, argv, OFFIS_CONSOLE_APPLICATION);
+  if (app.parseCommandLine(cmd, argc, argv))
+  {
+    /* check exclusive options first */
+    if (cmd.hasExclusiveOption())
+    {
+      if (cmd.findOption("--version"))
+      {
+        app.printHeader(OFTrue /*print host identifier*/);
+
+#ifdef WITH_LIBXML
+        COUT << OFendl << "External libraries used:" << OFendl;
+        COUT << "- LIBXML, Version " << LIBXML_DOTTED_VERSION << OFendl;
+#if defined(LIBXML_ICONV_ENABLED) && defined(LIBXML_ZLIB_ENABLED)
+       COUT << "  with built-in LIBICONV and ZLIB support" << OFendl;
+#elif defined(LIBXML_ICONV_ENABLED)
+        COUT << "  with built-in LIBICONV support" << OFendl;
+#elif defined(LIBXML_ZLIB_ENABLED)
+       COUT << "  with built-in ZLIB support" << OFendl;
+#endif
+#endif
+        exit(0);
+      }
+    }
+  }
+
+#ifdef WITH_LIBXML
+  DcmXMLParseHelper::initLibrary(); // initialize XML parser
+#endif
+
+  int result = 0;
+  OFCondition cond = startConversion(app, cmd);
   if (cond.bad())
   {
     OFLOG_FATAL(img2dcmLogger, "Error converting file: " << cond.text());
-    return 1;
+    result = 1;
   }
 
-  return 0;
+#ifdef WITH_LIBXML
+    DcmXMLParseHelper::cleanupLibrary(); // clean up XML library before quitting
+#endif
+
+  return result;
 }
index 9c089eb5978bf64a577509afa00d9eb78e8e33e7..84497aaec704488df4da594f34584368e4cb233a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2019, OFFIS e.V.
+ *  Copyright (C) 2003-2020, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -541,7 +541,7 @@ int MdfConsoleEngine::startProvidingService()
                 {
                     OFLOG_ERROR(dcmodifyLogger, "couldn't save file: " << result.text());
                     errors++;
-                    if (!no_backup_option && !was_created)
+                    if (!no_backup_option && !was_created && strcmp(filename, "-"))
                     {
                         result = restoreFile(filename);
                         if (result.bad())
@@ -553,7 +553,7 @@ int MdfConsoleEngine::startProvidingService()
                 }
             }
             // errors occurred and user doesn't want to ignore them:
-            else if (!no_backup_option && !was_created)
+            else if (!no_backup_option && !was_created && strcmp(filename, "-"))
             {
                 result = restoreFile(filename);
                 if (result.bad())
@@ -589,7 +589,7 @@ OFCondition MdfConsoleEngine::loadFile(const char *filename)
     // load file into dataset manager
     was_created = !OFStandard::fileExists(filename);
     result = ds_man->loadFile(filename, read_mode_option, input_xfer_option, create_if_necessary);
-    if (result.good() && !no_backup_option && !was_created)
+    if (result.good() && !no_backup_option && !was_created && strcmp(filename, "-"))
         result = backupFile(filename);
     return result;
 }
index e5a6ea1137fa170ed35f27c9a29cb21147ffcbd6..891f086d7a0a5dbccb5545c8773c8a9caec9bc7d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2020, OFFIS e.V.
+ *  Copyright (C) 2003-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
  *
  */
 
+#include "dcmtk/config/osconfig.h" // make sure OS specific configuration is included first
 
-#include "dcmtk/config/osconfig.h"   // make sure OS specific configuration is included first
-
-#include "mdfdsman.h"
-#include "dcmtk/ofstd/ofstd.h"
-#include "dcmtk/dcmdata/dctk.h"
+#include "dcmtk/dcmdata/dcistrmf.h" /* for class DcmInputFileStream */
 #include "dcmtk/dcmdata/dcpath.h"
-#include "dcmtk/dcmdata/dcistrmf.h"  /* for class DcmInputFileStream */
-
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
+#include "dcmtk/dcmdata/dctk.h"
+#include "dcmtk/ofstd/ofstd.h"
+#include "mdfdsman.h"
 
 static OFLogger mdfdsmanLogger = OFLog::getLogger("dcmtk.dcmdata.mdfdsman");
 
 MdfDatasetManager::MdfDatasetManager()
-: current_file(""),
-  dfile(NULL),
-  dset(NULL),
-  ignore_un_modifies(OFFalse)
+    : current_file("")
+    , dfile(NULL)
+    , dset(NULL)
+    , ignore_un_modifies(OFFalse)
 {
 }
 
-
-OFCondition MdfDatasetManager::loadFile(const char *file_name,
+OFCondition MdfDatasetManager::loadFile(const char* file_name,
                                         const E_FileReadMode readMode,
                                         const E_TransferSyntax xfer,
                                         const OFBool createIfNecessary)
@@ -52,24 +46,24 @@ OFCondition MdfDatasetManager::loadFile(const char *file_name,
     // delete old dfile and free memory and reset current_file
     delete dfile;
     current_file = "";
-    dfile = new DcmFileFormat();
-    dset = dfile->getDataset();
+    dfile        = new DcmFileFormat();
+    dset         = dfile->getDataset();
 
     // load file into dfile if it exists
     OFLOG_INFO(mdfdsmanLogger, "Loading file into dataset manager: " << file_name);
-    if (OFStandard::fileExists(file_name))
+    if (OFStandard::fileExists(file_name) || (strcmp(file_name, "-") == 0))
     {
-      cond = dfile->loadFile(file_name, xfer, EGL_noChange, DCM_MaxReadLength, readMode);
+        cond = dfile->loadFile(file_name, xfer, EGL_noChange, DCM_MaxReadLength, readMode);
     }
     // if it does not already exist, check whether it should be created
     else if (createIfNecessary)
     {
-      OFLOG_DEBUG(mdfdsmanLogger, "File " << file_name << "does not exist, creating it as desired");
-      cond = dfile->saveFile(file_name, EXS_LittleEndianExplicit /* might change later */);
+        OFLOG_DEBUG(mdfdsmanLogger, "File " << file_name << "does not exist, creating it as desired");
+        cond = dfile->saveFile(file_name, EXS_LittleEndianExplicit /* might change later */);
     }
     // no file, we have an error
     else
-      cond = makeOFCondition(OFM_dcmdata, 22, OF_error,"No such file or directory");
+        cond = makeOFCondition(OFM_dcmdata, 22, OF_error, "No such file or directory");
 
     // if there are errors:
     if (cond.bad())
@@ -81,7 +75,7 @@ OFCondition MdfDatasetManager::loadFile(const char *file_name,
     {
         // get dataset from file
         OFLOG_INFO(mdfdsmanLogger, "Getting dataset from loaded file: " << file_name);
-        dset=dfile->getDataset();
+        dset = dfile->getDataset();
         /* load also pixeldata into memory:
          * Without this command pixeldata wouldn't be included into the file,
          * that's saved after modifying, because original filename was renamed
@@ -94,12 +88,11 @@ OFCondition MdfDatasetManager::loadFile(const char *file_name,
     return cond;
 }
 
-
 static DcmTagKey getTagKeyFromDictionary(OFString tag)
 {
-    DcmTagKey key(0xffff,0xffff);
+    DcmTagKey key(0xffff, 0xffff);
     const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock();
-    const DcmDictEntry *dicent = globalDataDict.findEntry(tag.c_str());
+    const DcmDictEntry* dicent              = globalDataDict.findEntry(tag.c_str());
     // successful lookup in dictionary -> translate to tag and return
     if (dicent)
     {
@@ -109,397 +102,425 @@ static DcmTagKey getTagKeyFromDictionary(OFString tag)
     return key;
 }
 
-
-static int readNextToken(const char *c, int& pos, DcmTagKey& key, Uint32& idx)
-{
-  OFString aString;
-  int lpos = pos;
-  int spos = 0;
-  if (c[lpos]=='\0') return -1; // EOF
-  if (c[lpos]=='.')
-  {
-    ++pos;
-    return 3; // period
-  }
-  // look for item index between []
-  if (c[lpos]=='[')
-  {
-    spos = ++lpos;
-    while ((c[lpos] >= '0')&&(c[lpos] <= '9')) ++lpos;
-    if (c[lpos] != ']') return 0; // parse error
-    unsigned long newindex = 0;
-    if (1 != sscanf(c+spos,"%lu", &newindex)) return 0; // parse error
-    idx = OFstatic_cast(Uint32, newindex);
-    pos = ++lpos;
-    return 2; // index
-  }
-  // look for tag between ()
-  if (c[lpos]=='(')
-  {
-    spos = ++lpos;
-    while ((c[lpos] != ')')&&(c[lpos] != '\0')) ++lpos;
-    if (c[lpos] != ')') return 0; // parse error
-    unsigned int group=0;
-    unsigned int elem=0;
-    if (2 != sscanf(c+spos,"%x,%x", &group, &elem)) return 0; // parse error
-    key = DcmTagKey(OFstatic_cast(Uint16, group),OFstatic_cast(Uint16, elem));
-    pos = ++lpos;
-    return 1; // tag key
-  }
-  // so far no tag and no item index found. So check if it's a dictionary name
-  spos = lpos;
-  while ( ((c[lpos] >= 'a')&&(c[lpos] <= 'z')) ||
-          ((c[lpos] >= 'A')&&(c[lpos] <= 'Z')) ||
-          ((c[lpos] >= '0')&&(c[lpos] <= '9'))) ++lpos;
-  aString.append(c + spos, (lpos-spos));
-  key=getTagKeyFromDictionary(aString);
-  // if key was found in dictionary, return 1 for tag key
-  if ( (key.getGroup()!=0xffff) && (key.getElement()!=0xffff) )
-  {
-    pos=lpos;
-    return 1; // tag key
-  }
-  // if no return command was processed this far, the token could not be parsed
-  return 0; // parse error
-}
-
-
-static DcmItem* getItemFromPath(DcmItem &dataset,
-                                const char *location,
-                                OFString &message)
+static int readNextToken(const char* c, int& pos, DcmTagKey& key, Uint32& idx)
 {
-  DcmTagKey key;
-  Uint32 idx = 0;
-  int pos = 0;
-  int token = 0;
-  int expected = 1; // first expected is a tagkey
-  OFBool finished = OFFalse;
-  DcmItem *result = &dataset;
-  DcmSequenceOfItems *sq = NULL;
-  DcmStack stack;
-  message.clear();
-  do
-  {
-    token = readNextToken(location, pos, key, idx);
-    if ((token != expected)&&(token != -1))
-    {
-      message=message + "parse error in path '" + location + "'";
-      return NULL;
-    }
-    if (token == -1)
+    OFString aString;
+    int lpos = pos;
+    int spos = 0;
+    if (c[lpos] == '\0')
+        return -1; // EOF
+    if (c[lpos] == '.')
     {
-      if (!finished)
-      {
-        message=message + "Error: path '" + location + "' incomplete";
-        return NULL;
-      }
-      return result;
+        ++pos;
+        return 3; // period
     }
-    if (token == 1)
+    // look for item index between []
+    if (c[lpos] == '[')
     {
-      // we have read a tag key
-      stack.clear();
-      if (EC_Normal != result->search(key, stack, ESM_fromHere, OFFalse))
-      {
-        message=message + "Error: attribute not found in dataset (path is '"
-            + location + "')";
-        return NULL;
-      }
-      if (stack.top()->ident() == EVR_SQ)
-      {
-        sq = OFstatic_cast(DcmSequenceOfItems *, stack.top());
-      } else {
-        message=message + "Error: attribute is not a sequence (path is '" + location + "')";
-        return NULL;
-      }
-      expected = 2;
-      finished = OFFalse;
+        spos = ++lpos;
+        while ((c[lpos] >= '0') && (c[lpos] <= '9'))
+            ++lpos;
+        if (c[lpos] != ']')
+            return 0; // parse error
+        unsigned long newindex = 0;
+        if (1 != sscanf(c + spos, "%lu", &newindex))
+            return 0; // parse error
+        idx = OFstatic_cast(Uint32, newindex);
+        pos = ++lpos;
+        return 2; // index
     }
-    else if (token == 2)
+    // look for tag between ()
+    if (c[lpos] == '(')
     {
-      // we have read an index
-      if (sq == NULL)
-      {
-        message=message + "Error: sequence not found in path '" + location +"'";
-        return NULL;
-      }
-      if (idx >= sq->card())
-      {
-        message=message + "Error: cannot allocate item in sequence (path is '" + location + "')";
-        return NULL;
-      }
-      result = sq->getItem(idx);
-      if (result == NULL)
-      {
-        message=message + "Error: item not found in path '" + location + "'";
-        return NULL;
-      }
-      expected = 3;
-      finished = OFTrue;
+        spos = ++lpos;
+        while ((c[lpos] != ')') && (c[lpos] != '\0'))
+            ++lpos;
+        if (c[lpos] != ')')
+            return 0; // parse error
+        unsigned int group = 0;
+        unsigned int elem  = 0;
+        if (2 != sscanf(c + spos, "%x,%x", &group, &elem))
+            return 0; // parse error
+        key = DcmTagKey(OFstatic_cast(Uint16, group), OFstatic_cast(Uint16, elem));
+        pos = ++lpos;
+        return 1; // tag key
     }
-    else if (token == 3)
+    // so far no tag and no item index found. So check if it's a dictionary name
+    spos = lpos;
+    while (((c[lpos] >= 'a') && (c[lpos] <= 'z')) || ((c[lpos] >= 'A') && (c[lpos] <= 'Z'))
+           || ((c[lpos] >= '0') && (c[lpos] <= '9')))
+        ++lpos;
+    aString.append(c + spos, (lpos - spos));
+    key = getTagKeyFromDictionary(aString);
+    // if key was found in dictionary, return 1 for tag key
+    if ((key.getGroup() != 0xffff) && (key.getElement() != 0xffff))
     {
-      // we have read a period
-      expected = 1;
-      finished = OFFalse;
+        pos = lpos;
+        return 1; // tag key
     }
-  } while (token > 0);
-  return NULL;
+    // if no return command was processed this far, the token could not be parsed
+    return 0; // parse error
 }
 
+static DcmItem* getItemFromPath(DcmItem& dataset, const char* location, OFString& message)
+{
+    DcmTagKey key;
+    Uint32 idx             = 0;
+    int pos                = 0;
+    int token              = 0;
+    int expected           = 1; // first expected is a tagkey
+    OFBool finished        = OFFalse;
+    DcmItem* result        = &dataset;
+    DcmSequenceOfItems* sq = NULL;
+    DcmStack stack;
+    message.clear();
+    do
+    {
+        token = readNextToken(location, pos, key, idx);
+        if ((token != expected) && (token != -1))
+        {
+            message = message + "parse error in path '" + location + "'";
+            return NULL;
+        }
+        if (token == -1)
+        {
+            if (!finished)
+            {
+                message = message + "Error: path '" + location + "' incomplete";
+                return NULL;
+            }
+            return result;
+        }
+        if (token == 1)
+        {
+            // we have read a tag key
+            stack.clear();
+            if (EC_Normal != result->search(key, stack, ESM_fromHere, OFFalse))
+            {
+                message = message + "Error: attribute not found in dataset (path is '" + location + "')";
+                return NULL;
+            }
+            if (stack.top()->ident() == EVR_SQ)
+            {
+                sq = OFstatic_cast(DcmSequenceOfItems*, stack.top());
+            }
+            else
+            {
+                message = message + "Error: attribute is not a sequence (path is '" + location + "')";
+                return NULL;
+            }
+            expected = 2;
+            finished = OFFalse;
+        }
+        else if (token == 2)
+        {
+            // we have read an index
+            if (sq == NULL)
+            {
+                message = message + "Error: sequence not found in path '" + location + "'";
+                return NULL;
+            }
+            if (idx >= sq->card())
+            {
+                message = message + "Error: cannot allocate item in sequence (path is '" + location + "')";
+                return NULL;
+            }
+            result = sq->getItem(idx);
+            if (result == NULL)
+            {
+                message = message + "Error: item not found in path '" + location + "'";
+                return NULL;
+            }
+            expected = 3;
+            finished = OFTrue;
+        }
+        else if (token == 3)
+        {
+            // we have read a period
+            expected = 1;
+            finished = OFFalse;
+        }
+    } while (token > 0);
+    return NULL;
+}
 
-static OFCondition splitTagPath(OFString &tag_path,
-                                DcmTagKey &key)
+static OFCondition splitTagPath(OFString& tag_path, DcmTagKey& key)
 {
     OFString target_tag;
-    unsigned int group,elem;
-    size_t lpos,rpos;
-    rpos=tag_path.size()-1;
-    lpos=rpos;
-    if (tag_path[rpos]==')')
+    unsigned int group, elem;
+    size_t lpos, rpos;
+    rpos = tag_path.size() - 1;
+    lpos = rpos;
+    if (tag_path[rpos] == ')')
     {
         // get opening '(' of target tag; if its not found -> return error
-        while ( (tag_path[lpos]!='(') && (lpos>0) ) --lpos;
-        if (tag_path[lpos]!='(')
-            return makeOFCondition(OFM_dcmdata,22,OF_error,"Invalid tag path!");
+        while ((tag_path[lpos] != '(') && (lpos > 0))
+            --lpos;
+        if (tag_path[lpos] != '(')
+            return makeOFCondition(OFM_dcmdata, 22, OF_error, "Invalid tag path!");
         // now lpos and rpos "point" to braces of target tag
         // copy target tag from tag path
-        target_tag=tag_path.substr(lpos,rpos-lpos+1);
+        target_tag = tag_path.substr(lpos, rpos - lpos + 1);
         // delete target tag from path (inclusive trailing '.')
-        tag_path.erase(lpos,tag_path.length()-lpos);
+        tag_path.erase(lpos, tag_path.length() - lpos);
         // if there's a tag path left, remove the '.', too
-        if ( !tag_path.empty() && (tag_path[tag_path.length()-1]=='.'))
-            tag_path.erase(tag_path.length()-1,1);
+        if (!tag_path.empty() && (tag_path[tag_path.length() - 1] == '.'))
+            tag_path.erase(tag_path.length() - 1, 1);
         // parse target_tag into DcmTagKey
-        if (2 != sscanf(target_tag.c_str(),"(%x,%x)", &group, &elem))
-            return makeOFCondition(OFM_dcmdata,22,OF_error,"Invalid target tag!");
-        key = DcmTagKey(OFstatic_cast(Uint16, group),OFstatic_cast(Uint16, elem));
+        if (2 != sscanf(target_tag.c_str(), "(%x,%x)", &group, &elem))
+            return makeOFCondition(OFM_dcmdata, 22, OF_error, "Invalid target tag!");
+        key = DcmTagKey(OFstatic_cast(Uint16, group), OFstatic_cast(Uint16, elem));
     }
     else
     // otherwise we could have a dictionary name
     {
-        while ( (lpos>0) && (((tag_path[lpos] >= 'a')&&(tag_path[lpos] <= 'z')) ||
-                ((tag_path[lpos] >= 'A')&&(tag_path[lpos] <= 'Z')) ||
-                ((tag_path[lpos] >= '0')&&(tag_path[lpos] <= '9')))
-              )  lpos--;
-        target_tag=tag_path.substr(lpos,rpos-lpos+1);
-        if (target_tag[0]=='.') target_tag.erase(0,1);
-        tag_path.erase(lpos,tag_path.length()-lpos);
-        key=getTagKeyFromDictionary(target_tag);
-        if ( (key.getGroup()==0xffff) && (key.getElement()==0xffff) )
+        while ((lpos > 0)
+               && (((tag_path[lpos] >= 'a') && (tag_path[lpos] <= 'z'))
+                   || ((tag_path[lpos] >= 'A') && (tag_path[lpos] <= 'Z'))
+                   || ((tag_path[lpos] >= '0') && (tag_path[lpos] <= '9'))))
+            lpos--;
+        target_tag = tag_path.substr(lpos, rpos - lpos + 1);
+        if (target_tag[0] == '.')
+            target_tag.erase(0, 1);
+        tag_path.erase(lpos, tag_path.length() - lpos);
+        key = getTagKeyFromDictionary(target_tag);
+        if ((key.getGroup() == 0xffff) && (key.getElement() == 0xffff))
         {
-            OFString message=target_tag;
+            OFString message = target_tag;
             message.append(" not found in dictionary!");
-            return makeOFCondition(OFM_dcmdata,22,OF_error,message.c_str());
+            return makeOFCondition(OFM_dcmdata, 22, OF_error, message.c_str());
         }
     }
     return EC_Normal;
 }
 
-
 OFCondition MdfDatasetManager::modifyOrInsertPath(OFString tag_path,
-                                                  const OFString &value,
+                                                  const OFStringvalue,
                                                   const OFBool only_modify,
                                                   const OFBool update_metaheader,
                                                   const OFBool ignore_missing_tags,
                                                   const OFBool no_reservation_checks)
 {
-  // if no file loaded: return an error
-  if (dfile == NULL)
-      return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!");
-
-  // find or create specified path
-  DcmPathProcessor proc;
-  proc.checkPrivateReservations(!no_reservation_checks);
-  OFCondition result = proc.findOrCreatePath(dset, tag_path, !only_modify /*create if desired*/);
-  // if desired, handle tag not found as being not an error
-  if ( (result == EC_TagNotFound) && only_modify && ignore_missing_tags )
-      return EC_Normal;
-  if (result.bad()) return result;
-  OFList<DcmPath*> resultPaths;
-  Uint32 numResultPaths = proc.getResults(resultPaths);
-  if (numResultPaths == 0) return EC_IllegalCall;
-
-  // general validity checking; must only be done for one result
-  OFListIterator(DcmPath*) resultPath = resultPaths.begin();
-  // verify that groups 0 (invalid) and 2 (meta header) were not used
-  if ( (*resultPath)->containsGroup(0) || (*resultPath)->containsGroup(2) )
-      return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot insert/modify tags with group 0000 or 0002!");
-  // also - according to the standard -  groups 1,3,5,7,FF are illegal
-  if ( (*resultPath)->containsGroup(1) || (*resultPath)->containsGroup(3) ||
-       (*resultPath)->containsGroup(5) || (*resultPath)->containsGroup(7) ||
-       (*resultPath)->containsGroup(0xffff) )
-      return makeOFCondition(OFM_dcmdata, 22, OF_error, "Groups 0001,0003,0005,0007,FFFF are illegal!");
-
-  DcmPathNode *lastElement = (*resultPath)->back();
-  if (lastElement == NULL) return EC_IllegalCall;
-  DcmObject *obj = lastElement->m_obj;
-  if (obj == NULL) return EC_IllegalCall;
-  // if object at the end is not a leaf, the insertion is completed (or must fail)
-  if (!obj->isLeaf())
-  {
-      // if user specified a value to be inserted into non-leaf element, return error
-      if (!value.empty())
-          return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot put value into non-leaf elements!");
-      // non-leaf elements (items/sequences) cannot just be modified
-      if (only_modify)
-         return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot modify non-leaf elements!");
-      // we have inserted an item/sequence at the end -> job completed
-      return EC_Normal;
-  }
-
-  // start modifying element value as desired
-  resultPath = resultPaths.begin();
-  while (resultPath != resultPaths.end())
-  {
-      lastElement = (*resultPath)->back();
-      if (lastElement == NULL) return EC_IllegalCall;
-      // if tag is already present, start modify operation
-      DcmElement *elem = OFstatic_cast(DcmElement*, lastElement->m_obj);
-      if (elem == NULL) return EC_IllegalCall;
-      result = startModify(elem, value);
-      if (result.bad()) return result;
-      if (update_metaheader)
-          deleteRelatedMetaheaderTag(elem->getTag());
-      resultPath++;
-  }
-  return EC_Normal;
-}
+    // if no file loaded: return an error
+    if (dfile == NULL)
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!");
+
+    // find or create specified path
+    DcmPathProcessor proc;
+    proc.checkPrivateReservations(!no_reservation_checks);
+    OFCondition result = proc.findOrCreatePath(dset, tag_path, !only_modify /*create if desired*/);
+    // if desired, handle tag not found as being not an error
+    if ((result == EC_TagNotFound) && only_modify && ignore_missing_tags)
+        return EC_Normal;
+    if (result.bad())
+        return result;
+    OFList<DcmPath*> resultPaths;
+    Uint32 numResultPaths = proc.getResults(resultPaths);
+    if (numResultPaths == 0)
+        return EC_IllegalCall;
+
+    // general validity checking; must only be done for one result
+    OFListIterator(DcmPath*) resultPath = resultPaths.begin();
+    // verify that groups 0 (invalid) and 2 (meta header) were not used
+    if ((*resultPath)->containsGroup(0) || (*resultPath)->containsGroup(2))
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot insert/modify tags with group 0000 or 0002!");
+    // also - according to the standard -  groups 1,3,5,7,FF are illegal
+    if ((*resultPath)->containsGroup(1) || (*resultPath)->containsGroup(3) || (*resultPath)->containsGroup(5)
+        || (*resultPath)->containsGroup(7) || (*resultPath)->containsGroup(0xffff))
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "Groups 0001,0003,0005,0007,FFFF are illegal!");
+
+    DcmPathNode* lastElement = (*resultPath)->back();
+    if (lastElement == NULL)
+        return EC_IllegalCall;
+    DcmObject* obj = lastElement->m_obj;
+    if (obj == NULL)
+        return EC_IllegalCall;
+    // if object at the end is not a leaf, the insertion is completed (or must fail)
+    if (!obj->isLeaf())
+    {
+        // if user specified a value to be inserted into non-leaf element, return error
+        if (!value.empty())
+            return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot put value into non-leaf elements!");
+        // non-leaf elements (items/sequences) cannot just be modified
+        if (only_modify)
+            return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot modify non-leaf elements!");
+        // we have inserted an item/sequence at the end -> job completed
+        return EC_Normal;
+    }
 
+    // start modifying element value as desired
+    resultPath = resultPaths.begin();
+    while (resultPath != resultPaths.end())
+    {
+        lastElement = (*resultPath)->back();
+        if (lastElement == NULL)
+            return EC_IllegalCall;
+        // if tag is already present, start modify operation
+        DcmElement* elem = OFstatic_cast(DcmElement*, lastElement->m_obj);
+        if (elem == NULL)
+            return EC_IllegalCall;
+        // Check if pixel data insertion can be performed (and report error if result.bad())
+        result = checkPixelDataInsertion(elem);
+        if (result.good())
+        {
+            result = startModify(elem, value);
+        }
+        if (result.bad())
+            return result;
+        if (update_metaheader)
+            deleteRelatedMetaheaderTag(elem->getTag());
+        resultPath++;
+    }
+    return EC_Normal;
+}
 
 OFCondition MdfDatasetManager::modifyOrInsertFromFile(OFString tag_path,
-                                                      const OFString &filename,
+                                                      const OFStringfilename,
                                                       const OFBool only_modify,
                                                       const OFBool update_metaheader,
                                                       const OFBool ignore_missing_tags,
                                                       const OFBool no_reservation_checks)
 {
-  // if no file loaded: return an error
-  if (dfile == NULL)
-      return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!");
-
-  // first, perform some basic checks on the specified file(name)
-  if (filename.empty())
-      return makeOFCondition(OFM_dcmdata, 22, OF_error, "No filename specified to read value from!");
-  if (!OFStandard::fileExists(filename))
-      return makeOFCondition(OFM_dcmdata, 22, OF_error, "File to read value from does not exist!");
-  if (!OFStandard::isReadable(filename))
-      return makeOFCondition(OFM_dcmdata, 22, OF_error, "File to read value from is not readable!");
-
-  // find or create specified path
-  DcmPathProcessor proc;
-  proc.checkPrivateReservations(!no_reservation_checks);
-  OFCondition result = proc.findOrCreatePath(dset, tag_path, !only_modify /*create if desired*/);
-  // if desired, handle tag not found as being not an error
-  if ((result == EC_TagNotFound) && only_modify && ignore_missing_tags)
-      return EC_Normal;
-  if (result.bad()) return result;
-  OFList<DcmPath *> resultPaths;
-  Uint32 numResultPaths = proc.getResults(resultPaths);
-  if (numResultPaths == 0) return EC_IllegalCall;
-
-  // general validity checking; must only be done for one result
-  OFListIterator(DcmPath*) resultPath = resultPaths.begin();
-  // verify that groups 0 (invalid) and 2 (meta header) were not used
-  if ((*resultPath)->containsGroup(0) || (*resultPath)->containsGroup(2))
-      return makeOFCondition(OFM_dcmdata,22,OF_error, "Cannot insert/modify tags with group 0000 or 0002!");
-  // also - according to the standard -  groups 1,3,5,7,FF are illegal
-  if ((*resultPath)->containsGroup(1) || (*resultPath)->containsGroup(3) ||
-      (*resultPath)->containsGroup(5) || (*resultPath)->containsGroup(7) ||
-      (*resultPath)->containsGroup(0xffff))
-      return makeOFCondition(OFM_dcmdata, 22, OF_error, "Groups 0001,0003,0005,0007,FFFF are illegal!");
-
-  DcmPathNode *lastElement = (*resultPath)->back();
-  if (lastElement == NULL) return EC_IllegalCall;
-  DcmObject *obj = lastElement->m_obj;
-  if (obj == NULL) return EC_IllegalCall;
-  // if object at the end is not a leaf, the insertion/modification fails
-  if (!obj->isLeaf())
-      return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot put value into non-leaf elements!");
-
-  // start modifying element value as desired
-  resultPath = resultPaths.begin();
-  while (resultPath != resultPaths.end())
-  {
-      lastElement = (*resultPath)->back();
-      if (lastElement == NULL) return EC_IllegalCall;
-      // if tag is already present, start modify operation
-      DcmElement *elem = OFstatic_cast(DcmElement*, lastElement->m_obj);
-      if (elem == NULL) return EC_IllegalCall;
-      // check whether VR is "unknown"
-      DcmEVR vr = elem->getTag().getEVR();
-      if (ignore_un_modifies && ((vr == EVR_UN) || (vr == EVR_UNKNOWN) || (vr == EVR_UNKNOWN2B)))
-      {
-          OFLOG_WARN(mdfdsmanLogger, "will not write value to attribute having VR=UN: " << elem->getTag());
-          return EC_Normal;
-      }
-      // create stream object for binary file
-      DcmInputFileStream fileStream(filename.c_str());
-      result = fileStream.status();
-      if (result.good())
-      {
-          const size_t fileLen = OFStandard::getFileSize(filename);
-          if (fileLen & 1)
-              return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot insert/modify value with odd length from file!");
-          // read element value from binary file (requires even length)
-          result = elem->createValueFromTempFile(fileStream.newFactory(), OFstatic_cast(Uint32, fileLen), EBO_LittleEndian);
-      }
-      if (result.bad()) return result;
-      if (update_metaheader)
-          deleteRelatedMetaheaderTag(elem->getTag());
-      resultPath++;
-  }
-  return EC_Normal;
+    // if no file loaded: return an error
+    if (dfile == NULL)
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!");
+
+    // first, perform some basic checks on the specified file(name)
+    if (filename.empty())
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "No filename specified to read value from!");
+    if (!OFStandard::fileExists(filename))
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "File to read value from does not exist!");
+    if (!OFStandard::isReadable(filename))
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "File to read value from is not readable!");
+
+    // find or create specified path
+    DcmPathProcessor proc;
+    proc.checkPrivateReservations(!no_reservation_checks);
+    OFCondition result = proc.findOrCreatePath(dset, tag_path, !only_modify /*create if desired*/);
+    // if desired, handle tag not found as being not an error
+    if ((result == EC_TagNotFound) && only_modify && ignore_missing_tags)
+        return EC_Normal;
+    if (result.bad())
+        return result;
+    OFList<DcmPath*> resultPaths;
+    Uint32 numResultPaths = proc.getResults(resultPaths);
+    if (numResultPaths == 0)
+        return EC_IllegalCall;
+
+    // general validity checking; must only be done for one result
+    OFListIterator(DcmPath*) resultPath = resultPaths.begin();
+    // verify that groups 0 (invalid) and 2 (meta header) were not used
+    if ((*resultPath)->containsGroup(0) || (*resultPath)->containsGroup(2))
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot insert/modify tags with group 0000 or 0002!");
+    // also - according to the standard -  groups 1,3,5,7,FF are illegal
+    if ((*resultPath)->containsGroup(1) || (*resultPath)->containsGroup(3) || (*resultPath)->containsGroup(5)
+        || (*resultPath)->containsGroup(7) || (*resultPath)->containsGroup(0xffff))
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "Groups 0001,0003,0005,0007,FFFF are illegal!");
+
+    DcmPathNode* lastElement = (*resultPath)->back();
+    if (lastElement == NULL)
+        return EC_IllegalCall;
+    DcmObject* obj = lastElement->m_obj;
+    if (obj == NULL)
+        return EC_IllegalCall;
+    // if object at the end is not a leaf, the insertion/modification fails
+    if (!obj->isLeaf())
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot put value into non-leaf elements!");
+
+    // start modifying element value as desired
+    resultPath = resultPaths.begin();
+    while (resultPath != resultPaths.end())
+    {
+        lastElement = (*resultPath)->back();
+        if (lastElement == NULL)
+            return EC_IllegalCall;
+        // if tag is already present, start modify operation
+        DcmElement* elem = OFstatic_cast(DcmElement*, lastElement->m_obj);
+        if (elem == NULL)
+            return EC_IllegalCall;
+        // Check if pixel data insertion can be performed (and report error if result.bad())
+        result = checkPixelDataInsertion(elem);
+        if (result.good())
+        {
+            // check whether VR is "unknown"
+            DcmEVR vr = elem->getTag().getEVR();
+            if (ignore_un_modifies && ((vr == EVR_UN) || (vr == EVR_UNKNOWN) || (vr == EVR_UNKNOWN2B)))
+            {
+                OFLOG_WARN(mdfdsmanLogger, "will not write value to attribute having VR=UN: " << elem->getTag());
+                return EC_Normal;
+            }
+            // create stream object for binary file
+            DcmInputFileStream fileStream(filename.c_str());
+            result = fileStream.status();
+            if (result.good())
+            {
+                const size_t fileLen = OFStandard::getFileSize(filename);
+                if (fileLen & 1)
+                    return makeOFCondition(
+                        OFM_dcmdata, 22, OF_error, "Cannot insert/modify value with odd length from file!");
+                // read element value from binary file (requires even length)
+                result = elem->createValueFromTempFile(
+                    fileStream.newFactory(), OFstatic_cast(Uint32, fileLen), EBO_LittleEndian);
+            }
+            if (result.bad())
+                return result;
+            if (update_metaheader)
+                deleteRelatedMetaheaderTag(elem->getTag());
+        }
+        resultPath++;
+    }
+    return EC_Normal;
 }
 
-
 OFCondition MdfDatasetManager::modifyAllTags(OFString tag_path,
-                                             const OFString &value,
+                                             const OFStringvalue,
                                              const OFBool update_metaheader,
-                                             int &count,
+                                             intcount,
                                              const OFBool ignore_missing_tags)
 {
     // if no file loaded: return an error
     if (dfile == NULL)
-        return makeOFCondition(OFM_dcmdata,22,OF_error,"No file loaded yet!");
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!");
     DcmTagKey key;
     OFCondition result;
 
     // split tag_path into the path itself and the target tag
-    result=splitTagPath(tag_path, key);
-    if ( result.bad() )
+    result = splitTagPath(tag_path, key);
+    if (result.bad())
         return result;
 
     // check whether tag with this group can be modified
     if (!key.hasValidGroup())
-        return makeOFCondition(OFM_dcmdata,22,OF_error,"Invalid group number!");
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "Invalid group number!");
 
     // modify metaheader if necessary; not necessary if not a main level tag
-    if ( update_metaheader && tag_path.empty() )
+    if (update_metaheader && tag_path.empty())
         deleteRelatedMetaheaderTag(key);
     // this stack will hold result of element search
     DcmStack result_stack;
-    DcmObject *elem;
+    DcmObjectelem;
     // get references to all matching tags in dataset and store them in stack
     OFLOG_DEBUG(mdfdsmanLogger, "looking for occurrences of: " << key.toString());
-    result=dset->findAndGetElements(key, result_stack);
+    result = dset->findAndGetElements(key, result_stack);
     // if there are elements found, modify metaheader if necessary
     OFLOG_DEBUG(mdfdsmanLogger, "found " << result_stack.card() << " occurrences");
     // as long there are matching elements left on the stack
-    while( result_stack.card() > 0 && result.good() )
+    while (result_stack.card() > 0 && result.good())
     {
         // get the top element
-        elem=result_stack.pop();
+        elem = result_stack.pop();
         // if user gives e.g. a sequence delimiter,don't try to change it!
         if (elem->isLeaf())
         {
             // and put new value to element
             OFLOG_DEBUG(mdfdsmanLogger, "accessing existing tag for modify operation");
-            result=startModify(OFstatic_cast(DcmElement*,elem),value);
-            if (result.good()) count++;
+            result = startModify(OFstatic_cast(DcmElement*, elem), value);
+            if (result.good())
+                count++;
         }
         // if user gave "unchangeable" tag:
-        else result = makeOFCondition(OFM_dcmdata,22,OF_error,"Unable to modify tag!");
+        else
+            result = makeOFCondition(OFM_dcmdata, 22, OF_error, "Unable to modify tag!");
     }
     // if desired, handle "tag not found" as being OK
     if (ignore_missing_tags && (result == EC_TagNotFound))
@@ -507,91 +528,86 @@ OFCondition MdfDatasetManager::modifyAllTags(OFString tag_path,
     return result;
 }
 
-
-OFCondition MdfDatasetManager::deleteTag(OFString tag_path,
-                                         const OFBool all_tags,
-                                         const OFBool ignore_missing_tags)
+OFCondition MdfDatasetManager::deleteTag(OFString tag_path, const OFBool all_tags, const OFBool ignore_missing_tags)
 {
 
-  // if no file loaded: return an error
-  if (dfile == NULL)
-      return makeOFCondition(OFM_dcmdata,22,OF_error,"No file loaded yet!");
-
-  OFCondition result;
-  if (all_tags)
-  {
-      // split tag path into item path and target tag
-      DcmTagKey key;
-      result = splitTagPath(tag_path, key);
-      if (result.bad())
-          return result;  // error parsing tag path
-
-      // if group is 0 or 2: abort; deletion of tags with 1,3,5,7 should be allowed
-      if ( (key.getGroup() == 0) || (key.getGroup() == 2) )
-          return makeOFCondition(OFM_dcmdata,22,OF_error, "Cannot delete tags with group 0000 or 0002!");
-
-      // if tag path still contains characters, user wants to modify item tag
-      if (!tag_path.empty())
-      {
-          OFString error;
-          DcmItem *item=NULL;
-          item = getItemFromPath(*dset, tag_path.c_str(), error);
-          if (item != NULL)
-              result = item->findAndDeleteElement(key, all_tags, all_tags);
-          else
-              return makeOFCondition(OFM_dcmdata,22,OF_error,error.c_str());
-      }
-      // other user specified single tag without path
-      else
-      {
-          result = dset->findAndDeleteElement(key, all_tags, all_tags);
-      }
-      if (ignore_missing_tags && (result == EC_TagNotFound))
-          return EC_Normal;
-      return result;
-  }
-
-  // do not delete all tags -> use path functions
-  DcmPathProcessor pathProc;
-
-  Uint32 numDeletions = 0;
-  result = pathProc.findOrDeletePath(dset, tag_path, numDeletions);
-  if (ignore_missing_tags && (result == EC_TagNotFound))
-      return EC_Normal;
-  return result;
-}
+    // if no file loaded: return an error
+    if (dfile == NULL)
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!");
+
+    OFCondition result;
+    if (all_tags)
+    {
+        // split tag path into item path and target tag
+        DcmTagKey key;
+        result = splitTagPath(tag_path, key);
+        if (result.bad())
+            return result; // error parsing tag path
+
+        // if group is 0 or 2: abort; deletion of tags with 1,3,5,7 should be allowed
+        if ((key.getGroup() == 0) || (key.getGroup() == 2))
+            return makeOFCondition(OFM_dcmdata, 22, OF_error, "Cannot delete tags with group 0000 or 0002!");
+
+        // if tag path still contains characters, user wants to modify item tag
+        if (!tag_path.empty())
+        {
+            OFString error;
+            DcmItem* item = NULL;
+            item          = getItemFromPath(*dset, tag_path.c_str(), error);
+            if (item != NULL)
+                result = item->findAndDeleteElement(key, all_tags, all_tags);
+            else
+                return makeOFCondition(OFM_dcmdata, 22, OF_error, error.c_str());
+        }
+        // other user specified single tag without path
+        else
+        {
+            result = dset->findAndDeleteElement(key, all_tags, all_tags);
+        }
+        if (ignore_missing_tags && (result == EC_TagNotFound))
+            return EC_Normal;
+        return result;
+    }
 
+    // do not delete all tags -> use path functions
+    DcmPathProcessor pathProc;
+
+    Uint32 numDeletions = 0;
+    result              = pathProc.findOrDeletePath(dset, tag_path, numDeletions);
+    if (ignore_missing_tags && (result == EC_TagNotFound))
+        return EC_Normal;
+    return result;
+}
 
 OFCondition MdfDatasetManager::deletePrivateData()
 {
-  // if no file loaded : return an error
-  if (dfile == NULL)
-      return makeOFCondition(OFM_dcmdata,22,OF_error,"No file loaded yet!");
-
-  DcmStack stack;
-  DcmObject *dobj = NULL;
-  DcmTagKey tag;
-  OFCondition status = dset->nextObject(stack, OFTrue);
-  while (status.good())
-  {
-      dobj = stack.top();
-      tag = dobj->getTag();
-      if (tag.getGroup() & 1) // private tag ?
-      {
-          stack.pop();
-          delete OFstatic_cast(DcmItem *, (stack.top()))->remove(dobj);
-      }
-      status = dset->nextObject(stack, OFTrue);
-  }
-  return EC_Normal;
-}
+    // if no file loaded : return an error
+    if (dfile == NULL)
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!");
 
+    DcmStack stack;
+    DcmObject* dobj = NULL;
+    DcmTagKey tag;
+    OFCondition status = dset->nextObject(stack, OFTrue);
+    while (status.good())
+    {
+        dobj = stack.top();
+        tag  = dobj->getTag();
+        if (tag.getGroup() & 1) // private tag ?
+        {
+            stack.pop();
+            delete OFstatic_cast(DcmItem*, (stack.top()))->remove(dobj);
+        }
+        status = dset->nextObject(stack, OFTrue);
+    }
+    return EC_Normal;
+}
 
 OFCondition MdfDatasetManager::generateAndInsertUID(const DcmTagKey& uidKey)
 {
     // if no file loaded : return an error
-    if (dfile==NULL)
-        return makeOFCondition(OFM_dcmdata,22,OF_error,"No file loaded yet!");
+    if (dfile == NULL)
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!");
 
     OFCondition result;
     char uid[100];
@@ -603,19 +619,19 @@ OFCondition MdfDatasetManager::generateAndInsertUID(const DcmTagKey& uidKey)
     {
         dcmGenerateUniqueIdentifier(uid, SITE_INSTANCE_UID_ROOT);
         // force meta-header to refresh SOP Class/Instance UIDs.
-        DcmItem *meta_info = dfile->getMetaInfo();
+        DcmItemmeta_info = dfile->getMetaInfo();
         if (meta_info)
         {
             delete meta_info->remove(DCM_MediaStorageSOPInstanceUID);
         }
     }
-    else return EC_IllegalCall;
+    else
+        return EC_IllegalCall;
     result = dset->putAndInsertString(uidKey, uid);
     return result;
 }
 
-
-OFCondition MdfDatasetManager::saveFile(const char *file_name,
+OFCondition MdfDatasetManager::saveFile(const char* file_name,
                                         E_TransferSyntax opt_xfer,
                                         E_EncodingType opt_enctype,
                                         E_GrpLenEncoding opt_glenc,
@@ -625,12 +641,12 @@ OFCondition MdfDatasetManager::saveFile(const char *file_name,
                                         OFBool opt_dataset)
 {
     // if no file loaded: return an error
-    if (dfile==NULL)
-        return makeOFCondition(OFM_dcmdata,22,OF_error,"No file loaded yet!");
+    if (dfile == NULL)
+        return makeOFCondition(OFM_dcmdata, 22, OF_error, "No file loaded yet!");
 
     OFCondition result;
     /* check whether transfer syntax is possible */
-    if ( (opt_xfer==EXS_Unknown) || (dfile->canWriteXfer(opt_xfer)) )
+    if ((opt_xfer == EXS_Unknown) || (dfile->canWriteXfer(opt_xfer)))
     {
         /* check whether pixel data is compressed */
         if (opt_dataset && DcmXfer(opt_xfer).isEncapsulated())
@@ -643,19 +659,24 @@ OFCondition MdfDatasetManager::saveFile(const char *file_name,
          * loaded file does not contain attributes which could make sense if
          * it is a template file that should be processed with dcmodify.
          */
-        if ((dfile->getDataset()->getOriginalXfer() == EXS_Unknown) && (opt_xfer  == EXS_Unknown))
+        if ((dfile->getDataset()->getOriginalXfer() == EXS_Unknown) && (opt_xfer == EXS_Unknown))
         {
-          opt_xfer = EXS_LittleEndianExplicit;
+            opt_xfer = EXS_LittleEndianExplicit;
         }
         /* write DICOM file */
-        result = dfile->saveFile(file_name, opt_xfer, opt_enctype, opt_glenc,
+        result = dfile->saveFile(file_name,
+                                 opt_xfer,
+                                 opt_enctype,
+                                 opt_glenc,
                                  opt_padenc,
                                  OFstatic_cast(Uint32, opt_filepad),
                                  OFstatic_cast(Uint32, opt_itempad),
                                  (opt_dataset) ? EWM_dataset : EWM_createNewMeta);
-
-    } else {
-        OFLOG_DEBUG(mdfdsmanLogger, "no conversion to transfer syntax " << DcmXfer(opt_xfer).getXferName() << " possible!");
+    }
+    else
+    {
+        OFLOG_DEBUG(mdfdsmanLogger,
+                    "no conversion to transfer syntax " << DcmXfer(opt_xfer).getXferName() << " possible!");
         result = EC_CannotChangeRepresentation;
     }
     // save file
@@ -663,77 +684,93 @@ OFCondition MdfDatasetManager::saveFile(const char *file_name,
     return result;
 }
 
-
 OFCondition MdfDatasetManager::saveFile()
 {
     // save file without changing any parameters
-    return saveFile(current_file.c_str(), EXS_Unknown, EET_UndefinedLength,
-                    EGL_recalcGL, EPD_noChange, 0, 0, OFFalse);
+    return saveFile(current_file.c_str(), EXS_Unknown, EET_UndefinedLength, EGL_recalcGL, EPD_noChange, 0, 0, OFFalse);
 }
 
-
-OFCondition MdfDatasetManager::startModify(DcmElement *elem,
-                                           const OFString &value)
+OFCondition MdfDatasetManager::startModify(DcmElement* elem, const OFString& value)
 {
     OFCondition result;
     DcmEVR vr = elem->getTag().getEVR();
-    if ( ignore_un_modifies && ((vr == EVR_UN) || (vr == EVR_UNKNOWN) || (vr == EVR_UNKNOWN2B)))
+    if (ignore_un_modifies && ((vr == EVR_UN) || (vr == EVR_UNKNOWN) || (vr == EVR_UNKNOWN2B)))
     {
-      OFLOG_WARN(mdfdsmanLogger, "will not write value to attribute having VR=UN: " << elem->getTag().toString());
-      return EC_Normal;
+        OFLOG_WARN(mdfdsmanLogger, "will not write value to attribute having VR=UN: " << elem->getTag().toString());
+        return EC_Normal;
     }
     // start putString function being defined on all VRs
     result = elem->putString(value.c_str());
     return result;
 }
 
-
-void MdfDatasetManager::deleteRelatedMetaheaderTag(const DcmTagKey &key)
+void MdfDatasetManager::deleteRelatedMetaheaderTag(const DcmTagKey& key)
 {
-    DcmItem *meta_info=dfile->getMetaInfo();
+    DcmItem* meta_info = dfile->getMetaInfo();
     if (meta_info)
     {
-        if (key==DCM_SOPInstanceUID)
+        if (key == DCM_SOPInstanceUID)
             delete meta_info->remove(DCM_MediaStorageSOPInstanceUID);
-        else if (key==DCM_SOPClassUID)
+        else if (key == DCM_SOPClassUID)
             delete meta_info->remove(DCM_MediaStorageSOPClassUID);
     }
 }
 
-
 DcmDataset* MdfDatasetManager::getDataset()
 {
     return dset;
 }
 
-
 DcmFileFormat* MdfDatasetManager::getFileFormat()
 {
     return dfile;
 }
 
-
 OFString MdfDatasetManager::getFilename() const
 {
     return current_file;
 }
 
-
-OFBool MdfDatasetManager::isTagInDictionary(const DcmTagKey &search_key)
+OFBool MdfDatasetManager::isTagInDictionary(const DcmTagKey& search_key)
 {
     const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock();
-    const DcmDictEntry *dicent = globalDataDict.findEntry(search_key,NULL);
+    const DcmDictEntry* dicent              = globalDataDict.findEntry(search_key, NULL);
     // successful lookup in dictionary -> translate to tag and return
     dcmDataDict.rdunlock();
     if (dicent)
         return OFTrue;
-    else return OFFalse;
+    else
+        return OFFalse;
 }
 
-
 void MdfDatasetManager::setModifyUNValues(OFBool modifyUNValues)
 {
-  ignore_un_modifies = !modifyUNValues;
+    ignore_un_modifies = !modifyUNValues;
+}
+
+OFCondition MdfDatasetManager::checkPixelDataInsertion(DcmElement* elem)
+{
+    if (elem->ident() == EVR_PixelData)
+    {
+        DcmPixelData* pix = OFstatic_cast(DcmPixelData*, elem);
+        if (pix)
+        {
+            E_TransferSyntax ts = EXS_Unknown;
+            const DcmRepresentationParameter* dontCare = NULL;
+            pix->getCurrentRepresentationKey(ts, dontCare);
+            DcmXfer xfer(ts);
+            if (xfer.isEncapsulated())
+            {
+                OFLOG_ERROR(mdfdsmanLogger, "Cannot replace encapsulated Pixel Data (not implemented)");
+                return EC_IllegalParameter;
+            }
+        }
+        else
+        {
+            OFLOG_WARN(mdfdsmanLogger, "Unexpected error while casting Pixel Data element, trying to ignore");
+        }
+    }
+    return EC_Normal;
 }
 
 
index f2b227a223696addfeccb1d3dfcf3cad0af33c77..371eec2d22f51f31abb790c6a49c3c3271040cfc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2019, OFFIS e.V.
+ *  Copyright (C) 2003-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -230,6 +230,14 @@ protected:
      */
     OFBool isTagInDictionary(const DcmTagKey &search_key);
 
+    /** Make user user is not trying to replace encapsulated Pixel Data element value.
+     *  This is currently not implemented since there is no direct / obvious way to insert
+     *  raw data into the pixel sequence structure managed by the DcmPixelData class.
+     *  @param elem The potential Pixel Data element to be checked
+     *  @return EC_Normal if modification is possible, error code otherwise
+     */
+    OFCondition checkPixelDataInsertion(DcmElement* elem);
+
 private:
 
     /// name of file that is currently loaded
index 2961d5bdad4cc4b851acd26b1d8f7eec11f9d3fc..ac71794aab0bd44d95cef3621993e486d2b0a93a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2020, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,9 +28,7 @@
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/ofconapp.h"
 #include "dcmtk/dcmdata/dcostrmz.h"   /* for dcmZlibCompressionLevel */
-
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/dcmdata/xml2dcm.h"
 
 #ifdef WITH_ZLIB
 #include <zlib.h>                     /* for zlibVersion() */
@@ -42,9 +40,6 @@
 // currently not used since DTD is always retrieved from XML document
 //#define DOCUMENT_TYPE_DEFINITION_FILE "dcm2xml.dtd"
 
-static OFLogger xml2dcmLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APPLICATION);
-static OFLogger xmlLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APPLICATION ".libxml");
-
 static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
   OFFIS_DCMTK_VERSION " " OFFIS_DCMTK_RELEASEDATE " $";
 
@@ -52,656 +47,11 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
 
 #ifdef WITH_LIBXML
 
-#ifdef __ibmxl__
-// IBM xlC defines __GNUC__ but does not support the GNUC extension
-// __attribute__ ((format (printf, 2, 3))).
-// This avoids a compiler warning in <libxml/parser.h>.
-#define LIBXML_ATTR_FORMAT(fmt,args)
-#endif
-
-// The libxml library also uses unicode. So we have to reuse some
-// workarounds for the ICU library here as well.
-// The type char16_t is only supported since C++11.
-#ifndef HAVE_CHAR16_T
-#define UCHAR_TYPE uint16_t
-#endif
-
-//If U_NOEXCEPT is not defined, ICU falls back to NOEXCEPT.
-#ifndef HAVE_CXX11
-#define U_NOEXCEPT
-#endif
-
-#include <libxml/parser.h>
-
-
-// stores pointer to character encoding handler
-static xmlCharEncodingHandlerPtr EncodingHandler = NULL;
-
-// This function is also used in dcmsr, try to stay in sync!
-extern "C" void errorFunction(void * ctx, const char *msg, ...)
-{
-#if defined(HAVE_VSNPRINTF) && defined(HAVE_PROTOTYPE_VSNPRINTF)
-    // Classic C requires us to declare variables at the beginning of the function.
-    OFString &buffer = *OFstatic_cast(OFString*, ctx);
-#endif
-
-    if (!xmlLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
-        return;
-
-#if defined(HAVE_VSNPRINTF) && defined(HAVE_PROTOTYPE_VSNPRINTF)
-    // libxml calls us multiple times for one line of log output which would
-    // result in garbled output. To avoid this, we buffer the output in a local
-    // string in the caller which we get through our 'ctx' parameter. Then, we
-    // output this string on one go when we receive a newline.
-    va_list ap;
-    char buf[1024];
-
-    va_start(ap, msg);
-#ifdef HAVE_PROTOTYPE_STD__VSNPRINTF
-    std::vsnprintf(buf, 1024, msg, ap);
-#else
-    vsnprintf(buf, 1024, msg, ap);
-#endif
-    va_end(ap);
-
-    // Since we can't do anything about a too small buffer for vsnprintf(), we
-    // ignore it. But we do make sure the buffer is null-terminated!
-    buf[1023] = '\0';
-    buffer += buf;
-
-    // If there is a full line in the buffer...
-    size_t pos = buffer.find('\n');
-    while (pos != OFString_npos)
-    {
-        // ..output it and remove it from the buffer
-        OFLOG_DEBUG(xmlLogger, buffer.substr(0, pos));
-        buffer.erase(0, pos + 1);
-
-        pos = buffer.find('\n');
-    }
-#elif defined(HAVE_VPRINTF)
-    // No vsnprint, but at least vfprintf. Output the messages directly to stderr.
-    va_list ap;
-    va_start(ap, msg);
-#ifdef HAVE_PROTOTYPE_STD__VFPRINTF
-    std::vfprintf(stderr, msg, ap);
-#else
-    vfprintf(stderr, msg, ap);
-#endif
-    va_end(ap);
-#else
-    // We can only show the most basic part of the message, this will look bad :(
-    printf("%s", msg);
-#endif
-}
-
-
-static OFBool convertUtf8ToCharset(const xmlChar *fromString,
-                                   OFString &toString)
-{
-    OFBool result = OFFalse;
-    if (EncodingHandler != NULL)
-    {
-        /* prepare input/output buffers */
-        xmlBufferPtr fromBuffer = xmlBufferCreate();
-        xmlBufferPtr toBuffer = xmlBufferCreate();
-        xmlBufferCat(fromBuffer, fromString);
-        /* convert character encoding of given string */
-        result = (xmlCharEncOutFunc(EncodingHandler, toBuffer, fromBuffer) >= 0);
-        if (result)
-            toString = OFreinterpret_cast(const char *, xmlBufferContent(toBuffer));
-        /* free allocated memory */
-        xmlBufferFree(toBuffer);
-        xmlBufferFree(fromBuffer);
-    }
-    return result;
-}
-
-
-static OFCondition checkNode(xmlNodePtr current,
-                             const char *name)
-{
-    OFCondition result = EC_Normal;
-    /* check whether node is valid at all */
-    if (current != NULL)
-    {
-        /* check whether node has expected name */
-        if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, name)) != 0)
-        {
-            OFLOG_ERROR(xml2dcmLogger, "document of the wrong type, was '" << current->name << "', '" << name << "' expected");
-            result = EC_IllegalCall;
-        }
-    } else {
-        OFLOG_ERROR(xml2dcmLogger, "document of the wrong type, '" << name << "' expected");
-        result = EC_IllegalCall;
-    }
-    return result;
-}
-
-
-static OFCondition createNewElement(xmlNodePtr current,
-                                    DcmElement *&newElem)
-{
-    OFCondition result = EC_IllegalCall;
-    /* check whether node is valid */
-    if (current != NULL)
-    {
-        /* get required information from XML element */
-        xmlChar *elemTag = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "tag"));
-        xmlChar *elemVR = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "vr"));
-        /* convert tag string */
-        DcmTagKey dcmTagKey;
-        unsigned int group = 0xffff;
-        unsigned int elem = 0xffff;
-        /* make sure that "tag" attribute exists */
-        if (elemTag == NULL)
-        {
-            OFLOG_WARN(xml2dcmLogger, "missing 'tag' attribute, ignoring node");
-            result = EC_InvalidTag;
-        }
-        /* determine group and element number from "tag" */
-        else if (sscanf(OFreinterpret_cast(char *, elemTag), "%x,%x", &group, &elem ) == 2)
-        {
-            dcmTagKey.set(OFstatic_cast(Uint16, group), OFstatic_cast(Uint16, elem));
-            DcmTag dcmTag(dcmTagKey);
-            /* convert vr string */
-            DcmVR dcmVR(OFreinterpret_cast(char *, elemVR));
-            DcmEVR dcmEVR = dcmVR.getEVR();
-            if (dcmEVR == EVR_UNKNOWN)
-            {
-                /* check whether "vr" attribute exists */
-                if (elemVR == NULL)
-                {
-                    OFLOG_WARN(xml2dcmLogger, "missing 'vr' attribute for " << dcmTag
-                        << ", using unknown VR");
-                } else {
-                    OFLOG_WARN(xml2dcmLogger, "invalid 'vr' attribute (" << elemVR
-                        << ") for " << dcmTag << ", using unknown VR");
-                }
-            }
-            /* check for correct vr */
-            const DcmEVR tagEVR = dcmTag.getEVR();
-            if ((tagEVR != dcmEVR) && (dcmEVR != EVR_UNKNOWN) && (tagEVR != EVR_UNKNOWN) &&
-                ((dcmTagKey != DCM_LUTData) || ((dcmEVR != EVR_US) && (dcmEVR != EVR_SS) && (dcmEVR != EVR_OW))) &&
-                ((tagEVR != EVR_xs) || ((dcmEVR != EVR_US) && (dcmEVR != EVR_SS))) &&
-                (((tagEVR != EVR_ox) && (tagEVR != EVR_px)) || ((dcmEVR != EVR_OB) && (dcmEVR != EVR_OW))))
-            {
-                OFLOG_WARN(xml2dcmLogger, "tag " << dcmTag << " has wrong VR (" << dcmVR.getVRName()
-                    << "), correct is " << dcmTag.getVR().getVRName());
-            }
-            if (dcmEVR != EVR_UNKNOWN)
-                dcmTag.setVR(dcmVR);
-            /* create DICOM element */
-            result = DcmItem::newDicomElementWithVR(newElem, dcmTag);
-        } else {
-            OFLOG_WARN(xml2dcmLogger, "invalid 'tag' attribute (" << elemTag << "), ignoring node");
-            result = EC_InvalidTag;
-        }
-        if (result.bad())
-        {
-            /* delete new element if an error occurred */
-            delete newElem;
-            newElem = NULL;
-        }
-        /* free allocated memory */
-        xmlFree(elemTag);
-        xmlFree(elemVR);
-    }
-    return result;
-}
-
-
-static OFCondition putElementContent(xmlNodePtr current,
-                                     DcmElement *element)
-{
-    OFCondition result = EC_IllegalCall;
-    /* check whether node and element are valid */
-    if ((current != NULL) && (element != NULL))
-    {
-        DcmEVR dcmEVR = element->getVR();
-        /* get the XML node content */
-        xmlChar *elemVal = xmlNodeGetContent(current);
-        xmlChar *attrVal = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "binary"));
-        /* check whether node content is present */
-        if (xmlStrcmp(attrVal, OFreinterpret_cast(const xmlChar *, "hidden")) == 0)
-            OFLOG_WARN(xml2dcmLogger, "content of node " << element->getTag() << " is 'hidden', empty element inserted");
-        /* check whether node content is base64 encoded */
-        else if (xmlStrcmp(attrVal, OFreinterpret_cast(const xmlChar *, "base64")) == 0)
-        {
-            Uint8 *data = NULL;
-            const size_t length = OFStandard::decodeBase64(OFreinterpret_cast(char *, elemVal), data);
-            if (length > 0)
-            {
-                if (dcmEVR == EVR_OW)
-                {
-                    /* Base64 decoder produces big endian output data, convert to local byte order */
-                    swapIfNecessary(gLocalByteOrder, EBO_BigEndian, data, OFstatic_cast(Uint32, length), sizeof(Uint16));
-                }
-                result = element->putUint8Array(data, OFstatic_cast(Uint32, length));
-                /* delete buffer since data is copied into the element */
-                delete[] data;
-            }
-        }
-        /* check whether node content is stored in a file */
-        else if (xmlStrcmp(attrVal, OFreinterpret_cast(const xmlChar *, "file")) == 0)
-        {
-            if (xmlStrlen(elemVal) > 0)
-            {
-                const char *filename = OFreinterpret_cast(char *, elemVal);
-                /* try to open binary file */
-                FILE *f = fopen(filename, "rb");
-                if (f != NULL)
-                {
-                    /* determine filesize */
-                    const size_t fileSize = OFStandard::getFileSize(filename);
-                    size_t buflen = fileSize;
-                    /* if odd then make even (DICOM requires even length values) */
-                    if (buflen & 1)
-                        buflen++;
-                    Uint8 *buf = NULL;
-                    /* create buffer of OB or OW data */
-                    if (dcmEVR == EVR_OW)
-                    {
-                        Uint16 *buf16 = NULL;
-                        result = element->createUint16Array(OFstatic_cast(Uint32, buflen / 2), buf16);
-                        buf = OFreinterpret_cast(Uint8 *, buf16);
-                    } else
-                        result = element->createUint8Array(OFstatic_cast(Uint32, buflen), buf);
-                    if (result.good())
-                    {
-                        OFLOG_INFO(xml2dcmLogger, "reading " << fileSize << " bytes from binary data file: " << filename);
-                        OFLOG_DEBUG(xml2dcmLogger, "  and storing it in the element " << element->getTag());
-                        /* read binary file into the buffer */
-                        if (fread(buf, 1, OFstatic_cast(size_t, fileSize), f) != fileSize)
-                        {
-                            OFLOG_ERROR(xml2dcmLogger, "error reading binary data file: " << filename << ": " << OFStandard::getLastSystemErrorCode().message());
-                            result = EC_CorruptedData;
-                        }
-                        else if (dcmEVR == EVR_OW)
-                        {
-                            /* swap 16 bit OW data (if necessary) */
-                            swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, buf, OFstatic_cast(Uint32, buflen), sizeof(Uint16));
-                        }
-                    }
-                    fclose(f);
-                } else {
-                    OFLOG_ERROR(xml2dcmLogger, "cannot open binary data file: " << filename);
-                    result = EC_InvalidTag;
-                }
-            } else
-                OFLOG_ERROR(xml2dcmLogger, "filename for element " << element->getTag() << " is missing, empty element inserted");
-        } else {
-            OFString dicomVal;
-            /* convert character set from UTF-8 (for specific VRs only) */
-            if (element->isAffectedBySpecificCharacterSet() &&
-               (xmlStrlen(elemVal) > 0) && convertUtf8ToCharset(elemVal, dicomVal))
-            {
-                result = element->putOFStringArray(dicomVal);
-            } else {
-                /* set the value of the newly created element */
-                result = element->putString(OFreinterpret_cast(char *, elemVal));
-            }
-            if (result.bad())
-                OFLOG_ERROR(xml2dcmLogger, "cannot put content to element " << element->getTag() << ": " << result.text());
-        }
-        /* free allocated memory */
-        xmlFree(elemVal);
-        xmlFree(attrVal);
-    }
-    return result;
-}
-
-
-static OFCondition parseElement(DcmItem *dataset,
-                                xmlNodePtr current)
-{
-    DcmElement *newElem = NULL;
-    /* create new DICOM element from XML element */
-    OFCondition result = createNewElement(current, newElem);
-    if (result.good())
-    {
-        /* retrieve specific character set (only on main dataset level) */
-        if ((EncodingHandler == NULL) && (dataset->ident() == EVR_dataset) &&
-            (newElem->getTag() == DCM_SpecificCharacterSet))
-        {
-            const char *encString = NULL;
-            xmlChar *elemVal = xmlNodeGetContent(current);
-            /* check for known character set */
-            if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 6")) == 0)
-                encString = "UTF-8";
-            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 192")) == 0)
-                encString = "UTF-8";
-            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 100")) == 0)
-                encString = "ISO-8859-1";
-            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 101")) == 0)
-                encString = "ISO-8859-2";
-            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 109")) == 0)
-                encString = "ISO-8859-3";
-            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 110")) == 0)
-                encString = "ISO-8859-4";
-            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 148")) == 0)
-                encString = "ISO-8859-9";
-            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 144")) == 0)
-                encString = "ISO-8859-5";
-            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 127")) == 0)
-                encString = "ISO-8859-6";
-            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 126")) == 0)
-                encString = "ISO-8859-7";
-            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 138")) == 0)
-                encString = "ISO-8859-8";
-            else if (xmlStrlen(elemVal) > 0)
-                OFLOG_ERROR(xml2dcmLogger, "character set '" << elemVal << "' not supported");
-            if (encString != NULL)
-            {
-                /* find appropriate encoding handler */
-                EncodingHandler = xmlFindCharEncodingHandler(encString);
-            }
-            xmlFree(elemVal);
-        }
-        /* set the element value */
-        result = putElementContent(current, newElem);
-        /* insert the new element into the dataset */
-        if (result.good())
-            result = dataset->insert(newElem, OFTrue /*replaceOld*/);
-        if (result.bad())
-        {
-            /* delete element if insertion or putting the value failed */
-            delete newElem;
-        }
-    }
-    return result;
-}
-
-
-// forward declaration
-static OFCondition parseDataSet(DcmItem *dataset,
-                                xmlNodePtr current,
-                                E_TransferSyntax xfer);
-
-
-static OFCondition parseSequence(DcmSequenceOfItems *sequence,
-                                 xmlNodePtr current,
-                                 E_TransferSyntax xfer)
-{
-    OFCondition result = EC_IllegalCall;
-    if (sequence != NULL)
-    {
-        /* ignore blank (empty or whitespace only) nodes */
-        while ((current != NULL) && xmlIsBlankNode(current))
-            current = current->next;
-        while (current != NULL)
-        {
-            /* ignore non-item nodes */
-            if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "item")) == 0)
-            {
-                /* create new sequence item */
-                DcmItem *newItem = new DcmItem();
-                if (newItem != NULL)
-                {
-                    sequence->insert(newItem);
-                    /* proceed parsing the item content */
-                    parseDataSet(newItem, current->xmlChildrenNode, xfer);
-                }
-            } else if (!xmlIsBlankNode(current))
-                OFLOG_WARN(xml2dcmLogger, "unexpected node '" << current->name << "', 'item' expected, skipping");
-            /* proceed with next node */
-            current = current->next;
-        }
-        result = EC_Normal;
-    }
-    return result;
-}
-
-
-static OFCondition parsePixelSequence(DcmPixelSequence *sequence,
-                                      xmlNodePtr current)
-{
-    OFCondition result = EC_IllegalCall;
-    if (sequence != NULL)
-    {
-        /* ignore blank (empty or whitespace only) nodes */
-        while ((current != NULL) && xmlIsBlankNode(current))
-            current = current->next;
-        while (current != NULL)
-        {
-            /* ignore non-pixel-item nodes */
-            if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "pixel-item")) == 0)
-            {
-                /* create new pixel item */
-                DcmPixelItem *newItem = new DcmPixelItem(DCM_PixelItemTag);
-                if (newItem != NULL)
-                {
-                    sequence->insert(newItem);
-                    /* put pixel data into the item */
-                    putElementContent(current, newItem);
-                }
-            } else if (!xmlIsBlankNode(current))
-                OFLOG_WARN(xml2dcmLogger, "unexpected node '" << current->name << "', 'pixel-item' expected, skipping");
-            /* proceed with next node */
-            current = current->next;
-        }
-        result = EC_Normal;
-    }
-    return result;
-}
-
-
-static OFCondition parseMetaHeader(DcmMetaInfo *metainfo,
-                                   xmlNodePtr current,
-                                   const OFBool parse)
-{
-    /* check for valid node and correct name */
-    OFCondition result = checkNode(current, "meta-header");
-    if (result.good() && parse)
-    {
-        /* get child nodes */
-        current = current->xmlChildrenNode;
-        while (current != NULL)
-        {
-            /* ignore non-element nodes */
-            if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "element")) == 0)
-                parseElement(metainfo, current);
-            else if (!xmlIsBlankNode(current))
-                OFLOG_WARN(xml2dcmLogger, "unexpected node '" << current->name << "', 'element' expected, skipping");
-            /* proceed with next node */
-            current = current->next;
-        }
-    }
-    return result;
-}
-
-
-static OFCondition parseDataSet(DcmItem *dataset,
-                                xmlNodePtr current,
-                                E_TransferSyntax xfer)
-{
-    OFCondition result = EC_Normal;
-    /* ignore blank (empty or whitespace only) nodes */
-    while ((current != NULL) && xmlIsBlankNode(current))
-        current = current->next;
-    while (current != NULL)
-    {
-        /* ignore non-element/sequence nodes */
-        if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "element")) == 0)
-            parseElement(dataset, current);
-        else if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "sequence")) == 0)
-        {
-            DcmElement *newElem = NULL;
-            /* create new sequence element */
-            if (createNewElement(current, newElem).good())
-            {
-                /* insert new sequence element into the dataset */
-                result = dataset->insert(newElem, OFTrue /*replaceOld*/);
-                if (result.good())
-                {
-                    /* special handling for compressed pixel data */
-                    if (newElem->getTag() == DCM_PixelData)
-                    {
-                        /* create new pixel sequence */
-                        DcmPixelSequence *sequence = new DcmPixelSequence(DCM_PixelSequenceTag);
-                        if (sequence != NULL)
-                        {
-                            if (newElem->ident() == EVR_PixelData)
-                            {
-                                /* ... insert it into the dataset and proceed with the pixel items */
-                                OFstatic_cast(DcmPixelData *, newElem)->putOriginalRepresentation(xfer, NULL, sequence);
-                                parsePixelSequence(sequence, current->xmlChildrenNode);
-                            } else
-                                OFLOG_WARN(xml2dcmLogger, "wrong VR for 'sequence' element with pixel data, ignoring child nodes");
-                        }
-                    } else {
-                        /* proceed parsing the items of the sequence */
-                        if (newElem->ident() == EVR_SQ)
-                            parseSequence(OFstatic_cast(DcmSequenceOfItems *, newElem), current->xmlChildrenNode, xfer);
-                        else
-                            OFLOG_WARN(xml2dcmLogger, "wrong VR for 'sequence' element, ignoring child nodes");
-                    }
-                } else {
-                    /* delete element if insertion failed */
-                    delete newElem;
-                }
-            }
-        } else if (!xmlIsBlankNode(current))
-            OFLOG_WARN(xml2dcmLogger, "unexpected node '" << current->name << "', skipping");
-        /* proceed with next node */
-        current = current->next;
-    }
-    return result;
-}
-
-
-static OFCondition validateXmlDocument(xmlDocPtr doc)
-{
-    OFCondition result = EC_Normal;
-    OFLOG_INFO(xml2dcmLogger, "validating XML document ...");
-    xmlGenericError(xmlGenericErrorContext, "--- libxml validating ---\n");
-    /* temporary buffer needed for errorFunction - more detailed explanation there */
-    OFString tmpErrorString;
-    /* create context for document validation */
-    xmlValidCtxt cvp;
-    cvp.userData = &tmpErrorString;
-    cvp.error = errorFunction;
-    cvp.warning = errorFunction;
-    /* validate the document */
-    const int valid = xmlValidateDocument(&cvp, doc);
-    xmlGenericError(xmlGenericErrorContext, "-------------------------\n");
-    if (!valid)
-    {
-        OFLOG_ERROR(xml2dcmLogger, "document does not validate");
-        result = EC_IllegalCall;
-    }
-    return result;
-}
-
-
-static OFCondition readXmlFile(const char *ifname,
-                               DcmFileFormat &fileformat,
-                               E_TransferSyntax &xfer,
-                               const OFBool metaInfo,
-                               const OFBool checkNamespace,
-                               const OFBool validateDocument)
-{
-    OFCondition result = EC_Normal;
-    xfer = EXS_Unknown;
-    xmlGenericError(xmlGenericErrorContext, "--- libxml parsing ------\n");
-    /* build an XML tree from the file */
-#if LIBXML_VERSION >= 20703
-    /*
-     *  Starting with libxml version 2.7.3, the maximum length of XML element values
-     *  is limited to 10 MB.  The following code disables this default limitation.
-     */
-    xmlDocPtr doc = xmlReadFile(ifname, NULL /*encoding*/, XML_PARSE_HUGE);
-#else
-    xmlDocPtr doc = xmlParseFile(ifname);
-#endif
-    xmlGenericError(xmlGenericErrorContext, "-------------------------\n");
-    if (doc != NULL)
-    {
-        /* validate document */
-        if (validateDocument)
-            result = validateXmlDocument(doc);
-        if (result.good())
-        {
-            /* check whether the document is of the right kind */
-            xmlNodePtr current = xmlDocGetRootElement(doc);
-            if (current != NULL)
-            {
-                /* check namespace declaration (if required) */
-                if (!checkNamespace || (xmlSearchNsByHref(doc, current, OFreinterpret_cast(const xmlChar *, DCMTK_XML_NAMESPACE_URI)) != NULL))
-                {
-                    /* check whether to parse a "file-format" or "data-set" */
-                    if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "file-format")) == 0)
-                    {
-                        OFLOG_INFO(xml2dcmLogger, "parsing file-format ...");
-                        if (metaInfo)
-                            OFLOG_INFO(xml2dcmLogger, "parsing meta-header ...");
-                        else
-                            OFLOG_INFO(xml2dcmLogger, "skipping meta-header ...");
-
-                        current = current->xmlChildrenNode;
-                        /* ignore blank (empty or whitespace only) nodes */
-                        while ((current != NULL) && xmlIsBlankNode(current))
-                            current = current->next;
-                        /* parse/skip "meta-header" */
-                        result = parseMetaHeader(fileformat.getMetaInfo(), current, metaInfo /*parse*/);
-                        if (result.good())
-                        {
-                            current = current->next;
-                            /* ignore blank (empty or whitespace only) nodes */
-                            while ((current != NULL) && xmlIsBlankNode(current))
-                                current = current->next;
-                        }
-                    }
-                    /* there should always be a "data-set" node */
-                    if (result.good())
-                    {
-                        OFLOG_INFO(xml2dcmLogger, "parsing data-set ...");
-                        /* parse "data-set" */
-                        result = checkNode(current, "data-set");
-                        if (result.good())
-                        {
-                            DcmDataset *dataset = fileformat.getDataset();
-                            /* determine stored transfer syntax */
-                            xmlChar *xferUID = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "xfer"));
-                            if (xferUID != NULL)
-                                xfer = DcmXfer(OFreinterpret_cast(char *, xferUID)).getXfer();
-                            result = parseDataSet(dataset, current->xmlChildrenNode, xfer);
-                            /* free allocated memory */
-                            xmlFree(xferUID);
-                        }
-                    }
-                    if (result.bad() && xmlLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
-                    {
-                        /* dump XML document for debugging purposes */
-                        xmlChar *str;
-                        int size;
-                        xmlDocDumpFormatMemory(doc, &str, &size, 1);
-                        OFLOG_DEBUG(xmlLogger, str);
-                        xmlFree(str);
-                    }
-                } else {
-                    OFLOG_ERROR(xml2dcmLogger, "document has wrong type, dcmtk namespace not found");
-                    result = EC_IllegalCall;
-                }
-            } else {
-                OFLOG_ERROR(xml2dcmLogger, "document is empty: " << ifname);
-                result = EC_IllegalCall;
-            }
-        }
-    } else {
-        OFLOG_ERROR(xml2dcmLogger, "could not parse document: " << ifname);
-        result = EC_IllegalCall;
-    }
-    /* free allocated memory */
-    xmlFreeDoc(doc);
-    return result;
-}
-
+static OFLogger xml2dcmLogger = OFLog::getLogger("dcmtk.apps." OFFIS_CONSOLE_APPLICATION);
 
 #define SHORTCOL 3
 #define LONGCOL 21
 
-
 int main(int argc, char *argv[])
 {
     OFBool opt_metaInfo = OFTrue;
@@ -709,6 +59,7 @@ int main(int argc, char *argv[])
     OFBool opt_validate = OFFalse;
     OFBool opt_generateUIDs = OFFalse;
     OFBool opt_overwriteUIDs = OFFalse;
+    OFBool opt_stopOnErrors = OFTrue;
     E_TransferSyntax opt_xfer = EXS_Unknown;
     E_EncodingType opt_enctype = EET_ExplicitLength;
     E_GrpLenEncoding opt_glenc = EGL_recalcGL;
@@ -758,6 +109,9 @@ int main(int argc, char *argv[])
 #ifdef WITH_ZLIB
         cmd.addOption("--write-xfer-deflated", "+td",    "write with deflated expl. VR little endian TS");
 #endif
+      cmd.addSubGroup("error handling:");
+        cmd.addOption("--stop-on-error",       "-E",     "do not write if document is invalid (default)");
+        cmd.addOption("--ignore-errors",       "+E",     "attempt to write even if document is invalid");
       cmd.addSubGroup("post-1993 value representations:");
         cmd.addOption("--enable-new-vr",       "+u",     "enable support for new VRs (UN/UT) (default)");
         cmd.addOption("--disable-new-vr",      "-u",     "disable support for new VRs, convert to OB");
@@ -870,6 +224,11 @@ int main(int argc, char *argv[])
 #endif
         cmd.endOptionBlock();
 
+        cmd.beginOptionBlock();
+        if (cmd.findOption("--stop-on-error")) opt_stopOnErrors = OFTrue;
+        if (cmd.findOption("--ignore-errors")) opt_stopOnErrors = OFFalse;
+        cmd.endOptionBlock();
+
         cmd.beginOptionBlock();
         if (cmd.findOption("--enable-new-vr"))
             dcmEnableGenerationOfNewVRs();
@@ -931,19 +290,8 @@ int main(int argc, char *argv[])
             << DCM_DICT_ENVIRONMENT_VARIABLE);
     }
 
-    /* check for compatible libxml version */
-    LIBXML_TEST_VERSION
-    /* temporary buffer needed for errorFunction - more detailed explanation there */
-    OFString tmpErrorString;
-    /* initialize the XML library (only required for MT-safety) */
-    xmlInitParser();
-    /* do not substitute entities (other than the standard ones) */
-    xmlSubstituteEntitiesDefault(0);
-    /* add line number to debug messages */
-    xmlLineNumbersDefault(1);
-    /* enable libxml warnings and error messages */
-    xmlGetWarningsDefaultValue = 1;
-    xmlSetGenericErrorFunc(&tmpErrorString, errorFunction);
+    // initialize XML parser
+    DcmXMLParseHelper::initLibrary();
 
     OFCondition result = EC_Normal;
     const char *opt_ifname = NULL;
@@ -967,9 +315,10 @@ int main(int argc, char *argv[])
     {
         DcmFileFormat fileformat;
         E_TransferSyntax xfer;
+        DcmXMLParseHelper parser;
         OFLOG_INFO(xml2dcmLogger, "reading XML input file: " << opt_ifname);
         /* read XML file and feed data into DICOM fileformat */
-        result = readXmlFile(opt_ifname, fileformat, xfer, opt_metaInfo, opt_namespace, opt_validate);
+        result = parser.readXmlFile(opt_ifname, fileformat, xfer, opt_metaInfo, opt_namespace, opt_validate, opt_stopOnErrors);
         if (result.good())
         {
             DcmDataset *dataset = fileformat.getDataset();
@@ -1003,7 +352,7 @@ int main(int argc, char *argv[])
                 /* check whether pixel data is compressed */
                 if ((opt_writeMode == EWM_dataset) && DcmXfer(xfer).isEncapsulated())
                 {
-                    OFLOG_ERROR(xml2dcmLogger, "encapsulated pixel data require file format, ignoring --write-dataset");
+                    OFLOG_WARN(xml2dcmLogger, "encapsulated pixel data require file format, ignoring --write-dataset");
                     opt_writeMode = EWM_fileformat;
                 }
                 /* write DICOM file */
@@ -1019,7 +368,7 @@ int main(int argc, char *argv[])
     }
 
     /* clean up XML library before quitting */
-    xmlCleanupParser();
+    DcmXMLParseHelper::cleanupLibrary();
 
     return result.status();
 }
diff --git a/dcmdata/data/OP_template_latin_1.xml b/dcmdata/data/OP_template_latin_1.xml
new file mode 100644 (file)
index 0000000..3a1b49e
--- /dev/null
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+
+<!--
+################################################################################
+# IMG2DCM TEMPLATE FOR OPHTHALMIC PHOTOGRAPHY OBJECTS                          #
+# SOP Classes: 1.2.840.10008.5.1.4.1.1.77.1.5.1 (OPb)                          #
+# SOP Classes: 1.2.840.10008.5.1.4.1.1.77.1.5.2 (OPw)                          #
+################################################################################
+# Type 1:  Value MUST be filled in                                             #
+# Type 1C: Value MUST be filled in if known, if certain condition (see         #
+#          standard) is fulfilled, otherwise LEAVE OUT line                    #
+# Type 2:  Value MUST be filled in if known, MUST be left empty otherwise      #
+# Type 2C: Same as 2, if a certain condition (see standard) is met. If the     #
+#          condition is not met, LEAVE OUT line                                #
+# Type 3:  User optional, CAN be written (if it should not, delete line).      #
+#          The value written can be chosen freely, but has to conform to       #
+#          element's VR (see standard)                                         #
+################################################################################
+-->
+
+<file-format xmlns="http://dicom.offis.de/dcmtk">
+<meta-header xfer="1.2.840.10008.1.2.1" name="Little Endian Explicit"></meta-header>
+<data-set xfer="1.2.840.10008.1.2.1" name="Little Endian Explicit">
+
+  <!-- ===================================================================
+       The following attribute MUST be present and populated if any
+       specific character set is used. In order to prevent conversion
+       errors, the encoding of the XML file (specified in the first line)
+       and the DICOM encoding (specified here) should refer to the same
+       character set, at least for UTF-8 and Latin-1, the character sets
+       internally supported by the XML parser.
+       =================================================================== -->
+
+  <element tag="00008,0005" vr="CS" vm="1" name="SpecificCharacterSet">ISO_IR 100</element>
+
+  <!-- ===================================================================
+       The following attributes are Type 1 and MUST be populated to
+       create a valid Ophthalmic Photography Image
+       =================================================================== -->
+
+  <element tag="0020,0062" vr="CS" vm="1" name="ImageLaterality">L</element>
+  <sequence tag="0022,0015" vr="SQ" name="AcquisitionDeviceTypeCodeSequence">
+    <item>
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">409898007</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Fundus Camera</element>
+    </item>
+  </sequence>
+
+  <!-- ===================================================================
+       The following attribute is  required if the acquisition device type
+       is Fundus Camera. It may be present otherwise.
+       =================================================================== -->
+
+  <element tag="0028,0030" vr="DS" vm="2" name="PixelSpacing">0.02\0.02</element>
+
+  <!-- ===================================================================
+       The following attributes are Type 1. The values for these
+       attributes are automatically generated by default. You can
+       manually override the defaults here.
+       =================================================================== -->
+
+  <element tag="0008,0008" vr="CS" vm="4" name="ImageType">ORIGINAL\PRIMARY</element>
+  <element tag="0008,0023" vr="DA" vm="1" name="ContentDate">20180417</element>
+  <element tag="0008,002a" vr="DT" vm="1" name="AcquisitionDateTime">20210721120000</element>
+  <element tag="0008,0033" vr="TM" vm="1" name="ContentTime">111210.48</element>
+  <element tag="0018,1063" vr="DS" vm="1" name="FrameTime">0</element>
+  <element tag="0018,106a" vr="CS" vm="1" name="SynchronizationTrigger">NO TRIGGER</element>
+  <element tag="0018,1800" vr="CS" vm="1" name="AcquisitionTimeSynchronized">N</element>
+  <element tag="0020,000d" vr="UI" vm="1" name="StudyInstanceUID">1.2.276.0.75.2.1.11.1.1.180417111300315.260535858133367.1000014</element>
+  <element tag="0020,000e" vr="UI" vm="1" name="SeriesInstanceUID">1.2.276.0.75.2.1.11.1.2.180417111335959.260535858133367.1000017</element>
+  <element tag="0020,0200" vr="UI" vm="1" name="SynchronizationFrameOfReferenceUID">1.2.276.0.75.2.1.11.1.5.180417103449651.260535858133367.1000001</element>
+  <element tag="0028,0009" vr="AT" vm="1" name="FrameIncrementPointer">(0018,1063)</element>
+  <element tag="0028,0301" vr="CS" vm="1" name="BurnedInAnnotation">NO</element>
+
+  <!-- ===================================================================
+       The following attributes are Type 2 and will by default be added
+       with empty value. You can populate them with meaningful values here
+       =================================================================== -->
+
+  <element tag="0020,0013" vr="IS" vm="1" name="InstanceNumber">1</element>
+  <element tag="0008,0020" vr="DA" vm="1" name="StudyDate">20210721</element>
+  <element tag="0008,0030" vr="TM" vm="1" name="StudyTime">120000</element>
+  <element tag="0008,0050" vr="SH" vm="0" name="AccessionNumber">987654321</element>
+  <element tag="0008,0070" vr="LO" vm="1" name="Manufacturer">Sample Manufacturer</element>
+  <element tag="0008,0090" vr="PN" vm="0" name="ReferringPhysicianName">Smith^John</element>
+  <element tag="0010,0010" vr="PN" vm="1" name="PatientName">Müller^André</element>
+  <element tag="0010,0020" vr="LO" vm="1" name="PatientID">12345678</element>
+  <element tag="0010,0030" vr="DA" vm="1" name="PatientBirthDate">19500101</element>
+  <element tag="0010,0040" vr="CS" vm="1" name="PatientSex">M</element>
+  <element tag="0018,7004" vr="CS" vm="0" name="DetectorType">CCD</element>
+  <element tag="0020,0010" vr="SH" vm="1" name="StudyID">54321</element>
+  <element tag="0020,0011" vr="IS" vm="1" name="SeriesNumber">12345</element>
+  <element tag="0020,0020" vr="CS" vm="2" name="PatientOrientation">L\F</element>
+  <element tag="0022,0005" vr="CS" vm="0" name="PatientEyeMovementCommanded">NO</element>
+  <element tag="0022,000A" vr="FL" vm="0" name="EmmetropicMagnification">0.0</element>
+  <element tag="0022,000B" vr="FL" vm="0" name="IntraOcularPressure">50.0</element>
+  <element tag="0022,000C" vr="FL" vm="0" name="HorizontalFieldOfView">90.0</element>
+  <element tag="0022,000D" vr="CS" vm="0" name="PupilDilated">NO</element>
+  <sequence tag="0022,0016" vr="SQ" name="IlluminationTypeCodeSequence">
+    <item> <!-- values to be taken from CID 4203 "Ophthalmic Photography Illumination" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">111630</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">DCM</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Dynamic light</element>
+    </item>
+  </sequence>
+  <sequence tag="0022,0017" vr="SQ" name="LightPathFilterTypeStackCodeSequence">
+    <item> <!-- values to be taken from CID 4204 "Ophthalmic Filter" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">445391002</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Polarizing optical filter</element>
+    </item>
+  </sequence>
+  <sequence tag="0022,0018" vr="SQ" name="ImagePathFilterTypeStackCodeSequence">
+    <item> <!-- values to be taken from CID 4204 "Ophthalmic Filter" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">111609</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">DCM</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">No filter</element>
+    </item>
+  </sequence>
+  <sequence tag="0022,0019" vr="SQ" name="LensesCodeSequence">
+    <item> <!-- values to be taken from CID 4205 "Ophthalmic Lens" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">410686000</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Contact fundus lens</element>
+    </item>
+  </sequence>
+  <sequence tag="0022,001B" vr="SQ" name="RefractiveStateSequence">
+    <item>
+      <element tag="0022,0007" vr="FL" vm="1" name="SphericalLensPower">1.0</element>
+      <element tag="0022,0008" vr="FL" vm="1" name="CylinderLensPower">1.0</element>
+      <element tag="0022,0009" vr="FL" vm="1" name="CylinderAxis">2.5</element>
+    </item>
+  </sequence>
+
+  <!-- ===================================================================
+       The following Type 1C sequence is required if the image was generated with contrast
+       =================================================================== -->
+
+  <sequence tag="0018,0012" vr="SQ" name="ContrastBolusAgentSequence">
+    <item> <!-- values to be taken from CID 4200 "Ophthalmic Imaging Agent" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">350086004</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Fluorescein</element>
+      <element tag="0018,9337" vr="US" vm="1" name="ContrastBolusAgentNumber">1</element>
+      <sequence tag="0018,0014" vr="SQ" name="ContrastBolusAdministrationRouteSequence">
+        <item> <!-- values to be taken from CID 11 "Route of Administration" -->
+          <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">47625008</element>
+          <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+          <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Intravenous route</element>
+        </item>
+      </sequence>
+      <sequence tag="0018,9338" vr="SQ" name="ContrastBolusIngredientCodeSequence">
+      </sequence>
+      <element tag="0018,1041" vr="DS" vm="1" name="ContrastBolusVolume"></element>
+      <element tag="0018,1049" vr="DS" vm="1" name="ContrastBolusIngredientConcentration"></element>
+    </item>
+  </sequence>
+
+  <!-- ===================================================================
+       The following Type 1C sequence is required if the value of
+       PatientEyeMovementCommanded is YES.
+       =================================================================== -->
+
+  <sequence tag="0022,0006" vr="SQ" name="PatientEyeMovementCommandCodeSequence">
+    <item> <!-- values to be taken from CID 4201 "Patient Eye Movement Command" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">408744005</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Primary gaze</element>
+    </item>
+  </sequence>
+
+  <!-- ===================================================================
+       The following Type 2C attributes are required if the value of
+       (0022,1622) OphthalmicVolumetricPropertiesFlag is YES. The conditions
+       actually are a bit more complex, see DICOM Part 3, Table C.8.17.5-1
+       "Ocular Region Imaged Module Attributes".
+       =================================================================== -->
+
+  <sequence tag="0022,001D" vr="SQ" name="RelativeImagePositionCodeSequence">
+    <item> <!-- values to be taken from CID 4207 "Ophthalmic Image Position" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">111900</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">DCM</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Macula centered</element>
+    </item>
+  </sequence>
+  <element tag="0022,1624" vr="FL" vm="1" name="OphthalmicAnatomicReferencePointXCoordinate">100</element>
+  <element tag="0022,1626" vr="FL" vm="1" name="OphthalmicAnatomicReferencePointYCoordinate">100</element>
+
+
+  <!-- ===================================================================
+       The following Type 1C attribute is required if the image was generated
+       by a camera producing a two-color image.
+       =================================================================== -->
+
+  <element tag="0028,0003" vr="US" vm="1" name="SamplesPerPixelUsed">2</element>
+
+  <!-- ===================================================================
+       The following Type 1C sequence is required if the colors produced by the camera
+       are different from the natural interpretation of PhotometricInterpretation.
+       The number of items in this sequence must match the value of
+       SamplesPerPixelUsed (if present) or SamplesPerPixel (otherwise).
+       =================================================================== -->
+
+  <sequence tag="0022,001A" vr="SQ" name="ChannelDescriptionCodeSequence">
+    <item> <!-- values to be taken from CID 4206 "Ophthalmic Channel Description" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">414497003</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Infrared</element>
+    </item>
+    <item> <!-- values to be taken from CID 4206 "Ophthalmic Channel Description" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">415770004</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Ultraviolet</element>
+    </item>
+  </sequence>
+
+  <!-- ===================================================================
+       The following attributes are required if the value of PupilDilated is YES.
+       They are Type 2C, however, i.e. may remain empty if the value is not known.
+       =================================================================== -->
+
+  <sequence tag="0022,0058" vr="SQ" name="MydriaticAgentSequence">
+    <item>
+      <sequence tag="0022,001A" vr="SQ" name="MydriaticAgentCodeSequence">
+        <item> <!-- values to be taken from CID 4208 "Mydriatic Agent" -->
+          <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">771928002</element>
+          <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+          <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Atropine</element>
+        </item>
+      </sequence>
+      <element tag="0022,004E" vr="DS" vm="1" name="MydriaticAgentConcentration">0.01</element>
+      <sequence tag="0022,0042" vr="SQ" name="MydriaticAgentConcentrationUnitsSequence">
+        <item> <!-- values to be taken from CID 82 "Units of Measurement", i.e. UCUM -->
+          <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">%</element>
+          <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">UCUM</element>
+          <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Percent</element>
+        </item>
+      </sequence>
+    </item>
+  </sequence>
+  <element tag="0022,000E" vr="FL" vm="1" name="DegreeOfDilation">2.0</element>
+
+</data-set>
+</file-format>
diff --git a/dcmdata/data/OP_template_utf_8.xml b/dcmdata/data/OP_template_utf_8.xml
new file mode 100644 (file)
index 0000000..ccbe92a
--- /dev/null
@@ -0,0 +1,245 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+################################################################################
+# IMG2DCM TEMPLATE FOR OPHTHALMIC PHOTOGRAPHY OBJECTS                          #
+# SOP Classes: 1.2.840.10008.5.1.4.1.1.77.1.5.1 (OPb)                          #
+# SOP Classes: 1.2.840.10008.5.1.4.1.1.77.1.5.2 (OPw)                          #
+################################################################################
+# Type 1:  Value MUST be filled in                                             #
+# Type 1C: Value MUST be filled in if known, if certain condition (see         #
+#          standard) is fulfilled, otherwise LEAVE OUT line                    #
+# Type 2:  Value MUST be filled in if known, MUST be left empty otherwise      #
+# Type 2C: Same as 2, if a certain condition (see standard) is met. If the     #
+#          condition is not met, LEAVE OUT line                                #
+# Type 3:  User optional, CAN be written (if it should not, delete line).      #
+#          The value written can be chosen freely, but has to conform to       #
+#          element's VR (see standard)                                         #
+################################################################################
+-->
+
+<file-format xmlns="http://dicom.offis.de/dcmtk">
+<meta-header xfer="1.2.840.10008.1.2.1" name="Little Endian Explicit"></meta-header>
+<data-set xfer="1.2.840.10008.1.2.1" name="Little Endian Explicit">
+
+  <!-- ===================================================================
+       The following attribute MUST be present and populated if any
+       specific character set is used. In order to prevent conversion
+       errors, the encoding of the XML file (specified in the first line)
+       and the DICOM encoding (specified here) should refer to the same
+       character set, at least for UTF-8 and Latin-1, the character sets
+       internally supported by the XML parser.
+       =================================================================== -->
+
+  <element tag="00008,0005" vr="CS" vm="1" name="SpecificCharacterSet">ISO_IR 192</element>
+
+  <!-- ===================================================================
+       The following attributes are Type 1 and MUST be populated to
+       create a valid Ophthalmic Photography Image
+       =================================================================== -->
+
+  <element tag="0020,0062" vr="CS" vm="1" name="ImageLaterality">L</element>
+  <sequence tag="0022,0015" vr="SQ" name="AcquisitionDeviceTypeCodeSequence">
+    <item>
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">409898007</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Fundus Camera</element>
+    </item>
+  </sequence>
+
+  <!-- ===================================================================
+       The following attribute is  required if the acquisition device type
+       is Fundus Camera. It may be present otherwise.
+       =================================================================== -->
+
+  <element tag="0028,0030" vr="DS" vm="2" name="PixelSpacing">0.02\0.02</element>
+
+  <!-- ===================================================================
+       The following attributes are Type 1. The values for these
+       attributes are automatically generated by default. You can
+       manually override the defaults here.
+       =================================================================== -->
+
+  <element tag="0008,0008" vr="CS" vm="4" name="ImageType">ORIGINAL\PRIMARY</element>
+  <element tag="0008,0023" vr="DA" vm="1" name="ContentDate">20180417</element>
+  <element tag="0008,002a" vr="DT" vm="1" name="AcquisitionDateTime">20210721120000</element>
+  <element tag="0008,0033" vr="TM" vm="1" name="ContentTime">111210.48</element>
+  <element tag="0018,1063" vr="DS" vm="1" name="FrameTime">0</element>
+  <element tag="0018,106a" vr="CS" vm="1" name="SynchronizationTrigger">NO TRIGGER</element>
+  <element tag="0018,1800" vr="CS" vm="1" name="AcquisitionTimeSynchronized">N</element>
+  <element tag="0020,000d" vr="UI" vm="1" name="StudyInstanceUID">1.2.276.0.75.2.1.11.1.1.180417111300315.260535858133367.1000014</element>
+  <element tag="0020,000e" vr="UI" vm="1" name="SeriesInstanceUID">1.2.276.0.75.2.1.11.1.2.180417111335959.260535858133367.1000017</element>
+  <element tag="0020,0200" vr="UI" vm="1" name="SynchronizationFrameOfReferenceUID">1.2.276.0.75.2.1.11.1.5.180417103449651.260535858133367.1000001</element>
+  <element tag="0028,0009" vr="AT" vm="1" name="FrameIncrementPointer">(0018,1063)</element>
+  <element tag="0028,0301" vr="CS" vm="1" name="BurnedInAnnotation">NO</element>
+
+  <!-- ===================================================================
+       The following attributes are Type 2 and will by default be added
+       with empty value. You can populate them with meaningful values here
+       =================================================================== -->
+
+  <element tag="0020,0013" vr="IS" vm="1" name="InstanceNumber">1</element>
+  <element tag="0008,0020" vr="DA" vm="1" name="StudyDate">20210721</element>
+  <element tag="0008,0030" vr="TM" vm="1" name="StudyTime">120000</element>
+  <element tag="0008,0050" vr="SH" vm="0" name="AccessionNumber">987654321</element>
+  <element tag="0008,0070" vr="LO" vm="1" name="Manufacturer">Sample Manufacturer</element>
+  <element tag="0008,0090" vr="PN" vm="0" name="ReferringPhysicianName">Smith^John</element>
+  <element tag="0010,0010" vr="PN" vm="1" name="PatientName">Müller^André</element>
+  <element tag="0010,0020" vr="LO" vm="1" name="PatientID">12345678</element>
+  <element tag="0010,0030" vr="DA" vm="1" name="PatientBirthDate">19500101</element>
+  <element tag="0010,0040" vr="CS" vm="1" name="PatientSex">M</element>
+  <element tag="0018,7004" vr="CS" vm="0" name="DetectorType">CCD</element>
+  <element tag="0020,0010" vr="SH" vm="1" name="StudyID">54321</element>
+  <element tag="0020,0011" vr="IS" vm="1" name="SeriesNumber">12345</element>
+  <element tag="0020,0020" vr="CS" vm="2" name="PatientOrientation">L\F</element>
+  <element tag="0022,0005" vr="CS" vm="0" name="PatientEyeMovementCommanded">NO</element>
+  <element tag="0022,000A" vr="FL" vm="0" name="EmmetropicMagnification">0.0</element>
+  <element tag="0022,000B" vr="FL" vm="0" name="IntraOcularPressure">50.0</element>
+  <element tag="0022,000C" vr="FL" vm="0" name="HorizontalFieldOfView">90.0</element>
+  <element tag="0022,000D" vr="CS" vm="0" name="PupilDilated">NO</element>
+  <sequence tag="0022,0016" vr="SQ" name="IlluminationTypeCodeSequence">
+    <item> <!-- values to be taken from CID 4203 "Ophthalmic Photography Illumination" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">111630</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">DCM</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Dynamic light</element>
+    </item>
+  </sequence>
+  <sequence tag="0022,0017" vr="SQ" name="LightPathFilterTypeStackCodeSequence">
+    <item> <!-- values to be taken from CID 4204 "Ophthalmic Filter" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">445391002</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Polarizing optical filter</element>
+    </item>
+  </sequence>
+  <sequence tag="0022,0018" vr="SQ" name="ImagePathFilterTypeStackCodeSequence">
+    <item> <!-- values to be taken from CID 4204 "Ophthalmic Filter" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">111609</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">DCM</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">No filter</element>
+    </item>
+  </sequence>
+  <sequence tag="0022,0019" vr="SQ" name="LensesCodeSequence">
+    <item> <!-- values to be taken from CID 4205 "Ophthalmic Lens" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">410686000</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Contact fundus lens</element>
+    </item>
+  </sequence>
+  <sequence tag="0022,001B" vr="SQ" name="RefractiveStateSequence">
+    <item>
+      <element tag="0022,0007" vr="FL" vm="1" name="SphericalLensPower">1.0</element>
+      <element tag="0022,0008" vr="FL" vm="1" name="CylinderLensPower">1.0</element>
+      <element tag="0022,0009" vr="FL" vm="1" name="CylinderAxis">2.5</element>
+    </item>
+  </sequence>
+
+  <!-- ===================================================================
+       The following Type 1C sequence is required if the image was generated with contrast
+       =================================================================== -->
+
+  <sequence tag="0018,0012" vr="SQ" name="ContrastBolusAgentSequence">
+    <item> <!-- values to be taken from CID 4200 "Ophthalmic Imaging Agent" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">350086004</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Fluorescein</element>
+      <element tag="0018,9337" vr="US" vm="1" name="ContrastBolusAgentNumber">1</element>
+      <sequence tag="0018,0014" vr="SQ" name="ContrastBolusAdministrationRouteSequence">
+        <item> <!-- values to be taken from CID 11 "Route of Administration" -->
+          <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">47625008</element>
+          <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+          <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Intravenous route</element>
+        </item>
+      </sequence>
+      <sequence tag="0018,9338" vr="SQ" name="ContrastBolusIngredientCodeSequence">
+      </sequence>
+      <element tag="0018,1041" vr="DS" vm="1" name="ContrastBolusVolume"></element>
+      <element tag="0018,1049" vr="DS" vm="1" name="ContrastBolusIngredientConcentration"></element>
+    </item>
+  </sequence>
+
+  <!-- ===================================================================
+       The following Type 1C sequence is required if the value of
+       PatientEyeMovementCommanded is YES.
+       =================================================================== -->
+
+  <sequence tag="0022,0006" vr="SQ" name="PatientEyeMovementCommandCodeSequence">
+    <item> <!-- values to be taken from CID 4201 "Patient Eye Movement Command" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">408744005</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Primary gaze</element>
+    </item>
+  </sequence>
+
+  <!-- ===================================================================
+       The following Type 2C attributes are required if the value of
+       (0022,1622) OphthalmicVolumetricPropertiesFlag is YES. The conditions
+       actually are a bit more complex, see DICOM Part 3, Table C.8.17.5-1
+       "Ocular Region Imaged Module Attributes".
+       =================================================================== -->
+
+  <sequence tag="0022,001D" vr="SQ" name="RelativeImagePositionCodeSequence">
+    <item> <!-- values to be taken from CID 4207 "Ophthalmic Image Position" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">111900</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">DCM</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Macula centered</element>
+    </item>
+  </sequence>
+  <element tag="0022,1624" vr="FL" vm="1" name="OphthalmicAnatomicReferencePointXCoordinate">100</element>
+  <element tag="0022,1626" vr="FL" vm="1" name="OphthalmicAnatomicReferencePointYCoordinate">100</element>
+
+
+  <!-- ===================================================================
+       The following Type 1C attribute is required if the image was generated
+       by a camera producing a two-color image.
+       =================================================================== -->
+
+  <element tag="0028,0003" vr="US" vm="1" name="SamplesPerPixelUsed">2</element>
+
+  <!-- ===================================================================
+       The following Type 1C sequence is required if the colors produced by the camera
+       are different from the natural interpretation of PhotometricInterpretation.
+       The number of items in this sequence must match the value of
+       SamplesPerPixelUsed (if present) or SamplesPerPixel (otherwise).
+       =================================================================== -->
+
+  <sequence tag="0022,001A" vr="SQ" name="ChannelDescriptionCodeSequence">
+    <item> <!-- values to be taken from CID 4206 "Ophthalmic Channel Description" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">414497003</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Infrared</element>
+    </item>
+    <item> <!-- values to be taken from CID 4206 "Ophthalmic Channel Description" -->
+      <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">415770004</element>
+      <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+      <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Ultraviolet</element>
+    </item>
+  </sequence>
+
+  <!-- ===================================================================
+       The following attributes are required if the value of PupilDilated is YES.
+       They are Type 2C, however, i.e. may remain empty if the value is not known.
+       =================================================================== -->
+
+  <sequence tag="0022,0058" vr="SQ" name="MydriaticAgentSequence">
+    <item>
+      <sequence tag="0022,001A" vr="SQ" name="MydriaticAgentCodeSequence">
+        <item> <!-- values to be taken from CID 4208 "Mydriatic Agent" -->
+          <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">771928002</element>
+          <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">SCT</element>
+          <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Atropine</element>
+        </item>
+      </sequence>
+      <element tag="0022,004E" vr="DS" vm="1" name="MydriaticAgentConcentration">0.01</element>
+      <sequence tag="0022,0042" vr="SQ" name="MydriaticAgentConcentrationUnitsSequence">
+        <item> <!-- values to be taken from CID 82 "Units of Measurement", i.e. UCUM -->
+          <element tag="0008,0100" vr="SH" vm="1" name="CodeValue">%</element>
+          <element tag="0008,0102" vr="SH" vm="1" name="CodingSchemeDesignator">UCUM</element>
+          <element tag="0008,0104" vr="LO" vm="1" name="CodeMeaning">Percent</element>
+        </item>
+      </sequence>
+    </item>
+  </sequence>
+  <element tag="0022,000E" vr="FL" vm="1" name="DegreeOfDilation">2.0</element>
+
+</data-set>
+</file-format>
index 698639491d661777081e77fc8c87cc7214eed3ed..0545115ad94d9276f9255bcb6b7fff21418dcd29 100644 (file)
@@ -1,5 +1,5 @@
 #
-#  Copyright (C) 1994-2020, OFFIS e.V.
+#  Copyright (C) 1994-2022, OFFIS e.V.
 #  All rights reserved.  See COPYRIGHT file for details.
 #
 #  This software and supporting documentation were developed by
@@ -21,8 +21,8 @@
 # DICONDE (Digital Imaging and Communication in Nondestructive Evaluation) and
 # DICOS (Digital Imaging and Communications in Security) standard.
 #
-# Generated automatically from DICOM PS 3.6-2020e and PS 3.7-2020e
-# File created on 2020-11-24 14:44:39 by J. Riesmeier on thinkpad.
+# Generated automatically from DICOM PS 3.6-2022b and PS 3.7-2022b.
+# File created on 2022-04-11 09:58:24 by J. Riesmeier on thinkpad2.
 #
 # In addition, the data dictionary entries from the following final text
 # supplements and correction items (CP) have been incorporated:
 (0008,0014)    UI      InstanceCreatorUID      1       DICOM
 (0008,0015)    DT      InstanceCoercionDateTime        1       DICOM
 (0008,0016)    UI      SOPClassUID     1       DICOM
+(0008,0017)    UI      AcquisitionUID  1       DICOM
 (0008,0018)    UI      SOPInstanceUID  1       DICOM
+(0008,0019)    UI      PyramidUID      1       DICOM
 (0008,001A)    UI      RelatedGeneralSOPClassUID       1-n     DICOM
 (0008,001B)    UI      OriginalSpecializedSOPClassUID  1       DICOM
 (0008,0020)    DA      StudyDate       1       DICOM
 (0008,1072)    SQ      OperatorIdentificationSequence  1       DICOM
 (0008,1080)    LO      AdmittingDiagnosesDescription   1-n     DICOM
 (0008,1084)    SQ      AdmittingDiagnosesCodeSequence  1       DICOM
+(0008,1088)    LO      PyramidDescription      1       DICOM
 (0008,1090)    LO      ManufacturerModelName   1       DICOM
 (0008,1110)    SQ      ReferencedStudySequence 1       DICOM
 (0008,1111)    SQ      ReferencedPerformedProcedureStepSequence        1       DICOM
 (0014,3077)    TM      TimeOfGainCalibration   1       DICOM/DICONDE
 (0014,3080)    OB      BadPixelImage   1       DICOM/DICONDE
 (0014,3099)    LT      CalibrationNotes        1       DICOM/DICONDE
+(0014,3100)    LT      LinearityCorrectionTechnique    1       DICOM/DICONDE
+(0014,3101)    LT      BeamHardeningCorrectionTechnique        1       DICOM/DICONDE
 (0014,4002)    SQ      PulserEquipmentSequence 1       DICOM/DICONDE
 (0014,4004)    CS      PulserType      1       DICOM/DICONDE
 (0014,4006)    LT      PulserNotes     1       DICOM/DICONDE
 (0014,409C)    DS      TranslationRateX        1       DICOM/DICONDE
 (0014,409D)    DS      TranslationRateY        1       DICOM/DICONDE
 (0014,409F)    DS      ChannelOverlap  1       DICOM/DICONDE
-(0014,40A0)    LO      ImageQualityIndicatorType       1       DICOM/DICONDE
-(0014,40A1)    LO      ImageQualityIndicatorMaterial   1       DICOM/DICONDE
-(0014,40A2)    LO      ImageQualityIndicatorSize       1       DICOM/DICONDE
+(0014,40A0)    LO      ImageQualityIndicatorType       1-n     DICOM/DICONDE
+(0014,40A1)    LO      ImageQualityIndicatorMaterial   1-n     DICOM/DICONDE
+(0014,40A2)    LO      ImageQualityIndicatorSize       1-n     DICOM/DICONDE
 (0014,5002)    IS      LINACEnergy     1       DICOM/DICONDE
 (0014,5004)    IS      LINACOutput     1       DICOM/DICONDE
 (0014,5100)    US      ActiveAperture  1       DICOM/DICONDE
 (0018,11A3)    DS      CompressionPressure     1       DICOM
 (0018,11A4)    LO      PaddleDescription       1       DICOM
 (0018,11A5)    DS      CompressionContactArea  1       DICOM
+(0018,11B0)    LO      AcquisitionMode 1       DICOM
+(0018,11B1)    LO      DoseModeName    1       DICOM
+(0018,11B2)    CS      AcquiredSubtractionMaskFlag     1       DICOM
+(0018,11B3)    CS      FluoroscopyPersistenceFlag      1       DICOM
+(0018,11B4)    CS      FluoroscopyLastImageHoldPersistenceFlag 1       DICOM
+(0018,11B5)    IS      UpperLimitNumberOfPersistentFluoroscopyFrames   1       DICOM
+(0018,11B6)    CS      ContrastBolusAutoInjectionTriggerFlag   1       DICOM
+(0018,11B7)    FD      ContrastBolusInjectionDelay     1       DICOM
+(0018,11B8)    SQ      XAAcquisitionPhaseDetailsSequence       1       DICOM
+(0018,11B9)    FD      XAAcquisitionFrameRate  1       DICOM
+(0018,11BA)    SQ      XAPlaneDetailsSequence  1       DICOM
+(0018,11BB)    LO      AcquisitionFieldOfViewLabel     1       DICOM
+(0018,11BC)    SQ      XRayFilterDetailsSequence       1       DICOM
+(0018,11BD)    FD      XAAcquisitionDuration   1       DICOM
+(0018,11BE)    CS      ReconstructionPipelineType      1       DICOM
+(0018,11BF)    SQ      ImageFilterDetailsSequence      1       DICOM
+(0018,11C0)    CS      AppliedMaskSubtractionFlag      1       DICOM
+(0018,11C1)    SQ      RequestedSeriesDescriptionCodeSequence  1       DICOM
 (0018,1200)    DA      DateOfLastCalibration   1-n     DICOM
 (0018,1201)    TM      TimeOfLastCalibration   1-n     DICOM
 (0018,1202)    DT      DateTimeOfLastCalibration       1       DICOM
+(0018,1203)    DT      CalibrationDateTime     1       DICOM
 (0018,1210)    SH      ConvolutionKernel       1-n     DICOM
 (0018,1242)    IS      ActualFrameDuration     1       DICOM
 (0018,1243)    IS      CountRate       1       DICOM
 (0018,6058)    UL      TableOfPixelValues      1-n     DICOM
 (0018,605A)    FL      TableOfParameterValues  1-n     DICOM
 (0018,6060)    FL      RWaveTimeVector 1-n     DICOM
+(0018,6070)    US      ActiveImageAreaOverlayGroup     1       DICOM
 (0018,7000)    CS      DetectorConditionsNominalFlag   1       DICOM
 (0018,7001)    DS      DetectorTemperature     1       DICOM
 (0018,7004)    CS      DetectorType    1       DICOM
 (0018,9321)    SQ      CTExposureSequence      1       DICOM
 (0018,9322)    FD      ReconstructionPixelSpacing      2       DICOM
 (0018,9323)    CS      ExposureModulationType  1-n     DICOM
-(0018,9324)    FD      EstimatedDoseSaving     1       DICOM
 (0018,9325)    SQ      CTXRayDetailsSequence   1       DICOM
 (0018,9326)    SQ      CTPositionSequence      1       DICOM
 (0018,9327)    FD      TablePosition   1       DICOM
 (0020,0013)    IS      InstanceNumber  1       DICOM
 (0020,0019)    IS      ItemNumber      1       DICOM
 (0020,0020)    CS      PatientOrientation      2       DICOM
+(0020,0027)    LO      PyramidLabel    1       DICOM
 (0020,0032)    DS      ImagePositionPatient    3       DICOM
 (0020,0037)    DS      ImageOrientationPatient 6       DICOM
 (0020,0052)    UI      FrameOfReferenceUID     1       DICOM
 (0022,1628)    SQ      OphthalmicEnFaceImageQualityRatingSequence      1       DICOM
 (0022,1630)    DS      QualityThreshold        1       DICOM
 (0022,1640)    SQ      OCTBscanAnalysisAcquisitionParametersSequence   1       DICOM
-(0022,1642)    UL      NumberofBscansPerFrame  1       DICOM
+(0022,1642)    UL      NumberOfBscansPerFrame  1       DICOM
 (0022,1643)    FL      BscanSlabThickness      1       DICOM
 (0022,1644)    FL      DistanceBetweenBscanSlabs       1       DICOM
 (0022,1645)    FL      BscanCycleTime  1       DICOM
 (0032,1034)    SQ      RequestingServiceCodeSequence   1       DICOM
 (0032,1060)    LO      RequestedProcedureDescription   1       DICOM
 (0032,1064)    SQ      RequestedProcedureCodeSequence  1       DICOM
+(0032,1065)    SQ      RequestedLateralityCodeSequence 1       DICOM
 (0032,1066)    UT      ReasonForVisit  1       DICOM
 (0032,1067)    SQ      ReasonForVisitCodeSequence      1       DICOM
 (0032,1070)    LO      RequestedContrastAgent  1       DICOM
 (0040,A027)    LO      VerifyingOrganization   1       DICOM
 (0040,A030)    DT      VerificationDateTime    1       DICOM
 (0040,A032)    DT      ObservationDateTime     1       DICOM
+(0040,A033)    DT      ObservationStartDateTime        1       DICOM
 (0040,A040)    CS      ValueType       1       DICOM
 (0040,A043)    SQ      ConceptNameCodeSequence 1       DICOM
 (0040,A050)    CS      ContinuityOfContent     1       DICOM
 (0040,A730)    SQ      ContentSequence 1       DICOM
 (0040,A801)    SQ      TabulatedValuesSequence 1       DICOM
 (0040,A802)    UL      NumberOfTableRows       1       DICOM
-(0040,A803)    UL      NumbeOfTableColumns     1       DICOM
+(0040,A803)    UL      NumberOfTableColumns    1       DICOM
 (0040,A804)    UL      TableRowNumber  1       DICOM
 (0040,A805)    UL      TableColumnNumber       1       DICOM
 (0040,A806)    SQ      TableRowDefinitionSequence      1       DICOM
 (0048,0112)    DS      ObjectiveLensPower      1       DICOM
 (0048,0113)    DS      ObjectiveLensNumericalAperture  1       DICOM
 (0048,0120)    SQ      PaletteColorLookupTableSequence 1       DICOM
-(0048,0200)    SQ      ReferencedImageNavigationSequence       1       DICOM
-(0048,0201)    US      TopLeftHandCornerOfLocalizerArea        2       DICOM
-(0048,0202)    US      BottomRightHandCornerOfLocalizerArea    2       DICOM
 (0048,0207)    SQ      OpticalPathIdentificationSequence       1       DICOM
 (0048,021A)    SQ      PlanePositionSlideSequence      1       DICOM
 (0048,021E)    SL      ColumnPositionInTotalImagePixelMatrix   1       DICOM
 (0062,0006)    ST      SegmentDescription      1       DICOM
 (0062,0007)    SQ      SegmentationAlgorithmIdentificationSequence     1       DICOM
 (0062,0008)    CS      SegmentAlgorithmType    1       DICOM
-(0062,0009)    LO      SegmentAlgorithmName    1       DICOM
+(0062,0009)    LO      SegmentAlgorithmName    1-n     DICOM
 (0062,000A)    SQ      SegmentIdentificationSequence   1       DICOM
 (0062,000B)    US      ReferencedSegmentNumber 1-n     DICOM
 (0062,000C)    US      RecommendedDisplayGrayscaleValue        1       DICOM
 (0066,001F)    US      VectorDimensionality    1       DICOM
 (0066,0020)    FL      VectorAccuracy  1-n     DICOM
 (0066,0021)    OF      VectorCoordinateData    1       DICOM
+(0066,0022)    OD      DoublePointCoordinatesData      1       DICOM
 (0066,0026)    SQ      TriangleStripSequence   1       DICOM
 (0066,0027)    SQ      TriangleFanSequence     1       DICOM
 (0066,0028)    SQ      LineSequence    1       DICOM
 (0068,7003)    SQ      ModelUsageCodeSequence  1       DICOM
 (0068,7004)    UI      ModelGroupUID   1       DICOM
 (0068,7005)    UR      RelativeURIReferenceWithinEncapsulatedDocument  1       DICOM
+(006A,0001)    CS      AnnotationCoordinateType        1       DICOM
+(006A,0002)    SQ      AnnotationGroupSequence 1       DICOM
+(006A,0003)    UI      AnnotationGroupUID      1       DICOM
+(006A,0005)    LO      AnnotationGroupLabel    1       DICOM
+(006A,0006)    UT      AnnotationGroupDescription      1       DICOM
+(006A,0007)    CS      AnnotationGroupGenerationType   1       DICOM
+(006A,0008)    SQ      AnnotationGroupAlgorithmIdentificationSequence  1       DICOM
+(006A,0009)    SQ      AnnotationPropertyCategoryCodeSequence  1       DICOM
+(006A,000A)    SQ      AnnotationPropertyTypeCodeSequence      1       DICOM
+(006A,000B)    SQ      AnnotationPropertyTypeModifierCodeSequence      1       DICOM
+(006A,000C)    UL      NumberOfAnnotations     1       DICOM
+(006A,000D)    CS      AnnotationAppliesToAllOpticalPaths      1       DICOM
+(006A,000E)    SH      ReferencedOpticalPathIdentifier 1-n     DICOM
+(006A,000F)    CS      AnnotationAppliesToAllZPlanes   1       DICOM
+(006A,0010)    FD      CommonZCoordinateValue  1-n     DICOM
+(006A,0011)    OL      AnnotationIndexList     1       DICOM
 (0070,0001)    SQ      GraphicAnnotationSequence       1       DICOM
 (0070,0002)    CS      GraphicLayer    1       DICOM
 (0070,0003)    CS      BoundingBoxAnnotationUnits      1       DICOM
 (2110,0010)    CS      PrinterStatus   1       DICOM
 (2110,0020)    CS      PrinterStatusInfo       1       DICOM
 (2110,0030)    LO      PrinterName     1       DICOM
+(2130,00A0)    SQ      ProposedStudySequence   1       DICOM
+(2130,00C0)    SQ      OriginalImageSequence   1       DICOM
 (2200,0001)    CS      LabelUsingInformationExtractedFromInstances     1       DICOM
 (2200,0002)    UT      LabelText       1       DICOM
 (2200,0003)    CS      LabelStyleSelection     1       DICOM
 (3006,0039)    SQ      ROIContourSequence      1       DICOM
 (3006,0040)    SQ      ContourSequence 1       DICOM
 (3006,0042)    CS      ContourGeometricType    1       DICOM
-(3006,0044)    DS      ContourSlabThickness    1       DICOM
-(3006,0045)    DS      ContourOffsetVector     3       DICOM
 (3006,0046)    IS      NumberOfContourPoints   1       DICOM
 (3006,0048)    IS      ContourNumber   1       DICOM
-(3006,0049)    IS      AttachedContours        1-n     DICOM
+(3006,004A)    SQ      SourcePixelPlanesCharacteristicsSequence        1       DICOM
 (3006,0050)    DS      ContourData     3-3n    DICOM
 (3006,0080)    SQ      RTROIObservationsSequence       1       DICOM
 (3006,0082)    IS      ObservationNumber       1       DICOM
 (3008,00B0)    SQ      RecordedWedgeSequence   1       DICOM
 (3008,00C0)    SQ      RecordedCompensatorSequence     1       DICOM
 (3008,00D0)    SQ      RecordedBlockSequence   1       DICOM
+(3008,00D1)    SQ      RecordedBlockSlabSequence       1       DICOM
 (3008,00E0)    SQ      TreatmentSummaryMeasuredDoseReferenceSequence   1       DICOM
 (3008,00F0)    SQ      RecordedSnoutSequence   1       DICOM
 (3008,00F2)    SQ      RecordedRangeShifterSequence    1       DICOM
 (300A,0007)    TM      RTPlanTime      1       DICOM
 (300A,0009)    LO      TreatmentProtocols      1-n     DICOM
 (300A,000A)    CS      PlanIntent      1       DICOM
-(300A,000B)    LO      TreatmentSites  1-n     DICOM
 (300A,000C)    CS      RTPlanGeometry  1       DICOM
 (300A,000E)    ST      PrescriptionDescription 1       DICOM
 (300A,0010)    SQ      DoseReferenceSequence   1       DICOM
 (300A,029C)    DS      SourceApplicatorWallNominalThickness    1       DICOM
 (300A,029E)    DS      SourceApplicatorWallNominalTransmission 1       DICOM
 (300A,02A0)    DS      SourceApplicatorStepSize        1       DICOM
+(300A,02A1)    IS      ApplicatorShapeReferencedROINumber      1       DICOM
 (300A,02A2)    IS      TransferTubeNumber      1       DICOM
 (300A,02A4)    DS      TransferTubeLength      1       DICOM
 (300A,02B0)    SQ      ChannelShieldSequence   1       DICOM
 (300A,062F)    SQ      CArmPhotonElectronControlPointSequence  1       DICOM
 (300A,0630)    SQ      ReferencedRTRadiationSequence   1       DICOM
 (300A,0631)    SQ      ReferencedRTInstanceSequence    1       DICOM
-(300A,0632)    SQ      ReferencedRTPatientSetupSequence        1       DICOM
 (300A,0634)    FD      SourceToPatientSurfaceDistance  1       DICOM
 (300A,0635)    SQ      TreatmentMachineSpecialModeCodeSequence 1       DICOM
 (300A,0636)    US      IntendedNumberOfFractions       1       DICOM
 (300A,064D)    SQ      RTBeamLimitingDeviceDefinitionSequence  1       DICOM
 (300A,064E)    CS      ParallelRTBeamDelimiterOpeningMode      1       DICOM
 (300A,064F)    CS      ParallelRTBeamDelimiterLeafMountingSide 1-n     DICOM
-(300A,0650)    UI      PatientSetupUID 1       DICOM
 (300A,0651)    SQ      WedgeDefinitionSequence 1       DICOM
 (300A,0652)    FD      RadiationBeamWedgeAngle 1       DICOM
 (300A,0653)    FD      RadiationBeamWedgeThinEdgeDistance      1       DICOM
 (300A,0774)    SQ      DoseMeasurementDeviceCodeSequence       1       DICOM
 (300A,0780)    SQ      AdditionalParameterRecordingInstanceSequence    1       DICOM
 (300A,0783)    ST      InterlockOriginDescription      1       DICOM
+(300A,0784)    SQ      RTPatientPositionScopeSequence  1       DICOM
+(300A,0785)    UI      ReferencedTreatmentPositionGroupUID     1       DICOM
+(300A,0786)    US      RadiationOrderIndex     1       DICOM
+(300A,0787)    SQ      OmittedRadiationSequence        1       DICOM
+(300A,0788)    SQ      ReasonForOmissionCodeSequence   1       DICOM
+(300A,0789)    SQ      RTDeliveryStartPatientPositionSequence  1       DICOM
+(300A,078A)    SQ      RTTreatmentPreparationPatientPositionSequence   1       DICOM
+(300A,078B)    SQ      ReferencedRTTreatmentPreparationSequence        1       DICOM
+(300A,078C)    SQ      ReferencedPatientSetupPhotoSequence     1       DICOM
+(300A,078D)    SQ      PatientTreatmentPreparationMethodCodeSequence   1       DICOM
+(300A,078E)    LT      PatientTreatmentPreparationProcedureParameterDescription        1       DICOM
+(300A,078F)    SQ      PatientTreatmentPreparationDeviceSequence       1       DICOM
+(300A,0790)    SQ      PatientTreatmentPreparationProcedureSequence    1       DICOM
+(300A,0791)    SQ      PatientTreatmentPreparationProcedureCodeSequence        1       DICOM
+(300A,0792)    LT      PatientTreatmentPreparationMethodDescription    1       DICOM
+(300A,0793)    SQ      PatientTreatmentPreparationProcedureParameterSequence   1       DICOM
+(300A,0794)    LT      PatientSetupPhotoDescription    1       DICOM
+(300A,0795)    US      PatientTreatmentPreparationProcedureIndex       1       DICOM
+(300A,0796)    US      ReferencedPatientSetupProcedureIndex    1       DICOM
+(300A,0797)    SQ      RTRadiationTaskSequence 1       DICOM
+(300A,0798)    SQ      RTPatientPositionDisplacementSequence   1       DICOM
+(300A,0799)    SQ      RTPatientPositionSequence       1       DICOM
+(300A,079A)    LO      DisplacementReferenceLabel      1       DICOM
+(300A,079B)    FD      DisplacementMatrix      16      DICOM
+(300A,079C)    SQ      PatientSupportDisplacementSequence      1       DICOM
+(300A,079D)    SQ      DisplacementReferenceLocationCodeSequence       1       DICOM
+(300A,079E)    CS      RTRadiationSetDeliveryUsage     1       DICOM
 (300C,0002)    SQ      ReferencedRTPlanSequence        1       DICOM
 (300C,0004)    SQ      ReferencedBeamSequence  1       DICOM
 (300C,0006)    IS      ReferencedBeamNumber    1       DICOM
 (300C,0111)    SQ      OmittedBeamTaskSequence 1       DICOM
 (300C,0112)    CS      ReasonForOmission       1       DICOM
 (300C,0113)    LO      ReasonForOmissionDescription    1       DICOM
+(300C,0114)    SQ      PrescriptionOverviewSequence    1       DICOM
+(300C,0115)    FL      TotalPrescriptionDose   1       DICOM
+(300C,0116)    SQ      PlanOverviewSequence    1       DICOM
+(300C,0117)    US      PlanOverviewIndex       1       DICOM
+(300C,0118)    US      ReferencedPlanOverviewIndex     1       DICOM
+(300C,0119)    US      NumberOfFractionsIncluded       1       DICOM
+(300C,0120)    SQ      DoseCalibrationConditionsSequence       1       DICOM
+(300C,0121)    FD      AbsorbedDoseToMetersetRatio     1       DICOM
+(300C,0122)    FD      DelineatedRadiationFieldSize    2       DICOM
+(300C,0123)    CS      DoseCalibrationConditionsVerifiedFlag   1       DICOM
+(300C,0124)    FD      CalibrationReferencePointDepth  1       DICOM
+(300C,0125)    SQ      GatingBeamHoldTransitionSequence        1       DICOM
+(300C,0126)    CS      BeamHoldTransition      1       DICOM
+(300C,0127)    DT      BeamHoldTransitionDateTime      1       DICOM
+(300C,0128)    SQ      BeamHoldOriginatingDeviceSequence       1       DICOM
 (300E,0002)    CS      ApprovalStatus  1       DICOM
 (300E,0004)    DA      ReviewDate      1       DICOM
 (300E,0005)    TM      ReviewTime      1       DICOM
 (0018,9166)    CS      RETIRED_BulkMotionStatus        1       DICOM/retired
 (0018,9195)    FD      RETIRED_ChemicalShiftMinimumIntegrationLimitInHz        1       DICOM/retired
 (0018,9196)    FD      RETIRED_ChemicalShiftMaximumIntegrationLimitInHz        1       DICOM/retired
+(0018,9324)    FD      RETIRED_EstimatedDoseSaving     1       DICOM/retired
 (0020,0014)    IS      RETIRED_IsotopeNumber   1       DICOM/retired
 (0020,0015)    IS      RETIRED_PhaseNumber     1       DICOM/retired
 (0020,0016)    IS      RETIRED_IntervalNumber  1       DICOM/retired
 (0040,DB0B)    CS      RETIRED_TemplateExtensionFlag   1       DICOM/retired
 (0040,DB0C)    UI      RETIRED_TemplateExtensionOrganizationUID        1       DICOM/retired
 (0040,DB0D)    UI      RETIRED_TemplateExtensionCreatorUID     1       DICOM/retired
+(0048,0200)    SQ      RETIRED_ReferencedImageNavigationSequence       1       DICOM/retired
+(0048,0201)    US      RETIRED_TopLeftHandCornerOfLocalizerArea        2       DICOM/retired
+(0048,0202)    US      RETIRED_BottomRightHandCornerOfLocalizerArea    2       DICOM/retired
 (0054,1400)    CS      RETIRED_CountsIncluded  1-n     DICOM/retired
 (0054,1401)    CS      RETIRED_DeadTimeCorrectionFlag  1       DICOM/retired
 (0066,0023)    OW      RETIRED_TrianglePointIndexList  1       DICOM/retired
 (2130,0050)    SQ      RETIRED_AnnotationContentSequence       1       DICOM/retired
 (2130,0060)    SQ      RETIRED_ImageOverlayBoxContentSequence  1       DICOM/retired
 (2130,0080)    SQ      RETIRED_PresentationLUTContentSequence  1       DICOM/retired
-(2130,00A0)    SQ      RETIRED_ProposedStudySequence   1       DICOM/retired
-(2130,00C0)    SQ      RETIRED_OriginalImageSequence   1       DICOM/retired
+(3006,0044)    DS      RETIRED_ContourSlabThickness    1       DICOM/retired
+(3006,0045)    DS      RETIRED_ContourOffsetVector     3       DICOM/retired
+(3006,0049)    IS      RETIRED_AttachedContours        1-n     DICOM/retired
 (3006,00B9)    SQ      RETIRED_AdditionalRTROIIdentificationCodeSequence       1       DICOM/retired
 (3006,00C0)    SQ      RETIRED_FrameOfReferenceRelationshipSequence    1       DICOM/retired
 (3006,00C2)    UI      RETIRED_RelatedFrameOfReferenceUID      1       DICOM/retired
 (3006,00C4)    CS      RETIRED_FrameOfReferenceTransformationType      1       DICOM/retired
+(300A,000B)    LO      RETIRED_TreatmentSites  1-n     DICOM/retired
 (300A,0082)    DS      RETIRED_BeamDoseSpecificationPoint      3       DICOM/retired
 (300A,008D)    FL      RETIRED_AverageBeamDosePointDepth       1       DICOM/retired
 (300A,008E)    FL      RETIRED_AverageBeamDosePointEquivalentDepth     1       DICOM/retired
 (300A,008F)    FL      RETIRED_AverageBeamDosePointSSD 1       DICOM/retired
+(300A,0632)    SQ      RETIRED_ReferencedRTPatientSetupSequence        1       DICOM/retired
+(300A,0650)    UI      RETIRED_PatientSetupUID 1       DICOM/retired
 (4000,0010)    LT      RETIRED_Arbitrary       1       DICOM/retired
 (4000,4000)    LT      RETIRED_TextComments    1       DICOM/retired
 (4008,0040)    SH      RETIRED_ResultsID       1       DICOM/retired
index 0a970ea8662a89d068e488bb262bc5500ce80072..05ac79d7e6a73159cf7cca23c03392106c607527 100644 (file)
@@ -277,6 +277,6 @@ It is an error if no data dictionary can be loaded.
 
 \section cda2dcm_copyright COPYRIGHT
 
-Copyright (C) 2018-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2018-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index bde9db1df17d25cfd096368a1958f5ca2252700a..0f61959c4ffde4b2b9fc6d7e63ae339df1a8ca68 100644 (file)
@@ -3,18 +3,21 @@ DICOM DATA DICTIONARY IN DCMTK
 -----------------------------------------------------------------------------
 
 In DICOM, the Data Dictionary (part 6 of the DICOM standard) stores for all
-tags their respective VR, VM, attribute name and other information.  This
+attribute tags their respective VR, VM, name and other information.  This
 information must also be made available in DCMTK.  This is accomplished
 through a global data dictionary class.
 
 The global data dictionary is loaded within a C++ constructor into the global
 DcmDataDictionary class instance called dcmDataDict once it is accessed for
-the first time from the code.  The dictionary content is populated by three
-different approaches:  Either the content (tags, VR, ...) can be compiled
-into the dictionary code, or the dictionary is filled by loading a text file
-on startup from a pre-defined file path (also called an "external" data
-dictionary).  Lastly, DCMTK will load one or more additional external
-dictionaries from the path set in the environment variable DCMDICTPATH, if set.
+the first time from the code.  The initial dictionary content is populated by
+two different approaches:
+
+1. builtin: The content (tags, VR, ...) is compiled into the dictionary code.
+2. external: The dictionary is filled by loading a default text file on
+   startup from a pre-defined file path.
+
+It is also possible to not load any default dictionary on startup at all
+(option "disable" or setting "none", see below).
 
 The built-in approach offers the advantage that a binary will not have to
 load any information from a separate file, which may get lost or used in an
@@ -27,11 +30,14 @@ Mac OS X, etc.) while a built-in dictionary is used on Windows systems.  How
 these defaults can be changed or how both approaches can even be combined is
 further explained below.
 
+There is also an option to evaluate the environment variable DCMDICTPATH and
+to read dictionaries defined therein, see below for details.
+
 -----------------------------------------------------------------------------
 DICTIONARY DEFAULT: AUTOCONF ON POSIX SYSTEMS
 -----------------------------------------------------------------------------
 
-By default on a Posix system the global data dictionary will attempt to load
+By default, on a Posix system the global data dictionary will attempt to load
 the data dictionary from an external file.  The location is pre-configured
 to $DCMTK_DAT_DIR/dicom.dic where $DCMTK_DAT_DIR is DCMTK's data installation
 directory chosen using configure's --datadir option (default value: /dcmtk).
@@ -44,64 +50,44 @@ thus is available to the dictionary code that includes osconfig.h.
 DICTIONARY DEFAULT: CMAKE ON WINDOWS AND POSIX SYSTEMS
 -----------------------------------------------------------------------------
 
-On Windows, the default behavior is to compile a fully-populated DICOM
-dictionary as global data dictionary into the dcmdata library.  Thus, it is
-not required to load an external data dictionary from a file.  However,
-usage of external dictionaries is still possible on Windows by setting the
-environment variable DCMDICTPATH accordingly (see further details below).
+On Windows, the default behavior is to compile a fully-populated built-in data
+dictionary as a global data dictionary into the dcmdata library.  Thus, it is
+not required to load an external data dictionary from a file.
 
-On Posix systems, the default setting is to load the data dictionary from an
-external file (as described in the above section on Autoconf).
+On Posix systems, the default setting when using CMake is to load the data
+dictionary from an external file (as described in the above section on
+Autoconf).
 
 -----------------------------------------------------------------------------
 CHANGING DICTIONARY DEFAULTS
 -----------------------------------------------------------------------------
 
 Autoconf as well as CMake provide options to change their default dictionary
-behavior.  For Autoconf, configure offers the options:
+behavior.  For Autoconf, there are two different options.  The first one is:
 
-  --enable-external-dict    enable loading of external dictionary (default)
-  --disable-external-dict   don't load external dictionary
-  --enable-builtin-dict     enable loading of built-in dictionary (default)
-  --disable-builtin-dict    don't load built-in dictionary
+  --enable-default-dict=TYPE
 
-They can be used to toggle both dictionaries on and off: If the external
-dictionary is turned off, it is not tried to load it from any default
-location.
+Possible values for TYPE are:
 
-When building with CMake, the related options are called
+  "external": Compile with external default dictionary
+  "builtin" : Compile with built-in default dictionary
 
-  - DCMTK_ENABLE_EXTERNAL_DICTIONARY
-  - DCMTK_ENABLE_BUILTIN_DICTIONARY
+With the second option, the default dictionary can be disabled:
 
------------------------------------------------------------------------------
-DICTIONARY LOAD ORDER AND USING MULTIPLE DICTIONARIES
------------------------------------------------------------------------------
+  --disable-default-dict
 
-The built-in dictionary, if enabled, is always loaded first on startup,
-followed by any external dictionary.  Data dictionary entries loaded later in
-the load sequence override entries loaded earlier.
+When building with CMake, the related option is:
 
-Note that most of the time (no matter whether using Autoconf or CMake) it
-makes sense to enable only the built-in dictionary or only the external
-dictionary.  If both external and built-in version are enabled, the global
-data dictionary is populated first with the compiled-in data, and afterwards
-the external dictionary is loaded.  If the latter is the one shipped with
-DCMTK (dicom.dic) then the external dictionary provides no extra information
-since it contains exactly the same data as the built-in one but only takes
-time for loading.  Thus it only makes sense to enable both options if the
-external dictionary is modified to include (only) additional information not
-available in the built-in dictionary.
+  - DCMTK_DEFAULT_DICT
 
-If the user disables both options, no dictionary will be loaded by default
-on startup.  However, a dictionary can be defined using the DCMDICTPATH
-environment variable (see below).  If DCMDICTPATH is used, the default
-external dictionary will not be loaded at all.
+Possible values for this option are:
 
-Application programs should check that a data dictionary has been loaded
-before using the functionality of the dcmdata library.  The absence of
-a data dictionary is likely to cause unexpected behavior (e.g. unknown
-attributes will be encoded using VR=UN).
+  "external": Compile with external default dictionary
+  "builtin" : Compile with built-in default dictionary
+  "none"    : Compile without any default dictionary (same as "disable")
+
+That means, both Autoconf and CMake provide the same functionality.  On Posix
+systems "external" is the default value, while on Windows it is "builtin".
 
 -----------------------------------------------------------------------------
 CUSTOM EXTERNAL DICTIONARIES THROUGH ENVIRONMENT VARIABLE "DCMDICTPATH"
@@ -109,23 +95,26 @@ CUSTOM EXTERNAL DICTIONARIES THROUGH ENVIRONMENT VARIABLE "DCMDICTPATH"
 
 Sometimes it makes sense to change the dictionary that should be loaded
 without recompiling the source code.  This can be done either by modifying
-the dicom.dic that is already loaded, or, by specifying a different location
-in an environment variable that is evaluated on DCMTK startup.  That
-environment variable is called "DCMDICTPATH" and is considered on Windows
-and Posix platforms.  If DCMDICTPATH is not set, the behavior described in
-the sections above takes place (built-in and/or external dictionary from
-default path is loaded).
+the dicom.dic that is already loaded (if using 'external' standard dictionary)
+or by specifying a different location in an environment variable that is
+evaluated on DCMTK startup.  This environment variable is called "DCMDICTPATH"
+and can be used on Windows and Posix systems.
 
+If DCMDICTPATH is not set, the behavior described in the sections above takes
+place (built-in or external dictionary from default path is loaded).
 Otherwise, the file provided in the environment variable DCMDICTPATH is loaded
-and any default external dictionary is ignored (!).  However, note that the
-built-in dictionary (if configured) will be always loaded.
+and any default external dictionary is ignored (!).  Note, however, that the
+built-in dictionary (if configured) is always loaded.
 
 In order to set DCMDICTPATH on Unix, the csh shell command
 
   setenv DCMDICTPATH $HOME/dicom.dic
 
 would cause all applications using the dcmdata library to load the data
-dictionary dicom.dic from the users home directory.
+dictionary dicom.dic from the user's home directory.  When using the bash,
+the command is:
+
+  export DCMDICTPATH=$HOME/dicom.dic
 
 For Windows, the call
 
@@ -134,19 +123,70 @@ For Windows, the call
 will cause all applications using the dcmdata library to load the data
 dictionary dicom.dic from the main directory on drive C.
 
+It is possible to completely disable the evaluation of DCMDICTPATH (e.g. for
+security reasons).  The related configure options controlling this behavior
+are the following:
+
+  --enable-dcmdictpath (default)
+  --disable-dcmdictpath
+
+When building with CMake, the related option is:
+
+  - DCMTK_USE_DCMDICTPATH (on/off, default: on)
+
+By default, DCMDICTPATH evaluation is enabled on both on Windows and Posix
+systems.
+
+-----------------------------------------------------------------------------
+DICTIONARY LOAD ORDER AND USING MULTIPLE DICTIONARIES
+-----------------------------------------------------------------------------
+
+The load behavior is slightly different for built-in and external default
+dictionaries:
+
+If the built-in dictionary is enabled, it will be loaded first on startup.
+DCMTK then checks whether DCMDICTPATH should be evaluated (see above) and, if
+it is set and provides a non-empty value, DCMTK will load all additional
+dictionaries on top of the built-in default dictionary.
+
+If instead the external default dictionary is enabled and DCMDICTPATH
+evaluation is turned off, the external default dictionary will be loaded.
+
+However, if DCMDICTPATH evaluation is enabled and the environment variable
+provides a (non-empty) value, DCMTK will load the dictionary denoted by
+DCMDICTPATH and will not load the external default dictionary at all.
+
+It is not possible to enable both external and built-in default dictionary at
+the same time.
+
+If the user decides to use no default dictionary at all by defining
+(DCMTK_DEFAULT_DICT=none), it is still possible to define a dictionary by
+using the DCMDICTPATH mechanism.  If DCMTK_USE_DCMDICTPATH is turned off
+as well, no dictionary is loaded on startup and the user must populate
+the dictionary using his own code during runtime.
+
+Application programs should check that a data dictionary has been loaded
+before using the functionality of the dcmdata library.  The absence of
+a data dictionary is likely to cause unexpected behavior (e.g. unknown
+attributes will be encoded using VR=UN).
+
 -----------------------------------------------------------------------------
 USING MORE THAN ONE EXTERNAL DICTIONARY
 -----------------------------------------------------------------------------
 
 The DCMDICTPATH environment variable can even refer to several data
 dictionaries separated by colons (":") on Unix systems, or semicolons (";")
-on Windows systems.  Thus the Unix csh command:
+on Windows systems.  Thus the Unix csh command
 
   setenv DCMDICTPATH /usr/local/share/dcmtk/dicom.dic:$HOME/dicom.dic
 
 would cause all applications using the dcmdata library to first load the
 default data dictionary and subsequently load the data dictionary dicom.dic
-from the user's home directory.  On Windows systems, an example would be:
+from the user's home directory.  When using the bash, the command would be:
+
+  export DCMDICTPATH=/usr/local/share/dcmtk/dicom.dic:$HOME/dicom.dic
+
+On Windows systems, the command would be:
 
   set DCMDICTPATH=c:\dcmtk-install\share\dcmtk\dicom.dic;c:\dicom.dic
 
@@ -161,51 +201,55 @@ An example DICOM data dictionary can be found in dcmdata/data/dicom.dic,
 which is also installed (using Autoconf or CMake) and used as the default
 external dictionary (if external default dictionary is enabled).
 
-The example data dictionary is is meant to be complete and includes all
-standard and retired tags from part 6 of the DICOM standard (see the header of
+The example data dictionary is meant to be complete and includes all standard
+and retired attributes from part 6 of the DICOM standard (see the header of
 the file where the implemented version of the standard plus all supplements
 and CPs are listed).  Also contained, since they are included in part 6, are
 the official DICONDE (Digital Imaging and Communication in Nondestructive
-Evaluation) and DICOS (Digital Imaging and Communications in Security) tags.
+Evaluation) and DICOS (Digital Imaging and Communications in Security)
+attributes.
 
 Another example dictionary included is the dcmdata/data/private.dic, which
 includes all private tag information known to DCMTK developers and partly
 taken over from other DICOM toolkits and various other sources like DICOM
-Conformance Statements.  There is no guarantee that the tag information
-contained is valid or even complete.  By default, this dictionary is not
-taken into account.  It can be enabled to load on startup as an extra
-external dictionary using Autoconf's configure option "--enable-private-tags"
-and in CMake using the option "DCMTK_ENABLE_PRIVATE_TAGS".  Enabling will
-result in private.dic being added to the DCM_DICT_DEFAULT_PATH, which lists
-those external dictionaries to be loaded on startup (see above).  Note that
-the private tag option is only considered for external dictionaries if
-external dictionaries are not turned off.
+Conformance Statements.  There is no guarantee that the information contained
+is valid or even complete.  By default, this dictionary is not taken into
+account.  It can be enabled to load on startup as an extra external dictionary
+using Autoconf's configure option --enable-private-tags and in CMake using the
+option DCMTK_ENABLE_PRIVATE_TAGS.  Enabling will result in private.dic being
+added to the DCM_DICT_DEFAULT_PATH, which lists those external dictionaries to
+be loaded on startup (see above).  Note that the private tag option is only
+considered for external dictionaries if external dictionaries are not disabled.
 
 DCMTK also includes two predefined built-in dictionaries, one fully populated
-containing the information from DCMTK's dicom.dic file, and one that is empty.
-Both are defined in dcdictbi.cc and the one to be used is selected by the
-built-in dictionary build options (see above).
+containing the information from DCMTK's dicom.dic file (and possibly from the
+private.dic file if enabled, see next paragraph), and one that is empty.  Both
+are defined in dcdictbi.cc and the one to be used is selected by the dictionary
+build options (see above).
 
 The code for a useful built-in data dictionary can be regenerated at any time
 by the mkdictbi program (dcmdata/libsrc/mkdictbi).  The dcmdata library
 Makefiles (for Autoconf dcmdata/libsrc/Makefile.in, and for CMake
-dcmdata/libsrc/CMakeLists.txt) include a target (updatebuiltindict) for this
-purpose.  After regenerating dcdictbi.cc, rebuilding the libdcmdata.a library
-and relinking all your applications will ensure that the built-in data
-dictionary is used.
+dcmdata/libsrc/CMakeLists.txt) provide a target (updatebuiltindict) for this
+purpose.  After regenerating dcdictbi.cc, rebuilding the dcmdata library and
+relinking all applications will ensure that the built-in data dictionary is
+used.  This dictionary contains all definitions from the dicom.dic and
+private.dic file.  Please note, however, that the latter is only available if
+support for private tags has been enabled during DCMTK configuration and thus
+ENABLE_PRIVATE_TAGS is defined in osconfig.h.
 
 -----------------------------------------------------------------------------
 TAG NAME CONSTANTS FOR USE IN APPLICATIONS
 -----------------------------------------------------------------------------
 
 The include file dcmdata/include/dcmtk/dcmdata/dcdeftag.h can be generated
-from a data dictionary by the program mkdeftag.  The include file defines tag
-names for use in application programs.  The names are generated from the names
-specified in the data dictionary.  Duplicate names in the data dictionary will
-result in compiler warnings due to duplicate #define's when compiling code
-that includes the dcdeftag.h header file.  Thus, when adding new entries to
-the data dictionary, care should be taken to ensure that attribute names are
-not duplicated for distinct tags.
+from a data dictionary by the program mkdeftag.  The include file defines
+attribute tag names for use in application programs.  The names are generated
+from the official keywords specified in the data dictionary.  Duplicate names
+in the data dictionary will result in compiler warnings due to duplicate
+#define's when compiling code that includes the dcdeftag.h header file.
+Thus, when adding new entries to the data dictionary, care should be taken to
+ensure that attribute names are not duplicated for distinct tags.
 
 The dcmdata library Makefiles (for Autoconf dcmdata/libsrc/Makefile.in and for
 CMake dcmdata/libsrc/CMakeLists.txt) include a target (updatedeftag) that
@@ -220,4 +264,4 @@ subsequently fail to compile.
 
 DCMTK Development Team, Oldenburg, Germany
 
-Last revised: 2018-09-04 (Onken).
+Last revised: 2021-08-31 (Riesmeier).
index c202d2a8300cfef0544a5233c634d923ad6c8f8e..6245e06d80724508417f14ed03f574b7440fced4 100644 (file)
@@ -213,7 +213,7 @@ the following (see DICOM Part 18 Section F for details):
         ]
     },
     "00100030": {
-        "vr": "DT",
+        "vr": "DA",
         "Value": [
             "19670701"
         ]
@@ -295,6 +295,18 @@ useful for large amounts of data, such as pixel data.
 
 \section dcm2json_notes NOTES
 
+\subsection dcm2json_numbers_as_strings Numbers as Strings
+
+The DICOM standard allows certain numeric DICOM value representations, DS, IS,
+SV and UV, to be converted either to a JSON number or a JSON string.
+\b dcm2json converts DS and IS values to JSON numbers if they are valid decimal
+strings or integer strings, and to strings if they contain any illegal
+character.  \b dcm2json converts SV and UV values to numbers if they are not
+larger than 9007199254740991ll or smaller than -9007199254740991ll, and to
+strings otherwise.  While the JSON specification permits larger numbers, these
+are the largest integers that JavaScript can handle.  Therefore, many JSON
+parsers cannot process larger numbers.
+
 \subsection dcm2json_character_encoding Character Encoding
 
 As required by the DICOM JSON encoding, \b dcm2json always creates output in
@@ -389,6 +401,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcm2json_copyright COPYRIGHT
 
-Copyright (C) 2016-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2016-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index d508af6bcd32148e695b5934f9b42a19050406f6..0ec0508b4cb8254510a0298e49024f728b0dea91 100644 (file)
@@ -206,6 +206,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcm2pdf_copyright COPYRIGHT
 
-Copyright (C) 2007-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2007-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 6ed33efb66f719b331d418f08a27ceb9ba3849ff..7c2313859faa3ccadd8c801eeaf75f23fae90871 100644 (file)
@@ -391,6 +391,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcm2xml_copyright COPYRIGHT
 
-Copyright (C) 2002-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2002-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index bb266eabadaf9a92709d0a7b3783512219b0bde1..dce91abf8f197a7fb403b1fe0d8ee318ee6222b2 100644 (file)
@@ -387,6 +387,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmconv_copyright COPYRIGHT
 
-Copyright (C) 1994-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1994-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 64ad7d5c99df5bc93e704c1dc24cc52825f54000..7d2553a2605ca7096b52a9c475aaaff8dfb2359a 100644 (file)
@@ -258,6 +258,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmcrle_copyright COPYRIGHT
 
-Copyright (C) 2002-2018 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2002-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 4dea8e34305dd74a38dd6ca14d7c3aec395123cf..037a9e39464faa787f0200770c3915e76ed12889 100644 (file)
@@ -247,6 +247,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmdrle_copyright COPYRIGHT
 
-Copyright (C) 2002-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany
+Copyright (C) 2002-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany
 
 */
index 2fa40ada61e61312e2637415b107a96685d0673c..08256f4d28510edea88f42dbb9f6441a5a25e1e0 100644 (file)
@@ -423,6 +423,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmdump_copyright COPYRIGHT
 
-Copyright (C) 1994-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1994-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 159ccaa769f483383c1b13e2f0b25f85e086d8ab..a2b39b4daa8a9f473b9bf2c313f761a819bf4921 100644 (file)
@@ -39,6 +39,6 @@ is intended for use in shell script programming.
 
 \section dcmftest_copyright COPYRIGHT
 
-Copyright (C) 1997-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1997-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 34993f6550f26e5b1577c6ef681559b579d44d77..d12c0ea846a30c77890f6e5ec19990642ea3789c 100644 (file)
@@ -296,6 +296,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmgpdir_copyright COPYRIGHT
 
-Copyright (C) 1996-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1996-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 69d740012f8000a8cd8e9d2f7bb756308462a30a..d3a7f67289e281071e59dd1f6c66835d3cd86539 100644 (file)
@@ -590,6 +590,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmodify_copyright COPYRIGHT
 
-Copyright (C) 2003-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2003-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 0029114fb80b39a5e831c86ac7924b65433af83a..a9a9a13d0253459d3a3c03fdb0746ef718410632 100644 (file)
@@ -314,6 +314,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dump2dcm_copyright COPYRIGHT
 
-Copyright (C) 1996-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1996-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 125b8749b63ac49449c692190fa4d90ef184d780..46015349669e16e42d9e7031a0d10411f863a570 100644 (file)
@@ -9,7 +9,7 @@
 \section img2dcm_synopsis SYNOPSIS
 
 \verbatim
-img2dcm [options] imgfile-in dcmfile-out
+img2dcm [options] imgfile-in... dcmfile-out
 \endverbatim
 
 \section img2dcm_description DESCRIPTION
@@ -22,16 +22,11 @@ for the resulting DICOM object. \b img2dcm can also be configured to invent
 missing DICOM type 1 and type 2 attributes to work even without any template
 dataset.
 
-\b img2dcm only supports single-frame output so far, i.e. it is not possible to
-create multi-frame objects. Thus, also output SOP Classes that potentially
-allow multiple frames within one object (such as the new Secondary Capture SOP
-Classes) can only be created containing a single frame.
-
 \section img2dcm_parameters PARAMETERS
 \verbatim
-imgfile-in   image file to be imported
+imgfile-in   image input filename
 
-dcmfile-out  DICOM output file
+dcmfile-out  DICOM output filename
 \endverbatim
 
 \section img2dcm_options OPTIONS
@@ -73,6 +68,9 @@ general:
   -df   --dataset-from  [f]ilename: string
           use dataset from DICOM file f
 
+  -dx   --dataset-from-xml  [f]ilename: string
+          use dataset from XML file f
+
   -stf  --study-from  [f]ilename: string
           read patient/study from DICOM file f
 
@@ -95,6 +93,17 @@ JPEG format:
 
   -ka   --keep-appn
           keep APPn sections (except JFIF)
+
+  -rc   --remove-com
+          remove COM segment
+
+XML validation:
+
+  +Vd   --validate-document
+          validate XML document against DTD
+
+  +Vn   --check-namespace
+          check XML namespace in document root
 \endverbatim
 
 \subsection img2dcm_processing_options processing options
@@ -116,20 +125,22 @@ attribute checking:
           (only with --do-checks)
 
   +i1   --invent-type1
-          invent missing type 1 attributes
+          invent missing type 1 attributes (default)
           (only with --do-checks)
 
   -i1   --no-type1-invent
           do not invent missing type 1 attributes
           (only with --do-checks)
 
-character set:
+character set conversion of study/series file:
 
-  +l1   --latin1
-          set latin-1 as standard character set (default)
+  -Ct   --transliterate
+          try to approximate characters that cannot be
+          represented through similar looking characters
 
-  -l1   --no-latin1
-          keep 7-bit ASCII as standard character set
+  -Cd   --discard-illegal
+          discard characters that cannot be represented
+          in destination character set
 
 other processing options:
 
@@ -142,13 +153,16 @@ other processing options:
 target SOP class:
 
   -sc   --sec-capture
-          write Secondary Capture SOP class
+          write Secondary Capture SOP class (default)
 
   -nsc  --new-sc
           write new Secondary Capture SOP classes
 
   -vlp  --vl-photo
-          write Visible Light Photographic SOP class (default)
+          write Visible Light Photographic SOP class
+
+  -oph  --oph-photo
+          write Ophthalmic Photography SOP classes
 
 output file format:
 
@@ -204,11 +218,15 @@ order:
     As an exception, the SOP Instance UID is not copied by this option.
     Also image related data like Rows, Columns etc. is exchanged during
     conversion. Note that \b img2dcm does not check any other attribute
-    values for validity, e. g. it does not look into sequences to adapt any
+    values for validity, e.g. it does not look into sequences to adapt any
     attributes to the new object (referenced images etc.). Therefore, it is
     recommended to use the templates in the data directory for (old) SC and
     VLP objects. See also section "Input Templates".
 
+\li Using the \e --dataset-from-xml option \b img2dcm is also forced to
+    import attributes from an existing file. In this case, however, the
+    file must contain XML data in the format as produced by \b dcm2xml.
+
 \li The \e --study-from and \e --series-from options (mutually exclusive) can
     be used to import patient, study and series information from an existing
     DICOM file. If \e --series-from is specified, then the given DICOM file
@@ -280,12 +298,32 @@ DICOM. Example:
   dump2dcm SC.dump SC.dcm
 \endverbatim
 
+For Ophthalmic Photography images, XML templates are provided
+(see sample file \e OP_template_utf_8.xml and \e OP_template_latin_1.xml).
+
 It is possible to use any DICOM file as a template. Please note that the
 complete DICOM dataset is imported; hence, it should be assured that only
 attributes are present which should be part of the constructed DICOM object.
 The SOP Class UID and the Pixel Data attributes (including attributes like
 Rows, Columns etc.) are not copied but replaced by \b img2dcm during conversion.
 
+\subsection img2dcm_character_sets Character Sets
+
+When an input template is loaded using \e --dataset-from or \e --dataset-from-xml,
+the specific character set of that template is used for the generated DICOM file.
+If the \e --study-from or \e --series-from options are used additionally,
+img2dcm will try to convert the character set of these attributes to that
+of the template, and will report an error if that is not possible.
+If the \e --study-from or \e --series-from options are used without a template,
+the specific character set of this source is used for the generated DICOM file.
+Any keys specified on the command line with the \e --key option are treated
+as raw bytes and override any attributes that may already be present due
+to a template or study/series file. Therefore, care should be taken to not
+specify a specific character set on the command line if one might be loaded
+from another file. It is also the user's responsibility to ensure that
+attribute values specified on the command line use the correct encoding,
+as no conversion will take place before the values are stored in the DICOM file.
+
 \subsection img2dcm_input_plugins Input Plugins
 
 The \b img2dcm application currently supports the JPEG and the BMP image format
@@ -294,12 +332,12 @@ as input.
 \subsubsection img2dcm_jpeg_input_plugin JPEG Input Plugin
 
 For JPEG, the original JPEG from the source file is not decoded but extracted
-and slightly transformed (e. g. JFIF header is cut off) to allow fast
-conversion of even big JPEG files without the need of decoding and re-encoding.
-The JPEG plugin chooses the necessary output transfer syntax automatically
-depending on the actual encoding of the data inside the JPEG file. Therefore,
-the following Transfer Syntaxes (and their corresponding JPEG encodings) are
-used by the JPEG plugin:
+and slightly transformed (e.g. JFIF header is cut off) to allow fast conversion
+of even big JPEG files without the need of decoding and re-encoding. The JPEG
+plugin chooses the necessary output transfer syntax automatically depending on
+the actual encoding of the data inside the JPEG file. Therefore, the following
+Transfer Syntaxes (and their corresponding JPEG encodings) are used by the JPEG
+plugin:
 
 \li JPEG Coding Process 1
     Baseline, Lossy, Non-Hierarchical, Sequential, DCT, Huffman, 8 Bit
@@ -335,29 +373,33 @@ other APPn) data into the DICOM object's internal JPEG stream is allowed or
 not. However, the most reliable approach is to cut those markers and their
 information off the JPEG stream. This approach is also taken by the \b img2dcm
 application. By default, all APPn markers are cut off from the original JPEG
-stream. However, if you want to keep other APPn markers than JFIF (e. g.
-EXIF information) inside the DICOM stream, the option \e --keep-appn
-does the trick. It should also be slightly faster than cutting off APPn
-information, because it is not necessary to scan the whole JPEG stream for
-such data. JFIF information is \b always removed by \b img2dcm.
+stream. However, if you want to keep other APPn markers than JFIF (e.g. EXIF
+information) inside the DICOM stream, the option \e --keep-appn does the trick.
+It should also be slightly faster than cutting off APPn information, because it
+is not necessary to scan the whole JPEG stream for such data. As stated before,
+JFIF information is always removed by \b img2dcm. However, when using this
+option, the APP2 marker is retained, but \b img2dcm does not create an
+equivalent ICC Profile (0028,2000) attribute.
 
 \subsubsection img2dcm_bmp_input_plugin BMP Input Plugin
 
 \b img2dcm supports BMP as input format. However, so far only the most common
 BMP images are supported.  In particular, BMP images which use bit fields or
-run length encoding will be rejected. Such images are uncommon. All input images
-will be converted into a DICOM image with RGB color model and a bit depth of 24.
+run length encoding will be rejected. Such images are uncommon. Input images
+will either be converted into a DICOM image with RGB color model and a bit
+depth of 24, or into an image with MONOCHROME2 color model an 8 bits per pixel.
 There are no specific options for fine-tuning BMP format conversion.
 
 \subsection img2dcm_output_plugins Output Plugins
 
 The desired output SOP Class can be selected on the command line. Currently,
-an export plugin for the Secondary Capture Image SOP class (default, option
-\e -sc), the new Secondary Capture Image SOP classes (option \e -nsc) and
-Visible Light Photographic Image SOP class (option \e -vl) are available.
-Please note that the first one is deprecated according to the DICOM standard
-but is selected as a default because it is widely supported. Future versions
-of \b img2dcm might provide further output plugins for other SOP Classes.
+export plugins for the Secondary Capture Image SOP class (default, option
+\e -sc), the Multiframe Secondary Capture Image SOP classes (option \e -nsc),
+Visible Light Photographic Image SOP class (option \e -vl), and the Ophthalmic
+Photography Image SOP Classes (option \e -oph) are available. Please note that
+the first one is deprecated according to the DICOM standard but is selected as
+a default because it is widely supported. Future versions of \b img2dcm might
+provide further output plugins for other SOP Classes.
 
 For the new Secondary Capture SOP classes, it is not possible to specify which
 specific SOP class should be used for output. That is because these new SOP
@@ -406,7 +448,7 @@ img2dcm image.jpg out.dcm --no-checks
 <br>Same as 1), but does not perform any attribute checking and no type 1 and
 type 2 attribute insertion! So in this case, an invalid DICOM object would be
 generated. This can be interesting if the output file is not meant to be
-completed but will undergo further transformations, e. g. adding attributes
+completed but will undergo further transformations, e.g. adding attributes
 using \b dcmodify. Only use option \e --no-checks if you know what you are
 doing!
 </li>
@@ -489,16 +531,18 @@ It is an error if no data dictionary can be loaded.
 \section img2dcm_files FILES
 
 <em>\<datadir\>/SC.dump</em> - Sample dump file for Secondary Capture images
-\n<em>\<datadir\>/VLP.dump</em> - Sample dump file for Visible Light Photographic
-images
+\n<em>\<datadir\>/VLP.dump</em> - Sample dump file for Visible Light
+Photographic images
+\n<em>\<datadir\>/OP_template.xml</em> - Sample XML template for Ophthalmic
+Photography images
 
 \section img2dcm_see_also SEE ALSO
 
 <b>dcm2pnm</b>(1), <b>dcmj2pnm</b>(1), <b>dump2dcm</b>(1), <b>dcmconv</b>(1),
-<b>dcmodify</b>(1)
+<b>dcmodify</b>(1), <b>dcm2xml</b>(1)
 
 \section img2dcm_copyright COPYRIGHT
 
-Copyright (C) 2007-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2007-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 5451d207d20866b990c600aa3f1aa7d8e9a8c21e..7c2755ffe0db9fb7f025e782c0c839c395cc7c57 100644 (file)
@@ -271,6 +271,6 @@ It is an error if no data dictionary can be loaded.
 
 \section pdf2dcm_copyright COPYRIGHT
 
-Copyright (C) 2005-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2005-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 11571601b74bc0ff491b81daa6812c852c7b0f2b..29c41ed690e23b1ebdc0940e1ed4b5b13a94afbd 100644 (file)
@@ -287,6 +287,6 @@ It is an error if no data dictionary can be loaded.
 
 \section stl2dcm_copyright COPYRIGHT
 
-Copyright (C) 2018-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2018-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index b48d870ab563f707d18643335518343e0af8fc51..8f49c8862525f7230dacbcb84809a6a97e0dddf5 100644 (file)
@@ -121,6 +121,14 @@ output transfer syntax:
   +td  --write-xfer-deflated
          write with deflated explicit VR little endian TS
 
+error handling:
+
+  -E   --stop-on-error
+         do not write if document is invalid (default)
+
+  +E   --ignore-errors
+         attempt to write even if document is invalid
+
 post-1993 value representations:
 
   +u   --enable-new-vr
@@ -342,6 +350,6 @@ It is an error if no data dictionary can be loaded.
 
 \section xml2dcm_copyright COPYRIGHT
 
-Copyright (C) 2003-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2003-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 8b8535ad97ac99e7f84abbbc4707139a43d26708..542d15d9f4c92924781286372eabfe2b7cd43e6e 100644 (file)
@@ -141,7 +141,7 @@ class DCMTK_DCMDATA_EXPORT DcmCharString
     // ensure inherited overloads of matches take part in overload resolution
     using DcmByteString::matches;
 
-    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    /// @copydoc DcmByteString::matches(const OFString&,const OFString&,OFBool) const
     virtual OFBool matches(const OFString& key,
                            const OFString& candidate,
                            const OFBool enableWildCardMatching = OFTrue) const;
index 7db20e5da0fc9b084a7bf53be9492d849043e93e..e6eeca8bebc0cd28e2588c8a2331bba8102ef6e6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2016, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -1116,6 +1116,18 @@ class DCMTK_DCMDATA_EXPORT DicomDirInterface
                                                 const OFString &referencedFileID,
                                                 const OFFilename &sourceFilename);
 
+    /** create or update annotation record and copy required values from dataset
+     *  @param record record to be updated, use NULL to create a new one
+     *  @param fileformat DICOM dataset of the current file
+     *  @param referencedFileID value of the Referenced File ID attribute
+     *  @param sourceFilename name of the source DICOM file
+     *  @return pointer to new or updated record, NULL if an error occurred
+     */
+    DcmDirectoryRecord *buildAnnotationRecord(DcmDirectoryRecord *record,
+                                              DcmFileFormat *fileformat,
+                                              const OFString &referencedFileID,
+                                              const OFFilename &sourceFilename);
+
     /** create or update image record and copy required values from dataset
      *  @param record record to be updated, use NULL to create a new one
      *  @param fileformat DICOM dataset of the current file
index a65b51ce638db05561c5485695be448267b6223e..90d43aa34d421d8272fa17e3d045620301a43de8 100644 (file)
@@ -3,8 +3,8 @@
 ** It was generated automatically by:
 **
 **   User: joergr
-**   Host: thinkpad
-**   Date: 2020-11-24 14:49:52
+**   Host: thinkpad2
+**   Date: 2022-04-12 12:43:36
 **   Prog: /home/joergr/Source/dcmtk-full/public/dcmdata/libsrc/mkdeftag
 **
 **   From: ../data/dicom.dic
 
 #include "dcmtk/dcmdata/dctagkey.h"
 
-#define DCM_DICT_DEFTAG_BUILD_DATE "2020-11-24 14:49:52"
+#define DCM_DICT_DEFTAG_BUILD_DATE "2022-04-12 12:43:36"
 
 
 /*
 ** Fixed Tags in ascending (gggg,eeee) order.
-** Number of entries: 4829
+** Number of entries: 4919
 ** Tags with a repeating component (repeating tags) are listed later.
 */
 #define DCM_CommandGroupLength                   DcmTagKey(0x0000, 0x0000)
 #define DCM_InstanceCreatorUID                   DcmTagKey(0x0008, 0x0014)
 #define DCM_InstanceCoercionDateTime             DcmTagKey(0x0008, 0x0015)
 #define DCM_SOPClassUID                          DcmTagKey(0x0008, 0x0016)
+#define DCM_AcquisitionUID                       DcmTagKey(0x0008, 0x0017)
 #define DCM_SOPInstanceUID                       DcmTagKey(0x0008, 0x0018)
+#define DCM_PyramidUID                           DcmTagKey(0x0008, 0x0019)
 #define DCM_RelatedGeneralSOPClassUID            DcmTagKey(0x0008, 0x001a)
 #define DCM_OriginalSpecializedSOPClassUID       DcmTagKey(0x0008, 0x001b)
 #define DCM_StudyDate                            DcmTagKey(0x0008, 0x0020)
 #define DCM_OperatorIdentificationSequence       DcmTagKey(0x0008, 0x1072)
 #define DCM_AdmittingDiagnosesDescription        DcmTagKey(0x0008, 0x1080)
 #define DCM_AdmittingDiagnosesCodeSequence       DcmTagKey(0x0008, 0x1084)
+#define DCM_PyramidDescription                   DcmTagKey(0x0008, 0x1088)
 #define DCM_ManufacturerModelName                DcmTagKey(0x0008, 0x1090)
 #define DCM_RETIRED_ReferencedResultsSequence    DcmTagKey(0x0008, 0x1100)
 #define DCM_ReferencedStudySequence              DcmTagKey(0x0008, 0x1110)
 #define DCM_TimeOfGainCalibration                DcmTagKey(0x0014, 0x3077)
 #define DCM_BadPixelImage                        DcmTagKey(0x0014, 0x3080)
 #define DCM_CalibrationNotes                     DcmTagKey(0x0014, 0x3099)
+#define DCM_LinearityCorrectionTechnique         DcmTagKey(0x0014, 0x3100)
+#define DCM_BeamHardeningCorrectionTechnique     DcmTagKey(0x0014, 0x3101)
 #define DCM_PulserEquipmentSequence              DcmTagKey(0x0014, 0x4002)
 #define DCM_PulserType                           DcmTagKey(0x0014, 0x4004)
 #define DCM_PulserNotes                          DcmTagKey(0x0014, 0x4006)
 #define DCM_CompressionPressure                  DcmTagKey(0x0018, 0x11a3)
 #define DCM_PaddleDescription                    DcmTagKey(0x0018, 0x11a4)
 #define DCM_CompressionContactArea               DcmTagKey(0x0018, 0x11a5)
+#define DCM_AcquisitionMode                      DcmTagKey(0x0018, 0x11b0)
+#define DCM_DoseModeName                         DcmTagKey(0x0018, 0x11b1)
+#define DCM_AcquiredSubtractionMaskFlag          DcmTagKey(0x0018, 0x11b2)
+#define DCM_FluoroscopyPersistenceFlag           DcmTagKey(0x0018, 0x11b3)
+#define DCM_FluoroscopyLastImageHoldPersistenceFlag DcmTagKey(0x0018, 0x11b4)
+#define DCM_UpperLimitNumberOfPersistentFluoroscopyFrames DcmTagKey(0x0018, 0x11b5)
+#define DCM_ContrastBolusAutoInjectionTriggerFlag DcmTagKey(0x0018, 0x11b6)
+#define DCM_ContrastBolusInjectionDelay          DcmTagKey(0x0018, 0x11b7)
+#define DCM_XAAcquisitionPhaseDetailsSequence    DcmTagKey(0x0018, 0x11b8)
+#define DCM_XAAcquisitionFrameRate               DcmTagKey(0x0018, 0x11b9)
+#define DCM_XAPlaneDetailsSequence               DcmTagKey(0x0018, 0x11ba)
+#define DCM_AcquisitionFieldOfViewLabel          DcmTagKey(0x0018, 0x11bb)
+#define DCM_XRayFilterDetailsSequence            DcmTagKey(0x0018, 0x11bc)
+#define DCM_XAAcquisitionDuration                DcmTagKey(0x0018, 0x11bd)
+#define DCM_ReconstructionPipelineType           DcmTagKey(0x0018, 0x11be)
+#define DCM_ImageFilterDetailsSequence           DcmTagKey(0x0018, 0x11bf)
+#define DCM_AppliedMaskSubtractionFlag           DcmTagKey(0x0018, 0x11c0)
+#define DCM_RequestedSeriesDescriptionCodeSequence DcmTagKey(0x0018, 0x11c1)
 #define DCM_DateOfLastCalibration                DcmTagKey(0x0018, 0x1200)
 #define DCM_TimeOfLastCalibration                DcmTagKey(0x0018, 0x1201)
 #define DCM_DateTimeOfLastCalibration            DcmTagKey(0x0018, 0x1202)
+#define DCM_CalibrationDateTime                  DcmTagKey(0x0018, 0x1203)
 #define DCM_ConvolutionKernel                    DcmTagKey(0x0018, 0x1210)
 #define DCM_RETIRED_UpperLowerPixelValues        DcmTagKey(0x0018, 0x1240)
 #define DCM_ActualFrameDuration                  DcmTagKey(0x0018, 0x1242)
 #define DCM_TableOfPixelValues                   DcmTagKey(0x0018, 0x6058)
 #define DCM_TableOfParameterValues               DcmTagKey(0x0018, 0x605a)
 #define DCM_RWaveTimeVector                      DcmTagKey(0x0018, 0x6060)
+#define DCM_ActiveImageAreaOverlayGroup          DcmTagKey(0x0018, 0x6070)
 #define DCM_DetectorConditionsNominalFlag        DcmTagKey(0x0018, 0x7000)
 #define DCM_DetectorTemperature                  DcmTagKey(0x0018, 0x7001)
 #define DCM_DetectorType                         DcmTagKey(0x0018, 0x7004)
 #define DCM_CTExposureSequence                   DcmTagKey(0x0018, 0x9321)
 #define DCM_ReconstructionPixelSpacing           DcmTagKey(0x0018, 0x9322)
 #define DCM_ExposureModulationType               DcmTagKey(0x0018, 0x9323)
-#define DCM_EstimatedDoseSaving                  DcmTagKey(0x0018, 0x9324)
+#define DCM_RETIRED_EstimatedDoseSaving          DcmTagKey(0x0018, 0x9324)
 #define DCM_CTXRayDetailsSequence                DcmTagKey(0x0018, 0x9325)
 #define DCM_CTPositionSequence                   DcmTagKey(0x0018, 0x9326)
 #define DCM_TablePosition                        DcmTagKey(0x0018, 0x9327)
 #define DCM_RETIRED_OverlayNumber                DcmTagKey(0x0020, 0x0022)
 #define DCM_RETIRED_CurveNumber                  DcmTagKey(0x0020, 0x0024)
 #define DCM_RETIRED_LUTNumber                    DcmTagKey(0x0020, 0x0026)
+#define DCM_PyramidLabel                         DcmTagKey(0x0020, 0x0027)
 #define DCM_RETIRED_ImagePosition                DcmTagKey(0x0020, 0x0030)
 #define DCM_ImagePositionPatient                 DcmTagKey(0x0020, 0x0032)
 #define DCM_RETIRED_ImageOrientation             DcmTagKey(0x0020, 0x0035)
 #define DCM_OphthalmicEnFaceImageQualityRatingSequence DcmTagKey(0x0022, 0x1628)
 #define DCM_QualityThreshold                     DcmTagKey(0x0022, 0x1630)
 #define DCM_OCTBscanAnalysisAcquisitionParametersSequence DcmTagKey(0x0022, 0x1640)
-#define DCM_NumberofBscansPerFrame               DcmTagKey(0x0022, 0x1642)
+#define DCM_NumberOfBscansPerFrame               DcmTagKey(0x0022, 0x1642)
 #define DCM_BscanSlabThickness                   DcmTagKey(0x0022, 0x1643)
 #define DCM_DistanceBetweenBscanSlabs            DcmTagKey(0x0022, 0x1644)
 #define DCM_BscanCycleTime                       DcmTagKey(0x0022, 0x1645)
 #define DCM_RETIRED_StudyComponentStatusID       DcmTagKey(0x0032, 0x1055)
 #define DCM_RequestedProcedureDescription        DcmTagKey(0x0032, 0x1060)
 #define DCM_RequestedProcedureCodeSequence       DcmTagKey(0x0032, 0x1064)
+#define DCM_RequestedLateralityCodeSequence      DcmTagKey(0x0032, 0x1065)
 #define DCM_ReasonForVisit                       DcmTagKey(0x0032, 0x1066)
 #define DCM_ReasonForVisitCodeSequence           DcmTagKey(0x0032, 0x1067)
 #define DCM_RequestedContrastAgent               DcmTagKey(0x0032, 0x1070)
 #define DCM_RETIRED_DocumentingOrganizationIdentifierCodeSequenceTrial DcmTagKey(0x0040, 0xa028)
 #define DCM_VerificationDateTime                 DcmTagKey(0x0040, 0xa030)
 #define DCM_ObservationDateTime                  DcmTagKey(0x0040, 0xa032)
+#define DCM_ObservationStartDateTime             DcmTagKey(0x0040, 0xa033)
 #define DCM_ValueType                            DcmTagKey(0x0040, 0xa040)
 #define DCM_ConceptNameCodeSequence              DcmTagKey(0x0040, 0xa043)
 #define DCM_RETIRED_MeasurementPrecisionDescriptionTrial DcmTagKey(0x0040, 0xa047)
 #define DCM_RETIRED_LanguageCodeSequenceTrial    DcmTagKey(0x0040, 0xa744)
 #define DCM_TabulatedValuesSequence              DcmTagKey(0x0040, 0xa801)
 #define DCM_NumberOfTableRows                    DcmTagKey(0x0040, 0xa802)
-#define DCM_NumbeOfTableColumns                  DcmTagKey(0x0040, 0xa803)
+#define DCM_NumberOfTableColumns                 DcmTagKey(0x0040, 0xa803)
 #define DCM_TableRowNumber                       DcmTagKey(0x0040, 0xa804)
 #define DCM_TableColumnNumber                    DcmTagKey(0x0040, 0xa805)
 #define DCM_TableRowDefinitionSequence           DcmTagKey(0x0040, 0xa806)
 #define DCM_ObjectiveLensPower                   DcmTagKey(0x0048, 0x0112)
 #define DCM_ObjectiveLensNumericalAperture       DcmTagKey(0x0048, 0x0113)
 #define DCM_PaletteColorLookupTableSequence      DcmTagKey(0x0048, 0x0120)
-#define DCM_ReferencedImageNavigationSequence    DcmTagKey(0x0048, 0x0200)
-#define DCM_TopLeftHandCornerOfLocalizerArea     DcmTagKey(0x0048, 0x0201)
-#define DCM_BottomRightHandCornerOfLocalizerArea DcmTagKey(0x0048, 0x0202)
+#define DCM_RETIRED_ReferencedImageNavigationSequence DcmTagKey(0x0048, 0x0200)
+#define DCM_RETIRED_TopLeftHandCornerOfLocalizerArea DcmTagKey(0x0048, 0x0201)
+#define DCM_RETIRED_BottomRightHandCornerOfLocalizerArea DcmTagKey(0x0048, 0x0202)
 #define DCM_OpticalPathIdentificationSequence    DcmTagKey(0x0048, 0x0207)
 #define DCM_PlanePositionSlideSequence           DcmTagKey(0x0048, 0x021a)
 #define DCM_ColumnPositionInTotalImagePixelMatrix DcmTagKey(0x0048, 0x021e)
 #define DCM_VectorDimensionality                 DcmTagKey(0x0066, 0x001f)
 #define DCM_VectorAccuracy                       DcmTagKey(0x0066, 0x0020)
 #define DCM_VectorCoordinateData                 DcmTagKey(0x0066, 0x0021)
+#define DCM_DoublePointCoordinatesData           DcmTagKey(0x0066, 0x0022)
 #define DCM_RETIRED_TrianglePointIndexList       DcmTagKey(0x0066, 0x0023)
 #define DCM_RETIRED_EdgePointIndexList           DcmTagKey(0x0066, 0x0024)
 #define DCM_RETIRED_VertexPointIndexList         DcmTagKey(0x0066, 0x0025)
 #define DCM_ModelUsageCodeSequence               DcmTagKey(0x0068, 0x7003)
 #define DCM_ModelGroupUID                        DcmTagKey(0x0068, 0x7004)
 #define DCM_RelativeURIReferenceWithinEncapsulatedDocument DcmTagKey(0x0068, 0x7005)
+#define DCM_AnnotationCoordinateType             DcmTagKey(0x006a, 0x0001)
+#define DCM_AnnotationGroupSequence              DcmTagKey(0x006a, 0x0002)
+#define DCM_AnnotationGroupUID                   DcmTagKey(0x006a, 0x0003)
+#define DCM_AnnotationGroupLabel                 DcmTagKey(0x006a, 0x0005)
+#define DCM_AnnotationGroupDescription           DcmTagKey(0x006a, 0x0006)
+#define DCM_AnnotationGroupGenerationType        DcmTagKey(0x006a, 0x0007)
+#define DCM_AnnotationGroupAlgorithmIdentificationSequence DcmTagKey(0x006a, 0x0008)
+#define DCM_AnnotationPropertyCategoryCodeSequence DcmTagKey(0x006a, 0x0009)
+#define DCM_AnnotationPropertyTypeCodeSequence   DcmTagKey(0x006a, 0x000a)
+#define DCM_AnnotationPropertyTypeModifierCodeSequence DcmTagKey(0x006a, 0x000b)
+#define DCM_NumberOfAnnotations                  DcmTagKey(0x006a, 0x000c)
+#define DCM_AnnotationAppliesToAllOpticalPaths   DcmTagKey(0x006a, 0x000d)
+#define DCM_ReferencedOpticalPathIdentifier      DcmTagKey(0x006a, 0x000e)
+#define DCM_AnnotationAppliesToAllZPlanes        DcmTagKey(0x006a, 0x000f)
+#define DCM_CommonZCoordinateValue               DcmTagKey(0x006a, 0x0010)
+#define DCM_AnnotationIndexList                  DcmTagKey(0x006a, 0x0011)
 #define DCM_GraphicAnnotationSequence            DcmTagKey(0x0070, 0x0001)
 #define DCM_GraphicLayer                         DcmTagKey(0x0070, 0x0002)
 #define DCM_BoundingBoxAnnotationUnits           DcmTagKey(0x0070, 0x0003)
 #define DCM_RETIRED_AnnotationContentSequence    DcmTagKey(0x2130, 0x0050)
 #define DCM_RETIRED_ImageOverlayBoxContentSequence DcmTagKey(0x2130, 0x0060)
 #define DCM_RETIRED_PresentationLUTContentSequence DcmTagKey(0x2130, 0x0080)
-#define DCM_RETIRED_ProposedStudySequence        DcmTagKey(0x2130, 0x00a0)
-#define DCM_RETIRED_OriginalImageSequence        DcmTagKey(0x2130, 0x00c0)
+#define DCM_ProposedStudySequence                DcmTagKey(0x2130, 0x00a0)
+#define DCM_OriginalImageSequence                DcmTagKey(0x2130, 0x00c0)
 #define DCM_LabelUsingInformationExtractedFromInstances DcmTagKey(0x2200, 0x0001)
 #define DCM_LabelText                            DcmTagKey(0x2200, 0x0002)
 #define DCM_LabelStyleSelection                  DcmTagKey(0x2200, 0x0003)
 #define DCM_ROIContourSequence                   DcmTagKey(0x3006, 0x0039)
 #define DCM_ContourSequence                      DcmTagKey(0x3006, 0x0040)
 #define DCM_ContourGeometricType                 DcmTagKey(0x3006, 0x0042)
-#define DCM_ContourSlabThickness                 DcmTagKey(0x3006, 0x0044)
-#define DCM_ContourOffsetVector                  DcmTagKey(0x3006, 0x0045)
+#define DCM_RETIRED_ContourSlabThickness         DcmTagKey(0x3006, 0x0044)
+#define DCM_RETIRED_ContourOffsetVector          DcmTagKey(0x3006, 0x0045)
 #define DCM_NumberOfContourPoints                DcmTagKey(0x3006, 0x0046)
 #define DCM_ContourNumber                        DcmTagKey(0x3006, 0x0048)
-#define DCM_AttachedContours                     DcmTagKey(0x3006, 0x0049)
+#define DCM_RETIRED_AttachedContours             DcmTagKey(0x3006, 0x0049)
+#define DCM_SourcePixelPlanesCharacteristicsSequence DcmTagKey(0x3006, 0x004a)
 #define DCM_ContourData                          DcmTagKey(0x3006, 0x0050)
 #define DCM_RTROIObservationsSequence            DcmTagKey(0x3006, 0x0080)
 #define DCM_ObservationNumber                    DcmTagKey(0x3006, 0x0082)
 #define DCM_RecordedWedgeSequence                DcmTagKey(0x3008, 0x00b0)
 #define DCM_RecordedCompensatorSequence          DcmTagKey(0x3008, 0x00c0)
 #define DCM_RecordedBlockSequence                DcmTagKey(0x3008, 0x00d0)
+#define DCM_RecordedBlockSlabSequence            DcmTagKey(0x3008, 0x00d1)
 #define DCM_TreatmentSummaryMeasuredDoseReferenceSequence DcmTagKey(0x3008, 0x00e0)
 #define DCM_RecordedSnoutSequence                DcmTagKey(0x3008, 0x00f0)
 #define DCM_RecordedRangeShifterSequence         DcmTagKey(0x3008, 0x00f2)
 #define DCM_RTPlanTime                           DcmTagKey(0x300a, 0x0007)
 #define DCM_TreatmentProtocols                   DcmTagKey(0x300a, 0x0009)
 #define DCM_PlanIntent                           DcmTagKey(0x300a, 0x000a)
-#define DCM_TreatmentSites                       DcmTagKey(0x300a, 0x000b)
+#define DCM_RETIRED_TreatmentSites               DcmTagKey(0x300a, 0x000b)
 #define DCM_RTPlanGeometry                       DcmTagKey(0x300a, 0x000c)
 #define DCM_PrescriptionDescription              DcmTagKey(0x300a, 0x000e)
 #define DCM_DoseReferenceSequence                DcmTagKey(0x300a, 0x0010)
 #define DCM_SourceApplicatorWallNominalThickness DcmTagKey(0x300a, 0x029c)
 #define DCM_SourceApplicatorWallNominalTransmission DcmTagKey(0x300a, 0x029e)
 #define DCM_SourceApplicatorStepSize             DcmTagKey(0x300a, 0x02a0)
+#define DCM_ApplicatorShapeReferencedROINumber   DcmTagKey(0x300a, 0x02a1)
 #define DCM_TransferTubeNumber                   DcmTagKey(0x300a, 0x02a2)
 #define DCM_TransferTubeLength                   DcmTagKey(0x300a, 0x02a4)
 #define DCM_ChannelShieldSequence                DcmTagKey(0x300a, 0x02b0)
 #define DCM_CArmPhotonElectronControlPointSequence DcmTagKey(0x300a, 0x062f)
 #define DCM_ReferencedRTRadiationSequence        DcmTagKey(0x300a, 0x0630)
 #define DCM_ReferencedRTInstanceSequence         DcmTagKey(0x300a, 0x0631)
-#define DCM_ReferencedRTPatientSetupSequence     DcmTagKey(0x300a, 0x0632)
+#define DCM_RETIRED_ReferencedRTPatientSetupSequence DcmTagKey(0x300a, 0x0632)
 #define DCM_SourceToPatientSurfaceDistance       DcmTagKey(0x300a, 0x0634)
 #define DCM_TreatmentMachineSpecialModeCodeSequence DcmTagKey(0x300a, 0x0635)
 #define DCM_IntendedNumberOfFractions            DcmTagKey(0x300a, 0x0636)
 #define DCM_RTBeamLimitingDeviceDefinitionSequence DcmTagKey(0x300a, 0x064d)
 #define DCM_ParallelRTBeamDelimiterOpeningMode   DcmTagKey(0x300a, 0x064e)
 #define DCM_ParallelRTBeamDelimiterLeafMountingSide DcmTagKey(0x300a, 0x064f)
-#define DCM_PatientSetupUID                      DcmTagKey(0x300a, 0x0650)
+#define DCM_RETIRED_PatientSetupUID              DcmTagKey(0x300a, 0x0650)
 #define DCM_WedgeDefinitionSequence              DcmTagKey(0x300a, 0x0651)
 #define DCM_RadiationBeamWedgeAngle              DcmTagKey(0x300a, 0x0652)
 #define DCM_RadiationBeamWedgeThinEdgeDistance   DcmTagKey(0x300a, 0x0653)
 #define DCM_DoseMeasurementDeviceCodeSequence    DcmTagKey(0x300a, 0x0774)
 #define DCM_AdditionalParameterRecordingInstanceSequence DcmTagKey(0x300a, 0x0780)
 #define DCM_InterlockOriginDescription           DcmTagKey(0x300a, 0x0783)
+#define DCM_RTPatientPositionScopeSequence       DcmTagKey(0x300a, 0x0784)
+#define DCM_ReferencedTreatmentPositionGroupUID  DcmTagKey(0x300a, 0x0785)
+#define DCM_RadiationOrderIndex                  DcmTagKey(0x300a, 0x0786)
+#define DCM_OmittedRadiationSequence             DcmTagKey(0x300a, 0x0787)
+#define DCM_ReasonForOmissionCodeSequence        DcmTagKey(0x300a, 0x0788)
+#define DCM_RTDeliveryStartPatientPositionSequence DcmTagKey(0x300a, 0x0789)
+#define DCM_RTTreatmentPreparationPatientPositionSequence DcmTagKey(0x300a, 0x078a)
+#define DCM_ReferencedRTTreatmentPreparationSequence DcmTagKey(0x300a, 0x078b)
+#define DCM_ReferencedPatientSetupPhotoSequence  DcmTagKey(0x300a, 0x078c)
+#define DCM_PatientTreatmentPreparationMethodCodeSequence DcmTagKey(0x300a, 0x078d)
+#define DCM_PatientTreatmentPreparationProcedureParameterDescription DcmTagKey(0x300a, 0x078e)
+#define DCM_PatientTreatmentPreparationDeviceSequence DcmTagKey(0x300a, 0x078f)
+#define DCM_PatientTreatmentPreparationProcedureSequence DcmTagKey(0x300a, 0x0790)
+#define DCM_PatientTreatmentPreparationProcedureCodeSequence DcmTagKey(0x300a, 0x0791)
+#define DCM_PatientTreatmentPreparationMethodDescription DcmTagKey(0x300a, 0x0792)
+#define DCM_PatientTreatmentPreparationProcedureParameterSequence DcmTagKey(0x300a, 0x0793)
+#define DCM_PatientSetupPhotoDescription         DcmTagKey(0x300a, 0x0794)
+#define DCM_PatientTreatmentPreparationProcedureIndex DcmTagKey(0x300a, 0x0795)
+#define DCM_ReferencedPatientSetupProcedureIndex DcmTagKey(0x300a, 0x0796)
+#define DCM_RTRadiationTaskSequence              DcmTagKey(0x300a, 0x0797)
+#define DCM_RTPatientPositionDisplacementSequence DcmTagKey(0x300a, 0x0798)
+#define DCM_RTPatientPositionSequence            DcmTagKey(0x300a, 0x0799)
+#define DCM_DisplacementReferenceLabel           DcmTagKey(0x300a, 0x079a)
+#define DCM_DisplacementMatrix                   DcmTagKey(0x300a, 0x079b)
+#define DCM_PatientSupportDisplacementSequence   DcmTagKey(0x300a, 0x079c)
+#define DCM_DisplacementReferenceLocationCodeSequence DcmTagKey(0x300a, 0x079d)
+#define DCM_RTRadiationSetDeliveryUsage          DcmTagKey(0x300a, 0x079e)
 #define DCM_ReferencedRTPlanSequence             DcmTagKey(0x300c, 0x0002)
 #define DCM_ReferencedBeamSequence               DcmTagKey(0x300c, 0x0004)
 #define DCM_ReferencedBeamNumber                 DcmTagKey(0x300c, 0x0006)
 #define DCM_OmittedBeamTaskSequence              DcmTagKey(0x300c, 0x0111)
 #define DCM_ReasonForOmission                    DcmTagKey(0x300c, 0x0112)
 #define DCM_ReasonForOmissionDescription         DcmTagKey(0x300c, 0x0113)
+#define DCM_PrescriptionOverviewSequence         DcmTagKey(0x300c, 0x0114)
+#define DCM_TotalPrescriptionDose                DcmTagKey(0x300c, 0x0115)
+#define DCM_PlanOverviewSequence                 DcmTagKey(0x300c, 0x0116)
+#define DCM_PlanOverviewIndex                    DcmTagKey(0x300c, 0x0117)
+#define DCM_ReferencedPlanOverviewIndex          DcmTagKey(0x300c, 0x0118)
+#define DCM_NumberOfFractionsIncluded            DcmTagKey(0x300c, 0x0119)
+#define DCM_DoseCalibrationConditionsSequence    DcmTagKey(0x300c, 0x0120)
+#define DCM_AbsorbedDoseToMetersetRatio          DcmTagKey(0x300c, 0x0121)
+#define DCM_DelineatedRadiationFieldSize         DcmTagKey(0x300c, 0x0122)
+#define DCM_DoseCalibrationConditionsVerifiedFlag DcmTagKey(0x300c, 0x0123)
+#define DCM_CalibrationReferencePointDepth       DcmTagKey(0x300c, 0x0124)
+#define DCM_GatingBeamHoldTransitionSequence     DcmTagKey(0x300c, 0x0125)
+#define DCM_BeamHoldTransition                   DcmTagKey(0x300c, 0x0126)
+#define DCM_BeamHoldTransitionDateTime           DcmTagKey(0x300c, 0x0127)
+#define DCM_BeamHoldOriginatingDeviceSequence    DcmTagKey(0x300c, 0x0128)
 #define DCM_ApprovalStatus                       DcmTagKey(0x300e, 0x0002)
 #define DCM_ReviewDate                           DcmTagKey(0x300e, 0x0004)
 #define DCM_ReviewTime                           DcmTagKey(0x300e, 0x0005)
index 6e05e956bde6385087388fd7add606e127ab982d..4d882d2a8d0a0c3353b0cc97ebdc4a7a6bd0c19f 100644 (file)
@@ -100,12 +100,14 @@ public:
     virtual DcmSequenceOfItems& getMRDRSequence();
 
     /** look up directory record for the given referenced file ID (not OS file path)
+     *  @param filename the file to take the id from
      *  @return directory record if found, NULL otherwise
      */
     virtual DcmDirectoryRecord* matchFilename( const char *filename );
 
     /** look up MRDR for the given referenced file ID (not OS file path).
      *  If there is none yet, create one.
+     *  @param filename the file to take the id from
      *  @return MRDR for given referenced file ID
      */
     virtual DcmDirectoryRecord* matchOrCreateMRDR( const char *filename );
@@ -189,7 +191,9 @@ public:
     /// private undefined copy assignment operator
     DcmDicomDir &operator=(const DcmDicomDir &);
 
-    /// private undefined copy constructor
+    /** private undefined copy constructor
+     * @param newDir documented to avoid doxygen warnings
+     */
     DcmDicomDir( const DcmDicomDir &newDir );
 
     /// condition flag
index e25815c8ebb17440f0c15e7586282d4739f84c2b..c337afd068cdb857bc08f7c05b9d808d28ace9a5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2011, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,9 +26,6 @@
 #include "dcmtk/dcmdata/dctagkey.h"
 #include "dcmtk/dcmdata/dcvr.h"
 
-#define INCLUDE_CSTRING               /* for strcmp() */
-#include "dcmtk/ofstd/ofstdinc.h"
-
 /// constant describing an unlimited VM
 #define DcmVariableVM   -1
 
@@ -93,7 +90,9 @@ public:
         const char* vers, OFBool doCopyStrings,
         const char* pcreator);
 
-    /// copy constructor
+    /** copy constructor
+     * @param e the entry to copy
+     */
     DcmDictEntry(const DcmDictEntry& e);
 
     /// destructor
@@ -262,7 +261,9 @@ public:
         return groupRangeRestriction;
     }
 
-    /// sets group range restriction
+    /** sets group range restriction
+     * @param rr the new range restriction
+     */
     void setGroupRangeRestriction(DcmDictRangeRestriction rr)
     {
         groupRangeRestriction = rr;
@@ -274,7 +275,9 @@ public:
         return elementRangeRestriction;
     }
 
-    /// sets element range restriction
+    /** sets element range restriction
+    * @param rr the new range restriction
+    */
     void setElementRangeRestriction(DcmDictRangeRestriction rr)
     {
         elementRangeRestriction = rr;
@@ -356,7 +359,11 @@ public:
             );
     }
 
-    /// friend operator<<
+    /** friend operator<<
+     * @param s the ostream to append upon
+     * @param e the dictionary entry
+     * @return the appended on ostream
+     */
     friend DCMTK_DCMDATA_EXPORT STD_NAMESPACE ostream& operator<<(STD_NAMESPACE ostream& s, const DcmDictEntry& e);
 
 private:
index 962ebb9373af17c0151c27a789b2614e2c9d1a46..68923dfa586b34a2e2e92b3388c763f62ecf2f8a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #define ENVIRONMENT_PATH_SEPARATOR '\n' /* at least define something unlikely */
 #endif
 
+/*
+** Loading of default dictionary:
+**  DCM_DICT_DEFAULT_USE_NONE: Do not load any default dictionary on startup
+**  DCM_DICT_DEFAULT_USE_BUILTIN: Load builtin dictionary on startup
+**  DCM_DICT_DEFAULT_USE_EXTERNAL: Load external (i.e. file-based) dictionary on startup
+*/
+#define DCM_DICT_DEFAULT_USE_NONE     0
+#define DCM_DICT_DEFAULT_USE_BUILTIN  1
+#define DCM_DICT_DEFAULT_USE_EXTERNAL 2
+
 
 /** this class implements a loadable DICOM Data Dictionary
  */
@@ -179,11 +189,13 @@ private:
     OFBool loadSkeletonDictionary();
 
     /** looks up the given directory entry in the two dictionaries.
+     *  @param entry the entry to look up
      *  @return pointer to entry if found, NULL otherwise
      */
     const DcmDictEntry* findEntry(const DcmDictEntry& entry) const;
 
     /** deletes the given entry from either dictionary
+     * @param entry the entry to delete
      */
     void deleteEntry(const DcmDictEntry& entry);
 
index 89adaa630f7ba082ee65e892d843ec3377437565..3ffb057e141823158ae7c1e7de61eb0a301bf111 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -128,7 +128,9 @@ typedef enum {
     /// assessment
     ERT_Assessment = 47,
     /// radiotherapy
-    ERT_Radiotherapy = 48
+    ERT_Radiotherapy = 48,
+    /// annotation
+    ERT_Annotation = 49
 } E_DirRecType;
 
 
index 1aeff051729a190acbc812298d817e589716ce99..2aabd20c0f5bc5aa2a0df70442e17b6a1ff0be2e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -123,8 +123,14 @@ class DCMTK_DCMDATA_EXPORT DcmElement
      *  @param enctype sequence encoding type for length calculation
      *  @return value length of DICOM element
      */
-    virtual Uint32 getLength(const E_TransferSyntax /*xfer*/ = EXS_LittleEndianImplicit,
-                             const E_EncodingType /*enctype*/ = EET_UndefinedLength)
+
+#ifdef DOXYGEN
+    virtual Uint32 getLength(const E_TransferSyntax xfer = EXS_LittleEndianImplicit,
+                             const E_EncodingType enctype = EET_UndefinedLength)
+#else
+    virtual Uint32 getLength(const E_TransferSyntax /* xfer */ = EXS_LittleEndianImplicit,
+                             const E_EncodingType /* enctype */ = EET_UndefinedLength)
+#endif
     {
         return getLengthField();
     }
@@ -668,7 +674,7 @@ class DCMTK_DCMDATA_EXPORT DcmElement
                                         E_ByteOrder byteOrder = gLocalByteOrder);
 
     /** create an empty Uint8 array of given number of bytes and set it.
-     *  All array elements are initialized with a value of 0 (using 'memzero').
+     *  All array elements are initialized with a value of 0 (using 'memset').
      *  This method is only applicable to certain VRs, e.g. OB.
      *  @param numBytes number of bytes (8 bit) to be created
      *  @param bytes stores the pointer to the resulting buffer
@@ -677,7 +683,7 @@ class DCMTK_DCMDATA_EXPORT DcmElement
     virtual OFCondition createUint8Array(const Uint32 numBytes, Uint8 *&bytes);
 
     /** create an empty Uint16 array of given number of words and set it.
-     *  All array elements are initialized with a value of 0 (using 'memzero').
+     *  All array elements are initialized with a value of 0 (using 'memset').
      *  This method is only applicable to OW data.
      *  @param numWords number of words (16 bit) to be created
      *  @param words stores the pointer to the resulting buffer
index 4fa7fb302fe5c37fd32bde085c03bb56880fb352..97e6cebe90f381d5a599d1ef79f55b9e2c18454e 100755 (executable)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2018-2019, OFFIS e.V.
+ *  Copyright (C) 2018-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -30,7 +30,7 @@
 #include "dcmtk/dcmdata/dcfilefo.h"   /* for class DcmFileFormat */
 #include "dcmtk/ofstd/ofcmdln.h"      /* for OFCmdUnsignedInt */
 
-class XMLNode;
+struct XMLNode;
 class OFCommandLine;
 class OFConsoleApplication;
 class OFLogger;
index ab13bad6c6624d0edd6e6ebe1a760d1ae2042dc7..036b9c43195ffb4fda6dcb70c00874ef16e2f978 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -175,6 +175,14 @@ extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_ElemLengthExceeds32BitFiel
 extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_CannotWriteJsonNumber;
 /// Cannot write compressed pixel data JSON InlineBinary
 extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_CannotWriteJsonInlineBinary;
+/// XML parse error
+extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_XMLParseError;
+/// XML validation failure
+extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_XMLValidationFailure;
+/// SOP class mismatch
+extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_SOPClassMismatch;
+/// Unknown UID name: No mapping to UID value defined
+extern DCMTK_DCMDATA_EXPORT const OFConditionConst EC_UnknownUIDName;
 
 //@}
 
index f8fe3d54f985a737bdc62ee379f12205844bc96a..f28c3b1e0fb47013cabed17d0db359b7831e7384 100644 (file)
@@ -92,10 +92,14 @@ public:
   
 private:
 
-  /// private undefined copy constructor
+  /** private undefined copy constructor
+   * @param arg documented to avoid doxygen warnings
+   */
   DcmFileCache(const DcmFileCache& arg);
 
-  /// private undefined copy assignment operator
+  /** private undefined copy assignment operator
+   * @param arg the cache to copy
+   */
   DcmFileCache& operator=(const DcmFileCache& arg);
 
   /// input stream, may be NULL
index 081feca384f1324073c83c6c7106f015836ffb86..960d1e751192eba2c2e587899a44371981039adc 100644 (file)
@@ -130,21 +130,29 @@ public:
       : dict(NULL), hindex(0), iterating(OFFalse), iter()
         { init(d, atEnd); }
 
-    /// copy constructor
+    /** copy constructor
+     * @param i the iterator to copy
+     */
     DcmHashDictIterator(const DcmHashDictIterator& i)
       : dict(i.dict), hindex(i.hindex), iterating(i.iterating), iter(i.iter)
         { }
 
-    /// copy assignment operator
+    /** copy assignment operator
+     * @param i the Iterator to copy and assign
+     */
     DcmHashDictIterator& operator=(const DcmHashDictIterator& i)
         { dict = i.dict; hindex = i.hindex;
           iterating = i.iterating; iter = i.iter; return *this; }
 
-    /// comparison equality
+    /** comparison equality
+     * @param x the iterator to compare against
+     */
     OFBool operator==(const DcmHashDictIterator& x) const
         { return iterating ? x.iterating && (hindex == x.hindex) && (iter == x.iter) : !x.iterating; }
 
-    /// comparison non-equality
+    /** comparison non-equality
+     * @param x the iterator to compare against
+     */
     OFBool operator!=(const DcmHashDictIterator& x) const
         { return !(*this == x); }
 
@@ -238,7 +246,9 @@ public:
     DcmHashDictIterator end() const
         { DcmHashDictIterator iter(this, OFTrue); return iter; }
 
-    /// prints some information about hash table bucket utilization
+    /** prints some information about hash table bucket utilization
+     * @param out the stream to print into
+     */
     STD_NAMESPACE ostream& loadSummary(STD_NAMESPACE ostream& out);
 
 private:
index e900ab8fa56c79237eca3d30b2971ad67c13c798..f769bb498bff6e968a978f9889a6b8ede8e7f11f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2020, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,7 +26,6 @@
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/dcmdata/dcistrma.h"
 
-
 /** producer class that reads data from a plain file.
  */
 class DCMTK_DCMDATA_EXPORT DcmFileProducer: public DcmProducer
@@ -119,7 +118,9 @@ public:
    */
   DcmInputFileStreamFactory(const OFFilename &filename, offile_off_t offset);
 
-  /// copy constructor
+  /** copy constructor
+   * @param arg the factory to copy
+   */
   DcmInputFileStreamFactory(const DcmInputFileStreamFactory &arg);
 
   /// destructor
@@ -296,7 +297,9 @@ public:
    */
   DcmInputTempFileStreamFactory(DcmTempFileHandler *handler);
 
-  /// copy constructor
+  /** copy constructor
+   * @param arg the factory to copy
+   */
   DcmInputTempFileStreamFactory(const DcmInputTempFileStreamFactory &arg);
 
   /// destructor, decreases reference counter of temporary file handler
@@ -328,5 +331,4 @@ private:
   DcmTempFileHandler *fileHandler_;
 };
 
-
 #endif
diff --git a/dcmdata/include/dcmtk/dcmdata/dcistrms.h b/dcmdata/include/dcmtk/dcmdata/dcistrms.h
new file mode 100644 (file)
index 0000000..d8c34bb
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+ *
+ *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Jasper den Otter, Marco Eichelberg
+ *
+ *  Purpose: DcmStdinStream and related classes,
+ *    implements streamed input from stdin.
+ *
+ */
+
+#ifndef DCISTRMS_H
+#define DCISTRMS_H
+
+#include "dcmtk/config/osconfig.h"
+#include "dcmtk/dcmdata/dcistrma.h"
+#include "dcmtk/dcmdata/dcistrmb.h"
+
+/** input stream that reads from standard input
+ */
+class DCMTK_DCMDATA_EXPORT DcmStdinStream: public DcmInputStream
+{
+public:
+  /// constructor
+  DcmStdinStream();
+
+  /// destructor
+  virtual ~DcmStdinStream();
+
+  /** creates a new factory object for the current stream
+   *  and stream position.  When activated, the factory will be
+   *  able to create new DcmInputStream delivering the same
+   *  data as the current stream.  Used to defer loading of
+   *  value fields until accessed.
+   *  If no factory object can be created (e.g. because the
+   *  stream is not seekable), returns NULL.
+   *  @return pointer to new factory object if successful, NULL otherwise.
+   */
+  virtual DcmInputStreamFactory *newFactory() const;
+
+  /** fill the read buffer from stdin. After a call to this method,
+   *  the read()-method for the DcmDataset or DcmFileFormat should
+   *  be called, and the sequence repeated as long as the read()
+   *  method returns EC_StreamNotifyClient.
+   */
+  virtual void fillBuffer();
+
+private:
+
+  /// private unimplemented copy constructor
+  DcmStdinStream(const DcmStdinStream&);
+
+  /// private unimplemented copy assignment operator
+  DcmStdinStream& operator=(const DcmStdinStream&);
+
+  /// the final producer of the filter chain
+  DcmBufferProducer producer_;
+
+  /// a buffer
+  unsigned char *buf_;
+};
+
+#endif
index eaa222c2817c1a0053ffa4b3bc444352cbb868c2..fff90d86b5b1396bff6896fc42a7af027b7227ae 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -1059,7 +1059,8 @@ class DCMTK_DCMDATA_EXPORT DcmItem
      *  Applicable to the following VRs: AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, LT, OB, OD, OF,
      *  OL, OV, OW, PN, SH, SL, SS, ST, SV, TM, UC, UI, UL, UR, US, UT, UV.
      *  @param tag DICOM tag specifying the attribute to be created
-     *  @param value string value to be set for the new element (might be empty or NULL)
+     *  @param value string value to be set for the new element (might be empty or NULL).  The format
+     *    of the string value is specified by the putString() method of the corresponding VR class.
      *  @param replaceOld flag indicating whether to replace an existing element or not
      *  @return EC_Normal upon success, an error code otherwise.
      */
@@ -1073,7 +1074,8 @@ class DCMTK_DCMDATA_EXPORT DcmItem
      *  Please note that since the length of the string has to be specified explicitly, the string
      *  can contain more than one NULL byte.
      *  @param tag DICOM tag specifying the attribute to be created
-     *  @param value string value to be set for the new element (might be empty or NULL)
+     *  @param value string value to be set for the new element (might be empty or NULL).  The format
+     *    of the string value is specified by the putString() method of the corresponding VR class.
      *  @param length length of the string (number of characters without the trailing NULL byte)
      *  @param replaceOld flag indicating whether to replace an existing element or not
      *  @return EC_Normal upon success, an error code otherwise.
@@ -1087,7 +1089,8 @@ class DCMTK_DCMDATA_EXPORT DcmItem
      *  Applicable to the following VRs: AE, AS, AT, CS, DA, DS, DT, FL, FD, IS, LO, LT, OB, OD, OF,
      *  OL, OV, OW, PN, SH, SL, SS, ST, SV, TM, UC, UI, UL, UR, US, UT, UV.
      *  @param tag DICOM tag specifying the attribute to be created
-     *  @param value value to be set for the new element (might be empty)
+     *  @param value string value to be set for the new element (might be empty).  The format of the
+     *    string value is specified by the putOFStringArray() method of the corresponding VR class.
      *  @param replaceOld flag indicating whether to replace an existing element or not
      *  @return EC_Normal upon success, an error code otherwise.
      */
index d501dcc88411b794ccdc3997a191caddb7107d95..21b945616367b6363ff4c05923d78329c329ac45 100644 (file)
@@ -114,13 +114,17 @@ public:
         /// allow DcmJsonFormat to use this class' private members
         friend class DcmJsonFormat;
 
-        /// private constructor, used by DcmJsonFormat
+        /** private constructor, used by DcmJsonFormat
+         * @param format the format
+         */
         inline Indention(DcmJsonFormat& format) : m_Format(format)
         {
 
         }
 
-        /// prints the current indention using the parent formatter
+        /** prints the current indention using the parent formatter
+         * @param out the stream to print to
+         */
         inline void printIndention(STD_NAMESPACE ostream& out) const
         {
             m_Format.printIndention(out);
index 78329af3f3d2feaf8993731eccc84d3e80ded871..7a632fa36b90e44a642bdc1a40fe67fdcdeb2cf2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2011, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,9 +27,6 @@
 #include "dcmtk/ofstd/ofcast.h"
 #include "dcmtk/ofstd/oftypes.h"
 
-#define INCLUDE_CSTDDEF
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/dcmdata/dcobject.h"
 
 /// index indicating "end of list"
@@ -180,7 +177,9 @@ private:
     /// private undefined copy constructor 
     DcmList &operator=(const DcmList &);
 
-    /// private undefined copy assignment operator 
+    /** private undefined copy assignment operator
+     * @param newList documented to avoid doxygen warnings
+     */
     DcmList(const DcmList &newList);
 };
 
index b62eacfa31b2864a25eb27dbeddad41a2680e71f..60490f6bc87a4c9feadc49bb81bdbafa6cb067cd 100644 (file)
@@ -409,7 +409,14 @@ class DCMTK_DCMDATA_EXPORT DcmObject
      *  @param vr value representation
      *  @return EC_Normal if successful, an error code otherwise
      */
-    virtual OFCondition setVR(DcmEVR /*vr*/) { return EC_IllegalCall; }
+#ifdef DOXYGEN
+    virtual OFCondition setVR(DcmEVR vr)
+#else
+    virtual OFCondition setVR(DcmEVR /* vr */)
+#endif
+    {
+      return EC_IllegalCall;
+    }
 
     /** get value multiplicity of this object.
      *  Please note that depending on the Value Representation (VR), subclasses
index dff45220c7d2d893ff317145dae47b053fee10a7..ce7451464b9eb063afa6f51bccf60693355209a8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2012, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/dcmdata/dcostrma.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /** consumer class that stores data in a plain file.
  */
 class DCMTK_DCMDATA_EXPORT DcmFileConsumer: public DcmConsumer
@@ -138,5 +134,4 @@ private:
   DcmFileConsumer consumer_;
 };
 
-
 #endif
diff --git a/dcmdata/include/dcmtk/dcmdata/dcostrms.h b/dcmdata/include/dcmtk/dcmdata/dcostrms.h
new file mode 100644 (file)
index 0000000..e111ac1
--- /dev/null
@@ -0,0 +1,137 @@
+/*
+ *
+ *  Copyright (C) 1994-2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Jasper den Otter, Marco Eichelberg
+ *
+ *  Purpose: DcmStdoutStream and related classes,
+ *    implements streamed output to stdout.
+ *
+ */
+
+#ifndef DCOSTRMS_H
+#define DCOSTRMS_H
+
+#include "dcmtk/config/osconfig.h"
+#include "dcmtk/dcmdata/dcostrma.h"
+
+/** consumer class that writes to standard output.
+ */
+class DCMTK_DCMDATA_EXPORT DcmStdoutConsumer: public DcmConsumer
+{
+public:
+  /** constructor
+   *  @param filename name of file to be created (may contain wide chars
+   *    if support enabled)
+   */
+  DcmStdoutConsumer(const OFFilename &filename);
+
+  /** constructor
+   *  @param file structure, file must already be open for writing
+   */
+  DcmStdoutConsumer(FILE *file);
+
+  /// destructor
+  virtual ~DcmStdoutConsumer();
+
+  /** returns the status of the consumer. Unless the status is good,
+   *  the consumer will not permit any operation.
+   *  @return status, true if good
+   */
+  virtual OFBool good() const;
+
+  /** returns the status of the consumer as an OFCondition object.
+   *  Unless the status is good, the consumer will not permit any operation.
+   *  @return status, EC_Normal if good
+   */
+  virtual OFCondition status() const;
+
+  /** returns true if the consumer is flushed, i.e. has no more data
+   *  pending in it's internal state that needs to be flushed before
+   *  the stream is closed.
+   *  @return true if consumer is flushed, false otherwise
+   */
+  virtual OFBool isFlushed() const;
+
+  /** returns the minimum number of bytes that can be written with the
+   *  next call to write(). The DcmObject write methods rely on avail
+   *  to return a value > 0 if there is no I/O suspension since certain
+   *  data such as tag and length are only written "en bloc", i.e. all
+   *  or nothing.
+   *  @return minimum of space available in consumer
+   */
+  virtual offile_off_t avail() const;
+
+  /** processes as many bytes as possible from the given input block.
+   *  @param buf pointer to memory block, must not be NULL
+   *  @param buflen length of memory block
+   *  @return number of bytes actually processed.
+   */
+  virtual offile_off_t write(const void *buf, offile_off_t buflen);
+
+  /** instructs the consumer to flush its internal content until
+   *  either the consumer becomes "flushed" or I/O suspension occurs.
+   *  After a call to flush(), a call to write() will produce undefined
+   *  behaviour.
+   */
+  virtual void flush();
+
+private:
+
+  /// private unimplemented copy constructor
+  DcmStdoutConsumer(const DcmStdoutConsumer&);
+
+  /// private unimplemented copy assignment operator
+  DcmStdoutConsumer& operator=(const DcmStdoutConsumer&);
+
+  /// the file we're actually writing to
+  OFFile file_;
+
+  /// status
+  OFCondition status_;
+};
+
+
+/** output stream that writes to standard output
+ */
+class DCMTK_DCMDATA_EXPORT DcmStdoutStream: public DcmOutputStream
+{
+public:
+  /** constructor
+   *  @param filename name of file to be created (may contain wide chars
+   *    if support enabled)
+   */
+  DcmStdoutStream(const OFFilename &filename);
+
+  /** constructor
+   *  @param file structure, file must already be open for writing
+   */
+  DcmStdoutStream(FILE *file);
+
+  /// destructor
+  virtual ~DcmStdoutStream();
+
+private:
+
+  /// private unimplemented copy constructor
+  DcmStdoutStream(const DcmStdoutStream&);
+
+  /// private unimplemented copy assignment operator
+  DcmStdoutStream& operator=(const DcmStdoutStream&);
+
+  /// the final consumer of the filter chain
+  DcmStdoutConsumer consumer_;
+};
+
+#endif
index c1d87cdb22a254b22876fcbf97e91e8e6d10e6f3..eeb2b3e93c51612f2256087750f4393d5880a178 100644 (file)
@@ -97,6 +97,7 @@ public:
    *  If the object points to a private creator element,
    *  the tag key and creator code are added to the cache.
    *  Otherwise, the cache remains unmodified.
+   *  @param dobj the given object
    */
   void updateCache(DcmObject *dobj);
 
index c6dccc02bea871dc0a1fcf677889682911bb78a6..c8c70b08cd65dc6f8a2833e5c7b620cef4a879eb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -210,17 +210,29 @@ private:
      *  if such an entry is found or EC_RepresentationNotFound. The pixSeq
      *  attribute in findEntry can be NULL, it is not needed for the find
      *  operation!
+     *  @param findEntry the entry to find
+     *  @param result the found entry
+     *  @return EC_Normal if entry is found, EC_RepresentationNotFound otherwise.
      */
     OFCondition findRepresentationEntry(
         const DcmRepresentationEntry & findEntry,
         DcmRepresentationListIterator & result);
 
     /** insert or replace a representation entry in the list
+     *  @param repEntry the DcmRepresentationEntry to be inserted
+     *  @return the inserted entry
      */
     DcmRepresentationListIterator insertRepresentationEntry(
         DcmRepresentationEntry * repEntry);
 
     /** decode representation to unencapsulated format
+     *  @param fromType transfer syntax to decode from
+     *  @param fromParam representation parameter of current compressed
+     *    representation, may be NULL.
+     *  @param fromPixSeq compressed pixel sequence
+     *  @param pixelStack stack pointing to the location of the pixel data
+     *    element in the current dataset.
+     *  @return EC_Normal if successful, an error code otherwise.
      */
     OFCondition decode(
         const DcmXfer & fromType,
@@ -229,6 +241,15 @@ private:
         DcmStack & pixelStack);
 
     /** encode to encapsulated format
+     *  @param fromType current transfer syntax of the compressed image
+     *  @param fromParam current representation parameter of compressed data, may be NULL
+     *  @param fromPixSeq compressed pixel sequence
+     *  @param toType transfer syntax to compress to
+     *  @param toParam representation parameter describing the desired
+     *    new compressed representation (e.g. JPEG quality)
+     *  @param pixelStack stack pointing to the location of the pixel data
+     *    element in the current dataset.
+     *  @return EC_Normal if successful, an error code otherwise.
      */
     OFCondition encode(
         const DcmXfer & fromType,
@@ -337,6 +358,7 @@ public:
     /** tests if it is possible to write a specific representation
      *  Only existing representations are considered, since this
      *  method does not create a representation.
+     *  @param newXfer the syntax to be checked
      */
     virtual OFBool canWriteXfer(const E_TransferSyntax newXfer,
                                 const E_TransferSyntax oldXfer);
@@ -346,7 +368,10 @@ public:
     virtual Uint32 calcElementLength(const E_TransferSyntax xfer,
                                      const E_EncodingType enctype);
 
-    /** returns length of representation value field conforming to
+    /** returns length of representation conforming to the transfer syntax
+     *  @param xfer the transfer syntax
+     *  @param enctype the encoding type
+     *  @return returns length of representation value field conforming to
      *  given transfer syntax. It does not create a representation.
      *  If no conforming representation exists, an error code is set
      *  and 0 returned.
@@ -382,6 +407,11 @@ public:
      *  It does not create a representation. If no conforming
      *  representation exists,  an error code is returned.
      *  The written representation is the new current representation
+     *  @param outStream the output stream
+     *  @param oxfer the transfer syntax that should be used
+     *  @param enctype encoding types (undefined or explicit length)
+     *  @param pointer to write cache object, may be NULL
+     *  @return EC_Normal on success, the error otherwise
      */
     virtual OFCondition write(
       DcmOutputStream &outStream,
@@ -434,47 +464,62 @@ public:
     virtual void transferEnd();
 
     /** test if it is possible to choose the representation in the parameters
+     * @param repType the representation type
+     * @param repParam the representation parameters
      */
     OFBool canChooseRepresentation(
         const E_TransferSyntax repType,
         const DcmRepresentationParameter * repParam);
 
-    /** choose a specific representation. if representation does not exist
-     *  it is created (if possible).
-     *  if repParam is zero, a representation is chosen or created that
-     *  is equal to the default representation parameters
+    /** choose a specific representation.
+     *  @remarks if representation does not exist it is created (if possible).
+     *    if repParam is zero, a representation is chosen or created that
+     *    is equal to the default representation parameters
+     *  @deprecated The direct call of this method by user code is deprecated.
+     *    Use DcmDataset::chooseRepresentation() instead.
+     *  @repType the representation type
+     *  @repParam the representation parameters
+     *  @stack the object stack
      */
     OFCondition chooseRepresentation(
         const E_TransferSyntax repType,
         const DcmRepresentationParameter * repParam,
         DcmStack & stack);
 
-    /** Inserts an original encapsulated representation. current and original
-     *  representations are changed, all old representations are deleted
+    /** Inserts an original encapsulated representation.
+     *  @remarks current and original representations are changed,
+     *  all old representations are deleted
+     *  @param repType the representation type
+     *  @param repParam the representation parameters
+     *  @param pixSeq the pixel sequence
      */
     void putOriginalRepresentation(
         const E_TransferSyntax repType,
         const DcmRepresentationParameter * repParam,
         DcmPixelSequence * pixSeq);
 
-    /**insert an original unencapsulated
-     *  representation. current and original representations are changed,
+    /** insert an original unencapsulated representation.
+     *  @remarks current and original representations are changed,
      *  all old representations are deleted. The array data is copied.
+     *  @param byteValue used to check for corrupted data
+     *  @param length the length of the element to put
      */
     virtual OFCondition putUint8Array(
         const Uint8 * byteValue,
         const unsigned long length);
 
-    /** insert an original unencapsulated
-     *  representation. current and original representations are changed,
+    /** insert an original unencapsulated representation.
+     *  @remarks current and original representations are changed,
      *  all old representations are deleted. The array data is copied.
+     *  @param wordValue new attribute value
+     *  @param length number of values in array vals
      */
     virtual OFCondition putUint16Array(
         const Uint16 * wordValue,
         const unsigned long length);
 
     /** create an empty Uint8 array of given number of bytes and set it.
-     *  All array elements are initialized with a value of 0 (using 'memzero').
+     *  All array elements are initialized with a value of 0 (using 'memset').
      *  This method is only applicable to certain VRs, e.g. OB.
      *  @param numBytes number of bytes (8 bit) to be created
      *  @param bytes stores the pointer to the resulting buffer
@@ -485,7 +530,7 @@ public:
         Uint8 * & bytes);
 
     /** create an empty Uint16 array of given number of words and set it.
-     *  All array elements are initialized with a value of 0 (using 'memzero').
+     *  All array elements are initialized with a value of 0 (using 'memset').
      *  This method is only applicable to OW data.
      *  @param numWords number of words (16 bit) to be created
      *  @param words stores the pointer to the resulting buffer
@@ -514,6 +559,9 @@ public:
     /** get a specific existing Representation, creates no representation
      *  if repParam is NULL, then the representation conforming to the default
      *  representationParameters (defined with the codec) is returned.
+     *  @param repType the transfer syntax
+     *  @param repParam representation parameters
+     *  @param pixSeq the found representation
      */
     OFCondition getEncapsulatedRepresentation(
         const E_TransferSyntax repType,
@@ -522,6 +570,8 @@ public:
 
     /** returns the representation identification (key) consisting of
      *  representation type and parameter of the original representation
+     *  @param repType the transfer syntax
+     *  @param the representations parameters
      */
     void getOriginalRepresentationKey(
         E_TransferSyntax & repType,
@@ -529,25 +579,34 @@ public:
 
     /** returns the representation identification (key) consisting of
      *  representation type and parameter of the current representation
+     *  @param repType the transfer Syntax
+     *  @param repParam the DcmRepresentationParameter
      */
     void getCurrentRepresentationKey(
         E_TransferSyntax & repType,
         const DcmRepresentationParameter * & repParam);
 
-    /** sets the representation identification parameter of the current
-     *  representation
+    /** sets the representation identification parameter of the current representation
+     * @param repParam the representation Parameter
+     * @return EC_Normal on success, EC_RepresentationNotFound if the representation was not found
      */
     OFCondition setCurrentRepresentationParameter(
         const DcmRepresentationParameter * repParam);
 
-    /** returns if a specific conforming  representation exists.
+    /** checks if a specific conforming representation exists.
+     * @param repType the representation Type
+     * @param repParam the representation Parameter
+     * @return OFTrue if a specific conforming representation exists, OFFalse otherwise
      */
     OFBool hasRepresentation(
         const E_TransferSyntax repType,
         const DcmRepresentationParameter * repParam = NULL);
 
-    /** delete a representation. It is not possible to delete the
-     *  original representation with this method
+    /** deletes a representation.
+     * @remark It is not possible to delete the original representation with this method
+     * @param repType the representation Type
+     * @param repParam the representation Parameter
+     * @return EC_NORMAL on success, the error otherwise
      */
     OFCondition removeRepresentation(
         const E_TransferSyntax repType,
@@ -565,6 +624,9 @@ public:
     /** delete original representation and set new original representation.
      *  If the new representation does not exist, the original one is not
      *  deleted and an error code returns
+     *  @param repType the representation type
+     *  @param repParam the representation parameter
+     *  @return EC_Normal on success, the error code otherwise
      */
     OFCondition removeOriginalRepresentation(
         const E_TransferSyntax repType,
index a569e2a1a0c15ed0e7cc0f7c1c09f46807bd51e0..d4ef83af8f75fe2fea7cb54371f5033538a7189c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2011, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/ofstd/oflist.h"   /* for class OFList<> */
-
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dcdefine.h"
 
 #define DcmRLEEncoder_BLOCKSIZE 16384
index beb92277e7ba33db8ca1de5a1c6097730277d404..b1046b9510576d28320869ff70f9064f7ee6d8d8 100644 (file)
@@ -122,6 +122,7 @@ public:
     DcmObject* top() const;
 
     /** returns n-th element from stack without removing it.
+     *  @param number the number of the element
      *  @return n-th element from stack
      */
     DcmObject* elem(const unsigned long number) const;
index 42a301e0145e59b60fc746c454e3616c57145c11..5897f14a7968cbfc1ec7cef1704726e7e51c1b16 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,6 +26,7 @@
 
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofstring.h"
+#include "dcmtk/ofstd/ofdiag.h"
 #include "dcmtk/dcmdata/dcdefine.h"
 
 /*
@@ -191,22 +192,34 @@ public:
 
 protected:
 
-    /// less-than operation comparing only group numbers
+    /** less-than operation comparing only group numbers
+     * @param key the object to compare to
+     */
     int groupLT(const DcmTagKey& key) const;
 
-    /// greater-than operation comparing only group numbers
+    /** greater-than operation comparing only group numbers
+     * @param key the object to compare to
+     */
     int groupGT(const DcmTagKey& key) const;
 
-    /// comparison operation comparing only group numbers
+    /** comparison operation comparing only group numbers
+     * @param key the object to compare to
+     */
     int groupEQ(const DcmTagKey& key) const;
 
-    /// less-than operation comparing only element numbers
+    /** less-than operation comparing only element numbers
+     * @param key the object to compare to
+     */
     int elementLT(const DcmTagKey& key) const;
 
-    /// greater-than operation comparing only element numbers
+    /** greater-than operation comparing only element numbers
+     * @param key the object to compare to
+     */
     int elementGT(const DcmTagKey& key) const;
 
-    /// comparison operation comparing only element numbers
+    /** comparison operation comparing only element numbers
+     * @param key the object to compare to
+     */
     int elementEQ(const DcmTagKey& key) const;
 
 private:
@@ -344,6 +357,9 @@ DcmTagKey::hash() const
 
 /* Comparisons */
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_ATTRIBUTE_REDECLARATION
+
 inline int
 DcmTagKey::groupLT(const DcmTagKey& key) const
 {
@@ -416,4 +432,6 @@ DcmTagKey::operator >= (const DcmTagKey& key) const
     return (*this > key) || (*this == key);
 }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 #endif
index 2a4dd4c312a62a837d2c501aaff49e3b5e96d481..a3952a9aa944025776b757fa7becbba0d5b2a885 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2016, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,9 +27,6 @@
 #include "dcmtk/oflog/oflog.h"
 #include "dcmtk/dcmdata/dcdefine.h"
 
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TYPES_H
 /* needed e.g. on Solaris for definition of size_t */
index 16207a4af4b417aa2945ccd9a6add835ac0484a5..0f3d4a452f2972ab37febac0b58ed5bb674fd06e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/oftypes.h"
 #include "dcmtk/dcmdata/dcdefine.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
-
 // include this file in doxygen documentation
 
 /** @file dcuid.h
@@ -531,7 +527,9 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID
 #define UID_PatientRadiationDoseSRStorage                          "1.2.840.10008.5.1.4.1.1.88.73"
 #define UID_PlannedImagingAgentAdministrationSRStorage             "1.2.840.10008.5.1.4.1.1.88.74"
 #define UID_PerformedImagingAgentAdministrationSRStorage           "1.2.840.10008.5.1.4.1.1.88.75"
+#define UID_EnhancedXRayRadiationDoseSRStorage                     "1.2.840.10008.5.1.4.1.1.88.76"
 #define UID_ContentAssessmentResultsStorage                        "1.2.840.10008.5.1.4.1.1.90.1"
+#define UID_MicroscopyBulkSimpleAnnotationsStorage                 "1.2.840.10008.5.1.4.1.1.91.1"
 #define UID_EncapsulatedPDFStorage                                 "1.2.840.10008.5.1.4.1.1.104.1"
 #define UID_EncapsulatedCDAStorage                                 "1.2.840.10008.5.1.4.1.1.104.2"
 #define UID_EncapsulatedSTLStorage                                 "1.2.840.10008.5.1.4.1.1.104.3"
@@ -545,6 +543,8 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID
 #define UID_CTDefinedProcedureProtocolStorage                      "1.2.840.10008.5.1.4.1.1.200.1"
 #define UID_CTPerformedProcedureProtocolStorage                    "1.2.840.10008.5.1.4.1.1.200.2"
 #define UID_ProtocolApprovalStorage                                "1.2.840.10008.5.1.4.1.1.200.3"
+#define UID_XADefinedProcedureProtocolStorage                      "1.2.840.10008.5.1.4.1.1.200.7"
+#define UID_XAPerformedProcedureProtocolStorage                    "1.2.840.10008.5.1.4.1.1.200.8"
 #define UID_RTImageStorage                                         "1.2.840.10008.5.1.4.1.1.481.1"
 #define UID_RTDoseStorage                                          "1.2.840.10008.5.1.4.1.1.481.2"
 #define UID_RTStructureSetStorage                                  "1.2.840.10008.5.1.4.1.1.481.3"
@@ -565,6 +565,8 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID
 #define UID_TomotherapeuticRadiationRecordStorage                  "1.2.840.10008.5.1.4.1.1.481.18"
 #define UID_CArmPhotonElectronRadiationRecordStorage               "1.2.840.10008.5.1.4.1.1.481.19"
 #define UID_RoboticRadiationRecordStorage                          "1.2.840.10008.5.1.4.1.1.481.20"
+#define UID_RTRadiationSetDeliveryInstructionStorage               "1.2.840.10008.5.1.4.1.1.481.21"
+#define UID_RTTreatmentPreparationStorage                          "1.2.840.10008.5.1.4.1.1.481.22"
 #define UID_RTBeamsDeliveryInstructionStorage                      "1.2.840.10008.5.1.4.34.7"
 #define UID_RTBrachyApplicationSetupDeliveryInstructionStorage     "1.2.840.10008.5.1.4.34.10"
 #define UID_HangingProtocolStorage                                 "1.2.840.10008.5.1.4.38.1"
@@ -824,6 +826,7 @@ DCMTK_DCMDATA_EXPORT unsigned long dcmGuessModalityBytes(const char *sopClassUID
 #define UID_ICBMSingleSubjectMRIFrameOfReference                   "1.2.840.10008.1.4.2.2"
 #define UID_IEC61217FixedCoordinateSystemFrameOfReference          "1.2.840.10008.1.4.3.1"
 #define UID_StandardRoboticCoordinateSystemFrameOfReference        "1.2.840.10008.1.4.3.2"
+#define UID_IEC61217TableTopCoordinateSystemFrameOfReference       "1.2.840.10008.1.4.3.3"
 #define UID_SRI24FrameOfReference                                  "1.2.840.10008.1.4.4.1"
 #define UID_Colin27FrameOfReference                                "1.2.840.10008.1.4.5.1"
 #define UID_LPBA40AIRFrameOfReference                              "1.2.840.10008.1.4.6.1"
index d13c18bd81f1e844c1cd7cf1cbdf1d686d2d77b8..177736622db96f35f2375d00609a45a9bf6d8938 100644 (file)
@@ -108,7 +108,7 @@ class DCMTK_DCMDATA_EXPORT DcmApplicationEntity
     // ensure inherited overloads of matches take part in overload resolution
     using DcmByteString::matches;
 
-    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    /// @copydoc DcmByteString::matches(const OFString&,const OFString&,const OFBool) const
     virtual OFBool matches(const OFString& key,
                            const OFString& candidate,
                            const OFBool enableWildCardMatching = OFTrue) const;
index 23e8daeacf678f2247077ede5864c11776498e93..5db0a4a35a01c7f99cc3a6de54f95350cb82c391 100644 (file)
@@ -108,7 +108,7 @@ class DCMTK_DCMDATA_EXPORT DcmCodeString
     // ensure inherited overloads of matches take part in overload resolution
     using DcmByteString::matches;
 
-    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    /// @copydoc DcmByteString::matches(const OFString&,const OFString&,const OFBool) const
     virtual OFBool matches(const OFString& key,
                            const OFString& candidate,
                            const OFBool enableWildCardMatching = OFTrue) const;
index bfda1a3255305820e3ae3472b1b637987ba677f0..ae485037af7717a09bac74679208c87fa686456a 100644 (file)
@@ -150,7 +150,7 @@ class DCMTK_DCMDATA_EXPORT DcmDate
     // ensure inherited overloads of matches take part in overload resolution
     using DcmByteString::matches;
 
-    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    /// @copydoc DcmByteString::matches(const OFString&,const OFString&,const OFBool) const
     virtual OFBool matches(const OFString& key,
                            const OFString& candidate,
                            const OFBool enableWildCardMatching = OFTrue) const;
index fbfc646e19ed2ac2d6db21f33200437e34b63b88..5e950a7c8298417ece8d41c25dfe601dd9e9a70b 100644 (file)
@@ -173,7 +173,7 @@ class DCMTK_DCMDATA_EXPORT DcmDateTime
     // ensure inherited overloads of matches take part in overload resolution
     using DcmByteString::matches;
 
-    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    /// @copydoc DcmByteString::matches(const OFString&,const OFString&,const OFBool) const
     virtual OFBool matches(const OFString& key,
                            const OFString& candidate,
                            const OFBool enableWildCardMatching = OFTrue) const;
index 28b8f6967bfded831bb04ac526cfd96eeb5a69f4..5bb8f5fddf58b6c75211c34cf38a841a161ba495 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2017, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -118,7 +118,6 @@ class DCMTK_DCMDATA_EXPORT DcmLongString
     virtual OFCondition writeJson(STD_NAMESPACE ostream &out,
                                   DcmJsonFormat &format);
 
-
     /* --- static helper functions --- */
 
     /** check whether given string value conforms to the VR "LO" (Long String)
@@ -135,12 +134,6 @@ class DCMTK_DCMDATA_EXPORT DcmLongString
     static OFCondition checkStringValue(const OFString &value,
                                         const OFString &vm = "1-n",
                                         const OFString &charset = "");
-
-protected:
-
-    /** @copydoc DcmCharString::getDelimiterChars()
-     */
-    virtual const OFString& getDelimiterChars() const;
 };
 
 
index e2ab85c569ecbbea69c29a3fe6ad1c1d12012394..fa0457c77566578afd7e74c1c2d9bb268efd93a1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -280,7 +280,7 @@ class DCMTK_DCMDATA_EXPORT DcmOtherByteOtherWord
                                        const unsigned long numWords);
 
     /** create an empty Uint8 array of given number of bytes and set it.
-     *  All array elements are initialized with a value of 0 (using 'memzero').
+     *  All array elements are initialized with a value of 0 (using 'memset').
      *  This method is only applicable to non-OW data, e.g. OB.
      *  @param numBytes number of bytes (8 bit) to be created
      *  @param bytes stores the pointer to the resulting buffer
@@ -290,7 +290,7 @@ class DCMTK_DCMDATA_EXPORT DcmOtherByteOtherWord
                                          Uint8 *&bytes);
 
     /** create an empty Uint16 array of given number of words and set it.
-     *  All array elements are initialized with a value of 0 (using 'memzero').
+     *  All array elements are initialized with a value of 0 (using 'memset').
      *  This method is only applicable to OW data.
      *  @param numWords number of words (16 bit) to be created
      *  @param words stores the pointer to the resulting buffer
index 0d54c63e145921a8e08333393b7a7237e88b9d91..e8c632b8dab37a7db8f14940f60e8f445e5903f1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2013-2019, OFFIS e.V.
+ *  Copyright (C) 2013-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -120,7 +120,7 @@ class DCMTK_DCMDATA_EXPORT DcmOtherDouble
                                   DcmJsonFormat &format);
 
     /** create an empty Float64 array of given number of double values and set it.
-     *  All array elements are initialized with a value of 0 (using 'memzero').
+     *  All array elements are initialized with a value of 0 (using 'memset').
      *  @param numDoubles number of double values (64 bit) to be created
      *  @param doubleVals stores the pointer to the resulting Float64 array
      *    (set to NULL in case of error)
index 9442ca34bb0f6714147830061343faa774dd8391..ce604768ad75bf3a37c483b9aa823daea8e6e78a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2019, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -120,7 +120,7 @@ class DCMTK_DCMDATA_EXPORT DcmOtherFloat
                                   DcmJsonFormat &format);
 
     /** create an empty Float32 array of given number of float values and set it.
-     *  All array elements are initialized with a value of 0 (using 'memzero').
+     *  All array elements are initialized with a value of 0 (using 'memset').
      *  @param numFloats number of float values (32 bit) to be created
      *  @param floatVals stores the pointer to the resulting Float32 array
      *    (set to NULL in case of error)
index 24b255cbc9bcdf872628b5230e2486de5e931aa0..f8b6747a18e5a00f3616ddb017b5a7701c387340 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016-2019, OFFIS e.V.
+ *  Copyright (C) 2016-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -122,7 +122,7 @@ class DCMTK_DCMDATA_EXPORT DcmOtherLong
                                   DcmJsonFormat &format);
 
     /** create an empty Uint32 array of given number of double-words and set it.
-     *  All array elements are initialized with a value of 0 (using 'memzero').
+     *  All array elements are initialized with a value of 0 (using 'memset').
      *  @param numDoubleWords number of double-words (32 bit) to be created
      *  @param doubleWords stores the pointer to the resulting Uint32 array
      *    (set to NULL in case of error)
index b955c17cc408985e6b30442a840771f32a07b250..b89ad2b19bf3993fea0d5676003dd0061f7679e7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, OFFIS e.V.
+ *  Copyright (C) 2019-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -122,7 +122,7 @@ class DCMTK_DCMDATA_EXPORT DcmOther64bitVeryLong
                                   DcmJsonFormat &format);
 
     /** create an empty Uint64 array of given number of quad-words and set it.
-     *  All array elements are initialized with a value of 0 (using 'memzero').
+     *  All array elements are initialized with a value of 0 (using 'memset').
      *  @param numQuadWords number of quad-words (64 bit) to be created
      *  @param quadWords stores the pointer to the resulting Uint64 array
      *    (set to NULL in case of error)
index 21ff617e041e69d2765ba763a2f2aa1ae2dbd6df..34d30af12338fa1740c44e94fbef995afcf2afac 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -303,12 +303,6 @@ class DCMTK_DCMDATA_EXPORT DcmPersonName
                                         const OFString &vm = "1-n",
                                         const OFString &charset = "");
 
-protected:
-
-    /** @copydoc DcmCharString::getDelimiterChars()
-     */
-    virtual const OFString& getDelimiterChars() const;
-
 private:
 
     /** an array containing the component group names, for XML and JSON output.
index 0183833e7d711af97f434194b9ea6bf6e188b3eb..201316d21b2d1acd78cede9df04aa0d97088a40b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -43,7 +43,9 @@ public:
         const DcmTag & tag,
         const Uint32 len = 0);
 
-    /// copy constructor
+    /** copy constructor
+    * @param old the OBOW to copy
+    */
     DcmPolymorphOBOW(
         const DcmPolymorphOBOW & old);
 
@@ -208,7 +210,7 @@ public:
     virtual OFCondition putUint16Array(const Uint16 *vals, const unsigned long num);
 
     /** create an empty Uint8 array of given number of bytes and set it.
-     *  All array elements are initialized with a value of 0 (using 'memzero').
+     *  All array elements are initialized with a value of 0 (using 'memset').
      *  This method is only applicable to certain VRs, e.g. OB.
      *  @param numBytes number of bytes (8 bit) to be created
      *  @param bytes stores the pointer to the resulting buffer
@@ -220,7 +222,7 @@ public:
 
 
     /** create an empty Uint16 array of given number of words and set it.
-     *  All array elements are initialized with a value of 0 (using 'memzero').
+     *  All array elements are initialized with a value of 0 (using 'memset').
      *  This method is only applicable to OW data.
      *  @param numWords number of words (16 bit) to be created
      *  @param words stores the pointer to the resulting buffer
index 7e572f6c7f2191deb709c4fe5f716747648462a8..080cc7aabf806a7a1d192256a9290e459bdc7058 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2017, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -135,12 +135,6 @@ class DCMTK_DCMDATA_EXPORT DcmShortString
     static OFCondition checkStringValue(const OFString &value,
                                         const OFString &vm = "1-n",
                                         const OFString &charset = "");
-
-protected:
-
-    /** @copydoc DcmCharString::getDelimiterChars()
-     */
-    virtual const OFString& getDelimiterChars() const;
 };
 
 
index 295146beec767b64896c6cd723270baa15759f8e..2c691289a44d8125c71407265313c1c23a4dd62f 100644 (file)
@@ -170,7 +170,7 @@ class DCMTK_DCMDATA_EXPORT DcmTime
     // ensure inherited overloads of matches take part in overload resolution
     using DcmByteString::matches;
 
-    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    /// @copydoc DcmByteString::matches(const OFString&,const OFString&,const OFBool) const
     virtual OFBool matches(const OFString& key,
                            const OFString& candidate,
                            const OFBool enableWildCardMatching = OFTrue) const;
index 8bb800d492b4bf8512c1ab746eafedd231c05904..cb0ddb45b736dd53a476d95928dbb23f569f0163 100644 (file)
@@ -96,8 +96,8 @@ class DCMTK_DCMDATA_EXPORT DcmUniqueIdentifier
 
     /** print element to a stream.
      *  The output format of the value is a backslash separated sequence of string
-     *  components. In case of a single component the UID number is mapped to the
-     *  corresponding UID name (using "dcmFindNameOfUID()") if available. A "=" is
+     *  components. In case of a single component, the UID number is mapped to the
+     *  corresponding UID name (using dcmFindNameOfUID()) if available. A "=" is
      *  used as a prefix to distinguish the UID name from the UID number.
      *  NB: This mapping of UID names only works for single-valued strings.
      *  @param out output stream
@@ -123,9 +123,9 @@ class DCMTK_DCMDATA_EXPORT DcmUniqueIdentifier
                                     OFBool normalize = OFTrue);
 
     /** set element value from the given character string.
-     *  If the string starts with a "=" the subsequent characters are interpreted as a
-     *  UID name and mapped to the corresponding UID number (using "dcmFindUIDFromName()")
-     *  if possible. Otherwise the leading "=" is removed.
+     *  If the string starts with a "=", the subsequent characters are interpreted as a
+     *  UID name and mapped to the corresponding UID number (using dcmFindUIDFromName())
+     *  if possible. Otherwise, an error (EC_UnknownUIDName) is returned.
      *  NB: This mapping of UID names only works for single-valued input strings.
      *  @param stringVal input character string (possibly multi-valued)
      *  @return status, EC_Normal if successful, an error code otherwise
@@ -133,9 +133,9 @@ class DCMTK_DCMDATA_EXPORT DcmUniqueIdentifier
     virtual OFCondition putString(const char *stringVal);
 
     /** set element value from the given character string.
-     *  If the string starts with a "=" the subsequent characters are interpreted as a
-     *  UID name and mapped to the corresponding UID number (using "dcmFindUIDFromName()")
-     *  if possible. Otherwise the leading "=" is removed.
+     *  If the string starts with a "=", the subsequent characters are interpreted as a
+     *  UID name and mapped to the corresponding UID number (using dcmFindUIDFromName())
+     *  if possible. Otherwise, an error (EC_UnknownUIDName) is returned.
      *  NB: This mapping of UID names only works for single-valued input strings.
      *  The length of the string has to be specified explicitly. The string can, therefore,
      *  also contain more than one NULL byte.
index 50413ad21f0c401d4c8a893291669bec4eccec05..cbfe57eafb7247c74efb50e588ad0dbf10caee33 100644 (file)
@@ -144,7 +144,7 @@ class DCMTK_DCMDATA_EXPORT DcmUniversalResourceIdentifierOrLocator
     // ensure inherited overloads of matches take part in overload resolution
     using DcmByteString::matches;
 
-    /// @copydoc DcmByteString::matches(OFString,OFString,OFBool)
+    /// @copydoc DcmByteString::matches(const OFString&,const OFString&,const OFBool) const
     virtual OFBool matches(const OFString& key,
                            const OFString& candidate,
                            const OFBool enableWildCardMatching = OFTrue) const;
index abc92a187581c53803ec4e4ef77701b9e4279459..288e4bd1b36cf5f87fc249a1cd1183404a56f45a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2019, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,6 +26,9 @@
 #include "dcmtk/dcmdata/libi2d/i2doutpl.h"
 #include "dcmtk/dcmdata/libi2d/i2dimgs.h"
 #include "dcmtk/dcmdata/dcpixel.h"
+#include "dcmtk/dcmdata/dcofsetl.h"
+
+class DcmPixelItem;
 
 class DCMTK_I2D_EXPORT Image2Dcm
 {
@@ -33,34 +36,87 @@ class DCMTK_I2D_EXPORT Image2Dcm
 public:
 
   /** Constructor, initializes command line options
-   *  @return none
    */
   Image2Dcm();
 
+  /** Destructor, frees plugin memory
+   */
+  ~Image2Dcm();
+
   /** Start the conversion. Needs a fully configured input plugin
    *  and a fully configured output plugin to operate. Returns
    *  a dataset with the resulting DICOM object.
    *  @param inputPlug - [in] The input plugin to read pixel data
    *  @param outPlug - [in] The output plugin for specific SOP class output
+   *  @param numberOfFrames - [in] The number of frames to be written
    *  @param resultDset - [out] The DICOM object resulting from the conversion
    *         The dataset is allocated in this method and must be freed by the
    *         caller.
    *  @param proposedTS - [out] The proposed transfer syntax (needed e. g.
    *                            by JPEG input plugin)
-   *  @return EC_Normal, if successfull, error otherwise
+   *  @return EC_Normal, if successful, error otherwise
    */
-  OFCondition convert(I2DImgSource *inputPlug,
-                      I2DOutputPlug *outPlug,
-                      DcmDataset*& resultDset,
-                      E_TransferSyntax& proposedTS);
+  OFCondition convertFirstFrame(
+    I2DImgSource *inputPlug,
+    I2DOutputPlug *outPlug,
+    size_t numberOfFrames,
+    DcmDataset*& resultDset,
+    E_TransferSyntax& proposedTS);
 
-  /** Sets a DICOM file that should serve as a template for the resulting
+
+  /** Start the conversion. Needs a fully configured input plugin
+   *  to operate. Updates the pixel data element created by convertFirstFrame().
+   *  @param inputPlug - [in] The input plugin to read pixel data
+   *  @param frameNumber - [in] The number of the current frame, must be larger than 1
+   *    and smaller or equal to the numberOfFrames value passed to convertFirstFrame().
+   *  @return EC_Normal, if successful, error otherwise
+   */
+  OFCondition convertNextFrame(
+    I2DImgSource *inputPlug,
+    size_t frameNumber);
+
+  /** Update the offset table in the case of an encapsulated image
+   */
+  OFCondition updateOffsetTable();
+
+  /** Finalizes the conversion after the last call to convertNextFrame()
+   *  by writing the attributes related to lossy image compression.
+   *  @param inputPlug - [in] The input plugin to read pixel data
+   *  @param numberOfFrames - [in] The number of frames to be written
+   *  @param dset - [in/out] The DICOM object resulting from the conversion
+   *  @return EC_Normal, if successful, error otherwise
+   */
+  OFCondition updateLossyCompressionInfo(
+    I2DImgSource *inputPlug,
+    size_t numberOfFrames,
+    DcmDataset *dset);
+
+  /** Sets a file that should serve as a template for the resulting
     * DICOM object. Only the dataset of the given file is imported.
-    * @param file - [in] The filename of the template DICOM file
+    * @param file - [in] The filename of the template file,
+    *   which is either in DICOM or XML format.
     * @return none
     */
   void setTemplateFile(const OFString& file);
 
+  /** Sets the format of the template file.
+    * @param isXML - [in] true for XML, false for DICOM format
+    * @return none
+    */
+  void setTemplateFileIsXML(OFBool isXML);
+
+  /** activates or deactivates XML validation
+    * @param enabled - [in] true to enable validation
+    * @return none
+    */
+  void setXMLvalidation(OFBool enabled);
+
+  /** activates or deactivates an XML namespace check
+    * @param enabled - [in] true to enable namespace check
+    * @return none
+    */
+  void setXMLnamespaceCheck(OFBool enabled);
+
   /** Set file from which patient/study/series data should be imported from.
    *  @param file - [in] The DICOM file to read from
    *  @return none
@@ -81,17 +137,12 @@ public:
    */
   void setIncrementInstanceNumber(OFBool incInstNo);
 
-  /** Enables/disables autotmatic insertion of the value "ISO_IR100" as
-    * a value for the Specific Character Set attribute. If disabled,
-    * no value is inserted for Specifific Character Set but instead
-    * must be provided by other means (see setTemplateFile(), setSeriesFrom(),
-    * setStudyFrom(), setOverrideKeys()). The insertion is applied after
-    * loading the (optional) template file; the value might be overwritten
-    * by the value copied by setStudy/Series/OverrideKeys.
-    * @param insertLatin1 - [in] Enable/disable insertion of Iso Latin 1
-    * @return none;
-    */
-  void setISOLatin1(OFBool insertLatin1);
+  /** Sets the conversion flags for character set conversion of
+   *  the study/series file
+   * @param conversionFlags - [in] conversion flags
+   * @return none;
+   */
+  void setConversionFlags(size_t conversionFlags);
 
   /** Specifies some attributes that should be inserted after conversion.
    *  They will override any identical attributes already existing in the
@@ -120,11 +171,6 @@ public:
                            OFBool insertMissingType2 = OFTrue,
                            OFBool inventMissingType1 = OFTrue);
 
-  /** Destructor, frees plugin memory
-   *  @return none
-   */
-  ~Image2Dcm();
-
 protected:
 
   /** Cleans up template for future insertion of pixel data information, ie
@@ -157,13 +203,29 @@ protected:
   /** Reads pixel data and corresponding attributes like rows etc. from image
    *  file and inserts them into dataset.
    *  @param imageSource - [in] The input plugin that actually reads the pixel data
+   *  @param numberOfFrames - [in] The number of frames to be written
    *  @param dset - [out] The dataset to export the pixel data attributes to
    *  @param outputTS - [out] The proposed transfex syntax of the dataset
+   *  @param compressionRatio - [out] compression ratio of the pixel data, 1.0 for uncompressed
+   *  @return EC_Normal, if successful, error otherwise
+   */
+  OFCondition readAndInsertPixelDataFirstFrame(
+    I2DImgSource* imageSource,
+    size_t numberOfFrames,
+    DcmDataset* dset,
+    E_TransferSyntax& outputTS,
+    double& compressionRatio);
+
+  /** Reads pixel data and corresponding attributes like rows etc. from image
+   *  file and inserts them into dataset as an additional frame.
+   *  @param imageSource - [in] The input plugin that actually reads the pixel data
+   *  @param frameNumber - [in] The number of the current frame, must be larger than 1
+   *    and smaller or equal to the numberOfFrames value passed to convertFirstFrame().
    *  @return EC_Normal, if successful, error otherwise
    */
-  OFCondition readAndInsertPixelData( I2DImgSource* imageSource,
-                                      DcmDataset* dset,
-                                      E_TransferSyntax& outputTS);
+  OFCondition readAndInsertPixelDataNextFrame(
+    I2DImgSource* imageSource,
+    size_t frameNumber);
 
   /** Do some completeness / validity checks. Should be called when
    *  dataset is completed and is about to be saved.
@@ -181,7 +243,7 @@ protected:
    /** Inserts "ISO_IR100" in the attribute "Specific Character Set".
     *  Overwrites any existing value.
     *  @param outputDset - [out] The dataset to write to
-    *  @return EC_Normal if insertion is successfull, error code otherwise
+    *  @return EC_Normal if insertion is successful, error code otherwise
     */
    OFCondition insertLatin1(DcmDataset *outputDset);
 
@@ -209,17 +271,27 @@ protected:
 
 private:
 
-  /** Correctly inserts encapsulated pixel data.
+  /** Inserts encapsulated pixel data for the first frame
    *  @param dset [in] - The dataset to which we should add this.
    *  @param pixData [in] - The data to add.
    *  @param length [in] - The length of pixData.
    *  @param outputTS [in] - The output transfer syntax to be used
-   *  @return EC_Normal, if successfull, error otherwise.
+   *  @return EC_Normal, if successful, error otherwise.
+   */
+  OFCondition insertEncapsulatedPixelDataFirstFrame(
+    DcmDataset* dset,
+    char *pixData,
+    Uint32 length,
+    E_TransferSyntax outputTS);
+
+  /** Inserts encapsulated pixel data for another frame
+   *  @param pixData [in] - The data to add.
+   *  @param length [in] - The length of pixData.
+   *  @return EC_Normal, if successful, error otherwise.
    */
-  OFCondition insertEncapsulatedPixelData(DcmDataset* dset,
-                                          char *pixData,
-                                          Uint32 length,
-                                          const E_TransferSyntax& outputTS) const;
+  OFCondition insertEncapsulatedPixelDataNextFrame(
+    char *pixData,
+    Uint32 length);
 
   /* Attributes for writing DICOM dataset */
 
@@ -227,11 +299,20 @@ private:
   /// (and are not checked by the isValid() function)
   OFList<OFString> m_overrideKeys;
 
-  /// If not empty, the DICOM file specified in this variable is used
+  /// If not empty, the DICOM or XML file specified in this variable is used
   /// as a base for the DICOM image file to be created, ie. all attributes
   /// are taken over from this template file
   OFString m_templateFile;
 
+  /// if true, the template file is in XML format, otherwise DICOM
+  OFBool m_templateFileIsXML;
+
+  /// if true, an XML validation will be performed while parsing
+  OFBool m_XMLvalidation;
+
+  /// if true, an XML namespace check will be performed while parsing
+  OFBool m_XMLnamespaceCheck;
+
   /// If true, patient and study data is read from file
   OFBool m_readStudyLevel;
 
@@ -260,6 +341,60 @@ private:
   /// for attribute "Specific Character Set". Insertion takes place after
   /// loading (optional) template file.
   OFBool m_insertLatin1;
+
+  /// number of rows
+  Uint16 m_rows;
+
+  /// number of columns
+  Uint16 m_cols;
+
+  /// samples per pixel
+  Uint16 m_samplesPerPixel;
+
+  /// bits allocated
+  Uint16 m_bitsAllocated;
+
+  /// bits stored
+  Uint16 m_bitsStored;
+
+  /// high bit
+  Uint16 m_highBit;
+
+  /// pixel representation
+  Uint16 m_pixelRepresentation;
+
+  /// planar configuration
+  Uint16 m_planarConfiguration;
+
+  /// pixel aspect ratio, horizontal
+  Uint16 m_pixelAspectRatioH;
+
+  /// pixel aspect ratio, vertical
+  Uint16 m_pixelAspectRatioV;
+
+  /// frame length in bytes
+  Uint32 m_frameLength;
+
+  /// photometric interpretation
+  OFString m_photometricInterpretation;
+
+  /// compression ratio per frame accumulated in this variable
+  double m_compressionRatio;
+
+  /// flags for character set conversion
+  size_t m_conversionFlags;
+
+  /// buffer into which uncompressed pixel data is written
+  char *m_output_buffer;
+
+  /// offset list object used for the creation of encapsulated datasets
+  DcmOffsetList m_offsetList;
+
+  /// pixel sequence object used for the creation of encapsulated datasets
+  DcmPixelSequence *m_pixelSequence;
+
+  /// offset table object used for the creation of encapsulated datasets
+  DcmPixelItem *m_offsetTable;
 };
 
 #endif // I2D_H
index 4db84793f389e0a08c885358f8921c1f5bc10ab8..c551340fca43b23550a82dd06c04ffef375304b3 100644 (file)
@@ -87,8 +87,13 @@ public:
    *  @param srcLossyComprMethod - [out] Unused parameter
    *  @return EC_Normal if information is available, error otherwise
    */
+#ifdef DOXYGEN
   virtual OFCondition getLossyComprInfo(OFBool& srcEncodingLossy,
-                                        OFString& /* srcLossyComprMethod */) const
+                                        OFString& srcLossyComprMethod) const
+#else
+  virtual OFCondition getLossyComprInfo(OFBool& srcEncodingLossy,
+                                        OFString& /* srcLossyComprMethod */ ) const
+#endif
   {
     srcEncodingLossy = OFFalse;
     return EC_Normal;
@@ -137,10 +142,12 @@ protected:
 
   /** Read the color palette from the file.
    *  @param colors - [in] number of colors to read
+   *  @param isMonochrome - [out] true if the palette is monochrome
    *  @param palette - [out] the read color palette is stored here
    *  @return EC_Normal, if successful, error otherwise
    */
   OFCondition readColorPalette(Uint16 colors,
+                               OFBool& isMonochrome,
                                Uint32*& palette);
 
   /** Read the bitmap data.
@@ -149,6 +156,7 @@ protected:
    *  @param height - [in] height of the image in pixel
    *  @param bpp - [in] Image's bits per pixel.
    *  @param isTopDown - [in] If true, this is a top down bitmap
+   *  @param isMonochrome - [in] If true, this is a monochrome palette color image
    *  @param colors - [in] Number of color palette entries
    *  @param palette - [in] Color palette
    *  @param pixData - [out] Image data
@@ -159,6 +167,7 @@ protected:
                              const Uint16 height,
                              const Uint16 bpp,
                              const OFBool isTopDown,
+                             const OFBool isMonochrome,
                              const Uint16 colors,
                              const Uint32* palette,
                              char*& pixData /*out*/,
@@ -192,6 +201,7 @@ protected:
    *  @param bpp - [in] The number of bits per pixel.
    *  @param colors - [in] The number of entries in the color palette.
    *  @param palette - [in] The color palette to use.
+   *  @param isMonochrome - [in] If true, this is a monochrome palette color image
    *  @param pixData - [out] The buffer to write the data to (in "RGB" format).
    *  @return EC_Normal, if successful, error otherwise
    */
@@ -200,6 +210,7 @@ protected:
                                    const int bpp,
                                    const Uint16 colors,
                                    const Uint32* palette,
+                                   const OFBool isMonochrome,
                                    char *pixData /*out*/) const;
 
   /** Read 4 bytes from the byte stream and interpret it as a signed integer.
index 4e4d4040bf4359c45453ffc6d75b58f9e561d2de..9dd4bccd55daa81a3ea38187c9c225e9826f71d5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2014, OFFIS e.V.
+ *  Copyright (C) 2007-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -23,9 +23,9 @@
 #define I2DJPGS_H
 
 #include "dcmtk/config/osconfig.h"
+#include "dcmtk/dcmdata/libi2d/i2dimgs.h"
 #include "dcmtk/ofstd/offile.h"
 #include "dcmtk/ofstd/oflist.h"
-#include "dcmtk/dcmdata/libi2d/i2dimgs.h"
 
 /**
  * JPEG markers consist of one or more 0xFF bytes, followed by a marker code byte
  * @note RESn markers are not fully listed, but only the first (RES0) and the
  *       last (RESN)
  */
-enum E_JPGMARKER { E_JPGMARKER_SOF0 = 0xC0, E_JPGMARKER_SOF1 = 0xC1, E_JPGMARKER_SOF2 = 0xC2,
-                   E_JPGMARKER_SOF3 = 0xC3, /*C4 and CC are not SOF markers,*/ E_JPGMARKER_SOF5 = 0xC5,
-                   E_JPGMARKER_SOF6 = 0xC6, E_JPGMARKER_SOF7 = 0xC7, E_JPGMARKER_JPG = 0xC8,
-                   E_JPGMARKER_SOF9 = 0xC9, E_JPGMARKER_SOF10 = 0xCA, E_JPGMARKER_SOF11 = 0xCB,
-                   E_JPGMARKER_SOF13 = 0xCD, E_JPGMARKER_SOF14 = 0xCE, E_JPGMARKER_SOF15 = 0xCF,
-                   E_JPGMARKER_DHT = 0xC4, E_JPGMARKER_DAC = 0xCC, E_JPGMARKER_RST0 = 0xD0,
-                   E_JPGMARKER_RST1 = 0xD1, E_JPGMARKER_RST2 = 0xD2, E_JPGMARKER_RST3 = 0xD3,
-                   E_JPGMARKER_RST4 = 0xD4, E_JPGMARKER_RST5 = 0xD5, E_JPGMARKER_RST6 = 0xD6,
-                   E_JPGMARKER_RST7 = 0xD7, E_JPGMARKER_SOI = 0xD8, E_JPGMARKER_EOI = 0xD9,
-                   E_JPGMARKER_SOS = 0xDA, E_JPGMARKER_DQT = 0xDB, E_JPGMARKER_DNL = 0xDC,
-                   E_JPGMARKER_DRI = 0xDD, E_JPGMARKER_DHP = 0xDE, E_JPGMARKER_EXP = 0xDF,
-                   E_JPGMARKER_APP0 = 0xE0, E_JPGMARKER_APP1 = 0xE1, E_JPGMARKER_APP2 = 0xE2,
-                   E_JPGMARKER_APP3 = 0xE3, E_JPGMARKER_APP4 = 0xE4, E_JPGMARKER_APP5 = 0xE5,
-                   E_JPGMARKER_APP6 = 0xE6, E_JPGMARKER_APP7 = 0xE7, E_JPGMARKER_APP8 = 0xE8,
-                   E_JPGMARKER_APP9 = 0xE9, E_JPGMARKER_APP10 = 0xEA, E_JPGMARKER_APP11 = 0xEB,
-                   E_JPGMARKER_APP12 = 0xEC, E_JPGMARKER_APP13 = 0xED, E_JPGMARKER_APP14 = 0xEE,
-                   E_JPGMARKER_APP15 = 0xEF, E_JPGMARKER_JPGN0 = 0xF0, E_JPGMARKER_JPGN1 = 0xF1,
-                   E_JPGMARKER_JPGN2 = 0xF2, E_JPGMARKER_JPGN3 = 0xF3, E_JPGMARKER_JPGN4 = 0xF4,
-                   E_JPGMARKER_JPGN5 = 0xF5, E_JPGMARKER_JPGN6 = 0xF6, E_JPGMARKER_JPGN7 = 0xF7,
-                   E_JPGMARKER_JPGN8 = 0xF8, E_JPGMARKER_JPGN9 = 0xF9, E_JPGMARKER_JPGN10 = 0xFA,
-                   E_JPGMARKER_JPGN11 = 0xFB, E_JPGMARKER_JPGN12 = 0xFC, E_JPGMARKER_JPGN13 = 0xFD,
-                   E_JPGMARKER_COM = 0xFE, E_JPGMARKER_TEM = 0x01, E_JPGMARKER_RES0 = 0x02,
-                   E_JPGMARKER_RESN = 0xBF };
+enum E_JPGMARKER
+{
+    E_JPGMARKER_SOF0                                    = 0xC0,
+    E_JPGMARKER_SOF1                                    = 0xC1,
+    E_JPGMARKER_SOF2                                    = 0xC2,
+    E_JPGMARKER_SOF3                                    = 0xC3,
+    /*C4 and CC are not SOF markers,*/ E_JPGMARKER_SOF5 = 0xC5,
+    E_JPGMARKER_SOF6                                    = 0xC6,
+    E_JPGMARKER_SOF7                                    = 0xC7,
+    E_JPGMARKER_JPG                                     = 0xC8,
+    E_JPGMARKER_SOF9                                    = 0xC9,
+    E_JPGMARKER_SOF10                                   = 0xCA,
+    E_JPGMARKER_SOF11                                   = 0xCB,
+    E_JPGMARKER_SOF13                                   = 0xCD,
+    E_JPGMARKER_SOF14                                   = 0xCE,
+    E_JPGMARKER_SOF15                                   = 0xCF,
+    E_JPGMARKER_DHT                                     = 0xC4,
+    E_JPGMARKER_DAC                                     = 0xCC,
+    E_JPGMARKER_RST0                                    = 0xD0,
+    E_JPGMARKER_RST1                                    = 0xD1,
+    E_JPGMARKER_RST2                                    = 0xD2,
+    E_JPGMARKER_RST3                                    = 0xD3,
+    E_JPGMARKER_RST4                                    = 0xD4,
+    E_JPGMARKER_RST5                                    = 0xD5,
+    E_JPGMARKER_RST6                                    = 0xD6,
+    E_JPGMARKER_RST7                                    = 0xD7,
+    E_JPGMARKER_SOI                                     = 0xD8,
+    E_JPGMARKER_EOI                                     = 0xD9,
+    E_JPGMARKER_SOS                                     = 0xDA,
+    E_JPGMARKER_DQT                                     = 0xDB,
+    E_JPGMARKER_DNL                                     = 0xDC,
+    E_JPGMARKER_DRI                                     = 0xDD,
+    E_JPGMARKER_DHP                                     = 0xDE,
+    E_JPGMARKER_EXP                                     = 0xDF,
+    E_JPGMARKER_APP0                                    = 0xE0,
+    E_JPGMARKER_APP1                                    = 0xE1,
+    E_JPGMARKER_APP2                                    = 0xE2,
+    E_JPGMARKER_APP3                                    = 0xE3,
+    E_JPGMARKER_APP4                                    = 0xE4,
+    E_JPGMARKER_APP5                                    = 0xE5,
+    E_JPGMARKER_APP6                                    = 0xE6,
+    E_JPGMARKER_APP7                                    = 0xE7,
+    E_JPGMARKER_APP8                                    = 0xE8,
+    E_JPGMARKER_APP9                                    = 0xE9,
+    E_JPGMARKER_APP10                                   = 0xEA,
+    E_JPGMARKER_APP11                                   = 0xEB,
+    E_JPGMARKER_APP12                                   = 0xEC,
+    E_JPGMARKER_APP13                                   = 0xED,
+    E_JPGMARKER_APP14                                   = 0xEE,
+    E_JPGMARKER_APP15                                   = 0xEF,
+    E_JPGMARKER_JPGN0                                   = 0xF0,
+    E_JPGMARKER_JPGN1                                   = 0xF1,
+    E_JPGMARKER_JPGN2                                   = 0xF2,
+    E_JPGMARKER_JPGN3                                   = 0xF3,
+    E_JPGMARKER_JPGN4                                   = 0xF4,
+    E_JPGMARKER_JPGN5                                   = 0xF5,
+    E_JPGMARKER_JPGN6                                   = 0xF6,
+    E_JPGMARKER_JPGN7                                   = 0xF7,
+    E_JPGMARKER_JPGN8                                   = 0xF8,
+    E_JPGMARKER_JPGN9                                   = 0xF9,
+    E_JPGMARKER_JPGN10                                  = 0xFA,
+    E_JPGMARKER_JPGN11                                  = 0xFB,
+    E_JPGMARKER_JPGN12                                  = 0xFC,
+    E_JPGMARKER_JPGN13                                  = 0xFD,
+    E_JPGMARKER_COM                                     = 0xFE,
+    E_JPGMARKER_TEM                                     = 0x01,
+    E_JPGMARKER_RES0                                    = 0x02,
+    E_JPGMARKER_RESN                                    = 0xBF
+};
 
 /**
  * Struct that represents a marker in a JPEG file, i.e. it consists
  * of the byte position of the marker and the marker code itself
  */
-struct DCMTK_I2D_EXPORT JPEGFileMapEntry {
-  /// The byte position of the marker
-  offile_off_t bytePos;
-  /// The marker byte itself
-  E_JPGMARKER marker;
+struct DCMTK_I2D_EXPORT JPEGFileMapEntry
+{
+    /// The byte position of the marker
+    offile_off_t bytePos;
+    /// The marker byte itself
+    E_JPGMARKER marker;
 };
 
-
 /** This is a I2DImgSource implementation that can parse JPEG files and convert
  *  them into DICOM images.
  */
@@ -76,278 +122,268 @@ class DCMTK_I2D_EXPORT I2DJpegSource : public I2DImgSource
 {
 
 public:
-
-  /** Constructor, initializes member variables
-   *  @return none
-   */
-  I2DJpegSource();
-
-  /** Returns format of input image. For this class "JPEG" is returned.
-   *  @return Returns format of input image, i.e. "JPEG".
-   */
-  OFString inputFormat() const;
-
-  /** Extracts the raw JPEG pixel data stream from a JPEG file and returns some
-   *  further information about this pixel data. Raw means here that all APP
-   *  markers (e.g. JFIF information) are removed from the JPEG stream.
-   *  The pixel data returned is a JPEG stream in JPEG interchange format.
-   *  This function allocates memory for the pixel data returned to the user.
-   *  The caller of this function is responsible for deleting the memory buffer.
-   *  @param rows - [out] Rows of image
-   *  @param cols - [out] Columns of image
-   *  @param samplesPerPixel - [out] Number of components per pixel
-   *  @param photoMetrInt - [out] The DICOM color model used for the compressed data
-   *  @param bitsAlloc - [out] Bits Allocated for one sample
-   *  @param bitsStored - [out] Bits Stored, Number of bits actually stored within
-   *                            Bits Allocated
-   *  @param highBit - [out] High Bit, Highest stored in bit within Bits Allocated
-   *  @param pixelRepr - [out] Pixel Representation (0=unsigned, 1=signed)
-   *  @param planConf - [out] Planar Configuration
-   *  @param pixAspectH - [out] Horizontal value of pixel aspect ratio
-   *  @param pixAspectV - [out] Vertical value of pixel aspect ratio
-   *  @param pixData - [out] Pointer to the pixel data in JPEG Interchange Format
-   *                         (but without APPx markers).
-   *  @param length - [out] Length of pixel data
-   *  @param ts - [out] The transfer syntax imposed by the imported pixel pixel
-   *                    data. This is necessary for the JPEG importer that needs
-   *                    to report which TS must be used for the imported JPEG data
-   *                    (ie. baseline, progressive, ...).
-   *  @return EC_Normal, if successful, error otherwise
-   */
-  OFCondition readPixelData( Uint16& rows,
-                             Uint16& cols,
-                             Uint16& samplesPerPixel,
-                             OFString& photoMetrInt,
-                             Uint16& bitsAlloc,
-                             Uint16& bitsStored,
-                             Uint16& highBit,
-                             Uint16& pixelRepr,
-                             Uint16& planConf,
-                             Uint16& pixAspectH,
-                             Uint16& pixAspectV,
-                             char*&  pixData,
-                             Uint32& length,
-                             E_TransferSyntax& ts);
-
-  /** After reading of pixel data, this function can be used for getting
-   *  information about lossy compression parameters.
-   *  @param srcEncodingLossy - [out] Denotes, whether the encoding of the pixel
-   *                            data read was lossy (OFTrue) or lossless (OFFalse)
-   *  @param srcLossyComprMethod - [out] Denotes the lossy compression method used
-   *                               in source if there is one (srcEncodingLossy = OFTrue).
-   *                               Should use defined terms of attribute Lossy
-   *                               Compression Method.
-   *  @return EC_Normal if information is available, error otherwise
-   */
-  OFCondition getLossyComprInfo(OFBool& srcEncodingLossy,
-                                OFString& srcLossyComprMethod) const;
-
-  /** Enable/Disable support for Extended Sequential JPEG Coding
-   *  @param enabled - [in] OFTrue: support Extended Sequential,
-   *                        OFFalse: do not support
-   *  @return none
-   */
-  void setExtSeqSupport(const OFBool enabled);
-
-  /** Enable/Disable support for Progressive JPEG Coding
-   *  @param enabled - [in] OFTrue: support Extended Sequential,
-   *                        OFFalse: do not support
-   *  @return none
-   */
-  void setProgrSupport(const OFBool enabled);
-
-  /** If enabled, conversion will only take place if JFIF data could be found
-   *  and evaluated. Many digital cameras do not provide a JFIF header, so this
-   *  is disabled by default.
-   */
-  void setInsistOnJFIF(const OFBool enabled);
-
-  /**  If enabled, APPn markers (except JFIF!) are also copied to the output file.
-   *   This can cause a huge speedup because instead of parsing the whole
-   *   JPEG file (for finding any APPn markers) the parsing stops after finding
-   *   the SOFn marker (which is relevant for extracting width/height and so on.
-   *   Default: false
-   *   @param enabled - [in] OFTrue: copy APPn, OFFalse: cut off APPn info
-   *   @return none
-   */
-  void setKeepAPPn(const OFBool enabled);
-
-  /** Returns a string representation of a JPEG marker code.
-   *  @param marker - [in] The marker to be converted
-   *  @return A string representation of the marker
-   */
-  static OFString jpegMarkerToString(const E_JPGMARKER& marker);
-
-  /** Destructor, frees some memory.
-   *  @return none
-   */
-  ~I2DJpegSource();
+    /** Constructor, initializes member variables
+     *  @return none
+     */
+    I2DJpegSource();
+
+    /** Returns format of input image. For this class "JPEG" is returned.
+     *  @return Returns format of input image, i.e. "JPEG".
+     */
+    OFString inputFormat() const;
+
+    /** Extracts the raw JPEG pixel data stream from a JPEG file and returns some
+     *  further information about this pixel data. Raw means here that all APP
+     *  markers (e.g. JFIF information) are removed from the JPEG stream.
+     *  The pixel data returned is a JPEG stream in JPEG interchange format.
+     *  This function allocates memory for the pixel data returned to the user.
+     *  The caller of this function is responsible for deleting the memory buffer.
+     *  @param rows - [out] Rows of image
+     *  @param cols - [out] Columns of image
+     *  @param samplesPerPixel - [out] Number of components per pixel
+     *  @param photoMetrInt - [out] The DICOM color model used for the compressed data
+     *  @param bitsAlloc - [out] Bits Allocated for one sample
+     *  @param bitsStored - [out] Bits Stored, Number of bits actually stored within
+     *                            Bits Allocated
+     *  @param highBit - [out] High Bit, Highest stored in bit within Bits Allocated
+     *  @param pixelRepr - [out] Pixel Representation (0=unsigned, 1=signed)
+     *  @param planConf - [out] Planar Configuration
+     *  @param pixAspectH - [out] Horizontal value of pixel aspect ratio
+     *  @param pixAspectV - [out] Vertical value of pixel aspect ratio
+     *  @param pixData - [out] Pointer to the pixel data in JPEG Interchange Format
+     *                         (but without APPx markers).
+     *  @param length - [out] Length of pixel data
+     *  @param ts - [out] The transfer syntax imposed by the imported pixel pixel
+     *                    data. This is necessary for the JPEG importer that needs
+     *                    to report which TS must be used for the imported JPEG data
+     *                    (ie. baseline, progressive, ...).
+     *  @return EC_Normal, if successful, error otherwise
+     */
+    OFCondition readPixelData(Uint16& rows,
+                              Uint16& cols,
+                              Uint16& samplesPerPixel,
+                              OFString& photoMetrInt,
+                              Uint16& bitsAlloc,
+                              Uint16& bitsStored,
+                              Uint16& highBit,
+                              Uint16& pixelRepr,
+                              Uint16& planConf,
+                              Uint16& pixAspectH,
+                              Uint16& pixAspectV,
+                              char*& pixData,
+                              Uint32& length,
+                              E_TransferSyntax& ts);
+
+    /** After reading of pixel data, this function can be used for getting
+     *  information about lossy compression parameters.
+     *  @param srcEncodingLossy - [out] Denotes, whether the encoding of the pixel
+     *                            data read was lossy (OFTrue) or lossless (OFFalse)
+     *  @param srcLossyComprMethod - [out] Denotes the lossy compression method used
+     *                               in source if there is one (srcEncodingLossy = OFTrue).
+     *                               Should use defined terms of attribute Lossy
+     *                               Compression Method.
+     *  @return EC_Normal if information is available, error otherwise
+     */
+    OFCondition getLossyComprInfo(OFBool& srcEncodingLossy, OFString& srcLossyComprMethod) const;
+
+    /** Enable/Disable support for Extended Sequential JPEG Coding
+     *  @param enabled - [in] OFTrue: support Extended Sequential,
+     *                        OFFalse: do not support
+     *  @return none
+     */
+    void setExtSeqSupport(const OFBool enabled);
+
+    /** Enable/Disable support for Progressive JPEG Coding
+     *  @param enabled - [in] OFTrue: support Extended Sequential,
+     *                        OFFalse: do not support
+     *  @return none
+     */
+    void setProgrSupport(const OFBool enabled);
+
+    /** If enabled, conversion will only take place if JFIF data could be found
+     *  and evaluated. Many digital cameras do not provide a JFIF header, so this
+     *  is disabled by default.
+     */
+    void setInsistOnJFIF(const OFBool enabled);
+
+    /**  If enabled, APPn markers (except JFIF!) are also copied to the output file.
+     *   Default: false
+     *   @param enabled - [in] OFTrue: copy APPn, OFFalse: cut off APPn info
+     *   @return none
+     */
+    void setKeepAPPn(const OFBool enabled);
+
+    /**  If enabled, COM marker is also copied to the output file.
+     *   Default: true
+     *   @param enabled - [in] OFTrue: copy COM, OFFalse: cut off COM segment
+     *   @return none
+     */
+    void setKeepCOM(const OFBool enabled);
+
+    /** Returns a string representation of a JPEG marker code.
+     *  @param marker - [in] The marker to be converted
+     *  @return A string representation of the marker
+     */
+    static OFString jpegMarkerToString(const E_JPGMARKER& marker);
+
+    /** Destructor, frees some memory.
+     *  @return none
+     */
+    ~I2DJpegSource();
 
 protected:
-
-  /** Opens the JPEG file specified by the given filename.
-   *  @param filename - [in] The file to be opened
-   *  @return EC_Normal, if successful, error otherwise
-   */
-  OFCondition openFile(const OFString& filename);
-
-  /** Closes JPEG file.
-   *  @return A string representation of the marker
-   */
-  void closeFile();
-
-  /** Function that scans a JPEG file and creates a "file map" which
-   *  includes all JPEG markers and their byte positions in the file.
-   *  @return EC_Normal, if successful, error otherwise
-   */
-  OFCondition createJPEGFileMap();
-
-  /** Dump the internal JPEG file map to a given stream. The file map
-   *  lists JPEG markers and their position in the bitstream found in the JPEG
-   *  file
-   *  @return none
-   */
-  void debugDumpJPEGFileMap() const;
-
-  /** Get image parameters as found at given SOF marker of the JPEG image.
-   *  @param entry - [in] This specifies the marker and the byte position of the
-   *                      SOF marker
-   *  @param imageWidth - [out] The width of the image
-   *  @param imageHeight - [out] The height of the image
-   *  @param samplesPerPixel - [out] Number of components per pixel
-   *  @param bitsPerSample - [out] Number of bits per pixel component
-   *  @return EC_Normal, if successful, error otherwise
-   */
-  OFCondition getSOFImageParameters( const JPEGFileMapEntry& entry,
-                                     Uint16& imageWidth,
-                                     Uint16& imageHeight,
-                                     Uint16& samplesPerPixel,
-                                     Uint16& bitsPerSample);
-
-  /** Get JPEG parameters as found at given JFIF marker of the JPEG image.
-   *  @param entry - [in] This specifies the marker and the byte position of the
-   *                      JFIF marker
-   *  @param jfifVersion - [out] The JFIF version of the JFIF data
-   *  @param pixelAspectH - [out] The horizontal pixel aspect ratio
-   *  @param pixelAspectV - [out] The vertical pixel aspect ratio
-   *  @param unit - [out] The contents of the pixel aspect ratio unit field
-   *  @return EC_Normal, if successful, error otherwise
-   */
-  OFCondition getJFIFImageParameters( const JPEGFileMapEntry& entry,
-                                      Uint16& jfifVersion,
-                                      Uint16& pixelAspectH,
-                                      Uint16& pixelAspectV,
-                                      Uint16& unit);
-
-  /** Check, whether a given JPEG image marker (SOFn) is supported by
-   *  this plugin
-   *  @param jpegEncoding - [in] Image marker that should be tested
-   *  @return EC_Normal, marker is supported, error otherwise
-   */
-  OFCondition isJPEGEncodingSupported(const E_JPGMARKER& jpegEncoding) const;
-
-
-  /** Returns if possible the DICOM transfer syntax matching the coding of the
-   *  JPEG data.
-   *  @param jpegEncoding - [in] Image marker that should be tested
-   *  @return EC_Normal, marker is supported, error otherwise
-   */
-  static E_TransferSyntax associatedTS(const E_JPGMARKER& jpegEncoding);
-
-  /** Returns true if marker is one of the RST0 to RST7 markers
-   *  @param jpegEncoding - [in] Image marker that should be tested
-   *  @return OFTrue, if marker is RST0 to RST7, OFFalse otherwise
-   */
-  static OFBool isRSTMarker(const E_JPGMARKER& jpegEncoding);
-
-  /** Returns true if marker is one of the SOF0 to SOF15 markers
-   *  @param jpegEncoding - [in] Image marker that should be tested
-   *  @return OFTrue, if marker is SOF0 to SOF15, OFFalse otherwise
-   */
-  static OFBool isSOFMarker(const E_JPGMARKER& jpegEncoding);
-
-
-  /** Extract raw JPEG stream (i.e. without APPn markers) from JPEG file.
-   *  @param pixelData - [out] The resulting JPEG stream
-   *  @param pixLength - [out] The length of the resulting stream
-   *  @return EC_Normal, if successful, error otherwise
-   */
-  OFCondition extractRawJPEGStream(char*& pixelData,
-                                   Uint32& pixLength);
-
-  /** Copies JPEG stream (with APPn markers, excluding JFIF) from JPEG file.
-   *  @param pixelData - [out] The resulting JPEG stream
-   *  @param pixLength - [out] The length of the resulting stream
-   *  @return EC_Normal, if successful, error otherwise
-   */
-  OFCondition copyJPEGStream(char*& pixelData,
-                             Uint32& pixLength);
-
-  /** Skips one marker while scanning through the JPEG file stream.
-   *  @return EC_Normal, if successful, error otherwise
-   */
-  OFCondition skipVariable();
-
-  /** Tries to read the SOI marker.
-   *  @param result - [out] The code of the SOI marker if successful (0xD8)
-   *  @return EC_Normal, if successful, error otherwise
-   */
-  OFCondition firstMarker(E_JPGMARKER& result);
-
-  /** Tries to find the next JPEG marker in underlying file stream.
-   *  @param lastWasSOSMarker - [in] Denotes, whether the last marker read
-   *         before was the SOS (start of scan) marker. This is needed to
-   *         ignore non-marker 0xFF occurrences in the compressed data.
-   *  @param result - [out] The result marker
-   *  @return EC_Normal, if successful, error otherwise
-   */
-  OFCondition nextMarker(const OFBool& lastWasSOSMarker,
-                         E_JPGMARKER& result);
-
-  /** Read 2 bytes from the byte stream.
-   *  @param result - [out] The result
-   *  @return 0, if successful, EOF if rest of stream does not contain enough bytes
-   */
-  inline int read2Bytes(Uint16& result);
-
-  /** Read 1 byte from the byte stream.
-   *  @param result - [out] The result
-   *  @return 0, if successful, EOF if rest of stream does not contain enough bytes
-   */
-  inline int read1Byte(Uint8& result);
-
-  /** Deletes internal JPEG file map and frees memory.
-   *  @return none
-   */
-  void clearMap();
-
-  /// JPEG file map. This map includes all JPEG markers and their byte positions
-  /// in the JPEG file.
-  OFList<JPEGFileMapEntry*> m_jpegFileMap;
-
-  /// The JPEG file, if opened
-  OFFile jpegFile;
-
-  /// If true, JPEGs with progressive coding are not supported
-  OFBool m_disableProgrTs;
-
-  /// If true, JPEGs with extended sequential coding are not supported
-  OFBool m_disableExtSeqTs;
-
-  /// If true, conversion will only work if JFIF header can be found.
-  /// Default: false
-  OFBool m_insistOnJFIF;
-
-  /// If true, APPn markers (except JFIF!) are also copied to the output file.
-  /// This can cause a huge speedup because instead of parsing the whole
-  /// JPEG file (for finding any APPn markers) the parsing stops after finding
-  /// the SOFn marker (which is relevant for extracting width/height and so on.
-  /// Default: false
-  OFBool m_keepAPPn;
-
-  /// After reading pixel data, this denotes whether the source
-  /// data is already lossy compressed
-  OFBool m_lossyCompressed;
+    /** Opens the JPEG file specified by the given filename.
+     *  @param filename - [in] The file to be opened
+     *  @return EC_Normal, if successful, error otherwise
+     */
+    OFCondition openFile(const OFString& filename);
+
+    /** Closes JPEG file.
+     *  @return A string representation of the marker
+     */
+    void closeFile();
+
+    /** Function that scans a JPEG file and creates a "file map" which
+     *  includes all JPEG markers and their byte positions in the file.
+     *  @return EC_Normal, if successful, error otherwise
+     */
+    OFCondition createJPEGFileMap();
+
+    /** Dump the internal JPEG file map to a given stream. The file map
+     *  lists JPEG markers and their position in the bitstream found in the JPEG
+     *  file
+     *  @return none
+     */
+    void debugDumpJPEGFileMap() const;
+
+    /** Get image parameters as found at given SOF marker of the JPEG image.
+     *  @param entry - [in] This specifies the marker and the byte position of the
+     *                      SOF marker
+     *  @param imageWidth - [out] The width of the image
+     *  @param imageHeight - [out] The height of the image
+     *  @param samplesPerPixel - [out] Number of components per pixel
+     *  @param bitsPerSample - [out] Number of bits per pixel component
+     *  @return EC_Normal, if successful, error otherwise
+     */
+    OFCondition getSOFImageParameters(const JPEGFileMapEntry& entry,
+                                      Uint16& imageWidth,
+                                      Uint16& imageHeight,
+                                      Uint16& samplesPerPixel,
+                                      Uint16& bitsPerSample);
+
+    /** Get JPEG parameters as found at given JFIF marker of the JPEG image.
+     *  @param entry - [in] This specifies the marker and the byte position of the
+     *                      JFIF marker
+     *  @param jfifVersion - [out] The JFIF version of the JFIF data
+     *  @param pixelAspectH - [out] The horizontal pixel aspect ratio
+     *  @param pixelAspectV - [out] The vertical pixel aspect ratio
+     *  @param unit - [out] The contents of the pixel aspect ratio unit field
+     *  @return EC_Normal, if successful, error otherwise
+     */
+    OFCondition getJFIFImageParameters(
+        const JPEGFileMapEntry& entry, Uint16& jfifVersion, Uint16& pixelAspectH, Uint16& pixelAspectV, Uint16& unit);
+
+    /** Check, whether a given JPEG image marker (SOFn) is supported by
+     *  this plugin
+     *  @param jpegEncoding - [in] Image marker that should be tested
+     *  @return EC_Normal, marker is supported, error otherwise
+     */
+    OFCondition isJPEGEncodingSupported(const E_JPGMARKER& jpegEncoding) const;
+
+    /** Returns if possible the DICOM transfer syntax matching the coding of the
+     *  JPEG data.
+     *  @param jpegEncoding - [in] Image marker that should be tested
+     *  @return EC_Normal, marker is supported, error otherwise
+     */
+    static E_TransferSyntax associatedTS(const E_JPGMARKER& jpegEncoding);
+
+    /** Returns true if marker is one of the RST0 to RST7 markers
+     *  @param jpegEncoding - [in] Image marker that should be tested
+     *  @return OFTrue, if marker is RST0 to RST7, OFFalse otherwise
+     */
+    static OFBool isRSTMarker(const E_JPGMARKER& jpegEncoding);
+
+    /** Returns true if marker is one of the SOF0 to SOF15 markers
+     *  @param jpegEncoding - [in] Image marker that should be tested
+     *  @return OFTrue, if marker is SOF0 to SOF15, OFFalse otherwise
+     */
+    static OFBool isSOFMarker(const E_JPGMARKER& jpegEncoding);
+
+    /** Extract raw JPEG stream (i.e. without APPn markers) from JPEG file.
+     *  @param pixelData - [out] The resulting JPEG stream
+     *  @param pixLength - [out] The length of the resulting stream
+     *  @return EC_Normal, if successful, error otherwise
+     */
+    OFCondition extractRawJPEGStream(char*& pixelData, Uint32& pixLength);
+
+    /** Skips one marker while scanning through the JPEG file stream.
+     *  @return EC_Normal, if successful, error otherwise
+     */
+    OFCondition skipVariable();
+
+    /** Tries to read the SOI marker.
+     *  @param result - [out] The code of the SOI marker if successful (0xD8)
+     *  @return EC_Normal, if successful, error otherwise
+     */
+    OFCondition firstMarker(E_JPGMARKER& result);
+
+    /** Tries to find the next JPEG marker in underlying file stream.
+     *  @param lastWasSOSMarker - [in] Denotes, whether the last marker read
+     *         before was the SOS (start of scan) marker. This is needed to
+     *         ignore non-marker 0xFF occurrences in the compressed data.
+     *  @param result - [out] The result marker
+     *  @return EC_Normal, if successful, error otherwise
+     */
+    OFCondition nextMarker(const OFBool& lastWasSOSMarker, E_JPGMARKER& result);
+
+    /** Read 2 bytes from the byte stream.
+     *  @param result - [out] The result
+     *  @return 0, if successful, EOF if rest of stream does not contain enough bytes
+     */
+    inline int read2Bytes(Uint16& result);
+
+    /** Read 1 byte from the byte stream.
+     *  @param result - [out] The result
+     *  @return 0, if successful, EOF if rest of stream does not contain enough bytes
+     */
+    inline int read1Byte(Uint8& result);
+
+    /** Deletes internal JPEG file map and frees memory.
+     *  @return none
+     */
+    void clearMap();
+
+    /// JPEG file map. This map includes all JPEG markers and their byte positions
+    /// in the JPEG file.
+    OFList<JPEGFileMapEntry*> m_jpegFileMap;
+
+    /// The JPEG file, if opened
+    OFFile jpegFile;
+
+    /// If true, JPEGs with progressive coding are not supported
+    OFBool m_disableProgrTs;
+
+    /// If true, JPEGs with extended sequential coding are not supported
+    OFBool m_disableExtSeqTs;
+
+    /// If true, conversion will only work if JFIF header can be found.
+    /// Default: false
+    OFBool m_insistOnJFIF;
+
+    /// If true, APPn markers (except JFIF!) are also copied to the output file.
+    /// This can cause a huge speedup because instead of parsing the whole
+    /// JPEG file (for finding any APPn markers) the parsing stops after finding
+    /// the SOFn marker (which is relevant for extracting width/height and so on.
+    /// Default: false
+    OFBool m_keepAPPn;
+
+    /// If true, COM segment is also copied to the output file.
+    /// Default: true
+    OFBool m_keepCOM;
+
+    /// After reading pixel data, this denotes whether the source
+    /// data is already lossy compressed
+    OFBool m_lossyCompressed;
 };
 
 #endif // I2DJPGS_H
index 763612ad2ba9c8b4be062057844bde70865e0ab9..5ee736b9dc05e08f716eb7580f3993239f256157 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2017, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/oflog/oflog.h"
-#include "dcmtk/dcmdata/dcdatset.h"
-#include "dcmtk/dcmdata/dcelem.h"
+#include "dcmtk/ofstd/oflist.h"
+#include "dcmtk/ofstd/ofcond.h"
 #include "dcmtk/dcmdata/libi2d/i2define.h"
 
-
 extern DCMTK_I2D_EXPORT OFLogger DCM_dcmdataLibi2dLogger;
 
 #define DCMDATA_LIBI2D_TRACE(msg) OFLOG_TRACE(DCM_dcmdataLibi2dLogger, msg)
@@ -38,6 +37,11 @@ extern DCMTK_I2D_EXPORT OFLogger DCM_dcmdataLibi2dLogger;
 #define DCMDATA_LIBI2D_ERROR(msg) OFLOG_ERROR(DCM_dcmdataLibi2dLogger, msg)
 #define DCMDATA_LIBI2D_FATAL(msg) OFLOG_FATAL(DCM_dcmdataLibi2dLogger, msg)
 
+/// default value for the FrameTime attribute when creating multiframe images
+#define DCMTK_I2D_Default_Frame_Time 1000
+
+class DcmDataset;
+class DcmTagKey;
 
 class DCMTK_I2D_EXPORT I2DOutputPlug
 {
@@ -45,28 +49,29 @@ class DCMTK_I2D_EXPORT I2DOutputPlug
 public:
 
   /** Constructor, initializes member variables
-   *  @return none
    */
-  I2DOutputPlug() : m_doAttribChecking(OFTrue), m_inventMissingType2Attribs(OFTrue),
-                    m_inventMissingType1Attribs(OFTrue)
-  {};
+  I2DOutputPlug();
+
+  /** Destructor
+   */
+  virtual ~I2DOutputPlug();
 
   /** Virtual function that returns a short name of the plugin.
    *  @return The name of the plugin
    */
-  virtual OFString ident() =0;
+  virtual OFString ident() = 0;
 
   /** Virtual function that returns the Storage SOP class UID, the plugin writes.
    *  @param suppSOPs - [out] List containing supported output SOP classes
    *  @return String containing the Storage SOP class UID
    */
-  virtual void supportedSOPClassUIDs(OFList<OFString>& suppSOPs) =0;
+  virtual void supportedSOPClassUIDs(OFList<OFString>& suppSOPs) = 0;
 
   /** Outputs SOP class specific information into dataset
    * @param dataset - [in/out] Dataset to write to
    * @return EC_Normal if successful, error otherwise
    */
-  virtual OFCondition convert(DcmDataset &dataset) const =0;
+  virtual OFCondition convert(DcmDataset &dataset) const = 0;
 
   /** Do some completeness / validity checks. Should be called when
    *  dataset is completed and is about to be saved.
@@ -75,10 +80,20 @@ public:
    */
   virtual OFString isValid(DcmDataset& dataset) const = 0;
 
-  /** Destructor
-   *  @return none
+  /** check if the output format supported by this plugin can write
+   *  multi-frame images.
+   *  @return true if multiframe is supported, false otherwise
+   */
+  virtual OFBool supportsMultiframe() const = 0;
+
+  /** Add multiframe specific attributes
+   *  @param datset pointer to DICOM dataset, must not be NULL
+   *  @param numberOfFrames number of frames in this dataset
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  virtual ~I2DOutputPlug() {};
+  virtual OFCondition insertMultiFrameAttributes(
+    DcmDataset* targetDataset,
+    size_t numberOfFrames) const = 0;
 
   /** Enable/Disable basic validity checks for output dataset
    *  @param doChecks - [in] OFTrue enables checking, OFFalse turns it off.
@@ -92,15 +107,19 @@ public:
    */
   virtual void setValidityChecking(OFBool doChecks,
                                    OFBool insertMissingType2 = OFTrue,
-                                   OFBool inventMissingType1 = OFTrue)
-  {
-    m_doAttribChecking = doChecks;
-    m_inventMissingType2Attribs = insertMissingType2;
-    m_inventMissingType1Attribs = inventMissingType1;
-  };
+                                   OFBool inventMissingType1 = OFTrue);
 
 protected:
 
+  /** Checks whether a given tag exists in a dataset and is non-empty,
+   *  otherwise returns an error string.
+   *  @param key - [in] The tag to be checked/inserted
+   *  @param targetDset - [in/out] The dataset to search (and insert) in
+   *  @return Error string, which is empty if no error occurs.
+   */
+  virtual OFString checkType1Attrib(const DcmTagKey& key,
+                                    DcmDataset* targetDset) const;
+
   /** Checks whether a given tag exists in a dataset and provides a non-empty
    *  value. If not, the tag is inserted (if enabled) and a default value is
    *  inserted.
@@ -111,50 +130,22 @@ protected:
    */
   virtual OFString checkAndInventType1Attrib(const DcmTagKey& key,
                                              DcmDataset* targetDset,
-                                             const OFString& defaultValue ="") const
-  {
-    OFBool exists = targetDset->tagExists(key);
-    if (!exists && !m_inventMissingType1Attribs)
-    {
-      OFString err = "I2DOutputPlug: Missing type 1 attribute: "; err += DcmTag(key).getTagName(); err += "\n";
-      return err;
-    }
-    DcmElement *elem;
-    OFCondition cond = targetDset->findAndGetElement(key, elem);
-    if (cond.bad() || !elem || (elem->getLength() == 0))
-    {
-      if (!m_inventMissingType1Attribs)
-      {
-        OFString err;
-        err += "I2DOutputPlug: Empty value for type 1 attribute: ";
-        err += DcmTag(key).getTagName();
-        err += "\n";
-        return err;
-      }
-      //holds element to insert in item
-      elem = NULL;
-      DcmTag tag(key); OFBool wasError = OFFalse;
-      //if dicom element could be created, insert in to item and modify to value
-      if ( DcmItem::newDicomElement(elem, tag).good())
-      {
-          if (targetDset->insert(elem, OFTrue).good())
-          {
-            if (elem->putString(defaultValue.c_str()).good())
-            {
-              DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 1 attribute: " << tag.getTagName() << " with value " << defaultValue);
-            } else wasError = OFTrue;
-          } else wasError = OFTrue;
-      } else wasError = OFTrue;
-      if (wasError)
-      {
-        OFString err = "Unable to insert type 1 attribute ";
-        err += tag.getTagName(); err += " with value "; err += defaultValue; err += "\n";
-        return err;
-      }
-    }
-    return "";
-  };
+                                             const OFString& defaultValue ="") const;
 
+  /** Checks whether a given code sequence exists in a dataset and contains
+   *  an item with the required attributes. If not, the sequence is inserted
+   *  (if enabled) and default values are inserted.
+   *  @param key - [in] The code sequence tag to be checked/inserted
+   *  @param targetDset - [in/out] The dataset to search (and insert) in
+   *  @param defaultValue - [in] The default value to set
+   *  @return Error string, which is empty if no error occurs.
+   */
+  virtual OFString checkAndInventType1CodeSQ(
+    const DcmTagKey& key,
+    DcmDataset* targetDset,
+    const OFString& codeValue,
+    const OFString& codeMeaning,
+    const OFString& codingSchemeDesignator) const;
 
   /** Checks whether a given tag exists in a dataset (can be empty)
    *  If not, the tag is inserted (if enabled) with empty value.
@@ -164,46 +155,7 @@ protected:
    */
   virtual OFString checkAndInventType2Attrib(const DcmTagKey& key,
                                              DcmDataset* targetDset,
-                                             const OFString& defaultValue ="") const
-  {
-    OFString err;
-    OFBool exists = targetDset->tagExists(key);
-    if (!exists)
-    {
-      if (m_inventMissingType2Attribs)
-      {
-        //holds element to insert in item
-        DcmElement *elem = NULL;
-        DcmTag tag(key); OFBool wasError = OFFalse;
-        //if dicom element could be created, insert in to item and modify to value
-        if ( DcmItem::newDicomElement(elem, tag).good())
-        {
-          if (targetDset->insert(elem, OFTrue).good())
-          {
-            OFCondition result;
-            if (!defaultValue.empty()) // only insert value if not empty(e. g. empty type 2 sequences)
-            {
-              result = elem->putString(defaultValue.c_str());
-            }
-            if (result.good())
-            {
-              DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 2 attribute: " << tag.getTagName() << " with value " << (defaultValue.empty() ? "<empty>" : defaultValue));
-            } else wasError = OFTrue;
-          } else wasError = OFTrue;
-        } else wasError = OFTrue;
-        if (wasError)
-        {
-          err += "Unable to insert type 2 attribute "; err += tag.getTagName(); err += " with value "; err += defaultValue; err += "\n";
-        }
-      }
-      else
-      {
-        err = "Image2Dcm: Missing type 2 attribute: "; err += DcmTag(key).getTagName(); err += "\n";
-        return err;
-      }
-    }
-    return err;
-  };
+                                             const OFString& defaultValue ="") const;
 
   /// if enabled, some simple attribute checking is performed
   /// default: enabled (OFTrue)
index 7980201ebdd4b2a643ac604649344678594b23c5..50d69965ab03d8a23080451564d2f9959c5317f1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2011, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -31,10 +31,13 @@ class DCMTK_I2D_EXPORT I2DOutputPlugNewSC : public I2DOutputPlug
 public:
 
   /** Constructor, initializes member variables with standard values
-   *  @return none
    */
   I2DOutputPlugNewSC();
 
+  /** Virtual Destructor, clean up memory
+   */
+  virtual ~I2DOutputPlugNewSC();
+
   /** Virtual function that returns a short name of the plugin.
    *  @return The name of the plugin
    */
@@ -42,7 +45,7 @@ public:
 
   /** Overwrites function from base class. Returns the Storage SOP class
    *  written by this plugin
-   *  @param suppSOPs - [out] List of UIDs representing the supported SOP 
+   *  @param suppSOPs - [out] List of UIDs representing the supported SOP
    *                    classes supported by this plugin.
    *  @return none
    */
@@ -61,25 +64,29 @@ public:
    */
   virtual OFString isValid(DcmDataset& dataset) const;
 
-  /** Virtual Destructor, clean up memory
-   *  @return none
+  /** check if the output format supported by this plugin can write
+   *  multi-frame images.
+   *  @return true if multiframe is supported, false otherwise
    */
-  virtual ~I2DOutputPlugNewSC();
-
-protected:
+  virtual OFBool supportsMultiframe() const;
 
-  /** Inserts attributes for Multi-frame Module
-   *  @param targetDataset - [in/out] The dataset to write to
-   *  @return EC_Normal if insertion was successfull, error code otherwise
+  /** Add multiframe specific attributes
+   *  @param datset pointer to DICOM dataset, must not be NULL
+   *  @param numberOfFrames number of frames in this dataset
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  virtual OFCondition insertMultiFrameAttribs(DcmDataset* targetDataset) const;
+  virtual OFCondition insertMultiFrameAttributes(
+    DcmDataset* targetDataset,
+    size_t numberOfFrames) const;
+
+protected:
 
   /** Inserts attributes Rescale Slope/Intercept/Type, which have to be
    *  written (1C) if color model is MONOCHROME2 and BitsStored > 1.
    *  @param targetDataset - [out] The dataset to write to
    *  @return EC_Normal if insertion was successfull, error code otherwise
    */
-  virtual OFCondition insertSCMultiFrameAttribs(DcmDataset *targetDataset) const;
+  virtual OFCondition insertMonochromeAttribs(DcmDataset *targetDataset) const;
 
   /** Checks whether Image Pixel module attributes conform to the
    *  specification of a a 1 bit Secondary Capture object.
diff --git a/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplop.h b/dcmdata/include/dcmtk/dcmdata/libi2d/i2dplop.h
new file mode 100644 (file)
index 0000000..f6555cd
--- /dev/null
@@ -0,0 +1,98 @@
+/*
+ *
+ *  Copyright (C) 2001-2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Marco Eichelberg
+ *
+ *  Purpose: Class for conversion of image file into Ophthalmic Photography 8 Bit Image IOD
+ *
+ */
+
+#ifndef I2DPLOP8_H
+#define I2DPLOP8_H
+
+#include "dcmtk/config/osconfig.h"
+#include "dcmtk/dcmdata/libi2d/i2doutpl.h"
+
+class DCMTK_I2D_EXPORT I2DOutputPlugOphthalmicPhotography : public I2DOutputPlug
+{
+
+public:
+
+  /** Constructor, initializes member variables with standard values
+   */
+  I2DOutputPlugOphthalmicPhotography();
+
+  /** Virtual Destructor, clean up memory
+   */
+  virtual ~I2DOutputPlugOphthalmicPhotography();
+
+  /** Virtual function that returns a short name of the plugin.
+   *  @return The name of the plugin
+   */
+  virtual OFString ident();
+
+  /** Overwrites function from base class. Returns the Storage SOP class
+   *  written by this plugin
+   *  @param suppSOPs - [out] List of UIDs representing the supported SOP
+   *                    classes supported by this plugin.
+   *  @return none
+   */
+  virtual void supportedSOPClassUIDs(OFList<OFString>& suppSOPs);
+
+  /** Outputs SOP class specific information into dataset
+   * @param dataset - [in/out] Dataset to write to
+   * @return EC_Normal if successful, error otherwise
+   */
+  virtual OFCondition convert(DcmDataset &dataset) const;
+
+  /** Do some completeness / validity checks. Should be called when
+   *  dataset is completed and is about to be saved.
+   *  @param dataset - [in] The dataset to check
+   *  @return Error string if error occurs, empty string otherwise
+   */
+  virtual OFString isValid(DcmDataset& dataset) const;
+
+  /** check if the output format supported by this plugin can write
+   *  multi-frame images.
+   *  @return true if multiframe is supported, false otherwise
+   */
+  virtual OFBool supportsMultiframe() const;
+
+  /** Add multiframe specific attributes
+   *  @param datset pointer to DICOM dataset, must not be NULL
+   *  @param numberOfFrames number of frames in this dataset
+   *  @return EC_Normal if successful, an error code otherwise
+   */
+  virtual OFCondition insertMultiFrameAttributes(
+    DcmDataset* targetDataset,
+    size_t numberOfFrames) const;
+
+private:
+
+  /** Handle 8-bit image dataset. Used internally in convert() method.
+   *  @param datset pointer to DICOM dataset, must not be NULL
+   *  @return EC_Normal if successful, an error code otherwise
+   */
+  virtual OFCondition handle8BitImage(DcmDataset *dataset) const;
+
+  /** Handle 16-bit image dataset. Used internally in convert() method.
+   *  @param datset pointer to DICOM dataset, must not be NULL
+   *  @return EC_Normal if successful, an error code otherwise
+   */
+  virtual OFCondition handle16BitImage(DcmDataset *dataset) const;
+
+};
+
+#endif // I2DPLOP8_H
index 875caaf82947d2024078a765e8dc768b5acfe33a..f6cbbeea9b90db1cd5489ba232afce0033b60613 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2011, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -31,10 +31,13 @@ class DCMTK_I2D_EXPORT I2DOutputPlugSC : public I2DOutputPlug
 public:
 
   /** Constructor, initializes member variables with standard values
-   *  @return none
    */
   I2DOutputPlugSC();
 
+  /** Virtual Destructor, clean up memory
+   */
+  virtual ~I2DOutputPlugSC();
+
   /** Virtual function that returns a short name of the plugin.
    *  @return The name of the plugin
    */
@@ -61,10 +64,20 @@ public:
    */
   virtual OFString isValid(DcmDataset& dataset) const;
 
-  /** Virtual Destructor, clean up memory
-   *  @return none
+  /** check if the output format supported by this plugin can write
+   *  multi-frame images.
+   *  @return true if multiframe is supported, false otherwise
    */
-  virtual ~I2DOutputPlugSC();
+  virtual OFBool supportsMultiframe() const;
+
+  /** Add multiframe specific attributes
+   *  @param datset pointer to DICOM dataset, must not be NULL
+   *  @param numberOfFrames number of frames in this dataset
+   *  @return EC_Normal if successful, an error code otherwise
+   */
+  virtual OFCondition insertMultiFrameAttributes(
+    DcmDataset* targetDataset,
+    size_t numberOfFrames) const;
 
 };
 
index 40f96aec7b99f63e0e06caa08c4486e7ae2fe6da..616e0c060e290ae19b8aaa720f4e3d9ff899b9db 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2011, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -31,10 +31,13 @@ class DCMTK_I2D_EXPORT I2DOutputPlugVLP : public I2DOutputPlug
 public:
 
   /** Constructor, initializes member variables with standard values
-   *  @return none
    */
   I2DOutputPlugVLP();
 
+  /** Virtual Destructor, clean up memory
+   */
+  virtual ~I2DOutputPlugVLP();
+
   /** Virtual function that returns a short name of the plugin.
    *  @return The name of the plugin
    */
@@ -61,10 +64,20 @@ public:
    */
   virtual OFString isValid(DcmDataset& dataset) const;
 
-  /** Virtual Destructor, clean up memory
-   *  @return none
+  /** check if the output format supported by this plugin can write
+   *  multi-frame images.
+   *  @return true if multiframe is supported, false otherwise
    */
-  virtual ~I2DOutputPlugVLP();
+  virtual OFBool supportsMultiframe() const;
+
+  /** Add multiframe specific attributes
+   *  @param datset pointer to DICOM dataset, must not be NULL
+   *  @param numberOfFrames number of frames in this dataset
+   *  @return EC_Normal if successful, an error code otherwise
+   */
+  virtual OFCondition insertMultiFrameAttributes(
+    DcmDataset* targetDataset,
+    size_t numberOfFrames) const;
 
 };
 
diff --git a/dcmdata/include/dcmtk/dcmdata/xml2dcm.h b/dcmdata/include/dcmtk/dcmdata/xml2dcm.h
new file mode 100644 (file)
index 0000000..f1b4f44
--- /dev/null
@@ -0,0 +1,226 @@
+/*
+ *
+ *  Copyright (C) 2003-2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Joerg Riesmeier
+ *
+ *  Purpose: Helper class for converting an XML document to DICOM file or data set
+ *
+ */
+
+#ifndef XML2DCM_H
+#define XML2DCM_H
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+#ifdef WITH_LIBXML
+
+#include "dcmtk/ofstd/ofcond.h"
+#include "dcmtk/ofstd/oftypes.h"
+#include "dcmtk/dcmdata/dcxfer.h"
+
+#ifdef __ibmxl__
+// IBM xlC defines __GNUC__ but does not support the GNUC extension
+// __attribute__ ((format (printf, 2, 3))).
+// This avoids a compiler warning in <libxml/parser.h>.
+#define LIBXML_ATTR_FORMAT(fmt,args)
+#endif
+
+// The libxml library also uses unicode. So we have to reuse some
+// workarounds for the ICU library here as well.
+// The type char16_t is only supported since C++11.
+#ifndef HAVE_CHAR16_T
+#define UCHAR_TYPE uint16_t
+#endif
+
+//If U_NOEXCEPT is not defined, ICU falls back to NOEXCEPT.
+#ifndef HAVE_CXX11
+#define U_NOEXCEPT
+#endif
+
+// forward declarations to minimize the libxml2 header files needed here
+typedef struct _xmlCharEncodingHandler xmlCharEncodingHandler;
+typedef xmlCharEncodingHandler *xmlCharEncodingHandlerPtr;
+typedef struct _xmlNode xmlNode;
+typedef xmlNode *xmlNodePtr;
+typedef struct _xmlDoc xmlDoc;
+typedef xmlDoc *xmlDocPtr;
+
+#include <libxml/xmlstring.h>
+
+class DcmElement;
+class DcmItem;
+class DcmSequenceOfItems;
+class DcmPixelSequence;
+class DcmMetaInfo;
+class DcmFileFormat;
+
+/** Helper class that provides methods for parsing an XML document in the format
+ *  produced by dcm2xml into a DICOM dataset.
+ */
+class DCMTK_DCMDATA_EXPORT DcmXMLParseHelper
+{
+public:
+  /// constructor;
+  DcmXMLParseHelper();
+
+  /// destructor;
+  virtual ~DcmXMLParseHelper();
+
+  /** initialize XML parser library. This function should be called once
+   *  before any libxml2 code is used. This function is not re-entrant.
+   */
+  static void initLibrary();
+
+  /** cleanup internal memory used by the XML parser library.
+   *  This function should be called once before the application
+   *  terminates. It is not re-entrant.
+   */
+  static void cleanupLibrary();
+
+  /** read an XML file containing a DICOM dataset in the format produced
+   *  by dcm2xml, and convert it into a DICOM file
+   *  @param ifname name of the XML file to be read
+   *  @param fileformat DcmFileFormat instance to be populated with the parsed XML content
+   *  @param xfer output parameter indicating the transfer syntax to which the XML file was parsed
+   *  @param metaInfo if true, metaheader attributes are read from the XML file, otherwise they are ignored
+   *  @param checkNamespace if true, check XML namespace in document root
+   *  @param validateDocument if true, validate the XML document after parsing
+   *  @param stopOnError if true, stop parsing and return an error code upon encountering a parse error,
+   *    otherwise ignore parse errors and continue
+   *  @return EC_Normal upon success, an error code otherwise
+   */
+  OFCondition readXmlFile(
+    const char *ifname,
+    DcmFileFormat &fileformat,
+    E_TransferSyntax &xfer,
+    const OFBool metaInfo,
+    const OFBool checkNamespace,
+    const OFBool validateDocument,
+    const OFBool stopOnError);
+
+private:
+
+  /** convert from UTF-8 to the current DICOM character set
+   *  @param fromString input string
+   *  @param toString output string
+   *  @return EC_Normal upon success, an error code otherwise
+   */
+  OFBool convertUtf8ToCharset(
+    const xmlChar *fromString,
+    OFString &toString);
+
+  /** check the type of the current XML node, report an error if there is a mismatch
+   *  @param current pointer to current XML node
+   *  @param name expected name of the current XML node
+   *  @return EC_Normal upon success, an error code otherwise
+   */
+  OFCondition checkNode(
+    xmlNodePtr current,
+    const char *name);
+
+  /** create a new, empty DICOM element corresponding to the given XML node pointer
+   *  @param current pointer to current XML node
+   *  @param newElem
+   *  @return EC_Normal upon success, an error code otherwise
+   */
+  OFCondition createNewElement(
+    xmlNodePtr current,
+    DcmElement *&newElem);
+
+  /** parse an attribute value and store it in the given DICOM element
+   *  @param current pointer to current XML node
+   *  @param element attribute value stored in this element
+   *  @return EC_Normal upon success, an error code otherwise
+   */
+  OFCondition putElementContent(
+    xmlNodePtr current,
+    DcmElement *element);
+
+  /** parse a DICOM element that is not a sequence
+   *  @param dataset
+   *  @param current pointer to current XML node
+   *  @return EC_Normal upon success, an error code otherwise
+   */
+  OFCondition parseElement(
+    DcmItem *dataset,
+    xmlNodePtr current);
+
+  /** parse a DICOM sequence
+   *  @param sequence
+   *  @param current pointer to current XML node
+   *  @param xfer transfer syntax in which the XML file is read
+   *  @param stopOnError if true, stop parsing and return an error code upon encountering a parse error,
+   *    otherwise ignore parse errors and continue
+   *  @return EC_Normal upon success, an error code otherwise
+   */
+  OFCondition parseSequence(
+    DcmSequenceOfItems *sequence,
+    xmlNodePtr current,
+    E_TransferSyntax xfer,
+    const OFBool stopOnError);
+
+  /** parse a DICOM pixel sequence of a compressed image files
+   *  @param sequence
+   *  @param current pointer to current XML node
+   *  @param stopOnError if true, stop parsing and return an error code upon encountering a parse error,
+   *    otherwise ignore parse errors and continue
+   *  @return EC_Normal upon success, an error code otherwise
+   */
+  OFCondition parsePixelSequence(
+    DcmPixelSequence *sequence,
+    xmlNodePtr current,
+    const OFBool stopOnError);
+
+  /** parse the metaheader part of an XML file containing a DICOM file.
+   *  @param metainfo metaheader stored in this parameter
+   *  @param current pointer to current XML node
+   *  @param parse if true, parse the metaheader, otherwise just skip it
+   *  @param stopOnError if true, stop parsing and return an error code upon encountering a parse error,
+   *    otherwise ignore parse errors and continue
+   *  @return EC_Normal upon success, an error code otherwise
+   */
+  OFCondition parseMetaHeader(
+    DcmMetaInfo *metainfo,
+    xmlNodePtr current,
+    const OFBool parse,
+    const OFBool stopOnError);
+
+  /** parse the dataset part of an XML file containing a DICOM file or a DICOM dataset.
+   *  @param dataset dataset stored in this parameter
+   *  @param current pointer to current XML node
+   *  @param xfer transfer syntax in which the XML file is read
+   *  @param stopOnError if true, stop parsing and return an error code upon encountering a parse error,
+   *    otherwise ignore parse errors and continue
+   *  @return EC_Normal upon success, an error code otherwise
+   */
+  OFCondition parseDataSet(
+    DcmItem *dataset,
+    xmlNodePtr current,
+    E_TransferSyntax xfer,
+    const OFBool stopOnError);
+
+  /** validate the given XML document and print error output if the validation fails
+   *  @param doc pointer to XML document
+   *  @return EC_Normal upon successful validation, an error code otherwise
+   */
+  OFCondition validateXmlDocument(xmlDocPtr doc);
+
+  /// stores pointer to character encoding handler
+  xmlCharEncodingHandlerPtr EncodingHandler;
+
+};
+
+#endif /* WITH_LIBXML */
+#endif /* XML2DCM_H */
index 4d66fc429bea65da7b14cdb6480a8a95cb9886c6..27bbb1d418ee6f603d5f07d0c66d7bf38e2571c6 100644 (file)
@@ -1,4 +1,16 @@
+# declare additional include directories
+include_directories(${LIBXML_INCDIR})
+
 # create library from source files
-DCMTK_ADD_LIBRARY(i2d i2d i2dplvlp i2djpgs i2dbmps i2dplsc i2dplnsc)
+DCMTK_ADD_LIBRARY(i2d
+  i2d.cc
+  i2dplvlp.cc
+  i2djpgs.cc
+  i2dbmps.cc
+  i2dplsc.cc
+  i2dplnsc.cc
+  i2dplop.cc
+  i2doutpl.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(i2d dcmdata)
index 2041e37fe64c4ffa67e664c48d5da04b24a19fcc..43f4f1e68cbef2ed0c6e5235d09ac3ab2f397b15 100644 (file)
@@ -33,31 +33,31 @@ i2d.o: i2d.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/logmacro.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \
- ../../ofstd/include/dcmtk/ofstd/offile.h \
- ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h \
- ../../ofstd/include/dcmtk/ofstd/oferror.h \
- ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \
- ../include/dcmtk/dcmdata/dcobject.h \
- ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
- ../../ofstd/include/dcmtk/ofstd/ofthread.h \
- ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
- ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
- ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \
- ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/libi2d/i2define.h \
  ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \
+ ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \
+ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../include/dcmtk/dcmdata/dcpixel.h ../include/dcmtk/dcmdata/dcvrpobw.h \
- ../include/dcmtk/dcmdata/dcvrobow.h ../include/dcmtk/dcmdata/dcpxitem.h \
- ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcfilefo.h \
- ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcdeftag.h \
- ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcpixseq.h \
- ../include/dcmtk/dcmdata/dcpath.h
+ ../include/dcmtk/dcmdata/dcvrobow.h ../include/dcmtk/dcmdata/dcelem.h \
+ ../include/dcmtk/dcmdata/dcobject.h ../include/dcmtk/dcmdata/dcerror.h \
+ ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dctagkey.h \
+ ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dcofsetl.h \
+ ../include/dcmtk/dcmdata/dcpxitem.h ../include/dcmtk/dcmdata/dcfilefo.h \
+ ../include/dcmtk/dcmdata/dcsequen.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcdatset.h \
+ ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h \
+ ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcuid.h \
+ ../include/dcmtk/dcmdata/dcpixseq.h ../include/dcmtk/dcmdata/dcpath.h \
+ ../include/dcmtk/dcmdata/xml2dcm.h
 i2dbmps.o: i2dbmps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/libi2d/i2dbmps.h \
  ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \
@@ -106,15 +106,11 @@ i2dbmps.o: i2dbmps.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../config/include/dcmtk/config/arith.h \
  ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dcerror.h \
- ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \
- ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \
- ../include/dcmtk/dcmdata/dcobject.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
- ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \
- ../include/dcmtk/dcmdata/dcelem.h
-i2djpgs.o: i2djpgs.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmdata/libi2d/i2djpgs.h \
- ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../include/dcmtk/dcmdata/libi2d/i2doutpl.h
+i2djpgs.o: i2djpgs.cc ../include/dcmtk/dcmdata/libi2d/i2djpgs.h \
+ ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
@@ -122,14 +118,6 @@ i2djpgs.o: i2djpgs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oflist.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h \
- ../../ofstd/include/dcmtk/ofstd/oferror.h \
- ../include/dcmtk/dcmdata/libi2d/i2dimgs.h \
  ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -144,6 +132,7 @@ i2djpgs.o: i2djpgs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
  ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
@@ -159,12 +148,66 @@ i2djpgs.o: i2djpgs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../include/dcmtk/dcmdata/libi2d/i2define.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../include/dcmtk/dcmdata/dcerror.h \
+ ../include/dcmtk/dcmdata/libi2d/i2doutpl.h
+i2doutpl.o: i2doutpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../include/dcmtk/dcmdata/libi2d/i2define.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \
- ../include/dcmtk/dcmdata/dcobject.h ../include/dcmtk/dcmdata/dcerror.h \
- ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dctagkey.h \
- ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dclist.h \
- ../include/dcmtk/dcmdata/dcpcache.h ../include/dcmtk/dcmdata/dcelem.h
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \
+ ../include/dcmtk/dcmdata/dcobject.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
+ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
+ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
+ ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \
+ ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcdeftag.h
 i2dplnsc.o: i2dplnsc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/libi2d/i2dplnsc.h \
  ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \
@@ -200,25 +243,80 @@ i2dplnsc.o: i2dplnsc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/logmacro.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../include/dcmtk/dcmdata/libi2d/i2define.h \
+ ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dctagkey.h \
+ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcobject.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
+ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
+ ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dclist.h \
+ ../include/dcmtk/dcmdata/dcpcache.h
+i2dplop.o: i2dplop.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmdata/libi2d/i2dplop.h \
+ ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../include/dcmtk/dcmdata/libi2d/i2define.h \
+ ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dctagkey.h \
+ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcuid.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdate.h \
+ ../../ofstd/include/dcmtk/ofstd/oftime.h \
+ ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
  ../../ofstd/include/dcmtk/ofstd/oferror.h \
- ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \
- ../include/dcmtk/dcmdata/dcobject.h \
+ ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
- ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \
- ../include/dcmtk/dcmdata/dcelem.h \
- ../include/dcmtk/dcmdata/libi2d/i2define.h \
- ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcuid.h
+ ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dclist.h \
+ ../include/dcmtk/dcmdata/dcpcache.h
 i2dplsc.o: i2dplsc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/libi2d/i2dplsc.h \
  ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \
@@ -254,25 +352,24 @@ i2dplsc.o: i2dplsc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/logmacro.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../include/dcmtk/dcmdata/libi2d/i2define.h \
+ ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dctagkey.h \
+ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oflist.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
  ../../ofstd/include/dcmtk/ofstd/oferror.h \
- ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \
- ../include/dcmtk/dcmdata/dcobject.h \
+ ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
- ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \
- ../include/dcmtk/dcmdata/dcelem.h \
- ../include/dcmtk/dcmdata/libi2d/i2define.h \
- ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcuid.h
+ ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dclist.h \
+ ../include/dcmtk/dcmdata/dcpcache.h
 i2dplvlp.o: i2dplvlp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/libi2d/i2dplvlp.h \
  ../include/dcmtk/dcmdata/libi2d/i2doutpl.h \
@@ -308,22 +405,21 @@ i2dplvlp.o: i2dplvlp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/logmacro.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../include/dcmtk/dcmdata/libi2d/i2define.h \
+ ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dctagkey.h \
+ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmdata/dcdatset.h ../include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oflist.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
  ../../ofstd/include/dcmtk/ofstd/oferror.h \
- ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcdefine.h \
- ../include/dcmtk/dcmdata/dcobject.h \
+ ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
- ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \
- ../include/dcmtk/dcmdata/dcelem.h \
- ../include/dcmtk/dcmdata/libi2d/i2define.h \
- ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcuid.h
+ ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dclist.h \
+ ../include/dcmtk/dcmdata/dcpcache.h
index eaecdbdf3a0b284466c787b3e826674d8ba8b099..bb786a15141833eb11eb2821affe42fd609e7acb 100644 (file)
@@ -19,7 +19,7 @@ dcmdatadir = $(top_srcdir)/../dcmdata
 LOCALINCLUDES = -I$(ofstddir)/include -I$(dcmdatadir)/include -I$(oflogdir)/include
 LOCALDEFS =
 
-objs = i2d.o i2dplvlp.o i2djpgs.o i2dbmps.o i2dplsc.o i2dplnsc.o
+objs = i2d.o i2dplvlp.o i2djpgs.o i2dbmps.o i2dplsc.o i2dplnsc.o i2dplop.o i2doutpl.o
 
 library = libi2d.$(LIBEXT)
 
index e3d963e4f2f7c75313cc2a7e59aba3f7a8c8a460..8b2f9538a4f061d92cbbc82998fc3919db2550a1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2017, OFFIS e.V.
+ *  Copyright (C) 2007-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcuid.h"     /* for SITE_SERIES_UID_ROOT */
 #include "dcmtk/dcmdata/dcpixseq.h"  /* for DcmPixelSequence */
 #include "dcmtk/dcmdata/dcpath.h"    /* for override keys */
+#include "dcmtk/dcmdata/xml2dcm.h"   /* for DcmXMLParseHelper */
 
 OFLogger DCM_dcmdataLibi2dLogger = OFLog::getLogger("dcmtk.dcmdata.libi2d");
 
 
-Image2Dcm::Image2Dcm() : m_overrideKeys(), m_templateFile(""),
-  m_readStudyLevel(OFFalse), m_readSeriesLevel(OFFalse), m_studySeriesFile(),
-  m_incInstNoFromFile(OFFalse), m_disableAttribChecks(OFFalse),
-  m_inventMissingType2Attribs(OFTrue), m_inventMissingType1Attribs(OFFalse),
-  m_insertLatin1(OFTrue)
+Image2Dcm::Image2Dcm()
+: m_overrideKeys()
+, m_templateFile("")
+, m_templateFileIsXML(OFFalse)
+, m_XMLvalidation(OFFalse)
+, m_XMLnamespaceCheck(OFFalse)
+, m_readStudyLevel(OFFalse)
+, m_readSeriesLevel(OFFalse)
+, m_studySeriesFile()
+, m_incInstNoFromFile(OFFalse)
+, m_disableAttribChecks(OFFalse)
+, m_inventMissingType2Attribs(OFTrue)
+, m_inventMissingType1Attribs(OFFalse)
+, m_rows(0)
+, m_cols(0)
+, m_samplesPerPixel(0)
+, m_bitsAllocated(0)
+, m_bitsStored(0)
+, m_highBit(0)
+, m_pixelRepresentation(0)
+, m_planarConfiguration(0)
+, m_pixelAspectRatioH(0)
+, m_pixelAspectRatioV(0)
+, m_frameLength(0)
+, m_photometricInterpretation()
+, m_compressionRatio(1.0)
+, m_conversionFlags(0)
+, m_output_buffer(NULL)
+, m_offsetList()
+, m_pixelSequence(NULL)
+, m_offsetTable(NULL)
 {
-
 }
 
 
-OFCondition Image2Dcm::convert(I2DImgSource *inputPlug,
-                               I2DOutputPlug *outPlug,
-                               DcmDataset*& resultDset,
-                               E_TransferSyntax& proposedTS)
+Image2Dcm::~Image2Dcm()
+{
+}
 
+
+OFCondition Image2Dcm::convertFirstFrame(
+  I2DImgSource *inputPlug,
+  I2DOutputPlug *outPlug,
+  size_t numberOfFrames,
+  DcmDataset*& resultDset,
+  E_TransferSyntax& proposedTS)
 {
-  if (!inputPlug || !outPlug)
+  if (!inputPlug || !outPlug || (numberOfFrames < 1))
     return EC_IllegalParameter;
 
   OFCondition cond;
@@ -61,9 +93,24 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug,
   if (!m_templateFile.empty())
   {
     DcmFileFormat dcmff;
+
+#ifdef WITH_LIBXML
+    if (m_templateFileIsXML)
+    {
+      DcmXMLParseHelper parser;
+      E_TransferSyntax xfer;
+      cond = parser.readXmlFile(m_templateFile.c_str(), dcmff, xfer, OFFalse /* ignore metaheader */, m_XMLnamespaceCheck, m_XMLvalidation, OFTrue /* stop on errors */);
+    }
+    else
+    {
+      cond = dcmff.loadFile(m_templateFile.c_str());
+    }
+#else
     cond = dcmff.loadFile(m_templateFile.c_str());
+#endif
     if (cond.bad())
       return cond;
+
     // remove problematic attributes from dataset
     cleanupTemplate(dcmff.getDataset());
     // copy from input file
@@ -94,39 +141,26 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug,
     }
   }
 
-  // Insert Latin 1 as standard character set if desired
-  if (m_insertLatin1)
-    cond = insertLatin1(tempDataset.get());
-  if (cond.bad())
-    return cond;
-
   // Generate and insert UIDs as necessary
   generateUIDs(tempDataset.get());
 
   // Read and insert pixel data
-  cond = readAndInsertPixelData(inputPlug, tempDataset.get(), proposedTS);
+  m_compressionRatio = 1.0;
+  cond = readAndInsertPixelDataFirstFrame(inputPlug, numberOfFrames, tempDataset.get(), proposedTS, m_compressionRatio);
   if (cond.bad())
   {
     return cond;
   }
 
-  // Insert Lossy Image Compression and Lossy Image Compression Method attributes if necessary
-  OFBool srcIsLossy = OFFalse; OFString comprMethod;
-  if (inputPlug->getLossyComprInfo(srcIsLossy, comprMethod).good()) //TODO)
+  // Insert SOP Class specific attributes (and values)
+  cond = outPlug->convert(*tempDataset);
+  if (cond.bad())
   {
-    if (srcIsLossy)
-    {
-      cond = tempDataset->putAndInsertOFStringArray(DCM_LossyImageCompression, "01");
-      if (cond.good() && !comprMethod.empty())
-        cond = tempDataset->putAndInsertOFStringArray(DCM_LossyImageCompressionMethod, comprMethod);
-      if (cond.bad()) return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to write attribute Lossy Image Compression and/or Lossy Image Compression Method to result dataset");
-    }
+    return cond;
   }
-  else
-    DCMDATA_LIBI2D_DEBUG("Image2Dcm: No information regarding lossy compression available");
 
   // Insert SOP Class specific attributes (and values)
-  cond = outPlug->convert(*tempDataset);
+  cond = outPlug->insertMultiFrameAttributes(tempDataset.get(), numberOfFrames);
   if (cond.bad())
   {
     return cond;
@@ -155,12 +189,55 @@ OFCondition Image2Dcm::convert(I2DImgSource *inputPlug,
   return EC_Normal;
 }
 
+OFCondition Image2Dcm::updateLossyCompressionInfo(
+  I2DImgSource *inputPlug,
+  size_t numberOfFrames,
+  DcmDataset *dset)
+{
+  // Insert Lossy Image Compression and Lossy Image Compression Method attributes if necessary
+  OFBool srcIsLossy = OFFalse;
+  OFString comprMethod;
+  OFCondition cond;
+  if (inputPlug->getLossyComprInfo(srcIsLossy, comprMethod).good())
+  {
+    if (srcIsLossy)
+    {
+      double compressionRatio = m_compressionRatio;
+      if (numberOfFrames > 0) compressionRatio = m_compressionRatio / OFstatic_cast(double, numberOfFrames);
+      cond = dset->putAndInsertOFStringArray(DCM_LossyImageCompression, "01");
+      if (cond.good() && !comprMethod.empty())
+        cond = dset->putAndInsertOFStringArray(DCM_LossyImageCompressionMethod, comprMethod);
+      if (cond.good())
+      {
+        char buf[64];
+        OFStandard::ftoa(buf, sizeof(buf), compressionRatio, OFStandard::ftoa_uppercase, 0, 5);
+        cond = dset->putAndInsertOFStringArray(DCM_LossyImageCompressionRatio, buf);
+      }
+      if (cond.bad()) return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to write attribute Lossy Image Compression and/or Lossy Image Compression Method to result dataset");
+    }
+  }
+  else
+    DCMDATA_LIBI2D_DEBUG("Image2Dcm: No information regarding lossy compression available");
+  return EC_Normal;
+}
 
-OFCondition Image2Dcm::insertLatin1(DcmDataset *outputDset)
+OFCondition Image2Dcm::convertNextFrame(
+  I2DImgSource *inputPlug,
+  size_t frameNumber)
 {
-  if (outputDset == NULL)
+  if (!inputPlug || (frameNumber < 2))
     return EC_IllegalParameter;
-  return outputDset->putAndInsertString(DCM_SpecificCharacterSet, "ISO_IR 100");
+
+  DCMDATA_LIBI2D_DEBUG("Image2Dcm: Starting conversion of file: " << inputPlug->getImageFile());
+
+  // Read and insert pixel data
+  return readAndInsertPixelDataNextFrame(inputPlug, frameNumber);
+}
+
+
+void Image2Dcm::setConversionFlags(size_t conversionFlags)
+{
+  m_conversionFlags = conversionFlags;
 }
 
 
@@ -202,6 +279,7 @@ OFCondition Image2Dcm::applyStudyOrSeriesFromFile(DcmDataset *targetDset)
   DCMDATA_LIBI2D_DEBUG("Image2Dcm: Applying study and/or series information from file");
   if ( (!m_readSeriesLevel && !m_readStudyLevel) || m_studySeriesFile.empty() )
     return EC_IllegalCall;
+
   DcmFileFormat dcmff;
   OFString errMsg;
   OFCondition cond;
@@ -219,8 +297,48 @@ OFCondition Image2Dcm::applyStudyOrSeriesFromFile(DcmDataset *targetDset)
   if (srcDset == NULL)
     return EC_IllegalCall;
 
-  // Patient level attributes (type 2 - if value cannot be read, insert empty value
+  // Determine the specific character set of the target dataset
   OFString value;
+  OFString targetCharSet;
+  (void) targetDset->findAndGetOFString(DCM_SpecificCharacterSet, targetCharSet);
+
+  // Determine the specific character set of the target dataset of the Study/Series file
+  (void) srcDset->findAndGetOFString(DCM_SpecificCharacterSet, value);
+
+  if (targetCharSet == value)
+  {
+    // case 1: character sets are identical (or both empty), nothing to do.
+  }
+  else if (value.empty())
+  {
+    // case 2: target dataset uses an extended character set,
+    // while the study/series file uses ASCII. Nothing to do.
+  }
+  else if (targetCharSet.empty())
+  {
+    // case 3: the target dataset uses ASCII, while the
+    // study/series file uses an extended character set.
+    // Use the character set from the study/series file.
+    cond = targetDset->putAndInsertOFStringArray(DCM_SpecificCharacterSet, value);
+    if (cond.bad())
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to write Specific Character Set to file");
+  }
+  else
+  {
+    // case 4: target dataset and study/series files use different
+    // extended character sets. We will try to convert the study/series file
+    // to the character set used in the target dataset and fail if this
+    // does not succeed.
+    DCMDATA_LIBI2D_DEBUG("Image2Dcm: target charset: " << targetCharSet << ", study/series file charset: " << value);
+    cond = dcmff.convertCharacterSet(targetCharSet, m_conversionFlags);
+    if (cond.bad())
+    {
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "Character set mismatch between template and study/series file");
+    }
+  }
+
+  // Patient level attributes (type 2 - if value cannot be read, insert empty value
+  value.clear();
   srcDset->findAndGetOFString(DCM_PatientName, value);
   cond = targetDset->putAndInsertOFStringArray(DCM_PatientName, value);
   if (cond.bad())
@@ -245,12 +363,6 @@ OFCondition Image2Dcm::applyStudyOrSeriesFromFile(DcmDataset *targetDset)
     return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to write Patient's Birth Date to file");
   value.clear();
 
-  srcDset->findAndGetOFString(DCM_SpecificCharacterSet, value);
-  cond = targetDset->putAndInsertOFStringArray(DCM_SpecificCharacterSet, value);
-  if (cond.bad())
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to write Specific Character Set to file");
-  value.clear();
-
   // Study level attributes (type 2 except Study Instance UID)
   cond = srcDset->findAndGetOFString(DCM_StudyInstanceUID, value);
   if (cond.bad())
@@ -316,6 +428,17 @@ OFCondition Image2Dcm::applyStudyOrSeriesFromFile(DcmDataset *targetDset)
     value.clear();
   }
 
+  // We need to copy Instance Number if we are supposed to increase it
+  if (m_incInstNoFromFile)
+  {
+    cond = srcDset->findAndGetOFString(DCM_InstanceNumber, value);
+    if (cond.bad())
+      value = "1";
+    cond = targetDset->putAndInsertOFStringArray(DCM_InstanceNumber, value);
+    if (cond.bad())
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to write Instance Number to file");
+  }
+
   return EC_Normal;
 }
 
@@ -394,66 +517,50 @@ OFCondition Image2Dcm::generateUIDs(DcmDataset *dset)
 }
 
 
-void Image2Dcm::setISOLatin1(OFBool insLatin1)
-{
-  m_insertLatin1 = insLatin1;
-}
-
-
-OFCondition Image2Dcm::insertEncapsulatedPixelData(DcmDataset* dset,
-                                                   char *pixData,
-                                                   Uint32 length,
-                                                   const E_TransferSyntax& outputTS) const
+OFCondition Image2Dcm::insertEncapsulatedPixelDataFirstFrame(
+  DcmDataset* dset,
+  char *pixData,
+  Uint32 length,
+  E_TransferSyntax outputTS)
 {
   OFCondition cond;
 
   DCMDATA_LIBI2D_DEBUG("Image2Dcm: Storing imported pixel data to DICOM file");
+
   // create initial pixel sequence
-  DcmPixelSequence* pixelSequence = new DcmPixelSequence(DCM_PixelSequenceTag);
-  if (pixelSequence == NULL)
-    return EC_MemoryExhausted;
+  delete m_pixelSequence;
+  m_pixelSequence = new DcmPixelSequence(DCM_PixelSequenceTag);
 
   // insert empty offset table into sequence
-  DcmPixelItem *offsetTable = new DcmPixelItem(DCM_PixelItemTag);
-  if (offsetTable == NULL)
-  {
-    delete pixelSequence; pixelSequence = NULL;
-    return EC_MemoryExhausted;
-  }
-  cond = pixelSequence->insert(offsetTable);
+  delete m_offsetTable;
+  m_offsetTable = new DcmPixelItem(DCM_PixelItemTag);
+  cond = m_pixelSequence->insert(m_offsetTable);
   if (cond.bad())
   {
-    delete offsetTable; offsetTable = NULL;
-    delete pixelSequence; pixelSequence = NULL;
+    delete m_offsetTable; m_offsetTable = NULL;
+    delete m_pixelSequence; m_pixelSequence = NULL;
     return cond;
   }
 
   // store compressed frame into pixel sequence
-  DcmOffsetList dummyList;
-  cond = pixelSequence->storeCompressedFrame(dummyList, OFreinterpret_cast(Uint8*,pixData), length, 0);
-  // storeCompressedFrame(..) does a deep copy, so the pixData memory can be freed now
-  delete[] pixData;
+  cond = m_pixelSequence->storeCompressedFrame(m_offsetList, OFreinterpret_cast(Uint8*,pixData), length, 0);
   if (cond.bad())
   {
-    delete pixelSequence; pixelSequence = NULL;
+    delete m_pixelSequence; m_pixelSequence = NULL;
     return cond;
   }
 
   // insert pixel data attribute incorporating pixel sequence into dataset
   DcmPixelData *pixelData = new DcmPixelData(DCM_PixelData);
-  if (pixelData == NULL)
-  {
-    delete pixelSequence; pixelSequence = NULL;
-    return EC_MemoryExhausted;
-  }
+
   /* tell pixel data element that this is the original presentation of the pixel data
    * pixel data and how it compressed
    */
-  pixelData->putOriginalRepresentation(outputTS, NULL, pixelSequence);
+  pixelData->putOriginalRepresentation(outputTS, NULL, m_pixelSequence);
   cond = dset->insert(pixelData);
   if (cond.bad())
   {
-    delete pixelData; pixelData = NULL; // also deletes contained pixel sequence
+    delete m_pixelSequence; m_pixelSequence = NULL; // also deletes contained pixel sequence
     return cond;
   }
 
@@ -461,83 +568,263 @@ OFCondition Image2Dcm::insertEncapsulatedPixelData(DcmDataset* dset,
 }
 
 
-OFCondition Image2Dcm::readAndInsertPixelData(I2DImgSource* imgSource,
-                                              DcmDataset* dset,
-                                              E_TransferSyntax& outputTS)
+OFCondition Image2Dcm::insertEncapsulatedPixelDataNextFrame(
+  char *pixData,
+  Uint32 length)
 {
-  Uint16 samplesPerPixel, rows, cols, bitsAlloc, bitsStored, highBit, pixelRepr, planConf;
-  Uint16 pixAspectH =1; Uint16 pixAspectV = 1;
-  OFString photoMetrInt;
+  if (m_pixelSequence == NULL || m_offsetTable == NULL) return EC_IllegalCall;
+
+  DCMDATA_LIBI2D_DEBUG("Image2Dcm: Storing imported pixel data to DICOM file");
+
+  // store compressed frame into pixel sequence
+  return m_pixelSequence->storeCompressedFrame(m_offsetList, OFreinterpret_cast(Uint8*,pixData), length, 0);
+}
+
+
+OFCondition Image2Dcm::readAndInsertPixelDataFirstFrame(
+  I2DImgSource* imgSource,
+  size_t numberOfFrames,
+  DcmDataset* dset,
+  E_TransferSyntax& outputTS,
+  double& compressionRatio)
+{
+  m_pixelAspectRatioH =1;
+  m_pixelAspectRatioV = 1;
   outputTS = EXS_Unknown;
   char* pixData = NULL;
-  Uint32 length;
 
-  OFCondition cond = imgSource->readPixelData(rows, cols,
-    samplesPerPixel, photoMetrInt, bitsAlloc, bitsStored, highBit, pixelRepr,
-    planConf, pixAspectH, pixAspectV, pixData, length, outputTS);
+  OFCondition cond = imgSource->readPixelData(m_rows, m_cols,
+    m_samplesPerPixel, m_photometricInterpretation, m_bitsAllocated, m_bitsStored, m_highBit, m_pixelRepresentation,
+    m_planarConfiguration, m_pixelAspectRatioH, m_pixelAspectRatioV, pixData, m_frameLength, outputTS);
 
   if (cond.bad())
     return cond;
 
+  // compute compression ratio for this frame
+  compressionRatio = 1.0;
+  double uncompressedSize = m_cols * m_rows;
+  uncompressedSize = uncompressedSize * m_bitsStored * m_samplesPerPixel / 8.0;
+  if (m_frameLength > 0) compressionRatio = uncompressedSize / m_frameLength;
+
   DcmXfer transport(outputTS);
   if (transport.isEncapsulated())
-    insertEncapsulatedPixelData(dset, pixData, length, outputTS);
+  {
+    m_offsetList.clear();
+    insertEncapsulatedPixelDataFirstFrame(dset, pixData, m_frameLength, outputTS);
+    delete[] pixData;
+  }
   else
   {
     /* Not encapsulated */
-    dset->putAndInsertUint8Array(DCM_PixelData, OFreinterpret_cast(Uint8*, pixData), length);
+    DcmPixelData *pixelData = new DcmPixelData(DCM_PixelData);
+    if (pixelData == NULL)
+    {
+      delete[] pixData;
+      return EC_MemoryExhausted;
+    }
+
+    cond = dset->insert(pixelData);
+    if (cond.bad())
+    {
+      delete[] pixData;
+      delete pixelData;
+      return cond;
+    }
+
+    DCMDATA_LIBI2D_DEBUG("Image2Dcm: frame size=" << m_frameLength << ", number of frames=" << numberOfFrames << ", length of pixel data array=" << ((m_frameLength * numberOfFrames + 1)/2)*2);
+    Uint16 *array = NULL;
+    size_t arraySize = (m_frameLength * numberOfFrames + 1)/2;
+    cond = pixelData->createUint16Array(OFstatic_cast(Uint32, arraySize), array);
+    if (cond.bad())
+    {
+      delete[] pixData;
+      return cond;
+    }
+    m_output_buffer = OFreinterpret_cast(char *, array);
+    memcpy(array, pixData, m_frameLength);
     delete[] pixData;
   }
 
   DCMDATA_LIBI2D_DEBUG("Image2Dcm: Inserting Image Pixel module information");
 
-  cond = dset->putAndInsertUint16(DCM_SamplesPerPixel, samplesPerPixel);
+  cond = dset->putAndInsertUint16(DCM_SamplesPerPixel, m_samplesPerPixel);
   if (cond.bad())
     return cond;
 
-  cond = dset->putAndInsertOFStringArray(DCM_PhotometricInterpretation, photoMetrInt);
+  cond = dset->putAndInsertOFStringArray(DCM_PhotometricInterpretation, m_photometricInterpretation);
   if (cond.bad())
     return cond;
 
   // Should only be written if Samples per Pixel > 1
-  if (samplesPerPixel > 1)
+  if (m_samplesPerPixel > 1)
   {
-    cond = dset->putAndInsertUint16(DCM_PlanarConfiguration, planConf);
+    cond = dset->putAndInsertUint16(DCM_PlanarConfiguration, m_planarConfiguration);
     if (cond.bad())
       return cond;
   }
 
-  cond = dset->putAndInsertUint16(DCM_Rows, rows);
+  cond = dset->putAndInsertUint16(DCM_Rows, m_rows);
   if (cond.bad())
     return cond;
 
-  cond = dset->putAndInsertUint16(DCM_Columns, cols);
+  cond = dset->putAndInsertUint16(DCM_Columns, m_cols);
   if (cond.bad())
     return cond;
 
-  cond = dset->putAndInsertUint16(DCM_BitsAllocated, bitsAlloc);
+  cond = dset->putAndInsertUint16(DCM_BitsAllocated, m_bitsAllocated);
   if (cond.bad())
     return cond;
 
-  cond = dset->putAndInsertUint16(DCM_BitsStored, bitsStored);
+  cond = dset->putAndInsertUint16(DCM_BitsStored, m_bitsStored);
   if (cond.bad())
     return cond;
 
-  cond = dset->putAndInsertUint16(DCM_HighBit, highBit);
+  cond = dset->putAndInsertUint16(DCM_HighBit, m_highBit);
   if (cond.bad())
     return cond;
 
-  if ( pixAspectH != pixAspectV )
+  if ( m_pixelAspectRatioH != m_pixelAspectRatioV )
   {
     char buf[200];
-    int err = sprintf(buf, "%u\\%u", pixAspectV, pixAspectH);
+    int err = sprintf(buf, "%u\\%u", m_pixelAspectRatioV, m_pixelAspectRatioH);
     if (err == -1) return EC_IllegalCall;
     cond = dset->putAndInsertOFStringArray(DCM_PixelAspectRatio, buf);
     if (cond.bad())
       return cond;
   }
 
-  return dset->putAndInsertUint16(DCM_PixelRepresentation, pixelRepr);
+  return dset->putAndInsertUint16(DCM_PixelRepresentation, m_pixelRepresentation);
+}
+
+
+OFCondition Image2Dcm::readAndInsertPixelDataNextFrame(
+  I2DImgSource* imageSource,
+  size_t frameNumber)
+{
+
+  Uint16 next_pixelAspectRatioH = 1;
+  Uint16 next_pixelAspectRatioV = 1;
+  Uint16 next_rows = 0;
+  Uint16 next_cols = 0;
+  Uint16 next_samplesPerPixel = 0;
+  Uint16 next_bitsAllocated = 0;
+  Uint16 next_bitsStored = 0;
+  Uint16 next_highBit = 0;
+  Uint16 next_pixelRepresentation = 0;
+  Uint16 next_planarConfiguration = 0;
+  Uint32 next_frameLength = 0;
+  OFString next_photometricInterpretation;
+
+  char *pixData = NULL;
+  E_TransferSyntax outputTS;
+
+  OFCondition cond = imageSource->readPixelData(next_rows, next_cols,
+    next_samplesPerPixel, next_photometricInterpretation, next_bitsAllocated, next_bitsStored, next_highBit, next_pixelRepresentation,
+    next_planarConfiguration, next_pixelAspectRatioH, next_pixelAspectRatioV, pixData, next_frameLength, outputTS);
+
+  if (cond.bad())
+    return cond;
+
+  // create a transfer syntax object for the output transfer syntax
+  DcmXfer transport(outputTS);
+
+  // check consistency between current frame and first frame
+  if (next_rows != m_rows)
+  {
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of Rows not equal for all frames of the multi-frame image");
+    return cond;
+  }
+  if (next_cols != m_cols)
+  {
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of Columns not equal for all frames of the multi-frame image");
+    return cond;
+  }
+
+  if (next_samplesPerPixel != m_samplesPerPixel)
+  {
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of SamplesPerPixel not equal for all frames of the multi-frame image");
+    return cond;
+  }
+  if (next_photometricInterpretation != m_photometricInterpretation)
+  {
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of PhotometricInterpretation not equal for all frames of the multi-frame image");
+    return cond;
+  }
+  if (next_bitsAllocated != m_bitsAllocated)
+  {
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of BitsAllocated not equal for all frames of the multi-frame image");
+    return cond;
+  }
+  if (next_bitsStored != m_bitsStored)
+  {
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of BitsStored not equal for all frames of the multi-frame image");
+    return cond;
+  }
+  if (next_highBit != m_highBit)
+  {
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of HighBit not equal for all frames of the multi-frame image");
+    return cond;
+  }
+  if (next_pixelRepresentation != m_pixelRepresentation)
+  {
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of PixelRepresentation not equal for all frames of the multi-frame image");
+    return cond;
+  }
+  if (next_planarConfiguration != m_planarConfiguration)
+  {
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of PlanarConfiguration not equal for all frames of the multi-frame image");
+    return cond;
+  }
+  if (next_pixelAspectRatioH != m_pixelAspectRatioH)
+  {
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of horizontal PixelAspectRatio not equal for all frames of the multi-frame image");
+    return cond;
+  }
+  if (next_pixelAspectRatioV != m_pixelAspectRatioV)
+  {
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: value of vertical PixelAspectRatio not equal for all frames of the multi-frame image");
+    return cond;
+  }
+  if ((!transport.isEncapsulated()) && (next_frameLength != m_frameLength))
+  {
+    // in the case of uncompressed images, all frames must have exactly the same size.
+    // for compressed images, where we store the compressed bitstream as a pixel item, this does not matter.
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: frame size not equal for all frames of the multi-frame image");
+    return cond;
+  }
+
+  // compute compression ratio for this frame
+  double compressionRatio = 1.0;
+  double uncompressedSize = next_cols * next_rows;
+  uncompressedSize = uncompressedSize * next_bitsStored * next_samplesPerPixel / 8.0;
+  if (next_frameLength > 0) compressionRatio = uncompressedSize / next_frameLength;
+
+  // accumulate compression ratio in m_compressionRatio.
+  // We will divide this by the number of frames later.
+  m_compressionRatio += compressionRatio;
+
+  if (transport.isEncapsulated())
+  {
+    cond = insertEncapsulatedPixelDataNextFrame(pixData, next_frameLength);
+    delete[] pixData;
+    return cond;
+  }
+  else
+  {
+    /* Not encapsulated */
+    if (m_output_buffer == NULL)
+    {
+      cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Image2Dcm: output buffer not allocated");
+      delete[] pixData;
+      return cond;
+    }
+
+    char *array = m_output_buffer + m_frameLength * (frameNumber - 1);
+    memcpy(array, pixData, m_frameLength);
+    delete[] pixData;
+  }
+
+  return EC_Normal;
 }
 
 
@@ -619,6 +906,23 @@ void Image2Dcm::setTemplateFile(const OFString& file)
 }
 
 
+void Image2Dcm::setTemplateFileIsXML(OFBool isXML)
+{
+  m_templateFileIsXML = isXML;
+}
+
+
+void Image2Dcm::setXMLvalidation(OFBool enabled)
+{
+  m_XMLvalidation = enabled;
+}
+
+
+void Image2Dcm::setXMLnamespaceCheck(OFBool enabled)
+{
+  m_XMLnamespaceCheck = enabled;
+}
+
 
 void Image2Dcm::setIncrementInstanceNumber(OFBool incInstNo)
 {
@@ -729,7 +1033,9 @@ OFString Image2Dcm::checkAndInventType2Attrib(const DcmTagKey& key,
 }
 
 
-Image2Dcm::~Image2Dcm()
+OFCondition Image2Dcm::updateOffsetTable()
 {
-  DCMDATA_LIBI2D_DEBUG("Freeing memory");
+  OFCondition result = EC_Normal;
+  if (m_offsetTable) result = m_offsetTable->createOffsetTable(m_offsetList);
+  return result;
 }
index 025667036ed899464d7ea30d66677d3e9313a0d0..336f7802120a47a1e0ea06ee25ded4260457155c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2009-2017, OFFIS e.V.
+ *  Copyright (C) 2009-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -100,8 +100,9 @@ OFCondition I2DBmpSource::readPixelData(Uint16& rows,
     return cond;
   }
 
+  OFBool isMonochrome = OFFalse;
   Uint32 *palette = NULL;
-  cond = readColorPalette(colors, palette);
+  cond = readColorPalette(colors, isMonochrome, palette);
   if (cond.bad())
   {
     closeFile();
@@ -115,7 +116,7 @@ OFCondition I2DBmpSource::readPixelData(Uint16& rows,
   /* ...and read the "real" image data */
   char *data;
   Uint32 data_length;
-  cond = readBitmapData(width, height, bpp, isTopDown, colors, palette, data, data_length);
+  cond = readBitmapData(width, height, bpp, isTopDown, isMonochrome, colors, palette, data, data_length);
 
   if (palette)
     delete[] palette;
@@ -130,12 +131,19 @@ OFCondition I2DBmpSource::readPixelData(Uint16& rows,
 
   rows = height;
   cols = width;
-  samplesPerPixel = 3;    /* 24 bpp */
-
+  if (isMonochrome)
+  {
+    samplesPerPixel = 1;
+    photoMetrInt = "MONOCHROME2";
+  }
+  else
+  {
+    samplesPerPixel = 3;    /* 24 bpp */
+    photoMetrInt = "RGB";
+  }
   bitsAlloc = 8;
   bitsStored = 8;
   highBit = 7;
-  photoMetrInt = "RGB";
   planConf = 0;           /* For each pixel we save rgb in that order */
   pixData = data;
   length = data_length;
@@ -201,7 +209,7 @@ OFCondition I2DBmpSource::readBitmapHeader(Uint16 &width,
 
   // Check if we got a valid value here which fits into a Uint16
   // (height < 0 can happen because -(INT_MIN) == INT_MIN).
-  if (tmp_height <= 0 || tmp_height > UINT16_MAX)
+  if (tmp_height <= 0 || tmp_height > OFstatic_cast(Sint32, UINT16_MAX))
     return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unsupported BMP file - height too large or zero");
 
   if (tmp_width < 0) /* Width also can be signed, but no semantic */
@@ -209,7 +217,7 @@ OFCondition I2DBmpSource::readBitmapHeader(Uint16 &width,
     tmp_width = -tmp_width;
   }
   width = OFstatic_cast(Uint16, tmp_width);
-  if (tmp_width <= 0 || tmp_width > UINT16_MAX)
+  if (tmp_width <= 0 || tmp_width > OFstatic_cast(Sint32, UINT16_MAX))
     return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unsupported BMP file - width too large or zero");
 
   /* Some older standards used this, always 1 for BMP (number of planes) */
@@ -278,8 +286,10 @@ OFCondition I2DBmpSource::readBitmapHeader(Uint16 &width,
 }
 
 
-OFCondition I2DBmpSource::readColorPalette(Uint16 colors,
-                                           Uint32*& palette)
+OFCondition I2DBmpSource::readColorPalette(
+  Uint16 colors,
+  OFBool& isMonochrome,
+  Uint32*& palette)
 {
   if (colors == 0)
     // Nothing to do;
@@ -289,11 +299,13 @@ OFCondition I2DBmpSource::readColorPalette(Uint16 colors,
     // BMPs can not have more than 256 color table entries
     return EC_IllegalCall;
 
+  isMonochrome = OFTrue;
+  Uint8 r, g, b;
+
   // Read the color palette
   palette = new Uint32[colors];
+  Uint32 tmp;
   for (int i = 0; i < colors; i++) {
-    Uint32 tmp;
-
     // Each item is 32-bit BGRx entry, this function reads that data
     if (readDWord(tmp) != 0) {
       delete[] palette;
@@ -303,20 +315,28 @@ OFCondition I2DBmpSource::readColorPalette(Uint16 colors,
 
     // Converting this BGRx into RGB is done elsewhere
     palette[i] = tmp;
+
+    // check if the value is grayscale, set monochrome flag to false otherwise
+    r = OFstatic_cast(Uint8, tmp >> 16);
+    g = OFstatic_cast(Uint8, tmp >>  8);
+    b = OFstatic_cast(Uint8, tmp >>  0);
+    if ((r != g) || (r != b)) isMonochrome = OFFalse;
   }
 
   return EC_Normal;
 }
 
 
-OFCondition I2DBmpSource::readBitmapData(const Uint16 width,
-                                         const Uint16 height,
-                                         const Uint16 bpp,
-                                         const OFBool isTopDown,
-                                         const Uint16 colors,
-                                         const Uint32* palette,
-                                         char*& pixData,
-                                         Uint32& length)
+OFCondition I2DBmpSource::readBitmapData(
+  const Uint16 width,
+  const Uint16 height,
+  const Uint16 bpp,
+  const OFBool isTopDown,
+  const OFBool isMonochrome,
+  const Uint16 colors,
+  const Uint32* palette,
+  char*& pixData,
+  Uint32& length)
 {
   /* row_length = width * bits_per_pixel / 8 bits_per_byte.
      row_length must be rounded *up* to a 4-byte boundary:
@@ -328,6 +348,7 @@ OFCondition I2DBmpSource::readBitmapData(const Uint16 width,
   Uint32 y;
   OFBool positive_direction;
   Uint32 max;
+  Uint16 samplesPerPixel = isMonochrome ? 1 : 3;
 
   // "palette" may only be NULL if colors is 0 and vice versa
   if ((palette == NULL) != (colors == 0))
@@ -352,7 +373,7 @@ OFCondition I2DBmpSource::readBitmapData(const Uint16 width,
     max = 0;
   }
 
-  length = width * height * 3;
+  length = width * height * samplesPerPixel;
 
   DCMDATA_LIBI2D_DEBUG("I2DBmpSource: Starting to read bitmap data");
 
@@ -372,7 +393,7 @@ OFCondition I2DBmpSource::readBitmapData(const Uint16 width,
     /* Calculate posData for this line, it is the index of the first byte for
      * this line. ( -1 because we start at index 1, but C at index 0)
      */
-    Uint32 posData = (y - 1) * width * 3;
+    Uint32 posData = (y - 1) * width * samplesPerPixel;
 
     if (bmpFile.fread(row_data, 1, row_length) < row_length)
     {
@@ -387,7 +408,7 @@ OFCondition I2DBmpSource::readBitmapData(const Uint16 width,
       case 1:
       case 4:
       case 8:
-        cond = parseIndexedColorRow(row_data, width, bpp, colors, palette, &pixData[posData]);
+        cond = parseIndexedColorRow(row_data, width, bpp, colors, palette, isMonochrome, &pixData[posData]);
         break;
       case 16:
         cond = parse16BppRow(row_data, width, &pixData[posData]);
@@ -486,12 +507,14 @@ OFCondition I2DBmpSource::parse16BppRow(const Uint8 *row,
 }
 
 
-OFCondition I2DBmpSource::parseIndexedColorRow(const Uint8 *row,
-                                               const Uint16 width,
-                                               const int bpp,
-                                               const Uint16 colors,
-                                               const Uint32* palette,
-                                               char *pixData /*out*/) const
+OFCondition I2DBmpSource::parseIndexedColorRow(
+  const Uint8 *row,
+  const Uint16 width,
+  const int bpp,
+  const Uint16 colors,
+  const Uint32* palette,
+  const OFBool isMonochrome,
+  char *pixData /*out*/) const
 {
   // data that is still left from reading the last pixel
   Uint8 data = 0;
@@ -528,10 +551,16 @@ OFCondition I2DBmpSource::parseIndexedColorRow(const Uint8 *row,
     // And save it in the resulting image, this implicitly converts the BGR we
     // got from the color table into RGB.
     pixData[pos]     = OFstatic_cast(Uint8, pixel >> 16);
-    pixData[pos + 1] = OFstatic_cast(Uint8, pixel >>  8);
-    pixData[pos + 2] = OFstatic_cast(Uint8, pixel >>  0);
-
-    pos += 3;
+    if (isMonochrome)
+    {
+      pos++;
+    }
+    else
+    {
+      pixData[pos + 1] = OFstatic_cast(Uint8, pixel >>  8);
+      pixData[pos + 2] = OFstatic_cast(Uint8, pixel >>  0);
+      pos += 3;
+    }
   }
   return EC_Normal;
 }
index 0c966a449982b70e0e920beb107d66c3b7408c5c..ac72db6e9f231347dff59dc08f48d17ec9742f17 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2019, OFFIS e.V.
+ *  Copyright (C) 2007-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
  *
  */
 
-
-#include "dcmtk/config/osconfig.h"
 #include "dcmtk/dcmdata/libi2d/i2djpgs.h"
-#include "dcmtk/dcmdata/libi2d/i2doutpl.h"
+#include "dcmtk/config/osconfig.h"
 #include "dcmtk/dcmdata/dcerror.h"
+#include "dcmtk/dcmdata/libi2d/i2doutpl.h"
 
-I2DJpegSource::I2DJpegSource() : m_jpegFileMap(), jpegFile(),
-  m_disableProgrTs(OFFalse), m_disableExtSeqTs(OFFalse), m_insistOnJFIF(OFFalse),
-  m_keepAPPn(OFFalse), m_lossyCompressed(OFTrue)
+I2DJpegSource::I2DJpegSource()
+    : m_jpegFileMap()
+    , jpegFile()
+    , m_disableProgrTs(OFFalse)
+    , m_disableExtSeqTs(OFFalse)
+    , m_insistOnJFIF(OFFalse)
+    , m_keepAPPn(OFFalse)
+    , m_keepCOM(OFTrue)
+    , m_lossyCompressed(OFTrue)
 {
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Plugin instantiated");
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Plugin instantiated");
 }
 
-
 OFString I2DJpegSource::inputFormat() const
 {
-  return "JPEG";
+    return "JPEG";
 }
 
-OFCondition I2DJpegSource::openFile(const OFString &filename)
+OFCondition I2DJpegSource::openFile(const OFStringfilename)
 {
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Opening JPEG file: " << filename);
-  OFCondition cond;
-  if (filename.empty())
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "No JPEG filename specified");
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Opening JPEG file: " << filename);
+    OFCondition cond;
+    if (filename.empty())
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "No JPEG filename specified");
 
-  // Try to open JPEG file
-  if ((jpegFile.fopen(filename.c_str(), "rb")) == OFFalse)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to open JPEG file");
+    // Try to open JPEG file
+    if ((jpegFile.fopen(filename.c_str(), "rb")) == OFFalse)
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to open JPEG file");
 
-  return cond;
+    return cond;
 }
 
-
 void I2DJpegSource::setExtSeqSupport(const OFBool enabled)
 {
-  m_disableExtSeqTs = !enabled;
+    m_disableExtSeqTs = !enabled;
 }
 
-
 void I2DJpegSource::setProgrSupport(const OFBool enabled)
 {
-  m_disableProgrTs = !enabled;
+    m_disableProgrTs = !enabled;
 }
 
-
 void I2DJpegSource::setInsistOnJFIF(const OFBool enabled)
 {
-  m_insistOnJFIF = enabled;
+    m_insistOnJFIF = enabled;
 }
 
-
 void I2DJpegSource::setKeepAPPn(const OFBool enabled)
 {
-  m_keepAPPn = enabled;
+    m_keepAPPn = enabled;
 }
 
+void I2DJpegSource::setKeepCOM(const OFBool enabled)
+{
+    m_keepCOM = enabled;
+}
 
 OFCondition I2DJpegSource::readPixelData(Uint16& rows,
                                          Uint16& cols,
@@ -88,648 +92,641 @@ OFCondition I2DJpegSource::readPixelData(Uint16& rows,
                                          Uint16& planConf,
                                          Uint16& pixAspectH,
                                          Uint16& pixAspectV,
-                                         char*&  pixData,
+                                         char*& pixData,
                                          Uint32& length,
-                                         E_TransferSyntax &ts)
+                                         E_TransferSyntaxts)
 {
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Importing JPEG pixel data");
-  OFCondition cond = openFile(m_imageFile);
-  // return error if file is not open
-  if (cond.bad())
-  {
-    closeFile();
-    return cond;
-  }
-  // Create "map" with byte positions of all JPEG markers in JPEG file
-  cond = createJPEGFileMap();
-  if (cond.bad())
-  {
-    clearMap();
-    closeFile();
-    return cond;
-  }
-
-  // Check for image data in file (look for SOF marker)
-  E_JPGMARKER jpegEncoding;
-  OFListIterator(JPEGFileMapEntry*) entry = m_jpegFileMap.begin();
-  while (entry != m_jpegFileMap.end())
-  {
-    if ( isSOFMarker((*entry)->marker) )
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Importing JPEG pixel data");
+    OFCondition cond = openFile(m_imageFile);
+    // return error if file is not open
+    if (cond.bad())
     {
-      jpegEncoding = OFstatic_cast(E_JPGMARKER, (*entry)->marker);
-      break;
+        closeFile();
+        return cond;
+    }
+    // Create "map" with byte positions of all JPEG markers in JPEG file
+    cond = createJPEGFileMap();
+    if (cond.bad())
+    {
+        clearMap();
+        closeFile();
+        return cond;
     }
-    entry++;
-  }
-  if (entry == m_jpegFileMap.end())
-  {
-    closeFile();
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "No image data found in JPEG file");
-  }
 
-  // Reject arithmetic and hierarchical (differential) encodings (not supported)
-  cond = isJPEGEncodingSupported(jpegEncoding);
-  if (cond.bad())
-  {
-    closeFile();
-    return cond;
-  }
+    // Check for image data in file (look for SOF marker)
+    E_JPGMARKER jpegEncoding;
+    OFListIterator(JPEGFileMapEntry*) entry = m_jpegFileMap.begin();
+    while (entry != m_jpegFileMap.end())
+    {
+        if (isSOFMarker((*entry)->marker))
+        {
+            jpegEncoding = OFstatic_cast(E_JPGMARKER, (*entry)->marker);
+            break;
+        }
+        entry++;
+    }
+    if (entry == m_jpegFileMap.end())
+    {
+        closeFile();
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "No image data found in JPEG file");
+    }
 
-  // Get transfer syntax associated with the given JPEG encoding
-  ts = associatedTS(jpegEncoding);
+    // Reject arithmetic and hierarchical (differential) encodings (not supported)
+    cond = isJPEGEncodingSupported(jpegEncoding);
+    if (cond.bad())
+    {
+        closeFile();
+        return cond;
+    }
 
-  // Extract width, height, samples per pixel, bits per sample
-  Uint16 width, height, spp, bps;
-  cond = getSOFImageParameters(**entry, width, height, spp, bps);
-  if (cond.bad())
-  {
-    closeFile();
-    return cond;
-  }
+    // Get transfer syntax associated with the given JPEG encoding
+    ts = associatedTS(jpegEncoding);
 
-  // Return error if invalid image attributes were found
-  if (height == 0 || width == 0)
-  {
-    closeFile();
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid image size (width or height = 0)");
-  }
-
-  // Examine JFIF information (version, horizontal and vertical aspect ratio, aspect ratio units.
-  Uint16 jfifVersion, unit;
-  Uint16 aspectH = 1;
-  Uint16 aspectV = 1;
-  entry = m_jpegFileMap.begin();
-  while (entry != m_jpegFileMap.end())
-  {
-    if ( (*entry)->marker == E_JPGMARKER_APP0 )
-      break;
-    entry++;
-  }
-  if ( entry == m_jpegFileMap.end())
-  {
-    if (!m_insistOnJFIF)
+    // Extract width, height, samples per pixel, bits per sample
+    Uint16 width, height, spp, bps;
+    cond = getSOFImageParameters(**entry, width, height, spp, bps);
+    if (cond.bad())
+    {
+        closeFile();
+        return cond;
+    }
+
+    // Return error if invalid image attributes were found
+    if (height == 0 || width == 0)
+    {
+        closeFile();
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid image size (width or height = 0)");
+    }
+
+    // Examine JFIF information (version, horizontal and vertical aspect ratio, aspect ratio units.
+    Uint16 jfifVersion, unit;
+    Uint16 aspectH = 1;
+    Uint16 aspectV = 1;
+    entry          = m_jpegFileMap.begin();
+    while (entry != m_jpegFileMap.end())
     {
-      DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Ignoring missing JFIF header");
+        if ((*entry)->marker == E_JPGMARKER_APP0)
+            break;
+        entry++;
+    }
+    if (entry == m_jpegFileMap.end())
+    {
+        if (!m_insistOnJFIF)
+        {
+            DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Ignoring missing JFIF header");
+        }
+        else
+        {
+            closeFile();
+            return makeOFCondition(OFM_dcmdata, 18, OF_error, "No JFIF information found in JPEG file");
+        }
     }
     else
+        cond = getJFIFImageParameters(**entry, jfifVersion, aspectH, aspectV, unit);
+    if (cond.bad())
     {
-      closeFile();
-      return makeOFCondition(OFM_dcmdata, 18, OF_error, "No JFIF information found in JPEG file");
+        if (!m_insistOnJFIF)
+        {
+            DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Ignoring errors while evaluating JFIF data");
+        }
+        else
+        {
+            closeFile();
+            return cond;
+        }
     }
-  }
-  else
-    cond = getJFIFImageParameters(**entry, jfifVersion, aspectH, aspectV, unit);
-  if (cond.bad())
-  {
-    if (!m_insistOnJFIF)
+    pixAspectH = aspectH;
+    pixAspectV = aspectV;
+
+    // Collect information needed for image pixel module
+    rows            = height;
+    cols            = width;
+    samplesPerPixel = spp;
+    bitsStored      = bps;
+    bitsAlloc       = bps;
+
+    // When BitsStored = 12, we use BitsAllocated = 16
+    if (bitsAlloc == 12)
     {
-      DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Ignoring errors while evaluating JFIF data");
+        bitsAlloc = 16;
     }
+
+    // HighBit is always BitsStored - 1.
+    highBit = bitsStored;
+    highBit--;
+
+    if (samplesPerPixel == 1)
+        photoMetrInt = "MONOCHROME2";
+    else if (samplesPerPixel == 3)
+        photoMetrInt = "YBR_FULL_422";
     else
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "For JPEG data, Samples per Pixel must be 1 or 3");
+    // Planar Configuration and Pixel Representation is always 0 for JPEG data
+    planConf  = 0;
+    pixelRepr = 0;
+
+    Uint32 tLength   = 0;
+    char* tPixelData = NULL;
+    cond             = extractRawJPEGStream(tPixelData, tLength);
+    if (cond.bad())
     {
-      closeFile();
-      return cond;
+        closeFile();
+        return cond;
     }
-  }
-  pixAspectH = aspectH;
-  pixAspectV = aspectV;
-
-  // Collect information needed for image pixel module
-  rows = height;
-  cols = width;
-  samplesPerPixel = spp;
-  bitsAlloc = bps;
-  // Some output formats do not allow 12 bit at all, so it is more safe to
-  // use 16 bit for Bits Allocated (and therefore for Bits Stored, see below)
-  if (bitsAlloc == 12)
-  {
-    bitsAlloc = 16;
-  }
-  bitsStored = bitsAlloc;
-  highBit = OFstatic_cast(Uint16, bitsStored - 1);
-  if (samplesPerPixel == 1)
-    photoMetrInt = "MONOCHROME2";
-  else if (samplesPerPixel == 3)
-    photoMetrInt = "YBR_FULL_422";
-  else
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "For JPEG data, Samples per Pixel must be 1 or 3");
-  // Planar Configuration and Pixel Representation is always 0 for JPEG data
-  planConf = 0;
-  pixelRepr = 0;
-
-  Uint32 tLength = 0;
-  char* tPixelData = NULL;
-  // Keep all APPx info (however, JFIF is always removed)
-  if (m_keepAPPn)
-    cond = copyJPEGStream(tPixelData, tLength);
-  // Cut off all APPx information from JPEG and get raw JPEG bit stream into memory
-  else
-    cond = extractRawJPEGStream(tPixelData, tLength);
-  if (cond.bad())
-  {
-    closeFile();
-      return cond;
-  }
-  length = tLength;
-  pixData = tPixelData;
-  return cond;
+    length  = tLength;
+    pixData = tPixelData;
+    return cond;
 }
 
-
-OFCondition I2DJpegSource::getLossyComprInfo(OFBool& srcEncodingLossy,
-                                             OFString& srcLossyComprMethod) const
+OFCondition I2DJpegSource::getLossyComprInfo(OFBool& srcEncodingLossy, OFString& srcLossyComprMethod) const
 {
-  if (m_lossyCompressed)
-  {
-    srcEncodingLossy = OFTrue;
-    srcLossyComprMethod = "ISO_10918_1"; // Defined term for JPEG Lossy Compression
-  }
-  else
-  {
-    // (will never get here, no lossless input supported so far)
-    srcEncodingLossy = OFFalse;
-  }
-  return EC_Normal;
+    if (m_lossyCompressed)
+    {
+        srcEncodingLossy    = OFTrue;
+        srcLossyComprMethod = "ISO_10918_1"; // Defined term for JPEG Lossy Compression
+    }
+    else
+    {
+        // (will never get here, no lossless input supported so far)
+        srcEncodingLossy = OFFalse;
+    }
+    return EC_Normal;
 }
 
-
-OFCondition I2DJpegSource::getSOFImageParameters( const JPEGFileMapEntry& entry,
-                                                  Uint16& imageWidth,
-                                                  Uint16& imageHeight,
-                                                  Uint16& samplesPerPixel,
-                                                  Uint16& bitsPerSample)
+OFCondition I2DJpegSource::getSOFImageParameters(const JPEGFileMapEntry& entry,
+                                                 Uint16& imageWidth,
+                                                 Uint16& imageHeight,
+                                                 Uint16& samplesPerPixel,
+                                                 Uint16& bitsPerSample)
 {
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examining JPEG SOF image parameters");
-  if ( (entry.marker < E_JPGMARKER_SOF0) || (entry.marker > E_JPGMARKER_SOF15) )
-    return EC_IllegalCall;
-  Uint16 length;
-  Uint16 image_height, image_width;
-  Uint8 data_precision, num_components;
-  int result;
-
-  // seek to the given SOFn marker
-
-  jpegFile.fseek(entry.bytePos, SEEK_SET);
-  result = read2Bytes(length);  /* usual parameter length count */
-  if (result == EOF)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-
-  // read values
-
-  result = read1Byte(data_precision);
-  if (result == EOF)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-
-  result = read2Bytes(image_height);
-  if (result == EOF)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-
-  result = read2Bytes(image_width);
-  if (result == EOF)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-
-  result = read1Byte(num_components);
-  if (result == EOF)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-
-  imageWidth = image_width;
-  imageHeight = image_height;
-  samplesPerPixel = num_components;
-  bitsPerSample = data_precision;
-
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Dumping JPEG SOF image parameters:");
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Image Width: " << image_width);
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Image Height: " << image_height);
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Number of Components: " << OFstatic_cast(unsigned int, num_components));
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Data Precision: " << OFstatic_cast(unsigned int, data_precision));
-
-  if (length != OFstatic_cast(unsigned int, 8 + num_components * 3))
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Bogus SOF marker length");
-
-  return EC_Normal;
-}
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examining JPEG SOF image parameters");
+    if ((entry.marker < E_JPGMARKER_SOF0) || (entry.marker > E_JPGMARKER_SOF15))
+        return EC_IllegalCall;
+    Uint16 length;
+    Uint16 image_height, image_width;
+    Uint8 data_precision, num_components;
+    int result;
+
+    // seek to the given SOFn marker
+
+    jpegFile.fseek(entry.bytePos, SEEK_SET);
+    result = read2Bytes(length); /* usual parameter length count */
+    if (result == EOF)
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+
+    // read values
 
+    result = read1Byte(data_precision);
+    if (result == EOF)
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+
+    result = read2Bytes(image_height);
+    if (result == EOF)
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+
+    result = read2Bytes(image_width);
+    if (result == EOF)
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+
+    result = read1Byte(num_components);
+    if (result == EOF)
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+
+    imageWidth      = image_width;
+    imageHeight     = image_height;
+    samplesPerPixel = num_components;
+    bitsPerSample   = data_precision;
+
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Dumping JPEG SOF image parameters:");
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Image Width: " << image_width);
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Image Height: " << image_height);
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Number of Components: " << OFstatic_cast(unsigned int, num_components));
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Data Precision: " << OFstatic_cast(unsigned int, data_precision));
+
+    if (length != OFstatic_cast(unsigned int, 8 + num_components * 3))
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Bogus SOF marker length");
+
+    return EC_Normal;
+}
 
 // ignores thumbnail data
-OFCondition I2DJpegSource::getJFIFImageParameters( const JPEGFileMapEntry& entry,
-                                                   Uint16& jfifVersion,
-                                                   Uint16& pixelAspectH,
-                                                   Uint16& pixelAspectV,
-                                                   Uint16& unit)
+OFCondition I2DJpegSource::getJFIFImageParameters(
+    const JPEGFileMapEntry& entry, Uint16& jfifVersion, Uint16& pixelAspectH, Uint16& pixelAspectV, Uint16& unit)
 {
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examining JFIF information");
-  if (entry.marker != E_JPGMARKER_APP0)
-    return EC_IllegalCall;
-  Uint16 jv, pah, pav, unt;
-
-  // go to specified byte position and read on to value field
-  Uint16 length;
-  jpegFile.fseek(entry.bytePos, SEEK_SET);
-  int result = read2Bytes(length);  /* usual parameter length count */
-  if (result == EOF)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-
-  // read and check the 5 byte "JFIF" marker value (X'4A', X'46', X'49', X'46', X'00')
-  Uint16 twoBytes;
-  result = read2Bytes(twoBytes);
-  if ( (result == EOF) || (twoBytes != 0x4a46) )
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found");
-  result = read2Bytes(twoBytes);
-  if ( (result == EOF) || (twoBytes != 0x4946) )
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found");
-  Uint8 oneByte;
-  result = read1Byte(oneByte);
-  if ( (result == EOF)|| (oneByte != 0x00) )
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found");
-
-  // read JFIF version
-  result = read2Bytes(twoBytes);
-  if (result == EOF)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-  jv = twoBytes;
-
-  // read pixel aspect ratio unit
-  result = read1Byte(oneByte);
-  if ( (result == EOF) || (oneByte > 2) )
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-  unt = oneByte;
-
-  // read horizontal aspect ratio (XDensity)
-  result = read2Bytes(twoBytes);
-  if (result == EOF)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-  pah = twoBytes;
-
-  // read vertical aspect ratio (YDensity)
-  result = read2Bytes(twoBytes);
- if (result == EOF)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-  pav = twoBytes;
-
-  // prepare return values and return
-  jfifVersion = jv;
-  pixelAspectH = pah;
-  pixelAspectV = pav;
-  unit = unt;
-
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Dumping some JFIF image parameters:");
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   JFIF version: " << jfifVersion);
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Horizontal Pixel Aspect Ratio " << pixelAspectH);
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Vertical Pixel Aspect Ratio: " << pixelAspectV);
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Units: " << unit);
-
-  return EC_Normal;
-}
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examining JFIF information");
+    if (entry.marker != E_JPGMARKER_APP0)
+        return EC_IllegalCall;
+    Uint16 jv, pah, pav, unt;
+
+    // go to specified byte position and read on to value field
+    Uint16 length;
+    jpegFile.fseek(entry.bytePos, SEEK_SET);
+    int result = read2Bytes(length); /* usual parameter length count */
+    if (result == EOF)
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
 
+    // read and check the 5 byte "JFIF" marker value (X'4A', X'46', X'49', X'46', X'00')
+    Uint16 twoBytes;
+    result = read2Bytes(twoBytes);
+    if ((result == EOF) || (twoBytes != 0x4a46))
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found");
+    result = read2Bytes(twoBytes);
+    if ((result == EOF) || (twoBytes != 0x4946))
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found");
+    Uint8 oneByte;
+    result = read1Byte(oneByte);
+    if ((result == EOF) || (oneByte != 0x00))
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found");
+
+    // read JFIF version
+    result = read2Bytes(twoBytes);
+    if (result == EOF)
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+    jv = twoBytes;
 
-OFCondition I2DJpegSource::copyJPEGStream(char*& pixelData,
-                                          Uint32& pixLength)
-{
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Copying JPEG data from JPEG file");
-  /* Calculate length of total stream as found in the file
-   * Therefore, look at byte positions from SOI and EOI marker */
-
-  offile_off_t bytePosJFIF = 0;
-  offile_off_t bytePosAfterJFIF = 0;
-  int marker = 0;
-
-  // determine file size
-  offile_off_t result = jpegFile.fseek(0, SEEK_END);
-  if (result != 0)
-    return EC_IllegalParameter;
-  offile_off_t filesize = jpegFile.ftell();
-
-  // Only pixel data up to 2^32 bytes is supported (DICOM) and maximum size for "new" operator = size_t
-
-  if ( ( OFstatic_cast(unsigned long, filesize) > OFstatic_cast(unsigned long, 4294967294UL) ) ||
-       ( OFstatic_cast(unsigned long, filesize) > OFstatic_cast(unsigned long, -1) ) )
-  {
-    DCMDATA_LIBI2D_ERROR("I2DJpegSource: JPEG file length longer than 2^32 bytes (or larger than size_t capacity), aborting");
-    return EC_MemoryExhausted;
-  }
-
-  // get position of JFIF section and SOI marker
-  OFListIterator(JPEGFileMapEntry*) entry = m_jpegFileMap.begin();
-  while (entry != m_jpegFileMap.end())
-  {
-    marker = (*entry)->marker;
-    if ( marker == E_JPGMARKER_APP0 )
-    {
-      DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Skipping application segment APP0");
-      bytePosJFIF = (*entry)->bytePos - 1; // include first byte of marker (FF)
-      entry++;
-      bytePosAfterJFIF = (*entry)->bytePos - 1; // include first byte (FF) of marker after APPn
-      break;
-    }
-    entry++;
-  }
-
-  // Go to starting position (SOI marker) of JPEG stream data
-  jpegFile.fseek(0, SEEK_SET);
-
-  // Allocate buffer for raw JPEG data
-  pixLength = OFstatic_cast(Uint32, filesize - (bytePosAfterJFIF - bytePosJFIF));
-  pixelData = new char[pixLength];
-  char *currBufferPos = pixelData;
-
-  // exclude JFIF if present
-  if (bytePosJFIF != 0)
-  {
-    // read from SOI to JFIF
-    result = jpegFile.fread (currBufferPos, 1, 2);
-    if (result != 2)
-      return EC_IllegalCall;
-    currBufferPos += 2;
-    // read from end of JFIF to end of file
-    jpegFile.fseek(bytePosAfterJFIF - 1, SEEK_SET); // -1 because offsets start with 0
-    result = jpegFile.fread (currBufferPos, 1, OFstatic_cast(size_t, filesize - bytePosAfterJFIF + 1));
-    if (result != filesize - bytePosAfterJFIF + 1)
-      return EC_IllegalCall;
-  }
-  else // otherwise copy everything starting with SOI marker
-  {
-    result = jpegFile.fread (currBufferPos, 1, OFstatic_cast(size_t, filesize));
-    if (result != filesize)
-      return EC_IllegalCall;
-  }
-  return EC_Normal;
-}
+    // read pixel aspect ratio unit
+    result = read1Byte(oneByte);
+    if ((result == EOF) || (oneByte > 2))
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+    unt = oneByte;
+
+    // read horizontal aspect ratio (XDensity)
+    result = read2Bytes(twoBytes);
+    if (result == EOF)
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+    pah = twoBytes;
+
+    // read vertical aspect ratio (YDensity)
+    result = read2Bytes(twoBytes);
+    if (result == EOF)
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+    pav = twoBytes;
 
+    // prepare return values and return
+    jfifVersion  = jv;
+    pixelAspectH = pah;
+    pixelAspectV = pav;
+    unit         = unt;
+
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Dumping some JFIF image parameters:");
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   JFIF version: " << jfifVersion);
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Horizontal Pixel Aspect Ratio " << pixelAspectH);
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Vertical Pixel Aspect Ratio: " << pixelAspectV);
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Units: " << unit);
+
+    return EC_Normal;
+}
 
 // expects valid JPEG stream (especially exactly one SOI and one EOI marker)
-OFCondition I2DJpegSource::extractRawJPEGStream(char*& pixelData,
-                                                Uint32& pixLength)
+OFCondition I2DJpegSource::extractRawJPEGStream(char*& pixelData, Uint32& pixLength)
 {
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Extracting JPEG data from JPEG file");
-  OFCondition cond;
-  int marker = 0;
-  Uint16 length;
-
-  /* Calculate length of total stream as found in the file
-   * Therefore, look at byte positions from SOI and EOI marker and
-   * and exclude all APPn markers in calculation
-   */
-
-  offile_off_t bytePosSOI = 0;
-  offile_off_t bytePosEOI = 0;
-  offile_off_t totalAPPSize = 0;
-  OFList<offile_off_t> appPosAndLengths;
-
-  OFListIterator(JPEGFileMapEntry*) entry = m_jpegFileMap.begin();
-  while (entry != m_jpegFileMap.end())
-  {
-    marker = (*entry)->marker;
-
-    if (marker == E_JPGMARKER_SOI)
-    {
-      bytePosSOI = (*entry)->bytePos;
-      // Subtract one byte for the preceding 0xFF of the SOI-Marker
-      bytePosSOI -= 1;
-    }
-    else if (marker == E_JPGMARKER_EOI)
-    {
-      bytePosEOI = (*entry)->bytePos;
-      // No need to subtract / add bytes
-      break;
-    }
-    else if (marker >= E_JPGMARKER_APP0 && marker <= E_JPGMARKER_APP15)
-    {
-      DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Skipping application segment APP" << (marker - E_JPGMARKER_APP0));
-      jpegFile.fseek((*entry)->bytePos - jpegFile.ftell(), SEEK_CUR);
-      int result = read2Bytes( length);
-      if (result == EOF)
-      {
-        jpegFile.fclose();
-        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-      }
-      // remember pos and length of APP data so we don't need a second "scan" for that
-      appPosAndLengths.push_back( (*entry)->bytePos - 1 ); // -1 for FF of marker
-      appPosAndLengths.push_back( length );
-      // add length of marker value to total APP size
-      totalAPPSize += length;
-      // add the marker length itself to total APP size
-      totalAPPSize += 2;
-    }
-    // Advance to next segment
-    entry++;
-  }
-
-  if ( (entry == m_jpegFileMap.end()) || (bytePosSOI == 0) || (bytePosEOI == 0)) // at least end marker was not found
-    return EC_IllegalCall;
-
-  offile_off_t rawStreamSize = bytePosEOI - bytePosSOI - totalAPPSize;
-  // Start position n and endpos. m results in a total amount of m-n+1 bytes
-  rawStreamSize++;
-
-  // Allocate buffer for raw JPEG data
-  // Only pixel data up to 2^32 bytes is supported (DICOM)
-  if ( ( OFstatic_cast(unsigned long, rawStreamSize) > OFstatic_cast(unsigned long, 4294967294UL) ) ||
-       ( OFstatic_cast(unsigned long, rawStreamSize) > OFstatic_cast(unsigned long, -1) ) )
-  {
-    DCMDATA_LIBI2D_ERROR("I2DJpegSource: Raw JPEG stream length longer than 2^32 bytes (or larger than size_t capacity), aborting");
-    return EC_MemoryExhausted;
-  }
-  pixelData = new char[OFstatic_cast(size_t, rawStreamSize)];
-  // keep track of current write position in memory buffer
-  char *currBufferPos = pixelData;
-
-  // Go to starting position (SOI marker) of JPEG stream data
-  jpegFile.fseek(bytePosSOI-1, SEEK_SET);
-
-  /* Copy everything but leave out APP segments
-   */
-  OFBool finished = OFFalse;
-  offile_off_t endOfBlock = 0; offile_off_t startOfNextBlock = 0;
-  while (!finished)
-  {
-    // determine position of the next block to be read
-    if ( appPosAndLengths.size() != 0)
-    {
-      // we have some APP blocks left
-      endOfBlock = appPosAndLengths.front() - 1;
-      appPosAndLengths.pop_front();
-      startOfNextBlock = endOfBlock + appPosAndLengths.front() + 2; // +2 for marker
-      appPosAndLengths.pop_front();
-    }
-    else // we can read to the end
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Extracting JPEG data from JPEG file");
+    OFCondition cond;
+    int marker = 0;
+    Uint16 length;
+
+    /* Calculate length of total stream as found in the file
+     * Therefore, look at byte positions from SOI and EOI marker and
+     * and exclude all APPn markers and COM markers in calculation
+     */
+
+    offile_off_t bytePosSOI    = 0;
+    offile_off_t bytePosEOI    = 0;
+    offile_off_t totalSkipSize = 0;
+    OFList<offile_off_t> appPosAndLengths;
+
+    OFListIterator(JPEGFileMapEntry*) entry = m_jpegFileMap.begin();
+    while (entry != m_jpegFileMap.end())
     {
-      endOfBlock = bytePosEOI;
-      finished = OFTrue;
+        marker = (*entry)->marker;
+
+        if (marker == E_JPGMARKER_SOI)
+        {
+            bytePosSOI = (*entry)->bytePos;
+            // Subtract one byte for the preceding 0xFF of the SOI-Marker
+            bytePosSOI -= 1;
+        }
+        else if (marker == E_JPGMARKER_EOI)
+        {
+            bytePosEOI = (*entry)->bytePos;
+            // No need to subtract / add bytes
+            break;
+        }
+        else if (!m_keepAPPn && (marker >= E_JPGMARKER_APP0 && marker <= E_JPGMARKER_APP15))
+        {
+            DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Skipping application segment APP" << (marker - E_JPGMARKER_APP0));
+            jpegFile.fseek((*entry)->bytePos - jpegFile.ftell(), SEEK_CUR);
+            int result = read2Bytes(length);
+            if (result == EOF)
+            {
+                jpegFile.fclose();
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+            }
+            // remember pos and length of APP data so we don't need a second "scan" for that
+            appPosAndLengths.push_back((*entry)->bytePos - 1); // -1 for FF of marker
+            appPosAndLengths.push_back(length);
+            // add length of marker value to total APP size
+            totalSkipSize += length;
+            // add the marker length itself to total APP size
+            totalSkipSize += 2;
+        }
+        else if (!m_keepCOM && marker == E_JPGMARKER_COM)
+        {
+            DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Skipping segment COM");
+            jpegFile.fseek((*entry)->bytePos - jpegFile.ftell(), SEEK_CUR);
+            int result = read2Bytes(length);
+            if (result == EOF)
+            {
+                jpegFile.fclose();
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+            }
+            // remember pos and length of COM data so we don't need a second "scan" for that
+            appPosAndLengths.push_back((*entry)->bytePos - 1); // -1 for FF of marker
+            appPosAndLengths.push_back(length);
+            // add length of marker value to total APP size
+            totalSkipSize += length;
+            // add the marker length itself to total APP size
+            totalSkipSize += 2;
+        }
+        // Advance to next segment
+        entry++;
     }
-    // read block
-    offile_off_t blockSize = endOfBlock - jpegFile.ftell();
-    if (blockSize < 0)
+
+    if ((entry == m_jpegFileMap.end()) || (bytePosSOI == 0) || (bytePosEOI == 0)) // at least end marker was not found
+        return EC_IllegalCall;
+
+    offile_off_t rawStreamSize = bytePosEOI - bytePosSOI - totalSkipSize;
+    // Start position n and endpos. m results in a total amount of m-n+1 bytes
+    rawStreamSize++;
+
+    // Allocate buffer for raw JPEG data
+    // Only up to 2^32-2 bytes can be stored in one pixel data fragment in DICOM
+    if ((rawStreamSize < 0) ||
+        ((rawStreamSize >> 32) > 0) ||
+        (OFstatic_cast(Uint32, rawStreamSize) > (OFstatic_cast(Uint32, 4294967294UL))))
     {
-        DCMDATA_LIBI2D_ERROR("Length field in JPEG data bigger than remaining file");
-        cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Length field in JPEG data bigger than remaining file");
+        DCMDATA_LIBI2D_ERROR(
+            "I2DJpegSource: Raw JPEG stream length longer than 2^32 bytes (or larger than size_t capacity), aborting");
+        return EC_MemoryExhausted;
     }
-    if (cond.good())
+    pixelData = new char[OFstatic_cast(size_t, rawStreamSize)];
+    // keep track of current write position in memory buffer
+    char* currBufferPos = pixelData;
+
+    // Go to starting position (SOI marker) of JPEG stream data
+    jpegFile.fseek(bytePosSOI - 1, SEEK_SET);
+
+    /* Copy everything but leave out APP segments
+     */
+    OFBool finished               = OFFalse;
+    offile_off_t endOfBlock       = 0;
+    offile_off_t startOfNextBlock = 0;
+    while (!finished)
     {
-        size_t result = jpegFile.fread (currBufferPos, 1, OFstatic_cast(size_t, blockSize));
-        if (result != OFstatic_cast(size_t, blockSize))
-            cond = EC_IllegalCall;
-        else if (!finished)
+        // determine position of the next block to be read
+        if (appPosAndLengths.size() != 0)
         {
-            jpegFile.fseek(startOfNextBlock, SEEK_SET);
-            currBufferPos += blockSize;
+            // we have some APP blocks left
+            endOfBlock = appPosAndLengths.front() - 1;
+            appPosAndLengths.pop_front();
+            startOfNextBlock = endOfBlock + appPosAndLengths.front() + 2; // +2 for marker
+            appPosAndLengths.pop_front();
         }
+        else // we can read to the end
+        {
+            endOfBlock = bytePosEOI;
+            finished   = OFTrue;
+        }
+        // read block
+        offile_off_t blockSize = endOfBlock - jpegFile.ftell();
+        if (blockSize < 0)
+        {
+            DCMDATA_LIBI2D_ERROR("Length field in JPEG data bigger than remaining file");
+            cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "Length field in JPEG data bigger than remaining file");
+        }
+        if (cond.good())
+        {
+            size_t result = jpegFile.fread(currBufferPos, 1, OFstatic_cast(size_t, blockSize));
+            if (result != OFstatic_cast(size_t, blockSize))
+                cond = EC_IllegalCall;
+            else if (!finished)
+            {
+                jpegFile.fseek(startOfNextBlock, SEEK_SET);
+                currBufferPos += blockSize;
+            }
+        }
+    }
+    // update result variable
+    pixLength = OFstatic_cast(Uint32, rawStreamSize);
+    if (cond.bad())
+    {
+        delete[] pixelData;
     }
-  }
-  // update result variable
-  pixLength = OFstatic_cast(Uint32, rawStreamSize);
-  if (cond.bad())
-  {
-    delete[] pixelData;
-  }
-  return cond;
+    return cond;
 }
 
-
 OFCondition I2DJpegSource::createJPEGFileMap()
 {
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examing JPEG file and creating map of JPEG markers");
-  // clear any old data
-  clearMap();
-  E_JPGMARKER marker;
-  JPEGFileMapEntry *entry = NULL;
-  OFBool lastWasSOSMarker = OFFalse;
-  OFCondition cond;
-
-  /* Expect SOI at start of file */
-  E_JPGMARKER first = E_JPGMARKER();
-  cond = firstMarker(first);
-  if (cond.bad())
-    return cond;
-  entry = new JPEGFileMapEntry();
-  entry->bytePos = jpegFile.ftell();
-  entry->marker = first;
-  m_jpegFileMap.push_back(entry);
-
-  if (first != E_JPGMARKER_SOI)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DJpegSource: SOI marker not found at beginning of JPEG stream");
-
-  /* Scan miscellaneous markers until we reach EOI */
-  while (cond.good())
-  {
-    cond = nextMarker(lastWasSOSMarker, marker);
-    if (cond.good())
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Examing JPEG file and creating map of JPEG markers");
+    // clear any old data
+    clearMap();
+    E_JPGMARKER marker;
+    JPEGFileMapEntry* entry = NULL;
+    OFBool lastWasSOSMarker = OFFalse;
+    OFCondition cond;
+
+    /* Expect SOI at start of file */
+    E_JPGMARKER first = E_JPGMARKER();
+    cond              = firstMarker(first);
+    if (cond.bad())
+        return cond;
+    entry          = new JPEGFileMapEntry();
+    entry->bytePos = jpegFile.ftell();
+    entry->marker  = first;
+    m_jpegFileMap.push_back(entry);
+
+    if (first != E_JPGMARKER_SOI)
+        return makeOFCondition(
+            OFM_dcmdata, 18, OF_error, "I2DJpegSource: SOI marker not found at beginning of JPEG stream");
+
+    /* Scan miscellaneous markers until we reach EOI */
+    while (cond.good())
     {
-      entry = new JPEGFileMapEntry();
-      entry->bytePos = jpegFile.ftell();
-      entry->marker = marker;
-      m_jpegFileMap.push_back(entry);
-      if (marker == E_JPGMARKER_SOS)
-      {
-        // FIXME: reset this to OFFalse after the next marker?
-        lastWasSOSMarker = OFTrue;
-      }
-      else if (marker == E_JPGMARKER_EOI)
-      {
-        // End of file reached
-        cond = EC_Normal;
-        break;
-      }
-      else if ( isSOFMarker(marker) && m_keepAPPn )
-      {
-        cond = EC_Normal;
-        break;
-      }
-      if ( !isRSTMarker(marker) ) // RST marker does not have a length that could be used for skipping
-        skipVariable();
-    }
-  } /* end loop */
-  debugDumpJPEGFileMap();
-  return cond;
+        cond = nextMarker(lastWasSOSMarker, marker);
+        if (cond.good())
+        {
+            entry          = new JPEGFileMapEntry();
+            entry->bytePos = jpegFile.ftell();
+            entry->marker  = marker;
+            m_jpegFileMap.push_back(entry);
+            if (marker == E_JPGMARKER_SOS)
+            {
+                // FIXME: reset this to OFFalse after the next marker?
+                lastWasSOSMarker = OFTrue;
+            }
+            else if (marker == E_JPGMARKER_EOI)
+            {
+                // End of file reached
+                cond = EC_Normal;
+                break;
+            }
+            if (!isRSTMarker(marker)) // RST marker does not have a length that could be used for skipping
+                skipVariable();
+        }
+    } /* end loop */
+    debugDumpJPEGFileMap();
+    return cond;
 }
 
-
 OFBool I2DJpegSource::isRSTMarker(const E_JPGMARKER& marker)
 {
-  return ((marker >= E_JPGMARKER_RST0) && (marker <= E_JPGMARKER_RST7));
+    return ((marker >= E_JPGMARKER_RST0) && (marker <= E_JPGMARKER_RST7));
 }
 
-
 OFBool I2DJpegSource::isSOFMarker(const E_JPGMARKER& marker)
 {
-  return ( (marker >= E_JPGMARKER_SOF0) && (marker <= E_JPGMARKER_SOF15)
-           && (marker != E_JPGMARKER_DHT) &&  (marker != E_JPGMARKER_DAC));
+    return ((marker >= E_JPGMARKER_SOF0) && (marker <= E_JPGMARKER_SOF15) && (marker != E_JPGMARKER_DHT)
+            && (marker != E_JPGMARKER_DAC));
 }
 
-
 OFString I2DJpegSource::jpegMarkerToString(const E_JPGMARKER& marker)
 {
-  switch (marker)
-  {
-    case(E_JPGMARKER_SOF0)  :    return "SOF0: Baseline DCT"; break;
-    case(E_JPGMARKER_SOF1)  :    return "SOF1: Extended sequential DCT"; break;
-    case(E_JPGMARKER_SOF2)  :    return "SOF2: Progressive DCT"; break;
-    case(E_JPGMARKER_SOF3)  :    return "SOF3: Lossless (sequential)"; break;
-    case(E_JPGMARKER_SOF5)  :    return "SOF5: Differential sequential DCT"; break;
-    case(E_JPGMARKER_SOF6)  :    return "SOF6: Differential progressive DCT"; break;
-    case(E_JPGMARKER_SOF7)  :    return "SOF7: Differential lossless (sequential)"; break;
-    case(E_JPGMARKER_JPG)   :    return "JPG: JPEG extension"; break;
-    case(E_JPGMARKER_SOF9)  :    return "SOF9: Extended sequential DCT"; break;
-    case(E_JPGMARKER_SOF10) :    return "SOF10: Progressive DCT"; break;
-    case(E_JPGMARKER_SOF11) :    return "SOF11: Lossless (sequential)"; break;
-    case(E_JPGMARKER_SOF13) :    return "SOF13: Differential sequential DCT"; break;
-    case(E_JPGMARKER_SOF14) :    return "SOF14: Differential progressive DCT"; break;
-    case(E_JPGMARKER_SOF15) :    return "SOF15: Differential lossless (sequential)"; break;
-    case(E_JPGMARKER_DHT)   :    return "DHT: Huffman table(s)"; break;
-    case(E_JPGMARKER_DAC)   :    return "DAC: Arithmetic coding conditioning(s)"; break;
-    case(E_JPGMARKER_SOI)   :    return "SOI: Start of image"; break;
-    case(E_JPGMARKER_EOI)   :    return "EOI: End of image"; break;
-    case(E_JPGMARKER_SOS)   :    return "SOS: Start of scan"; break;
-    case(E_JPGMARKER_DQT)   :    return "DQT: Quantization table(s)"; break;
-    case(E_JPGMARKER_DNL)   :    return "DNL: Number of lines"; break;
-    case(E_JPGMARKER_DRI)   :    return "DRI: Define restart interval"; break;
-    case(E_JPGMARKER_DHP)   :    return "DHP: Hierarchical progression"; break;
-    case(E_JPGMARKER_EXP)   :    return "EXP: Expand reference component(s)"; break;
-    case(E_JPGMARKER_COM)   :    return "COM: Comment"; break;
-    case(E_JPGMARKER_TEM)   :    return "TEM: For temporary private use in arithmetic coding"; break;
-
-    default:
-      if ((marker >= E_JPGMARKER_RST0) && (marker <= E_JPGMARKER_RST7))    {return "RSTn: Restart interval termination"; break;}
-      if ((marker >= E_JPGMARKER_APP0) && (marker <= E_JPGMARKER_APP15))   {return "APPn: Application segment"; break;}
-      if ((marker >= E_JPGMARKER_JPGN0) && (marker <= E_JPGMARKER_JPGN13)) {return "JPGn: JPEG extension"; break;}
-      if ((marker >= E_JPGMARKER_RES0) && (marker <= E_JPGMARKER_RESN))    {return "RESn"; break;}
-  }
-  OFString msg = "UNKNOWN MARKER :";
-  char hexNo[10];
-  sprintf(hexNo,"%x2", marker);
-  msg += hexNo;
-  return msg;
+    switch (marker)
+    {
+        case (E_JPGMARKER_SOF0):
+            return "SOF0: Baseline DCT";
+            break;
+        case (E_JPGMARKER_SOF1):
+            return "SOF1: Extended sequential DCT";
+            break;
+        case (E_JPGMARKER_SOF2):
+            return "SOF2: Progressive DCT";
+            break;
+        case (E_JPGMARKER_SOF3):
+            return "SOF3: Lossless (sequential)";
+            break;
+        case (E_JPGMARKER_SOF5):
+            return "SOF5: Differential sequential DCT";
+            break;
+        case (E_JPGMARKER_SOF6):
+            return "SOF6: Differential progressive DCT";
+            break;
+        case (E_JPGMARKER_SOF7):
+            return "SOF7: Differential lossless (sequential)";
+            break;
+        case (E_JPGMARKER_JPG):
+            return "JPG: JPEG extension";
+            break;
+        case (E_JPGMARKER_SOF9):
+            return "SOF9: Extended sequential DCT";
+            break;
+        case (E_JPGMARKER_SOF10):
+            return "SOF10: Progressive DCT";
+            break;
+        case (E_JPGMARKER_SOF11):
+            return "SOF11: Lossless (sequential)";
+            break;
+        case (E_JPGMARKER_SOF13):
+            return "SOF13: Differential sequential DCT";
+            break;
+        case (E_JPGMARKER_SOF14):
+            return "SOF14: Differential progressive DCT";
+            break;
+        case (E_JPGMARKER_SOF15):
+            return "SOF15: Differential lossless (sequential)";
+            break;
+        case (E_JPGMARKER_DHT):
+            return "DHT: Huffman table(s)";
+            break;
+        case (E_JPGMARKER_DAC):
+            return "DAC: Arithmetic coding conditioning(s)";
+            break;
+        case (E_JPGMARKER_SOI):
+            return "SOI: Start of image";
+            break;
+        case (E_JPGMARKER_EOI):
+            return "EOI: End of image";
+            break;
+        case (E_JPGMARKER_SOS):
+            return "SOS: Start of scan";
+            break;
+        case (E_JPGMARKER_DQT):
+            return "DQT: Quantization table(s)";
+            break;
+        case (E_JPGMARKER_DNL):
+            return "DNL: Number of lines";
+            break;
+        case (E_JPGMARKER_DRI):
+            return "DRI: Define restart interval";
+            break;
+        case (E_JPGMARKER_DHP):
+            return "DHP: Hierarchical progression";
+            break;
+        case (E_JPGMARKER_EXP):
+            return "EXP: Expand reference component(s)";
+            break;
+        case (E_JPGMARKER_COM):
+            return "COM: Comment";
+            break;
+        case (E_JPGMARKER_TEM):
+            return "TEM: For temporary private use in arithmetic coding";
+            break;
+
+        default:
+            if ((marker >= E_JPGMARKER_RST0) && (marker <= E_JPGMARKER_RST7))
+            {
+                return "RSTn: Restart interval termination";
+                break;
+            }
+            if ((marker >= E_JPGMARKER_APP0) && (marker <= E_JPGMARKER_APP15))
+            {
+                return "APPn: Application segment";
+                break;
+            }
+            if ((marker >= E_JPGMARKER_JPGN0) && (marker <= E_JPGMARKER_JPGN13))
+            {
+                return "JPGn: JPEG extension";
+                break;
+            }
+            if ((marker >= E_JPGMARKER_RES0) && (marker <= E_JPGMARKER_RESN))
+            {
+                return "RESn";
+                break;
+            }
+    }
+    OFString msg = "UNKNOWN MARKER :";
+    char hexNo[10];
+    sprintf(hexNo, "%x2", marker);
+    msg += hexNo;
+    return msg;
 }
 
-
 /* Read one byte, testing for EOF */
 int I2DJpegSource::read1Byte(Uint8& result)
 {
-  int c;
-  c = jpegFile.fgetc();
-  if (c == EOF)
-    return EOF;
-  result = OFstatic_cast(Uint8, c);
-  return 0;
+    int c;
+    c = jpegFile.fgetc();
+    if (c == EOF)
+        return EOF;
+    result = OFstatic_cast(Uint8, c);
+    return 0;
 }
 
-
 /* Read 2 bytes, convert to unsigned int */
 /* All 2-byte quantities in JPEG markers are MSB first */
 int I2DJpegSource::read2Bytes(Uint16& result)
 {
-  int c1, c2;
-  c1 = jpegFile.fgetc();
-  if (c1 == EOF)
-    return EOF;
-  c2 = jpegFile.fgetc();
-  if (c2 == EOF)
-    return EOF;
-  result = OFstatic_cast(Uint16, ((OFstatic_cast(Uint16, c1)) << 8) + OFstatic_cast(Uint16, c2));
-  return 0;
+    int c1, c2;
+    c1 = jpegFile.fgetc();
+    if (c1 == EOF)
+        return EOF;
+    c2 = jpegFile.fgetc();
+    if (c2 == EOF)
+        return EOF;
+    result = OFstatic_cast(Uint16, ((OFstatic_cast(Uint16, c1)) << 8) + OFstatic_cast(Uint16, c2));
+    return 0;
 }
 
-
-
 /*
  * Find the next JPEG marker and return its marker code.
  * We expect at least one FF byte, possibly more if the compressor used FFs
@@ -738,45 +735,46 @@ int I2DJpegSource::read2Bytes(Uint16& result)
  * garbage is unspecified; we choose to skip over it but emit a warning msg.
  */
 
-OFCondition I2DJpegSource::nextMarker(const OFBool& lastWasSOSMarker,
-                                      E_JPGMARKER& result)
+OFCondition I2DJpegSource::nextMarker(const OFBool& lastWasSOSMarker, E_JPGMARKER& result)
 {
-  Uint8 c;
-  int discarded_bytes = 0;
-  int oneByte;
+    Uint8 c;
+    int discarded_bytes = 0;
+    int oneByte;
+
+    do
+    {
+        /* Find 0xFF byte; count and skip any non-FFs. */
+        oneByte = read1Byte(c);
+        if (oneByte == EOF)
+            return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
 
-  do {
-    /* Find 0xFF byte; count and skip any non-FFs. */
-    oneByte = read1Byte(c);
-    if (oneByte == EOF)
-      return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+        while (c != 0xFF)
+        {
+            if (!lastWasSOSMarker)
+                discarded_bytes++;
+            oneByte = read1Byte(c);
+            if (oneByte == EOF)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+        }
+        /* Get marker code byte, swallowing any duplicate FF bytes.  Extra FFs
+         * are legal as pad bytes, so don't count them in discarded_bytes.
+         */
+        do
+        {
+            oneByte = read1Byte(c);
+            if (oneByte == EOF)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+        } while (c == 0xFF);
+    } while (lastWasSOSMarker && c == 0x00);
 
-    while (c != 0xFF)
+    if (discarded_bytes != 0)
     {
-      if (!lastWasSOSMarker)
-        discarded_bytes++;
-      oneByte = read1Byte(c);
-      if (oneByte == EOF)
-        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+        DCMDATA_LIBI2D_WARN("garbage data found in JPEG file");
     }
-    /* Get marker code byte, swallowing any duplicate FF bytes.  Extra FFs
-     * are legal as pad bytes, so don't count them in discarded_bytes.
-     */
-    do {
-      oneByte = read1Byte(c);
-      if (oneByte == EOF)
-        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-    } while (c == 0xFF);
-  } while (lastWasSOSMarker && c == 0x00);
-
-  if (discarded_bytes != 0) {
-    DCMDATA_LIBI2D_WARN("garbage data found in JPEG file");
-  }
-  result = OFstatic_cast(E_JPGMARKER, c);
-  return EC_Normal;
+    result = OFstatic_cast(E_JPGMARKER, c);
+    return EC_Normal;
 }
 
-
 /*
  * Read the initial marker, which should be SOI.
  * For a JFIF file, the first two bytes of the file should be literally
@@ -785,15 +783,16 @@ OFCondition I2DJpegSource::nextMarker(const OFBool& lastWasSOSMarker,
 
 OFCondition I2DJpegSource::firstMarker(E_JPGMARKER& result)
 {
-  Uint8 c1, c2;
-
-  c1 = OFstatic_cast(Uint8, jpegFile.fgetc());
-  c2 = OFstatic_cast(Uint8, jpegFile.fgetc());
-  if (c1 != 0xFF || c2 != E_JPGMARKER_SOI) {
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Not a JPEG file");
-  }
-  result = OFstatic_cast(E_JPGMARKER, c2);
-  return EC_Normal;
+    Uint8 c1, c2;
+
+    c1 = OFstatic_cast(Uint8, jpegFile.fgetc());
+    c2 = OFstatic_cast(Uint8, jpegFile.fgetc());
+    if (c1 != 0xFF || c2 != E_JPGMARKER_SOI)
+    {
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Not a JPEG file");
+    }
+    result = OFstatic_cast(E_JPGMARKER, c2);
+    return EC_Normal;
 }
 
 /*
@@ -808,112 +807,118 @@ OFCondition I2DJpegSource::firstMarker(E_JPGMARKER& result)
 OFCondition I2DJpegSource::skipVariable()
 /* Skip over an unknown or uninteresting variable-length marker */
 {
-  Uint16 length;
-
-  /* Get the marker parameter length count */
-  int result = read2Bytes(length);
-  if (result == EOF)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
-  /* Length includes itself, so must be at least 2 */
-  if (length < 2)
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "Erroneous JPEG marker length");
-  length = OFstatic_cast(Uint16, length - 2);
-  /* Skip over the remaining bytes */
-  jpegFile.fseek(length, SEEK_CUR);
-  return EC_Normal;
-}
+    Uint16 length;
 
+    /* Get the marker parameter length count */
+    int result = read2Bytes(length);
+    if (result == EOF)
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+    /* Length includes itself, so must be at least 2 */
+    if (length < 2)
+        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Erroneous JPEG marker length");
+    length = OFstatic_cast(Uint16, length - 2);
+    /* Skip over the remaining bytes */
+    jpegFile.fseek(length, SEEK_CUR);
+    return EC_Normal;
+}
 
 OFCondition I2DJpegSource::isJPEGEncodingSupported(const E_JPGMARKER& jpegEncoding) const
 {
-  OFCondition result;
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Checking whether JPEG encoding is supported");
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Encoding: " << jpegMarkerToString(jpegEncoding));
-  switch (jpegEncoding)
-  {
-    case E_JPGMARKER_SOF0: // Baseline
-      result = EC_Normal;
-      break;
-    case E_JPGMARKER_SOF1: // Extended sequential
-      if (!m_disableExtSeqTs)
-        result = EC_Normal;
-      else
-        result = makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to convert: Extended sequential JPEG coding found but support disabled");
-      break;
-    case E_JPGMARKER_SOF2: // Progressive
-      if (!m_disableProgrTs)
-        result = EC_Normal;
-      else
-        result = makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to convert: Progressive JPEG coding found but disabled");
-      break;
-    // SOF3: Lossless, SOF5-7: Hierarchical (differential), SOF9-15: Arithmetic coding, all other
-    default:
-      OFString errMsg("JPEG data with encoding: '");
-      errMsg += jpegMarkerToString(jpegEncoding);
-      errMsg += "' not supported";
-      result = makeOFCondition(OFM_dcmdata, 18, OF_error, errMsg.c_str());
-  }
-  return result;
+    OFCondition result;
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Checking whether JPEG encoding is supported");
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Encoding: " << jpegMarkerToString(jpegEncoding));
+    switch (jpegEncoding)
+    {
+        case E_JPGMARKER_SOF0: // Baseline
+            result = EC_Normal;
+            break;
+        case E_JPGMARKER_SOF1: // Extended sequential
+            if (!m_disableExtSeqTs)
+                result = EC_Normal;
+            else
+                result
+                    = makeOFCondition(OFM_dcmdata,
+                                      18,
+                                      OF_error,
+                                      "Unable to convert: Extended sequential JPEG coding found but support disabled");
+            break;
+        case E_JPGMARKER_SOF2: // Progressive
+            if (!m_disableProgrTs)
+                result = EC_Normal;
+            else
+                result = makeOFCondition(
+                    OFM_dcmdata, 18, OF_error, "Unable to convert: Progressive JPEG coding found but disabled");
+            break;
+        // SOF3: Lossless, SOF5-7: Hierarchical (differential), SOF9-15: Arithmetic coding, all other
+        default:
+            OFString errMsg("JPEG data with encoding: '");
+            errMsg += jpegMarkerToString(jpegEncoding);
+            errMsg += "' not supported";
+            result = makeOFCondition(OFM_dcmdata, 18, OF_error, errMsg.c_str());
+    }
+    return result;
 }
 
-
 E_TransferSyntax I2DJpegSource::associatedTS(const E_JPGMARKER& jpegEncoding)
 {
-  switch (jpegEncoding)
-  {
-    case E_JPGMARKER_SOF0: // Baseline
-      return EXS_JPEGProcess1;
-    case E_JPGMARKER_SOF1: // Extended Sequential
-      return EXS_JPEGProcess2_4;
-    case E_JPGMARKER_SOF2: // Progressive
-      return EXS_JPEGProcess10_12;
-    default:
-      return EXS_Unknown;
-  }
+    switch (jpegEncoding)
+    {
+        case E_JPGMARKER_SOF0: // Baseline
+            return EXS_JPEGProcess1;
+        case E_JPGMARKER_SOF1: // Extended Sequential
+            return EXS_JPEGProcess2_4;
+        case E_JPGMARKER_SOF2: // Progressive
+            return EXS_JPEGProcess10_12;
+        default:
+            return EXS_Unknown;
+    }
 }
 
-
 void I2DJpegSource::debugDumpJPEGFileMap() const
 {
-  if (!DCM_dcmdataLibi2dLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
-    return;
-
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Dumping JPEG marker file map:");
-  if (m_keepAPPn)
-    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Keep APPn option enabled, any markers after SOFn marker will not be dumped");
-  OFListConstIterator(JPEGFileMapEntry*) it= m_jpegFileMap.begin();
-  while (it != m_jpegFileMap.end())
-  {
-    DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Byte Position: 0x"
-        << STD_NAMESPACE hex << STD_NAMESPACE setw(8) << STD_NAMESPACE setfill('0')
-        /* need to cast bytePos to unsigned long to keep VC6 happy */
-        << OFstatic_cast(unsigned long, (*it)->bytePos) <<" | Marker: " << jpegMarkerToString( (*it)->marker));
-    it++;
-  }
+    if (!DCM_dcmdataLibi2dLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
+        return;
+
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Dumping JPEG marker file map:");
+    if (m_keepAPPn)
+        DCMDATA_LIBI2D_DEBUG(
+            "I2DJpegSource: Keep APPn option enabled, any markers after SOFn marker will not be dumped");
+    OFListConstIterator(JPEGFileMapEntry*) it = m_jpegFileMap.begin();
+    while (it != m_jpegFileMap.end())
+    {
+        DCMDATA_LIBI2D_DEBUG("I2DJpegSource:   Byte Position: 0x"
+                             << STD_NAMESPACE hex << STD_NAMESPACE setw(8)
+                             << STD_NAMESPACE setfill('0')
+                             /* need to cast bytePos to unsigned long to keep VC6 happy */
+                             << OFstatic_cast(unsigned long, (*it)->bytePos)
+                             << " | Marker: " << jpegMarkerToString((*it)->marker));
+        it++;
+    }
 }
 
 void I2DJpegSource::clearMap()
 {
-  // free memory of each map entry and remove them all from list
-  JPEGFileMapEntry *entry = NULL;
-  while (m_jpegFileMap.size() != 0)
-  {
-    entry = m_jpegFileMap.front();
-    m_jpegFileMap.pop_front();
-    delete entry; entry = NULL;
-  }
+    // free memory of each map entry and remove them all from list
+    JPEGFileMapEntry* entry = NULL;
+    while (m_jpegFileMap.size() != 0)
+    {
+        entry = m_jpegFileMap.front();
+        m_jpegFileMap.pop_front();
+        delete entry;
+        entry = NULL;
+    }
 }
 
 // closes underlying JPEG file
 void I2DJpegSource::closeFile()
 {
-  jpegFile.fclose();
+    jpegFile.fclose();
 }
 
 // close file and free dynamically allocated memory
 I2DJpegSource::~I2DJpegSource()
 {
-  DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Closing JPEG file and cleaning up memory");
-  closeFile();
-  clearMap();
+    DCMDATA_LIBI2D_DEBUG("I2DJpegSource: Closing JPEG file and cleaning up memory");
+    closeFile();
+    clearMap();
 }
diff --git a/dcmdata/libi2d/i2doutpl.cc b/dcmdata/libi2d/i2doutpl.cc
new file mode 100644 (file)
index 0000000..b5aed0f
--- /dev/null
@@ -0,0 +1,219 @@
+/*
+ *
+ *  Copyright (C) 2001-2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Base class for converter from image file to DICOM
+ *
+ */
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+#include "dcmtk/dcmdata/libi2d/i2doutpl.h"
+#include "dcmtk/dcmdata/dcdatset.h"
+#include "dcmtk/dcmdata/dcelem.h"
+#include "dcmtk/dcmdata/dcdeftag.h"
+
+I2DOutputPlug::I2DOutputPlug()
+: m_doAttribChecking(OFTrue)
+, m_inventMissingType2Attribs(OFTrue)
+, m_inventMissingType1Attribs(OFTrue)
+{
+}
+
+
+I2DOutputPlug::~I2DOutputPlug()
+{
+}
+
+
+void I2DOutputPlug::setValidityChecking(
+  OFBool doChecks,
+  OFBool insertMissingType2,
+  OFBool inventMissingType1)
+{
+  m_doAttribChecking = doChecks;
+  m_inventMissingType2Attribs = insertMissingType2;
+  m_inventMissingType1Attribs = inventMissingType1;
+}
+
+OFString I2DOutputPlug::checkType1Attrib(
+  const DcmTagKey& key,
+  DcmDataset* targetDset) const
+{
+  OFString err;
+  if (targetDset->tagExists(key))
+  {
+    DcmElement *elem = NULL;
+    if (targetDset->findAndGetElement(key, elem).bad() || !elem || (elem->getLength() == 0))
+    {
+      err = "I2DOutputPlug: Empty value for type 1 attribute: ";
+      err += DcmTag(key).getTagName();
+      err += "\n";
+    }
+  }
+  else
+  {
+    err = "I2DOutputPlug: Missing type 1 attribute: ";
+    err += DcmTag(key).getTagName();
+    err += "\n";
+  }
+  return err;
+}
+
+OFString I2DOutputPlug::checkAndInventType1Attrib(
+  const DcmTagKey& key,
+  DcmDataset* targetDset,
+  const OFString& defaultValue) const
+{
+  OFBool exists = targetDset->tagExists(key);
+  if (!exists && !m_inventMissingType1Attribs)
+  {
+    OFString err = "I2DOutputPlug: Missing type 1 attribute: "; err += DcmTag(key).getTagName(); err += "\n";
+    return err;
+  }
+  DcmElement *elem;
+  OFCondition cond = targetDset->findAndGetElement(key, elem);
+  if (cond.bad() || !elem || (elem->getLength() == 0))
+  {
+    if (!m_inventMissingType1Attribs)
+    {
+      OFString err;
+      err += "I2DOutputPlug: Empty value for type 1 attribute: ";
+      err += DcmTag(key).getTagName();
+      err += "\n";
+      return err;
+    }
+    //holds element to insert in item
+    elem = NULL;
+    DcmTag tag(key); OFBool wasError = OFFalse;
+    //if dicom element could be created, insert in to item and modify to value
+    if ( DcmItem::newDicomElement(elem, tag).good())
+    {
+        if (targetDset->insert(elem, OFTrue).good())
+        {
+          if (elem->putString(defaultValue.c_str()).good())
+          {
+            DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 1 attribute: " << tag.getTagName() << " with value '" << defaultValue << "'");
+          } else wasError = OFTrue;
+        } else wasError = OFTrue;
+    } else wasError = OFTrue;
+    if (wasError)
+    {
+      OFString err = "Unable to insert type 1 attribute ";
+      err += tag.getTagName(); err += " with value '"; err += defaultValue; err += "'\n";
+      return err;
+    }
+  }
+  return "";
+};
+
+
+OFString I2DOutputPlug::checkAndInventType1CodeSQ(
+    const DcmTagKey& key,
+    DcmDataset* targetDset,
+    const OFString& codeValue,
+    const OFString& codeMeaning,
+    const OFString& codingSchemeDesignator) const
+{
+  OFString err;
+  if (! targetDset->tagExists(key) && ! m_inventMissingType1Attribs)
+  {
+    err = "I2DOutputPlug: Missing type 1 code sequence attribute: "; err += DcmTag(key).getTagName(); err += "\n";
+    return err;
+  }
+
+  if (m_inventMissingType1Attribs)
+  {
+    DcmTag tag(key);
+    DcmItem *ditem = NULL;
+    OFCondition cond = targetDset->findOrCreateSequenceItem(key, ditem, 0);
+    if (cond.good() || ditem )
+    {
+      // add these attributes to the given sequence item only if they are not present already
+      if (cond.good() && (! ditem->tagExists(DCM_CodeValue)))
+      {
+        DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 1 attribute: " << DcmTag(DCM_CodeValue).getTagName() << " with value '" << codeValue << "' into " << tag.getTagName());
+        cond = ditem->putAndInsertOFStringArray(DCM_CodeValue, codeValue, OFFalse);
+      }
+
+      if (cond.good() && (! ditem->tagExists(DCM_CodeMeaning)))
+      {
+        DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 1 attribute: " << DcmTag(DCM_CodeMeaning).getTagName() << " with value '" << codeMeaning << "' into " << tag.getTagName());
+        cond = ditem->putAndInsertOFStringArray(DCM_CodeMeaning, codeMeaning, OFFalse);
+      }
+
+      if (cond.good() && (! ditem->tagExists(DCM_CodingSchemeDesignator)))
+      {
+        DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 1 attribute: " << DcmTag(DCM_CodingSchemeDesignator).getTagName() << " with value '" << codingSchemeDesignator << "' into " << tag.getTagName());
+        cond = ditem->putAndInsertOFStringArray(DCM_CodingSchemeDesignator, codingSchemeDesignator, OFFalse);
+      }
+
+      if (cond.bad())
+      {
+        err = "Unable to insert type 1 code sequence attribute ";
+        err += tag.getTagName(); err += " with value ("; err += codeValue; err += ", "; err += codeMeaning; err += ", "; err += codingSchemeDesignator; err += ")\n";
+      }
+    }
+  }
+
+  return err;
+}
+
+
+OFString I2DOutputPlug::checkAndInventType2Attrib(
+  const DcmTagKey& key,
+  DcmDataset* targetDset,
+  const OFString& defaultValue) const
+{
+  OFString err;
+  OFBool exists = targetDset->tagExists(key);
+  if (!exists)
+  {
+    if (m_inventMissingType2Attribs)
+    {
+      //holds element to insert in item
+      DcmElement *elem = NULL;
+      DcmTag tag(key); OFBool wasError = OFFalse;
+      //if dicom element could be created, insert in to item and modify to value
+      if ( DcmItem::newDicomElement(elem, tag).good())
+      {
+        if (targetDset->insert(elem, OFTrue).good())
+        {
+          OFCondition result;
+          if (!defaultValue.empty()) // only insert value if not empty(e. g. empty type 2 sequences)
+          {
+            result = elem->putString(defaultValue.c_str());
+          }
+          if (result.good())
+          {
+            DCMDATA_LIBI2D_DEBUG("I2DOutputPlug: Inserting missing type 2 attribute: " << tag.getTagName() << " with value '" << (defaultValue.empty() ? "<empty>" : defaultValue) << "'");
+          } else wasError = OFTrue;
+        } else wasError = OFTrue;
+      } else wasError = OFTrue;
+      if (wasError)
+      {
+        err += "Unable to insert type 2 attribute "; err += tag.getTagName(); err += " with value '"; err += defaultValue; err += "'\n";
+      }
+    }
+    else
+    {
+      err = "Image2Dcm: Missing type 2 attribute: "; err += DcmTag(key).getTagName(); err += "\n";
+      return err;
+    }
+  }
+  return err;
+};
+
index 72bb0f7e1c7355a34a01c0877b76c6f6c2177615..183048e8880112e3d9b08c6fbb201847036edec9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2010, OFFIS e.V.
+ *  Copyright (C) 2001-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,6 +25,7 @@
 #include "dcmtk/dcmdata/dcdeftag.h"        /* for DCM_ defines */
 #include "dcmtk/dcmdata/dcuid.h"           /* for UID_ defines */
 #include "dcmtk/dcmdata/libi2d/i2doutpl.h"
+#include "dcmtk/dcmdata/dcdatset.h"
 
 
 I2DOutputPlugNewSC::I2DOutputPlugNewSC()
@@ -33,6 +34,11 @@ I2DOutputPlugNewSC::I2DOutputPlugNewSC()
 }
 
 
+I2DOutputPlugNewSC::~I2DOutputPlugNewSC()
+{
+}
+
+
 OFString I2DOutputPlugNewSC::ident()
 {
   return "New Secondary Capture Image SOP Classes";
@@ -48,7 +54,6 @@ void I2DOutputPlugNewSC::supportedSOPClassUIDs(OFList<OFString>& suppSOPs)
 }
 
 
-
 OFCondition I2DOutputPlugNewSC::convert(DcmDataset &dataset) const
 {
   DCMDATA_LIBI2D_DEBUG("I2DOutputPlugNewSC: Inserting new Multiframe SC specific attributes");
@@ -69,10 +74,10 @@ OFCondition I2DOutputPlugNewSC::convert(DcmDataset &dataset) const
   else
     cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Bits Allocated needs a value of 1, 8 or 16 for conversion");
 
-  cond = insertMultiFrameAttribs(&dataset);
   return cond;
 }
 
+
 OFString I2DOutputPlugNewSC::isValid(DcmDataset& dataset) const
 {
   OFString err;
@@ -90,17 +95,6 @@ OFString I2DOutputPlugNewSC::isValid(DcmDataset& dataset) const
 }
 
 
-OFCondition I2DOutputPlugNewSC::insertMultiFrameAttribs(DcmDataset* targetDataset) const
-{
-  if (!targetDataset)
-    return EC_IllegalParameter;
-
-  // We only support 1 image Multi-frames so far
-  return targetDataset->putAndInsertOFStringArray(DCM_NumberOfFrames, "1");
-  // Frame Increment pointer is set later in the more specific SC Multi-frame Image context
-}
-
-
 OFCondition I2DOutputPlugNewSC::handle1BitSC(DcmDataset *dataset) const
 {
   if (!dataset)
@@ -109,7 +103,7 @@ OFCondition I2DOutputPlugNewSC::handle1BitSC(DcmDataset *dataset) const
   OFCondition cond; Uint16 u16 = 0; OFString str;
   cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str);
   if (cond.bad() || (str != "MONOCHROME2"))
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric interpretation does not fit SOP class");
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric Interpretation does not fit SOP class");
 
   cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16);
   if (cond.bad() || (u16 != 1))
@@ -140,7 +134,7 @@ OFCondition I2DOutputPlugNewSC::handle8BitSC(DcmDataset *dataset) const
   OFCondition cond; Uint16 u16 = 0; OFString str;
   cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str);
   if (cond.bad())
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric interpretation not set for Pixel Data");
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric Interpretation not set for Pixel Data");
   if (str == "MONOCHROME2") // Mult-Frame Grayscale Byte SC Image
   {
     cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16);
@@ -158,8 +152,10 @@ OFCondition I2DOutputPlugNewSC::handle8BitSC(DcmDataset *dataset) const
     cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16);
     if (cond.bad() || (u16 != 0))
       return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Pixel Representation does not fit SOP class");
+
     // For MONOCHROME2 and Bits Stored > 1, rescale slope/intercept/type have to be inserted
-    cond = insertSCMultiFrameAttribs(dataset);
+    cond = insertMonochromeAttribs(dataset);
+
     // Insert SOP Class UID
     if (cond.good())
       cond = dataset->putAndInsertOFStringArray(DCM_SOPClassUID, UID_MultiframeGrayscaleByteSecondaryCaptureImageStorage);
@@ -193,7 +189,7 @@ OFCondition I2DOutputPlugNewSC::handle8BitSC(DcmDataset *dataset) const
       cond = dataset->putAndInsertOFStringArray(DCM_SOPClassUID, UID_MultiframeTrueColorSecondaryCaptureImageStorage);
   }
   else
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric interpretation does not fit SOP class");
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric Interpretation does not fit SOP class");
 
   return cond;
 }
@@ -207,7 +203,7 @@ OFCondition I2DOutputPlugNewSC::handle16BitSC(DcmDataset *dataset) const
   OFCondition cond; Uint16 u16 = 0; OFString str;
   cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str);
   if (cond.bad() || (str != "MONOCHROME2"))
-    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric interpretation does not fit SOP class");
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric Interpretation does not fit SOP class");
 
   cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16);
   if (cond.bad() || (u16 != 1))
@@ -228,14 +224,16 @@ OFCondition I2DOutputPlugNewSC::handle16BitSC(DcmDataset *dataset) const
 
   // Insert SOP Class UID
   cond = dataset->putAndInsertOFStringArray(DCM_SOPClassUID, UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage);
+
   // For MONOCHROME2 and Bits Stored > 1, rescale slope/intercept/type have to be inserted
   if (cond.good())
-    cond = insertSCMultiFrameAttribs(dataset);
+    cond = insertMonochromeAttribs(dataset);
+
   return cond;
 }
 
 
-OFCondition I2DOutputPlugNewSC::insertSCMultiFrameAttribs(DcmDataset *targetDataset) const
+OFCondition I2DOutputPlugNewSC::insertMonochromeAttribs(DcmDataset *targetDataset) const
 {
   OFCondition cond;
   // Rescale Intercept, set to 0 (constant enumerated value)
@@ -255,6 +253,36 @@ OFCondition I2DOutputPlugNewSC::insertSCMultiFrameAttribs(DcmDataset *targetData
 }
 
 
-I2DOutputPlugNewSC::~I2DOutputPlugNewSC()
+OFBool I2DOutputPlugNewSC::supportsMultiframe() const
+{
+  return OFTrue;
+}
+
+
+OFCondition I2DOutputPlugNewSC::insertMultiFrameAttributes(
+  DcmDataset* targetDataset,
+  size_t numberOfFrames) const
 {
+  if ((!targetDataset) || (numberOfFrames == 0))
+    return EC_IllegalParameter;
+
+  // Note: Instead of FrameTime and FrameTimeVector, Multiframe Secondary Capture
+  // also supports (0018,2001) PageNumberVector as an attribute to which the FrameIncrementPointer
+  // may point. This might be useful for single-bit images, which are most likely scanned documents.
+  // Currently we always generate a FrameTime.
+
+  char numFrames[30];
+  OFStandard::snprintf(numFrames, 30, "%lu", numberOfFrames);
+  OFCondition cond = targetDataset->putAndInsertOFStringArray(DCM_NumberOfFrames, numFrames);
+
+  // Secondary Capture permits FrameTime and FrameIncrementPointer only when multiple frames are present.
+  if (numberOfFrames > 1)
+  {
+    char frameTime[30];
+    size_t fTime = (numberOfFrames > 1) ? DCMTK_I2D_Default_Frame_Time : 0;
+    OFStandard::snprintf(frameTime, 30, "%lu", fTime);
+    if (cond.good()) cond = targetDataset->putAndInsertOFStringArray(DCM_FrameTime, frameTime);
+    if (cond.good()) cond = targetDataset->putAndInsertTagKey(DCM_FrameIncrementPointer, DCM_FrameTime);
+  }
+  return cond;
 }
diff --git a/dcmdata/libi2d/i2dplop.cc b/dcmdata/libi2d/i2dplop.cc
new file mode 100644 (file)
index 0000000..3ba7bf5
--- /dev/null
@@ -0,0 +1,297 @@
+/*
+ *
+ *  Copyright (C) 2001-2022, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Implements conversion from image into Ophthalmic Photography IODs
+ *
+ */
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+#include "dcmtk/dcmdata/libi2d/i2dplop.h"
+#include "dcmtk/dcmdata/dcdeftag.h"        /* for DCM_ defines */
+#include "dcmtk/dcmdata/dcuid.h"           /* for UID_ defines */
+#include "dcmtk/ofstd/ofdatime.h"          /* for OFDateTime */
+#include "dcmtk/dcmdata/dcdatset.h"
+
+
+I2DOutputPlugOphthalmicPhotography::I2DOutputPlugOphthalmicPhotography()
+{
+  DCMDATA_LIBI2D_DEBUG("I2DOutputPlugOphthalmicPhotography: Output plugin for Ophthalmic Photography IODs initialized");
+}
+
+
+I2DOutputPlugOphthalmicPhotography::~I2DOutputPlugOphthalmicPhotography()
+{
+}
+
+
+OFString I2DOutputPlugOphthalmicPhotography::ident()
+{
+  return "Ophthalmic Photography SOP Classes";
+}
+
+
+void I2DOutputPlugOphthalmicPhotography::supportedSOPClassUIDs(OFList<OFString>& suppSOPs)
+{
+  suppSOPs.push_back(UID_OphthalmicPhotography8BitImageStorage);
+  suppSOPs.push_back(UID_OphthalmicPhotography16BitImageStorage);
+}
+
+
+OFCondition I2DOutputPlugOphthalmicPhotography::convert(DcmDataset &dataset) const
+{
+  DCMDATA_LIBI2D_DEBUG("I2DOutputPlugOphthalmicPhotography: Inserting Ophthalmic Photography specific attributes");
+
+  // Find out which of the Ophthalmic Photography SOP Classes to use
+  Uint16 bitsAllocated;
+  OFCondition cond = dataset.findAndGetUint16(DCM_BitsAllocated, bitsAllocated);
+  if (cond.bad())
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Unable to determine correct SOP class due to missing Image Pixel module information");
+
+  if (bitsAllocated == 8)
+    cond = handle8BitImage(&dataset);
+  else if (bitsAllocated == 16)
+    cond = handle16BitImage(&dataset);
+  else
+    cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Bits Allocated needs a value of 8 or 16 for conversion");
+
+  return cond;
+}
+
+
+OFString I2DOutputPlugOphthalmicPhotography::isValid(DcmDataset& dataset) const
+{
+  OFString err;
+  // Just return if checking was disabled
+  if (!m_doAttribChecking)
+    return err;
+
+  DCMDATA_LIBI2D_DEBUG("I2DOutputPlugOphthalmicPhotography: Checking Ophthalmic Photography specific attributes");
+
+  // compute defaults for some type 1 attributes
+  char newUID[70];
+  dcmGenerateUniqueIdentifier(newUID);
+  OFDateTime now = OFDateTime::getCurrentDateTime();
+  OFString contentDate;
+  OFString contentTime;
+  OFString acquisitionDateTime;
+  now.getDate().getISOFormattedDate(contentDate, OFFalse);
+  now.getTime().getISOFormattedTime(contentTime, OFFalse, OFFalse, OFFalse, OFFalse);
+  now.getISOFormattedDateTime(acquisitionDateTime, OFFalse, OFFalse, OFFalse, OFFalse);
+
+  // check and, if necessary, "invent" type 1 attributes
+  err += checkAndInventType1Attrib(DCM_Modality, &dataset, "OP");
+  err += checkAndInventType1Attrib(DCM_SynchronizationTrigger, &dataset, "NO TRIGGER");
+  err += checkAndInventType1Attrib(DCM_AcquisitionTimeSynchronized, &dataset, "N");
+  err += checkAndInventType1Attrib(DCM_InstanceNumber, &dataset, "1");
+  err += checkAndInventType1Attrib(DCM_ImageType, &dataset, "ORIGINAL\\PRIMARY");
+  err += checkAndInventType1Attrib(DCM_SynchronizationFrameOfReferenceUID, &dataset, newUID);
+  err += checkAndInventType1Attrib(DCM_ContentDate, &dataset, contentDate.c_str());
+  err += checkAndInventType1Attrib(DCM_ContentTime, &dataset, contentTime.c_str());
+  err += checkAndInventType1Attrib(DCM_AcquisitionDateTime, &dataset, acquisitionDateTime.c_str());
+  err += checkAndInventType1Attrib(DCM_BurnedInAnnotation, &dataset, "NO");
+  err += checkAndInventType1CodeSQ(DCM_AnatomicRegionSequence, &dataset, "Eye", "81745001", "SCT");
+
+  // check type 1 attributes that we cannot "invent"
+  err += checkType1Attrib(DCM_ImageLaterality, &dataset);
+  err += checkType1Attrib(DCM_AcquisitionDeviceTypeCodeSequence, &dataset);
+
+  // check and, if necessary, add type 2 attributes
+  err += checkAndInventType2Attrib(DCM_Manufacturer, &dataset);
+  err += checkAndInventType2Attrib(DCM_PatientEyeMovementCommanded, &dataset);
+  err += checkAndInventType2Attrib(DCM_HorizontalFieldOfView, &dataset);
+  err += checkAndInventType2Attrib(DCM_RefractiveStateSequence, &dataset);
+  err += checkAndInventType2Attrib(DCM_EmmetropicMagnification, &dataset);
+  err += checkAndInventType2Attrib(DCM_IntraOcularPressure, &dataset);
+  err += checkAndInventType2Attrib(DCM_PupilDilated, &dataset);
+  err += checkAndInventType2Attrib(DCM_IlluminationTypeCodeSequence, &dataset);
+  err += checkAndInventType2Attrib(DCM_LightPathFilterTypeStackCodeSequence, &dataset);
+  err += checkAndInventType2Attrib(DCM_ImagePathFilterTypeStackCodeSequence, &dataset);
+  err += checkAndInventType2Attrib(DCM_LensesCodeSequence, &dataset);
+  err += checkAndInventType2Attrib(DCM_DetectorType, &dataset);
+
+  return err;
+}
+
+
+OFCondition I2DOutputPlugOphthalmicPhotography::handle8BitImage(DcmDataset *dataset) const
+{
+  if (!dataset)
+    return EC_IllegalParameter;
+
+  OFCondition cond; Uint16 u16 = 0; OFString str;
+  cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str);
+  if (cond.bad())
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Photometric Interpretation not set for Pixel Data");
+
+  if (str == "MONOCHROME2")
+  {
+    cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16);
+    if (cond.bad() || (u16 != 1))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Samples Per Pixel does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_BitsStored, u16);
+    if (cond.bad() || (u16 != 8))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Bits Stored does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_HighBit, u16);
+    if (cond.bad() || (u16 != 7))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: High Bit does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16);
+    if (cond.bad() || (u16 != 0))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Pixel Representation does not fit SOP class");
+
+    // Insert Presentation LUT Shape
+    if (cond.good())
+      cond = dataset->putAndInsertString(DCM_PresentationLUTShape, "IDENTITY");
+
+  }
+  else if ((str == "YBR_FULL_422") || (str == "RGB"))
+  {
+    cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16);
+    if (cond.bad() || (u16 != 3))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Samples Per Pixel does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_BitsStored, u16);
+    if (cond.bad() || (u16 != 8))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Bits Stored does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_HighBit, u16);
+    if (cond.bad() || (u16 != 7))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: High Bit does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16);
+    if (cond.bad() || (u16 != 0))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Pixel Representation does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_PlanarConfiguration, u16);
+    if (cond.bad() || (u16 != 0))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Planar Configuration does not fit SOP class");
+  }
+  else
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Photometric Interpretation does not fit SOP class");
+
+  // Insert SOP Class UID
+  if (cond.good())
+    cond = dataset->putAndInsertString(DCM_SOPClassUID, UID_OphthalmicPhotography8BitImageStorage);
+
+  // Lossy Image Compression is Type 1 for this SOP Class. If it is not yet present (i.e. the image was
+  // not converted from a lossy input format such as JPEG), mark it as not lossy compressed.
+  if (cond.good() && (! dataset->tagExists(DCM_LossyImageCompression)))
+  {
+    cond = dataset->putAndInsertString(DCM_LossyImageCompression, "00");
+  }
+
+  return cond;
+}
+
+
+OFCondition I2DOutputPlugOphthalmicPhotography::handle16BitImage(DcmDataset *dataset) const
+{
+  if (!dataset)
+    return EC_IllegalParameter;
+
+  OFCondition cond; Uint16 u16 = 0; OFString str;
+  cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str);
+  if (cond.bad())
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Photometric Interpretation not set for Pixel Data");
+  if (str == "MONOCHROME2")
+  {
+    cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16);
+    if (cond.bad() || (u16 != 1))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Samples Per Pixel does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_BitsStored, u16);
+    if (cond.bad() || (u16 != 16))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Bits Stored does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_HighBit, u16);
+    if (cond.bad() || (u16 != 15))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: High Bit does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16);
+    if (cond.bad() || (u16 != 0))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Pixel Representation does not fit SOP class");
+
+    // Insert Presentation LUT Shape
+    if (cond.good())
+      cond = dataset->putAndInsertString(DCM_PresentationLUTShape, "IDENTITY");
+  }
+  else if ((str == "YBR_FULL_422") || (str == "RGB"))
+  {
+    cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16);
+    if (cond.bad() || (u16 != 3))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Samples Per Pixel does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_BitsStored, u16);
+    if (cond.bad() || (u16 != 16))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Bits Stored does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_HighBit, u16);
+    if (cond.bad() || (u16 != 15))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: High Bit does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16);
+    if (cond.bad() || (u16 != 0))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Pixel Representation does not fit SOP class");
+
+    cond = dataset->findAndGetUint16(DCM_PlanarConfiguration, u16);
+    if (cond.bad() || (u16 != 0))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Planar Configuration does not fit SOP class");
+  }
+  else
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugOphthalmicPhotography: Photometric Interpretation does not fit SOP class");
+
+  // Insert SOP Class UID
+  if (cond.good())
+    cond = dataset->putAndInsertString(DCM_SOPClassUID, UID_OphthalmicPhotography16BitImageStorage);
+
+  // Lossy Image Compression is Type 1 for this SOP Class. If it is not yet present (i.e. the image was
+  // not converted from a lossy input format such as JPEG), mark it as not lossy compressed.
+  if (cond.good() && (! dataset->tagExists(DCM_LossyImageCompression)))
+  {
+    cond = dataset->putAndInsertString(DCM_LossyImageCompression, "00");
+  }
+
+  return cond;
+}
+
+
+OFBool I2DOutputPlugOphthalmicPhotography::supportsMultiframe() const
+{
+  return OFTrue;
+}
+
+
+OFCondition I2DOutputPlugOphthalmicPhotography::insertMultiFrameAttributes(
+  DcmDataset* targetDataset,
+  size_t numberOfFrames) const
+{
+  if ((!targetDataset) || (numberOfFrames == 0))
+    return EC_IllegalParameter;
+
+  char numFrames[30];
+  char frameTime[30];
+  size_t fTime = (numberOfFrames > 1) ? DCMTK_I2D_Default_Frame_Time : 0;
+  OFStandard::snprintf(numFrames, 30, "%lu", numberOfFrames);
+  OFStandard::snprintf(frameTime, 30, "%lu", fTime);
+  OFCondition cond = targetDataset->putAndInsertOFStringArray(DCM_NumberOfFrames, numFrames);
+  if (cond.good()) cond = targetDataset->putAndInsertOFStringArray(DCM_FrameTime, frameTime);
+  if (cond.good()) cond = targetDataset->putAndInsertTagKey(DCM_FrameIncrementPointer, DCM_FrameTime);
+  return cond;
+}
index 203dff776ce782478478d67ef36aa1c92acc406b..51120056ee6861527b294ec3aa69906b7f27206b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2010, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,6 +25,7 @@
 #include "dcmtk/dcmdata/libi2d/i2doutpl.h"
 #include "dcmtk/dcmdata/dcdeftag.h"        /* for DCM_ defines */
 #include "dcmtk/dcmdata/dcuid.h"           /* for UID_ defines */
+#include "dcmtk/dcmdata/dcdatset.h"
 
 
 I2DOutputPlugSC::I2DOutputPlugSC()
@@ -32,11 +33,18 @@ I2DOutputPlugSC::I2DOutputPlugSC()
   DCMDATA_LIBI2D_DEBUG("I2DOutputPlugSC: Output plugin for Secondary Capture initialized");
 }
 
+
+I2DOutputPlugSC::~I2DOutputPlugSC()
+{
+}
+
+
 OFString I2DOutputPlugSC::ident()
 {
   return "Secondary Capture Image SOP Class";
 }
 
+
 void I2DOutputPlugSC::supportedSOPClassUIDs(OFList<OFString>& suppSOPs)
 {
   suppSOPs.push_back(UID_SecondaryCaptureImageStorage);
@@ -67,6 +75,15 @@ OFString I2DOutputPlugSC::isValid(DcmDataset& dataset) const
 }
 
 
-I2DOutputPlugSC::~I2DOutputPlugSC()
+OFBool I2DOutputPlugSC::supportsMultiframe() const
+{
+  return OFFalse;
+}
+
+
+OFCondition I2DOutputPlugSC::insertMultiFrameAttributes(
+  DcmDataset* /* targetDataset */,
+  size_t /* numberOfFrames */) const
 {
+  return EC_Normal;
 }
index 536acba4dae97b777cd5e201ff9cdc66091218ac..f507443209546e91558477effe34b0f1e964aecf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2010, OFFIS e.V.
+ *  Copyright (C) 2001-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -24,6 +24,7 @@
 #include "dcmtk/dcmdata/libi2d/i2dplvlp.h"
 #include "dcmtk/dcmdata/dcdeftag.h"        /* for DCM_ defines */
 #include "dcmtk/dcmdata/dcuid.h"           /* for UID_ defines */
+#include "dcmtk/dcmdata/dcdatset.h"
 
 
 I2DOutputPlugVLP::I2DOutputPlugVLP()
@@ -31,11 +32,18 @@ I2DOutputPlugVLP::I2DOutputPlugVLP()
   DCMDATA_LIBI2D_DEBUG("I2DOutputPlugVLP: Output plugin for VLP initialized");
 }
 
+
+I2DOutputPlugVLP::~I2DOutputPlugVLP()
+{
+}
+
+
 OFString I2DOutputPlugVLP::ident()
 {
   return "Visible Light Photographic Image SOP Class";
 }
 
+
 void I2DOutputPlugVLP::supportedSOPClassUIDs(OFList<OFString>& suppSOPs)
 {
   suppSOPs.push_back(UID_VLPhotographicImageStorage);
@@ -45,7 +53,47 @@ void I2DOutputPlugVLP::supportedSOPClassUIDs(OFList<OFString>& suppSOPs)
 OFCondition I2DOutputPlugVLP::convert(DcmDataset &dataset) const
 {
   DCMDATA_LIBI2D_DEBUG("I2DOutputPlugVLP: Inserting VLP specific attributes");
-  OFCondition cond;
+  OFCondition cond; Uint16 u16 = 0; OFString str;
+
+  cond = dataset.findAndGetUint16(DCM_BitsAllocated, u16);
+  if (cond.bad() || (u16 != 8))
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Bits Allocated does not fit SOP class");
+
+  cond = dataset.findAndGetUint16(DCM_BitsStored, u16);
+  if (cond.bad() || (u16 != 8))
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Bits Stored does not fit SOP class");
+
+  cond = dataset.findAndGetUint16(DCM_HighBit, u16);
+  if (cond.bad() || (u16 != 7))
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: High Bit does not fit SOP class");
+
+  cond = dataset.findAndGetUint16(DCM_PixelRepresentation, u16);
+  if (cond.bad() || (u16 != 0))
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Pixel Representation does not fit SOP class");
+
+  cond = dataset.findAndGetOFStringArray(DCM_PhotometricInterpretation, str);
+  if (cond.bad())
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Photometric Interpretation not set for Pixel Data");
+
+  if (str == "MONOCHROME2")
+  {
+    cond = dataset.findAndGetUint16(DCM_SamplesPerPixel, u16);
+    if (cond.bad() || (u16 != 1))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Samples Per Pixel does not fit SOP class");
+  }
+  else if ((str == "YBR_FULL_422") || (str == "RGB"))
+  {
+    cond = dataset.findAndGetUint16(DCM_SamplesPerPixel, u16);
+    if (cond.bad() || (u16 != 3))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Samples Per Pixel does not fit SOP class");
+
+    cond = dataset.findAndGetUint16(DCM_PlanarConfiguration, u16);
+    if (cond.bad() || (u16 != 0))
+      return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Planar Configuration does not fit SOP class");
+  }
+  else
+    return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugVLP: Photometric Interpretation does not fit SOP class");
+
   cond = dataset.putAndInsertOFStringArray(DCM_SOPClassUID, UID_VLPhotographicImageStorage);
   if (cond.bad())
     return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to insert SOP class into dataset");
@@ -80,6 +128,15 @@ OFString I2DOutputPlugVLP::isValid(DcmDataset& dataset) const
 }
 
 
-I2DOutputPlugVLP::~I2DOutputPlugVLP()
+OFBool I2DOutputPlugVLP::supportsMultiframe() const
 {
+  return OFFalse;
+}
+
+
+OFCondition I2DOutputPlugVLP::insertMultiFrameAttributes(
+  DcmDataset* /* targetDataset */,
+  size_t /* numberOfFrames */) const
+{
+  return EC_Normal;
 }
index a88e6b3325228ce9977dba6a5e7b82557ad71387..ace9935bfd82ea66fd54552829851d2dbe21c711 100644 (file)
 # create library from source files
 
 include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
+include_directories(${LIBXML_INCDIR})
 
 DCMTK_ADD_LIBRARY(dcmdata
-  cmdlnarg dcbytstr dcchrstr dccodec dcdatset dcdatutl dcddirif dcdicdir dcdicent
-  dcdict dcdictbi dcdirrec dcelem dcencdoc dcerror dcfilefo dcfilter dchashdi dcistrma
-  dcistrmb dcistrmf dcistrmz dcitem dcjson dclist dcmatch dcmetinf dcobject dcostrma
-  dcostrmb dcostrmf dcostrmz dcpath dcpcache dcpixel dcpixseq dcpxitem dcrleccd
-  dcrlecce dcrlecp dcrledrg dcrleerg dcrlerp dcsequen dcspchrs dcstack dcswap dctag
-  dctagkey dctypes dcuid dcvr dcvrae dcvras dcvrat dcvrcs dcvrda dcvrds dcvrdt
-  dcvrfd dcvrfl dcvris dcvrlo dcvrlt dcvrobow dcvrod dcvrof dcvrol dcvrov dcvrpn
-  dcvrpobw dcvrsh dcvrsl dcvrss dcvrst dcvrsv dcvrtm dcvruc dcvrui dcvrul dcvrulup
-  dcvrur dcvrus dcvrut dcvruv dcwcache dcxfer vrscan vrscanl)
+  cmdlnarg.cc
+  dcbytstr.cc
+  dcchrstr.cc
+  dccodec.cc
+  dcdatset.cc
+  dcdatutl.cc
+  dcddirif.cc
+  dcdicdir.cc
+  dcdicent.cc
+  dcdict.cc
+  dcdictbi.cc
+  dcdirrec.cc
+  dcelem.cc
+  dcencdoc.cc
+  dcerror.cc
+  dcfilefo.cc
+  dcfilter.cc
+  dchashdi.cc
+  dcistrma.cc
+  dcistrmb.cc
+  dcistrmf.cc
+  dcistrms.cc
+  dcistrmz.cc
+  dcitem.cc
+  dcjson.cc
+  dclist.cc
+  dcmatch.cc
+  dcmetinf.cc
+  dcobject.cc
+  dcostrma.cc
+  dcostrmb.cc
+  dcostrmf.cc
+  dcostrms.cc
+  dcostrmz.cc
+  dcpath.cc
+  dcpcache.cc
+  dcpixel.cc
+  dcpixseq.cc
+  dcpxitem.cc
+  dcrleccd.cc
+  dcrlecce.cc
+  dcrlecp.cc
+  dcrledrg.cc
+  dcrleerg.cc
+  dcrlerp.cc
+  dcsequen.cc
+  dcspchrs.cc
+  dcstack.cc
+  dcswap.cc
+  dctag.cc
+  dctagkey.cc
+  dctypes.cc
+  dcuid.cc
+  dcvr.cc
+  dcvrae.cc
+  dcvras.cc
+  dcvrat.cc
+  dcvrcs.cc
+  dcvrda.cc
+  dcvrds.cc
+  dcvrdt.cc
+  dcvrfd.cc
+  dcvrfl.cc
+  dcvris.cc
+  dcvrlo.cc
+  dcvrlt.cc
+  dcvrobow.cc
+  dcvrod.cc
+  dcvrof.cc
+  dcvrol.cc
+  dcvrov.cc
+  dcvrpn.cc
+  dcvrpobw.cc
+  dcvrsh.cc
+  dcvrsl.cc
+  dcvrss.cc
+  dcvrst.cc
+  dcvrsv.cc
+  dcvrtm.cc
+  dcvruc.cc
+  dcvrui.cc
+  dcvrul.cc
+  dcvrulup.cc
+  dcvrur.cc
+  dcvrus.cc
+  dcvrut.cc
+  dcvruv.cc
+  dcwcache.cc
+  dcxfer.cc
+  vrscan.cc
+  vrscanl.c
+  xml2dcm.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmdata ofstd oflog)
-DCMTK_TARGET_LINK_LIBRARIES(dcmdata ${ZLIB_LIBS})
+DCMTK_TARGET_LINK_LIBRARIES(dcmdata ${ZLIB_LIBS} ${LIBXML_LIBS})
 
 # Various dictionary-related commands
 set(DICOMDIC   "${dcmdata_SOURCE_DIR}/data/dicom.dic")
@@ -23,8 +108,26 @@ set(DICTIONARIES "${DICOMDIC}" "${PRIVATEDIC}")
 
 if(BUILD_APPS)
   # don't use DCMTK_ADD_EXECUTABLE() since we don't want to install the files
-  add_executable(mkdictbi EXCLUDE_FROM_ALL mkdictbi dctagkey dcdicent dcdict dcvr dchashdi cmdlnarg dctypes)
-  add_executable(mkdeftag EXCLUDE_FROM_ALL mkdeftag dctagkey dcdicent dcdict dcvr dchashdi cmdlnarg dctypes)
+  add_executable(mkdictbi EXCLUDE_FROM_ALL
+    cmdlnarg.cc
+    dcdicent.cc
+    dcdict.cc
+    dchashdi.cc
+    dctagkey.cc
+    dctypes.cc
+    dcvr.cc
+    mkdictbi.cc
+  )
+  add_executable(mkdeftag EXCLUDE_FROM_ALL
+    cmdlnarg.cc
+    dcdicent.cc
+    dcdict.cc
+    dchashdi.cc
+    dctagkey.cc
+    dctypes.cc
+    dcvr.cc
+    mkdeftag.cc
+  )
   # workaround for Visual Studio to disable dll storage specifiers when linking directly into the executable.
   # this is needed since the built-in dictionary code is created by the tools below and thus those tools
   # statically link the few required dcmdata source files instead of linking to dcmdata as a whole.
index 15cfb072449060d917827c952e15607bcc9786d7..73b3e6d3b8e2b3dd9beb6c3547d829752fff1f2d 100644 (file)
@@ -3,11 +3,11 @@ cmdlnarg.o: cmdlnarg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -33,6 +33,8 @@ cmdlnarg.o: cmdlnarg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/logmacro.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -41,12 +43,12 @@ cmdlnarg.o: cmdlnarg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oferror.h
 dcbytstr.o: dcbytstr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -199,8 +201,8 @@ dccodec.o: dccodec.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcswap.h ../include/dcmtk/dcmdata/dcvrui.h \
  ../include/dcmtk/dcmdata/dcbytstr.h
 dcdatset.o: dcdatset.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstack.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -252,10 +254,11 @@ dcdatset.o: dcdatset.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcpcache.h ../include/dcmtk/dcmdata/dcvrus.h \
  ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcpixel.h \
  ../include/dcmtk/dcmdata/dcvrpobw.h ../include/dcmtk/dcmdata/dcvrobow.h \
- ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcostrma.h \
- ../include/dcmtk/dcmdata/dcostrmf.h ../include/dcmtk/dcmdata/dcistrma.h \
- ../include/dcmtk/dcmdata/dcistrmf.h ../include/dcmtk/dcmdata/dcwcache.h \
- ../include/dcmtk/dcmdata/dcfcache.h
+ ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcistrma.h \
+ ../include/dcmtk/dcmdata/dcistrmf.h ../include/dcmtk/dcmdata/dcistrms.h \
+ ../include/dcmtk/dcmdata/dcistrmb.h ../include/dcmtk/dcmdata/dcostrma.h \
+ ../include/dcmtk/dcmdata/dcostrmf.h ../include/dcmtk/dcmdata/dcostrms.h \
+ ../include/dcmtk/dcmdata/dcwcache.h ../include/dcmtk/dcmdata/dcfcache.h
 dcdatutl.o: dcdatutl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdatutl.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
@@ -310,7 +313,6 @@ dcdatutl.o: dcdatutl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcmetinf.h ../include/dcmtk/dcmdata/dcfilefo.h \
  ../include/dcmtk/dcmdata/dcsequen.h ../include/dcmtk/dcmdata/dcelem.h
 dcddirif.o: dcddirif.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcddirif.h ../include/dcmtk/dcmdata/dcdicdir.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
@@ -319,6 +321,7 @@ dcddirif.o: dcddirif.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
@@ -375,8 +378,8 @@ dcddirif.o: dcddirif.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftime.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h
 dcdicdir.o: dcdicdir.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
@@ -436,9 +439,9 @@ dcdicdir.o: dcdicdir.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcwcache.h ../include/dcmtk/dcmdata/dcfcache.h \
  ../include/dcmtk/dcmdata/dcvrui.h
 dcdicent.o: dcdicent.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcdicent.h ../include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -515,8 +518,8 @@ dcdictbi.o: dcdictbi.cc ../include/dcmtk/dcmdata/dcdict.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/dcmdata/dcdefine.h
 dcdirrec.o: dcdirrec.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
@@ -598,13 +601,13 @@ dcdirrec.o: dcdirrec.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/cmdlnarg.h ../include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcelem.o: dcelem.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -730,8 +733,8 @@ dcerror.o: dcerror.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/dcmdata/dcdefine.h
 dcfilefo.o: dcfilefo.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcfilefo.h ../include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -783,10 +786,12 @@ dcfilefo.o: dcfilefo.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dcvrul.h \
  ../include/dcmtk/dcmdata/dcvrus.h ../include/dcmtk/dcmdata/dcvrae.h \
  ../include/dcmtk/dcmdata/dcvrsh.h ../include/dcmtk/dcmdata/dcchrstr.h \
- ../include/dcmtk/dcmdata/dcmetinf.h ../include/dcmtk/dcmdata/dcdeftag.h \
- ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcostrma.h \
- ../include/dcmtk/dcmdata/dcostrmf.h ../include/dcmtk/dcmdata/dcistrma.h \
- ../include/dcmtk/dcmdata/dcistrmf.h ../include/dcmtk/dcmdata/dcwcache.h \
+ ../include/dcmtk/dcmdata/dcvrur.h ../include/dcmtk/dcmdata/dcmetinf.h \
+ ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcuid.h \
+ ../include/dcmtk/dcmdata/dcistrma.h ../include/dcmtk/dcmdata/dcistrmf.h \
+ ../include/dcmtk/dcmdata/dcistrms.h ../include/dcmtk/dcmdata/dcistrmb.h \
+ ../include/dcmtk/dcmdata/dcostrma.h ../include/dcmtk/dcmdata/dcostrmf.h \
+ ../include/dcmtk/dcmdata/dcostrms.h ../include/dcmtk/dcmdata/dcwcache.h \
  ../include/dcmtk/dcmdata/dcfcache.h ../include/dcmtk/dcmdata/dcjson.h
 dcfilter.o: dcfilter.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcfilter.h \
@@ -1018,7 +1023,53 @@ dcistrmf.o: dcistrmf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
- ../include/dcmtk/dcmdata/dcerror.h
+ ../include/dcmtk/dcmdata/dcistrmb.h ../include/dcmtk/dcmdata/dcerror.h
+dcistrms.o: dcistrms.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmdata/dcistrms.h ../include/dcmtk/dcmdata/dcistrma.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../include/dcmtk/dcmdata/dcistrmb.h ../include/dcmtk/dcmdata/dcerror.h
 dcistrmz.o: dcistrmz.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcistrmz.h ../include/dcmtk/dcmdata/dcistrma.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -1066,13 +1117,13 @@ dcistrmz.o: dcistrmz.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../include/dcmtk/dcmdata/dcerror.h
 dcitem.o: dcitem.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
@@ -1147,19 +1198,19 @@ dcjson.o: dcjson.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcdefine.h
 dclist.o: dclist.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dclist.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
@@ -1250,8 +1301,8 @@ dcmatch.o: dcmatch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
  ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def
 dcmetinf.o: dcmetinf.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -1489,7 +1540,55 @@ dcostrmf.o: dcostrmf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
  ../../ofstd/include/dcmtk/ofstd/oferror.h \
- ../include/dcmtk/dcmdata/dcerror.h
+ ../include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconsol.h
+dcostrms.o: dcostrms.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmdata/dcostrms.h ../include/dcmtk/dcmdata/dcostrma.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcvr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconsol.h
 dcostrmz.o: dcostrmz.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcostrmz.h ../include/dcmtk/dcmdata/dcostrma.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -1685,10 +1784,11 @@ dcpixel.o: dcpixel.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oferror.h \
  ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcofsetl.h \
  ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcitem.h \
- ../include/dcmtk/dcmdata/dcpcache.h ../include/dcmtk/dcmdata/dcpxitem.h
+ ../include/dcmtk/dcmdata/dcpcache.h ../include/dcmtk/dcmdata/dcpxitem.h \
+ ../include/dcmtk/dcmdata/dcjson.h
 dcpixseq.o: dcpixseq.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofuuid.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -1741,8 +1841,8 @@ dcpixseq.o: dcpixseq.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmdata/dcdeftag.h
 dcpxitem.o: dcpxitem.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcpxitem.h ../include/dcmtk/dcmdata/dcvrobow.h \
  ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -2077,8 +2177,8 @@ dcrlerp.o: dcrlerp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h
 dcsequen.o: dcsequen.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -2187,9 +2287,9 @@ dcspchrs.o: dcspchrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcdeftag.h
 dcstack.o: dcstack.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcstack.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -2261,12 +2361,12 @@ dctag.o: dctag.cc ../../config/include/dcmtk/config/osconfig.h \
 dctagkey.o: dctagkey.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
@@ -2311,8 +2411,8 @@ dctypes.o: dctypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
  ../include/dcmtk/dcmdata/dcdefine.h
 dcuid.o: dcuid.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcuid.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -2481,6 +2581,7 @@ dcvras.o: dcvras.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcstack.h
 dcvrat.o: dcvrat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcvrat.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -2489,7 +2590,6 @@ dcvrat.o: dcvrat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/dcmdata/dcerror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -2524,7 +2624,6 @@ dcvrat.o: dcvrat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
  ../include/dcmtk/dcmdata/dcjson.h
 dcvrcs.o: dcvrcs.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcvrcs.h ../include/dcmtk/dcmdata/dcbytstr.h \
  ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -2533,6 +2632,7 @@ dcvrcs.o: dcvrcs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -2623,11 +2723,11 @@ dcvrda.o: dcvrda.cc ../../config/include/dcmtk/config/osconfig.h \
 dcvrds.o: dcvrds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrds.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/dcmdata/dcbytstr.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -2724,26 +2824,21 @@ dcvrdt.o: dcvrdt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../config/include/dcmtk/config/arith.h \
  ../../ofstd/include/dcmtk/ofstd/oferror.h
 dcvrfd.o: dcvrfd.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../include/dcmtk/dcmdata/dcvrfd.h ../include/dcmtk/dcmdata/dcelem.h \
+ ../include/dcmtk/dcmdata/dcobject.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../include/dcmtk/dcmdata/dcerror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h \
- ../../ofstd/include/dcmtk/ofstd/oferror.h \
- ../include/dcmtk/dcmdata/dcvrfd.h ../include/dcmtk/dcmdata/dcelem.h \
- ../include/dcmtk/dcmdata/dcobject.h \
- ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
- ../../ofstd/include/dcmtk/ofstd/ofthread.h \
- ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcdefine.h \
- ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \
+ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \
+ ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
@@ -2757,6 +2852,7 @@ dcvrfd.o: dcvrfd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
  ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
@@ -2769,28 +2865,30 @@ dcvrfd.o: dcvrfd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
-dcvrfl.o: dcvrfl.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
  ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmath.h \
+ ../include/dcmtk/dcmdata/dcjson.h
+dcvrfl.o: dcvrfl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrfl.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
- ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcdefine.h \
- ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dctypes.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../include/dcmtk/dcmdata/dcdefine.h ../include/dcmtk/dcmdata/dcxfer.h \
+ ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
@@ -2804,6 +2902,7 @@ dcvrfl.o: dcvrfl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
  ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
@@ -2816,7 +2915,14 @@ dcvrfl.o: dcvrfl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
+ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmath.h \
+ ../include/dcmtk/dcmdata/dcjson.h
 dcvris.o: dcvris.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvris.h ../include/dcmtk/dcmdata/dcbytstr.h \
  ../include/dcmtk/dcmdata/dctypes.h \
@@ -2866,9 +2972,9 @@ dcvrlo.o: dcvrlo.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmdata/dcvrlo.h ../include/dcmtk/dcmdata/dcchrstr.h \
@@ -3207,9 +3313,9 @@ dcvrpn.o: dcvrpn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmdata/dcvrpn.h ../include/dcmtk/dcmdata/dcchrstr.h \
@@ -3245,7 +3351,12 @@ dcvrpn.o: dcvrpn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcerror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../include/dcmtk/dcmdata/dcxfer.h ../include/dcmtk/dcmdata/dcvr.h \
- ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dcstack.h
+ ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dcstack.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h
 dcvrpobw.o: dcvrpobw.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrpobw.h ../include/dcmtk/dcmdata/dcvrobow.h \
  ../include/dcmtk/dcmdata/dcelem.h ../include/dcmtk/dcmdata/dcobject.h \
@@ -3335,6 +3446,7 @@ dcvrsh.o: dcvrsh.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dcjson.h
 dcvrsl.o: dcvrsl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcvrsl.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -3343,7 +3455,6 @@ dcvrsl.o: dcvrsl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/dcmdata/dcerror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -3378,6 +3489,7 @@ dcvrsl.o: dcvrsl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
 dcvrss.o: dcvrss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcvrss.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -3386,7 +3498,6 @@ dcvrss.o: dcvrss.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/dcmdata/dcerror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -3464,7 +3575,6 @@ dcvrst.o: dcvrst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dctagkey.h \
  ../include/dcmtk/dcmdata/dcstack.h
 dcvrsv.o: dcvrsv.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/dcmdata/dcvrsv.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -3474,6 +3584,7 @@ dcvrsv.o: dcvrsv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/dcmdata/dcerror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -3505,7 +3616,8 @@ dcvrsv.o: dcvrsv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
+ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
+ ../include/dcmtk/dcmdata/dcjson.h
 dcvrtm.o: dcvrtm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrtm.h ../include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -3602,12 +3714,12 @@ dcvruc.o: dcvruc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcstack.h
 dcvrui.o: dcvrui.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -3651,6 +3763,7 @@ dcvrui.o: dcvrui.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcuid.h
 dcvrul.o: dcvrul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcvrul.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -3659,7 +3772,6 @@ dcvrul.o: dcvrul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/dcmdata/dcerror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -3780,6 +3892,7 @@ dcvrur.o: dcvrur.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcstack.h ../include/dcmtk/dcmdata/dcmatch.h
 dcvrus.o: dcvrus.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmdata/dcvrus.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -3788,7 +3901,6 @@ dcvrus.o: dcvrus.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/dcmdata/dcerror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -3866,7 +3978,6 @@ dcvrut.o: dcvrut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dctagkey.h \
  ../include/dcmtk/dcmdata/dcstack.h
 dcvruv.o: dcvruv.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/dcmdata/dcvruv.h ../include/dcmtk/dcmdata/dcelem.h \
  ../include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
@@ -3876,6 +3987,7 @@ dcvruv.o: dcvruv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/dcmdata/dcerror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -3907,7 +4019,8 @@ dcvruv.o: dcvruv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
  ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
- ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h
+ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
+ ../include/dcmtk/dcmdata/dcjson.h
 dcwcache.o: dcwcache.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcwcache.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -4089,4 +4202,10 @@ vrscan.o: vrscan.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/spi/logfact.h \
  ../../oflog/include/dcmtk/oflog/logmacro.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
- ../../oflog/include/dcmtk/oflog/tracelog.h vrscani.h vrscanl.h
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h vrscani.h vrscanl.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def
+xml2dcm.o: xml2dcm.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmdata/xml2dcm.h
index eca96cabf861a12455179b41ab62fead5786aaed..896b5cff9a808d908790c6ae4bd0292a42608c86 100644 (file)
@@ -46,9 +46,9 @@ objs = dcpixseq.o dcpxitem.o dcuid.o dcerror.o dcencdoc.o\
        dcdicdir.o dcrleccd.o dcrlecce.o dcrlecp.o dcrlerp.o dcrledrg.o dcrleerg.o \
        dcdictbi.o dctagkey.o dcdicent.o dcdict.o dcvr.o dchashdi.o cmdlnarg.o \
        dcvrut.o dcvrur.o dcvruc.o dctypes.o dcpcache.o dcddirif.o dcistrma.o \
-       dcistrmb.o dcistrmf.o dcistrmz.o dcostrma.o dcostrmb.o dcostrmf.o \
-       dcostrmz.o dcwcache.o dcpath.o vrscan.o vrscanl.o dcfilter.o dcjson.o \
-       dcmatch.o
+       dcistrmb.o dcistrmf.o dcistrms.o dcistrmz.o dcostrma.o dcostrmb.o \
+       dcostrmf.o dcostrms.o dcostrmz.o dcwcache.o dcpath.o vrscan.o vrscanl.o \
+       dcfilter.o dcmatch.o dcjson.o xml2dcm.o
 
 support_objs = mkdeftag.o mkdictbi.o
 support_progs = mkdeftag mkdictbi
index ad5afe1b64f40d20c0aea8b5b9b2c6433debe5fc..c3f93043970df005d1077834c6465a311a30f3a9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2018, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -24,6 +24,7 @@
 
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/dcmdata/dctypes.h"
+#include "dcmtk/ofstd/ofconsol.h"
 
 /*
 ** prepareCmdLineArgs
 
 #ifdef HAVE_EMPTY_ARGC_ARGV
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofstd.h"
 
@@ -76,10 +72,10 @@ void prepareCmdLineArgs(int& argc, char* argv[],
 
 #else // HAVE_EMPTY_ARGC_ARGV
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
+// #define INCLUDE_CSTDLIB
+// #define INCLUDE_CSTDIO
+// #define INCLUDE_CSTRING
+// #include "dcmtk/ofstd/ofstdinc.h"
 
 #ifdef HAVE_IO_H
 #include <io.h>
@@ -100,53 +96,24 @@ void prepareCmdLineArgs(int& /* argc */, char** /* argv */,
 #ifdef _WIN32
 #ifndef DCMTK_GUI
 #ifndef __CYGWIN__
-    /* Map stderr onto stdout (cannot redirect stderr under Windows).
-     * Remove any buffering (windows uses a 2k buffer for stdout when not
-     * writing to the console.  since dcmtk uses mixed stdout, stderr
-     * cout and cerr, this results in _very_ mixed up output).
-     */
 
-    /* first of all, check whether stderr and stdout file descriptors are
-     * already the same, e.g. from a previous call of this function
+#ifdef DCMTK_MERGE_STDERR_TO_STDOUT
+    /* Map stderr onto stdout (cannot redirect stderr under Windows).
+     * We also remove any buffering since Windows by default uses buffered mode
+     * for stdout when not writing to the console. Since dcmtk uses mixed
+     * stdout, stderr, cout and cerr, this results in _very_ mixed up output).
      */
-    if (fileno(stderr) != fileno(stdout))
-    {
-        /* duplicate the stderr file descriptor to be the same as stdout */
-        close(fileno(stderr));
-        int fderr = dup(fileno(stdout));
-        if (fderr != fileno(stderr))
-        {
-            DCMDATA_ERROR("INTERNAL ERROR: cannot map stderr to stdout: "
-                << OFStandard::getLastSystemErrorCode().message());
-        }
-    }
-
-    /* make stdout the same as stderr */
-    *stdout = *stderr;
+    OFConsole::mergeStderrStdout();
+#endif
 
 #ifdef USE_BINARY_MODE_FOR_STDOUT_ON_WINDOWS
     /* use binary mode for stdout in order to be more consistent with common Unix behavior */
     setmode(fileno(stdout), O_BINARY);
 #endif
 
-#ifndef __BORLANDC__  /* setvbuf on stdout/stderr does not work with Borland C++ */
-    /* make sure the buffering is removed */
-    if (setvbuf(stdout, NULL, _IONBF, 0 ) != 0 )
-    {
-        DCMDATA_ERROR("INTERNAL ERROR: cannot unbuffer stdout: "
-            << OFStandard::getLastSystemErrorCode().message());
-    }
-    if (setvbuf(stderr, NULL, _IONBF, 0 ) != 0 )
-    {
-        DCMDATA_ERROR("INTERNAL ERROR: cannot unbuffer stderr: "
-            << OFStandard::getLastSystemErrorCode().message());
-    }
-#endif /* __BORLANDC__ */
 #endif
 #endif
 #endif
-
-    /* no need to process the arguments */
 }
 
 
index 3d550bdea5cedb285200174b2559073ce9e7535a..2af7e94d2b6a952d8b314f0ff64a8240c3737000 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcvr.h"
 #include "dcmtk/dcmdata/dcmatch.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_NEW
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 // global flags
 
 OFGlobal<OFBool> dcmEnableVRCheckerForStringValues(OFTrue);
index 7d595166b1fcdb0b467e13a99f8a4b171ba9771e..598cccefb543ebcd6de84d789d07ae663e82b714 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -267,7 +267,8 @@ OFCondition DcmCharString::writeJson(STD_NAMESPACE ostream &out,
 
 const OFString& DcmCharString::getDelimiterChars() const
 {
-    return DcmVR(EVR_UN).getDelimiterChars();
+    /* use actual VR of this class (including derived ones) */
+    return DcmVR(ident()).getDelimiterChars();
 }
 
 
index 3128b47c50a121a9148b6b95919cb17341821a0b..9a75f56895a47593a7fc4693a4327dd231d13a44 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofstack.h"
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/dcmdata/dcvrus.h"
 #include "dcmtk/dcmdata/dcpixel.h"
 #include "dcmtk/dcmdata/dcdeftag.h"
-#include "dcmtk/dcmdata/dcostrma.h"    /* for class DcmOutputStream */
-#include "dcmtk/dcmdata/dcostrmf.h"    /* for class DcmOutputFileStream */
 #include "dcmtk/dcmdata/dcistrma.h"    /* for class DcmInputStream */
 #include "dcmtk/dcmdata/dcistrmf.h"    /* for class DcmInputFileStream */
+#include "dcmtk/dcmdata/dcistrms.h"    /* for class DcmStdinStream */
+#include "dcmtk/dcmdata/dcostrma.h"    /* for class DcmOutputStream */
+#include "dcmtk/dcmdata/dcostrmf.h"    /* for class DcmOutputFileStream */
+#include "dcmtk/dcmdata/dcostrms.h"    /* for class DcmStdoutStream */
 #include "dcmtk/dcmdata/dcwcache.h"    /* for class DcmWriteCache */
 
 
@@ -647,23 +644,50 @@ OFCondition DcmDataset::loadFileUntilTag(const OFFilename &fileName,
     /* check parameters first */
     if (!fileName.isEmpty())
     {
-        /* open file for input */
-        DcmInputFileStream fileStream(fileName);
-
-        /* check stream status */
-        l_error = fileStream.status();
-
-        if (l_error.good())
+        if (fileName.isStandardStream())
         {
+            /* use stdin stream */
+            DcmStdinStream inStream;
+
             /* clear this object */
             l_error = clear();
             if (l_error.good())
             {
-                /* read data from file */
+                /* initialize transfer */
                 transferInit();
-                l_error = readUntilTag(fileStream, readXfer, groupLength, maxReadLength, stopParsingAtElement);
+
+                do
+                {
+                  /* fill the buffer from stdin */
+                  inStream.fillBuffer();
+                  /* and read the buffer content into the DICOM dataset */
+                  l_error = readUntilTag(inStream, readXfer, groupLength, maxReadLength, stopParsingAtElement);
+                } while (l_error == EC_StreamNotifyClient); /* repeat until we're at the end of the stream, or an error occurs */
+
+                /* end transfer */
                 transferEnd();
             }
+
+        } else {
+            /* open file for input */
+            DcmInputFileStream fileStream(fileName);
+
+            /* check stream status */
+            l_error = fileStream.status();
+
+            if (l_error.good())
+            {
+                /* clear this object */
+                l_error = clear();
+                if (l_error.good())
+                {
+                    /* read data from file */
+                    transferInit();
+                    l_error = readUntilTag(fileStream, readXfer, groupLength, maxReadLength, stopParsingAtElement);
+                    transferEnd();
+                }
+            }
+
         }
     }
     return l_error;
@@ -683,18 +707,27 @@ OFCondition DcmDataset::saveFile(const OFFilename &fileName,
     if (!fileName.isEmpty())
     {
         DcmWriteCache wcache;
-        /* open file for output */
-        DcmOutputFileStream fileStream(fileName);
+        DcmOutputStream *fileStream;
+
+        if (fileName.isStandardStream())
+        {
+            /* use stdout stream */
+            fileStream = new DcmStdoutStream(fileName);
+        } else {
+            /* open file for output */
+            fileStream = new DcmOutputFileStream(fileName);
+        }
 
         /* check stream status */
-        l_error = fileStream.status();
+        l_error = fileStream->status();
         if (l_error.good())
         {
             /* write data to file */
             transferInit();
-            l_error = write(fileStream, writeXfer, encodingType, &wcache, groupLength, padEncoding, padLength, subPadLength);
+            l_error = write(*fileStream, writeXfer, encodingType, &wcache, groupLength, padEncoding, padLength, subPadLength);
             transferEnd();
         }
+        delete fileStream;
     }
     return l_error;
 }
index 8937cbe30a0c6d3d166f2cdd7b198f51623dc76a..1f436926d9a42b2d7ccada61744bcb835746557e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2020, OFFIS e.V.
+ *  Copyright (C) 2002-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dcddirif.h"
 #include "dcmtk/dcmdata/dcdeftag.h"
 #include "dcmtk/dcmdata/dcuid.h"
@@ -83,7 +79,12 @@ static int componentCount(const OFString &filename,
     int count = (length > 0) ? 1 : 0;
     for (size_t i = 0; i < length; i++)
     {
+#ifdef _WIN32
+        // Windows accepts both backslash and forward slash as path separators.
+        if ((filename.at(i) == separator) || (filename.at(i) == '/'))
+#else
         if (filename.at(i) == separator)
+#endif
             count++;
     }
     return count;
@@ -102,6 +103,11 @@ static OFBool isComponentTooLarge(const OFString &filename,
     {
         size_t pos1 = 0;
         size_t pos2 = filename.find(separator);
+#ifdef _WIN32
+        // Windows accepts both backslash and forward slash as path separators.
+        size_t pos3 = filename.find('/');
+        if ((pos2 == OFString_npos) || ((pos3 != OFString_npos) && (pos3 < pos2))) pos2 = pos3;
+#endif
         while (pos2 != OFString_npos)
         {
             /* check whether component length is within limit */
@@ -112,6 +118,10 @@ static OFBool isComponentTooLarge(const OFString &filename,
             }
             pos1 = pos2 + 1;
             pos2 = filename.find(separator, pos1);
+#ifdef _WIN32
+            pos3 = filename.find('/', pos1);
+            if ((pos2 == OFString_npos) || ((pos3 != OFString_npos) && (pos3 < pos2))) pos2 = pos3;
+#endif
         }
         if (!result)
         {
@@ -143,6 +153,10 @@ static OFBool locateInvalidFilenameChars(const OFString &filename,
     {
         c = filename.at(i);
         if ((c == '_') || isdigit(c) || (c == separator) ||
+#ifdef _WIN32
+            /* Windows accepts both backslash and forward slash as path separators. */
+            (c == '/') ||
+#endif
             (isalpha(c) && (isupper(c) || (islower(c) && mapFilenames))))
         {
             /* all ok */
@@ -170,7 +184,12 @@ static OFString &hostToDicomFilename(const OFString &hostFilename,
     for (size_t i = 0; i < length; i++)
     {
         const unsigned char c = hostFilename.at(i);
+#ifdef _WIN32
+        // Windows accepts both backslash and forward slash as path separators.
+        if ((c == PATH_SEPARATOR) || (c == '/'))
+#else
         if (c == PATH_SEPARATOR)
+#endif
         {
             /* the PATH_SEPARATOR depends on the OS (see <osconfig.h>) */
             dicomFilename += '\\';
@@ -627,6 +646,12 @@ OFString DicomDirInterface::recordTypeToName(const E_DirRecType recordType)
         case ERT_Assessment:
             recordName = "Assessment";
             break;
+        case ERT_Radiotherapy:
+            recordName = "Radiotherapy";
+            break;
+        case ERT_Annotation:
+            recordName = "Annotation";
+            break;
         default:
             recordName = "(unknown-directory-record-type)";
             break;
@@ -662,6 +687,7 @@ static E_DirRecType sopClassToRecordType(const OFString &sopClass)
              compare(sopClass, UID_ChestCADSRStorage) ||
              compare(sopClass, UID_ColonCADSRStorage) ||
              compare(sopClass, UID_XRayRadiationDoseSRStorage) ||
+             compare(sopClass, UID_EnhancedXRayRadiationDoseSRStorage) ||
              compare(sopClass, UID_RadiopharmaceuticalRadiationDoseSRStorage) ||
              compare(sopClass, UID_SpectaclePrescriptionReportStorage) ||
              compare(sopClass, UID_MacularGridThicknessAndVolumeReportStorage) ||
@@ -797,10 +823,14 @@ static E_DirRecType sopClassToRecordType(const OFString &sopClass)
              compare(sopClass, UID_RTRadiationSalvageRecordStorage) ||
              compare(sopClass, UID_TomotherapeuticRadiationRecordStorage) ||
              compare(sopClass, UID_CArmPhotonElectronRadiationRecordStorage) ||
-             compare(sopClass, UID_RoboticRadiationRecordStorage))
+             compare(sopClass, UID_RoboticRadiationRecordStorage) ||
+             compare(sopClass, UID_RTRadiationSetDeliveryInstructionStorage) ||
+             compare(sopClass, UID_RTTreatmentPreparationStorage))
     {
         result = ERT_Radiotherapy;
     }
+    else if (compare(sopClass, UID_MicroscopyBulkSimpleAnnotationsStorage))
+        result = ERT_Annotation;
     return result;
 }
 
@@ -990,6 +1020,7 @@ static OFCondition insertSortedUnder(DcmDirectoryRecord *parent,
             case ERT_Tract:
             case ERT_Assessment:
             case ERT_Radiotherapy:
+            case ERT_Annotation:
                 /* try to insert based on InstanceNumber */
                 result = insertWithISCriterion(parent, child, DCM_InstanceNumber);
                 break;
@@ -1220,32 +1251,40 @@ OFCondition DicomDirInterface::createNewDicomDir(const E_ApplicationProfile prof
                                                  const OFString &filesetID)
 {
     OFCondition result = EC_IllegalParameter;
-    if (!filename.isEmpty() && checkFilesetID(filesetID))
+    /* check parameters */
+    if (!filename.isEmpty())
     {
-        FilesetUpdateMode = OFFalse;
-        /* first remove any existing DICOMDIR from memory */
-        cleanup();
-        /* then create a backup if a DICOMDIR file already exists */
-        if (OFStandard::fileExists(filename))
+        /* remove leading and trailing spaces */
+        OFString normalizedFilesetID(filesetID);
+        normalizeString(normalizedFilesetID, OFFalse /*multiPart*/, OFTrue /*leading*/, OFTrue /*trailing*/);
+        /* check for invalid characters and maximum length */
+        if (checkFilesetID(normalizedFilesetID))
         {
-            if (BackupMode)
-                createDicomDirBackup(filename);
-            /* and delete it because otherwise DcmDicomDir will parse it
-               and try to append to existing records */
-            OFStandard::deleteFile(filename);
-        }
-        /* select new application profile */
-        result = selectApplicationProfile(profile);
-        if (result.good())
-        {
-            DCMDATA_INFO("creating DICOMDIR file using " << getProfileName(ApplicationProfile)
-                << " profile: " << filename);
-            /* finally, create a new DICOMDIR object */
-            DicomDir = new DcmDicomDir(filename, filesetID.c_str());
-            if (DicomDir != NULL)
-                result = DicomDir->error();
-            else
-                result = EC_MemoryExhausted;
+            FilesetUpdateMode = OFFalse;
+            /* first remove any existing DICOMDIR from memory */
+            cleanup();
+            /* then create a backup if a DICOMDIR file already exists */
+            if (OFStandard::fileExists(filename))
+            {
+                if (BackupMode)
+                    createDicomDirBackup(filename);
+                /* and delete it because otherwise DcmDicomDir will parse it
+                and try to append to existing records */
+                OFStandard::deleteFile(filename);
+            }
+            /* select new application profile */
+            result = selectApplicationProfile(profile);
+            if (result.good())
+            {
+                DCMDATA_INFO("creating DICOMDIR file using " << getProfileName(ApplicationProfile)
+                    << " profile: " << filename);
+                /* finally, create a new DICOMDIR object */
+                DicomDir = new DcmDicomDir(filename, normalizedFilesetID.c_str());
+                if (DicomDir != NULL)
+                    result = DicomDir->error();
+                else
+                    result = EC_MemoryExhausted;
+            }
         }
     }
     return result;
@@ -1384,6 +1423,10 @@ OFBool DicomDirInterface::isFilenameValid(const OFFilename &filename,
         size_t invalidChar = 0;
         /* check whether the file name path is ok and in local format */
         if ((fname[0] == PATH_SEPARATOR) /* absolute path? */ ||
+#ifdef _WIN32
+            /* Windows accepts both backslash and forward slash as path separators. */
+            (fname[0] == '/') ||
+#endif
             locateInvalidFilenameChars(fname, invalidChar, MapFilenamesMode))
         {
             DCMDATA_ERROR("invalid character(s) in filename: " << fname << OFendl
@@ -1599,6 +1642,7 @@ OFCondition DicomDirInterface::checkSOPClassAndXfer(DcmMetaInfo *metainfo,
                                 compare(mediaSOPClassUID, UID_ChestCADSRStorage) ||
                                 compare(mediaSOPClassUID, UID_ColonCADSRStorage) ||
                                 compare(mediaSOPClassUID, UID_XRayRadiationDoseSRStorage) ||
+                                compare(mediaSOPClassUID, UID_EnhancedXRayRadiationDoseSRStorage) ||
                                 compare(mediaSOPClassUID, UID_RadiopharmaceuticalRadiationDoseSRStorage) ||
                                 compare(mediaSOPClassUID, UID_SpectaclePrescriptionReportStorage) ||
                                 compare(mediaSOPClassUID, UID_MacularGridThicknessAndVolumeReportStorage) ||
@@ -1700,7 +1744,8 @@ OFCondition DicomDirInterface::checkSOPClassAndXfer(DcmMetaInfo *metainfo,
                                 compare(mediaSOPClassUID, UID_StereometricRelationshipStorage) ||
                                 compare(mediaSOPClassUID, UID_ColorPaletteStorage) ||
                                 compare(mediaSOPClassUID, UID_TractographyResultsStorage) ||
-                                compare(mediaSOPClassUID, UID_ContentAssessmentResultsStorage);
+                                compare(mediaSOPClassUID, UID_ContentAssessmentResultsStorage) ||
+                                compare(mediaSOPClassUID, UID_MicroscopyBulkSimpleAnnotationsStorage);
                     }
                     /* the following SOP classes have been retired with previous editions of the DICOM standard */
                     if (!found && RetiredSOPClassSupport)
@@ -2523,7 +2568,7 @@ OFCondition DicomDirInterface::checkMandatoryAttributes(DcmMetaInfo *metainfo,
                     result = EC_MissingAttribute;
             }
             /* StudyDescription is type 2 in DICOMDIR and type 3 in images.
-               We can create an empty attribute in the directory
+               We can create an empty attribute in the directory.
              */
             /* StudyInstanceUID is type 1 in DICOMDIR and images */
             if (!checkExistsWithValue(dataset, DCM_StudyInstanceUID, filename))
@@ -2534,10 +2579,11 @@ OFCondition DicomDirInterface::checkMandatoryAttributes(DcmMetaInfo *metainfo,
                 if (!checkExistsWithValue(dataset, DCM_StudyID, filename))
                     result = EC_MissingAttribute;
             }
-            /* AccessionNumber is type 2 in DICOMDIR and type 3 in images
-               We can create an empty attribute in the directory
+            /* AccessionNumber is type 2 in DICOMDIR and type 3 in images.
+               We can create an empty attribute in the directory.
             */
-            /* Modality is type 1 in DICOMDIR and type 1 in images */
+            /* Modality is type 1 in DICOMDIR and type 1 in images
+             * (apart from SC Equipment Module where it is type 3) */
             if (!checkExistsWithValue(dataset, DCM_Modality, filename))
                 result = EC_MissingAttribute;
             /* SeriesInstanceUID is type 1 in DICOMDIR and type 1 in images */
@@ -2722,6 +2768,7 @@ OFCondition DicomDirInterface::checkMandatoryAttributes(DcmMetaInfo *metainfo,
                 case ERT_Surface:
                 case ERT_Measurement:
                 case ERT_Tract:
+                case ERT_Annotation:
                     if (!checkExistsWithValue(dataset, DCM_InstanceNumber, filename))
                         result = EC_MissingAttribute;
                     if (!checkExistsWithValue(dataset, DCM_ContentDate, filename))
@@ -3001,6 +3048,7 @@ OFBool DicomDirInterface::recordMatchesDataset(DcmDirectoryRecord *record,
             case ERT_Tract:
             case ERT_Assessment:
             case ERT_Radiotherapy:
+            case ERT_Annotation:
                 /* The attribute ReferencedSOPInstanceUID is automatically
                  * put into a Directory Record when a filename is present.
                 */
@@ -4164,7 +4212,7 @@ DcmDirectoryRecord *DicomDirInterface::buildTractRecord(DcmDirectoryRecord *reco
                                                         const OFString &referencedFileID,
                                                         const OFFilename &sourceFilename)
 {
-    /* create new surface record */
+    /* create new tract record */
     if (record == NULL)
         record = new DcmDirectoryRecord(ERT_Tract, referencedFileID.c_str(), sourceFilename, fileformat);
     if (record != NULL)
@@ -4198,7 +4246,7 @@ DcmDirectoryRecord *DicomDirInterface::buildAssessmentRecord(DcmDirectoryRecord
                                                              const OFString &referencedFileID,
                                                              const OFFilename &sourceFilename)
 {
-    /* create new surface record */
+    /* create new assessment record */
     if (record == NULL)
         record = new DcmDirectoryRecord(ERT_Assessment, referencedFileID.c_str(), sourceFilename, fileformat);
     if (record != NULL)
@@ -4229,7 +4277,7 @@ DcmDirectoryRecord *DicomDirInterface::buildRadiotherapyRecord(DcmDirectoryRecor
                                                                const OFString &referencedFileID,
                                                                const OFFilename &sourceFilename)
 {
-    /* create new surface record */
+    /* create new radiotherapy record */
     if (record == NULL)
         record = new DcmDirectoryRecord(ERT_Radiotherapy, referencedFileID.c_str(), sourceFilename, fileformat);
     if (record != NULL)
@@ -4256,6 +4304,39 @@ DcmDirectoryRecord *DicomDirInterface::buildRadiotherapyRecord(DcmDirectoryRecor
 }
 
 
+DcmDirectoryRecord *DicomDirInterface::buildAnnotationRecord(DcmDirectoryRecord *record,
+                                                             DcmFileFormat *fileformat,
+                                                             const OFString &referencedFileID,
+                                                             const OFFilename &sourceFilename)
+{
+    /* create new annotation record */
+    if (record == NULL)
+        record = new DcmDirectoryRecord(ERT_Annotation, referencedFileID.c_str(), sourceFilename, fileformat);
+    if (record != NULL)
+    {
+        /* check whether new record is ok */
+        if (record->error().good())
+        {
+            DcmDataset *dataset = fileformat->getDataset();
+            /* copy attribute values from dataset to annotation record */
+            copyElementType1(dataset, DCM_InstanceNumber, record, sourceFilename);
+            copyElementType1(dataset, DCM_ContentDate, record, sourceFilename);
+            copyElementType1(dataset, DCM_ContentTime, record, sourceFilename);
+            copyElementType1(dataset, DCM_ContentLabel, record, sourceFilename);
+            copyElementType2(dataset, DCM_ContentDescription, record, sourceFilename);
+            copyElementType2(dataset, DCM_ContentCreatorName, record, sourceFilename);
+        } else {
+            printRecordErrorMessage(record->error(), ERT_Annotation, "create");
+            /* free memory */
+            delete record;
+            record = NULL;
+        }
+    } else
+        printRecordErrorMessage(EC_MemoryExhausted, ERT_Annotation, "create");
+    return record;
+}
+
+
 // create or update image record and copy required values from dataset
 DcmDirectoryRecord *DicomDirInterface::buildImageRecord(DcmDirectoryRecord *record,
                                                         DcmFileFormat *fileformat,
@@ -4692,6 +4773,9 @@ DcmDirectoryRecord *DicomDirInterface::addRecord(DcmDirectoryRecord *parent,
                 case ERT_Radiotherapy:
                     record = buildRadiotherapyRecord(record, fileformat, referencedFileID, sourceFilename);
                     break;
+                case ERT_Annotation:
+                    record = buildAnnotationRecord(record, fileformat, referencedFileID, sourceFilename);
+                    break;
                 default:
                     /* it can only be an image */
                     record = buildImageRecord(record, fileformat, referencedFileID, sourceFilename);
@@ -5465,7 +5549,8 @@ OFBool DicomDirInterface::checkFilesetID(const OFString &filesetID)
     {
         size_t invalidChar = 0;
         /* are the characters ok? */
-        if (!DcmCodeString::checkVR(filesetID, &invalidChar, OFFalse /*checkLength*/))
+        if (!DcmCodeString::checkVR(filesetID, &invalidChar, OFFalse /*checkLength*/) ||
+            ((invalidChar = filesetID.find_first_of(' ')) != OFString_npos) /* spaces not allowed */)
         {
             /* create error message */
             DCMDATA_ERROR("invalid character(s) in file-set ID: " << filesetID << OFendl
@@ -5859,7 +5944,8 @@ OFBool DicomDirInterface::compareSequenceAttributes(DcmItem *dataset,
     /* check parameters first */
     if ((dataset != NULL) && (record != NULL))
     {
-        DcmSequenceOfItems *seq1, *seq2;
+        DcmSequenceOfItems *seq1 = NULL;
+        DcmSequenceOfItems *seq2 = NULL;
         /* compare sequence value from dataset and record */
         if (record->findAndGetSequence(key, seq1).good() &&
             dataset->findAndGetSequence(key, seq2).good())
index 2df96eed894f8106956a1d133c62a42729e1a733..819c28381f78e02bd030961ce0c97a3e771ff78e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_LIBC
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_UNIX_H
 #if defined(macintosh) && defined (HAVE_WINSOCK_H)
 /* unix.h defines timeval incompatible with winsock.h */
@@ -1029,10 +1023,12 @@ OFCondition DcmDicomDir::write(const E_TransferSyntax oxfer,
     DcmTag unresSeqTag(DCM_DirectoryRecordSequence);
     DcmSequenceOfItems localUnresRecs(unresSeqTag);
 
-    // insert Media Stored SOP Class UID
+    // insert Media Storage SOP Class UID
     insertMediaSOPUID(metainfo);
 
-    getDirFileFormat().validateMetaInfo(outxfer);
+    // add missing information such as Media Storage SOP Instance UID,
+    // but do not overwrite the value of Media Storage SOP Class UID
+    getDirFileFormat().validateMetaInfo(outxfer, EWM_fileformat);
 
     {
         // it is important that the cache object is destroyed before the file is renamed!
index 3584f7613198365fe586e80fb39ac83c302bb9e4..07e5221132b90cb5e133b4ab5b89e4f83cfcf7c8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dcdicent.h"
 #include "dcmtk/ofstd/ofstd.h"
 
index 5f8357fc4298221c5552c31e29d02155c3e23129..2048fa3dc958197a263e82bf23a6d381e9216ee8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/offile.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 /*
 ** The separator character between fields in the data dictionary file(s)
 */
@@ -46,6 +40,7 @@
 */
 #define DCM_DICT_COMMENT_CHAR '#'
 
+
 /*
 ** THE Global DICOM Data Dictionary
 */
@@ -116,15 +111,6 @@ DcmDataDictionary::DcmDataDictionary(OFBool loadBuiltin, OFBool loadExternal)
     skeletonCount(0),
     dictionaryLoaded(OFFalse)
 {
-    /* Make sure any DCMDICTPATH dictionary is loaded even if loading
-     * of external (default) dictionary is not enabled.
-     */
-    if (!loadExternal)
-    {
-        const char* env = getenv(DCM_DICT_ENVIRONMENT_VARIABLE);
-        if ((env != NULL) && (strlen(env) != 0))
-            loadExternal = OFTrue;
-    }
     reloadDictionaries(loadBuiltin, loadExternal);
 }
 
@@ -152,7 +138,7 @@ stripWhitespace(char* s)
     unsigned char *t;
     unsigned char *p;
     t=p=OFreinterpret_cast(unsigned char *, s);
-    while ((c = *t++)) if (!isspace(c)) *p++ = c;
+    while ((c = *t++) != '\0') if (!isspace(c)) *p++ = c;
     *p = '\0';
   }
 }
@@ -180,7 +166,7 @@ stripLeadingWhitespace(char* s)
     unsigned char *p;
     t=p=OFreinterpret_cast(unsigned char *, s);
     while (isspace(*t)) t++;
-    while ((c = *t++)) *p++ = c;
+    while ((c = *t++) != '\0') *p++ = c;
     *p = '\0';
   }
 }
@@ -602,15 +588,25 @@ DcmDataDictionary::loadExternalDictionaries()
     const char* env = NULL;
     size_t len;
     int sepCnt = 0;
-    OFBool msgIfDictAbsent = OFTrue;
     OFBool loadFailed = OFFalse;
 
+    /* if DCMDICTPATH environment variable should be considered, read it */
+#ifdef DCM_DICT_USE_DCMDICTPATH
     env = getenv(DCM_DICT_ENVIRONMENT_VARIABLE);
+#endif
+    /* if DCMDICTPATH environment variable is not set or empty,
+     * and reading of external dictionary is generally permitted,
+     * try to read dictionary from default path
+     */
     if ((env == NULL) || (strlen(env) == 0)) {
+#if DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_EXTERNAL
         env = DCM_DICT_DEFAULT_PATH;
-        msgIfDictAbsent = OFFalse;
+#endif
     }
 
+    /* if any mechanism for external dictionary (environment or default external)
+     * is actually provided it, parse env and load all dictionaries specified therein.
+     */
     if ((env != NULL) && (strlen(env) != 0)) {
         len = strlen(env);
         for (size_t i = 0; i < len; ++i) {
@@ -620,7 +616,7 @@ DcmDataDictionary::loadExternalDictionaries()
         }
 
         if (sepCnt == 0) {
-            if (!loadDictionary(env, msgIfDictAbsent)) {
+            if (!loadDictionary(env, OFTrue)) {
                 return OFFalse;
             }
         } else {
@@ -633,7 +629,7 @@ DcmDataDictionary::loadExternalDictionaries()
 
             for (int ii = 0; ii < ndicts; ii++) {
                 if ((dictArray[ii] != NULL) && (strlen(dictArray[ii]) > 0)) {
-                    if (!loadDictionary(dictArray[ii], msgIfDictAbsent)) {
+                    if (!loadDictionary(dictArray[ii], OFTrue)) {
                         loadFailed = OFTrue;
                     }
                 }
@@ -818,11 +814,7 @@ void GlobalDcmDataDictionary::createDataDict()
   dataDictLock.wrlock();
 #endif
 
-#ifdef DONT_LOAD_EXTERNAL_DICTIONARIES
-    #error "The macro DONT_LOAD_EXTERNAL_DICTIONARIES has been defined in older versions of DCMTK. Undefine ENABLE_EXTERNAL_DICTIONARY instead."
-#endif
-
-#ifdef ENABLE_EXTERNAL_DICTIONARY
+#if (DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_EXTERNAL) || defined(DCM_DICT_USE_DCMDICTPATH)
   const OFBool loadExternal = OFTrue;
 #else
   const OFBool loadExternal = OFFalse;
index 57e30a45672b7450a795406e84190115e8a7ad5f..78f8b92b53aa709a42bb1fc25b13b961b0ddb56f 100644 (file)
@@ -3,8 +3,8 @@
 ** It was generated automatically by:
 **
 **   User: joergr
-**   Host: thinkpad
-**   Date: 2020-11-24 14:49:53
+**   Host: thinkpad2
+**   Date: 2022-04-12 12:43:37
 **   Prog: /home/joergr/Source/dcmtk-full/public/dcmdata/libsrc/mkdictbi
 **
 **   From: ../data/dicom.dic
@@ -13,7 +13,7 @@
 */
 
 #include "dcmtk/dcmdata/dcdict.h"
-#ifdef ENABLE_BUILTIN_DICTIONARY
+#if DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN
 #include "dcmtk/dcmdata/dcdicent.h"
 
 struct DBI_SimpleEntry {
@@ -468,10 +468,18 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_UI, "SOPClassUID", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0008, 0x0017, 0x0008, 0x0017,
+      EVR_UI, "AcquisitionUID", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0008, 0x0018, 0x0008, 0x0018,
       EVR_UI, "SOPInstanceUID", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0008, 0x0019, 0x0008, 0x0019,
+      EVR_UI, "PyramidUID", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0008, 0x001a, 0x0008, 0x001a,
       EVR_UI, "RelatedGeneralSOPClassUID", 1, -1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -912,6 +920,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_SQ, "AdmittingDiagnosesCodeSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0008, 0x1088, 0x0008, 0x1088,
+      EVR_LO, "PyramidDescription", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0008, 0x1090, 0x0008, 0x1090,
       EVR_LO, "ManufacturerModelName", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -3342,6 +3354,14 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_LT, "CalibrationNotes", 1, 1, "DICOM/DICONDE",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0014, 0x3100, 0x0014, 0x3100,
+      EVR_LT, "LinearityCorrectionTechnique", 1, 1, "DICOM/DICONDE",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0014, 0x3101, 0x0014, 0x3101,
+      EVR_LT, "BeamHardeningCorrectionTechnique", 1, 1, "DICOM/DICONDE",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0014, 0x4002, 0x0014, 0x4002,
       EVR_SQ, "PulserEquipmentSequence", 1, 1, "DICOM/DICONDE",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -3663,15 +3683,15 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0014, 0x40a0, 0x0014, 0x40a0,
-      EVR_LO, "ImageQualityIndicatorType", 1, 1, "DICOM/DICONDE",
+      EVR_LO, "ImageQualityIndicatorType", 1, -1, "DICOM/DICONDE",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0014, 0x40a1, 0x0014, 0x40a1,
-      EVR_LO, "ImageQualityIndicatorMaterial", 1, 1, "DICOM/DICONDE",
+      EVR_LO, "ImageQualityIndicatorMaterial", 1, -1, "DICOM/DICONDE",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0014, 0x40a2, 0x0014, 0x40a2,
-      EVR_LO, "ImageQualityIndicatorSize", 1, 1, "DICOM/DICONDE",
+      EVR_LO, "ImageQualityIndicatorSize", 1, -1, "DICOM/DICONDE",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0014, 0x5002, 0x0014, 0x5002,
@@ -4962,6 +4982,78 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_DS, "CompressionContactArea", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0018, 0x11b0, 0x0018, 0x11b0,
+      EVR_LO, "AcquisitionMode", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11b1, 0x0018, 0x11b1,
+      EVR_LO, "DoseModeName", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11b2, 0x0018, 0x11b2,
+      EVR_CS, "AcquiredSubtractionMaskFlag", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11b3, 0x0018, 0x11b3,
+      EVR_CS, "FluoroscopyPersistenceFlag", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11b4, 0x0018, 0x11b4,
+      EVR_CS, "FluoroscopyLastImageHoldPersistenceFlag", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11b5, 0x0018, 0x11b5,
+      EVR_IS, "UpperLimitNumberOfPersistentFluoroscopyFrames", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11b6, 0x0018, 0x11b6,
+      EVR_CS, "ContrastBolusAutoInjectionTriggerFlag", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11b7, 0x0018, 0x11b7,
+      EVR_FD, "ContrastBolusInjectionDelay", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11b8, 0x0018, 0x11b8,
+      EVR_SQ, "XAAcquisitionPhaseDetailsSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11b9, 0x0018, 0x11b9,
+      EVR_FD, "XAAcquisitionFrameRate", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11ba, 0x0018, 0x11ba,
+      EVR_SQ, "XAPlaneDetailsSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11bb, 0x0018, 0x11bb,
+      EVR_LO, "AcquisitionFieldOfViewLabel", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11bc, 0x0018, 0x11bc,
+      EVR_SQ, "XRayFilterDetailsSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11bd, 0x0018, 0x11bd,
+      EVR_FD, "XAAcquisitionDuration", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11be, 0x0018, 0x11be,
+      EVR_CS, "ReconstructionPipelineType", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11bf, 0x0018, 0x11bf,
+      EVR_SQ, "ImageFilterDetailsSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11c0, 0x0018, 0x11c0,
+      EVR_CS, "AppliedMaskSubtractionFlag", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x0018, 0x11c1, 0x0018, 0x11c1,
+      EVR_SQ, "RequestedSeriesDescriptionCodeSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0018, 0x1200, 0x0018, 0x1200,
       EVR_DA, "DateOfLastCalibration", 1, -1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -4974,6 +5066,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_DT, "DateTimeOfLastCalibration", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0018, 0x1203, 0x0018, 0x1203,
+      EVR_DT, "CalibrationDateTime", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0018, 0x1210, 0x0018, 0x1210,
       EVR_SH, "ConvolutionKernel", 1, -1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -5638,6 +5734,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_FL, "RWaveTimeVector", 1, -1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0018, 0x6070, 0x0018, 0x6070,
+      EVR_US, "ActiveImageAreaOverlayGroup", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0018, 0x7000, 0x0018, 0x7000,
       EVR_CS, "DetectorConditionsNominalFlag", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -6555,7 +6655,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0018, 0x9324, 0x0018, 0x9324,
-      EVR_FD, "EstimatedDoseSaving", 1, 1, "DICOM",
+      EVR_FD, "RETIRED_EstimatedDoseSaving", 1, 1, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0018, 0x9325, 0x0018, 0x9325,
@@ -12004,6 +12104,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_IS, "RETIRED_LUTNumber", 1, 1, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0020, 0x0027, 0x0020, 0x0027,
+      EVR_LO, "PyramidLabel", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0020, 0x0030, 0x0020, 0x0030,
       EVR_DS, "RETIRED_ImagePosition", 3, 3, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -14211,7 +14315,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0022, 0x1642, 0x0022, 0x1642,
-      EVR_UL, "NumberofBscansPerFrame", 1, 1, "DICOM",
+      EVR_UL, "NumberOfBscansPerFrame", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0022, 0x1643, 0x0022, 0x1643,
@@ -18220,6 +18324,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_SQ, "RequestedProcedureCodeSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0032, 0x1065, 0x0032, 0x1065,
+      EVR_SQ, "RequestedLateralityCodeSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0032, 0x1066, 0x0032, 0x1066,
       EVR_UT, "ReasonForVisit", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -19462,6 +19570,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_DT, "ObservationDateTime", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0040, 0xa033, 0x0040, 0xa033,
+      EVR_DT, "ObservationStartDateTime", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0040, 0xa040, 0x0040, 0xa040,
       EVR_CS, "ValueType", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -19851,7 +19963,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0040, 0xa803, 0x0040, 0xa803,
-      EVR_UL, "NumbeOfTableColumns", 1, 1, "DICOM",
+      EVR_UL, "NumberOfTableColumns", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0040, 0xa804, 0x0040, 0xa804,
@@ -21559,15 +21671,15 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0048, 0x0200, 0x0048, 0x0200,
-      EVR_SQ, "ReferencedImageNavigationSequence", 1, 1, "DICOM",
+      EVR_SQ, "RETIRED_ReferencedImageNavigationSequence", 1, 1, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0048, 0x0201, 0x0048, 0x0201,
-      EVR_US, "TopLeftHandCornerOfLocalizerArea", 2, 2, "DICOM",
+      EVR_US, "RETIRED_TopLeftHandCornerOfLocalizerArea", 2, 2, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0048, 0x0202, 0x0048, 0x0202,
-      EVR_US, "BottomRightHandCornerOfLocalizerArea", 2, 2, "DICOM",
+      EVR_US, "RETIRED_BottomRightHandCornerOfLocalizerArea", 2, 2, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0048, 0x0207, 0x0048, 0x0207,
@@ -22167,7 +22279,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0062, 0x0009, 0x0062, 0x0009,
-      EVR_LO, "SegmentAlgorithmName", 1, 1, "DICOM",
+      EVR_LO, "SegmentAlgorithmName", 1, -1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x0062, 0x000a, 0x0062, 0x000a,
@@ -22354,6 +22466,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_OF, "VectorCoordinateData", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x0066, 0x0022, 0x0066, 0x0022,
+      EVR_OD, "DoublePointCoordinatesData", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0066, 0x0023, 0x0066, 0x0023,
       EVR_OW, "RETIRED_TrianglePointIndexList", 1, 1, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -22818,6 +22934,70 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_UR, "RelativeURIReferenceWithinEncapsulatedDocument", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x006a, 0x0001, 0x006a, 0x0001,
+      EVR_CS, "AnnotationCoordinateType", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x0002, 0x006a, 0x0002,
+      EVR_SQ, "AnnotationGroupSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x0003, 0x006a, 0x0003,
+      EVR_UI, "AnnotationGroupUID", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x0005, 0x006a, 0x0005,
+      EVR_LO, "AnnotationGroupLabel", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x0006, 0x006a, 0x0006,
+      EVR_UT, "AnnotationGroupDescription", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x0007, 0x006a, 0x0007,
+      EVR_CS, "AnnotationGroupGenerationType", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x0008, 0x006a, 0x0008,
+      EVR_SQ, "AnnotationGroupAlgorithmIdentificationSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x0009, 0x006a, 0x0009,
+      EVR_SQ, "AnnotationPropertyCategoryCodeSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x000a, 0x006a, 0x000a,
+      EVR_SQ, "AnnotationPropertyTypeCodeSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x000b, 0x006a, 0x000b,
+      EVR_SQ, "AnnotationPropertyTypeModifierCodeSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x000c, 0x006a, 0x000c,
+      EVR_UL, "NumberOfAnnotations", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x000d, 0x006a, 0x000d,
+      EVR_CS, "AnnotationAppliesToAllOpticalPaths", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x000e, 0x006a, 0x000e,
+      EVR_SH, "ReferencedOpticalPathIdentifier", 1, -1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x000f, 0x006a, 0x000f,
+      EVR_CS, "AnnotationAppliesToAllZPlanes", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x0010, 0x006a, 0x0010,
+      EVR_FD, "CommonZCoordinateValue", 1, -1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x006a, 0x0011, 0x006a, 0x0011,
+      EVR_OL, "AnnotationIndexList", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x0070, 0x0001, 0x0070, 0x0001,
       EVR_SQ, "GraphicAnnotationSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -25917,11 +26097,11 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x2130, 0x00a0, 0x2130, 0x00a0,
-      EVR_SQ, "RETIRED_ProposedStudySequence", 1, 1, "DICOM/retired",
+      EVR_SQ, "ProposedStudySequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x2130, 0x00c0, 0x2130, 0x00c0,
-      EVR_SQ, "RETIRED_OriginalImageSequence", 1, 1, "DICOM/retired",
+      EVR_SQ, "OriginalImageSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x2200, 0x0001, 0x2200, 0x0001,
@@ -26285,11 +26465,11 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x3006, 0x0044, 0x3006, 0x0044,
-      EVR_DS, "ContourSlabThickness", 1, 1, "DICOM",
+      EVR_DS, "RETIRED_ContourSlabThickness", 1, 1, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x3006, 0x0045, 0x3006, 0x0045,
-      EVR_DS, "ContourOffsetVector", 3, 3, "DICOM",
+      EVR_DS, "RETIRED_ContourOffsetVector", 3, 3, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x3006, 0x0046, 0x3006, 0x0046,
@@ -26301,7 +26481,11 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x3006, 0x0049, 0x3006, 0x0049,
-      EVR_IS, "AttachedContours", 1, -1, "DICOM",
+      EVR_IS, "RETIRED_AttachedContours", 1, -1, "DICOM/retired",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x3006, 0x004a, 0x3006, 0x004a,
+      EVR_SQ, "SourcePixelPlanesCharacteristicsSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x3006, 0x0050, 0x3006, 0x0050,
@@ -26628,6 +26812,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_SQ, "RecordedBlockSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x3008, 0x00d1, 0x3008, 0x00d1,
+      EVR_SQ, "RecordedBlockSlabSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x3008, 0x00e0, 0x3008, 0x00e0,
       EVR_SQ, "TreatmentSummaryMeasuredDoseReferenceSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -26813,7 +27001,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x300a, 0x000b, 0x300a, 0x000b,
-      EVR_LO, "TreatmentSites", 1, -1, "DICOM",
+      EVR_LO, "RETIRED_TreatmentSites", 1, -1, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x300a, 0x000c, 0x300a, 0x000c,
@@ -27880,6 +28068,10 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_DS, "SourceApplicatorStepSize", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x300a, 0x02a1, 0x300a, 0x02a1,
+      EVR_IS, "ApplicatorShapeReferencedROINumber", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x300a, 0x02a2, 0x300a, 0x02a2,
       EVR_IS, "TransferTubeNumber", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -28593,7 +28785,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x300a, 0x0632, 0x300a, 0x0632,
-      EVR_SQ, "ReferencedRTPatientSetupSequence", 1, 1, "DICOM",
+      EVR_SQ, "RETIRED_ReferencedRTPatientSetupSequence", 1, 1, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x300a, 0x0634, 0x300a, 0x0634,
@@ -28709,7 +28901,7 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x300a, 0x0650, 0x300a, 0x0650,
-      EVR_UI, "PatientSetupUID", 1, 1, "DICOM",
+      EVR_UI, "RETIRED_PatientSetupUID", 1, 1, "DICOM/retired",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
   , { 0x300a, 0x0651, 0x300a, 0x0651,
@@ -29108,6 +29300,114 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_ST, "InterlockOriginDescription", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x300a, 0x0784, 0x300a, 0x0784,
+      EVR_SQ, "RTPatientPositionScopeSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0785, 0x300a, 0x0785,
+      EVR_UI, "ReferencedTreatmentPositionGroupUID", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0786, 0x300a, 0x0786,
+      EVR_US, "RadiationOrderIndex", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0787, 0x300a, 0x0787,
+      EVR_SQ, "OmittedRadiationSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0788, 0x300a, 0x0788,
+      EVR_SQ, "ReasonForOmissionCodeSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0789, 0x300a, 0x0789,
+      EVR_SQ, "RTDeliveryStartPatientPositionSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x078a, 0x300a, 0x078a,
+      EVR_SQ, "RTTreatmentPreparationPatientPositionSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x078b, 0x300a, 0x078b,
+      EVR_SQ, "ReferencedRTTreatmentPreparationSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x078c, 0x300a, 0x078c,
+      EVR_SQ, "ReferencedPatientSetupPhotoSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x078d, 0x300a, 0x078d,
+      EVR_SQ, "PatientTreatmentPreparationMethodCodeSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x078e, 0x300a, 0x078e,
+      EVR_LT, "PatientTreatmentPreparationProcedureParameterDescription", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x078f, 0x300a, 0x078f,
+      EVR_SQ, "PatientTreatmentPreparationDeviceSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0790, 0x300a, 0x0790,
+      EVR_SQ, "PatientTreatmentPreparationProcedureSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0791, 0x300a, 0x0791,
+      EVR_SQ, "PatientTreatmentPreparationProcedureCodeSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0792, 0x300a, 0x0792,
+      EVR_LT, "PatientTreatmentPreparationMethodDescription", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0793, 0x300a, 0x0793,
+      EVR_SQ, "PatientTreatmentPreparationProcedureParameterSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0794, 0x300a, 0x0794,
+      EVR_LT, "PatientSetupPhotoDescription", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0795, 0x300a, 0x0795,
+      EVR_US, "PatientTreatmentPreparationProcedureIndex", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0796, 0x300a, 0x0796,
+      EVR_US, "ReferencedPatientSetupProcedureIndex", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0797, 0x300a, 0x0797,
+      EVR_SQ, "RTRadiationTaskSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0798, 0x300a, 0x0798,
+      EVR_SQ, "RTPatientPositionDisplacementSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x0799, 0x300a, 0x0799,
+      EVR_SQ, "RTPatientPositionSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x079a, 0x300a, 0x079a,
+      EVR_LO, "DisplacementReferenceLabel", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x079b, 0x300a, 0x079b,
+      EVR_FD, "DisplacementMatrix", 16, 16, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x079c, 0x300a, 0x079c,
+      EVR_SQ, "PatientSupportDisplacementSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x079d, 0x300a, 0x079d,
+      EVR_SQ, "DisplacementReferenceLocationCodeSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300a, 0x079e, 0x300a, 0x079e,
+      EVR_CS, "RTRadiationSetDeliveryUsage", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x300c, 0x0002, 0x300c, 0x0002,
       EVR_SQ, "ReferencedRTPlanSequence", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -29244,6 +29544,66 @@ static const DBI_SimpleEntry simpleBuiltinDict[] = {
       EVR_LO, "ReasonForOmissionDescription", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
       NULL }
+  , { 0x300c, 0x0114, 0x300c, 0x0114,
+      EVR_SQ, "PrescriptionOverviewSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0115, 0x300c, 0x0115,
+      EVR_FL, "TotalPrescriptionDose", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0116, 0x300c, 0x0116,
+      EVR_SQ, "PlanOverviewSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0117, 0x300c, 0x0117,
+      EVR_US, "PlanOverviewIndex", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0118, 0x300c, 0x0118,
+      EVR_US, "ReferencedPlanOverviewIndex", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0119, 0x300c, 0x0119,
+      EVR_US, "NumberOfFractionsIncluded", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0120, 0x300c, 0x0120,
+      EVR_SQ, "DoseCalibrationConditionsSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0121, 0x300c, 0x0121,
+      EVR_FD, "AbsorbedDoseToMetersetRatio", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0122, 0x300c, 0x0122,
+      EVR_FD, "DelineatedRadiationFieldSize", 2, 2, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0123, 0x300c, 0x0123,
+      EVR_CS, "DoseCalibrationConditionsVerifiedFlag", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0124, 0x300c, 0x0124,
+      EVR_FD, "CalibrationReferencePointDepth", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0125, 0x300c, 0x0125,
+      EVR_SQ, "GatingBeamHoldTransitionSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0126, 0x300c, 0x0126,
+      EVR_CS, "BeamHoldTransition", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0127, 0x300c, 0x0127,
+      EVR_DT, "BeamHoldTransitionDateTime", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
+  , { 0x300c, 0x0128, 0x300c, 0x0128,
+      EVR_SQ, "BeamHoldOriginatingDeviceSequence", 1, 1, "DICOM",
+      DcmDictRange_Unspecified, DcmDictRange_Unspecified,
+      NULL }
   , { 0x300e, 0x0002, 0x300e, 0x0002,
       EVR_CS, "ApprovalStatus", 1, 1, "DICOM",
       DcmDictRange_Unspecified, DcmDictRange_Unspecified,
@@ -31081,7 +31441,7 @@ DcmDataDictionary::loadBuiltinDictionary()
 }
 
 
-#else // WITH_BUILTIN_DICTIONARY
+#else // DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN
 void
 DcmDataDictionary::loadBuiltinDictionary()
 {
@@ -31089,10 +31449,11 @@ DcmDataDictionary::loadBuiltinDictionary()
  ** Empty Stub.
  **
  ** We don't want a populated built-in data dictionary. In order to enable it,
- ** define WITH_BUILTIN_DICTIONARY. To re-create the builtin dictionary from
- ** a textfile like dicom.dic, use dcmdata/libsrc/mkdictbi.
+ ** define DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN (1).
+ ** To re-create the builtin dictionary from a textfile like dicom.dic,
+ ** use dcmdata/libsrc/mkdictbi.
 */
 }
 
-#endif // WITH_BUILTIN_DICTIONARY
+#endif // DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN
 
index 8bcda4f22ab172f025ffef005caa3b8430ccdd44..e4ea26de5a3b6ac1b744cb87e2fc8d28c114d301 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CCTYPE
-#define INCLUDE_LIBC
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofcast.h"
 #include "dcmtk/ofstd/ofstd.h"
@@ -104,7 +96,8 @@ static const char *DRTypeNames[] =
     "SURFACE SCAN",
     "TRACT",
     "ASSESSMENT",
-    "RADIOTHERAPY"
+    "RADIOTHERAPY",
+    "ANNOTATION"
 };
 
 static const short DIM_OF_DRTypeNames = OFstatic_cast(short, (sizeof(DRTypeNames) / sizeof(DRTypeNames[0])));
@@ -438,6 +431,7 @@ OFCondition DcmDirectoryRecord::checkHierarchy(const E_DirRecType upperRecord,
                 case ERT_Tract:
                 case ERT_Assessment:
                 case ERT_Radiotherapy:
+                case ERT_Annotation:
                 case ERT_Private:
                     l_error = EC_Normal;
                     break;
@@ -535,6 +529,7 @@ OFCondition DcmDirectoryRecord::checkHierarchy(const E_DirRecType upperRecord,
         case ERT_Tract:
         case ERT_Assessment:
         case ERT_Radiotherapy:
+        case ERT_Annotation:
         case ERT_Private:
             switch (lowerRecord)
             {
index 86f6f4442f90d2ff4ce76096af388fbe26e7141e..b55c6cf966ad7d06bbd7f804d945ad12956a7828 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_NEW
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofdefine.h"
 
 #include "dcmtk/ofstd/ofstd.h"
@@ -44,6 +39,8 @@
 #include "dcmtk/dcmdata/vrscan.h"
 #include "dcmtk/dcmdata/dcpath.h"
 
+#include <cstring>                      /* for memset() */
+
 #define SWAPBUFFER_SIZE 16  /* sufficient for all DICOM VRs as per the 2007 edition */
 
 //
@@ -1131,7 +1128,7 @@ OFCondition DcmElement::createEmptyValue(const Uint32 length)
 
         // initialize <length> bytes (which may be odd), not Length (which is always even)
         if (fValue)
-            memzero(fValue, size_t(length));
+            memset(fValue, 0, size_t(length));
         else
             errorFlag = EC_MemoryExhausted;
     }
@@ -1816,14 +1813,21 @@ OFCondition DcmElement::getPartialValue(void *targetBuffer,
     // initialize the cache with new stream
     if (!readStream)
     {
+      // create input stream object
       readStream = fLoadValue->create();
 
       // check that read stream is non-NULL
       if (readStream == NULL) return EC_InvalidStream;
 
       // check that stream status is OK
-      if (readStream->status().bad()) return readStream->status();
+      if (readStream->status().bad())
+      {
+        OFCondition result = readStream->status();
+        delete readStream;
+        return result;
+      }
 
+      // readStream will be deleted when the cache is deleted
       cache->init(readStream, this);
     }
 
@@ -1851,7 +1855,7 @@ OFCondition DcmElement::getPartialValue(void *targetBuffer,
       partialvalue = OFstatic_cast(Uint32, valueWidth - partialoffset);
 
       // we need to read a single data element into the swap buffer
-      if (valueWidth != OFstatic_cast(size_t, readStream->read(swapBuffer, valueWidth)))
+      if (valueWidth != OFstatic_cast(size_t, readStream->read(swapBuffer, OFstatic_cast(offile_off_t, valueWidth))))
           return EC_InvalidStream;
 
       // swap to desired byte order. fByteOrder contains the byte order in file.
@@ -1926,7 +1930,7 @@ OFCondition DcmElement::getPartialValue(void *targetBuffer,
       }
 
       // we need to read a single data element into the swap buffer
-      if (partialBytesToRead != OFstatic_cast(size_t, readStream->read(swapBuffer, partialBytesToRead)))
+      if (partialBytesToRead != OFstatic_cast(size_t, readStream->read(swapBuffer, OFstatic_cast(offile_off_t, partialBytesToRead))))
           return EC_InvalidStream;
 
       if (appendDuplicateByte)
index f4655eaafc09e11ed8c545c53e9838a4b33e7b06..77d60817e64cb71010d89b03d7d8648130542aaf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2018-2020, OFFIS e.V.
+ *  Copyright (C) 2018-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -274,7 +274,11 @@ int DcmEncapsulatedDocument::getCDAData(
         OFLogger &appLogger)
 {
 #ifdef _XMLWIDECHAR
+#ifdef _MSC_VER
+#pragma message("DCMTK compiled with 'wide char XML parser'. cda2dcm will be unable to read and encapsulate CDA documents.")
+#else
 #warning "DCMTK compiled with 'wide char XML parser'. cda2dcm will be unable to read and encapsulate CDA documents."
+#endif
   OFLOG_ERROR(appLogger, "DCMTK compiled with \"wide char XML parser\". Cannot parse CDA data because of incompatible API.");
   return 99;
 #else
index 538cf498130a04104217076e11b5171d79bd67dd..b6f6592706e2e232b2b304e7619e471a425f8008 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -79,6 +79,10 @@ makeOFConditionConst(EC_PixelDataExplLengthIllegal,      OFM_dcmdata, 53, OF_err
 makeOFConditionConst(EC_ElemLengthExceeds32BitField,     OFM_dcmdata, 54, OF_error, "Length of element value exceeds maximum of 32-bit length field" );
 makeOFConditionConst(EC_CannotWriteJsonNumber,           OFM_dcmdata, 55, OF_error, "Cannot write 'nan' or 'inf' as JSON number" );
 makeOFConditionConst(EC_CannotWriteJsonInlineBinary,     OFM_dcmdata, 56, OF_error, "JSON InlineBinary encoding not supported for compressed pixel data" );
+makeOFConditionConst(EC_XMLParseError,                   OFM_dcmdata, 57, OF_error, "XML parse error" );
+makeOFConditionConst(EC_XMLValidationFailure,            OFM_dcmdata, 58, OF_error, "XML validation failure" );
+makeOFConditionConst(EC_SOPClassMismatch,                OFM_dcmdata, 59, OF_error, "SOP class mismatch" );
+makeOFConditionConst(EC_UnknownUIDName,                  OFM_dcmdata, 60, OF_error, "Unknown UID name: No mapping to UID value defined" );
 
 const unsigned short EC_CODE_CannotSelectCharacterSet     = 35;
 const unsigned short EC_CODE_CannotConvertCharacterSet    = 36;
index 4b6b648993213da26a4dfb9fd0e5b31b8074d519..52ed38127d362c130e5ab925a628ed51f4e92f72 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CTIME
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmdata/dcfilefo.h"
 #include "dcmtk/dcmdata/dcitem.h"
 
 #include "dcmtk/dcmdata/dcdeftag.h"
 #include "dcmtk/dcmdata/dcuid.h"
-#include "dcmtk/dcmdata/dcostrma.h"    /* for class DcmOutputStream */
-#include "dcmtk/dcmdata/dcostrmf.h"    /* for class DcmOutputFileStream */
 #include "dcmtk/dcmdata/dcistrma.h"    /* for class DcmInputStream */
 #include "dcmtk/dcmdata/dcistrmf.h"    /* for class DcmInputFileStream */
+#include "dcmtk/dcmdata/dcistrms.h"    /* for class DcmStdinStream */
+#include "dcmtk/dcmdata/dcostrma.h"    /* for class DcmOutputStream */
+#include "dcmtk/dcmdata/dcostrmf.h"    /* for class DcmOutputFileStream */
+#include "dcmtk/dcmdata/dcostrms.h"    /* for class DcmStdoutStream */
 #include "dcmtk/dcmdata/dcwcache.h"    /* for class DcmWriteCache */
 #include "dcmtk/dcmdata/dcjson.h"
 
@@ -243,10 +238,10 @@ OFCondition DcmFileFormat::writeJson(STD_NAMESPACE ostream &out,
         if (metinf)
         {
           status = metinf->writeJsonExt(out, format, OFFalse, OFFalse);
-          out << format.newline();
         }
         if (dset && status.good())
         {
+            if (metinf && (metinf->card() > 0) && (dset->card() > 0)) out << "," << format.newline();
             status = dset->writeJsonExt(out, format, OFFalse, OFFalse);
         }
         out << format.newline() << format.indent() << "}" << format.newline();
@@ -736,6 +731,9 @@ OFCondition DcmFileFormat::readUntilTag(DcmInputStream &inStream,
                 errorFlag = metaInfo->read(inStream, EXS_Unknown, glenc, maxReadLength);
             }
 
+            // bail out if the meta-header is still incomplete or an error occurred
+            if (errorFlag.bad()) return errorFlag;
+
             // determine xfer from tag (0002,0010) in the meta header
             newxfer = lookForXfer(metaInfo);
             if ((FileReadMode == ERM_fileOnly) || (FileReadMode == ERM_metaOnly))
@@ -909,12 +907,11 @@ OFCondition DcmFileFormat::loadFileUntilTag(
     /* check parameters first */
     if (!fileName.isEmpty())
     {
-        /* open file for input */
-        DcmInputFileStream fileStream(fileName);
-        /* check stream status */
-        l_error = fileStream.status();
-        if (l_error.good())
+        if (fileName.isStandardStream())
         {
+            /* use stdin stream */
+            DcmStdinStream inStream;
+
             /* clear this object */
             l_error = clear();
             if (l_error.good())
@@ -922,13 +919,48 @@ OFCondition DcmFileFormat::loadFileUntilTag(
                 /* save old value */
                 const E_FileReadMode oldMode = FileReadMode;
                 FileReadMode = readMode;
-                /* read data from file */
+
+                /* initialize transfer */
                 transferInit();
-                l_error = readUntilTag(fileStream, readXfer, groupLength, maxReadLength, stopParsingAtElement);
+
+                do
+                {
+                  /* fill the buffer from stdin */
+                  inStream.fillBuffer();
+                  /* and read the buffer content into the DICOM dataset */
+                  l_error = readUntilTag(inStream, readXfer, groupLength, maxReadLength, stopParsingAtElement);
+                } while (l_error == EC_StreamNotifyClient); /* repeat until we're at the end of the stream, or an error occurs */
+
+                /* end transfer */
                 transferEnd();
+
                 /* restore old value */
                 FileReadMode = oldMode;
             }
+
+        } else {
+            /* open file for output */
+            DcmInputFileStream fileStream(fileName);
+
+            /* check stream status */
+            l_error = fileStream.status();
+            if (l_error.good())
+            {
+                /* clear this object */
+                l_error = clear();
+                if (l_error.good())
+                {
+                    /* save old value */
+                    const E_FileReadMode oldMode = FileReadMode;
+                    FileReadMode = readMode;
+                    /* read data from file */
+                    transferInit();
+                    l_error = readUntilTag(fileStream, readXfer, groupLength, maxReadLength, stopParsingAtElement);
+                    transferEnd();
+                    /* restore old value */
+                    FileReadMode = oldMode;
+                }
+            }
         }
     }
     return l_error;
@@ -954,20 +986,28 @@ OFCondition DcmFileFormat::saveFile(const OFFilename &fileName,
     if (!fileName.isEmpty())
     {
         DcmWriteCache wcache;
+        DcmOutputStream *fileStream;
 
-        /* open file for output */
-        DcmOutputFileStream fileStream(fileName);
+        if (fileName.isStandardStream())
+        {
+            /* use stdout stream */
+            fileStream = new DcmStdoutStream(fileName);
+        } else {
+            /* open file for output */
+            fileStream = new DcmOutputFileStream(fileName);
+        }
 
         /* check stream status */
-        l_error = fileStream.status();
+        l_error = fileStream->status();
         if (l_error.good())
         {
             /* write data to file */
             transferInit();
-            l_error = write(fileStream, writeXfer, encodingType, &wcache, groupLength,
+            l_error = write(*fileStream, writeXfer, encodingType, &wcache, groupLength,
                 padEncoding, padLength, subPadLength, 0 /*instanceLength*/, writeMode);
             transferEnd();
         }
+        delete fileStream;
     }
     return l_error;
 }
index 010b9f624826bb97e50aa1a07d7c32148198ea11..e3e368e16f1fdb4482c916a985afa9fd23a9895f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2011, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcdicent.h"
 #include "dcmtk/dcmdata/dctypes.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CASSERT
-#include "dcmtk/ofstd/ofstdinc.h"
-
 /*
 ** DcmDictEntryList
 */
index 61dba66bb646a2121521fa832222853775a1bb49..daed3ce7ad491f230e05200570c8057b9a7d2b93 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2012, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/dcmdata/dcistrmf.h"
+#include "dcmtk/dcmdata/dcistrmb.h"
 #include "dcmtk/dcmdata/dcerror.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CERRNO
-#include "dcmtk/ofstd/ofstdinc.h"
-
+BEGIN_EXTERN_C
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+END_EXTERN_C
 
 DcmFileProducer::DcmFileProducer(const OFFilename &filename, offile_off_t offset)
 : DcmProducer()
@@ -88,7 +93,7 @@ offile_off_t DcmFileProducer::read(void *buf, offile_off_t buflen)
   offile_off_t result = 0;
   if (status_.good() && file_.open() && buf && buflen)
   {
-    result = file_.fread(buf, 1, OFstatic_cast(size_t, buflen));
+    result = OFstatic_cast(offile_off_t, file_.fread(buf, 1, OFstatic_cast(size_t, buflen)));
   }
   return result;
 }
diff --git a/dcmdata/libsrc/dcistrms.cc b/dcmdata/libsrc/dcistrms.cc
new file mode 100644 (file)
index 0000000..28741a2
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ *
+ *  Copyright (C) 2002-2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmdata
+ *
+  *  Author:  Jasper den Otter, Marco Eichelberg
+ *
+ *  Purpose: DcmStdinStream and related classes,
+ *    implements streamed input from stdin.
+ *
+ */
+
+#include "dcmtk/config/osconfig.h"
+#include "dcmtk/dcmdata/dcistrms.h"
+#include "dcmtk/dcmdata/dcerror.h"
+
+BEGIN_EXTERN_C
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+END_EXTERN_C
+
+// size of the buffer we use to read from stdin
+#define DCMSTDINSTREAMBUFSIZE 32768
+
+DcmStdinStream::DcmStdinStream()
+: DcmInputStream(&producer_) // safe because DcmInputStream only stores pointer
+, producer_()
+, buf_(new unsigned char[DCMSTDINSTREAMBUFSIZE])
+{
+#ifdef _WIN32
+    // Set "stdin" to binary mode
+    int result = setmode(fileno(stdin), O_BINARY);
+    if (result == -1) DCMDATA_ERROR("Failed to switch stdin to binary mode");
+#endif
+}
+
+DcmStdinStream::~DcmStdinStream()
+{
+  delete[] buf_;
+}
+
+DcmInputStreamFactory *DcmStdinStream::newFactory() const
+{
+  // we don't support delayed loading from stdin streams
+  return NULL;
+}
+
+void DcmStdinStream::fillBuffer()
+{
+  // if there are a few bytes left in the previous buffer, make the
+  // buffer producer make a backup copy
+  producer_.releaseBuffer();
+
+  // read the next block from stdin
+  size_t numBytes = fread(buf_, 1, DCMSTDINSTREAMBUFSIZE, stdin);
+
+  // make the buffer available to the buffer producer
+  producer_.setBuffer(buf_, OFstatic_cast(offile_off_t, numBytes));
+
+  // check if we are at the end of stream, and if so, notify the buffer producer
+  if (feof(stdin)) producer_.setEos();
+
+  // if there is a compression filter, the following call will
+  // cause it to feed the compression engine with data from the
+  // new buffer.
+  skip(0);
+}
+
index 045f3c93f717f7cb198130835d108dcb44e544c2..8ddf1ae70e0c7be3459590e677f728c276dc4f77 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dcitem.h"
-#include "dcmtk/ofstd/ofdefine.h"     /* for memzero() */
 #include "dcmtk/dcmdata/dcdeftag.h"   /* for name constants */
 #include "dcmtk/dcmdata/dcistrma.h"   /* for class DcmInputStream */
 #include "dcmtk/dcmdata/dcobject.h"
@@ -80,6 +73,8 @@
 #include "dcmtk/ofstd/ofcast.h"
 #include "dcmtk/ofstd/ofstd.h"
 
+#include <cstring>                    /* for memset() */
+
 // ********************************
 
 
@@ -964,7 +959,7 @@ OFCondition DcmItem::computeGroupLengthAndPadding(const E_GrpLenEncoding glenc,
 
                 /* create an array of a corresponding size and set the array fields */
                 Uint8 * padBytes = new Uint8[padding];
-                memzero(padBytes, size_t(padding));
+                memset(padBytes, 0, size_t(padding));
 
                 /* set information in the above created padding element (size and actual value) */
                 paddingEl->putUint8Array(padBytes, padding);
@@ -1463,7 +1458,11 @@ OFCondition DcmItem::readUntilTag(DcmInputStream & inStream,
                 /* tag and length (and possibly VR) information as well as maybe some data */
                 /* data value information. We need to continue reading the data value */
                 /* information for this particular element. */
-                errorFlag = elementList->get()->read(inStream, xfer, glenc, maxReadLength);
+                DcmObject *dO = elementList->get();
+                if (dO)
+                  errorFlag = dO->read(inStream, xfer, glenc, maxReadLength);
+                  else errorFlag = EC_InternalError; // should never happen
+
                 /* if reading was successful, we read the entire information */
                 /* for this element; hence lastElementComplete is true */
                 if (errorFlag.good())
@@ -2509,7 +2508,7 @@ OFCondition DcmItem::findAndGetUint8Array(const DcmTagKey& tagKey,
     if (count != NULL)
     {
         if (status.good())
-            *count = elem->getNumberOfValues();
+            *count = elem->getLength() / sizeof(Uint8);
         else
             *count = 0;
     }
@@ -2559,8 +2558,11 @@ OFCondition DcmItem::findAndGetUint16Array(const DcmTagKey& tagKey,
     if (count != NULL)
     {
         if (status.good())
-            *count = elem->getNumberOfValues();
-        else
+        {
+            /* don't use getNumberOfValues() because of OB/OW for pixel data
+             * and since AT uses two 16-bit integers per value */
+            *count = elem->getLength() / sizeof(Uint16);
+        } else
             *count = 0;
     }
     /* reset value */
@@ -2609,7 +2611,7 @@ OFCondition DcmItem::findAndGetSint16Array(const DcmTagKey& tagKey,
     if (count != NULL)
     {
         if (status.good())
-            *count = elem->getNumberOfValues();
+            *count = elem->getLength() / sizeof(Sint16);
         else
             *count = 0;
     }
@@ -2659,7 +2661,7 @@ OFCondition DcmItem::findAndGetUint32Array(const DcmTagKey& tagKey,
     if (count != NULL)
     {
         if (status.good())
-            *count = elem->getNumberOfValues();
+            *count = elem->getLength() / sizeof(Uint32);
         else
             *count = 0;
     }
@@ -2709,7 +2711,7 @@ OFCondition DcmItem::findAndGetSint32Array(const DcmTagKey& tagKey,
     if (count != NULL)
     {
         if (status.good())
-            *count = elem->getNumberOfValues();
+            *count = elem->getLength() / sizeof(Sint32);
         else
             *count = 0;
     }
@@ -2759,7 +2761,7 @@ OFCondition DcmItem::findAndGetUint64Array(const DcmTagKey& tagKey,
     if (count != NULL)
     {
         if (status.good())
-            *count = elem->getNumberOfValues();
+            *count = elem->getLength() / sizeof(Uint64);
         else
             *count = 0;
     }
@@ -2809,7 +2811,7 @@ OFCondition DcmItem::findAndGetSint64Array(const DcmTagKey& tagKey,
     if (count != NULL)
     {
         if (status.good())
-            *count = elem->getNumberOfValues();
+            *count = elem->getLength() / sizeof(Sint64);
         else
             *count = 0;
     }
@@ -2909,7 +2911,7 @@ OFCondition DcmItem::findAndGetFloat32Array(const DcmTagKey& tagKey,
     if (count != NULL)
     {
         if (status.good())
-            *count = elem->getNumberOfValues();
+            *count = elem->getLength() / sizeof(Float32);
         else
             *count = 0;
     }
@@ -2959,7 +2961,7 @@ OFCondition DcmItem::findAndGetFloat64Array(const DcmTagKey& tagKey,
     if (count != NULL)
     {
         if (status.good())
-            *count = elem->getNumberOfValues();
+            *count = elem->getLength() / sizeof(Float64);
         else
             *count = 0;
     }
index 2b202640299b616ca18812df449d9b352d05e86e..7498e82b5910f10998610014b133fd72c0cde262 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016-2020, OFFIS e.V.
+ *  Copyright (C) 2016-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
 #include "dcmtk/dcmdata/dcjson.h"
-
-#define INCLUDE_CASSERT
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofdefine.h"
 #include "dcmtk/ofstd/ofstring.h"
 
+#include <cassert>
+
 void DcmJsonFormat::escapeControlCharacters(STD_NAMESPACE ostream &out, const OFString &value)
 {
     // escapes all forbidden control characters in JSON
index 8bef02b5933b8228911aee3e8139712260c18c2d..0545866a73bcdfa1df4323e464a936fff705fe7e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -22,9 +22,7 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cstring>                    /* for memset() */
 
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofstd.h"
@@ -237,7 +235,7 @@ OFCondition DcmMetaInfo::writeJson(STD_NAMESPACE ostream &out,
 
 void DcmMetaInfo::setPreamble()
 {
-    memzero(filePreamble, sizeof(filePreamble));
+    memset(filePreamble, 0, sizeof(filePreamble));
     preambleUsed = OFFalse;
 }
 
index 13f4baebe2b9a93eff88cfc4594e9f0283222518..758596b4fd61e7a1250303ee7d1f86bb8404d125 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcistrma.h"    /* for class DcmInputStream */
 #include "dcmtk/dcmdata/dcostrma.h"    /* for class DcmOutputStream */
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_IOMANIP
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 // global flags
 
 OFGlobal<OFBool>    dcmEnableAutomaticInputDataCorrection(OFTrue);
index ac6ef7a2f19d9cb5c51ffae2332acde3c415ecbd..5c71bbddc85ccb86f74ab4ba643150eb92d0c73d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2017, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/dcmdata/dcostrmf.h"
 #include "dcmtk/dcmdata/dcerror.h"
+#include "dcmtk/ofstd/ofconsol.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
+BEGIN_EXTERN_C
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+END_EXTERN_C
 
 
 DcmFileConsumer::DcmFileConsumer(const OFFilename &filename)
@@ -142,3 +149,4 @@ DcmOutputFileStream::~DcmOutputFileStream()
   }
 #endif
 }
+
diff --git a/dcmdata/libsrc/dcostrms.cc b/dcmdata/libsrc/dcostrms.cc
new file mode 100644 (file)
index 0000000..cee83b3
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ *
+ *  Copyright (C) 2002-2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Jasper den Otter, Marco Eichelberg
+ *
+ *  Purpose: DcmStdoutStream and related classes,
+ *    implements streamed output to stdout.
+ *
+ */
+
+#include "dcmtk/config/osconfig.h"
+#include "dcmtk/dcmdata/dcostrms.h"
+#include "dcmtk/dcmdata/dcerror.h"
+#include "dcmtk/ofstd/ofconsol.h"
+
+BEGIN_EXTERN_C
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+END_EXTERN_C
+
+
+DcmStdoutConsumer::DcmStdoutConsumer(const OFFilename & /* filename */)
+: DcmConsumer()
+, file_()
+, status_(EC_Normal)
+{
+#ifdef _WIN32
+    // Set "stdout" to binary mode
+    int result = setmode(fileno(stdout), O_BINARY);
+    if (result == -1) DCMDATA_ERROR("Failed to switch stdout to binary mode");
+#endif
+}
+
+DcmStdoutConsumer::DcmStdoutConsumer(FILE *file)
+: DcmConsumer()
+, file_(file)
+, status_(EC_Normal)
+{
+}
+
+DcmStdoutConsumer::~DcmStdoutConsumer()
+{
+}
+
+OFBool DcmStdoutConsumer::good() const
+{
+  return status_.good();
+}
+
+OFCondition DcmStdoutConsumer::status() const
+{
+  return status_;
+}
+
+OFBool DcmStdoutConsumer::isFlushed() const
+{
+  return OFTrue;
+}
+
+offile_off_t DcmStdoutConsumer::avail() const
+{
+  // since we cannot report "unlimited", let's claim that we can still write 2GB.
+  // Note that offile_off_t is a signed type.
+  return 2147483647L;
+}
+
+offile_off_t DcmStdoutConsumer::write(const void *buf, offile_off_t buflen)
+{
+  return OFstatic_cast(offile_off_t, fwrite(buf, 1, OFstatic_cast(size_t, buflen), stdout));
+}
+
+void DcmStdoutConsumer::flush()
+{
+  fflush(stdout);
+}
+
+/* ======================================================================= */
+
+DcmStdoutStream::DcmStdoutStream(const OFFilename &filename)
+: DcmOutputStream(&consumer_) // safe because DcmStdoutStream only stores pointer
+, consumer_(filename)
+{
+}
+
+DcmStdoutStream::DcmStdoutStream(FILE *file)
+: DcmOutputStream(&consumer_) // safe because DcmStdoutStream only stores pointer
+, consumer_(file)
+{
+}
+
+DcmStdoutStream::~DcmStdoutStream()
+{
+  // last attempt to flush stream before file is closed
+  flush();
+#ifdef DEBUG
+  if (! isFlushed())
+  {
+    DCMDATA_WARN("closing unflushed DcmStdoutStream, loss of data!");
+  }
+#endif
+}
index 6d97682e69a124e2de807678fcc585f7364f8b0b..213a04d5f7d4ea8ac6d2eb12f4dcce8e30ac9f59 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2008-2020, OFFIS e.V.
+ *  Copyright (C) 2008-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,9 +25,6 @@
 #include "dcmtk/dcmdata/dcpath.h"
 #include "dcmtk/dcmdata/dcsequen.h"
 
-#define INCLUDE_CINTTYPES
-#include "dcmtk/ofstd/ofstdinc.h"
-
 /*******************************************************************/
 /*              Implementation of class DcmPath                    */
 /*******************************************************************/
index 42d1f6b67842cea2a9e02c55849b299bca32a207..b439569b12a5505085e727d41faafbf28ab76b15 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2011, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofuuid.h"
 
index 936ab2744195eba2401cb19644cd053fb3a2a06d..b4a52a6a8b510f1d2396f77ea0cd0b7ec599f419 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmdata/dcpxitem.h"
 #include "dcmtk/dcmdata/dcswap.h"
index 30a5a64c8590b2750f4b932c47281be5e6a42610..3c017354db0f131dcc5b05ebf000ea4620a424d6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2020, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcitem.h"
 #include "dcmtk/ofstd/ofstd.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 typedef OFList<DcmRLEEncoder *> DcmRLEEncoderList;
 typedef OFListIterator(DcmRLEEncoder *) DcmRLEEncoderListIterator;
 
index 840cf6394874cbedf0e70f074f7f6b76e910446a..18db9f793f6eab411de8e89db7054aa43555a200 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/ofcast.h"
index 44514470832ae2f10add76eb0ddda1ed54ed0c7c..ec6751c4acf68ea5e01052663413f933191994a0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2010, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -21,8 +21,6 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/ofstd/ofcast.h"
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmdata/dcstack.h"
index 3a4692a71bb8f776433e3b57e538c6fcdf8a3352..00010030ac8f765794a68fe35acbd32508ec6b95 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcdicent.h"
 #include "dcmtk/ofstd/ofstd.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 DcmTag::DcmTag()
   : vr(EVR_UNKNOWN),
     tagName(NULL),
index a9090cf74c9ad8ec346a0f4eb8470e8d5ee11837..191d18363b0ad5c10f6e4196e474b78d61f62643 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2011, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dctagkey.h"
 #include "dcmtk/ofstd/ofstd.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 /*
  * DcmTagKey member functions
  */
index 6e2cb9028408eefc4df88284b47e4a1029e0560b..94263a058b649bcdb0108af414bcde6227648958 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include <ws2tcpip.h>
 #endif
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CTIME
-#define INCLUDE_LIBC
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
@@ -198,6 +190,7 @@ static const UIDNameMap uidNameMap[] = {
     { UID_EnhancedSRStorage,                                   "EnhancedSRStorage" },
     { UID_EnhancedUSVolumeStorage,                             "EnhancedUSVolumeStorage" },
     { UID_EnhancedXAImageStorage,                              "EnhancedXAImageStorage" },
+    { UID_EnhancedXRayRadiationDoseSRStorage,                  "EnhancedXRayRadiationDoseSRStorage" },
     { UID_EnhancedXRFImageStorage,                             "EnhancedXRFImageStorage" },
     { UID_ExtensibleSRStorage,                                 "ExtensibleSRStorage" },
     { UID_GeneralAudioWaveformStorage,                         "GeneralAudioWaveformStorage" },
@@ -222,6 +215,7 @@ static const UIDNameMap uidNameMap[] = {
     { UID_MacularGridThicknessAndVolumeReportStorage,          "MacularGridThicknessAndVolumeReportStorage" },
     { UID_MammographyCADSRStorage,                             "MammographyCADSRStorage" },
     { UID_MediaStorageDirectoryStorage,                        "MediaStorageDirectoryStorage" },
+    { UID_MicroscopyBulkSimpleAnnotationsStorage,              "MicroscopyBulkSimpleAnnotationsStorage" },
     { UID_MRImageStorage,                                      "MRImageStorage" },
     { UID_MRSpectroscopyStorage,                               "MRSpectroscopyStorage" },
     { UID_MultichannelRespiratoryWaveformStorage,              "MultichannelRespiratoryWaveformStorage" },
@@ -266,9 +260,11 @@ static const UIDNameMap uidNameMap[] = {
     { UID_RTPlanStorage,                                       "RTPlanStorage" },
     { UID_RTRadiationRecordSetStorage,                         "RTRadiationRecordSetStorage" },
     { UID_RTRadiationSalvageRecordStorage,                     "RTRadiationSalvageRecordStorage" },
+    { UID_RTRadiationSetDeliveryInstructionStorage,            "RTRadiationSetDeliveryInstructionStorage" },
     { UID_RTRadiationSetStorage,                               "RTRadiationSetStorage" },
     { UID_RTSegmentAnnotationStorage,                          "RTSegmentAnnotationStorage" },
     { UID_RTStructureSetStorage,                               "RTStructureSetStorage" },
+    { UID_RTTreatmentPreparationStorage,                       "RTTreatmentPreparationStorage" },
     { UID_RTTreatmentSummaryRecordStorage,                     "RTTreatmentSummaryRecordStorage" },
     { UID_SecondaryCaptureImageStorage,                        "SecondaryCaptureImageStorage" },
     { UID_SegmentationStorage,                                 "SegmentationStorage" },
@@ -301,6 +297,8 @@ static const UIDNameMap uidNameMap[] = {
     { UID_VolumeRenderingVolumetricPresentationStateStorage,   "VolumeRenderingVolumetricPresentationStateStorage" },
     { UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, "WideFieldOphthalmicPhotographyStereographicProjectionImageStorage" },
     { UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, "WideFieldOphthalmicPhotography3DCoordinatesImageStorage" },
+    { UID_XADefinedProcedureProtocolStorage,                   "XADefinedProcedureProtocolStorage" },
+    { UID_XAPerformedProcedureProtocolStorage,                 "XAPerformedProcedureProtocolStorage" },
     { UID_XAXRFGrayscaleSoftcopyPresentationStateStorage,      "XAXRFGrayscaleSoftcopyPresentationStateStorage" },
     { UID_XRay3DAngiographicImageStorage,                      "XRay3DAngiographicImageStorage" },
     { UID_XRay3DCraniofacialImageStorage,                      "XRay3DCraniofacialImageStorage" },
@@ -542,6 +540,7 @@ static const UIDNameMap uidNameMap[] = {
     { UID_ICBM452T1FrameOfReference,                           "ICBM452T1FrameOfReference" },
     { UID_ICBMSingleSubjectMRIFrameOfReference,                "ICBMSingleSubjectMRIFrameOfReference" },
     { UID_IEC61217FixedCoordinateSystemFrameOfReference,       "IEC61217FixedCoordinateSystemFrameOfReference" },
+    { UID_IEC61217TableTopCoordinateSystemFrameOfReference,    "IEC61217TableTopCoordinateSystemFrameOfReference" },
     { UID_SPM2AVG152PDFrameOfReference,                        "SPM2AVG152PDFrameOfReference" },
     { UID_SPM2AVG152T1FrameOfReference,                        "SPM2AVG152T1FrameOfReference" },
     { UID_SPM2AVG152T2FrameOfReference,                        "SPM2AVG152T2FrameOfReference" },
@@ -661,6 +660,7 @@ const char* dcmAllStorageSOPClassUIDs[] = {
     UID_EnhancedSRStorage,
     UID_EnhancedUSVolumeStorage,
     UID_EnhancedXAImageStorage,
+    UID_EnhancedXRayRadiationDoseSRStorage,
     UID_EnhancedXRFImageStorage,
     UID_ExtensibleSRStorage,
     UID_GeneralAudioWaveformStorage,
@@ -680,6 +680,7 @@ const char* dcmAllStorageSOPClassUIDs[] = {
     UID_LensometryMeasurementsStorage,
     UID_MacularGridThicknessAndVolumeReportStorage,
     UID_MammographyCADSRStorage,
+    UID_MicroscopyBulkSimpleAnnotationsStorage,
     UID_MRImageStorage,
     UID_MRSpectroscopyStorage,
     UID_MultichannelRespiratoryWaveformStorage,
@@ -723,9 +724,11 @@ const char* dcmAllStorageSOPClassUIDs[] = {
     UID_RTPlanStorage,
     UID_RTRadiationRecordSetStorage,
     UID_RTRadiationSalvageRecordStorage,
+    UID_RTRadiationSetDeliveryInstructionStorage,
     UID_RTRadiationSetStorage,
     UID_RTSegmentAnnotationStorage,
     UID_RTStructureSetStorage,
+    UID_RTTreatmentPreparationStorage,
     UID_RTTreatmentSummaryRecordStorage,
     UID_SecondaryCaptureImageStorage,
     UID_SegmentationStorage,
@@ -758,6 +761,7 @@ const char* dcmAllStorageSOPClassUIDs[] = {
     UID_VolumeRenderingVolumetricPresentationStateStorage,
     UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage,
     UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage,
+    UID_XAPerformedProcedureProtocolStorage,
     UID_XAXRFGrayscaleSoftcopyPresentationStateStorage,
     UID_XRay3DAngiographicImageStorage,
     UID_XRay3DCraniofacialImageStorage,
@@ -818,6 +822,7 @@ const char* dcmNonPatientStorageSOPClassUIDs[] = {
     UID_ImplantAssemblyTemplateStorage,
     UID_ImplantTemplateGroupStorage,
     UID_ProtocolApprovalStorage,
+    UID_XADefinedProcedureProtocolStorage,
     // end marker (important!)
     NULL
 };
@@ -955,8 +960,10 @@ const char* dcmLongSCUStorageSOPClassUIDs[] = {
 //  UID_EncapsulatedMTLStorage,
 //  UID_EncapsulatedOBJStorage,
 //  UID_EncapsulatedSTLStorage,
+//  UID_EnhancedXRayRadiationDoseSRStorage,
 //  UID_ExtensibleSRStorage,
-//  UID_GrayscalePlanarMPRVolumetricPresentationStateStorage
+//  UID_GrayscalePlanarMPRVolumetricPresentationStateStorage,
+//  UID_MicroscopyBulkSimpleAnnotationsStorage,
 //  UID_MultichannelRespiratoryWaveformStorage,
 //  UID_MultipleVolumeRenderingVolumetricPresentationStateStorage,
 //  UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage,
@@ -973,8 +980,10 @@ const char* dcmLongSCUStorageSOPClassUIDs[] = {
 //  UID_RTPhysicianIntentStorage,
 //  UID_RTRadiationRecordSetStorage,
 //  UID_RTRadiationSalvageRecordStorage,
+//  UID_RTRadiationSetDeliveryInstructionStorage,
 //  UID_RTRadiationSetStorage,
 //  UID_RTSegmentAnnotationStorage,
+//  UID_RTTreatmentPreparationStorage,
 //  UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage,
 //  UID_SimplifiedAdultEchoSRStorage,
 //  UID_SleepElectroencephalogramWaveformStorage,
@@ -984,6 +993,7 @@ const char* dcmLongSCUStorageSOPClassUIDs[] = {
 //  UID_VolumeRenderingVolumetricPresentationStateStorage,
 //  UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage,
 //  UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage,
+//  UID_XAPerformedProcedureProtocolStorage,
     // non-patient
 //  UID_ColorPaletteStorage,
 //  UID_CTDefinedProcedureProtocolStorage,
@@ -992,6 +1002,7 @@ const char* dcmLongSCUStorageSOPClassUIDs[] = {
 //  UID_ImplantAssemblyTemplateStorage,
 //  UID_ImplantTemplateGroupStorage,
 //  UID_ProtocolApprovalStorage,
+//  UID_XADefinedProcedureProtocolStorage,
     // retired
     UID_RETIRED_HardcopyColorImageStorage,
     UID_RETIRED_HardcopyGrayscaleImageStorage,
@@ -1211,8 +1222,8 @@ const int numberOfDcmImageSOPClassUIDs = OFstatic_cast(int, sizeof(dcmImageSOPCl
 
 
 typedef struct {
-    const char *sopClass;
-    const char *modality;
+    const char *sopClass;       /* official UID value */
+    const char *modality;       /* short character code */
     unsigned long averageSize;  /* can be way, way out */
 } DcmModalityTable;
 
@@ -1225,198 +1236,204 @@ typedef struct {
 ** the size of an image being transmitted).
 */
 static const DcmModalityTable modalities[] = {
-    { UID_AcquisitionContextSRStorage,                             "SRa", 4096 },
-    { UID_AdvancedBlendingPresentationStateStorage,                "PSa", 4096 },
-    { UID_AmbulatoryECGWaveformStorage,                            "ECA", 4096 },
-    { UID_ArterialPulseWaveformStorage,                            "WVa", 4096 },
-    { UID_AutorefractionMeasurementsStorage,                       "OPa", 4096 },
-    { UID_BasicStructuredDisplayStorage,                           "SD",  4096 },
-    { UID_BasicTextSRStorage,                                      "SRt", 4096 },
-    { UID_BasicVoiceAudioWaveformStorage,                          "AUV", 4096 },
-    { UID_BlendingSoftcopyPresentationStateStorage,                "PSb", 4096 },
-    { UID_BodyPositionWaveformStorage,                             "WVb", 4096 },
-    { UID_BreastProjectionXRayImageStorageForPresentation,         "BX",  4096 * 4096 * 2 },
-    { UID_BreastProjectionXRayImageStorageForProcessing,           "BP",  4096 * 4096 * 2 },
-    { UID_BreastTomosynthesisImageStorage,                         "BT",  4096 * 4096 * 2 },
-    { UID_CardiacElectrophysiologyWaveformStorage,                 "WVc", 4096 },
-    { UID_CArmPhotonElectronRadiationRecordStorage,                "RRc", 4096 },
-    { UID_CArmPhotonElectronRadiationStorage,                      "Rca", 4096 },
-    { UID_ChestCADSRStorage,                                       "SRh", 4096 },
-    { UID_ColonCADSRStorage,                                       "SRo", 4096 },
-    { UID_ColorPaletteStorage,                                     "CP",  4096 },
-    { UID_ColorSoftcopyPresentationStateStorage,                   "PSc", 4096 },
-    { UID_CompositingPlanarMPRVolumetricPresentationStateStorage,  "VPc", 4096 },
-    { UID_Comprehensive3DSRStorage,                                "SR3", 4096 },
-    { UID_ComprehensiveSRStorage,                                  "SRc", 4096 },
-    { UID_ComputedRadiographyImageStorage,                         "CR",  2048 * 2048 * 2 },
-    { UID_ContentAssessmentResultsStorage,                         "AS",  4096 },
-    { UID_CornealTopographyMapStorage,                             "CM",  512 * 512 },
-    { UID_CTDefinedProcedureProtocolStorage,                       "PPd", 4096 },
-    { UID_CTImageStorage,                                          "CT",  512 * 512 * 2 },
-    { UID_CTPerformedProcedureProtocolStorage,                     "PPp", 4096 },
-    { UID_DeformableSpatialRegistrationStorage,                    "RGd", 4096 },
-    { UID_DermoscopicPhotographyImageStorage,                      "VLd", 768 * 576 * 3 },
-    { UID_DigitalIntraOralXRayImageStorageForPresentation,         "DXo", 1024 * 1024 * 2 },
-    { UID_DigitalIntraOralXRayImageStorageForProcessing,           "DPo", 1024 * 1024 * 2 },
-    { UID_DigitalMammographyXRayImageStorageForPresentation,       "DXm", 4096 * 4096 * 2 },
-    { UID_DigitalMammographyXRayImageStorageForProcessing,         "DPm", 4096 * 4096 * 2 },
-    { UID_DigitalXRayImageStorageForPresentation,                  "DX",  2048 * 2048 * 2 },
-    { UID_DigitalXRayImageStorageForProcessing,                    "DP",  2048 * 2048 * 2 },
-    { UID_ElectromyogramWaveformStorage,                           "EMG", 4096 },
-    { UID_ElectrooculogramWaveformStorage,                         "EOG", 4096 },
-    { UID_EncapsulatedCDAStorage,                                  "CDA", 4096 },
-    { UID_EncapsulatedMTLStorage,                                  "MTL", 4096 },
-    { UID_EncapsulatedOBJStorage,                                  "OBJ", 4096 },
-    { UID_EncapsulatedPDFStorage,                                  "PDF", 1024 * 1024 },
-    { UID_EncapsulatedSTLStorage,                                  "STL", 4096 },
-    { UID_EnhancedCTImageStorage,                                  "CTe", 256 * 512 * 512 },
-    { UID_EnhancedMRColorImageStorage,                             "MRc", 256 * 512 * 512 * 3 },
-    { UID_EnhancedMRImageStorage,                                  "MRe", 256 * 512 * 512 },
-    { UID_EnhancedPETImageStorage,                                 "PIe", 512 * 512 * 2 },
-    { UID_EnhancedSRStorage,                                       "SRe", 4096 },
-    { UID_EnhancedUSVolumeStorage,                                 "USe", 512 * 512 },
-    { UID_EnhancedXAImageStorage,                                  "XAe", 256 * 512 * 512 },
-    { UID_EnhancedXRFImageStorage,                                 "RFe", 256 * 512 * 512 },
-    { UID_ExtensibleSRStorage,                                     "SRx", 4096 },
-    { UID_GeneralAudioWaveformStorage,                             "AUG", 4096 },
-    { UID_GeneralECGWaveformStorage,                               "ECG", 4096 },
-    { UID_GenericImplantTemplateStorage,                           "IT",  4096 },
-    { UID_GrayscalePlanarMPRVolumetricPresentationStateStorage,    "VPg", 4096 },
-    { UID_GrayscaleSoftcopyPresentationStateStorage,               "PSg", 4096 },
-    { UID_HangingProtocolStorage,                                  "HP",  4096 },
-    { UID_HemodynamicWaveformStorage,                              "WVh", 4096 },
-    { UID_ImplantAssemblyTemplateStorage,                          "ITa", 4096 },
-    { UID_ImplantationPlanSRDocumentStorage,                       "SRi", 4096 },
-    { UID_ImplantTemplateGroupStorage,                             "ITg", 4096 },
-    { UID_IntraocularLensCalculationsStorage,                      "OPc", 4096 },
+    { UID_AcquisitionContextSRStorage,                             "SRa",  4096 },
+    { UID_AdvancedBlendingPresentationStateStorage,                "PSa",  4096 },
+    { UID_AmbulatoryECGWaveformStorage,                            "ECA",  4096 },
+    { UID_ArterialPulseWaveformStorage,                            "WVa",  4096 },
+    { UID_AutorefractionMeasurementsStorage,                       "OPa",  4096 },
+    { UID_BasicStructuredDisplayStorage,                           "SD",   4096 },
+    { UID_BasicTextSRStorage,                                      "SRt",  4096 },
+    { UID_BasicVoiceAudioWaveformStorage,                          "AUV",  4096 },
+    { UID_BlendingSoftcopyPresentationStateStorage,                "PSb",  4096 },
+    { UID_BodyPositionWaveformStorage,                             "WVb",  4096 },
+    { UID_BreastProjectionXRayImageStorageForPresentation,         "BX",   4096 * 4096 * 2 },
+    { UID_BreastProjectionXRayImageStorageForProcessing,           "BP",   4096 * 4096 * 2 },
+    { UID_BreastTomosynthesisImageStorage,                         "BT",   4096 * 4096 * 2 },
+    { UID_CardiacElectrophysiologyWaveformStorage,                 "WVc",  4096 },
+    { UID_CArmPhotonElectronRadiationRecordStorage,                "RRc",  4096 },
+    { UID_CArmPhotonElectronRadiationStorage,                      "Rca",  4096 },
+    { UID_ChestCADSRStorage,                                       "SRh",  4096 },
+    { UID_ColonCADSRStorage,                                       "SRo",  4096 },
+    { UID_ColorPaletteStorage,                                     "CP",   4096 },
+    { UID_ColorSoftcopyPresentationStateStorage,                   "PSc",  4096 },
+    { UID_CompositingPlanarMPRVolumetricPresentationStateStorage,  "VPc",  4096 },
+    { UID_Comprehensive3DSRStorage,                                "SR3",  4096 },
+    { UID_ComprehensiveSRStorage,                                  "SRc",  4096 },
+    { UID_ComputedRadiographyImageStorage,                         "CR",   2048 * 2048 * 2 },
+    { UID_ContentAssessmentResultsStorage,                         "AS",   4096 },
+    { UID_CornealTopographyMapStorage,                             "CM",   512 * 512 },
+    { UID_CTDefinedProcedureProtocolStorage,                       "PPcd", 4096 },  /* was PPd */
+    { UID_CTImageStorage,                                          "CT",   512 * 512 * 2 },
+    { UID_CTPerformedProcedureProtocolStorage,                     "PPcp", 4096 },  /* was PPp */
+    { UID_DeformableSpatialRegistrationStorage,                    "RGd",  4096 },
+    { UID_DermoscopicPhotographyImageStorage,                      "VLd",  768 * 576 * 3 },
+    { UID_DigitalIntraOralXRayImageStorageForPresentation,         "DXo",  1024 * 1024 * 2 },
+    { UID_DigitalIntraOralXRayImageStorageForProcessing,           "DPo",  1024 * 1024 * 2 },
+    { UID_DigitalMammographyXRayImageStorageForPresentation,       "DXm",  4096 * 4096 * 2 },
+    { UID_DigitalMammographyXRayImageStorageForProcessing,         "DPm",  4096 * 4096 * 2 },
+    { UID_DigitalXRayImageStorageForPresentation,                  "DX",   2048 * 2048 * 2 },
+    { UID_DigitalXRayImageStorageForProcessing,                    "DP",   2048 * 2048 * 2 },
+    { UID_ElectromyogramWaveformStorage,                           "EMG",  4096 },
+    { UID_ElectrooculogramWaveformStorage,                         "EOG",  4096 },
+    { UID_EncapsulatedCDAStorage,                                  "CDA",  4096 },
+    { UID_EncapsulatedMTLStorage,                                  "MTL",  4096 },
+    { UID_EncapsulatedOBJStorage,                                  "OBJ",  4096 },
+    { UID_EncapsulatedPDFStorage,                                  "PDF",  1024 * 1024 },
+    { UID_EncapsulatedSTLStorage,                                  "STL",  4096 },
+    { UID_EnhancedCTImageStorage,                                  "CTe",  256 * 512 * 512 },
+    { UID_EnhancedMRColorImageStorage,                             "MRc",  256 * 512 * 512 * 3 },
+    { UID_EnhancedMRImageStorage,                                  "MRe",  256 * 512 * 512 },
+    { UID_EnhancedPETImageStorage,                                 "PIe",  512 * 512 * 2 },
+    { UID_EnhancedSRStorage,                                       "SRe",  4096 },
+    { UID_EnhancedUSVolumeStorage,                                 "USe",  512 * 512 },
+    { UID_EnhancedXAImageStorage,                                  "XAe",  256 * 512 * 512 },
+    { UID_EnhancedXRayRadiationDoseSRStorage,                      "SRde", 4096 },
+    { UID_EnhancedXRFImageStorage,                                 "RFe",  256 * 512 * 512 },
+    { UID_ExtensibleSRStorage,                                     "SRx",  4096 },
+    { UID_GeneralAudioWaveformStorage,                             "AUG",  4096 },
+    { UID_GeneralECGWaveformStorage,                               "ECG",  4096 },
+    { UID_GenericImplantTemplateStorage,                           "IT",   4096 },
+    { UID_GrayscalePlanarMPRVolumetricPresentationStateStorage,    "VPg",  4096 },
+    { UID_GrayscaleSoftcopyPresentationStateStorage,               "PSg",  4096 },
+    { UID_HangingProtocolStorage,                                  "HP",   4096 },
+    { UID_HemodynamicWaveformStorage,                              "WVh",  4096 },
+    { UID_ImplantAssemblyTemplateStorage,                          "ITa",  4096 },
+    { UID_ImplantationPlanSRDocumentStorage,                       "SRi",  4096 },
+    { UID_ImplantTemplateGroupStorage,                             "ITg",  4096 },
+    { UID_IntraocularLensCalculationsStorage,                      "OPc",  4096 },
     { UID_IntravascularOpticalCoherenceTomographyImageStorageForPresentation, "OCt", 512 * 512 },
     { UID_IntravascularOpticalCoherenceTomographyImageStorageForProcessing, "OCp", 512 * 512 },
-    { UID_KeratometryMeasurementsStorage,                          "OPk", 4096 },
-    { UID_KeyObjectSelectionDocumentStorage,                       "KO",  4096 },
-    { UID_LegacyConvertedEnhancedCTImageStorage,                   "CTl", 512 * 512 * 2 },
-    { UID_LegacyConvertedEnhancedMRImageStorage,                   "MRl", 256 * 256 * 2 },
-    { UID_LegacyConvertedEnhancedPETImageStorage,                  "PIl", 512 * 512 * 2 },
-    { UID_LensometryMeasurementsStorage,                           "OPl", 4096 },
-    { UID_MacularGridThicknessAndVolumeReportStorage,              "SRg", 4096 },
-    { UID_MammographyCADSRStorage,                                 "SRm", 4096 },
-    { UID_MRImageStorage,                                          "MR",  256 * 256 * 2 },
-    { UID_MRSpectroscopyStorage,                                   "MRs", 256 * 512 * 512 },
-    { UID_MultichannelRespiratoryWaveformStorage,                  "WVm", 4096 },
-    { UID_MultiframeGrayscaleByteSecondaryCaptureImageStorage,     "SCb", 512 * 512 },
-    { UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage,     "SCw", 512 * 512 * 2 },
-    { UID_MultiframeSingleBitSecondaryCaptureImageStorage,         "SCs", 1024 * 1024 },  /* roughly an A4 300dpi scan */
-    { UID_MultiframeTrueColorSecondaryCaptureImageStorage,         "SCc", 512 * 512 * 3 },
+    { UID_KeratometryMeasurementsStorage,                          "OPk",  4096 },
+    { UID_KeyObjectSelectionDocumentStorage,                       "KO",   4096 },
+    { UID_LegacyConvertedEnhancedCTImageStorage,                   "CTl",  512 * 512 * 2 },
+    { UID_LegacyConvertedEnhancedMRImageStorage,                   "MRl",  256 * 256 * 2 },
+    { UID_LegacyConvertedEnhancedPETImageStorage,                  "PIl",  512 * 512 * 2 },
+    { UID_LensometryMeasurementsStorage,                           "OPl",  4096 },
+    { UID_MacularGridThicknessAndVolumeReportStorage,              "SRg",  4096 },
+    { UID_MammographyCADSRStorage,                                 "SRm",  4096 },
+    { UID_MicroscopyBulkSimpleAnnotationsStorage,                  "MAs",  4096 },
+    { UID_MRImageStorage,                                          "MR",   256 * 256 * 2 },
+    { UID_MRSpectroscopyStorage,                                   "MRs",  256 * 512 * 512 },
+    { UID_MultichannelRespiratoryWaveformStorage,                  "WVm",  4096 },
+    { UID_MultiframeGrayscaleByteSecondaryCaptureImageStorage,     "SCb",  512 * 512 },
+    { UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage,     "SCw",  512 * 512 * 2 },
+    { UID_MultiframeSingleBitSecondaryCaptureImageStorage,         "SCs",  1024 * 1024 },  /* roughly an A4 300dpi scan */
+    { UID_MultiframeTrueColorSecondaryCaptureImageStorage,         "SCc",  512 * 512 * 3 },
     { UID_MultipleVolumeRenderingVolumetricPresentationStateStorage, "VPm" , 4096 },
-    { UID_NuclearMedicineImageStorage,                             "NM",  64 * 64 * 2 },
-    { UID_OphthalmicAxialMeasurementsStorage,                      "OPx", 4096 },
+    { UID_NuclearMedicineImageStorage,                             "NM",   64 * 64 * 2 },
+    { UID_OphthalmicAxialMeasurementsStorage,                      "OPx",  4096 },
     { UID_OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage, "OCb" , 768 * 576 },
-    { UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage,  "OCe", 768 * 576  * 2 },
-    { UID_OphthalmicPhotography16BitImageStorage,                  "OPw", 768 * 576 * 6 },
-    { UID_OphthalmicPhotography8BitImageStorage,                   "OPb", 768 * 576 * 3 },
-    { UID_OphthalmicThicknessMapStorage,                           "OPm", 768 * 576 },
-    { UID_OphthalmicTomographyImageStorage,                        "OPt", 768 * 576 * 3 },
-    { UID_OphthalmicVisualFieldStaticPerimetryMeasurementsStorage, "OPp", 4096 },
-    { UID_ParametricMapStorage,                                    "PM",  256 * 256 * 4 },
-    { UID_PatientRadiationDoseSRStorage,                           "SRq", 4096 },
-    { UID_PerformedImagingAgentAdministrationSRStorage,            "SRi", 4096 },
-    { UID_PlannedImagingAgentAdministrationSRStorage,              "SRj", 4096 },
-    { UID_PositronEmissionTomographyImageStorage,                  "PI",  512 * 512 * 2 },
-    { UID_ProcedureLogStorage,                                     "SRp", 4096 },
-    { UID_ProtocolApprovalStorage,                                 "PA",  4096 },
-    { UID_PseudoColorSoftcopyPresentationStateStorage,             "PSp", 4096 },
-    { UID_RadiopharmaceuticalRadiationDoseSRStorage,               "SRr", 4096 },
-    { UID_RawDataStorage,                                          "RAW", 512 * 512 * 256 },
-    { UID_RealWorldValueMappingStorage,                            "RWM", 4096 },
-    { UID_RespiratoryWaveformStorage,                              "WVr", 4096 },
-    { UID_RoboticArmRadiationStorage,                              "Rra", 4096 },  /* was RRr */
-    { UID_RoboticRadiationRecordStorage,                           "RRr", 4096 },
-    { UID_RoutineScalpElectroencephalogramWaveformStorage,         "EEG", 4096 },
-    { UID_RTBeamsDeliveryInstructionStorage,                       "RTd", 4096 },
-    { UID_RTBeamsTreatmentRecordStorage,                           "RTb", 4096 },
-    { UID_RTBrachyApplicationSetupDeliveryInstructionStorage,      "RTa", 4096 },
-    { UID_RTBrachyTreatmentRecordStorage,                          "RTr", 4096 },
-    { UID_RTDoseStorage,                                           "RD",  4096 },
-    { UID_RTImageStorage,                                          "RI",  4096 },
-    { UID_RTIonBeamsTreatmentRecordStorage,                        "RTi", 4096 },
-    { UID_RTIonPlanStorage,                                        "RPi", 4096 },
-    { UID_RTPlanStorage,                                           "RP" , 4096 },
-    { UID_RTPhysicianIntentStorage,                                "RIp", 4096 },
-    { UID_RTRadiationRecordSetStorage,                             "RSr", 4096 },
-    { UID_RTRadiationSalvageRecordStorage,                         "RRs", 4096 },
-    { UID_RTRadiationSetStorage,                                   "RSe", 4096 },  /* was RRs */
-    { UID_RTSegmentAnnotationStorage,                              "RAs", 4096 },  /* was RRs */
-    { UID_RTStructureSetStorage,                                   "RS",  4096 },
-    { UID_RTTreatmentSummaryRecordStorage,                         "RTs", 4096 },
-    { UID_SecondaryCaptureImageStorage,                            "SC",  512 * 512 * 2 },
-    { UID_SegmentationStorage,                                     "SG",  4096 },
+    { UID_OphthalmicOpticalCoherenceTomographyEnFaceImageStorage,  "OCe",  768 * 576  * 2 },
+    { UID_OphthalmicPhotography16BitImageStorage,                  "OPw",  768 * 576 * 6 },
+    { UID_OphthalmicPhotography8BitImageStorage,                   "OPb",  768 * 576 * 3 },
+    { UID_OphthalmicThicknessMapStorage,                           "OPm",  768 * 576 },
+    { UID_OphthalmicTomographyImageStorage,                        "OPt",  768 * 576 * 3 },
+    { UID_OphthalmicVisualFieldStaticPerimetryMeasurementsStorage, "OPp",  4096 },
+    { UID_ParametricMapStorage,                                    "PM",   256 * 256 * 4 },
+    { UID_PatientRadiationDoseSRStorage,                           "SRq",  4096 },
+    { UID_PerformedImagingAgentAdministrationSRStorage,            "SRi",  4096 },
+    { UID_PlannedImagingAgentAdministrationSRStorage,              "SRj",  4096 },
+    { UID_PositronEmissionTomographyImageStorage,                  "PI",   512 * 512 * 2 },
+    { UID_ProcedureLogStorage,                                     "SRp",  4096 },
+    { UID_ProtocolApprovalStorage,                                 "PA",   4096 },
+    { UID_PseudoColorSoftcopyPresentationStateStorage,             "PSp",  4096 },
+    { UID_RadiopharmaceuticalRadiationDoseSRStorage,               "SRr",  4096 },
+    { UID_RawDataStorage,                                          "RAW",  512 * 512 * 256 },
+    { UID_RealWorldValueMappingStorage,                            "RWM",  4096 },
+    { UID_RespiratoryWaveformStorage,                              "WVr",  4096 },
+    { UID_RoboticArmRadiationStorage,                              "Rra",  4096 },  /* was RRr */
+    { UID_RoboticRadiationRecordStorage,                           "RRr",  4096 },
+    { UID_RoutineScalpElectroencephalogramWaveformStorage,         "EEG",  4096 },
+    { UID_RTBeamsDeliveryInstructionStorage,                       "RTd",  4096 },
+    { UID_RTBeamsTreatmentRecordStorage,                           "RTb",  4096 },
+    { UID_RTBrachyApplicationSetupDeliveryInstructionStorage,      "RTa",  4096 },
+    { UID_RTBrachyTreatmentRecordStorage,                          "RTr",  4096 },
+    { UID_RTDoseStorage,                                           "RD",   4096 },
+    { UID_RTImageStorage,                                          "RI",   4096 },
+    { UID_RTIonBeamsTreatmentRecordStorage,                        "RTi",  4096 },
+    { UID_RTIonPlanStorage,                                        "RPi",  4096 },
+    { UID_RTPlanStorage,                                           "RP" ,  4096 },
+    { UID_RTPhysicianIntentStorage,                                "RIp",  4096 },
+    { UID_RTRadiationRecordSetStorage,                             "RSr",  4096 },
+    { UID_RTRadiationSalvageRecordStorage,                         "RRs",  4096 },
+    { UID_RTRadiationSetDeliveryInstructionStorage,                "RSd",  4096 },
+    { UID_RTRadiationSetStorage,                                   "RSe",  4096 },  /* was RRs */
+    { UID_RTSegmentAnnotationStorage,                              "RAs",  4096 },  /* was RRs */
+    { UID_RTStructureSetStorage,                                   "RS",   4096 },
+    { UID_RTTreatmentPreparationStorage,                           "RTp",  4096 },
+    { UID_RTTreatmentSummaryRecordStorage,                         "RTs",  4096 },
+    { UID_SecondaryCaptureImageStorage,                            "SC",   512 * 512 * 2 },
+    { UID_SegmentationStorage,                                     "SG",   4096 },
     { UID_SegmentedVolumeRenderingVolumetricPresentationStateStorage, "VPs", 4096 },
-    { UID_SimplifiedAdultEchoSRStorage,                            "SRu", 4096 },
-    { UID_SleepElectroencephalogramWaveformStorage,                "WVs", 4096 },
-    { UID_SpatialFiducialsStorage,                                 "FID", 4096 },
-    { UID_SpatialRegistrationStorage,                              "RGs", 4096 },
-    { UID_SpectaclePrescriptionReportStorage,                      "SRs", 4096 },
-    { UID_StereometricRelationshipStorage,                         "OPr", 4096 },
-    { UID_SubjectiveRefractionMeasurementsStorage,                 "OPs", 4096 },
-    { UID_SurfaceScanMeshStorage,                                  "SSm", 4096 },
-    { UID_SurfaceScanPointCloudStorage,                            "SSp", 4096 },
-    { UID_SurfaceSegmentationStorage,                              "SGs", 4096 },
-    { UID_TomotherapeuticRadiationRecordStorage,                   "RRt", 4096 },
-    { UID_TomotherapeuticRadiationStorage,                         "Rto", 4096 },  /* was RRt */
-    { UID_TractographyResultsStorage,                              "TR",  4096 },
-    { UID_TwelveLeadECGWaveformStorage,                            "TLE", 4096 },
-    { UID_UltrasoundImageStorage,                                  "US",  512 * 512 },
-    { UID_UltrasoundMultiframeImageStorage,                        "USm", 512 * 512 },
-    { UID_VideoEndoscopicImageStorage,                             "VVe", 768 * 576 * 3 },
-    { UID_VideoMicroscopicImageStorage,                            "VVm", 768 * 576 * 3 },
-    { UID_VideoPhotographicImageStorage,                           "VVp", 768 * 576 * 3 },
-    { UID_VisualAcuityMeasurementsStorage,                         "OPv", 4096 },
-    { UID_VLEndoscopicImageStorage,                                "VLe", 768 * 576 * 3 },
-    { UID_VLMicroscopicImageStorage,                               "VLm", 768 * 576 * 3 },
-    { UID_VLPhotographicImageStorage,                              "VLp", 768 * 576 * 3 },
-    { UID_VLSlideCoordinatesMicroscopicImageStorage,               "VLs", 768 * 576 * 3 },
-    { UID_VLWholeSlideMicroscopyImageStorage,                      "VLw", 10000 * 10000 * 3 },
-    { UID_VolumeRenderingVolumetricPresentationStateStorage,       "VPv", 4096 },
+    { UID_SimplifiedAdultEchoSRStorage,                            "SRu",  4096 },
+    { UID_SleepElectroencephalogramWaveformStorage,                "WVs",  4096 },
+    { UID_SpatialFiducialsStorage,                                 "FID",  4096 },
+    { UID_SpatialRegistrationStorage,                              "RGs",  4096 },
+    { UID_SpectaclePrescriptionReportStorage,                      "SRs",  4096 },
+    { UID_StereometricRelationshipStorage,                         "OPr",  4096 },
+    { UID_SubjectiveRefractionMeasurementsStorage,                 "OPs",  4096 },
+    { UID_SurfaceScanMeshStorage,                                  "SSm",  4096 },
+    { UID_SurfaceScanPointCloudStorage,                            "SSp",  4096 },
+    { UID_SurfaceSegmentationStorage,                              "SGs",  4096 },
+    { UID_TomotherapeuticRadiationRecordStorage,                   "RRt",  4096 },
+    { UID_TomotherapeuticRadiationStorage,                         "Rto",  4096 },  /* was RRt */
+    { UID_TractographyResultsStorage,                              "TR",   4096 },
+    { UID_TwelveLeadECGWaveformStorage,                            "TLE",  4096 },
+    { UID_UltrasoundImageStorage,                                  "US",   512 * 512 },
+    { UID_UltrasoundMultiframeImageStorage,                        "USm",  512 * 512 },
+    { UID_VideoEndoscopicImageStorage,                             "VVe",  768 * 576 * 3 },
+    { UID_VideoMicroscopicImageStorage,                            "VVm",  768 * 576 * 3 },
+    { UID_VideoPhotographicImageStorage,                           "VVp",  768 * 576 * 3 },
+    { UID_VisualAcuityMeasurementsStorage,                         "OPv",  4096 },
+    { UID_VLEndoscopicImageStorage,                                "VLe",  768 * 576 * 3 },
+    { UID_VLMicroscopicImageStorage,                               "VLm",  768 * 576 * 3 },
+    { UID_VLPhotographicImageStorage,                              "VLp",  768 * 576 * 3 },
+    { UID_VLSlideCoordinatesMicroscopicImageStorage,               "VLs",  768 * 576 * 3 },
+    { UID_VLWholeSlideMicroscopyImageStorage,                      "VLw",  10000 * 10000 * 3 },
+    { UID_VolumeRenderingVolumetricPresentationStateStorage,       "VPv",  4096 },
     { UID_WideFieldOphthalmicPhotographyStereographicProjectionImageStorage, "OWs", 768 * 576 * 3 },
-    { UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, "OW3", 768 * 576 * 3 },
-    { UID_XAXRFGrayscaleSoftcopyPresentationStateStorage,          "PSx", 4096 },
-    { UID_XRay3DAngiographicImageStorage,                          "XA3", 256 * 512 * 512 },
-    { UID_XRay3DCraniofacialImageStorage,                          "XC3", 256 * 512 * 512 },
-    { UID_XRayAngiographicImageStorage,                            "XA",  256 * 512 * 512 },
-    { UID_XRayRadiationDoseSRStorage,                              "SRd", 4096 },
-    { UID_XRayRadiofluoroscopicImageStorage,                       "RF",  256 * 512 * 512 },
+    { UID_WideFieldOphthalmicPhotography3DCoordinatesImageStorage, "OW3",  768 * 576 * 3 },
+    { UID_XADefinedProcedureProtocolStorage,                       "PPxd", 4096 },
+    { UID_XAPerformedProcedureProtocolStorage,                     "PPxp", 4096 },
+    { UID_XAXRFGrayscaleSoftcopyPresentationStateStorage,          "PSx",  4096 },
+    { UID_XRay3DAngiographicImageStorage,                          "XA3",  256 * 512 * 512 },
+    { UID_XRay3DCraniofacialImageStorage,                          "XC3",  256 * 512 * 512 },
+    { UID_XRayAngiographicImageStorage,                            "XA",   256 * 512 * 512 },
+    { UID_XRayRadiationDoseSRStorage,                              "SRd",  4096 },
+    { UID_XRayRadiofluoroscopicImageStorage,                       "RF",   256 * 512 * 512 },
     // retired
-    { UID_RETIRED_HardcopyColorImageStorage,                       "HC",  4096 },
-    { UID_RETIRED_HardcopyGrayscaleImageStorage,                   "HG",  4096 },
-    { UID_RETIRED_NuclearMedicineImageStorage,                     "NMr", 64 * 64 * 2 },
-    { UID_RETIRED_StandaloneCurveStorage,                          "CV",  4096 },
-    { UID_RETIRED_StandaloneModalityLUTStorage,                    "ML",  4096 * 2 },
-    { UID_RETIRED_StandaloneOverlayStorage,                        "OV",  512 * 512 },
-    { UID_RETIRED_StandalonePETCurveStorage,                       "PC",  4096 },
-    { UID_RETIRED_StandaloneVOILUTStorage,                         "VO",  4096 * 2 },
-    { UID_RETIRED_StoredPrintStorage,                              "SP",  4096 },
-    { UID_RETIRED_UltrasoundImageStorage,                          "USr", 512 * 512 },
-    { UID_RETIRED_UltrasoundMultiframeImageStorage,                "USf", 512 * 512 },
-    { UID_RETIRED_VLImageStorage,                                  "VLr", 768 * 576 * 3 },
-    { UID_RETIRED_VLMultiframeImageStorage,                        "VMr", 768 * 576 * 3 },
-    { UID_RETIRED_XRayAngiographicBiPlaneImageStorage,             "XB",  512 * 512 * 2 },
+    { UID_RETIRED_HardcopyColorImageStorage,                       "HC",   4096 },
+    { UID_RETIRED_HardcopyGrayscaleImageStorage,                   "HG",   4096 },
+    { UID_RETIRED_NuclearMedicineImageStorage,                     "NMr",  64 * 64 * 2 },
+    { UID_RETIRED_StandaloneCurveStorage,                          "CV",   4096 },
+    { UID_RETIRED_StandaloneModalityLUTStorage,                    "ML",   4096 * 2 },
+    { UID_RETIRED_StandaloneOverlayStorage,                        "OV",   512 * 512 },
+    { UID_RETIRED_StandalonePETCurveStorage,                       "PC",   4096 },
+    { UID_RETIRED_StandaloneVOILUTStorage,                         "VO",   4096 * 2 },
+    { UID_RETIRED_StoredPrintStorage,                              "SP",   4096 },
+    { UID_RETIRED_UltrasoundImageStorage,                          "USr",  512 * 512 },
+    { UID_RETIRED_UltrasoundMultiframeImageStorage,                "USf",  512 * 512 },
+    { UID_RETIRED_VLImageStorage,                                  "VLr",  768 * 576 * 3 },
+    { UID_RETIRED_VLMultiframeImageStorage,                        "VMr",  768 * 576 * 3 },
+    { UID_RETIRED_XRayAngiographicBiPlaneImageStorage,             "XB",   512 * 512 * 2 },
     // draft
-    { UID_DRAFT_RTBeamsDeliveryInstructionStorage,                 "RBd", 4096 },
-    { UID_DRAFT_SRAudioStorage,                                    "SR_", 4096 },  /* was "SRw" */
-    { UID_DRAFT_SRComprehensiveStorage,                            "SR_", 4096 },  /* was "SRx" */
-    { UID_DRAFT_SRDetailStorage,                                   "SR_", 4096 },  /* was "SRy" */
-    { UID_DRAFT_SRTextStorage,                                     "SR_", 4096 },  /* was "SRz" */
-    { UID_DRAFT_WaveformStorage,                                   "WVd", 4096 },
+    { UID_DRAFT_RTBeamsDeliveryInstructionStorage,                 "RB_d", 4096 },  /* was "RBd" */
+    { UID_DRAFT_SRAudioStorage,                                    "SR_a", 4096 },  /* was "SRw" */
+    { UID_DRAFT_SRComprehensiveStorage,                            "SR_c", 4096 },  /* was "SRx" */
+    { UID_DRAFT_SRDetailStorage,                                   "SR_d", 4096 },  /* was "SRy" */
+    { UID_DRAFT_SRTextStorage,                                     "SR_t", 4096 },  /* was "SRz" */
+    { UID_DRAFT_WaveformStorage,                                   "WV_d", 4096 },  /* was "WVd" */
     // DICOS
-    { UID_DICOS_CTImageStorage,                                    "CTs", 512 * 512 * 2 },
-    { UID_DICOS_DigitalXRayImageStorageForPresentation,            "DXs", 2048 * 2048 * 2 },
-    { UID_DICOS_DigitalXRayImageStorageForProcessing,              "DPs", 2048 * 2048 * 2 },
-    { UID_DICOS_ThreatDetectionReportStorage,                      "TDR", 4096 },
-    { UID_DICOS_2DAITStorage,                                      "AI2", 4096 },
-    { UID_DICOS_3DAITStorage,                                      "AI3", 4096 },
-    { UID_DICOS_QuadrupoleResonanceStorage,                        "QR",  4096 },
+    { UID_DICOS_CTImageStorage,                                    "CTs",  512 * 512 * 2 },
+    { UID_DICOS_DigitalXRayImageStorageForPresentation,            "DXs",  2048 * 2048 * 2 },
+    { UID_DICOS_DigitalXRayImageStorageForProcessing,              "DPs",  2048 * 2048 * 2 },
+    { UID_DICOS_ThreatDetectionReportStorage,                      "TDR",  4096 },
+    { UID_DICOS_2DAITStorage,                                      "AI2",  4096 },
+    { UID_DICOS_3DAITStorage,                                      "AI3",  4096 },
+    { UID_DICOS_QuadrupoleResonanceStorage,                        "QR",   4096 },
     // DICONDE
-    { UID_DICONDE_EddyCurrentImageStorage,                         "EC",  512 * 512 },
-    { UID_DICONDE_EddyCurrentMultiframeImageStorage,               "ECm", 512 * 512 }
+    { UID_DICONDE_EddyCurrentImageStorage,                         "EC",   512 * 512 },
+    { UID_DICONDE_EddyCurrentMultiframeImageStorage,               "ECm",  512 * 512 }
 };
 
 static const int numberOfDcmModalityTableEntries = OFstatic_cast(int, sizeof(modalities) / sizeof(DcmModalityTable));
index 85398553d5c1cbbc906bf8b44f0e3000d3bb4bc2..60901476e06b5345a73b1d05303cee76c486d240 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcvr.h"
 #include "dcmtk/dcmdata/dctypes.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 /*
 ** global flags
 */
@@ -131,7 +127,7 @@ static const DcmVREntry DcmVRDict[] = {
     { EVR_ST, "ST", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_ISAFFECTEDBYCHARSET | DCMVR_PROP_ISLENGTHINCHAR, 0, 1024 },
     { EVR_SV, "SV", &noDelimiters, sizeof(Sint64), DCMVR_PROP_EXTENDEDLENGTHENCODING, 8, 8 },
     { EVR_TM, "TM", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING, 0, 16 },
-    { EVR_UC, "UC", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 4294967294U },
+    { EVR_UC, "UC", &bsDelimiter, sizeof(char), DCMVR_PROP_ISASTRING | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_ISAFFECTEDBYCHARSET, 0, 4294967294U },
     { EVR_UI, "UI", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING, 0, 64 },
     { EVR_UL, "UL", &noDelimiters, sizeof(Uint32), DCMVR_PROP_NONE, 4, 4 },
     { EVR_UR, "UR", &noDelimiters, sizeof(char), DCMVR_PROP_ISASTRING|DCMVR_PROP_EXTENDEDLENGTHENCODING, 0, 4294967294U },
@@ -146,27 +142,19 @@ static const DcmVREntry DcmVRDict[] = {
     { EVR_up, "up", &noDelimiters, sizeof(Uint32), DCMVR_PROP_NONSTANDARD, 4, 4 },
 
     /* unique prefixes have been "invented" for the following internal VRs */
-    { EVR_item, "it_EVR_item", &noDelimiters, 0,
-      DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 },
-    { EVR_metainfo, "mi_EVR_metainfo", &noDelimiters, 0,
-      DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 },
-    { EVR_dataset, "ds_EVR_dataset", &noDelimiters, 0,
-      DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 },
-    { EVR_fileFormat, "ff_EVR_fileFormat", &noDelimiters, 0,
-      DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 },
-    { EVR_dicomDir, "dd_EVR_dicomDir", &noDelimiters, 0,
-      DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 },
-    { EVR_dirRecord, "dr_EVR_dirRecord", &noDelimiters, 0,
-      DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 },
-
-    { EVR_pixelSQ, "ps_EVR_pixelSQ", &noDelimiters, sizeof(Uint8),
-      DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, DCM_UndefinedLength },
+    { EVR_item, "it_EVR_item", &noDelimiters, 0, DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 },
+    { EVR_metainfo, "mi_EVR_metainfo", &noDelimiters, 0, DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 },
+    { EVR_dataset, "ds_EVR_dataset", &noDelimiters, 0, DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 },
+    { EVR_fileFormat, "ff_EVR_fileFormat", &noDelimiters, 0, DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 },
+    { EVR_dicomDir, "dd_EVR_dicomDir", &noDelimiters, 0, DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 },
+    { EVR_dirRecord, "dr_EVR_dirRecord", &noDelimiters, 0, DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, 0 },
+
+    { EVR_pixelSQ, "ps_EVR_pixelSQ", &noDelimiters, sizeof(Uint8), DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, DCM_UndefinedLength },
     /* Moved from internal use to non standard only: necessary to distinguish from "normal" OB */
-    { EVR_pixelItem, "pi", &noDelimiters, sizeof(Uint8),
-      DCMVR_PROP_NONSTANDARD, 0, DCM_UndefinedLength },
+    { EVR_pixelItem, "pi", &noDelimiters, sizeof(Uint8), DCMVR_PROP_NONSTANDARD, 0, DCM_UndefinedLength },
 
-    { EVR_UNKNOWN, "??", &noDelimiters, sizeof(Uint8), /* EVR_UNKNOWN (i.e. "future" VRs) should be mapped to UN or OB */
-      DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_UNDEFINEDLENGTH, 0, DCM_UndefinedLength },
+    /* EVR_UNKNOWN (i.e. "future" VRs) should be mapped to UN or OB */
+    { EVR_UNKNOWN, "??", &noDelimiters, sizeof(Uint8), DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL | DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_UNDEFINEDLENGTH, 0, DCM_UndefinedLength },
 
     /* Unknown Value Representation */
     { EVR_UN, "UN", &noDelimiters, sizeof(Uint8), DCMVR_PROP_EXTENDEDLENGTHENCODING | DCMVR_PROP_UNDEFINEDLENGTH, 0, 4294967294U },
@@ -176,8 +164,8 @@ static const DcmVREntry DcmVRDict[] = {
     /* Overlay Data - only used in ident() */
     { EVR_OverlayData, "OverlayData", &noDelimiters, 0, DCMVR_PROP_INTERNAL, 0, DCM_UndefinedLength },
 
-    { EVR_UNKNOWN2B, "??", &noDelimiters, sizeof(Uint8), /* illegal VRs, we assume no extended length coding */
-      DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, DCM_UndefinedLength },
+    /* illegal VRs, we assume no extended length coding */
+    { EVR_UNKNOWN2B, "??", &noDelimiters, sizeof(Uint8), DCMVR_PROP_NONSTANDARD | DCMVR_PROP_INTERNAL, 0, DCM_UndefinedLength },
 
 };
 
index 8d94594da8e4f80c99219aa8db0a8e85509fc237..58a53cef0d3d742a502e321f0fa0f147ea6226c0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcvrat.h"
 #include "dcmtk/dcmdata/dcjson.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 // ********************************
 
 
index f3db927dcebc13c0f23e2c64dc2d0527725fde23..3575a6bf7420b8c8f89f93b094188a56cd592214 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2017, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -22,9 +22,6 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dcvrcs.h"
 #include "dcmtk/dcmdata/dcmatch.h"
 
index d459de0c48c1db18bec8c50b99d9038781083047..904af44991ecfe98229922f0394ebb19930b9c8f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -24,9 +24,6 @@
 #include "dcmtk/dcmdata/dcvrda.h"
 #include "dcmtk/dcmdata/dcvrtm.h"
 #include "dcmtk/ofstd/ofstd.h"
-
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/dcmdata/dcmatch.h"
 
 
index f0088c31238dccd020d980574c96efbba93b0e37..d43ee5cc475775868ad63620a4db94ae1275dba9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofstring.h"
 #include "dcmtk/ofstd/ofstd.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 #define MAX_DT_LENGTH 26
 
 
@@ -243,7 +239,7 @@ OFCondition DcmDateTime::getOFDateTimeFromString(const char *dicomDateTime,
         return EC_IllegalParameter;
     unsigned int month = 1;
     unsigned int day = 1;
-    double timeZone;
+    double timeZone = 0.0;
     // check for/extract time zone
     if (dicomDateTimeSize >= 9 && DcmTime::getTimeZoneFromString(dicomDateTime + dicomDateTimeSize - 5, 5, timeZone).good())
         dicomDateTimeSize -= 5;
index 72d9dd5f8ef25e4b5a4c90303d8688234b349f61..66d07f3920ce22e5725f7ca689e73dd04d20f7c3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofmath.h"
 #include "dcmtk/dcmdata/dcjson.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 // ********************************
 
 DcmFloatingPointDouble::DcmFloatingPointDouble(const DcmTag &tag)
@@ -190,11 +185,11 @@ void DcmFloatingPointDouble::print(STD_NAMESPACE ostream &out,
                 {
                     /* check whether first value is printed (omit delimiter) */
                     if (i == 0)
-                        OFStandard::ftoa(buffer, sizeof(buffer), *doubleVals, 0, 0, 17 /* DBL_DIG + 2 for DICOM FD */);
+                        OFStandard::ftoa(buffer, sizeof(buffer), *doubleVals, 0, 0, 17 /* DBL_DECIMAL_DIG for DICOM FD */);
                     else
                     {
                         buffer[0] = '\\';
-                        OFStandard::ftoa(buffer + 1, sizeof(buffer) - 1, *doubleVals, 0, 0, 17 /* DBL_DIG + 2 for DICOM FD */);
+                        OFStandard::ftoa(buffer + 1, sizeof(buffer) - 1, *doubleVals, 0, 0, 17 /* DBL_DECIMAL_DIG for DICOM FD */);
                     }
                     /* check whether current value sticks to the length limit */
                     newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer));
@@ -273,7 +268,7 @@ OFCondition DcmFloatingPointDouble::getOFString(OFString &stringVal,
     {
         /* ... and convert it to a character string */
         char buffer[64];
-        OFStandard::ftoa(buffer, sizeof(buffer), doubleVal, 0, 0, 17 /* DBL_DIG + 2 for DICOM FD */);
+        OFStandard::ftoa(buffer, sizeof(buffer), doubleVal, 0, 0, 17 /* DBL_DECIMAL_DIG for DICOM FD */);
         /* assign result */
         stringVal = buffer;
     }
index 5eb83fafca1bb89bf8c066e9de1f746f4825c937..78b78894390a7c75e140505e8d3a2de7ffb81697 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofmath.h"
 #include "dcmtk/dcmdata/dcjson.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 // ********************************
 
 
@@ -192,11 +187,11 @@ void DcmFloatingPointSingle::print(STD_NAMESPACE ostream &out,
                 {
                     /* check whether first value is printed (omit delimiter) */
                     if (i == 0)
-                        OFStandard::ftoa(buffer, sizeof(buffer), *floatVals, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */);
+                        OFStandard::ftoa(buffer, sizeof(buffer), *floatVals, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */);
                     else
                     {
                         buffer[0] = '\\';
-                        OFStandard::ftoa(buffer + 1, sizeof(buffer) - 1, *floatVals, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */);
+                        OFStandard::ftoa(buffer + 1, sizeof(buffer) - 1, *floatVals, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */);
                     }
                     /* check whether current value sticks to the length limit */
                     newLength = printedLength + OFstatic_cast(unsigned long, strlen(buffer));
@@ -275,7 +270,7 @@ OFCondition DcmFloatingPointSingle::getOFString(OFString &value,
     {
         /* ... and convert it to a character string */
         char buffer[64];
-        OFStandard::ftoa(buffer, sizeof(buffer), floatVal, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */);
+        OFStandard::ftoa(buffer, sizeof(buffer), floatVal, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */);
         /* assign result */
         value = buffer;
     }
index 31c09318d17538d5071ea6e48ad228b32b33ae93..36f41b1b13905fc7c19c802628b723cbb40dbbdb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcjson.h"
 #include "dcmtk/ofstd/ofstring.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CINTTYPES
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 #define MAX_IS_LENGTH 12
 
 
index 2840cdbd750c31c951670c2d0633f3a75653864a..d0bb9790e11cd05dd43948545d00e6b59e7a3cdf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2017, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -152,12 +152,3 @@ OFCondition DcmLongString::writeJson(STD_NAMESPACE ostream &out,
     /* always report success */
     return EC_Normal;
 }
-
-
-// ********************************
-
-
-const OFString& DcmLongString::getDelimiterChars() const
-{
-    return DcmVR(EVR_LO).getDelimiterChars();
-}
index e6c3ddb2c181cd157cfc25d38ac9d3f094cb6549..e70448cbfe5adf78fc590f0a1ca1949b4eb0f713 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcswap.h"
 #include "dcmtk/dcmdata/dcuid.h"      /* for UID generation */
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 // ********************************
 
 
index 4654d4a880f3cf8225ef714f4a4b97bb52f20cdb..265f83ebfe2c66878f1eaeb83766227686327709 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -741,12 +741,3 @@ OFCondition DcmPersonName::checkStringValue(const OFString &value,
     }
     return result;
 }
-
-
-// ********************************
-
-
-const OFString& DcmPersonName::getDelimiterChars() const
-{
-    return DcmVR(EVR_PN).getDelimiterChars();
-}
index 549e7f7f063342c74231856b62dfcf22b367a528..0c6ab7037836835c72f80068f6d5010bfd8053f8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2017, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -152,12 +152,3 @@ OFCondition DcmShortString::writeJson(STD_NAMESPACE ostream &out,
     /* always report success */
     return EC_Normal;
 }
-
-
-// ********************************
-
-
-const OFString& DcmShortString::getDelimiterChars() const
-{
-    return DcmVR(EVR_SH).getDelimiterChars();
-}
index d4dc35f97290e10c21a670aeef7dd59ddeee5e90..1ec80a320dde8d17b05fd57234afbfd3e38ea7f8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmdata/dcvrsl.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CINTTYPES
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 // ********************************
 
 
index ba0665d209480a4d2ff74f2b1c6268b3259636e0..0e9cfb27975bece15590c206816b65fd292186b9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmdata/dcvrss.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 
 // ********************************
 
index 3695880edca068209fafb3edde85d38eb674d5c9..529d72ec19bceee75b517f695872f9a2b77559ce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019-2020, OFFIS e.V.
+ *  Copyright (C) 2019-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmdata/dcjson.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CINTTYPES
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 // ********************************
 
 
index 4ea654b44fa7695e66192e926896bc9079af481e..c31238c8b8b6ec4cc254103e3cf86fd895b9a436 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/dcmdata/dcvrtm.h"
 #include "dcmtk/ofstd/ofstd.h"
-
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/dcmdata/dcmatch.h"
 
-
 #define MAX_TM_LENGTH 16
 
 
index d0781b2f457381e56c9b9004a5689cdf0372bd22..f65a2b7bc6223a1b8a766cd5be8f1a9b3a4ceae7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2017, OFFIS e.V.
+ *  Copyright (C) 2015-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -33,6 +33,7 @@ DcmUnlimitedCharacters::DcmUnlimitedCharacters(const DcmTag &tag,
   : DcmCharString(tag, len)
 {
     setMaxLength(DCM_UndefinedLength);
+    setNonSignificantChars(" \\");
 }
 
 
index c2e5f5ceee73c7aeeb856d74131d3a6410123f71..a9efd170125a005f42acbd838814b059f210fb53 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2012, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcvrui.h"
 #include "dcmtk/dcmdata/dcuid.h"
 
-#define INCLUDE_CSTRING
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 #define MAX_UI_LENGTH 64
 
 
@@ -181,7 +176,15 @@ OFCondition DcmUniqueIdentifier::putString(const char *stringVal,
     if ((stringVal != NULL) && (stringVal[0] == '='))
     {
         uid = dcmFindUIDFromName(stringVal + 1);
-        uidLen = (uid != NULL) ? OFstatic_cast(Uint32, strlen(uid)) : 0;
+        /* check whether UID name could be mapped to a UID number */
+        if (uid == NULL)
+        {
+            DCMDATA_DEBUG("DcmUniqueIdentifier::putString() cannot map UID name '"
+                << OFSTRING_GUARD(stringVal + 1) << "' to UID value");
+            /* return with an error */
+            return EC_UnknownUIDName;
+        } else
+            uidLen = OFstatic_cast(Uint32, strlen(uid));
     }
     /* call inherited method to set the UID string */
     return DcmByteString::putString(uid, uidLen);
index aa22f5e095840a18e3bc08fe9c16478663b128f2..568f0d1174d8cc4144718a16fcaeda5ce1ad1228 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmdata/dcvrul.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CINTTYPES
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 // ********************************
 
 
index 0086cd5dec1f38184629161031887241de333dfe..a97ffc7a5528cbfeef8833184d39c769abbd76bd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2017, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/dcmdata/dcvrulup.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 // ********************************
 
 
index da91f3547da0afe15a8e00d3b02fa06053948de0..bbec933d9f4656fc38f2f4178e47ee18dae6456b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmdata/dcvrus.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 // ********************************
 
 
index de69366091e82fb748090a116528b6c6a7fb181a..5985fb7ce056d01a1e2b0d4dfe18bd6a8f1d9ba7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019-2020, OFFIS e.V.
+ *  Copyright (C) 2019-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmdata/dcjson.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CINTTYPES
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 // ********************************
 
 
index 236036c42cfcc8b35a9a7ac593620c3ef59c02d3..cbb8eaacb68a4bd08dd7e4f127a694e5685a0106 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2017, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcxfer.h"
 #include "dcmtk/dcmdata/dcuid.h"
 
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 typedef struct
 {
     const char         *xferID;
index 97b1464c94da6a72cd1a35965d59755791b02548..cf0d672f0e5eac8cdd4f10243d24d56ed86cd2e0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -169,7 +169,7 @@ main(int argc, char* argv[])
     fprintf(fout, "*/\n");
     fprintf(fout, "\n");
     fprintf(fout, "#include \"dcmtk/dcmdata/dcdict.h\"\n");
-    fprintf(fout, "#ifdef ENABLE_BUILTIN_DICTIONARY\n");
+    fprintf(fout, "#if DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN\n");
     fprintf(fout, "#include \"dcmtk/dcmdata/dcdicent.h\"\n");
     fprintf(fout, "\n");
     fprintf(fout, "struct DBI_SimpleEntry {\n");
@@ -251,7 +251,7 @@ main(int argc, char* argv[])
     fprintf(fout, "}\n");
     fprintf(fout, "\n");
     fprintf(fout, "\n");
-    fprintf(fout, "#else // WITH_BUILTIN_DICTIONARY\n");
+    fprintf(fout, "#else // DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN\n");
     fprintf(fout, "void\n");
     fprintf(fout, "DcmDataDictionary::loadBuiltinDictionary()\n");
     fprintf(fout, "{\n");
@@ -259,12 +259,13 @@ main(int argc, char* argv[])
     fprintf(fout, " ** Empty Stub.\n");
     fprintf(fout, " **\n");
     fprintf(fout, " ** We don't want a populated built-in data dictionary. In order to enable it,\n");
-    fprintf(fout, " ** define WITH_BUILTIN_DICTIONARY. To re-create the builtin dictionary from\n");
-    fprintf(fout, " ** a textfile like dicom.dic, use dcmdata/libsrc/mkdictbi.\n");
+    fprintf(fout, " ** define DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN (1).\n");
+    fprintf(fout, " ** To re-create the builtin dictionary from a textfile like dicom.dic,\n");
+    fprintf(fout, " ** use dcmdata/libsrc/mkdictbi.\n");
     fprintf(fout, "*/\n");
     fprintf(fout, "}\n");
     fprintf(fout, "\n");
-    fprintf(fout, "#endif // WITH_BUILTIN_DICTIONARY\n");
+    fprintf(fout, "#endif // DCM_DICT_DEFAULT == DCM_DICT_DEFAULT_USE_BUILTIN\n");
     fprintf(fout, "\n");
     dcmDataDict.wrunlock();
     if (filename)
index d246391c760be90787b8bf9d1fa819f412d758f3..63a26054ea9b64a16a402d0a0645098b0ccebdd9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2010-2018, OFFIS e.V.
+ *  Copyright (C) 2010-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofbmanip.h"
 #include "dcmtk/ofstd/ofstd.h"        /* For OFString::strerror() */
 #include "dcmtk/dcmdata/dctypes.h"    /* For DCMDATA_WARN() */
+#include "dcmtk/ofstd/ofdiag.h"
 
 BEGIN_EXTERN_C
 #include "vrscani.h"
 #include "vrscanl.h"
 END_EXTERN_C
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING
+
 int vrscan::scan(const OFString& vr, const char* const value, const size_t size)
 {
     yyscan_t scanner;
@@ -74,6 +78,8 @@ int vrscan::scan(const OFString& vr, const char* const value, const size_t size)
     return result;
 }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 int vrscan::scan(const OFString& vr, const OFString& value)
 {
     return scan(vr, value.data(), value.size());
index b221522a1df036c987aa49ab1151c5ed78efbee2..ab3083cb0b2815c3efaf568abcee809bb9723828 100644 (file)
@@ -328,7 +328,7 @@ typedef int yy_state_type;
 static yy_state_type yy_get_previous_state ( yyscan_t yyscanner );
 static yy_state_type yy_try_NUL_trans ( yy_state_type current_state  , yyscan_t yyscanner);
 static int yy_get_next_buffer ( yyscan_t yyscanner );
-static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner );
+/* static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); */
 
 /* Done after the current pattern has been matched and before the
  * corresponding action - sets up yytext.
@@ -6088,6 +6088,7 @@ YY_BUFFER_STATE yy_scan_bytes  (const char * yybytes, int  _yybytes_len , yyscan
 #define YY_EXIT_FAILURE 2
 #endif
 
+/*
 static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
 {
        struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
@@ -6095,6 +6096,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner)
        fprintf( stderr, "%s\n", msg );
        exit( YY_EXIT_FAILURE );
 }
+*/
 
 /* Redefine yyless() so it works in section 3 code. */
 
diff --git a/dcmdata/libsrc/xml2dcm.cc b/dcmdata/libsrc/xml2dcm.cc
new file mode 100644 (file)
index 0000000..c15731b
--- /dev/null
@@ -0,0 +1,791 @@
+/*
+ *
+ *  Copyright (C) 2003-2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Joerg Riesmeier
+ *
+ *  Purpose: Helper class for converting an XML document to DICOM file or data set
+ *
+ */
+
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+#include "dcmtk/dcmdata/xml2dcm.h"
+
+#ifdef WITH_LIBXML
+
+#include "dcmtk/dcmdata/dctypes.h"
+#include "dcmtk/dcmdata/dcsequen.h"
+#include "dcmtk/dcmdata/dcitem.h"
+#include "dcmtk/dcmdata/dcpixseq.h"
+#include "dcmtk/dcmdata/dcpixel.h"
+#include "dcmtk/dcmdata/dcpxitem.h"
+#include "dcmtk/dcmdata/dcdeftag.h"
+#include "dcmtk/dcmdata/dcfilefo.h"
+#include "dcmtk/dcmdata/dcmetinf.h"
+#include "dcmtk/dcmdata/dcswap.h"
+#include <libxml/parser.h>
+
+// This function is also used in dcmsr, try to stay in sync!
+#if defined(HAVE_VSNPRINTF) && defined(HAVE_PROTOTYPE_VSNPRINTF)
+extern "C" void errorFunction(void * ctx, const char *msg, ...)
+{
+    // Classic C requires us to declare variables at the beginning of the function.
+    OFString &buffer = *OFstatic_cast(OFString*, ctx);
+#else
+extern "C" void errorFunction(void * /* ctx */, const char *msg, ...)
+{
+#endif
+
+    if (!DCM_dcmdataLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
+        return;
+
+#if defined(HAVE_VSNPRINTF) && defined(HAVE_PROTOTYPE_VSNPRINTF)
+    // libxml calls us multiple times for one line of log output which would
+    // result in garbled output. To avoid this, we buffer the output in a local
+    // string in the caller which we get through our 'ctx' parameter. Then, we
+    // output this string on one go when we receive a newline.
+    va_list ap;
+    char buf[1024];
+
+    va_start(ap, msg);
+#ifdef HAVE_PROTOTYPE_STD__VSNPRINTF
+    std::vsnprintf(buf, 1024, msg, ap);
+#else
+    vsnprintf(buf, 1024, msg, ap);
+#endif
+    va_end(ap);
+
+    // Since we can't do anything about a too small buffer for vsnprintf(), we
+    // ignore it. But we do make sure the buffer is null-terminated!
+    buf[1023] = '\0';
+    buffer += buf;
+
+    // If there is a full line in the buffer...
+    size_t pos = buffer.find('\n');
+    while (pos != OFString_npos)
+    {
+        // ..output it and remove it from the buffer
+        DCMDATA_DEBUG(buffer.substr(0, pos));
+        buffer.erase(0, pos + 1);
+
+        pos = buffer.find('\n');
+    }
+#elif defined(HAVE_VPRINTF)
+    // No vsnprint, but at least vfprintf. Output the messages directly to stderr.
+    va_list ap;
+    va_start(ap, msg);
+#ifdef HAVE_PROTOTYPE_STD__VFPRINTF
+    std::vfprintf(stderr, msg, ap);
+#else
+    vfprintf(stderr, msg, ap);
+#endif
+    va_end(ap);
+#else
+    // We can only show the most basic part of the message, this will look bad :(
+    printf("%s", msg);
+#endif
+}
+
+
+static OFBool xmlIsBlankNodeOrComment(xmlNode *node)
+{
+  if (xmlIsBlankNode(node)) return OFTrue;
+  return (0 == xmlStrcmp(node->name, OFreinterpret_cast(const xmlChar *, "comment")));
+}
+
+
+DcmXMLParseHelper::DcmXMLParseHelper()
+: EncodingHandler(NULL)
+{
+}
+
+
+DcmXMLParseHelper::~DcmXMLParseHelper()
+{
+}
+
+
+void DcmXMLParseHelper::initLibrary()
+{
+    /* check for compatible libxml version */
+    LIBXML_TEST_VERSION
+
+    /* temporary buffer needed for errorFunction - more detailed explanation there */
+    OFString tmpErrorString;
+
+    /* initialize the XML library (only required for MT-safety) */
+    xmlInitParser();
+
+    /* do not substitute entities (other than the standard ones) */
+    xmlSubstituteEntitiesDefault(0);
+
+    /* add line number to debug messages */
+    xmlLineNumbersDefault(1);
+
+    /* enable node indenting for tree output */
+    xmlIndentTreeOutput = 1;
+    xmlKeepBlanksDefault(0);
+
+    /* enable libxml warnings and error messages */
+    xmlGetWarningsDefaultValue = 1;
+    xmlSetGenericErrorFunc(&tmpErrorString, errorFunction);
+}
+
+
+void DcmXMLParseHelper::cleanupLibrary()
+{
+    xmlCleanupParser();
+}
+
+
+OFBool DcmXMLParseHelper::convertUtf8ToCharset(
+    const xmlChar *fromString,
+    OFString &toString)
+{
+    OFBool result = OFFalse;
+    if (EncodingHandler != NULL)
+    {
+        /* prepare input/output buffers */
+        xmlBufferPtr fromBuffer = xmlBufferCreate();
+        xmlBufferPtr toBuffer = xmlBufferCreate();
+        xmlBufferCat(fromBuffer, fromString);
+        /* convert character encoding of given string */
+        result = (xmlCharEncOutFunc(EncodingHandler, toBuffer, fromBuffer) >= 0);
+        if (result)
+            toString = OFreinterpret_cast(const char *, xmlBufferContent(toBuffer));
+        /* free allocated memory */
+        xmlBufferFree(toBuffer);
+        xmlBufferFree(fromBuffer);
+    }
+    return result;
+}
+
+
+OFCondition DcmXMLParseHelper::checkNode(
+    xmlNodePtr current,
+    const char *name)
+{
+    OFCondition result = EC_Normal;
+    /* check whether node is valid at all */
+    if (current != NULL)
+    {
+        /* check whether node has expected name */
+        if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, name)) != 0)
+        {
+            DCMDATA_ERROR("document of the wrong type, was '" << current->name << "', '" << name << "' expected");
+            result = EC_XMLParseError;
+        }
+    } else {
+        DCMDATA_ERROR("document of the wrong type, '" << name << "' expected");
+        result = EC_XMLParseError;
+    }
+    return result;
+}
+
+
+OFCondition DcmXMLParseHelper::createNewElement(
+    xmlNodePtr current,
+    DcmElement *&newElem)
+{
+    OFCondition result = EC_IllegalCall;
+    /* check whether node is valid */
+    if (current != NULL)
+    {
+        /* get required information from XML element */
+        xmlChar *elemTag = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "tag"));
+        xmlChar *elemVR = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "vr"));
+        /* convert tag string */
+        DcmTagKey dcmTagKey;
+        unsigned int group = 0xffff;
+        unsigned int elem = 0xffff;
+        /* make sure that "tag" attribute exists */
+        if (elemTag == NULL)
+        {
+            DCMDATA_WARN("missing 'tag' attribute for node '" << current->name << "'");
+            result = EC_XMLParseError;
+        }
+        /* determine group and element number from "tag" */
+        else if (sscanf(OFreinterpret_cast(char *, elemTag), "%x,%x", &group, &elem ) == 2)
+        {
+            dcmTagKey.set(OFstatic_cast(Uint16, group), OFstatic_cast(Uint16, elem));
+            DcmTag dcmTag(dcmTagKey);
+            /* convert vr string */
+            DcmVR dcmVR(OFreinterpret_cast(char *, elemVR));
+            DcmEVR dcmEVR = dcmVR.getEVR();
+            if (dcmEVR == EVR_UNKNOWN)
+            {
+                /* check whether "vr" attribute exists */
+                if (elemVR == NULL)
+                {
+                    DCMDATA_WARN("missing 'vr' attribute for " << dcmTag
+                        << ", using unknown VR");
+                } else {
+                    DCMDATA_WARN("invalid 'vr' attribute (" << elemVR
+                        << ") for " << dcmTag << ", using unknown VR");
+                }
+            }
+            /* check for correct vr */
+            const DcmEVR tagEVR = dcmTag.getEVR();
+            if ((tagEVR != dcmEVR) && (dcmEVR != EVR_UNKNOWN) && (tagEVR != EVR_UNKNOWN) &&
+                ((dcmTagKey != DCM_LUTData) || ((dcmEVR != EVR_US) && (dcmEVR != EVR_SS) && (dcmEVR != EVR_OW))) &&
+                ((tagEVR != EVR_xs) || ((dcmEVR != EVR_US) && (dcmEVR != EVR_SS))) &&
+                (((tagEVR != EVR_ox) && (tagEVR != EVR_px)) || ((dcmEVR != EVR_OB) && (dcmEVR != EVR_OW))))
+            {
+                DCMDATA_WARN("element " << dcmTag << " has wrong VR (" << dcmVR.getVRName()
+                    << "), correct is " << dcmTag.getVR().getVRName());
+            }
+            if (dcmEVR != EVR_UNKNOWN)
+                dcmTag.setVR(dcmVR);
+            /* create DICOM element */
+            result = DcmItem::newDicomElementWithVR(newElem, dcmTag);
+        } else {
+            DCMDATA_WARN("invalid 'tag' attribute (" << elemTag << ") for node '" << current->name << "'");
+            result = EC_XMLParseError;
+        }
+        if (result.bad())
+        {
+            /* delete new element if an error occurred */
+            delete newElem;
+            newElem = NULL;
+        }
+        /* free allocated memory */
+        xmlFree(elemTag);
+        xmlFree(elemVR);
+    }
+    return result;
+}
+
+
+OFCondition DcmXMLParseHelper::putElementContent(
+    xmlNodePtr current,
+    DcmElement *element)
+{
+    OFCondition result = EC_Normal;
+    /* check whether node and element are valid */
+    if ((current != NULL) && (element != NULL))
+    {
+        DcmEVR dcmEVR = element->getVR();
+        /* get the XML node content */
+        xmlChar *elemVal = xmlNodeGetContent(current);
+        xmlChar *attrVal = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "binary"));
+        /* check whether node content is present */
+        if (xmlStrcmp(attrVal, OFreinterpret_cast(const xmlChar *, "hidden")) == 0)
+        {
+            DCMDATA_WARN("content of node " << element->getTag() << " is 'hidden', empty element inserted");
+            /* return an error unless the element is part of the file meta information */
+            if (element->getGTag() != 0x0002)
+                result = EC_MissingValue;
+        }
+        /* check whether node content is base64 encoded */
+        else if (xmlStrcmp(attrVal, OFreinterpret_cast(const xmlChar *, "base64")) == 0)
+        {
+            Uint8 *data = NULL;
+            const size_t length = OFStandard::decodeBase64(OFreinterpret_cast(char *, elemVal), data);
+            if (length > 0)
+            {
+                if (dcmEVR == EVR_OW)
+                {
+                    /* Base64 decoder produces big endian output data, convert to local byte order */
+                    swapIfNecessary(gLocalByteOrder, EBO_BigEndian, data, OFstatic_cast(Uint32, length), sizeof(Uint16));
+                }
+                result = element->putUint8Array(data, OFstatic_cast(Uint32, length));
+                /* delete buffer since data is copied into the element */
+                delete[] data;
+            }
+        }
+        /* check whether node content is stored in a file */
+        else if (xmlStrcmp(attrVal, OFreinterpret_cast(const xmlChar *, "file")) == 0)
+        {
+            if (xmlStrlen(elemVal) > 0)
+            {
+                const char *filename = OFreinterpret_cast(char *, elemVal);
+                /* try to open binary file */
+                FILE *f = fopen(filename, "rb");
+                if (f != NULL)
+                {
+                    /* determine filesize */
+                    const size_t fileSize = OFStandard::getFileSize(filename);
+                    size_t buflen = fileSize;
+                    /* if odd then make even (DICOM requires even length values) */
+                    if (buflen & 1)
+                        buflen++;
+                    Uint8 *buf = NULL;
+                    /* create buffer of OB or OW data */
+                    if (dcmEVR == EVR_OW)
+                    {
+                        Uint16 *buf16 = NULL;
+                        result = element->createUint16Array(OFstatic_cast(Uint32, buflen / 2), buf16);
+                        buf = OFreinterpret_cast(Uint8 *, buf16);
+                    } else
+                        result = element->createUint8Array(OFstatic_cast(Uint32, buflen), buf);
+                    if (result.good())
+                    {
+                        DCMDATA_INFO("reading " << fileSize << " bytes from binary data file: " << filename);
+                        DCMDATA_DEBUG("  and storing it in the element " << element->getTag());
+                        /* read binary file into the buffer */
+                        if (fread(buf, 1, OFstatic_cast(size_t, fileSize), f) != fileSize)
+                        {
+                            DCMDATA_WARN("cannot read binary data file: " << filename << ": " << OFStandard::getLastSystemErrorCode().message());
+                            result = EC_CorruptedData;
+                        }
+                        else if (dcmEVR == EVR_OW)
+                        {
+                            /* swap 16 bit OW data (if necessary) */
+                            swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, buf, OFstatic_cast(Uint32, buflen), sizeof(Uint16));
+                        }
+                    }
+                    fclose(f);
+                } else {
+                    DCMDATA_WARN("cannot open binary data file: " << filename);
+                    result = EC_InvalidTag;
+                }
+            } else
+                DCMDATA_WARN("filename for element " << element->getTag() << " is missing, empty element inserted");
+        } else {
+            OFString dicomVal;
+            /* convert character set from UTF-8 (for specific VRs only) */
+            if (element->isAffectedBySpecificCharacterSet() &&
+               (xmlStrlen(elemVal) > 0) && convertUtf8ToCharset(elemVal, dicomVal))
+            {
+                result = element->putOFStringArray(dicomVal);
+            } else {
+                /* set the value of the newly created element */
+                result = element->putString(OFreinterpret_cast(char *, elemVal));
+            }
+            if (result.bad())
+                DCMDATA_WARN("cannot put content to element " << element->getTag() << ": " << result.text());
+        }
+        /* free allocated memory */
+        xmlFree(elemVal);
+        xmlFree(attrVal);
+    } else
+        result = EC_IllegalCall;
+    return result;
+}
+
+
+OFCondition DcmXMLParseHelper::parseElement(
+    DcmItem *dataset,
+    xmlNodePtr current)
+{
+    DcmElement *newElem = NULL;
+    /* create new DICOM element from XML element */
+    OFCondition result = createNewElement(current, newElem);
+    if (result.good())
+    {
+        /* retrieve specific character set (only on main dataset level) */
+        if ((EncodingHandler == NULL) && (dataset->ident() == EVR_dataset) &&
+            (newElem->getTag() == DCM_SpecificCharacterSet))
+        {
+            const char *encString = NULL;
+            xmlChar *elemVal = xmlNodeGetContent(current);
+            /* check for known character set */
+            if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 6")) == 0)
+                encString = "UTF-8";
+            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 192")) == 0)
+                encString = "UTF-8";
+            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 100")) == 0)
+                encString = "ISO-8859-1";
+            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 101")) == 0)
+                encString = "ISO-8859-2";
+            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 109")) == 0)
+                encString = "ISO-8859-3";
+            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 110")) == 0)
+                encString = "ISO-8859-4";
+            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 148")) == 0)
+                encString = "ISO-8859-9";
+            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 144")) == 0)
+                encString = "ISO-8859-5";
+            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 127")) == 0)
+                encString = "ISO-8859-6";
+            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 126")) == 0)
+                encString = "ISO-8859-7";
+            else if (xmlStrcmp(elemVal, OFreinterpret_cast(const xmlChar *, "ISO_IR 138")) == 0)
+                encString = "ISO-8859-8";
+            else if (xmlStrlen(elemVal) > 0)
+                DCMDATA_WARN("character set '" << elemVal << "' not supported");
+            if (encString != NULL)
+            {
+                /* find appropriate encoding handler */
+                EncodingHandler = xmlFindCharEncodingHandler(encString);
+            }
+            xmlFree(elemVal);
+        }
+        /* set the element value */
+        result = putElementContent(current, newElem);
+        /* insert the new element into the dataset */
+        if (result.good())
+            result = dataset->insert(newElem, OFTrue /*replaceOld*/);
+        if (result.bad())
+        {
+            /* delete element if insertion or putting the value failed */
+            delete newElem;
+        }
+    }
+    return result;
+}
+
+OFCondition DcmXMLParseHelper::parseSequence(
+    DcmSequenceOfItems *sequence,
+    xmlNodePtr current,
+    E_TransferSyntax xfer,
+    const OFBool stopOnError)
+{
+    OFCondition result = EC_Normal;
+    if (sequence != NULL)
+    {
+        /* ignore blank (empty or whitespace only) nodes */
+        while ((current != NULL) && xmlIsBlankNodeOrComment(current))
+            current = current->next;
+        while (current != NULL)
+        {
+            /* ignore non-item nodes */
+            if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "item")) == 0)
+            {
+                /* create new sequence item */
+                DcmItem *newItem = new DcmItem();
+                if (newItem != NULL)
+                {
+                    sequence->insert(newItem);
+                    /* proceed parsing the item content */
+                    result = parseDataSet(newItem, current->xmlChildrenNode, xfer, stopOnError);
+                    if (result.bad())
+                        DCMDATA_WARN("cannot parse invalid item: " << result.text());
+                }
+            } else if (!xmlIsBlankNodeOrComment(current))
+                DCMDATA_WARN("unexpected node '" << current->name << "', 'item' expected, skipping");
+            /* check for errors */
+            if (result.bad())
+            {
+                if  (stopOnError)
+                {
+                    /* exit the loop and return with an error */
+                    break;
+                } else {
+                    DCMDATA_DEBUG("ignoring error as requested by the user");
+                    /* ignore the error */
+                    result = EC_Normal;
+                }
+            }
+            /* proceed with next node */
+            current = current->next;
+        }
+    } else
+        result = EC_IllegalCall;
+    return result;
+}
+
+
+OFCondition DcmXMLParseHelper::parsePixelSequence(
+    DcmPixelSequence *sequence,
+    xmlNodePtr current,
+    const OFBool stopOnError)
+{
+    OFCondition result = EC_Normal;
+    if (sequence != NULL)
+    {
+        /* ignore blank (empty or whitespace only) nodes */
+        while ((current != NULL) && xmlIsBlankNodeOrComment(current))
+            current = current->next;
+        while (current != NULL)
+        {
+            /* ignore non-pixel-item nodes */
+            if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "pixel-item")) == 0)
+            {
+                /* create new pixel item */
+                DcmPixelItem *newItem = new DcmPixelItem(DCM_PixelItemTag);
+                if (newItem != NULL)
+                {
+                    sequence->insert(newItem);
+                    /* put pixel data into the item */
+                    result = putElementContent(current, newItem);
+                    if (result.bad())
+                        DCMDATA_WARN("cannot parse invalid pixel-item: " << result.text());
+                }
+            } else if (!xmlIsBlankNodeOrComment(current))
+                DCMDATA_WARN("unexpected node '" << current->name << "', 'pixel-item' expected, skipping");
+            /* check for errors */
+            if (result.bad())
+            {
+                if  (stopOnError)
+                {
+                    /* exit the loop and return with an error */
+                    break;
+                } else {
+                    DCMDATA_DEBUG("ignoring error as requested by the user");
+                    /* ignore the error */
+                    result = EC_Normal;
+                }
+            }
+            /* proceed with next node */
+            current = current->next;
+        }
+    } else
+        result = EC_IllegalCall;
+    return result;
+}
+
+
+OFCondition DcmXMLParseHelper::parseMetaHeader(
+    DcmMetaInfo *metainfo,
+    xmlNodePtr current,
+    const OFBool parse,
+    const OFBool stopOnError)
+{
+    /* check for valid node and correct name */
+    OFCondition result = checkNode(current, "meta-header");
+    if (result.good() && parse)
+    {
+        /* get child nodes */
+        current = current->xmlChildrenNode;
+        while (current != NULL)
+        {
+            /* ignore non-element nodes */
+            if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "element")) == 0)
+                result = parseElement(metainfo, current);
+            else if (!xmlIsBlankNodeOrComment(current))
+                DCMDATA_WARN("unexpected node '" << current->name << "', 'element' expected, skipping");
+            /* check for errors */
+            if (result.bad())
+            {
+                if  (stopOnError)
+                {
+                    /* exit the loop and return with an error */
+                    break;
+                } else {
+                    DCMDATA_DEBUG("ignoring error as requested by the user");
+                    /* ignore the error */
+                    result = EC_Normal;
+                }
+            }
+            /* proceed with next node */
+            current = current->next;
+        }
+    }
+    return result;
+}
+
+
+OFCondition DcmXMLParseHelper::parseDataSet(
+    DcmItem *dataset,
+    xmlNodePtr current,
+    E_TransferSyntax xfer,
+    const OFBool stopOnError)
+{
+    OFCondition result = EC_Normal;
+    /* ignore blank (empty or whitespace only) nodes */
+    while ((current != NULL) && xmlIsBlankNodeOrComment(current))
+        current = current->next;
+    while (current != NULL)
+    {
+        /* ignore non-element/sequence nodes */
+        if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "element")) == 0)
+            result = parseElement(dataset, current);
+        else if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "sequence")) == 0)
+        {
+            DcmElement *newElem = NULL;
+            /* create new sequence element */
+            if (createNewElement(current, newElem).good())
+            {
+                /* insert new sequence element into the dataset */
+                result = dataset->insert(newElem, OFTrue /*replaceOld*/);
+                if (result.good())
+                {
+                    /* special handling for compressed pixel data */
+                    if (newElem->getTag() == DCM_PixelData)
+                    {
+                        /* create new pixel sequence */
+                        DcmPixelSequence *sequence = new DcmPixelSequence(DCM_PixelSequenceTag);
+                        if (sequence != NULL)
+                        {
+                            if (newElem->ident() == EVR_PixelData)
+                            {
+                                /* ... insert it into the dataset and proceed with the pixel items */
+                                OFstatic_cast(DcmPixelData *, newElem)->putOriginalRepresentation(xfer, NULL, sequence);
+                                result = parsePixelSequence(sequence, current->xmlChildrenNode, stopOnError);
+                            } else
+                                DCMDATA_WARN("wrong VR for 'sequence' element with pixel data, ignoring child nodes");
+                        }
+                    } else {
+                        /* proceed parsing the items of the sequence */
+                        if (newElem->ident() == EVR_SQ)
+                            result = parseSequence(OFstatic_cast(DcmSequenceOfItems *, newElem), current->xmlChildrenNode, xfer, stopOnError);
+                        else
+                            DCMDATA_WARN("wrong VR for 'sequence' element, ignoring child nodes");
+                    }
+                } else {
+                    /* delete element if insertion failed */
+                    delete newElem;
+                }
+            }
+        } else if (!xmlIsBlankNodeOrComment(current))
+            DCMDATA_WARN("unexpected node '" << current->name << "', skipping");
+        /* check for errors */
+        if (result.bad())
+        {
+            if  (stopOnError)
+            {
+                /* exit the loop and return with an error */
+                break;
+            } else {
+                DCMDATA_DEBUG("ignoring error as requested by the user");
+                /* ignore the error */
+                result = EC_Normal;
+            }
+        }
+        /* proceed with next node */
+        current = current->next;
+    }
+    return result;
+}
+
+
+OFCondition DcmXMLParseHelper::validateXmlDocument(xmlDocPtr doc)
+{
+    OFCondition result = EC_Normal;
+    DCMDATA_INFO("validating XML document ...");
+    xmlGenericError(xmlGenericErrorContext, "--- libxml validating ---\n");
+    /* temporary buffer needed for errorFunction - more detailed explanation there */
+    OFString tmpErrorString;
+    /* create context for document validation */
+    xmlValidCtxt cvp;
+    cvp.userData = &tmpErrorString;
+    cvp.error = errorFunction;
+    cvp.warning = errorFunction;
+    /* validate the document */
+    const int valid = xmlValidateDocument(&cvp, doc);
+    xmlGenericError(xmlGenericErrorContext, "-------------------------\n");
+    if (!valid)
+    {
+        DCMDATA_ERROR("document does not validate");
+        result = EC_XMLValidationFailure;
+    }
+    return result;
+}
+
+
+OFCondition DcmXMLParseHelper::readXmlFile(
+    const char *ifname,
+    DcmFileFormat &fileformat,
+    E_TransferSyntax &xfer,
+    const OFBool metaInfo,
+    const OFBool checkNamespace,
+    const OFBool validateDocument,
+    const OFBool stopOnError)
+{
+    OFCondition result = EC_Normal;
+    xfer = EXS_Unknown;
+    xmlGenericError(xmlGenericErrorContext, "--- libxml parsing ------\n");
+    /* build an XML tree from the file */
+#if LIBXML_VERSION >= 20703
+    /*
+     *  Starting with libxml version 2.7.3, the maximum length of XML element values
+     *  is limited to 10 MB.  The following code disables this default limitation.
+     */
+    xmlDocPtr doc = xmlReadFile(ifname, NULL /*encoding*/, XML_PARSE_HUGE);
+#else
+    xmlDocPtr doc = xmlParseFile(ifname);
+#endif
+    xmlGenericError(xmlGenericErrorContext, "-------------------------\n");
+    if (doc != NULL)
+    {
+        /* validate document */
+        if (validateDocument)
+            result = validateXmlDocument(doc);
+        if (result.good())
+        {
+            /* check whether the document is of the right kind */
+            xmlNodePtr current = xmlDocGetRootElement(doc);
+            if (current != NULL)
+            {
+                /* check namespace declaration (if required) */
+                if (!checkNamespace || (xmlSearchNsByHref(doc, current, OFreinterpret_cast(const xmlChar *, DCMTK_XML_NAMESPACE_URI)) != NULL))
+                {
+                    /* check whether to parse a "file-format" or "data-set" */
+                    if (xmlStrcmp(current->name, OFreinterpret_cast(const xmlChar *, "file-format")) == 0)
+                    {
+                        DCMDATA_INFO("parsing file-format ...");
+                        if (metaInfo)
+                            DCMDATA_INFO("parsing meta-header ...");
+                        else
+                            DCMDATA_INFO("skipping meta-header ...");
+                        current = current->xmlChildrenNode;
+                        /* ignore blank (empty or whitespace only) nodes */
+                        while ((current != NULL) && xmlIsBlankNodeOrComment(current))
+                            current = current->next;
+                        /* parse/skip "meta-header" */
+                        result = parseMetaHeader(fileformat.getMetaInfo(), current, metaInfo /*parse*/, stopOnError);
+                        if (result.good())
+                        {
+                            current = current->next;
+                            /* ignore blank (empty or whitespace only) nodes */
+                            while ((current != NULL) && xmlIsBlankNodeOrComment(current))
+                                current = current->next;
+                        } else
+                            DCMDATA_ERROR("cannot parse invalid meta-header");
+                    }
+                    /* there should always be a "data-set" node */
+                    if (result.good())
+                    {
+                        DCMDATA_INFO("parsing data-set ...");
+                        /* parse "data-set" */
+                        result = checkNode(current, "data-set");
+                        if (result.good())
+                        {
+                            /* determine stored transfer syntax */
+                            xmlChar *xferUID = xmlGetProp(current, OFreinterpret_cast(const xmlChar *, "xfer"));
+                            if (xferUID != NULL)
+                                xfer = DcmXfer(OFreinterpret_cast(char *, xferUID)).getXfer();
+                            result = parseDataSet(fileformat.getDataset(), current->xmlChildrenNode, xfer, stopOnError);
+                            /* free allocated memory */
+                            xmlFree(xferUID);
+                            if (result.bad())
+                                DCMDATA_ERROR("cannot parse invalid data-set");
+                        }
+                    }
+                    if (result.bad())
+                    {
+                        if (DCM_dcmdataLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
+                        {
+                            DCMDATA_DEBUG("--- libxml dump ---------");
+                            /* dump XML document for debugging purposes */
+                            xmlChar *str;
+                            int size;
+                            xmlDocDumpFormatMemory(doc, &str, &size, 1);
+                            DCMDATA_DEBUG(str);
+                            xmlFree(str);
+                            DCMDATA_DEBUG("-------------------------");
+                        }
+                        DCMDATA_ERROR("cannot read invalid document: " << ifname);
+                    }
+                } else {
+                    DCMDATA_ERROR("document has wrong type, dcmtk namespace not found");
+                    result = EC_XMLParseError;
+                }
+            } else {
+                DCMDATA_ERROR("document is empty: " << ifname);
+                result = EC_XMLParseError;
+            }
+        }
+    } else {
+        DCMDATA_ERROR("could not parse document: " << ifname);
+        result = EC_XMLParseError;
+    }
+    /* free allocated memory */
+    xmlFreeDoc(doc);
+    return result;
+}
+
+#endif /* WITH_LIBXML */
index 8e2d79d216c36d86bce9f74cdb298cbc7c349d40..8c0859684bfa14417ce0dbc06121d3915b50b7ca 100644 (file)
@@ -1,5 +1,33 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(dcmdata_tests tests tpread ti2dbmp tchval tpath tvrdatim telemlen tparser tdict tvrds tvrfd tvrpn tvrui tvrol tvrov tvrsv tvruv tstrval tspchrs tparent tfilter tvrcomp tmatch tnewdcme tgenuid tsequen)
+DCMTK_ADD_EXECUTABLE(dcmdata_tests
+  tchval.cc
+  tdict.cc
+  telemlen.cc
+  tests.cc
+  tfilter.cc
+  tgenuid.cc
+  ti2dbmp.cc
+  titem.cc
+  tmatch.cc
+  tnewdcme.cc
+  tparent.cc
+  tparser.cc
+  tpath.cc
+  tpread.cc
+  tsequen.cc
+  tspchrs.cc
+  tstrval.cc
+  tvrcomp.cc
+  tvrdatim.cc
+  tvrds.cc
+  tvrfd.cc
+  tvrol.cc
+  tvrov.cc
+  tvrpn.cc
+  tvrsv.cc
+  tvrui.cc
+  tvruv.cc
+)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(dcmdata_tests i2d dcmdata oflog ofstd)
index 25fd91d93f80baa0e3aebe93727876f41abf42fb..d6eae29aa0e53295419d096c50cc42f6dd9318e5 100644 (file)
@@ -332,7 +332,8 @@ tfilter.o: tfilter.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dctypes.h ../include/dcmtk/dcmdata/dcvr.h \
  ../include/dcmtk/dcmdata/dctag.h ../include/dcmtk/dcmdata/dcstack.h \
  ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcdatset.h \
- ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h
+ ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dcpcache.h \
+ ../include/dcmtk/dcmdata/dcdict.h ../include/dcmtk/dcmdata/dchashdi.h
 tgenuid.o: tgenuid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
@@ -435,6 +436,63 @@ ti2dbmp.o: ti2dbmp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmdata/libi2d/i2define.h
+titem.o: titem.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../../ofstd/include/dcmtk/ofstd/oftest.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexit.h \
+ ../include/dcmtk/dcmdata/dcuid.h ../include/dcmtk/dcmdata/dcdefine.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../include/dcmtk/dcmdata/dcitem.h ../include/dcmtk/dcmdata/dctypes.h \
+ ../include/dcmtk/dcmdata/dcobject.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../include/dcmtk/dcmdata/dcerror.h ../include/dcmtk/dcmdata/dcxfer.h \
+ ../include/dcmtk/dcmdata/dcvr.h ../include/dcmtk/dcmdata/dctag.h \
+ ../include/dcmtk/dcmdata/dctagkey.h ../include/dcmtk/dcmdata/dcstack.h \
+ ../include/dcmtk/dcmdata/dclist.h ../include/dcmtk/dcmdata/dcpcache.h \
+ ../include/dcmtk/dcmdata/dcvrat.h ../include/dcmtk/dcmdata/dcelem.h \
+ ../include/dcmtk/dcmdata/dcvrus.h ../include/dcmtk/dcmdata/dcdeftag.h
 tmatch.o: tmatch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
@@ -809,13 +867,13 @@ tpath.o: tpath.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvrol.h ../include/dcmtk/dcmdata/dcvrov.h \
  ../include/dcmtk/dcmdata/cmdlnarg.h ../include/dcmtk/dcmdata/dcpath.h
 tpread.o: tpread.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
@@ -1139,7 +1197,8 @@ tvrcomp.o: tvrcomp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmdata/dcvruc.h ../include/dcmtk/dcmdata/dcvrus.h \
  ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcpxitem.h \
  ../include/dcmtk/dcmdata/dcofsetl.h ../include/dcmtk/dcmdata/dcpixel.h \
- ../include/dcmtk/dcmdata/dcovlay.h ../include/dcmtk/dcmdata/dcpixseq.h
+ ../include/dcmtk/dcmdata/dcovlay.h ../include/dcmtk/dcmdata/dcpixseq.h \
+ ../include/dcmtk/dcmdata/dcdict.h ../include/dcmtk/dcmdata/dchashdi.h
 tvrdatim.o: tvrdatim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
@@ -1200,7 +1259,8 @@ tvrdatim.o: tvrdatim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftime.h \
  ../include/dcmtk/dcmdata/dcvrdt.h \
  ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
- ../include/dcmtk/dcmdata/dcdeftag.h
+ ../include/dcmtk/dcmdata/dcdeftag.h ../include/dcmtk/dcmdata/dcdict.h \
+ ../include/dcmtk/dcmdata/dchashdi.h
 tvrds.o: tvrds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
index a2f44a66a6bf2c7c530e0e86f67c18a807df97b0..be8e2c40306ba259057e09e00fbb828548f10717 100644 (file)
@@ -18,13 +18,13 @@ oflogdir = $(top_srcdir)/../oflog
 LOCALINCLUDES = -I$(top_srcdir)/include -I$(ofstddir)/include -I$(oflogdir)/include
 LIBDIRS = -L$(top_srcdir)/libsrc -L$(top_srcdir)/libi2d -L$(ofstddir)/libsrc \
        -L$(oflogdir)/libsrc
-LOCALLIBS = -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
+LOCALLIBS = -ldcmdata -loflog -lofstd $(ZLIBLIBS) $(XMLLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 I2DLIBS = -li2d
 
 objs = tests.o tpread.o ti2dbmp.o tchval.o tpath.o tvrdatim.o telemlen.o tparser.o \
        tdict.o tvrds.o tvrfd.o tvrui.o tvrol.o tvrov.o tvrsv.o tvruv.o tstrval.o \
        tspchrs.o tvrpn.o tparent.o tfilter.o tvrcomp.o tmatch.o tnewdcme.o \
-       tgenuid.o tsequen.o
+       tgenuid.o tsequen.o titem.o
 
 progs = tests
 
index c487f88e08ec82cdc9016ad381931dda8d50b4a5..4e808472e7d23312e79e6fffa23fda6664793cb6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2011-2012, OFFIS e.V.
+ *  Copyright (C) 2011-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -72,7 +72,7 @@
 static inline OFCondition readDataset(DcmDataset& dset, const Uint8* buffer, size_t length, E_TransferSyntax ts)
 {
     DcmInputBufferStream stream;
-    stream.setBuffer(buffer, length);
+    stream.setBuffer(buffer, OFstatic_cast(offile_off_t, length));
     stream.setEos();
 
     dset.clear();
@@ -103,7 +103,7 @@ static inline OFCondition readDatasetTwice(DcmDataset& dset, const Uint8* buffer
 
     // Write the dataset into a temporary buffer
     OFVector<Uint8> writeBuffer(length * 2);
-    DcmOutputBufferStream out(&writeBuffer[0], writeBuffer.size());
+    DcmOutputBufferStream out(&writeBuffer[0], OFstatic_cast(offile_off_t, writeBuffer.size()));
     dset.transferInit();
     cond = dset.write(out, ts1, encType, NULL);
     dset.transferEnd();
index 9d5db2c041ce135f68547eb06e1e8653b16b3073..08fb38a443dea2096598797fea0f0aa926b4efdc 100644 (file)
@@ -94,6 +94,7 @@ OFTEST_REGISTER(dcmdata_elementParent);
 OFTEST_REGISTER(dcmdata_sequenceInsert);
 OFTEST_REGISTER(dcmdata_pixelSequenceInsert);
 OFTEST_REGISTER(dcmdata_findAndGetSequenceItem);
+OFTEST_REGISTER(dcmdata_findAndGetUint16Array);
 OFTEST_REGISTER(dcmdata_parser_missingDelimitationItems);
 OFTEST_REGISTER(dcmdata_parser_missingSequenceDelimitationItem_1);
 OFTEST_REGISTER(dcmdata_parser_missingSequenceDelimitationItem_2);
diff --git a/dcmdata/tests/titem.cc b/dcmdata/tests/titem.cc
new file mode 100644 (file)
index 0000000..ecc65fe
--- /dev/null
@@ -0,0 +1,50 @@
+/*
+ *
+ *  Copyright (C) 2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Joerg Riesmeier
+ *
+ *  Purpose: test program for class DcmItem
+ *
+ */
+
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+#include "dcmtk/ofstd/oftest.h"
+#include "dcmtk/dcmdata/dcitem.h"
+#include "dcmtk/dcmdata/dcvrat.h"
+#include "dcmtk/dcmdata/dcvrus.h"
+#include "dcmtk/dcmdata/dcdeftag.h"
+
+
+OFTEST(dcmdata_findAndGetUint16Array)
+{
+    DcmItem item;
+    /* create data elements with values */
+    DcmUnsignedShort usValue(DCM_SynchronizationChannel);
+    DcmAttributeTag atValue(DCM_FrameIncrementPointer);
+    usValue.putString("1\\2");
+    atValue.putTagVal(DCM_FrameTime);
+    /* add elements to item */
+    OFCHECK(item.insert(new DcmUnsignedShort(usValue)).good());
+    OFCHECK(item.insert(new DcmAttributeTag(atValue)).good());
+    /* and check the number of 16-bit values stored */
+    const Uint16 *uintVals = NULL;
+    unsigned long numUints = 0;
+    OFCHECK(item.findAndGetUint16Array(DCM_SynchronizationChannel, uintVals, &numUints).good());
+    OFCHECK_EQUAL(numUints, 2);
+    OFCHECK(item.findAndGetUint16Array(DCM_FrameIncrementPointer, uintVals, &numUints).good());
+    OFCHECK_EQUAL(numUints, 2);
+}
index 2f298658089af0dcdbe2344863ddccac90cda44d..615df229656edb5d801ce6984c815c769b010ce5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/oftest.h"
 #include "dcmtk/ofstd/ofrand.h"
 #include "dcmtk/dcmdata/dctk.h"
index c9039999a91ac9430a42e92f963d598ccac53372..3a6959ba96d7465f5f5fa1038fcb754dabb91b79 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2019-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -64,7 +64,7 @@ OFTEST(dcmdata_pixelSequenceInsert)
     unsigned long counter = 0;
     for (unsigned long i = 0; i < NUMBER_OF_ITEMS; ++i)
     {
-        if (pixelSequence.insert(new DcmPixelItem(DcmTag(DCM_Item, EVR_OB))).good())
+        if (pixelSequence.insert(new DcmPixelItem(DCM_PixelItemTag)).good())
             ++counter;
     }
     /* check whether that worked (for-loop shouldn't take too long) */
index 87c450d5324252d915df064ec85549925a49a017..fb2429dc6bb862b3246150ac30df7887a8c25d35 100644 (file)
@@ -1,4 +1,6 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmect enhanced_ct types)
+DCMTK_ADD_LIBRARY(dcmect
+  enhanced_ct.cc
+  types.cc)
 
 DCMTK_TARGET_LINK_MODULES(dcmect dcmfg dcmiod dcmdata ofstd oflog)
index e4f081dcb50a21f9375e21db76c0d2f1acd05447..2046282522ef9198543e634d57874c4ccafef636 100644 (file)
@@ -3,7 +3,6 @@ enhanced_ct.o: enhanced_ct.cc ../include/dcmtk/dcmect/enhanced_ct.h \
  ../include/dcmtk/dcmect/def.h ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmect/types.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -11,6 +10,7 @@ enhanced_ct.o: enhanced_ct.cc ../include/dcmtk/dcmect/enhanced_ct.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -141,9 +141,9 @@ enhanced_ct.o: enhanced_ct.cc ../include/dcmtk/dcmect/enhanced_ct.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \
  ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/diag/push.def \
  ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \
  ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \
@@ -157,23 +157,19 @@ enhanced_ct.o: enhanced_ct.cc ../include/dcmtk/dcmect/enhanced_ct.h \
  ../../dcmfg/include/dcmtk/dcmfg/concatenationcreator.h \
  ../../dcmfg/include/dcmtk/dcmfg/concatenationloader.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \
- ../../ofstd/include/dcmtk/ofstd/oftuple.h \
- ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h
+ ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h
 types.o: types.cc ../include/dcmtk/dcmect/types.h \
  ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmect/def.h ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
index 007cb881363644c5fb34b6852fe8a36d834e7f79..619374290bece6ac8aa12e912e32462365f4f627 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, Open Connections GmbH
+ *  Copyright (C) 2019-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -480,7 +480,7 @@ OFCondition EctEnhancedCT::loadDataset(DcmDataset& dataset, EctEnhancedCT*& ct)
         else
         {
             DCMECT_ERROR("Invalid SOP Class: "
-                         << sopClass << ", only Enhanced CT Image Storage (1.2.840.10008.5.1.4.1.1.2.1) supported");
+                         << sopClass << ", only Enhanced CT Image Storage (1.2.840.10008.5.1.4.1.1.2.1) supported");
             return ECT_InvalidSOPClass;
         }
     }
index 01e732de3ec463612e33adf6ee86fa04e56468ad..5d66b1145ae192b4910f520631c58668247c41d5 100644 (file)
@@ -1,8 +1,9 @@
 # declare executables
 DCMTK_ADD_EXECUTABLE(dcmect_tests
-                     tests
-                     t_huge_concat
-                     t_roundtrip)
+  tests.cc
+  t_huge_concat.cc
+  t_roundtrip.cc
+)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(dcmect_tests dcmect dcmfg dcmdata oflog ofstd)
index ba8cdd44db8026185a96674200ed8a872105eb22..0d7b04db898c9fe98b576e1c93dcbfa1dd9509bd 100644 (file)
@@ -150,9 +150,9 @@ t_huge_concat.o: t_huge_concat.cc \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \
  ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/diag/push.def \
  ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \
  ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \
@@ -167,10 +167,6 @@ t_huge_concat.o: t_huge_concat.cc \
  ../../dcmfg/include/dcmtk/dcmfg/concatenationloader.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \
- ../../ofstd/include/dcmtk/ofstd/oftuple.h \
- ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgctacquisitiondetails.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgctacquisitiontype.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgctadditionalxraysource.h \
@@ -344,9 +340,9 @@ t_roundtrip.o: t_roundtrip.cc \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \
  ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/diag/push.def \
  ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \
  ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \
@@ -361,10 +357,6 @@ t_roundtrip.o: t_roundtrip.cc \
  ../../dcmfg/include/dcmtk/dcmfg/concatenationloader.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \
- ../../ofstd/include/dcmtk/ofstd/oftuple.h \
- ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgctacquisitiondetails.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgctacquisitiontype.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgctadditionalxraysource.h \
index c96b2fa55bd24e96a1c15b67c6e1f0491a16b366..f77342eb73c2cac9a00a87e794165794e9d46f54 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019-2020, OFFIS e.V.
+ *  Copyright (C) 2019-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -272,7 +272,6 @@ static void addSharedFGs(EctEnhancedCT* ct)
         OFCHECK(exp_item->setCTDIVol(0.1).good());
         CodeSequenceMacro* phantom_item = new CodeSequenceMacro("113682", "DCM", "ACR Accreditation Phantom - CT");
         exp_item->getCTDIPhantomTypeCodeSequence().push_back(phantom_item);
-        OFCHECK(exp_item->setEstimatedDoseSaving(0.2).good());
         OFCHECK(exp_item->setExposureInMas(0.3).good());
         OFCHECK(exp_item->setExposureModulationType("WEIRD").good());
         OFCHECK(exp_item->setExposureTimeInMs(0.4).good());
@@ -734,8 +733,7 @@ static void prepareExpectedDump()
     EXPECTED_DUMP += "        (0018,1130) DS [50]                                     #   2, 1 TableHeight\n";
     EXPECTED_DUMP += "        (0018,1140) CS [CW]                                     #   2, 1 RotationDirection\n";
     EXPECTED_DUMP += "        (0018,9305) FD 5                                        #   8, 1 RevolutionTime\n";
-    EXPECTED_DUMP
-        += "        (0018,9306) FD 1                                        #   8, 1 SingleCollimationWidth\n";
+    EXPECTED_DUMP += "        (0018,9306) FD 1                                        #   8, 1 SingleCollimationWidth\n";
     EXPECTED_DUMP += "        (0018,9307) FD 10                                       #   8, 1 TotalCollimationWidth\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
@@ -748,62 +746,44 @@ static void prepareExpectedDump()
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "    (0018,9312) SQ (Sequence with explicit length #=1)      #   0, 1 CTGeometrySequence\n";
     EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=2)          #   0, 1 Item\n";
-    EXPECTED_DUMP
-        += "        (0018,1110) DS [0.5]                                    #   4, 1 DistanceSourceToDetector\n";
-    EXPECTED_DUMP += "        (0018,9335) FD 5                                        #   8, 1 "
-                     "DistanceSourceToDataCollectionCenter\n";
+    EXPECTED_DUMP += "        (0018,1110) DS [0.5]                                    #   4, 1 DistanceSourceToDetector\n";
+    EXPECTED_DUMP += "        (0018,9335) FD 5                                        #   8, 1 DistanceSourceToDataCollectionCenter\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "    (0018,9314) SQ (Sequence with explicit length #=1)      #   0, 1 CTReconstructionSequence\n";
     EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=7)          #   0, 1 Item\n";
-    EXPECTED_DUMP
-        += "        (0018,1100) DS [100]                                    #   4, 1 ReconstructionDiameter\n";
+    EXPECTED_DUMP += "        (0018,1100) DS [100]                                    #   4, 1 ReconstructionDiameter\n";
     EXPECTED_DUMP += "        (0018,1210) SH [DUMMY]                                  #   6, 1 ConvolutionKernel\n";
-    EXPECTED_DUMP
-        += "        (0018,9315) CS [ALGO]                                   #   4, 1 ReconstructionAlgorithm\n";
-    EXPECTED_DUMP
-        += "        (0018,9316) CS [DUMMYGROUP]                             #  10, 1 ConvolutionKernelGroup\n";
+    EXPECTED_DUMP += "        (0018,9315) CS [ALGO]                                   #   4, 1 ReconstructionAlgorithm\n";
+    EXPECTED_DUMP += "        (0018,9316) CS [DUMMYGROUP]                             #  10, 1 ConvolutionKernelGroup\n";
     EXPECTED_DUMP += "        (0018,9319) FD 90                                       #   8, 1 ReconstructionAngle\n";
     EXPECTED_DUMP += "        (0018,9320) SH [FILTER]                                 #   6, 1 ImageFilter\n";
-    EXPECTED_DUMP
-        += "        (0018,9322) FD 0.1\\0.1                                  #  16, 2 ReconstructionPixelSpacing\n";
+    EXPECTED_DUMP += "        (0018,9322) FD 0.1\\0.1                                  #  16, 2 ReconstructionPixelSpacing\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "    (0018,9321) SQ (Sequence with explicit length #=1)      #   0, 1 CTExposureSequence\n";
-    EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=10)         #   0, 1 Item\n";
-    EXPECTED_DUMP += "        (0018,115e) DS [0.5]                                    #   4, 1 "
-                     "ImageAndFluoroscopyAreaDoseProduct\n";
-    EXPECTED_DUMP
-        += "        (0018,1271) FD 0.6                                      #   8, 1 WaterEquivalentDiameter\n";
-    EXPECTED_DUMP += "        (0018,1272) SQ (Sequence with explicit length #=1)      #   0, 1 "
-                     "WaterEquivalentDiameterCalculationMethodCodeSequence\n";
+    EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=9)          #   0, 1 Item\n";
+    EXPECTED_DUMP += "        (0018,115e) DS [0.5]                                    #   4, 1 ImageAndFluoroscopyAreaDoseProduct\n";
+    EXPECTED_DUMP += "        (0018,1271) FD 0.6                                      #   8, 1 WaterEquivalentDiameter\n";
+    EXPECTED_DUMP += "        (0018,1272) SQ (Sequence with explicit length #=1)      #   0, 1 WaterEquivalentDiameterCalculationMethodCodeSequence\n";
     EXPECTED_DUMP += "          (fffe,e000) na (Item with explicit length #=3)          #   0, 1 Item\n";
     EXPECTED_DUMP += "            (0008,0100) SH [113987]                                 #   6, 1 CodeValue\n";
-    EXPECTED_DUMP
-        += "            (0008,0102) SH [DCM]                                    #   4, 1 CodingSchemeDesignator\n";
+    EXPECTED_DUMP += "            (0008,0102) SH [DCM]                                    #   4, 1 CodingSchemeDesignator\n";
     EXPECTED_DUMP += "            (0008,0104) LO [AAPM 220]                               #   8, 1 CodeMeaning\n";
-    EXPECTED_DUMP
-        += "          (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
-    EXPECTED_DUMP
-        += "        (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
-    EXPECTED_DUMP
-        += "        (0018,9323) CS [WEIRD]                                  #   6, 1 ExposureModulationType\n";
-    EXPECTED_DUMP += "        (0018,9324) FD 0.2                                      #   8, 1 EstimatedDoseSaving\n";
+    EXPECTED_DUMP += "          (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
+    EXPECTED_DUMP += "        (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
+    EXPECTED_DUMP += "        (0018,9323) CS [WEIRD]                                  #   6, 1 ExposureModulationType\n";
     EXPECTED_DUMP += "        (0018,9328) FD 0.4                                      #   8, 1 ExposureTimeInms\n";
     EXPECTED_DUMP += "        (0018,9330) FD 0.7                                      #   8, 1 XRayTubeCurrentInmA\n";
     EXPECTED_DUMP += "        (0018,9332) FD 0.3                                      #   8, 1 ExposureInmAs\n";
     EXPECTED_DUMP += "        (0018,9345) FD 0.1                                      #   8, 1 CTDIvol\n";
-    EXPECTED_DUMP
-        += "        (0018,9346) SQ (Sequence with explicit length #=1)      #   0, 1 CTDIPhantomTypeCodeSequence\n";
+    EXPECTED_DUMP += "        (0018,9346) SQ (Sequence with explicit length #=1)      #   0, 1 CTDIPhantomTypeCodeSequence\n";
     EXPECTED_DUMP += "          (fffe,e000) na (Item with explicit length #=3)          #   0, 1 Item\n";
     EXPECTED_DUMP += "            (0008,0100) SH [113682]                                 #   6, 1 CodeValue\n";
-    EXPECTED_DUMP
-        += "            (0008,0102) SH [DCM]                                    #   4, 1 CodingSchemeDesignator\n";
+    EXPECTED_DUMP += "            (0008,0102) SH [DCM]                                    #   4, 1 CodingSchemeDesignator\n";
     EXPECTED_DUMP += "            (0008,0104) LO [ACR Accreditation Phantom - CT]         #  30, 1 CodeMeaning\n";
-    EXPECTED_DUMP
-        += "          (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
-    EXPECTED_DUMP
-        += "        (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
+    EXPECTED_DUMP += "          (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
+    EXPECTED_DUMP += "        (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "    (0018,9325) SQ (Sequence with explicit length #=1)      #   0, 1 CTXRayDetailsSequence\n";
@@ -812,19 +792,15 @@ static void prepareExpectedDump()
     EXPECTED_DUMP += "        (0018,1160) SH [FILTER_TYPE]                            #  12, 1 FilterType\n";
     EXPECTED_DUMP += "        (0018,1190) DS [4.4\\4.4\\4.4\\4.4]                        #  16, 4 FocalSpots\n";
     EXPECTED_DUMP += "        (0018,7050) CS [FILTER_MATERIAL]                        #  16, 1 FilterMaterial\n";
-    EXPECTED_DUMP
-        += "        (0018,9351) FL 2                                        #   4, 1 CalciumScoringMassFactorPatient\n";
-    EXPECTED_DUMP += "        (0018,9352) FL 1\\1\\1                                    #  12, 3 "
-                     "CalciumScoringMassFactorDevice\n";
+    EXPECTED_DUMP += "        (0018,9351) FL 2                                        #   4, 1 CalciumScoringMassFactorPatient\n";
+    EXPECTED_DUMP += "        (0018,9352) FL 1\\1\\1                                    #  12, 3 CalciumScoringMassFactorDevice\n";
     EXPECTED_DUMP += "        (0018,9353) FL 3                                        #   4, 1 EnergyWeightingFactor\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "    (0018,9326) SQ (Sequence with explicit length #=1)      #   0, 1 CTPositionSequence\n";
     EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=3)          #   0, 1 Item\n";
-    EXPECTED_DUMP
-        += "        (0018,9313) FD 2\\2\\2                                    #  24, 3 DataCollectionCenterPatient\n";
-    EXPECTED_DUMP += "        (0018,9318) FD 1\\1\\1                                    #  24, 3 "
-                     "ReconstructionTargetCenterPatient\n";
+    EXPECTED_DUMP += "        (0018,9313) FD 2\\2\\2                                    #  24, 3 DataCollectionCenterPatient\n";
+    EXPECTED_DUMP += "        (0018,9318) FD 1\\1\\1                                    #  24, 3 ReconstructionTargetCenterPatient\n";
     EXPECTED_DUMP += "        (0018,9327) FD 100                                      #   8, 1 TablePosition\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
@@ -833,16 +809,13 @@ static void prepareExpectedDump()
     EXPECTED_DUMP += "        (0008,9007) CS [ORIGINAL\\PRIMARY\\VOLUME\\MAXIMUM]        #  32, 4 FrameType\n";
     EXPECTED_DUMP += "        (0008,9205) CS [MONOCHROME]                             #  10, 1 PixelPresentation\n";
     EXPECTED_DUMP += "        (0008,9206) CS [VOLUME]                                 #   6, 1 VolumetricProperties\n";
-    EXPECTED_DUMP
-        += "        (0008,9207) CS [VOLUME_RENDER]                          #  14, 1 VolumeBasedCalculationTechnique\n";
+    EXPECTED_DUMP += "        (0008,9207) CS [VOLUME_RENDER]                          #  14, 1 VolumeBasedCalculationTechnique\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
-    EXPECTED_DUMP
-        += "    (0018,9360) SQ (Sequence with explicit length #=1)      #   0, 1 CTAdditionalXRaySourceSequence\n";
+    EXPECTED_DUMP += "    (0018,9360) SQ (Sequence with explicit length #=1)      #   0, 1 CTAdditionalXRaySourceSequence\n";
     EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=8)          #   0, 1 Item\n";
     EXPECTED_DUMP += "        (0018,0060) DS [5]                                      #   2, 1 KVP\n";
-    EXPECTED_DUMP
-        += "        (0018,0090) DS [1]                                      #   2, 1 DataCollectionDiameter\n";
+    EXPECTED_DUMP += "        (0018,0090) DS [1]                                      #   2, 1 DataCollectionDiameter\n";
     EXPECTED_DUMP += "        (0018,1160) SH [FILTER_TYPE]                            #  12, 1 FilterType\n";
     EXPECTED_DUMP += "        (0018,1190) DS [4.4\\4.4\\4.4\\4.4]                        #  16, 4 FocalSpots\n";
     EXPECTED_DUMP += "        (0018,7050) CS [FILTER_MATERIAL]                        #  16, 1 FilterMaterial\n";
@@ -854,42 +827,34 @@ static void prepareExpectedDump()
     EXPECTED_DUMP += "    (0018,9477) SQ (Sequence with explicit length #=1)      #   0, 1 "
                      "IrradiationEventIdentificationSequence\n";
     EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=1)          #   0, 1 Item\n";
-    EXPECTED_DUMP
-        += "        (0008,3010) UI [2.25.30853892236613436472911970638347155062] #  44, 1 IrradiationEventUID\n";
+    EXPECTED_DUMP += "        (0008,3010) UI [2.25.30853892236613436472911970638347155062] #  44, 1 IrradiationEventUID\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "    (0020,9071) SQ (Sequence with explicit length #=1)      #   0, 1 FrameAnatomySequence\n";
     EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=2)          #   0, 1 Item\n";
-    EXPECTED_DUMP
-        += "        (0008,2218) SQ (Sequence with explicit length #=1)      #   0, 1 AnatomicRegionSequence\n";
+    EXPECTED_DUMP += "        (0008,2218) SQ (Sequence with explicit length #=1)      #   0, 1 AnatomicRegionSequence\n";
     EXPECTED_DUMP += "          (fffe,e000) na (Item with explicit length #=3)          #   0, 1 Item\n";
     EXPECTED_DUMP += "            (0008,0100) SH [12738006]                               #   8, 1 CodeValue\n";
-    EXPECTED_DUMP
-        += "            (0008,0102) SH [SCT]                                    #   4, 1 CodingSchemeDesignator\n";
+    EXPECTED_DUMP += "            (0008,0102) SH [SCT]                                    #   4, 1 CodingSchemeDesignator\n";
     EXPECTED_DUMP += "            (0008,0104) LO [Brain]                                  #   6, 1 CodeMeaning\n";
-    EXPECTED_DUMP
-        += "          (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
-    EXPECTED_DUMP
-        += "        (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
+    EXPECTED_DUMP += "          (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
+    EXPECTED_DUMP += "        (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "        (0020,9072) CS [B]                                      #   2, 1 FrameLaterality\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "    (0020,9113) SQ (Sequence with explicit length #=1)      #   0, 1 PlanePositionSequence\n";
     EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=1)          #   0, 1 Item\n";
-    EXPECTED_DUMP
-        += "        (0020,0032) DS [0.0\\0.0\\0.0]                            #  12, 3 ImagePositionPatient\n";
+    EXPECTED_DUMP += "        (0020,0032) DS [0.0\\0.0\\0.0]                            #  12, 3 ImagePositionPatient\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "    (0020,9116) SQ (Sequence with explicit length #=1)      #   0, 1 PlaneOrientationSequence\n";
     EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=1)          #   0, 1 Item\n";
-    EXPECTED_DUMP
-        += "        (0020,0037) DS [1.0\\0.0\\0.0\\0.0\\1.0\\0.0]                #  24, 6 ImageOrientationPatient\n";
+    EXPECTED_DUMP += "        (0020,0037) DS [1.0\\0.0\\0.0\\0.0\\1.0\\0.0]                #  24, 6 ImageOrientationPatient\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "    (0020,9310) SQ (Sequence with explicit length #=1)      #   0, 1 TemporalPositionSequence\n";
     EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=1)          #   0, 1 Item\n";
-    EXPECTED_DUMP
-        += "        (0020,930d) FD 1                                        #   8, 1 TemporalPositionTimeOffset\n";
+    EXPECTED_DUMP += "        (0020,930d) FD 1                                        #   8, 1 TemporalPositionTimeOffset\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "    (0028,9110) SQ (Sequence with explicit length #=1)      #   0, 1 PixelMeasuresSequence\n";
@@ -903,12 +868,10 @@ static void prepareExpectedDump()
     EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=3)          #   0, 1 Item\n";
     EXPECTED_DUMP += "        (0028,1050) DS [1000]                                   #   4, 1 WindowCenter\n";
     EXPECTED_DUMP += "        (0028,1051) DS [2000]                                   #   4, 1 WindowWidth\n";
-    EXPECTED_DUMP
-        += "        (0028,1055) LO [BRAIN]                                  #   6, 1 WindowCenterWidthExplanation\n";
+    EXPECTED_DUMP += "        (0028,1055) LO [BRAIN]                                  #   6, 1 WindowCenterWidthExplanation\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
-    EXPECTED_DUMP
-        += "    (0028,9145) SQ (Sequence with explicit length #=1)      #   0, 1 PixelValueTransformationSequence\n";
+    EXPECTED_DUMP += "    (0028,9145) SQ (Sequence with explicit length #=1)      #   0, 1 PixelValueTransformationSequence\n";
     EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=3)          #   0, 1 Item\n";
     EXPECTED_DUMP += "        (0028,1052) DS [0]                                      #   2, 1 RescaleIntercept\n";
     EXPECTED_DUMP += "        (0028,1053) DS [1]                                      #   2, 1 RescaleSlope\n";
@@ -917,28 +880,22 @@ static void prepareExpectedDump()
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "  (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
-    EXPECTED_DUMP
-        += "(5200,9230) SQ (Sequence with explicit length #=1)      #   0, 1 PerFrameFunctionalGroupsSequence\n";
+    EXPECTED_DUMP += "(5200,9230) SQ (Sequence with explicit length #=1)      #   0, 1 PerFrameFunctionalGroupsSequence\n";
     EXPECTED_DUMP += "  (fffe,e000) na (Item with explicit length #=1)          #   0, 1 Item\n";
     EXPECTED_DUMP += "    (0020,9111) SQ (Sequence with explicit length #=1)      #   0, 1 FrameContentSequence\n";
     EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=7)          #   0, 1 Item\n";
-    EXPECTED_DUMP
-        += "        (0018,9074) DT [20190816092557]                         #  14, 1 FrameAcquisitionDateTime\n";
-    EXPECTED_DUMP
-        += "        (0018,9151) DT [20190816092557]                         #  14, 1 FrameReferenceDateTime\n";
-    EXPECTED_DUMP
-        += "        (0018,9220) FD 0.001                                    #   8, 1 FrameAcquisitionDuration\n";
+    EXPECTED_DUMP += "        (0018,9074) DT [20190816092557]                         #  14, 1 FrameAcquisitionDateTime\n";
+    EXPECTED_DUMP += "        (0018,9151) DT [20190816092557]                         #  14, 1 FrameReferenceDateTime\n";
+    EXPECTED_DUMP += "        (0018,9220) FD 0.001                                    #   8, 1 FrameAcquisitionDuration\n";
     EXPECTED_DUMP += "        (0020,9056) SH [1]                                      #   2, 1 StackID\n";
     EXPECTED_DUMP += "        (0020,9057) UL 1                                        #   4, 1 InStackPositionNumber\n";
-    EXPECTED_DUMP
-        += "        (0020,9156) US 1                                        #   2, 1 FrameAcquisitionNumber\n";
+    EXPECTED_DUMP += "        (0020,9156) US 1                                        #   2, 1 FrameAcquisitionNumber\n";
     EXPECTED_DUMP += "        (0020,9157) UL 1\\1                                      #   8, 2 DimensionIndexValues\n";
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "  (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
-    EXPECTED_DUMP += "(7fe0,0010) OW 0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001... # "
-                     "32000000, 1 PixelData\n";
+    EXPECTED_DUMP += "(7fe0,0010) OW 0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001\\0001... # 32000000, 1 PixelData\n";
     OFStringStream ss;
     ss << NUM_ROWS;
     OFString numRows(ss.str().c_str());
index 3cdeb907af934080e14debabfe7c09a9b541b9b4..fff13c1adec6d9fca471e3f3092ef4d2060f58a0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019-2020, OFFIS e.V.
+ *  Copyright (C) 2019-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,6 +28,9 @@
 
 #include "dcmtk/dcmect/enhanced_ct.h"
 
+#include "dcmtk/dcmdata/dcxfer.h"
+#include "dcmtk/dcmdata/dcswap.h"
+
 #include "dcmtk/dcmfg/concatenationcreator.h"
 #include "dcmtk/dcmfg/concatenationloader.h"
 #include "dcmtk/dcmfg/fgctacquisitiondetails.h"
@@ -295,7 +298,6 @@ static void addSharedFGs(EctEnhancedCT* ct)
         OFCHECK(exp_item->setCTDIVol(0.1).good());
         CodeSequenceMacro* phantom_item = new CodeSequenceMacro("113682", "DCM", "ACR Accreditation Phantom - CT");
         exp_item->getCTDIPhantomTypeCodeSequence().push_back(phantom_item);
-        OFCHECK(exp_item->setEstimatedDoseSaving(0.2).good());
         OFCHECK(exp_item->setExposureInMas(0.3).good());
         OFCHECK(exp_item->setExposureModulationType("WEIRD").good());
         OFCHECK(exp_item->setExposureTimeInMs(0.4).good());
@@ -619,6 +621,8 @@ static void checkConcatenationInstance(size_t numInstance, EctEnhancedCT* srcIns
         // Check that all pixels are set to their original source instances frame number (starting from 1)
         for (size_t pix = 0; pix < NUM_PIXELS_PER_FRAME; pix++)
         {
+            // We need to swap the 16 bit value if the test runs on big endian platforms
+            swapIfNecessary(gLocalByteOrder, EBO_LittleEndian, &frame[pix], 2, sizeof(Uint16));
             OFCHECK(frame[pix] == numInstance + 1);
         }
         delete concat;
@@ -658,7 +662,11 @@ static void prepareExpectedDump()
 {
     EXPECTED_DUMP += "\n";
     EXPECTED_DUMP += "# Dicom-Data-Set\n";
-    EXPECTED_DUMP += "# Used TransferSyntax: Little Endian Explicit\n";
+    // DcmDataset.print() produces dumps in local endianess, so make sure the dump reflects the current machine
+    if (gLocalByteOrder == EBO_LittleEndian)
+        EXPECTED_DUMP += "# Used TransferSyntax: Little Endian Explicit\n";
+    else
+        EXPECTED_DUMP += "# Used TransferSyntax: Big Endian Explicit\n";
     EXPECTED_DUMP += "(0008,0008) CS [ORIGINAL\\PRIMARY\\VOLUME\\MAXIMUM]        #  32, 4 ImageType\n";
     EXPECTED_DUMP += "(0008,0016) UI =EnhancedCTImageStorage                  #  28, 1 SOPClassUID\n";
     EXPECTED_DUMP
@@ -789,7 +797,7 @@ static void prepareExpectedDump()
     EXPECTED_DUMP += "      (fffe,e00d) na (ItemDelimitationItem for re-encoding)   #   0, 0 ItemDelimitationItem\n";
     EXPECTED_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP += "    (0018,9321) SQ (Sequence with explicit length #=1)      #   0, 1 CTExposureSequence\n";
-    EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=10)         #   0, 1 Item\n";
+    EXPECTED_DUMP += "      (fffe,e000) na (Item with explicit length #=9)          #   0, 1 Item\n";
     EXPECTED_DUMP += "        (0018,115e) DS [0.5]                                    #   4, 1 "
                      "ImageAndFluoroscopyAreaDoseProduct\n";
     EXPECTED_DUMP
@@ -807,7 +815,6 @@ static void prepareExpectedDump()
         += "        (fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
     EXPECTED_DUMP
         += "        (0018,9323) CS [WEIRD]                                  #   6, 1 ExposureModulationType\n";
-    EXPECTED_DUMP += "        (0018,9324) FD 0.2                                      #   8, 1 EstimatedDoseSaving\n";
     EXPECTED_DUMP += "        (0018,9328) FD 0.4                                      #   8, 1 ExposureTimeInms\n";
     EXPECTED_DUMP += "        (0018,9330) FD 0.7                                      #   8, 1 XRayTubeCurrentInmA\n";
     EXPECTED_DUMP += "        (0018,9332) FD 0.3                                      #   8, 1 ExposureInmAs\n";
index c97ad2937f98a4e13e4d2cbbf04503ad11925bcb..959c0f3e03a6ec343c819d4771da0f33a4d1cb5e 100644 (file)
@@ -200,9 +200,8 @@ private:
     /// as configured by the user using setCfgFramesPerInstance(). Default is 25.
     Uint32 m_cfgNumFramesPerInstance;
 
-    /// Number of bytes used for each frame (same in source instance and concatenation instances).
-    /// Default is 25. Can be set by setCfgFramesPerInstance().
-    size_t m_numBytesFrame;
+    /// Number of bits used for each frame (same in source instance and concatenation instances).
+    size_t m_numBitsFrame;
 
     /// Pointer to source dataset; will be modified during conversion (but content is restored
     /// before the call to this class returns).
index 18f2034bf1c529399d0bfcf69891c787b2e7f719..2d850179d0d936e725d0fe869d7c12c6278c26de 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, Open Connections GmbH
+ *  Copyright (C) 2019-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -30,6 +30,8 @@
 #include "dcmtk/ofstd/ofstring.h"
 #include "dcmtk/ofstd/ofvector.h"
 
+#include <cmath>
+
 /** Class representing the "CT Exposure" Functional Group Macro.
  */
 class DCMTK_DCMFG_EXPORT FGCTExposure : public FGBase
@@ -235,14 +237,14 @@ public:
          */
         virtual OFCondition getExposureModulationType(OFString& value, const signed long pos = 0);
 
-        /** Get Estimated Dose Saving
+        /** Get Estimated Dose Saving (retired)
          *  @param  value Reference to variable that should hold the result
          *  @param  pos Index of the value to get (0..vm-1), -1 for all components
          *  @return EC_Normal, if value could be returned, error otherwise
          */
         virtual OFCondition getEstimatedDoseSaving(OFString& value, const signed long pos = 0);
 
-        /** Get Estimated Dose Saving
+        /** Get Estimated Dose Saving (retired)
          *  @param  value Reference to variable that should hold the result
          *  @param  pos Index of the value to get (0..vm-1)
          *  @return EC_Normal, if value could be returned, error otherwise
@@ -337,7 +339,7 @@ public:
          */
         virtual OFCondition setExposureModulationType(const OFString& value, const OFBool checkValue = OFTrue);
 
-        /** Set Estimated Dose Saving
+        /** Set Estimated Dose Saving (retired)
          *  @param  value Value that should be set
          *  @param  checkValue If OFTrue, basic checks are performed whether the value is
          *          valid for this attribute
@@ -388,7 +390,7 @@ public:
         /// Exposure Modulation Type (CS, 1-n, 1C)
         DcmCodeString m_ExposureModulationType;
 
-        /// Estimated Dose Saving (FD, 1, 2C)
+        /// Estimated Dose Saving (FD, 1, 2C), retired
         DcmFloatingPointDouble m_EstimatedDoseSaving;
 
         /// CTDIvol (FD, 1, 2C)
index 44f3c374708010a0bc8a8ec049005906672d5e6a..1af050e8643be012ade9fb8d83f0a5536ec754e9 100644 (file)
@@ -1,40 +1,40 @@
 # create library from source files
 DCMTK_ADD_LIBRARY(dcmfg
-  concatenationcreator
-  concatenationloader
-  fg
-  fgbase
-  fgctacquisitiondetails
-  fgctacquisitiontype
-  fgctadditionalxraysource
-  fgctexposure
-  fgctgeometry
-  fgctimageframetype
-  fgctposition
-  fgctreconstruction
-  fgcttabledynamics
-  fgctxraydetails
-  fgderimg
-  fgfact
-  fgfracon
-  fgframeanatomy
-  fgframevoilut
-  fgpixeltransform
-  fgimagedatatype
-  fginterface
-  fgirradiationeventid
-  fgpixmsr
-  fgparametricmapframetype
-  fgplanor
-  fgplanorvol
-  fgplanpo
-  fgplanposvol
-  fgrealworldvaluemapping
-  fgseg
-  fgtemporalposition
-  fgusimagedescription
-  fgtypes
-  stack
-  stackinterface)
+  concatenationcreator.cc
+  concatenationloader.cc
+  fg.cc
+  fgbase.cc
+  fgctacquisitiondetails.cc
+  fgctacquisitiontype.cc
+  fgctadditionalxraysource.cc
+  fgctexposure.cc
+  fgctgeometry.cc
+  fgctimageframetype.cc
+  fgctposition.cc
+  fgctreconstruction.cc
+  fgcttabledynamics.cc
+  fgctxraydetails.cc
+  fgderimg.cc
+  fgfact.cc
+  fgfracon.cc
+  fgframeanatomy.cc
+  fgframevoilut.cc
+  fgpixeltransform.cc
+  fgimagedatatype.cc
+  fginterface.cc
+  fgirradiationeventid.cc
+  fgpixmsr.cc
+  fgparametricmapframetype.cc
+  fgplanor.cc
+  fgplanorvol.cc
+  fgplanpo.cc
+  fgplanposvol.cc
+  fgrealworldvaluemapping.cc
+  fgseg.cc
+  fgtemporalposition.cc
+  fgusimagedescription.cc
+  fgtypes.cc
+  stack.cc
+  stackinterface.cc)
 
 DCMTK_TARGET_LINK_MODULES(dcmfg dcmiod dcmdata ofstd oflog)
index 0e6319b39ca6252ec1b1c6cdf591c4210ecbe76c..4f6f446611d8bb3ebb1c7b1fc6e466ceb77b5259 100644 (file)
@@ -3,12 +3,12 @@ concatenationcreator.o: concatenationcreator.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
@@ -120,12 +120,12 @@ concatenationloader.o: concatenationloader.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
@@ -187,14 +187,7 @@ concatenationloader.o: concatenationloader.cc \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../../ofstd/include/dcmtk/ofstd/ofdate.h \
- ../../ofstd/include/dcmtk/ofstd/oftime.h \
- ../../ofstd/include/dcmtk/ofstd/oftuple.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def ../include/dcmtk/dcmfg/fg.h \
+ ../../ofstd/include/dcmtk/ofstd/oftime.h ../include/dcmtk/dcmfg/fg.h \
  ../include/dcmtk/dcmfg/fgbase.h ../include/dcmtk/dcmfg/fgtypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
@@ -367,12 +360,12 @@ fgbase.o: fgbase.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgbase.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -502,12 +495,12 @@ fgctacquisitiondetails.o: fgctacquisitiondetails.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgctacquisitiondetails.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -625,12 +618,12 @@ fgctacquisitiontype.o: fgctacquisitiontype.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgctacquisitiontype.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -748,12 +741,12 @@ fgctadditionalxraysource.o: fgctadditionalxraysource.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgctadditionalxraysource.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -871,12 +864,12 @@ fgctexposure.o: fgctexposure.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgctexposure.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -996,12 +989,12 @@ fgctgeometry.o: fgctgeometry.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgctgeometry.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -1119,12 +1112,12 @@ fgctimageframetype.o: fgctimageframetype.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgctimageframetype.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -1242,12 +1235,12 @@ fgctposition.o: fgctposition.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgctposition.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -1365,12 +1358,12 @@ fgctreconstruction.o: fgctreconstruction.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgctreconstruction.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -1488,12 +1481,12 @@ fgcttabledynamics.o: fgcttabledynamics.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgcttabledynamics.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -1611,12 +1604,12 @@ fgctxraydetails.o: fgctxraydetails.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgctxraydetails.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -2008,12 +2001,12 @@ fgfracon.o: fgfracon.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgfracon.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -2131,12 +2124,12 @@ fgframeanatomy.o: fgframeanatomy.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgframeanatomy.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -2256,12 +2249,12 @@ fgframevoilut.o: fgframevoilut.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgframevoilut.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -2379,12 +2372,12 @@ fgimagedatatype.o: fgimagedatatype.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgimagedatatype.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -2626,12 +2619,12 @@ fgirradiationeventid.o: fgirradiationeventid.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgirradiationeventid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -2749,12 +2742,12 @@ fgparametricmapframetype.o: fgparametricmapframetype.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgparametricmapframetype.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -2872,12 +2865,12 @@ fgpixeltransform.o: fgpixeltransform.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmfg/fgpixeltransform.h \
@@ -2994,12 +2987,12 @@ fgpixmsr.o: fgpixmsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgpixmsr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -3116,12 +3109,12 @@ fgplanor.o: fgplanor.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgfact.h ../include/dcmtk/dcmfg/fgtypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -3239,12 +3232,12 @@ fgplanorvol.o: fgplanorvol.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
@@ -3361,12 +3354,12 @@ fgplanpo.o: fgplanpo.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgfact.h ../include/dcmtk/dcmfg/fgtypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -3484,12 +3477,12 @@ fgplanposvol.o: fgplanposvol.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgplanposvol.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -3607,12 +3600,12 @@ fgrealworldvaluemapping.o: fgrealworldvaluemapping.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgrealworldvaluemapping.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -3732,12 +3725,12 @@ fgseg.o: fgseg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgseg.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -3855,12 +3848,12 @@ fgtemporalposition.o: fgtemporalposition.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgtemporalposition.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -4112,12 +4105,12 @@ fgusimagedescription.o: fgusimagedescription.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmfg/fgusimagedescription.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -4235,9 +4228,9 @@ stack.o: stack.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
index ff581470f506dce97815f68afef0f7f8d48aa5e1..30c586025261a7d866da205458a3915276079d50 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, Open Connections GmbH
+ *  Copyright (C) 2019-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
 
 #include "dcmtk/config/osconfig.h"
 
+#include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/dcmdata/dcdeftag.h"
 #include "dcmtk/dcmdata/dcitem.h"
 #include "dcmtk/dcmdata/dcpixel.h"
 #include "dcmtk/dcmdata/dcuid.h"
 #include "dcmtk/dcmfg/concatenationcreator.h"
 #include "dcmtk/dcmfg/fgtypes.h"
-#include "dcmtk/ofstd/ofstd.h"
+
 
 // Maximum number of instances that make up a Concatenation
 const Uint16 ConcatenationCreator::m_MAX_INSTANCES_PER_CONCATENATION = 65535;
@@ -44,7 +45,7 @@ ConcatenationCreator::ConcatenationCreator()
     : m_configured(OFFalse)
     , m_cfgTransferOwnership(OFFalse)
     , m_cfgNumFramesPerInstance(25)
-    , m_numBytesFrame(0)
+    , m_numBitsFrame(0)
     , m_srcDataset(OFnullptr)
     , m_srcSOPInstanceUID()
     , m_srcPixelData(OFnullptr)
@@ -97,7 +98,7 @@ OFCondition ConcatenationCreator::setCfgInput(DcmItem* srcDataset, OFBool transf
 
 OFCondition ConcatenationCreator::setCfgInput(DcmItem* srcDataset,
                                               Uint8* pixelData,
-                                              size_t pixelDataLength,
+                                              size_t /* pixelDataLength */,
                                               OFBool transferOwnership)
 {
     // Check input parameters
@@ -164,7 +165,7 @@ OFCondition ConcatenationCreator::writeNextInstance(DcmItem& dstDataset)
     }
 
     Uint8* dstData = NULL;
-    size_t numTotalBytesInstance = m_numBytesFrame * numFramesThisInstance;
+    size_t numTotalBytesInstance = (m_numBitsFrame * numFramesThisInstance) / 8;
     // Cast is safe, checked in configureCommon()
     dstPixelData->createUint8Array(OFstatic_cast(Uint32, numTotalBytesInstance), dstData);
     if (!dstData)
@@ -172,7 +173,8 @@ OFCondition ConcatenationCreator::writeNextInstance(DcmItem& dstDataset)
         return EC_MemoryExhausted;
     }
     dstPixelData->setVR(m_VRPixelData);
-    memcpy(dstData, &(m_srcPixelData[m_numBytesFrame * m_currentSrcFrame]), numTotalBytesInstance);
+    size_t srcPos = (m_numBitsFrame * m_currentSrcFrame) / 8;
+    memcpy(dstData, &m_srcPixelData[srcPos], numTotalBytesInstance);
     result = dstDataset.insert(dstPixelData.release());
     if (result.good())
     {
@@ -246,7 +248,7 @@ size_t ConcatenationCreator::getNumInstances()
         OFCondition result = configureCommon();
         if (result.bad())
         {
-            DCMFG_ERROR("Unable to compute number of instances for Concatenation, maybe input not intialized?)");
+            DCMFG_ERROR("Unable to compute number of instances for Concatenation, maybe input not initialized?)");
             return 0;
         }
     }
@@ -399,6 +401,39 @@ OFCondition ConcatenationCreator::configureCommon()
     if (m_srcNumFrames < m_dstNumFramesPerInstance)
         return FG_EC_NotEnoughFrames;
 
+    // Check pixel data length correct, i.e. whether there is a sufficient amount of data available
+    Uint16 bitsAlloc, rows, cols;
+    bitsAlloc = rows = cols = 0;
+    m_srcDataset->findAndGetUint16(DCM_BitsAllocated, bitsAlloc);
+    m_srcDataset->findAndGetUint16(DCM_Rows, rows);
+    m_srcDataset->findAndGetUint16(DCM_Columns, cols);
+    if ((rows == 0) || (cols == 0))
+        return FG_EC_PixelDataDimensionsInvalid;
+    // 8, 16 bit and 1 bit (relevant for Segmentation objects) are supported
+    if ((bitsAlloc != 16) && (bitsAlloc != 8) && (bitsAlloc != 1))
+        return FG_EC_PixelDataDimensionsInvalid;
+
+    // Compute number of bits per frame
+    m_numBitsFrame = rows * cols * bitsAlloc;
+
+    // If Bits Allocated is 1 (i.e. not 8 or 16), the last byte of the frame can only be
+    // partly occupied with bits. Since we work with bytewise memcpy later, make sure that
+    // number of bytes per instance (number of frames per instance multiplied by the number
+    // of bytes per frame) is dividable by 8. If not, increase number of frames per instance
+    // so that number of bytes per instance is dividable by 8.
+    if ((m_numBitsFrame * m_dstNumFramesPerInstance ) % 8 != 0)
+    {
+        size_t newDstNumFramesPerInstance = ((m_dstNumFramesPerInstance / 8) + 1) * 8;
+        // if we finally have more destination frames per instance than we have in the source image,
+        // just write a single concatenation instance containing all frames from source image
+        if (newDstNumFramesPerInstance > m_srcNumFrames)
+        {
+            newDstNumFramesPerInstance = m_srcNumFrames;
+        }
+        DCMFG_INFO("Adapting Number of Frames per Instance from " << m_dstNumFramesPerInstance << " to " << newDstNumFramesPerInstance);
+        m_dstNumFramesPerInstance = OFstatic_cast(Uint32, newDstNumFramesPerInstance);
+    }
+
     // Remember number of instances to be produced
     Uint32 u32 = m_srcNumFrames / m_dstNumFramesPerInstance;
     m_dstNumFramesLastInstance = m_srcNumFrames % m_dstNumFramesPerInstance;
@@ -413,14 +448,6 @@ OFCondition ConcatenationCreator::configureCommon()
     }
     m_dstNumInstances = OFstatic_cast(Uint16, u32); // safe now
 
-    // Check whether pixel data for one instance stays below 4 GB
-    size_t numTotalBytesInstance = m_numBytesFrame * m_dstNumFramesPerInstance;
-    if (numTotalBytesInstance > m_MAX_PIXEL_DATA_LENGTH)
-    {
-        DCMFG_ERROR("Uncompressed pixel data must not exceed " << m_MAX_PIXEL_DATA_LENGTH << "bytes per concatenation instance");
-        return FG_EC_PixelDataDimensionsInvalid;
-    }
-
     // Check whether number of items in per-frame functional groups is identical to Number of Frames attribute
     if (m_srcNumFrames != m_srcPerFrameFG->card())
     {
@@ -428,28 +455,15 @@ OFCondition ConcatenationCreator::configureCommon()
         return FG_EC_NotEnoughFrames;
     }
 
-    // Check pixel data length correct, i.e. whether there is a sufficient amount of data available
-    Uint16 bitsAlloc, rows, cols;
-    bitsAlloc = rows = cols = 0;
-    m_srcDataset->findAndGetUint16(DCM_BitsAllocated, bitsAlloc);
-    m_srcDataset->findAndGetUint16(DCM_Rows, rows);
-    m_srcDataset->findAndGetUint16(DCM_Columns, cols);
-    if ((rows == 0) || (cols == 0))
-        return FG_EC_PixelDataDimensionsInvalid;
-    // 8, 16 bit and 1 bit (relevant for Segmentation objects) are supported
-    if ((bitsAlloc != 16) && (bitsAlloc != 8) && (bitsAlloc != 1))
-        return FG_EC_PixelDataDimensionsInvalid;
-    if ((bitsAlloc == 1) && (m_dstNumFramesPerInstance % 8 != 0) && (m_dstNumFramesPerInstance * rows * cols % 8 != 0))
+
+    // Check whether pixel data for one instance stays below 4 GB
+    size_t numTotalBytesInstance = (m_numBitsFrame * m_dstNumFramesPerInstance) / 8;
+    if (numTotalBytesInstance > m_MAX_PIXEL_DATA_LENGTH)
     {
-        DCMFG_ERROR("Can only handle frames per instance (or rows*cols*frames per instance) dividable by 8 for binary "
-                    "segmentations");
-        return EC_InvalidValue;
+        DCMFG_ERROR("Uncompressed pixel data must not exceed " << m_MAX_PIXEL_DATA_LENGTH << "bytes per concatenation instance");
+        return FG_EC_PixelDataDimensionsInvalid;
     }
-    m_numBytesFrame = rows * cols * bitsAlloc / 8;
-    // In case of 1 bit allocated, tiny images might result in 0 bytes
-    // calculated, so round to 1 byte minimum
-    if (m_numBytesFrame == 0)
-        m_numBytesFrame = 1;
+
     if (bitsAlloc <= 8) // 1 or 8 bit
     {
         m_VRPixelData = EVR_OB;
index 3833ddc4fc0e9337d4c98ee7071bbff3d4829a9c..f8df36693fa74107a32568e065a6ce07fd023073 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019-2020, Open Connections GmbH
+ *  Copyright (C) 2019-2022, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -242,7 +242,6 @@ ConcatenationLoader::load(const OFString& concatenationUID, DcmDataset* dataset,
             if (result.good())
             {
                 OFListIterator(ConcatenationLoader::Info::Instance) inst = c->m_Files.begin();
-                inst++; // first instance already handled
                 while (result.good() && (inst != c->m_Files.end()))
                 {
                     DcmFileFormat dcmff;
@@ -303,7 +302,15 @@ OFCondition ConcatenationLoader::prepareTemplate(ConcatenationLoader::Info& firs
             result = m_Result->putAndInsertOFStringArray(DCM_SOPInstanceUID, srcUID);
         if (result.good())
         {
-            result = extractFrames(*m_Result, firstInstance, firstInstance.m_Files.front().m_NumberOfFrames);
+            // Clear Per-Frame Functional Groups Sequence
+            result = m_Result->findAndDeleteElement(DCM_PerFrameFunctionalGroupsSequence);
+            if (result.good())
+            {
+                result = m_Result->insertEmptyElement(DCM_PerFrameFunctionalGroupsSequence);
+            }
+        }
+        if (result.good())
+        {
             m_Result->findAndDeleteElement(DCM_PixelData);
         }
     }
@@ -330,8 +337,8 @@ OFCondition ConcatenationLoader::extractFrames(DcmItem& item, Info& info, const
     OFCondition result   = item.findAndGetUint8Array(DCM_PixelData, pixData);
     if (result.good() && pixData)
     {
-        size_t bytes_per_frame = 0;
-        result                 = computeBytesPerFrame(info.m_Rows, info.m_Cols, info.m_BitsAlloc, bytes_per_frame);
+        size_t bytesPerFrame = 0;
+        result                 = computeBytesPerFrame(info.m_Rows, info.m_Cols, info.m_BitsAlloc, bytesPerFrame);
         if (result.good())
         {
             const Uint8* ptr = pixData;
@@ -340,7 +347,7 @@ OFCondition ConcatenationLoader::extractFrames(DcmItem& item, Info& info, const
                 DcmIODTypes::Frame* frame = new DcmIODTypes::Frame();
                 if (frame)
                 {
-                    frame->length  = bytes_per_frame;
+                    frame->length  = bytesPerFrame;
                     frame->pixData = new Uint8[frame->length];
                     if (frame->pixData)
                     {
@@ -445,7 +452,7 @@ OFCondition ConcatenationLoader::insertDestinationAttributes()
         char buf[100];
         dcmGenerateUniqueIdentifier(buf, SITE_INSTANCE_UID_ROOT);
         uid = buf;
-        DCMFG_WARN("SOP Instance UID of Concatentation Source (0020,0242)​ not set, created new SOP Instance UID "
+        DCMFG_WARN("SOP Instance UID of Concatenation Source (0020,0242) not set, created new SOP Instance UID "
                    << uid);
     }
     OFCondition result = m_Result->putAndInsertOFStringArray(DCM_SOPInstanceUID, uid);
@@ -551,8 +558,8 @@ void ConcatenationLoader::Info::print(OFStringStream& out)
 {
     out << "Concatenation UID*           : " << m_ConcatenationUID << OFendl;
     out << "  SOP Class UID*             : " << m_SOPClassUID << OFendl;
-    out << "  Concatentation Source UID* : " << m_SourceUID << OFendl;
-    out << "  Concatentation Source File : " << m_FileConatenationSource << OFendl;
+    out << "  Concatenation Source UID*  : " << m_SourceUID << OFendl;
+    out << "  Concatenation Source File  : " << m_FileConatenationSource << OFendl;
     out << "  Number of Frames (computed): " << m_NumTotalFrames << OFendl;
     out << "  In-conc. Total Number      : " << m_inConcatTotalNumber << OFendl;
     out << "  Patient ID                 : " << m_PatientID << OFendl;
index e2e47b46f09639e88ea94cf284cab4eda241b2e4..44c29b8934371500c2de75da2863fb4a78bc01ad 100644 (file)
@@ -237,7 +237,8 @@ FGBase* FGUnknown::clone() const
     FGUnknown* copy = new FGUnknown(this->m_seqStartTag);
     if (copy)
     {
-        *(copy->m_fgSequence) = *(this->m_fgSequence);
+        if (this->m_fgSequence != NULL)
+            *(copy->m_fgSequence) = *(this->m_fgSequence);
     }
     return copy;
 }
index d0b0e418d83b0dce582cb266977b723c755f7e11..8469b355e71858286ab319ed0459172d89e32f77 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, Open Connections GmbH
+ *  Copyright (C) 2019-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -183,7 +183,7 @@ OFCondition FGCTAcquisitionType::setAcquisitionType(const OFString& value, const
     return result;
 }
 
-OFCondition FGCTAcquisitionType::setTubeAngle(const Float64& value, const OFBool checkValue)
+OFCondition FGCTAcquisitionType::setTubeAngle(const Float64& value, const OFBool /* checkValue */)
 {
     return m_TubeAngle.putFloat64(value);
 }
index b29ebd6af044ac1d55d99f26e415ce610b90a7c0..caa33cf1aafc2362a29b033b3b6328ac93cfee72 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, Open Connections GmbH
+ *  Copyright (C) 2019-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -289,14 +289,13 @@ OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setKVP(const
     return result;
 }
 
-OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setKVP(const Float64 value, const OFBool checkValue)
+OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setKVP(const Float64 value, const OFBool /* checkValue */)
 {
-    (void)checkValue;
     return m_KVP.putFloat64(value);
 }
 
 OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setXRayTubeCurrentInmA(const Float64 value,
-                                                                                           const OFBool checkValue)
+                                                                                           const OFBool /* checkValue */)
 {
     return m_XRayTubeCurrentInmA.putFloat64(value);
 }
@@ -311,7 +310,7 @@ OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setDataColle
 }
 
 OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setDataCollectionDiameter(const Float64 value,
-                                                                                              const OFBool checkValue)
+                                                                                              const OFBool /* checkValue */)
 {
     return m_DataCollectionDiameter.putFloat64(value);
 }
@@ -350,13 +349,13 @@ OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setFilterMat
 }
 
 OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setExposureInmAs(const Float64 value,
-                                                                                     const OFBool checkValue)
+                                                                                     const OFBool /* checkValue */)
 {
     return m_ExposureInmAs.putFloat64(value);
 }
 
 OFCondition FGCTAdditionalXRaySource::FGCTAdditionalXRaySourceItem::setEnergyWeightingFactor(const Float32 value,
-                                                                                             const OFBool checkValue)
+                                                                                             const OFBool /* checkValue */)
 {
     return m_EnergyWeightingFactor.putFloat32(value);
 }
index c56f92cbf1afb14e739a08915008ec3fb2a76b38..fa9d28ae8a37dfa933cb93a83592684b2575c604 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, Open Connections GmbH
+ *  Copyright (C) 2019-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -34,7 +34,7 @@ FGCTExposure::FGCTExposureItem::FGCTExposureItem()
     , m_XRayTubeCurrentInMa(DCM_XRayTubeCurrentInmA)
     , m_ExposureInMas(DCM_ExposureInmAs)
     , m_ExposureModulationType(DCM_ExposureModulationType)
-    , m_EstimatedDoseSaving(DCM_EstimatedDoseSaving)
+    , m_EstimatedDoseSaving(DCM_RETIRED_EstimatedDoseSaving)
     , m_CTDIVol(DCM_CTDIvol)
     , m_CTDIPhantomTypeCodeSequence()
     , m_WaterEquivalentDiameter(DCM_WaterEquivalentDiameter)
index c038d6c55028174780ae9e8bb14f8e93cf3ead0e..4088f5a87a0f3021f3e041c8d51d89295e3cbdb5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, Open Connections GmbH
+ *  Copyright (C) 2019-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -152,7 +152,7 @@ OFCondition FGCTPosition::getReconstructionTargetCenterPatient(OFVector<Float64>
 
 // --- set() functionality ---
 
-OFCondition FGCTPosition::setTablePosition(const Float64 value, const OFBool checkValue)
+OFCondition FGCTPosition::setTablePosition(const Float64 value, const OFBool /* checkValue */)
 {
     return m_TablePosition.putFloat64(value);
 }
index c0e17dc775936270adab32e89f365f9898730097..c5b550d03b4bf8f1196fbcb2874d1794cc369956 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, Open Connections GmbH
+ *  Copyright (C) 2019-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -229,19 +229,19 @@ OFCondition FGCTTableDynamics::FGCTTableDynamicsItem::getTableFeedPerRotation(Fl
 
 // --- set() functionality ---
 
-OFCondition FGCTTableDynamics::FGCTTableDynamicsItem::setTableSpeed(const Float64& value, const OFBool checkValue)
+OFCondition FGCTTableDynamics::FGCTTableDynamicsItem::setTableSpeed(const Float64& value, const OFBool /* checkValue */)
 {
     return m_TableSpeed.putFloat64(value);
 }
 
 OFCondition FGCTTableDynamics::FGCTTableDynamicsItem::setTableFeedPerRotation(const Float64& value,
-                                                                              const OFBool checkValue)
+                                                                              const OFBool /* checkValue */)
 {
     return m_TableFeedPerRotation.putFloat64(value);
 }
 
 OFCondition FGCTTableDynamics::FGCTTableDynamicsItem::setSpiralPitchFactor(const Float64& value,
-                                                                           const OFBool checkValue)
+                                                                           const OFBool /* checkValue */)
 {
     return m_SpiralPitchFactor.putFloat64(value);
 }
index 85fd49d179c3e194a93563896913757f931ae0af..d121f6c4a463559b0bff6f954c5f6740da874530 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, Open Connections GmbH
+ *  Copyright (C) 2019-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -342,7 +342,7 @@ OFCondition FGCTXRayDetails::FGCTXRayDetailsItem::setFilterMaterial(const OFStri
 }
 
 OFCondition FGCTXRayDetails::FGCTXRayDetailsItem::setCalciumScoringMassFactorPatient(const Float32 value,
-                                                                                     const bool checkValue)
+                                                                                     const bool /* checkValue */)
 {
     return m_CalciumScoringMassFactorPatient.putFloat32(value);
 }
@@ -353,7 +353,7 @@ OFCondition FGCTXRayDetails::FGCTXRayDetailsItem::setCalciumScoringMassFactorDev
     return DcmIODUtil::setFloat32ValuesOnElement(m_CalciumScoringMassFactorDevice, values, "1-n", checkValues);
 }
 
-OFCondition FGCTXRayDetails::FGCTXRayDetailsItem::setEnergyWeightingFactor(const Float32 value, const bool checkValue)
+OFCondition FGCTXRayDetails::FGCTXRayDetailsItem::setEnergyWeightingFactor(const Float32 value, const bool /* checkValue */)
 {
     return m_EnergyWeightingFactor.putFloat32(value);
 }
index dfc051ea5810c3fd0c1f28f869d6eb31b30cb5b2..6e5e387cf79dd782beb11944fe8e517dd924f336 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -170,7 +170,6 @@ FGBase* FGFactory::create(const DcmFGTypes::E_FGType fgtype)
         default:
         {
             DCMFG_DEBUG("Encountered unknown functional group");
-            return NULL;
             break;
         }
     }
index 81ce51a7f0cf7c31578e04d98ecf199f8850341d..12bd0e4e9e6c97e20015a5af9c55d4119df6de0f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2022, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
index 54a28575a58f0f754f54fa90cbf2f729e436be28..2867e3199e0f90e0567aa44155f1d6e512f90d66 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -63,7 +63,7 @@ OFCondition FGStackInterface::read(FGInterface& fgSource)
         if (fracon != NULL)
         {
             OFString stackID;
-            Uint32 inStackPos;
+            Uint32 inStackPos = 0;
             // Check whether stack ID is actually present and get value
             if ((fracon->getStackID(stackID).good()) && (fracon->getInStackPositionNumber(inStackPos).good()))
             {
index 9c56a8cf2ec386d259a639cd3d0b40fe7f9ec8b9..5e5b2eefb906d65913601daa80e281f6b8a50fec 100644 (file)
@@ -1,16 +1,17 @@
 # declare executables
 DCMTK_ADD_EXECUTABLE(dcmfg_tests
-                     tests
-                     t_concatenation_creator
-                     t_concatenation_loader
-                     t_ct_acquisition_details
-                     t_ct_acquisition_type
-                     t_ct_image_frame_type
-                     t_ct_position
-                     t_ct_table_dynamics
-                     t_deriv_image
-                     t_frame_content
-                     t_irradiation_event_identification)
+  tests.cc
+  t_concatenation_creator.cc
+  t_concatenation_loader.cc
+  t_ct_acquisition_details.cc
+  t_ct_acquisition_type.cc
+  t_ct_image_frame_type.cc
+  t_ct_position.cc
+  t_ct_table_dynamics.cc
+  t_deriv_image.cc
+  t_frame_content.cc
+  t_irradiation_event_identification.cc
+)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(dcmfg_tests dcmfg dcmdata oflog ofstd)
index 51a0bbec7fb59699be8e8026ad8b41f70b103a09..b627a9f92da5e4d856f37793c31509682dece34f 100644 (file)
@@ -129,12 +129,12 @@ t_concatenation_loader.o: t_concatenation_loader.cc \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
  ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -190,13 +190,6 @@ t_concatenation_loader.o: t_concatenation_loader.cc \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../../ofstd/include/dcmtk/ofstd/ofdate.h \
  ../../ofstd/include/dcmtk/ofstd/oftime.h \
- ../../ofstd/include/dcmtk/ofstd/oftuple.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
  ../include/dcmtk/dcmfg/fgtypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
index c8d974c90f02d72454e29a5e6967c8df28547865..1776571b03edbaf92608ffdb3bf194a15388e9b0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019-2020, OFFIS e.V.
+ *  Copyright (C) 2019-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -114,8 +114,8 @@ static void prepare_scan_dump()
 {
     SCAN_DUMP += "Concatenation UID*           : 1.3.6.1.4.1.5962.1.7.70.2.1.1166562673.14401\n";
     SCAN_DUMP += "  SOP Class UID*             : 1.2.840.10008.5.1.4.1.1.2.1\n";
-    SCAN_DUMP += "  Concatentation Source UID* : \n";
-    SCAN_DUMP += "  Concatentation Source File : \n";
+    SCAN_DUMP += "  Concatenation Source UID*  : \n";
+    SCAN_DUMP += "  Concatenation Source File  : \n";
     SCAN_DUMP += "  Number of Frames (computed): 60\n";
     SCAN_DUMP += "  In-conc. Total Number      : 6\n";
     SCAN_DUMP += "  Patient ID                 : 0070\n";
@@ -152,8 +152,8 @@ static void prepare_scan_dump()
     SCAN_DUMP += "--------------------------------------------------------------\n";
     SCAN_DUMP += "Concatenation UID*           : 1.3.6.1.4.1.5962.1.7.70.2.2.1166562673.14401\n";
     SCAN_DUMP += "  SOP Class UID*             : 1.2.840.10008.5.1.4.1.1.2.1\n";
-    SCAN_DUMP += "  Concatentation Source UID* : \n";
-    SCAN_DUMP += "  Concatentation Source File : \n";
+    SCAN_DUMP += "  Concatenation Source UID*  : \n";
+    SCAN_DUMP += "  Concatenation Source File  : \n";
     SCAN_DUMP += "  Number of Frames (computed): 30\n";
     SCAN_DUMP += "  In-conc. Total Number      : 3\n";
     SCAN_DUMP += "  Patient ID                 : 0070\n";
@@ -178,8 +178,8 @@ static void prepare_scan_dump()
     SCAN_DUMP += "--------------------------------------------------------------\n";
     SCAN_DUMP += "Concatenation UID*           : 1.3.6.1.4.1.5962.1.7.70.2.3.1166562673.14401\n";
     SCAN_DUMP += "  SOP Class UID*             : 1.2.840.10008.5.1.4.1.1.2.1\n";
-    SCAN_DUMP += "  Concatentation Source UID* : \n";
-    SCAN_DUMP += "  Concatentation Source File : \n";
+    SCAN_DUMP += "  Concatenation Source UID*  : \n";
+    SCAN_DUMP += "  Concatenation Source File  : \n";
     SCAN_DUMP += "  Number of Frames (computed): 30\n";
     SCAN_DUMP += "  In-conc. Total Number      : 3\n";
     SCAN_DUMP += "  Patient ID                 : 0070\n";
@@ -491,7 +491,7 @@ static void prepare_dset_dump()
     DSET_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem)               #   0, 0 SequenceDelimitationItem\n";
     DSET_DUMP += "  (fffe,e00d) na (ItemDelimitationItem)                   #   0, 0 ItemDelimitationItem\n";
     DSET_DUMP += "(fffe,e0dd) na (SequenceDelimitationItem)               #   0, 0 SequenceDelimitationItem\n";
-    DSET_DUMP += "(5200,9230) SQ (Sequence with undefined length #=60)    # u/l, 1 PerFrameFunctionalGroupsSequence\n";
+    DSET_DUMP += "(5200,9230) SQ (Sequence with explicit length #=60)     #   0, 1 PerFrameFunctionalGroupsSequence\n";
     DSET_DUMP += "  (fffe,e000) na (Item with undefined length #=4)         # u/l, 1 Item\n";
     DSET_DUMP += "    (0018,9326) SQ (Sequence with undefined length #=1)     # u/l, 1 CTPositionSequence\n";
     DSET_DUMP += "      (fffe,e000) na (Item with undefined length #=3)         # u/l, 1 Item\n";
@@ -3132,7 +3132,7 @@ static void prepare_dset_dump()
     DSET_DUMP += "      (fffe,e00d) na (ItemDelimitationItem)                   #   0, 0 ItemDelimitationItem\n";
     DSET_DUMP += "    (fffe,e0dd) na (SequenceDelimitationItem)               #   0, 0 SequenceDelimitationItem\n";
     DSET_DUMP += "  (fffe,e00d) na (ItemDelimitationItem)                   #   0, 0 ItemDelimitationItem\n";
-    DSET_DUMP += "(fffe,e0dd) na (SequenceDelimitationItem)               #   0, 0 SequenceDelimitationItem\n";
+    DSET_DUMP += "(fffe,e0dd) na (SequenceDelimitationItem for re-encod.) #   0, 0 SequenceDelimitationItem\n";
 }
 
 void check_dump(const OFString& expected, const OFString& output)
index 77b88b777b1f504fb5d8e3caaed71538d6cd2952..94f511e2b7f38c003f21515c4440ae195e578e5c 100644 (file)
@@ -1,6 +1,6 @@
 # declare executables
 foreach(PROGRAM dcm2pnm dcmquant dcmscale dcmicmp)
-  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM})
+  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc)
 endforeach()
 
 # make sure executables are linked to the corresponding libraries
index 8a68266ddd155519cc1085c7734a54bafe1e9d35..9ce561bd9568f91b8ad13b8cea9c998ddd799152 100644 (file)
@@ -1,5 +1,4 @@
 dcm2pnm.o: dcm2pnm.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -8,6 +7,7 @@ dcm2pnm.o: dcm2pnm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -151,9 +151,9 @@ dcmicmp.o: dcmicmp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -271,7 +271,6 @@ dcmicmp.o: dcmicmp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimage/diregist.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diregbas.h
 dcmquant.o: dcmquant.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -280,6 +279,7 @@ dcmquant.o: dcmquant.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -412,7 +412,6 @@ dcmquant.o: dcmquant.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimage/diqttype.h \
  ../../dcmdata/include/dcmtk/dcmdata/dccodec.h
 dcmscale.o: dcmscale.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -421,6 +420,7 @@ dcmscale.o: dcmscale.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
index b694e5901924eeb743cdfad47343f6650535d437..49abd0bc9b8d2136e01b42f44ef6d3148a6557cc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2020, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dctk.h"          /* for various dcmdata headers */
 #include "dcmtk/dcmdata/cmdlnarg.h"      /* for prepareCmdLineArgs */
 #include "dcmtk/dcmdata/dcuid.h"         /* for dcmtk version name */
index 557a62e1ee690ea3d9050ac84a91925bb453349c..7e5c02d18f42cde5dc67fc1ff1146f13818446ef 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2020, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dctk.h"          /* for various dcmdata headers */
 #include "dcmtk/dcmdata/cmdlnarg.h"      /* for prepareCmdLineArgs */
 #include "dcmtk/dcmdata/dcuid.h"         /* for dcmtk version name */
index e762d6e1f90d4219230603432ab414389df269c9..98aae18e08c76c91ad7e7ee4a2940e5eb803c337 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2020, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dctk.h"          /* for various dcmdata headers */
 #include "dcmtk/dcmdata/cmdlnarg.h"      /* for prepareCmdLineArgs */
 #include "dcmtk/dcmdata/dcuid.h"         /* for dcmtk version name */
index 25e22079e1934d30d55f73ccf8ad147d463c1d14..468c59fad4911734c2fad1ad253bb488d9df7554 100644 (file)
@@ -405,8 +405,7 @@ The following preferred interpolation algorithms can be selected using the
 The \e --write-tiff option is only available when DCMTK has been configured
 and compiled with support for the external \b libtiff TIFF library.  The
 availability of the TIFF compression options depends on the \b libtiff
-configuration.  In particular, the patented LZW algorithm may not be
-available.
+configuration.
 
 The \e --write-png option is only available when DCMTK has been configured
 and compiled with support for the external \b libpng PNG library.  Option
@@ -497,6 +496,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcm2pnm_copyright COPYRIGHT
 
-Copyright (C) 1998-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 37e84464c85abb085814844061c710818f596355..133b74abd59bfaf0ca5fb5a490fc279504b3ec66 100644 (file)
@@ -372,6 +372,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmicmp_copyright COPYRIGHT
 
-Copyright (C) 2018 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2018-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index af50d5a1f2768f5e608335b96cd138492552c0c2..47a808f725c300ef6aac3da38d9e058b24fbfc90 100644 (file)
@@ -284,6 +284,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmquant_copyright COPYRIGHT
 
-Copyright (C) 2001-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2001-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index bfad04d3afb60dd47fe35eeda09e34a5759a2832..38a06b8872c8b5d89d3ac2189becfcc0ebaef209 100644 (file)
@@ -266,6 +266,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmscale_copyright COPYRIGHT
 
-Copyright (C) 2002-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2002-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 9c147a7cf3b87c4fb4dda83c558ed38d1e613399..83e82d22765ee0b8aa30bf4d52bf533aefbf9450 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2018-2019, OFFIS e.V.
+ *  Copyright (C) 2018-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -30,6 +30,8 @@
 #include "dcmtk/ofstd/ofcmdln.h"     /* for OFCmdUnsignedInt */
 #include "dcmtk/dcmdata/dcxfer.h"    /* for E_TransferSyntax */
 
+#include <cmath>
+
 class DicomImage;
 class DcmFileFormat;
 class DcmItem;
index eba3038aa8b918e9f97d64b7558ec7ed077e6cfe..c95fb5eacf6d707f37b897b4294c5d42665ea2b4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2012, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmimgle/diutils.h"
 #include "dcmtk/ofstd/ofstream.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmimage/dicdefin.h"
 
 
index 489fa1e67eef75186a21a8f074c6b58f18d2e357..1925afab2cc14ec03771c0268b66f2dcd320ef68 100644 (file)
@@ -138,6 +138,13 @@ class DiHSVPixelTemplate
     }
 
     /** convert a single HSV value to RGB
+     *  @param red the red part of the RGB value
+     *  @param green the green part of the RGB value
+     *  @param blue the blue part of the RGB value
+     *  @param hue the hue part of the HSV value
+     *  @param saturation the saturation part of the HSV value
+     *  @param value the value part of the HSV value
+     *  @param the maximal value of any rgb value
      */
     void convertValue(T2 &red,
                       T2 &green,
index 89a965a3354e6a06fe19e329a17e58cfd2eb4904..67822c383dfbe84f2bb78f06ad1dfd80a9944570 100644 (file)
@@ -114,6 +114,8 @@ private:
 
   /** Retrieves the specified item from the hash table.
    *  If the item has not been created a new item is created and is returned.
+   *  @param colorP the item in the hash table
+   *  @return the retrieved, or created object
    */
   DcmQuantHistogramItemList& item(const DcmQuantPixel& colorP)
   {
index 97498766459ffec8afcc5818e7488cfb99eaedd4..e787ab24915de16be1903fc4af172c50469a53fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2014, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #ifndef DIQTPBOX_H
 #define DIQTPBOX_H
 
-
 #include "dcmtk/config/osconfig.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CASSERT
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cstdlib>
+#include <cassert>
 
 #include "dcmtk/dcmimage/dicdefin.h"
 
index aab01920c7e49afb96388503b7f8f329cce5366a..dc49ded9114d2d9d83f0fe8291e68e41035c0449 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2014, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #ifndef DIQTSTAB_H
 #define DIQTSTAB_H
 
-
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/ofstd/ofcast.h"
 #include "dcmtk/dcmimage/diqttype.h"  /* for DcmQuantComponent */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CASSERT
-#include "dcmtk/ofstd/ofstdinc.h"
-
+#include <cassert>
 
 /** this is a helper class used for temporarily reducing the image bit depth
  *  during calculation of an image histogram.  An object of this class
index 23993f025ea3476c4cb1eeaf91f5bbc28beb13c8..5b709b3596cee1cfdedae94ccadd52697b12d614 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2011, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -15,7 +15,7 @@
  *
  *  Author:  Marco Eichelberg
  *
- *  Purpose: class DcmQuantFloydSteinberg
+ *  Purpose: class DcmQuant
  *
  */
 
 #define DIQUANT_H
 
 #include "dcmtk/config/osconfig.h"
-#include "dcmtk/ofstd/ofcond.h"    /* for OFCondition */
-#include "dcmtk/dcmdata/dctypes.h"   /* for Uint32 etc. */
+#include "dcmtk/ofstd/ofcond.h"       /* for OFCondition */
+#include "dcmtk/dcmdata/dctypes.h"    /* for Uint32 etc. */
 #include "dcmtk/dcmimage/diqttype.h"  /* for enums */
-#include "dcmtk/ofstd/ofstring.h"   /* for class OFString */
+#include "dcmtk/ofstd/ofstring.h"     /* for class OFString */
 
 
 class DicomImage;
index 79bbb1490e5b3050a9216f0a2aa3d056365e1748..965572977ef21963c60f68f2a90b1cce0d838a4e 100644 (file)
@@ -268,6 +268,13 @@ class DiYBRPixelTemplate
     }
 
     /** convert a single YCbCr value to RGB
+     *  @param red the red part of the RGB value
+     *  @param green the green part of the RGB value
+     *  @param blue the blue part of the RGB value
+     *  @param y the luma part of the YCbCr value
+     *  @param cb the blue-difference part of the YCbCr value
+     *  @param cr the red-difference part of the YCbCr value
+     *  @param maxvalue the maximum value of the RGB parts
      */
     inline void convertValue(T2 &red, T2 &green, T2 &blue, const T2 y, const T2 cb, const T2 cr, const T2 maxvalue)
     {
index 563d183718cd86c4ba36810e876853e4ba422ffd..768b23c909997cc26013d5e2d8aac33e5ad11589 100644 (file)
@@ -134,6 +134,13 @@ class DiYBR422PixelTemplate
     }
 
     /** convert a single YCbCr value to RGB
+     *  @param red the red part of the RGB value
+     *  @param green the green part of the RGB value
+     *  @param blue the blue part of the RGB value
+     *  @param y the luma part of the YCbCr value
+     *  @param cb the blue-difference part of the YCbCr value
+     *  @param cr the red-difference part of the YCbCr value
+     *  @param maxvalue the maximum value of the RGB parts
      */
     inline void convertValue(T2 &red,
                              T2 &green,
index 395f2d775adc3b212cdf0bf1465a3f6b60be3a70..c6c98cc394b041d1f749348207e475893122e11b 100644 (file)
@@ -114,6 +114,13 @@ class DiYBRPart422PixelTemplate
     }
 
     /** convert a single YCbCr value to RGB
+     *  @param red the red part of the RGB value
+     *  @param green the green part of the RGB value
+     *  @param blue the blue part of the RGB value
+     *  @param y the luma part of the YCbCr value
+     *  @param cb the blue-difference part of the YCbCr value
+     *  @param cr the red-difference part of the YCbCr value
+     *  @param maxvalue the maximum value of the RGB parts
      */
     inline void convertValue(T2 &red,
                              T2 &green,
index b3a57133b775108aa607e1096edbc23751188993..8f2c76cc9441a1dccc14ba02d5fbb3b6aaf142db 100644 (file)
@@ -1,5 +1,28 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmimage diargimg dicmyimg dicoimg dicoopx dicopx dihsvimg dilogger dipalimg dipipng dipitiff diqtctab diqtfs diqthash diqthitl diqtpbox diquant diregist dirgbimg diybrimg diyf2img diyp2img dcmicmph)
+DCMTK_ADD_LIBRARY(dcmimage
+  dcmicmph.cc
+  diargimg.cc
+  dicmyimg.cc
+  dicoimg.cc
+  dicoopx.cc
+  dicopx.cc
+  dihsvimg.cc
+  dilogger.cc
+  dipalimg.cc
+  dipipng.cc
+  dipitiff.cc
+  diqtctab.cc
+  diqtfs.cc
+  diqthash.cc
+  diqthitl.cc
+  diqtpbox.cc
+  diquant.cc
+  diregist.cc
+  dirgbimg.cc
+  diybrimg.cc
+  diyf2img.cc
+  diyp2img.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmimage oflog dcmdata dcmimgle)
 DCMTK_TARGET_LINK_LIBRARIES(dcmimage ${LIBTIFF_LIBS} ${LIBPNG_LIBS})
index b8334ccfae4dddd13e8fce298322b6e5b5a60d96..79bf2d4502442d607a259e7c9a66ac73a278ccc6 100644 (file)
@@ -4,9 +4,9 @@ dcmicmph.o: dcmicmph.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -743,7 +743,11 @@ dipipng.o: dipipng.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimage/dipipng.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diplugin.h \
  ../include/dcmtk/dcmimage/dicdefin.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcuid.h
+ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def
 dipitiff.o: dipitiff.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -809,7 +813,8 @@ dipitiff.o: dipitiff.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diutils.h \
  ../include/dcmtk/dcmimage/dipitiff.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diplugin.h \
- ../include/dcmtk/dcmimage/dicdefin.h
+ ../include/dcmtk/dcmimage/dicdefin.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h
 diqtctab.o: diqtctab.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimage/diqtctab.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -877,7 +882,9 @@ diqtctab.o: diqtctab.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrobow.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcuid.h
+ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/constexp.def
 diqtfs.o: diqtfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimage/diqtfs.h ../include/dcmtk/dcmimage/diqtpix.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -900,11 +907,11 @@ diqtfs.o: diqtfs.cc ../../config/include/dcmtk/config/osconfig.h \
 diqthash.o: diqthash.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimage/diqthash.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/dcmimage/diqtpix.h ../include/dcmtk/dcmimage/diqttype.h \
  ../include/dcmtk/dcmimage/dicdefin.h \
@@ -991,10 +998,10 @@ diqthitl.o: diqthitl.cc ../../config/include/dcmtk/config/osconfig.h \
 diqtpbox.o: diqtpbox.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../include/dcmtk/dcmimage/diqtpbox.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmimage/dicdefin.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h
 diquant.o: diquant.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimage/diquant.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
index 0bb682cd025fbfd2aa510292b05cc9659d9c4111..83ea1ab5968ff56fc709ca9e1708fb0452ee4bb5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2018, OFFIS e.V.
+ *  Copyright (C) 2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 #include "dcmtk/dcmimage/dcmicmph.h"  /* header file for this implementation file */
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CMATH
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofconapp.h"        /* for OFConsoleApplication */
 #include "dcmtk/ofstd/ofcmdln.h"         /* for OFCommandLine */
 #include "dcmtk/ofstd/ofstd.h"           /* for OFStandard */
index 06974c2a13a12cbd84c3e993c8bb7be2cd1d274a..e7fc314a6f2d6d94b503d920f4418174086f5531 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2018, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmimage/dilogger.h"
 #include "dcmtk/dcmimgle/diutils.h"
 
-#define INCLUDE_CINTTYPES
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /*----------------*
  *  constructors  *
  *----------------*/
@@ -586,7 +582,7 @@ int DiColorImage::writeImageToDataset(DcmItem &dataset,
 #endif
                 dataset.putAndInsertString(DCM_NumberOfFrames, numBuf);
                 dataset.putAndInsertUint16(DCM_SamplesPerPixel, 3);
-                dataset.putAndInsertUint16(DCM_PlanarConfiguration, planarConfig);
+                dataset.putAndInsertUint16(DCM_PlanarConfiguration, OFstatic_cast(const Uint16, planarConfig));
                 /* set pixel encoding and data */
                 switch (InterData->getRepresentation())
                 {
@@ -615,8 +611,8 @@ int DiColorImage::writeImageToDataset(DcmItem &dataset,
                         dataset.putAndInsertUint16(DCM_PixelRepresentation, 1);
                         break;
                 }
-                dataset.putAndInsertUint16(DCM_BitsStored, BitsPerSample);
-                dataset.putAndInsertUint16(DCM_HighBit, BitsPerSample - 1);
+                dataset.putAndInsertUint16(DCM_BitsStored, OFstatic_cast(Uint16, BitsPerSample));
+                dataset.putAndInsertUint16(DCM_HighBit, OFstatic_cast(Uint16, (BitsPerSample - 1)));
                 /* update other DICOM attributes */
                 updateImagePixelModuleAttributes(dataset);
                 result = 1;
index 162045d6b806b5f9ce8d0cb43ecc4d931386950c..51140d035719783021aeeba0b3859b4070a6f99a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2019, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,6 +28,7 @@
 #include "dcmtk/dcmimgle/diimage.h"
 #include "dcmtk/dcmimage/dipipng.h"
 #include "dcmtk/dcmdata/dcuid.h"      /* for dcmtk version */
+#include "dcmtk/ofstd/ofdiag.h"
 
 BEGIN_EXTERN_C
 #ifdef HAVE_LIBPNG_PNG_H
@@ -51,6 +52,8 @@ DiPNGPlugin::~DiPNGPlugin()
 {
 }
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING
 
 int DiPNGPlugin::write(
   DiImage *image,
@@ -191,6 +194,8 @@ int DiPNGPlugin::write(
   return result;
 }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 
 void DiPNGPlugin::setInterlaceType(DiPNGInterlace itype)
 {
index 3e5d385caba9fab9531c831514522059559f5829..61f2e06009bd92e8759e63a4a2c6d5f509f8da5c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2016, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -31,9 +31,9 @@
 #include "dcmtk/dcmdata/dcswap.h"    /* for swapIfNecessary() */
 #include "dcmtk/dcmdata/dcdeftag.h"  /* for tag constants */
 #include "dcmtk/dcmdata/dcuid.h"     /* for OFFIS_DCMTK_VERSION */
+#include "dcmtk/ofstd/ofdiag.h"      /* for DCMTK_DIAGNOSTIC macros */
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
 
 /* ------------------------------------------------------------ */
 
@@ -206,13 +206,13 @@ OFCondition DcmQuantColorTable::medianCut(
           double rl, gl, bl;
           DcmQuantPixel p;
 
-          p.assign(maxr - minr, 0, 0);
+          p.assign(OFstatic_cast(DcmQuantComponent, (maxr - minr)), 0, 0);
           rl = p.luminance();
 
-          p.assign(0, maxg - ming, 0);
+          p.assign(0, OFstatic_cast(DcmQuantComponent, (maxg - ming)), 0);
           gl = p.luminance();
 
-          p.assign(0, 0, maxb - minb);
+          p.assign(0, 0, OFstatic_cast(DcmQuantComponent, (maxb - minb)));
           bl = p.luminance();
 
           if ( rl >= gl && rl >= bl )
@@ -277,7 +277,7 @@ OFCondition DcmQuantColorTable::medianCut(
               minb = (minb < v ? minb : v);
               maxb = (minb > v ? minb : v);
           }
-          array[bi]->assign(( minr + maxr ) / 2, ( ming + maxg ) / 2, ( minb + maxb ) / 2);
+          array[bi]->assign(OFstatic_cast(DcmQuantComponent, (( minr + maxr ) / 2)), OFstatic_cast(DcmQuantComponent, (( ming + maxg ) / 2)), OFstatic_cast(DcmQuantComponent, (( minb + maxb ) / 2)));
       }
   }
   else if (repType == DcmRepresentativeColorType_default)
index 57947e6467cf71531634fc678c77b62d17ddf538..c7a84d1c5e18b527e913e1290bb7173db76dab60 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2014, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -23,9 +23,9 @@
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/dcmimage/diqtfs.h"
 #include "dcmtk/ofstd/ofstd.h"       /* for OFStandard::myrand_r */
-
-#define INCLUDE_CTIME
 #include "dcmtk/ofstd/ofstdinc.h"
+#include <ctime>
+
 
 BEGIN_EXTERN_C
 #include <sys/types.h> // needed for time()
index ac3648d5ad3516d4bbfa20517d4ac6cf54da466f..9dd8ae5c3dfb814734f28a7a8cf5c03396da387e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2010, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/ofstd/ofcast.h"
 #include "dcmtk/dcmimage/diqtpbox.h"   /* for DcmQuantPixelBoxArray */
+#include "dcmtk/ofstd/ofstdinc.h"
 
-#ifdef USE_STD_CXX_INCLUDES
 // Solaris defines qsort() in namespace std, other compilers don't...
-namespace std { }
-using namespace std;
-#endif
-
+using STD_NAMESPACE qsort;
 
 BEGIN_EXTERN_C
 static int sumcompare(const void *x1, const void *x2)
index 6909f5dc45f5e4c72bb77cdca2ff378b46ce9c4c..cf7c16304a4d6cc0d22b10810976e335c5f0da09 100644 (file)
@@ -1,6 +1,6 @@
 # declare executables
 foreach(PROGRAM dcmdspfn dcod2lum dconvlum)
-  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM})
+  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc)
 endforeach()
 
 # make sure executables are linked to the corresponding libraries
index 9386090bfb4f7ab5e5751431ff325b836418418c..813be04bda2ffb5076af26fdf01a7d0825a677ba 100644 (file)
@@ -123,8 +123,8 @@ dcmdspfn.o: dcmdspfn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimgle/didislut.h \
  ../include/dcmtk/dcmimgle/dibaslut.h ../include/dcmtk/dcmimgle/diutils.h
 dcod2lum.o: dcod2lum.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -137,8 +137,8 @@ dcod2lum.o: dcod2lum.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h
 dconvlum.o: dconvlum.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
index 69d3d9ab51cd50ae6badd5a70956549a3a740d60..167dc4d9e30eea8bd0197d3637232fbef75628f9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2019, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CCTYPE
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofconsol.h"
 #include "dcmtk/dcmimgle/didispfn.h"
index f15f3d7fc9cdcb2ada74c12c7481865acdb0385f..054b78ff532b905fb0696b80a6394274aace927e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2019, OFFIS e.V.
+ *  Copyright (C) 1999-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/ofconsol.h"
index 92c4a5e6dd1d2406d163916cdbda99cf81d26199..b8436af073d3bcc563b41f258b71705ef38b1156 100644 (file)
@@ -196,6 +196,6 @@ longish and confusing command lines (an example is provided in file
 
 \section dcmdspfn_copyright COPYRIGHT
 
-Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1999-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index bed4c544bc346f1f8febdfbefd2c3518172a89d1..27befae965971f83607c867672c7c6f534220d22 100644 (file)
@@ -56,6 +56,6 @@ sample characteristics file monitors, cameras, printers and scanners.
 
 \section dcod2lum_copyright COPYRIGHT
 
-Copyright (C) 2002-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2002-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 4db8317185231f71c09b28b342f6c93c152395e4..cdb23236b411dd74e39f87e7f70f1e4eafe1fc29 100644 (file)
@@ -54,6 +54,6 @@ Barten's model (including GSDF).
 
 \section dconvlum_copyright COPYRIGHT
 
-Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1999-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index f010f35e977b2c47ba1b71a79407cd621f4cb44b..91466864874bd82d3435f18b324155e0e3f16fef 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2016, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/oftypes.h"
 #include "dcmtk/ofstd/ofcast.h"
 
-#define INCLUDE_CMATH
-#define INCLUDE_CSTDDEF               /* For NULL */
-#include "dcmtk/ofstd/ofstdinc.h"
-
+#include <cmath>
 
 /*---------------------*
  *  macro definitions  *
index 2fe2829d52f197b858257213fd7a5c9640914b0c..491da64f239a5b2bb2bd3597f9fb5a95fb54cb72 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2014, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmimgle/diobjcou.h"
 #include "dcmtk/ofstd/ofstring.h"
 
-#define INCLUDE_CSTDDEF
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /*------------------------*
  *  forward declarations  *
  *------------------------*/
index 6a9f47a8009fd7c9d6432606f0d0f70acfaca8e0..4e3e8271a9ae69f05e72abcc565f06d7c2077c3e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2014, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/dcmimgle/didispfn.h"
 
-#define INCLUDE_CSTDDEF               /* For NULL */
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /*---------------------*
  *  class declaration  *
  *---------------------*/
index 72a7adbb20c0e256b30ab2c6c84b281e38423838..562b03c30e490da3ce1afb305e5c2d6f664e1bcf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2016, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -35,9 +35,6 @@
 #include "dcmtk/dcmimgle/diovlay.h"
 #include "dcmtk/dcmimgle/diutils.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 
 
index b0f4a8d9653bfbda77e39053d9bb5af0dfefb146..6a37c2d7fefcf0e3a1193adc60a777417b38655a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2018, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,6 +28,7 @@
 
 #include "dcmtk/ofstd/ofbmanip.h"
 #include "dcmtk/ofstd/ofcast.h"
+#include "dcmtk/ofstd/ofdiag.h"      /* for DCMTK_DIAGNOSTIC macros */
 
 #include "dcmtk/dcmimgle/diinpx.h"
 #include "dcmtk/dcmimgle/didocu.h"
@@ -173,6 +174,9 @@ class DiInputPixelTemplate
 #endif
     }
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
+
     /** determine minimum and maximum pixel value
      *
      ** @return status, true if successful, false otherwise
@@ -284,6 +288,8 @@ class DiInputPixelTemplate
         return 0;
     }
 
+#include DCMTK_DIAGNOSTIC_POP
+
     /** get pixel representation
      *
      ** @return pixel representation
index 9eca0fd5cfaf9b5407041524ab1d416fa52f98b8..e746a68b9145e8314c0913d17295cc86b68d771a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2017, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,6 +27,7 @@
 
 #include "dcmtk/ofstd/ofbmanip.h"
 #include "dcmtk/ofstd/ofcast.h"
+#include "dcmtk/ofstd/ofdiag.h"      /* for DCMTK_DIAGNOSTIC macros */
 
 #include "dcmtk/dcmimgle/dimopxt.h"
 #include "dcmtk/dcmimgle/diinpx.h"
@@ -86,6 +87,9 @@ class DiMonoInputPixelTemplate
 
  private:
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
+
     /** initialize optimization LUT
      *
      ** @param  lut   reference to storage area for lookup table
@@ -109,6 +113,8 @@ class DiMonoInputPixelTemplate
         return result;
     }
 
+#include DCMTK_DIAGNOSTIC_POP
+
     /** perform modality LUT transform
      *
      ** @param  input  pointer to input pixel representation
index 9c49925ba56f23e22ac63fafc37da8bb0152c960..d70546b5b8ec2b06502e26337bb2c9197138672b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2020, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,6 +27,7 @@
 
 #include "dcmtk/ofstd/ofcast.h"
 #include "dcmtk/ofstd/ofbmanip.h"
+#include "dcmtk/ofstd/ofdiag.h"      /* for DCMTK_DIAGNOSTIC macros */
 
 #include "dcmtk/dcmimgle/dimoopx.h"
 #include "dcmtk/dcmimgle/dimopx.h"
@@ -40,8 +41,7 @@
 #include "dimcopxt.h"
 #endif
 
-#define INCLUDE_CMATH
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cmath>
 
 
 /*---------------------*
@@ -287,6 +287,9 @@ class DiMonoOutputPixelTemplate
         }
     }
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
+
     /** initialize an optimization LUT if the optimization criteria is fulfilled
      *
      ** @param  lut   reference to storage area where the optimization LUT should be stored
@@ -310,6 +313,8 @@ class DiMonoOutputPixelTemplate
         return result;
     }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 #ifdef PASTEL_COLOR_OUTPUT
     void color(void *buffer,                               // create true color pastel image
                const DiMonoPixel *inter,
index adeef55bb8338b44e8087201811fa202d7c08aea..d55a65649c0cdb10f21a3b529519a2d2acb879b5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2018, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/dcmimgle/diutils.h"
 
-#define INCLUDE_CSTDDEF
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /*------------------------*
  *  forward declarations  *
  *------------------------*/
@@ -317,6 +313,16 @@ class DCMTK_DCMIMGLE_EXPORT DiOverlayPlane
         return Mode;
     }
 
+    /** check whether overlay plane is a multi-frame overlay.
+     *  (see DICOM PS3.3 for definition of "Multi-frame Overlay")
+     *
+     ** @return true if plane is a multi-frame overlay, false otherwise
+     */
+    inline int isMultiframe() const
+    {
+        return MultiframeOverlay;
+    }
+
     /** check whether overlay plane is embedded in the pixel data
      *
      ** @return true if plane is embedded, false otherwise
@@ -487,7 +493,9 @@ class DCMTK_DCMIMGLE_EXPORT DiOverlayPlane
     /// y-coordinate of first pixel in surrounding memory buffer
     unsigned int StartTop;
 
-    /// true, if overlay data in embedded in pixel data
+    /// true if overlay plane is a multi-frame overlay
+    int MultiframeOverlay;
+    /// true if overlay data is embedded in pixel data
     int EmbeddedData;
 
     /// pointer to current element of 'Data'
@@ -512,8 +520,12 @@ inline int DiOverlayPlane::reset(const unsigned long frame)
     int result = 0;
     if (Valid && (Data != NULL))
     {
-        const Uint32 frameNumber = OFstatic_cast(Uint32, FirstFrame + frame);
+        /* check for multi-frame overlay */
+        const Uint32 frameNumber = (MultiframeOverlay) ? OFstatic_cast(Uint32, FirstFrame + frame) : 0;
         DCMIMGLE_TRACE("reset overlay plane in group 0x" << STD_NAMESPACE hex << GroupNumber << " to start position");
+        /* special case: single frame overlay for multi-frame image */
+        if (!MultiframeOverlay && (frame > 0))
+            DCMIMGLE_TRACE("  using single frame overlay for multi-frame image (see CP-1974)");
         DCMIMGLE_TRACE("  frameNumber: " << frameNumber << " (" << FirstFrame << "+" << frame
             << "), ImageFrameOrigin: " << ImageFrameOrigin << ", NumberOfFrames: " << NumberOfFrames);
         if ((frameNumber >= ImageFrameOrigin) && (frameNumber < ImageFrameOrigin + NumberOfFrames))
@@ -540,13 +552,13 @@ inline int DiOverlayPlane::reset(const unsigned long frame)
 inline int DiOverlayPlane::getNextBit()
 {
     int result;
-    if (BitsAllocated == 16)                                        // optimization
-        result = OFstatic_cast(int, *(Ptr++) & (1 << BitPosition));
+    if (BitsAllocated == 16)                     // optimization
+        result = *(Ptr++) & (1 << BitPosition);
     else
     {
-        Ptr = StartPtr + (BitPos >> 4);                             // div 16
-        result = OFstatic_cast(int, *Ptr & (1 << (BitPos & 0xf)));  // mod 16
-        BitPos += BitsAllocated;                                    // next bit
+        Ptr = StartPtr + (BitPos >> 4);          // div 16
+        result = *Ptr & (1 << (BitPos & 0xf));   // mod 16
+        BitPos += BitsAllocated;                 // next bit
     }
     return result;
 }
index a68dfd535ccc56f67ffbf9c4e2e82071a5af70eb..836cf38fc470d06a4d5a19f111195aa1718605c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2011, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,9 +25,6 @@
 
 #include "dcmtk/config/osconfig.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 
 /*------------------------*
  *  forward declarations  *
index 1888e3ca61dd733692bb942c424c4e3d77cecf16..c88de17ee736132ea8aed6a6e173ecfb5a9b167c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2016, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/ofstd/ofcast.h"
 
-#define INCLUDE_CSTDDEF               /* For NULL */
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /*--------------------*
  *  macro definition  *
  *--------------------*/
index 2d264806b785597b3160555f0f0645b8d5615095..8c2b7f21d99e4b4ded0405af37356624bc033a91 100644 (file)
@@ -1,4 +1,31 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmimgle dcmimage dibaslut diciefn dicielut didislut didispfn didocu digsdfn digsdlut diimage diinpx diluptab dimo1img dimo2img dimoimg dimoimg3 dimoimg4 dimoimg5 dimomod dimoopx dimopx diovdat diovlay diovlimg diovpln diutils)
+DCMTK_ADD_LIBRARY(dcmimgle
+  dcmimage.cc
+  dibaslut.cc
+  diciefn.cc
+  dicielut.cc
+  didislut.cc
+  didispfn.cc
+  didocu.cc
+  digsdfn.cc
+  digsdlut.cc
+  diimage.cc
+  diinpx.cc
+  diluptab.cc
+  dimo1img.cc
+  dimo2img.cc
+  dimoimg.cc
+  dimoimg3.cc
+  dimoimg4.cc
+  dimoimg5.cc
+  dimomod.cc
+  dimoopx.cc
+  dimopx.cc
+  diovdat.cc
+  diovlay.cc
+  diovlimg.cc
+  diovpln.cc
+  diutils.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmimgle ofstd oflog dcmdata)
index 579c54fb3bbb6bb497375919a7681567ea0f35ff..d42db182226a230403adfb122f2e3e28aa34eaff 100644 (file)
@@ -232,10 +232,10 @@ didispfn.o: didispfn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../include/dcmtk/dcmimgle/didispfn.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../include/dcmtk/dcmimgle/didispfn.h \
  ../include/dcmtk/dcmimgle/didefine.h \
  ../include/dcmtk/dcmimgle/displint.h \
  ../include/dcmtk/dcmimgle/dicrvfit.h \
@@ -532,11 +532,15 @@ diimage.o: diimage.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrobow.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/didocu.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
- ../include/dcmtk/dcmimgle/dipxrept.h
+ ../include/dcmtk/dcmimgle/dipxrept.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/constexp.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def
 diinpx.o: diinpx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/diutils.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -576,12 +580,12 @@ diluptab.o: diluptab.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
@@ -835,9 +839,14 @@ dimoimg.o: dimoimg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimgle/dimo2img.h \
  ../include/dcmtk/dcmimgle/dimoipxt.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../include/dcmtk/dcmimgle/dimopxt.h ../include/dcmtk/dcmimgle/dipxrept.h \
- ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimocpt.h \
- ../include/dcmtk/dcmimgle/dimosct.h ../include/dcmtk/dcmimgle/discalet.h \
+ ../include/dcmtk/dcmimgle/diinpx.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/constexp.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
+ ../include/dcmtk/dcmimgle/dimocpt.h ../include/dcmtk/dcmimgle/dimosct.h \
+ ../include/dcmtk/dcmimgle/discalet.h \
  ../include/dcmtk/dcmimgle/ditranst.h ../include/dcmtk/dcmimgle/dimoflt.h \
  ../include/dcmtk/dcmimgle/diflipt.h ../include/dcmtk/dcmimgle/dimorot.h \
  ../include/dcmtk/dcmimgle/dirotat.h ../include/dcmtk/dcmimgle/dimoopxt.h \
@@ -915,8 +924,13 @@ dimoimg3.o: dimoimg3.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimgle/didispfn.h \
  ../include/dcmtk/dcmimgle/dimoipxt.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../include/dcmtk/dcmimgle/dimopxt.h ../include/dcmtk/dcmimgle/dipxrept.h \
- ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimoopxt.h \
+ ../include/dcmtk/dcmimgle/diinpx.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/constexp.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
+ ../include/dcmtk/dcmimgle/dimoopxt.h \
  ../include/dcmtk/dcmimgle/didislut.h
 dimoimg4.o: dimoimg4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimgle/dimoimg.h \
@@ -985,8 +999,13 @@ dimoimg4.o: dimoimg4.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimgle/didispfn.h \
  ../include/dcmtk/dcmimgle/dimoipxt.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../include/dcmtk/dcmimgle/dimopxt.h ../include/dcmtk/dcmimgle/dipxrept.h \
- ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimoopxt.h \
+ ../include/dcmtk/dcmimgle/diinpx.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/constexp.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
+ ../include/dcmtk/dcmimgle/dimoopxt.h \
  ../include/dcmtk/dcmimgle/didislut.h
 dimoimg5.o: dimoimg5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimgle/dimoimg.h \
@@ -1055,19 +1074,24 @@ dimoimg5.o: dimoimg5.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmimgle/didispfn.h \
  ../include/dcmtk/dcmimgle/dimoipxt.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../include/dcmtk/dcmimgle/dimopxt.h ../include/dcmtk/dcmimgle/dipxrept.h \
- ../include/dcmtk/dcmimgle/diinpx.h ../include/dcmtk/dcmimgle/dimoopxt.h \
+ ../include/dcmtk/dcmimgle/diinpx.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/constexp.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
+ ../include/dcmtk/dcmimgle/dimoopxt.h \
  ../include/dcmtk/dcmimgle/didislut.h
 dimomod.o: dimomod.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmimgle/dimomod.h ../include/dcmtk/dcmimgle/diluptab.h \
index 182ef40b59b02f5a80c1ee951d4886543e1a1aa9..5907c61bf7c3db5d01134dca0b4bd0023927b321 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2010, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -37,9 +37,6 @@
 #include "dcmtk/dcmimgle/diplugin.h"
 #include "dcmtk/dcmdata/dcdicent.h"  /* needed by MSVC5 */
 
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifndef FILENAME_MAX
 #define FILENAME_MAX 255
 #endif
@@ -203,12 +200,12 @@ void DicomImage::Init()
             if (cstr != NULL)
             {
                 char *q = cstr;
-                unsigned char c;
+                char c;
                 for (const char *p = str; *p != 0; p++)    // remove invalid chars
                 {
-                    c = OFstatic_cast(unsigned char, *p);
+                    c = *p;
                     if (isalpha(c))
-                        *(q++) = toupper(c);
+                        *(q++) = OFstatic_cast(char, toupper(c));
                     else if (isdigit(c))
                         *(q++) = c;
                 }
index 688df221229f1dab38be68041111e962389c5218..87dabef1d27047c0ed4b92db9101b89adf6b40ea 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2014, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmimgle/diciefn.h"
 #include "dcmtk/ofstd/ofstream.h"
 
-#define INCLUDE_CMATH
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /*----------------*
  *  constructors  *
  *----------------*/
index 243b3591bb6278e25dde94ec8a0f54e8e9aec441..1c5e64cc69d328de2b5bdc2d2f5a97574921003c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2016, OFFIS e.V.
+ *  Copyright (C) 1999-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -24,9 +24,7 @@
 
 #include "dcmtk/dcmimgle/dicielut.h"
 
-#define INCLUDE_CMATH
-#include "dcmtk/ofstd/ofstdinc.h"
-
+#include <cmath>
 
 /*----------------*
  *  constructors  *
index 26b334eea22b1e29f3904acf738576a1054f20a2..ba9e2ce546c36020191896284b18c4b6cde6aa0d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2010, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -33,7 +33,7 @@ DiDisplayLUT::DiDisplayLUT(const unsigned long count,
                            const Uint16 max,
                            const double amb,
                            const double illum)
-  : DiBaseLUT(count, DicomImageClass::tobits(max, 0)),
+  : DiBaseLUT(count, OFstatic_cast(Uint16, DicomImageClass::tobits(max, 0))),
     AmbientLight((amb > 0) ? amb : 0),
     Illumination((illum > 0) ? illum : 0)
 {
index e1b956b1aeaa7668b80d7ea1314e22d5a81f4398..b2a44e35c66475c3e2102a3eea10d69deea8571b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2019, OFFIS e.V.
+ *  Copyright (C) 1999-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmimgle/didislut.h"
 #include "dcmtk/ofstd/ofstream.h"
 
-#define INCLUDE_CCTYPE
-#define INCLUDE_CMATH
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /*----------------------------*
  *  constant initializations  *
  *----------------------------*/
index 8738a61159e6a8013b435707db3129701e6ae421..00b73b5692d90cae3d49d0100ca17680903bf6fc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2018, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -143,12 +143,22 @@ void DiDocument::convertPixelData()
                 // convert pixel data to uncompressed format (if required)
                 if ((Flags & CIF_DecompressCompletePixelData) || !(Flags & CIF_UsePartialAccessToPixelData))
                 {
-                    pstack.clear();
-                    // push reference to DICOM dataset on the stack (required for decompression process)
-                    pstack.push(Object);
-                    // dummy stack entry
-                    pstack.push(PixelData);
-                    status = PixelData->chooseRepresentation(EXS_LittleEndianExplicit, NULL, pstack);
+                    if (Object->ident() == EVR_dataset)
+                    {
+                        // Call DcmDataset::chooseRepresentation() to enable an update
+                        // of the transfer syntax attributes of the dataset instance
+                        status = OFstatic_cast(DcmDataset *, Object)->chooseRepresentation(EXS_LittleEndianExplicit, NULL);
+                    }
+                    else
+                    {
+                        // Object is a DcmItem instance. Directly call DcmPixelData::chooseRepresentation().
+                        pstack.clear();
+                        // push reference to DICOM dataset on the stack (required for decompression process)
+                        pstack.push(Object);
+                        // dummy stack entry
+                        pstack.push(PixelData);
+                        status = PixelData->chooseRepresentation(EXS_LittleEndianExplicit, NULL, pstack);
+                    }
                     if (status.good())
                     {
                         // set transfer syntax to unencapsulated/uncompressed
index 3e2a7ccfcd9b83eb7379186a80f186fab4f2a432..8c52d054e40a6403c4cfb212403f42804d4f3924 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2016, OFFIS e.V.
+ *  Copyright (C) 1999-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/ofstd/ofstream.h"
 
-#define INCLUDE_CMATH
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
+#include <cmath>
 
 /*----------------------------*
  *  constant initializations  *
index 60afd5878099a36fdc5636a1033a93cbf7b1c905..d1aae66876d82d5957cf1c82772aad3571da82e5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2016, OFFIS e.V.
+ *  Copyright (C) 1999-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,9 +25,7 @@
 #include "dcmtk/dcmimgle/digsdlut.h"
 #include "dcmtk/dcmimgle/displint.h"
 
-#define INCLUDE_CMATH
-#include "dcmtk/ofstd/ofstdinc.h"
-
+#include <cmath>
 
 /*----------------*
  *  constructors  *
index 5a1b19fe416c9e760e3482abf0965d4896a3f5d4..f198bf58c2ca00c166376c3b0e965a812264167d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2020, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmimgle/diutils.h"
 #include "dcmtk/ofstd/ofstd.h"
 
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /*----------------*
  *  constructors  *
  *----------------*/
@@ -413,9 +409,9 @@ DiImage::DiImage(const DiImage *image,
     Columns(image->Columns),
     PixelWidth(image->PixelWidth),
     PixelHeight(image->PixelHeight),
-    BitsAllocated(alloc),
-    BitsStored(stored),
-    HighBit(stored - 1),
+    BitsAllocated(OFstatic_cast(const Uint16, alloc)),
+    BitsStored(OFstatic_cast(const Uint16, stored)),
+    HighBit(OFstatic_cast(const Uint16, (stored - 1))),
     BitsPerSample(image->BitsPerSample),
     SamplesPerPixel(image->SamplesPerPixel),
     Polarity(image->Polarity),
@@ -768,8 +764,8 @@ int DiImage::writeFrameToDataset(DcmItem &dataset,
             dataset.putAndInsertUint16(DCM_BitsAllocated, 16);
         else
             dataset.putAndInsertUint16(DCM_BitsAllocated, 32);
-        dataset.putAndInsertUint16(DCM_BitsStored, bitsStored);
-        dataset.putAndInsertUint16(DCM_HighBit, bitsStored - 1);
+        dataset.putAndInsertUint16(DCM_BitsStored, OFstatic_cast(const Uint16, bitsStored));
+        dataset.putAndInsertUint16(DCM_HighBit, OFstatic_cast(Uint16, bitsStored - 1));
         dataset.putAndInsertUint16(DCM_PixelRepresentation, 0);
         /* handle VOI transformations */
         if (dataset.tagExists(DCM_WindowCenter) ||
@@ -826,7 +822,7 @@ int DiImage::writeBMP(FILE *stream,
             infoHeader.biWidth = Columns;
             infoHeader.biHeight = Rows;
             infoHeader.biPlanes = 1;
-            infoHeader.biBitCount = bits;
+            infoHeader.biBitCount = OFstatic_cast(const Uint16, bits);
             infoHeader.biCompression = 0;
             infoHeader.biSizeImage = 0;
             infoHeader.biXPelsPerMeter = 0;
index d6ded5c30f842aa6f3a2fd11cd88567ca73d6dff..8c704fe9242749b06a768bc91ea0318049eddc24 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2016, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -289,7 +289,7 @@ void DiLookupTable::checkBits(const Uint16 bits,
     if ((descripMode == ELM_IgnoreValue) || (bits < MIN_TABLE_ENTRY_SIZE) || (bits > MAX_TABLE_ENTRY_SIZE))
     {
         /* check whether correct bit depth can be determined automatically */
-        Bits = (MaxValue > 0) ? DicomImageClass::tobits(MaxValue, 0) : bits;
+        Bits = (MaxValue > 0) ? OFstatic_cast(Uint16, DicomImageClass::tobits(MaxValue, 0)) : bits;
         /* check bit depth (again) for valid range */
         if (Bits < MIN_TABLE_ENTRY_SIZE)
             Bits = MIN_TABLE_ENTRY_SIZE;
@@ -468,7 +468,7 @@ DiLookupTable *DiLookupTable::createInverseLUT() const
     if (Valid)
     {
         const Uint32 count = DicomImageClass::maxval(Bits, 0);
-        const Uint16 bits = DicomImageClass::tobits(Count + FirstEntry);
+        const Uint16 bits = OFstatic_cast(Uint16, DicomImageClass::tobits(Count + FirstEntry));
         Uint16 *data = new Uint16[count];
         Uint8 *valid = new Uint8[count];
         if ((data != NULL) && (valid != NULL))
index 808483d6daa33cfb65acb7ac4c31230c02d3bcbf..eb4f93f2eb5300e35801468415bdaf1f9e6879f1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2019 OFFIS e.V.
+ *  Copyright (C) 1996-2021 OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmimgle/diutils.h"
 #include "dcmtk/dcmimgle/diregbas.h"
 
-#define INCLUDE_CMATH
-#define INCLUDE_CINTTYPES
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /*---------------------*
  *  const definitions  *
  *---------------------*/
@@ -538,36 +533,6 @@ DiMonoImage::DiMonoImage(const DiMonoImage *image,
 }
 
 
-/*
- *   this implementation is necessary to avoid linker errors on NeXTSTEP (gcc 2.5.8)
- */
-
-DiMonoImage::DiMonoImage(const DiMonoImage &)
-  : DiImage(NULL),
-    WindowCenter(0),
-    WindowWidth(0),
-    WindowCount(0),
-    VoiLutCount(0),
-    ValidWindow(0),
-    VoiExplanation(),
-    VoiLutFunction(EFV_Default),
-    PresLutShape(ESP_Default),
-    MinDensity(Default_MinDensity),
-    MaxDensity(Default_MaxDensity),
-    Reflection(Default_Reflection),
-    Illumination(Default_Illumination),
-    VoiLutData(NULL),
-    PresLutData(NULL),
-    InterData(NULL),
-    DisplayFunction(NULL),
-    OutputData(NULL),
-    OverlayData(NULL)
-{
-    DCMIMGLE_FATAL("using unimplemented copy constructor in class DiMonoImage ... aborting");
-    abort();
-}
-
-
 /*
  *   createMonoOutputImage
  */
@@ -1936,7 +1901,7 @@ int DiMonoImage::createLinODPresentationLut(const unsigned long count, const int
                 *(p++) = OFstatic_cast(Uint16, (DiGSDFunction::getJNDIndex(la + l0 *
                     pow(OFstatic_cast(double, 10), -(dmin + OFstatic_cast(double, i) * density))) - jmin) * factor);
             }
-            PresLutData = new DiLookupTable(data, count, bits);
+            PresLutData = new DiLookupTable(data, count, OFstatic_cast(const Uint16, bits));
             return (PresLutData != NULL) && (PresLutData->isValid());
         }
     }
@@ -2063,8 +2028,8 @@ int DiMonoImage::writeImageToDataset(DcmItem &dataset,
                     dataset.putAndInsertUint16Array(DCM_PixelData, OFstatic_cast(const Uint16 *, pixel), count * 2 /*double-words*/);
                     break;
             }
-            dataset.putAndInsertUint16(DCM_BitsStored, bits);
-            dataset.putAndInsertUint16(DCM_HighBit, bits - 1);
+            dataset.putAndInsertUint16(DCM_BitsStored, OFstatic_cast(Uint16, bits));
+            dataset.putAndInsertUint16(DCM_HighBit, OFstatic_cast(Uint16, (bits - 1)));
             /* update other DICOM attributes */
             updateImagePixelModuleAttributes(dataset);
             result = 1;
index cf91f1010d701cde26d8e0384ea17b8fd79e39da..c84e686a462a16b7e77cdc150d38f1c1965d7f7a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2019, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -495,7 +495,9 @@ int DiOverlay::addPlane(const unsigned int group,
                 ++(Data->Count);
             else if (status == 2)                                              // group number already exists
                 delete Data->Planes[plane];
-            Data->Planes[plane] = new DiOverlayPlane(group, left_pos, top_pos, columns, rows, data, label, description, mode);
+            Data->Planes[plane] = new DiOverlayPlane(group, OFstatic_cast(const Sint16, left_pos), 
+                OFstatic_cast(const Sint16, top_pos), OFstatic_cast(const Uint16, columns), 
+                OFstatic_cast(const Uint16, rows), data, label, description, mode);
             if (checkPlane(plane, 0))
             {
                 if (Data->Planes[plane]->getNumberOfFrames() > Frames)         // set maximum number of frames
@@ -576,7 +578,7 @@ void *DiOverlay::getFullPlaneData(const unsigned long frame,
         {
             width = op->getWidth();
             height = op->getHeight();
-            return op->getData(frame, 0, 0, width, height, bits, fore, back, OFFalse /*useOrigin*/);
+            return op->getData(frame, 0, 0, OFstatic_cast(Uint16, width), OFstatic_cast(Uint16, height), bits, fore, back, OFFalse /*useOrigin*/);
         }
     }
     return NULL;
index 73def7f6f2acf10f2768cf76f368076c76def870..bda594c653d6c9e13d132324aa8d49600f062a7e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2019, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -60,13 +60,14 @@ DiOverlayPlane::DiOverlayPlane(const DiDocument *docu,
     DefaultMode(EMO_Graphic),
     Label(),
     Description(),
-    GroupNumber(group),
+    GroupNumber(OFstatic_cast(Uint16, group)),
     Valid(0),
     Visible(0),
     BitPos(0),
     StartBitPos(0),
     StartLeft(0),
     StartTop(0),
+    MultiframeOverlay(0),
     EmbeddedData(0),
     Ptr(NULL),
     StartPtr(NULL),
@@ -77,7 +78,7 @@ DiOverlayPlane::DiOverlayPlane(const DiDocument *docu,
         /* determine first frame to be processed */
         FirstFrame = docu->getFrameStart();
         /* specify overlay group number */
-        DcmTagKey tag(group, DCM_OverlayRows.getElement() /* dummy */);
+        DcmTagKey tag(OFstatic_cast(Uint16, group), DCM_OverlayRows.getElement() /* dummy */);
         /* get descriptive data */
         tag.setElement(DCM_OverlayLabel.getElement());
         docu->getValue(tag, Label);
@@ -91,6 +92,7 @@ DiOverlayPlane::DiOverlayPlane(const DiDocument *docu,
         Sint32 sl = 0;
         /* multi-frame overlays */
         tag.setElement(DCM_NumberOfFramesInOverlay.getElement());
+        MultiframeOverlay = (docu->search(tag) != NULL);
         docu->getValue(tag, sl);
         NumberOfFrames = (sl < 1) ? 1 : OFstatic_cast(Uint32, sl);
         tag.setElement(DCM_ImageFrameOrigin.getElement());
@@ -103,6 +105,8 @@ DiOverlayPlane::DiOverlayPlane(const DiDocument *docu,
         if (Valid)
         {
             DCMIMGLE_DEBUG("processing overlay plane in group 0x" << STD_NAMESPACE hex << group);
+            if (MultiframeOverlay)
+                DCMIMGLE_TRACE("  this is a multi-frame overlay with " << NumberOfFrames << " frame(s) starting at frame " << (ImageFrameOrigin + 1));
             if (docu->getValue(tag, Top, 1) < 2)
                 DCMIMGLE_WARN("missing second value for 'OverlayOrigin' ... assuming 'Top' = " << Top);
         }
@@ -111,6 +115,8 @@ DiOverlayPlane::DiOverlayPlane(const DiDocument *docu,
         if (Valid)
         {
             DCMIMGLE_DEBUG("processing overlay plane in group 0x" << STD_NAMESPACE hex << group);
+            if (MultiframeOverlay)
+                DCMIMGLE_TRACE("  this is a multi-frame overlay with " << NumberOfFrames << " frame(s) starting at frame " << (ImageFrameOrigin + 1));
             if (docu->getValue(tag, Left, 1) < 2)
                 DCMIMGLE_WARN("missing second value for 'OverlayOrigin' ... assuming 'Left' = " << Left);
         }
@@ -189,6 +195,13 @@ DiOverlayPlane::DiOverlayPlane(const DiDocument *docu,
                 Data = NULL;
             } else
                 Valid = (Data != NULL);
+            /* check condition for multi-frame overlay */
+            if (NumberOfFrames > 1)
+            {
+                Sint32 numFrames = 0;
+                if (!docu->getValue(DCM_NumberOfFrames, numFrames) || (numFrames == 1))
+                    DCMIMGLE_WARN("found multi-frame overlay in group 0x" << STD_NAMESPACE hex << group << " for single frame image");
+            }
         }
         if (Valid)
         {
@@ -229,13 +242,14 @@ DiOverlayPlane::DiOverlayPlane(const unsigned int group,
     DefaultMode(mode),
     Label(),
     Description(),
-    GroupNumber(group),
+    GroupNumber(OFstatic_cast(Uint16, group)),
     Valid(0),
     Visible((mode == EMO_BitmapShutter) ? 1 : 0),
     BitPos(0),
     StartBitPos(0),
     StartLeft(0),
     StartTop(0),
+    MultiframeOverlay(0),
     EmbeddedData(0),
     Ptr(NULL),
     StartPtr(NULL),
@@ -279,7 +293,7 @@ DiOverlayPlane::DiOverlayPlane(DiOverlayPlane *plane,
     Rows(rows),
     Columns(columns),
     BitsAllocated(16),
-    BitPosition(bit),
+    BitPosition(OFstatic_cast(Uint16, bit)),
     Foreground(plane->Foreground),
     Threshold(plane->Threshold),
     PValue(0),
@@ -294,6 +308,7 @@ DiOverlayPlane::DiOverlayPlane(DiOverlayPlane *plane,
     StartBitPos(0),
     StartLeft(plane->StartLeft),
     StartTop(plane->StartTop),
+    MultiframeOverlay(plane->MultiframeOverlay),
     EmbeddedData(0),
     Ptr(NULL),
     StartPtr(NULL),
index 584cb7a4b2b750cd9a742d90429d153b46192f54..c043a801157c014abc09a9412860019da245ab20 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2011, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/dcmimgle/diutils.h"
 
-#define INCLUDE_CMATH
-#include "dcmtk/ofstd/ofstdinc.h"
+// #define INCLUDE_CMATH
+// #include "dcmtk/ofstd/ofstdinc.h"
 
+#include <cmath>
 
 /*--------------------*
  *  global variables  *
index 24bc031e9044bdddd75487fee980142f80a289d4..d2c60300778a4a2ec9e9abec51b34cfb6d5bf351 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016-2019, Pascal Getreuer, Open Connections GmbH
+ *  Copyright (C) 2016-2021, Pascal Getreuer, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -23,9 +23,9 @@
 #define CIELABUTIL_H
 
 #include "dcmtk/config/osconfig.h"
-#define INCLUDE_CMATH // for pow() function
 #include "dcmtk/dcmiod/ioddef.h"
-#include "dcmtk/ofstd/ofstdinc.h"
+
+#include <cmath>
 
 /** Class supporting color space conversions from and to CIELab. In some IODs
  *  DICOM stores CIELab color values which must often be converted to RGB for
index 3328186f9b61126937a7cfae267bb76b7eb0c935..744e61fd445294eef9013470d75841b1501f7e8d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -199,7 +199,7 @@ private:
     typename std::enable_if<DcmIODImageHasType<T, Types...>::value, OFCondition>::type
 #else
     OFTypename
-        OFenable_if<(OFvariadic_find_type<T, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value != -1), OFCondition>::type
+        OFenable_if<(OFvariadic_find_type<T, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value != ~OFstatic_cast(size_t,0)), OFCondition>::type
 #endif
     readFloatingPointDoubleImagePixel(DcmItem& dataset)
     {
@@ -213,7 +213,7 @@ private:
     typename std::enable_if<!DcmIODImageHasType<T, Types...>::value, OFCondition>::type
 #else
     OFTypename
-        OFenable_if<(OFvariadic_find_type<T, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value == -1), OFCondition>::type
+        OFenable_if<(OFvariadic_find_type<T, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value == ~OFstatic_cast(size_t,0)), OFCondition>::type
 #endif
     readFloatingPointDoubleImagePixel(DcmItem& dataset)
     {
@@ -225,7 +225,7 @@ private:
     typename std::enable_if<DcmIODImageHasType<T, Types...>::value, OFCondition>::type
 #else
     OFTypename
-        OFenable_if<(OFvariadic_find_type<T, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value != -1), OFCondition>::type
+        OFenable_if<(OFvariadic_find_type<T, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value != ~OFstatic_cast(size_t,0)), OFCondition>::type
 #endif
     readFloatingPointImagePixel(DcmItem& dataset)
     {
@@ -239,7 +239,7 @@ private:
     typename std::enable_if<!DcmIODImageHasType<T, Types...>::value, OFCondition>::type
 #else
     OFTypename
-        OFenable_if<(OFvariadic_find_type<T, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value == -1), OFCondition>::type
+        OFenable_if<(OFvariadic_find_type<T, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value == ~OFstatic_cast(size_t,0)), OFCondition>::type
 #endif
     readFloatingPointImagePixel(DcmItem& dataset)
     {
@@ -248,7 +248,8 @@ private:
 
     OFCondition readIntegerImagePixel(DcmItem& dataset)
     {
-        Uint16 allocated, representation;
+        Uint16 allocated = 0;
+        Uint16 representation = 0;
         // Pixel data is not managed right now by Image Pixel Module class.
         if (/*  dataset.tagExists(DCM_PixelData) && */ dataset.findAndGetUint16(DCM_BitsAllocated, allocated).good()
             && dataset.findAndGetUint16(DCM_PixelRepresentation, representation).good())
@@ -273,7 +274,7 @@ private:
     typename std::enable_if<DcmIODImageHasType<IODImagePixelModule<T>, Types...>::value, OFCondition>::type
 #else
     OFTypename
-        OFenable_if<(OFvariadic_find_type<IODImagePixelModule<T>, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value != -1),
+        OFenable_if<(OFvariadic_find_type<IODImagePixelModule<T>, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value != ~OFstatic_cast(size_t,0)),
                     OFCondition>::type
 #endif
     readImagePixel(DcmItem& dataset)
@@ -287,7 +288,7 @@ private:
     typename std::enable_if<!DcmIODImageHasType<IODImagePixelModule<T>, Types...>::value, OFCondition>::type
 #else
     OFTypename
-        OFenable_if<(OFvariadic_find_type<IODImagePixelModule<T>, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value == -1),
+        OFenable_if<(OFvariadic_find_type<IODImagePixelModule<T>, OFVARIADIC_TEMPLATE_PARAMETER_PACK(T)>::value == ~OFstatic_cast(size_t,0)),
                     OFCondition>::type
 #endif
     readImagePixel(DcmItem& dataset)
index 69697bcd3d0d035189c542781aed31c18451351f..50ff2e6844184fe5e1fb608a51a647e27f793f10 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -29,9 +29,6 @@
 #include "dcmtk/ofstd/ofmap.h"
 #include "dcmtk/ofstd/ofstring.h"
 
-#define INCLUDE_OSTREAM // for debugging
-#include "dcmtk/ofstd/ofstdinc.h"
-
 class DcmItem;
 class DcmTagKey;
 class DcmElement;
index ac8fcd8a7cd2c10c96265686cc0c88652698821d..d1b58477c290ed8b86286918b14c0c00245078b6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2022, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -338,6 +338,17 @@ public:
                                         const OFString& fgPrivateCreator,
                                         const OFString& privateCreator);
 
+    /** Enable or disable calling of the checkDimensions() routine when writing the module.
+     *  Checking can be very time-consuming if many frames are present. Default is OFTrue.
+     *  @param  doCheck If enabled, checkDimensions() is called when writing.
+     */
+    virtual void setCheckOnWrite(const OFBool doCheck);
+
+    /** Returns whether checkDimensions() routine is called when writing the module.
+     *  @returns OFTrue if calling of checkDimensions() is enabled when writing, OFFalse otherwise.
+     */
+    virtual OFBool getCheckOnWrite();
+
 protected:
     /** Go over Dimension Index Pointers and extract Dimension Organization UIDs for
      *  Dimension Organization Sequence.
@@ -353,6 +364,11 @@ private:
 
     /// Vector with all items of the Dimension Organization Sequence
     OFVector<DimensionOrganizationItem*> m_DimensionOrganizationSequence;
+
+    /// If enabled, dimension structures are checked when writing the module.
+    /// This can be very time-consuming if many frames are present. Default is
+    /// OFTrue.
+    OFBool m_CheckOnWrite;
 };
 
 #endif // MODMULTIFRAMEDIMENSION_H
index fab033e3fa86b0fc663ea3cdee126b97c475f349..27f433ad28dad3444d82a8eb1b9c7daca3c3b2d6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -177,8 +177,8 @@ public:
 
     /**  Set Timezone Offset From UTC
      *   @param  value Value to be set (single value only) or "" for no value.
-     *   Encoded as an ASCII string in the format “&ZZXX”. The components of this
-     *   string, from left to right, are & = “+” or “-”, and ZZ = Hours and
+     *   Encoded as an ASCII string in the format "&ZZXX". The components of this
+     *   string, from left to right, are & = "+" or "-", and ZZ = Hours and
      *   XX = Minutes of offset.
      *   @param  checkValue Check 'value' for conformance with VR (SH) and VM (1) if enabled
      *   @return EC_Normal if successful, an error code otherwise
index 0f6cf425441cced3140bae1195659820280e8ac5..02686f543c74055748910483925bcd047b6ee46d 100644 (file)
@@ -1,36 +1,37 @@
 # create library from source files
 DCMTK_ADD_LIBRARY(dcmiod
-  cielabutil
-  iodcontentitemmacro
-  iodcommn
-  iodmacro
-  iodrules
-  iodreferences
-  iodutil
-  iodtypes
-  modacquisitioncontext
-  modbase
-  modcommoninstanceref
-  modenhequipment
-  modenhusimage
-  modenhusseries
-  modequipment
-  modfloatingpointimagepixel
-  modfor
-  modgeneralimage
-  modgeneralseries
-  modgeneralstudy
-  modhelp
-  modimagepixel
-  modimagepixelbase
-  modmultiframefg
-  modmultiframedimension
-  modpatient
-  modpatientstudy
-  modsegmentationseries
-  modsopcommon
-  modsynchronization
-  modusfor)
+  cielabutil.cc
+  iodcontentitemmacro.cc
+  iodcommn.cc
+  iodmacro.cc
+  iodrules.cc
+  iodreferences.cc
+  iodutil.cc
+  iodtypes.cc
+  modacquisitioncontext.cc
+  modbase.cc
+  modcommoninstanceref.cc
+  modenhequipment.cc
+  modenhusimage.cc
+  modenhusseries.cc
+  modequipment.cc
+  modfloatingpointimagepixel.cc
+  modfor.cc
+  modgeneralimage.cc
+  modgeneralseries.cc
+  modgeneralstudy.cc
+  modhelp.cc
+  modimagepixel.cc
+  modimagepixelbase.cc
+  modmultiframefg.cc
+  modmultiframedimension.cc
+  modpatient.cc
+  modpatientstudy.cc
+  modsegmentationseries.cc
+  modsopcommon.cc
+  modsynchronization.cc
+  modusfor.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmiod dcmdata ofstd oflog)
 
index 954c7d0e777573046d8124e9b28d5597f5622bbc..da2a074b80462c8a0cb16481d0a0adeec5cce85f 100644 (file)
@@ -10,12 +10,12 @@ iodcommn.o: iodcommn.cc ../include/dcmtk/dcmiod/iodcommn.h \
  ../include/dcmtk/dcmiod/iodrules.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -139,12 +139,12 @@ iodcontentitemmacro.o: iodcontentitemmacro.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
@@ -380,9 +380,9 @@ iodreferences.o: iodreferences.cc ../include/dcmtk/dcmiod/iodreferences.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
@@ -449,12 +449,12 @@ iodrules.o: iodrules.cc ../include/dcmtk/dcmiod/iodrules.h \
  ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -509,10 +509,10 @@ iodtypes.o: iodtypes.cc ../include/dcmtk/dcmiod/iodtypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -930,10 +930,10 @@ modenhequipment.o: modenhequipment.cc \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmiod/iodrules.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1246,10 +1246,10 @@ modequipment.o: modequipment.cc ../include/dcmtk/dcmiod/modequipment.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmiod/iodrules.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -1319,12 +1319,12 @@ modfloatingpointimagepixel.o: modfloatingpointimagepixel.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmiod/modimagepixelbase.h \
  ../include/dcmtk/dcmiod/modbase.h \
@@ -1461,12 +1461,12 @@ modgeneralimage.o: modgeneralimage.cc \
  ../include/dcmtk/dcmiod/iodrules.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -1541,13 +1541,13 @@ modgeneralseries.o: modgeneralseries.cc \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmiod/iodmacro.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -1838,12 +1838,12 @@ modimagepixel.o: modimagepixel.cc ../include/dcmtk/dcmiod/modimagepixel.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmiod/modimagepixelbase.h \
  ../include/dcmtk/dcmiod/modbase.h \
@@ -1983,12 +1983,12 @@ modmultiframedimension.o: modmultiframedimension.cc \
  ../include/dcmtk/dcmiod/iodrules.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -2566,12 +2566,12 @@ modsynchronization.o: modsynchronization.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
index 478a92e0c2e8658b0707f6d6c3869dc0807cb564..85b59a8ec7f8a8b328b81cf2532854be40e73a6d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2005-2019, Pascal Getreuer, Open Connections GmbH
+ *  Copyright (C) 2005-2021, Pascal Getreuer, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -20,8 +20,7 @@
  */
 #include "dcmtk/dcmiod/cielabutil.h"
 #include "dcmtk/config/osconfig.h"
-#define INCLUDE_CMATH // for pow() function
-#include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/ofstd/ofstdinc.h" /* for STD_NAMESPACE */
 
 // workaround for SunPro not defining these C functions in the global namespace
 #ifdef __sun
index c93e21088bffb4b4ccf98a228ead9ee3c7a954bb..31dbd03ff79aa2fed4031300fd908fee1b793ce6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2020, Open Connections GmbH
+ *  Copyright (C) 2015-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -64,7 +64,7 @@ CodeSequenceMacro::CodeSequenceMacro(const OFString& codeValue,
     set(codeValue, codingSchemeDesignator, codeMeaning, codingSchemeVersion);
 }
 
-OFCondition CodeSequenceMacro::check(const bool quiet)
+OFCondition CodeSequenceMacro::check(const bool /* quiet */)
 {
     OFString val;
     getCodeValue(val);
@@ -1671,10 +1671,10 @@ OFString HL7HierarchicDesignatorMacro::getName() const
 void HL7HierarchicDesignatorMacro::resetRules()
 {
     // parameters are tag, VM, type. Overwrite old rules if any.
-    m_Rules->addRule(new IODRule(DCM_UniversalEntityID, "1", "1C", "getName()", DcmIODTypes::IE_UNDEFINED), OFTrue);
-    m_Rules->addRule(new IODRule(DCM_LocalNamespaceEntityID, "1", "1C", "getName()", DcmIODTypes::IE_UNDEFINED),
+    m_Rules->addRule(new IODRule(DCM_UniversalEntityID, "1", "1C", getName(), DcmIODTypes::IE_UNDEFINED), OFTrue);
+    m_Rules->addRule(new IODRule(DCM_LocalNamespaceEntityID, "1", "1C", getName(), DcmIODTypes::IE_UNDEFINED),
                      OFTrue);
-    m_Rules->addRule(new IODRule(DCM_UniversalEntityIDType, "1", "1C", "getName()", DcmIODTypes::IE_UNDEFINED), OFTrue);
+    m_Rules->addRule(new IODRule(DCM_UniversalEntityIDType, "1", "1C", getName(), DcmIODTypes::IE_UNDEFINED), OFTrue);
 }
 
 OFCondition HL7HierarchicDesignatorMacro::setLocalNamespaceEntityID(const OFString& value, const OFBool checkValue)
@@ -1693,7 +1693,7 @@ OFCondition HL7HierarchicDesignatorMacro::setUniversalEntityIDType(const OFStrin
 {
     OFCondition result = (checkValue) ? DcmCodeString::checkStringValue(value, "1") : EC_Normal;
     if (result.good())
-        result = m_Item->putAndInsertOFStringArray(DCM_UniversalEntityID, value);
+        result = m_Item->putAndInsertOFStringArray(DCM_UniversalEntityIDType, value);
     return result;
 }
 
index c06680ce89d3c3f2ed699612bea1355ce57b48e3..49830a6116f8d030107d6bcd738acac56d94fd34 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2022, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -675,12 +675,13 @@ OFString DcmIODUtil::createUID(const Uint8 level)
 
 Uint32 DcmIODUtil::limitMaxFrames(const size_t numFramesPresent, const OFString& warning)
 {
+    // limit to 2^31-1 since this is the Number of Frames attribute's VR IS' maximum value
     if (numFramesPresent > 2147483647)
     {
         DCMIOD_WARN(warning);
         return 2147483647;
     }
-    return OFstatic_cast(Uint16, numFramesPresent);
+    return OFstatic_cast(Uint32, numFramesPresent);
 }
 
 OFCondition DcmIODUtil::extractBinaryFrames(Uint8* pixData,
@@ -715,7 +716,10 @@ OFCondition DcmIODUtil::extractBinaryFrames(Uint8* pixData,
             return EC_MemoryExhausted;
         }
         memcpy(frame->pixData, readPos, frame->length);
-        // If we have been copying too much, i.e the first bits of the frame
+        // ---------------------------------------------------------
+        // Remove bits in first byte from former frame if necessary:
+        // ---------------------------------------------------------
+        // If we have been copying too much, i.e the first bits of this frame
         // actually belong to the former frame, shift the whole frame this amount
         // of bits to the left in order to shift the superfluous bits out, i.e.
         // make frame start at byte boundary.
@@ -723,9 +727,12 @@ OFCondition DcmIODUtil::extractBinaryFrames(Uint8* pixData,
         {
             DcmIODUtil::alignFrameOnByteBoundary(frame->pixData, frame->length, 8 - bitShift);
         }
+        // -------------------------------------------------------
+        // Mask out (set 0) bits of last byte if not used by frame
+        // -------------------------------------------------------
         // Adapt last byte by masking out unused bits (i.e. those belonging to next frame).
         // A reader should ignore those unused bits anyway.
-        frame->pixData[frame->length - 1] = (frame->pixData[frame->length - 1] << (overlapBits)) >> (overlapBits);
+        frame->pixData[frame->length - 1] = OFstatic_cast(unsigned char, (frame->pixData[frame->length - 1] << overlapBits)) >> overlapBits;
         // Store frame
         results.push_back(frame);
         // Compute the bitshift created by this frame
@@ -735,6 +742,7 @@ OFCondition DcmIODUtil::extractBinaryFrames(Uint8* pixData,
         // that was partially read. Otherwise skip to the next full byte.
         if (bitShift > 0)
         {
+
             readPos = readPos + frame->length - 1;
         }
         else
@@ -755,12 +763,12 @@ void DcmIODUtil::alignFrameOnByteBoundary(Uint8* buf, size_t bufLen, Uint8 numBi
     for (size_t x = 0; x < bufLen - 1; x++)
     {
         // Shift current byte
-        buf[x] = buf[x] >> numBits;
+        buf[x] = OFstatic_cast(unsigned char, buf[x]) >> numBits;
         // isolate portion of next byte that must be shifted into current byte
         Uint8 next = (buf[x + 1] << (8 - numBits));
         // Take over portion from next byte
         buf[x] |= next;
     }
     // Shift last byte manually
-    buf[bufLen - 1] >>= numBits;
+    buf[bufLen - 1] = OFstatic_cast(unsigned char, buf[bufLen - 1]) >> numBits;
 }
index de0c2318097b40f3ee9e5be4890af0b1ac348e5b..9a861537248d96bc8b598a7e9ca1d91330ed7e84 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2018, Open Connections GmbH
+ *  Copyright (C) 2015-2022, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -35,6 +35,7 @@ IODMultiframeDimensionModule::IODMultiframeDimensionModule(OFshared_ptr<DcmItem>
     : IODModule(data, rules)
     , m_DimensionIndexSequence()
     , m_DimensionOrganizationSequence()
+    , m_CheckOnWrite(OFTrue)
 {
     // reset element rules
     resetRules();
@@ -151,6 +152,14 @@ OFCondition IODMultiframeDimensionModule::read(DcmItem& source, const OFBool cle
 OFCondition IODMultiframeDimensionModule::write(DcmItem& destination)
 {
     OFCondition result = EC_Normal;
+    if (m_CheckOnWrite)
+    {
+        result = checkDimensions();
+        if (result.bad())
+        {
+            return result;
+        }
+    }
 
     // Re-create dimension organization data
     createDimensionOrganizationData();
@@ -349,6 +358,16 @@ DcmElement* IODMultiframeDimensionModule::getIndexElement(DcmSequenceOfItems* pe
     return returnValue;
 }
 
+void IODMultiframeDimensionModule::setCheckOnWrite(const OFBool doCheck)
+{
+    m_CheckOnWrite = doCheck;
+}
+
+OFBool IODMultiframeDimensionModule::getCheckOnWrite()
+{
+    return m_CheckOnWrite;
+}
+
 void IODMultiframeDimensionModule::createDimensionOrganizationData()
 {
     // Clear old data
@@ -540,7 +559,7 @@ OFCondition IODMultiframeDimensionModule::DimensionIndexItem::setFunctionalGroup
         return EC_InternalError;
 
     OFCondition result;
-    Uint16* attrTagArray;
+    Uint16* attrTagArray = NULL;
     result = elem->putTagVal(value);
     if (result.good())
         result = elem->getUint16Array(attrTagArray);
@@ -572,7 +591,7 @@ OFCondition IODMultiframeDimensionModule::DimensionIndexItem::setDimensionIndexP
         return EC_InternalError;
 
     OFCondition result;
-    Uint16* attrTagArray;
+    Uint16* attrTagArray = NULL;
     result = elem->putTagVal(value);
     if (result.good())
         result = elem->getUint16Array(attrTagArray);
index b81014fae46188dce0515cd12348d7fb8e13fbb7..5b84ca9dcca698747f5468a7c62ab5f7b1f8bd5e 100644 (file)
@@ -1,5 +1,10 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(dcmiod_tests tests tcielabutil tcodes timagepixel)
+DCMTK_ADD_EXECUTABLE(dcmiod_tests
+  tests.cc
+  tcielabutil.cc
+  tcodes.cc
+  timagepixel.cc
+)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(dcmiod_tests dcmiod dcmdata oflog ofstd)
index bcde22597cbe295cd43a79bb68b40d2a3cd3aa30..f3cd4cc4e3194a76eabef255ded1d6a79ad1ae11 100644 (file)
@@ -4,9 +4,9 @@ tcielabutil.o: tcielabutil.cc \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofrand.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
@@ -228,12 +228,12 @@ timagepixel.o: timagepixel.cc \
  ../include/dcmtk/dcmiod/iodrules.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmiod/iodtypes.h ../include/dcmtk/dcmiod/ioddef.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -355,9 +355,9 @@ timagepixel.o: timagepixel.cc \
  ../include/dcmtk/dcmiod/modimagepixelvariant.h \
  ../include/dcmtk/dcmiod/modimagepixelbase.h \
  ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/diag/push.def \
  ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \
  ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \
index 294a96f8a83235fc33997088a1eafeed5535defb..0b6a08553226bf5f918162c00a7a658499605701 100644 (file)
@@ -3,7 +3,7 @@ include_directories("${dcmjpeg_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include
 
 # declare executables
 foreach(PROGRAM dcmcjpeg dcmdjpeg dcmj2pnm dcmmkdir)
-  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM})
+  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc)
 endforeach()
 
 # make sure executables are linked to the corresponding libraries
index 50e8a3a0793d38635c2f6eb8fe701cbfbaaa8e3b..41e536ae4f8bd0cae450b10ee3273473b716b7ce 100644 (file)
@@ -1,5 +1,4 @@
 dcmcjpeg.o: dcmcjpeg.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -8,6 +7,7 @@ dcmcjpeg.o: dcmcjpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -128,7 +128,6 @@ dcmcjpeg.o: dcmcjpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diregbas.h \
  ../../dcmimage/include/dcmtk/dcmimage/dicdefin.h
 dcmdjpeg.o: dcmdjpeg.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -137,6 +136,7 @@ dcmdjpeg.o: dcmdjpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -253,7 +253,6 @@ dcmdjpeg.o: dcmdjpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diplugin.h
 dcmj2pnm.o: dcmj2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \
  ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -262,6 +261,7 @@ dcmj2pnm.o: dcmj2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
index baf6fcbf3d12d28010a06bedcc600f8bc491a6a1..41997c4788a74d829ba00e06576d22db3e1bdc8f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2018, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
 
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
index 1ed23296ee3948e4ab4f77fab72cfdd98e24ae7d..dd06291765838b42c75739c28369a8eacf66aa1f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2020, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
index b23852af7714b50c60e062581e3a33adfb3b0b6e..57d70c2299fb444ebf20681935bcefe99ea9e1b2 100644 (file)
@@ -148,7 +148,7 @@ lossless JPEG codec selection:
   +tl   --true-lossless
           true lossless codec (default)
 
-  # This option selects an encoder, that guarantees truely lossless
+  # This option selects an encoder, that guarantees truly lossless
   # image compression. See NOTES for further information.
 
   +pl   --pseudo-lossless
@@ -701,6 +701,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmcjpeg_copyright COPYRIGHT
 
-Copyright (C) 2001-2018 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2001-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 57906cb2c4ade9a2175e7cdc8db1183489048e93..82ac0eb19f4118daaae793f970c3cef7eb879ee6 100644 (file)
@@ -344,6 +344,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmdjpeg_copyright COPYRIGHT
 
-Copyright (C) 2001-2019 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2001-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 2b982b8d5751b4d0e0c1655ee5e2d84fca551169..bc5a7f6e7557338f9cde1063e9b2d69b06f5793a 100644 (file)
@@ -476,8 +476,7 @@ The following preferred interpolation algorithms can be selected using the
 The \e --write-tiff option is only available when DCMTK has been configured
 and compiled with support for the external \b libtiff TIFF library.  The
 availability of the TIFF compression options depends on the \b libtiff
-configuration.  In particular, the patented LZW algorithm may not be
-available.
+configuration.
 
 The \e --write-png option is only available when DCMTK has been configured
 and compiled with support for the external \b libpng PNG library.  Option
@@ -574,6 +573,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmj2pnm_copyright COPYRIGHT
 
-Copyright (C) 2001-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2001-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index fce3a138a6c437892504b670e8dd6c16bb6d7ed4..8f97ad313bb528c53b51da5727823146ba74aa0d 100644 (file)
@@ -477,6 +477,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmmkdir_copyright COPYRIGHT
 
-Copyright (C) 2001-2016 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2001-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index b521bab1bea6b3738a4107596290da4bd83d5059..7f3b6bc43ef2b7248385e091dcc3b34d04ba067a 100644 (file)
@@ -359,7 +359,7 @@ private:
    *  @param ratio image compression ratio. This is not the "quality factor"
    *    but the real effective ratio between compressed and uncompressed image,
    *    i. e. 30 means a 30:1 lossy compression.
-   *  @param derivation description returned in this
+   *  @param derivationDescription derivation description returned in this
    *    parameter which is initially empty
    */
   virtual void createDerivationDescription(
index fee96fdc4acd17fcda3f86d913f04aa22b5d0163..b8f234c267d3710b29cc0a32c4983786cba677f4 100644 (file)
@@ -141,7 +141,7 @@ public:
   }
 
   /** returns maximum fragment size (in kbytes) for compression, 0 for unlimited.
-   *  @returnmaximum fragment size for compression
+   *  @return maximum fragment size for compression
    */
   Uint32 getFragmentSize() const
   {
index 83f10dc7f3ce52c717badba1bd149c45132b43d3..ae065cbd1346da33c0f2fe9babd36ff7e8fc61e4 100644 (file)
@@ -59,7 +59,7 @@ private:
    *  @param ratio image compression ratio. This is not the "quality factor"
    *    but the real effective ratio between compressed and uncompressed image,
    *    i. e. 30 means a 30:1 lossy compression.
-   *  @param imageComments image comments returned in this
+   *  @param derivationDescription derivation description returned in this
    *    parameter which is initially empty
    */
   virtual void createDerivationDescription(
index d0a614fd47fc958a91ee6d119339071457cb2425..80a26ff6d43197ec3388eeb5a43689f4483e3984 100644 (file)
@@ -59,7 +59,7 @@ private:
    *  @param ratio image compression ratio. This is not the "quality factor"
    *    but the real effective ratio between compressed and uncompressed image,
    *    i. e. 30 means a 30:1 lossy compression.
-   *  @param imageComments image comments returned in this
+   *  @param derivationDescription derivation description returned in this
    *    parameter which is initially empty
    */
   virtual void createDerivationDescription(
index 2dc86e8f553f32cb03b250f42d380740125d9adf..8a133c5a83b69a07acda60a600a3db433400930a 100644 (file)
@@ -59,7 +59,7 @@ private:
    *  @param ratio image compression ratio. This is not the "quality factor"
    *    but the real effective ratio between compressed and uncompressed image,
    *    i. e. 30 means a 30:1 lossy compression.
-   *  @param imageComments image comments returned in this
+   *  @param derivationDescription derivation description returned in this
    *    parameter which is initially empty
    */
   virtual void createDerivationDescription(
index b385c824f46f50380c72cc1f5a7d7c4a33e95941..672aa545a44d9bdf5a7be05382ed99d157874781 100644 (file)
@@ -59,7 +59,7 @@ private:
    *  @param ratio image compression ratio. This is not the "quality factor"
    *    but the real effective ratio between compressed and uncompressed image,
    *    i. e. 30 means a 30:1 lossy compression.
-   *  @param imageComments image comments returned in this
+   *  @param derivationDescription derivation description returned in this
    *    parameter which is initially empty
    */
   virtual void createDerivationDescription(
index de07fd78cadbe03b09adcf334a393a9d9b7a81c8..eb8a78886c80a4f55e617f4e64e0d2fca1cb17b7 100644 (file)
@@ -59,7 +59,7 @@ private:
    *  @param ratio image compression ratio. This is not the "quality factor"
    *    but the real effective ratio between compressed and uncompressed image,
    *    i. e. 30 means a 30:1 lossy compression.
-   *  @param imageComments image comments returned in this
+   *  @param derivationDescription derivation description returned in this
    *    parameter which is initially empty
    */
   virtual void createDerivationDescription(
index e0e91fbf76e6d35b472568b70ed1f63af2c08af5..2364645377b00fc47d2a75f5dfd03512e3abace9 100644 (file)
@@ -59,7 +59,7 @@ private:
    *  @param ratio image compression ratio. This is not the "quality factor"
    *    but the real effective ratio between compressed and uncompressed image,
    *    i. e. 30 means a 30:1 lossy compression.
-   *  @param imageComments image comments returned in this
+   *  @param derivationDescription derivation description returned in this
    *    parameter which is initially empty
    */
   virtual void createDerivationDescription(
index 6fe1a2b1ed0a333cf4133d9714af89b1206e7189..2a29a5a8f22b11826234818f843931785723b111 100644 (file)
@@ -1,2 +1,67 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(ijg12 jaricom jcapimin jcapistd jcarith jccoefct jccolor jcdctmgr jcdiffct jchuff jcinit jclhuff jclossls jclossy jcmainct jcmarker jcmaster jcodec jcomapi jcparam jcphuff jcpred jcprepct jcsample jcscale jcshuff jctrans jdapimin jdapistd jdarith jdatadst jdatasrc jdcoefct jdcolor jddctmgr jddiffct jdhuff jdinput jdlhuff jdlossls jdlossy jdmainct jdmarker jdmaster jdmerge jdphuff jdpostct jdpred jdsample jdscale jdshuff jdtrans jerror jfdctflt jfdctfst jfdctint jidctflt jidctfst jidctint jidctred jmemmgr jmemnobs jquant1 jquant2 jutils)
+DCMTK_ADD_LIBRARY(ijg12
+  jaricom.c
+  jcapimin.c
+  jcapistd.c
+  jcarith.c
+  jccoefct.c
+  jccolor.c
+  jcdctmgr.c
+  jcdiffct.c
+  jchuff.c
+  jcinit.c
+  jclhuff.c
+  jclossls.c
+  jclossy.c
+  jcmainct.c
+  jcmarker.c
+  jcmaster.c
+  jcodec.c
+  jcomapi.c
+  jcparam.c
+  jcphuff.c
+  jcpred.c
+  jcprepct.c
+  jcsample.c
+  jcscale.c
+  jcshuff.c
+  jctrans.c
+  jdapimin.c
+  jdapistd.c
+  jdarith.c
+  jdatadst.c
+  jdatasrc.c
+  jdcoefct.c
+  jdcolor.c
+  jddctmgr.c
+  jddiffct.c
+  jdhuff.c
+  jdinput.c
+  jdlhuff.c
+  jdlossls.c
+  jdlossy.c
+  jdmainct.c
+  jdmarker.c
+  jdmaster.c
+  jdmerge.c
+  jdphuff.c
+  jdpostct.c
+  jdpred.c
+  jdsample.c
+  jdscale.c
+  jdshuff.c
+  jdtrans.c
+  jerror.c
+  jfdctflt.c
+  jfdctfst.c
+  jfdctint.c
+  jidctflt.c
+  jidctfst.c
+  jidctint.c
+  jidctred.c
+  jmemmgr.c
+  jmemnobs.c
+  jquant1.c
+  jquant2.c
+  jutils.c
+)
index 61366d2baa1f985b636f1572ed25ffc2c697445b..666c188533438b34de9aa3ff4bea5acac0232e95 100644 (file)
@@ -211,7 +211,8 @@ jidctred.o: jidctred.c jinclude12.h jconfig12.h \
 jmemmgr.o: jmemmgr.c jinclude12.h jconfig12.h \
  ../../config/include/dcmtk/config/osconfig.h jpeglib12.h jmorecfg12.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h jpegint12.h jerror12.h \
- jmemsys12.h
+ jmemsys12.h ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/constexp.def
 jmemnobs.o: jmemnobs.c jinclude12.h jconfig12.h \
  ../../config/include/dcmtk/config/osconfig.h jpeglib12.h jmorecfg12.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h jpegint12.h jerror12.h \
index c07be2128c1dfeb11db2d6a31a4b790d7d7f2dc3..8c16ac758530ffbc4fb2aabcb38a97cacac826de 100644 (file)
@@ -343,6 +343,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 METHODDEF(boolean)
 compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
+  (void)input_buf;
   j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec;
   c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private;
   JDIMENSION MCU_col_num;   /* index of current MCU within row */
@@ -414,7 +415,7 @@ jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
   coef = (c_coef_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                 SIZEOF(c_coef_controller));
-  lossyc->coef_private = (struct jpeg_c_coef_controller *) coef;
+  lossyc->coef_private = (void *) coef;
   lossyc->coef_start_pass = start_pass_coef;
 
   /* Create the coefficient buffer. */
index 6e1f849627f12193bb755c96fd746dda354bc75a..7362ed1fbd5b08f0b8797e443f90b81c6cc69049 100644 (file)
@@ -340,6 +340,7 @@ null_convert (j_compress_ptr cinfo,
 METHODDEF(void)
 null_method (j_compress_ptr cinfo)
 {
+  (void) cinfo;
   /* no work needed */
 }
 
index 8ff7cae931347aa6de98762559d3237601cc6077..72571ab19ebf4d26ef874b4cd6d7fb26f47ff9d4 100644 (file)
@@ -353,7 +353,7 @@ jinit_forward_dct (j_compress_ptr cinfo)
   fdct = (fdct_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                                SIZEOF(fdct_controller));
-  lossyc->fdct_private = (struct jpeg_forward_dct *) fdct;
+  lossyc->fdct_private = (void *) fdct;
   lossyc->fdct_start_pass = start_pass_fdctmgr;
 
   switch (cinfo->dct_method) {
index 25b75834876f4a24b6ce906f638a525f2bd513d2..e0bea6b73d93b5f476e588aff0134538ef29f5b2 100644 (file)
@@ -302,6 +302,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 METHODDEF(boolean)
 compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
+  (void)input_buf;
   j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec;
   c_diff_ptr diff = (c_diff_ptr) losslsc->diff_private;
   /* JDIMENSION MCU_col_num; */ /* index of current MCU within row */
index 5689a5ce298fc19a86d420c39bf739aab7e770c0..48751df0c25a357acc492dfc99620d38b565dab3 100644 (file)
@@ -569,6 +569,7 @@ finish_pass_gather (j_compress_ptr cinfo)
 METHODDEF(boolean)
 need_optimization_pass (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   return TRUE;
 }
 
@@ -587,7 +588,7 @@ jinit_lhuff_encoder (j_compress_ptr cinfo)
   entropy = (lhuff_entropy_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                 SIZEOF(lhuff_entropy_encoder));
-  losslsc->entropy_private = (struct jpeg_entropy_encoder *) entropy;
+  losslsc->entropy_private = (void *) entropy;
   losslsc->pub.entropy_start_pass = start_pass_huff;
   losslsc->pub.need_optimization_pass = need_optimization_pass;
 
index deb05963397e6cfc204e34fef98cd5c6b5e166d6..5f4108d48a93fd55148aaf10e77837562bfded5d 100644 (file)
@@ -224,6 +224,7 @@ emit_dac (j_compress_ptr cinfo)
 /* Since the useful info is so small, we want to emit all the tables in */
 /* one DAC marker.  Therefore this routine does its own scan of the table. */
 {
+  (void)cinfo;
 #ifdef C_ARITH_CODING_SUPPORTED
   char dc_in_use[NUM_ARITH_TBLS];
   char ac_in_use[NUM_ARITH_TBLS];
index 487958d68a16e0bc88ba90c67af9dafaea242cf4..5d32ea72c277442116cf6a35b95d607da4cf2038 100644 (file)
@@ -833,7 +833,7 @@ jinit_phuff_encoder (j_compress_ptr cinfo)
   entropy = (phuff_entropy_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                 SIZEOF(phuff_entropy_encoder));
-  lossyc->entropy_private = (struct jpeg_entropy_encoder *) entropy;
+  lossyc->entropy_private = (void *) entropy;
   lossyc->pub.entropy_start_pass = start_pass_phuff;
   lossyc->pub.need_optimization_pass = need_optimization_pass;
 
index 5e467eceae1241f460faeef4278092bc95334c2f..82af26172a205e37e3ce43b0c708cfdb4b03df86 100644 (file)
@@ -213,6 +213,7 @@ jpeg_difference_first_row(j_compress_ptr cinfo, int ci,
          const JSAMPROW input_buf, JSAMPROW prev_row,
          JDIFFROW diff_buf, JDIMENSION width)
 {
+  (void)prev_row;
   DIFFERENCE_1D(INITIAL_PREDICTORx);
 
   /*
index 4785e1c19c26117eb32fb65ec906962069e6057b..dd289ea6d1b0c8cd9aa11618d8e83a5aa89ac965 100644 (file)
@@ -74,6 +74,7 @@ typedef my_downsampler * my_downsample_ptr;
 METHODDEF(void)
 start_pass_downsample (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work for now */
 }
 
index 44456e0e107aec6d918b405cfd9454538687f082..2a1771cb332812b1e8a12a51b0c85de210f4e1a4 100644 (file)
@@ -34,6 +34,7 @@ METHODDEF(void)
 noscale(j_compress_ptr cinfo,
        JSAMPROW input_buf, JSAMPROW output_buf, JDIMENSION width)
 {
+  (void)cinfo;
   MEMCOPY(output_buf, input_buf, width * SIZEOF(JSAMPLE));
   return;
 }
index 14bf7dba0c18bbf93b58aff03a24536b5df96501..bf43e0edeeadc76405c95fb05409efd494ed2dac 100644 (file)
@@ -629,6 +629,7 @@ finish_pass_gather (j_compress_ptr cinfo)
 METHODDEF(boolean)
 need_optimization_pass (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   return TRUE;
 }
 
@@ -647,7 +648,7 @@ jinit_shuff_encoder (j_compress_ptr cinfo)
   entropy = (shuff_entropy_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                                SIZEOF(shuff_entropy_encoder));
-  lossyc->entropy_private = (struct jpeg_entropy_encoder *) entropy;
+  lossyc->entropy_private = (void *) entropy;
   lossyc->pub.entropy_start_pass = start_pass_huff;
   lossyc->pub.need_optimization_pass = need_optimization_pass;
 
index 711482def1e4ffe48f5ff93bd495c80f77744a38..5d102c3cdbb978bbc962ef0777a5f502bd0f0cf0 100644 (file)
@@ -267,6 +267,7 @@ start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
 METHODDEF(boolean)
 compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
+  (void)input_buf;
   j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec;
   c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private;
   JDIMENSION MCU_col_num;   /* index of current MCU within row */
@@ -362,7 +363,7 @@ transencode_coef_controller (j_compress_ptr cinfo,
   coef = (c_coef_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                 SIZEOF(c_coef_controller));
-  lossyc->coef_private = (struct jpeg_c_coef_controller *) coef;
+  lossyc->coef_private = (void *) coef;
 
   /* Save pointer to virtual arrays */
   coef->whole_image = coef_arrays;
index f4d03dbb361a87c0a7d86d93202d31c475115e55..47ce0b12555e31e35136e2f16db762eb7d53ccae 100644 (file)
@@ -168,6 +168,7 @@ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
 METHODDEF(void)
 term_source (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work necessary here */
 }
 
index 7e4208d2a057a1564736c098d6af2b791a5d9e87..7e21b853a858ff51ac9d86bb0c7718671f33234e 100644 (file)
@@ -229,6 +229,7 @@ decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
 METHODDEF(int)
 dummy_consume_data (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   return JPEG_SUSPENDED;    /* Always indicate nothing was done */
 }
 
index 4ab46e4e9eb763328425f04e61caddb0f1de2413..96713a6b291cd346096a868c407acb5231c785c7 100644 (file)
@@ -309,6 +309,7 @@ ycck_cmyk_convert (j_decompress_ptr cinfo,
 METHODDEF(void)
 start_pass_dcolor (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work needed */
 }
 
index cac77fbdbd5cb469c96d3d7a093b79b09093fd22..7a7233bc59cb6dae4c7325371ac22fa67e8f3ebb 100644 (file)
@@ -238,6 +238,7 @@ decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
 METHODDEF(int)
 dummy_consume_data (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   return JPEG_SUSPENDED;    /* Always indicate nothing was done */
 }
 
index d2c98c81da72e804910862b001ef10a2066e467a..95c3ce091b6acddf708365642d4306d86dc4b8e4 100644 (file)
@@ -138,7 +138,11 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
     for (i = 0; i < numsymbols; i++) {
       int sym = htbl->huffval[i];
       if (sym < 0 || sym > 16)
+#ifdef DCMTK_ENABLE_STRICT_HUFFMAN_TABLE_CHECK
     ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
+#else
+    TRACEMS1(cinfo, 1, JTRC_UNOPT_HUFF_TABLE, sym);
+#endif
     }
   }
 }
index 355835c7f7d196a595f6b0674a6a64485c475df1..e5ef5cfd252bdea97179043b5a2392a518f7d241 100644 (file)
@@ -344,6 +344,12 @@ get_sos (j_decompress_ptr cinfo)
     
     TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,
          compptr->dc_tbl_no, compptr->ac_tbl_no);
+
+    /* This CSi (cc) should differ from the previous CSi */
+    for (ci = 0; ci < i; ci++) {
+      if (cinfo->cur_comp_info[ci] == compptr)
+        ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
+    }
   }
 
   /* Collect the additional scan parameters Ss, Se, Ah/Al. */
index 4a827fd3d95678eb9ebaed682b478b8380fae32a..8888e098b3e5132c854981aa6ff20d78c4c0123f 100644 (file)
@@ -148,6 +148,7 @@ merged_2v_upsample (j_decompress_ptr cinfo,
             JDIMENSION out_rows_avail)
 /* 2:1 vertical sampling case: may need a spare row. */
 {
+  (void) in_row_groups_avail;
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
   JSAMPROW work_ptrs[2];
   JDIMENSION num_rows;      /* number of rows returned to caller */
@@ -197,6 +198,8 @@ merged_1v_upsample (j_decompress_ptr cinfo,
             JDIMENSION out_rows_avail)
 /* 1:1 vertical sampling case: much easier, never need a spare row. */
 {
+  (void) in_row_groups_avail;
+  (void) out_rows_avail;
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
 
   /* Just do the upsampling. */
index c7f214bebba284fa49db0e305af465166103016f..f3706a4b8acc3378d0884c873901d98436fe656d 100644 (file)
@@ -161,6 +161,8 @@ post_process_prepass (j_decompress_ptr cinfo,
               JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
               JDIMENSION out_rows_avail)
 {
+  (void) output_buf;
+  (void) out_rows_avail;
   my_post_ptr post = (my_post_ptr) cinfo->post;
   JDIMENSION old_next_row, num_rows;
 
@@ -205,6 +207,10 @@ post_process_2pass (j_decompress_ptr cinfo,
             JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
             JDIMENSION out_rows_avail)
 {
+  (void) input_buf;
+  (void) in_row_group_ctr;
+  (void) in_row_groups_avail;
+
   my_post_ptr post = (my_post_ptr) cinfo->post;
   JDIMENSION num_rows, max_rows;
 
index 7aa46a3534f0a3ef3b8927b6b24b47049ef3ec7e..b84e96bcfd60d9af2e637edcfd5f4d9c8b98c7ea 100644 (file)
@@ -101,6 +101,8 @@ jpeg_undifference1(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   UNDIFFERENCE_1D(INITIAL_PREDICTOR2);
 }
 
@@ -109,6 +111,8 @@ jpeg_undifference2(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   UNDIFFERENCE_2D(PREDICTOR2);
   JPEG_UNUSED(Rc);
   JPEG_UNUSED(Rb);
@@ -119,6 +123,8 @@ jpeg_undifference3(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   UNDIFFERENCE_2D(PREDICTOR3);
   JPEG_UNUSED(Rc);
   JPEG_UNUSED(Rb);
@@ -129,6 +135,8 @@ jpeg_undifference4(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   UNDIFFERENCE_2D(PREDICTOR4);
   JPEG_UNUSED(Rc);
   JPEG_UNUSED(Rb);
@@ -139,6 +147,8 @@ jpeg_undifference5(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR5);
   JPEG_UNUSED(Rc);
@@ -150,6 +160,8 @@ jpeg_undifference6(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR6);
   JPEG_UNUSED(Rc);
@@ -161,6 +173,8 @@ jpeg_undifference7(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR7);
   JPEG_UNUSED(Rc);
@@ -180,6 +194,8 @@ jpeg_undifference_first_row(j_decompress_ptr cinfo, int comp_index,
                 const JDIFFROW diff_buf, JDIFFROW prev_row,
                 JDIFFROW undiff_buf, JDIMENSION width)
 {
+
+  (void)prev_row;
   j_lossless_d_ptr losslsd = (j_lossless_d_ptr) cinfo->codec;
 
   UNDIFFERENCE_1D(INITIAL_PREDICTORx);
index 6e8e7ea68e8b2cc1596c85518b1d087f620b9471..f996c912f30eadfaaa3c79ae5009d660de5c1be8 100644 (file)
@@ -92,6 +92,7 @@ sep_upsample (j_decompress_ptr cinfo,
           JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
           JDIMENSION out_rows_avail)
 {
+  (void)in_row_groups_avail;
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
   int ci;
   jpeg_component_info * compptr;
@@ -157,6 +158,8 @@ METHODDEF(void)
 fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
            JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)cinfo;
+  (void)compptr;
   *output_data_ptr = input_data;
 }
 
@@ -170,6 +173,9 @@ METHODDEF(void)
 noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
            JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)cinfo;
+  (void)compptr;
+  (void)input_data;
   *output_data_ptr = NULL;  /* safety check */
 }
 
@@ -233,6 +239,7 @@ METHODDEF(void)
 h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
            JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)compptr;
   JSAMPARRAY output_data = *output_data_ptr;
   register JSAMPROW inptr, outptr;
   register JSAMPLE invalue;
@@ -261,6 +268,7 @@ METHODDEF(void)
 h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
            JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)compptr;
   JSAMPARRAY output_data = *output_data_ptr;
   register JSAMPROW inptr, outptr;
   register JSAMPLE invalue;
index 0c9d5a2db8b7a902f62fcc759520a58e994305fe..8e742f6230db93e9441c13ad6c843326ade27711 100644 (file)
@@ -67,6 +67,7 @@ noscale(j_decompress_ptr cinfo,
        const JDIFFROW diff_buf, JSAMPROW output_buf,
        JDIMENSION width)
 {
+  (void)cinfo;
   unsigned int xindex;
 
   for (xindex = 0; xindex < width; xindex++)
index d90bd1c184c3b6e343ce0282c40b6366d5d7c5ea..31b5453e6d421a35ba3dd804dadee3538c4f0d28 100644 (file)
@@ -181,6 +181,7 @@ JMESSAGE(JTRC_UNKNOWN_LOSSLESS_IDS,
         "Unrecognized component IDs %d %d %d, assuming RGB")
 JMESSAGE(JTRC_UNKNOWN_LOSSY_IDS,
         "Unrecognized component IDs %d %d %d, assuming YCbCr")
+JMESSAGE(JTRC_UNOPT_HUFF_TABLE, "Symbol %d indicates un-optimized Huffman table")
 JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
 JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
 JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
index 1ba534603fe90638ee3e67655695a17e84d72bf2..f71ccd81e55a4d5b5810709d99b4f4f2887eae91 100644 (file)
@@ -29,6 +29,7 @@
 #include "jinclude12.h"
 #include "jpeglib12.h"
 #include "jmemsys12.h"      /* import the system-dependent declarations */
+#include "dcmtk/ofstd/ofdiag.h"      /* for DCMTK_DIAGNOSTIC macros */
 
 #ifndef NO_GETENV
 #ifndef HAVE_STDLIB_H       /* <stdlib.h> should declare getenv() */
@@ -483,8 +484,6 @@ alloc_barray (j_common_ptr cinfo, int pool_id,
 }
 
 
-#ifdef NEED_DARRAY
-
 /*
  * Creation of 2-D difference arrays.
  * This is essentially the same as the code for sample arrays, above.
@@ -532,7 +531,6 @@ alloc_darray (j_common_ptr cinfo, int pool_id,
   return result;
 }
 
-#endif
 
 
 /*
@@ -1071,6 +1069,7 @@ self_destruct (j_common_ptr cinfo)
   jpeg_mem_term(cinfo);     /* system-dependent cleanup */
 }
 
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
 
 /*
  * Memory manager initialization.
@@ -1121,9 +1120,7 @@ jinit_memory_mgr (j_common_ptr cinfo)
   mem->pub.alloc_large = alloc_large;
   mem->pub.alloc_sarray = alloc_sarray;
   mem->pub.alloc_barray = alloc_barray;
-#ifdef NEED_DARRAY
   mem->pub.alloc_darray = alloc_darray;
-#endif
   mem->pub.request_virt_sarray = request_virt_sarray;
   mem->pub.request_virt_barray = request_virt_barray;
   mem->pub.realize_virt_arrays = realize_virt_arrays;
index 248d84db831b26492b7f7e5c90f62b036d4cb67f..6a3d0839ea2c8963661b9b9260c865b9e3da7e55 100644 (file)
@@ -34,12 +34,15 @@ extern void free JPP((void *ptr));
 GLOBAL(void *)
 jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
 {
+  (void) cinfo;
   return (void *) malloc(sizeofobject);
 }
 
 GLOBAL(void)
 jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 {
+  (void) cinfo;
+  (void) sizeofobject;
   free(object);
 }
 
@@ -54,12 +57,15 @@ jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 GLOBAL(void FAR *)
 jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
 {
+  (void) cinfo;
   return (void FAR *) malloc(sizeofobject);
 }
 
 GLOBAL(void)
 jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
 {
+  (void) cinfo;
+  (void) sizeofobject;
   free(object);
 }
 
@@ -73,6 +79,9 @@ GLOBAL(long)
 jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
                    long max_bytes_needed, long already_allocated)
 {
+  (void) cinfo;
+  (void) min_bytes_needed;
+  (void) already_allocated;
   return max_bytes_needed;
 }
 
@@ -87,6 +96,8 @@ GLOBAL(void)
 jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
                         long total_bytes_needed)
 {
+  (void) info;
+  (void) total_bytes_needed;
   ERREXIT(cinfo, JERR_NO_BACKING_STORE);
 }
 
@@ -99,11 +110,13 @@ jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 GLOBAL(long)
 jpeg_mem_init (j_common_ptr cinfo)
 {
+  (void) cinfo;
   return 0;                    /* just set max_memory_to_use to 0 */
 }
 
 GLOBAL(void)
 jpeg_mem_term (j_common_ptr cinfo)
 {
+  (void) cinfo;
   /* no work */
 }
index 040cef4ee1ad6bb42e9b79380cd90a24dbc27638..d7cf44209aa1d1473d817ef915071420c7e65360 100644 (file)
@@ -779,15 +779,6 @@ struct jpeg_source_mgr {
 typedef struct jvirt_sarray_control * jvirt_sarray_ptr;
 typedef struct jvirt_barray_control * jvirt_barray_ptr;
 
-
-#ifdef C_LOSSLESS_SUPPORTED
-#define NEED_DARRAY
-#else
-#ifdef D_LOSSLESS_SUPPORTED
-#define NEED_DARRAY
-#endif
-#endif
-
 struct jpeg_memory_mgr {
   /* Method pointers */
   JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,
@@ -800,11 +791,9 @@ struct jpeg_memory_mgr {
   JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,
                                      JDIMENSION blocksperrow,
                                      JDIMENSION numrows));
-#ifdef NEED_DARRAY
   JMETHOD(JDIFFARRAY, alloc_darray, (j_common_ptr cinfo, int pool_id,
                                     JDIMENSION diffsperrow,
                                     JDIMENSION numrows));
-#endif
   JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
                                                  int pool_id,
                                                  boolean pre_zero,
index e343347368a235e3a94bf299367886bb59f4444c..985ce7d7b49a5fe9ea866d9d552cec13d49e0a8f 100644 (file)
@@ -251,6 +251,8 @@ output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
    * (Forcing the upper and lower values to the limits ensures that
    * dithering can't produce a color outside the selected gamut.)
    */
+  (void) cinfo;
+  (void) ci;
   return (int) (((IJG_INT32) j * MAXJSAMPLE + maxj/2) / maxj);
 }
 
@@ -260,6 +262,8 @@ largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
 /* Return largest input value that should map to j'th output value */
 /* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */
 {
+  (void) cinfo;
+  (void) ci;
   /* Breakpoints are halfway between values returned by output_value */
   return (int) (((IJG_INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj));
 }
@@ -740,6 +744,7 @@ alloc_fs_workspace (j_decompress_ptr cinfo)
 METHODDEF(void)
 start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
 {
+  (void) is_pre_scan;
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
   size_t arraysize;
   int i;
@@ -797,6 +802,7 @@ start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
 METHODDEF(void)
 finish_pass_1_quant (j_decompress_ptr cinfo)
 {
+  (void) cinfo;
   /* no work in 1-pass case */
 }
 
index 761f518f4831f8eff317fa846132b5ee985c7519..2a0b3ad21f9ad3ec360a299935b51367783d1a6c 100644 (file)
@@ -224,6 +224,7 @@ METHODDEF(void)
 prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
           JSAMPARRAY output_buf, int num_rows)
 {
+  (void) output_buf;
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
   register JSAMPROW ptr;
   register histptr histp;
@@ -1155,6 +1156,7 @@ finish_pass1 (j_decompress_ptr cinfo)
 METHODDEF(void)
 finish_pass2 (j_decompress_ptr cinfo)
 {
+  (void) cinfo;
   /* no work */
 }
 
index ad532fe6ae0ef140dcc0f3e075a8202463d07f5d..327227b40c0147942218bb6bea22c6a3105f5f54 100644 (file)
@@ -1,2 +1,67 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(ijg16 jaricom jcapimin jcapistd jcarith jccoefct jccolor jcdctmgr jcdiffct jchuff jcinit jclhuff jclossls jclossy jcmainct jcmarker jcmaster jcodec jcomapi jcparam jcphuff jcpred jcprepct jcsample jcscale jcshuff jctrans jdapimin jdapistd jdarith jdatadst jdatasrc jdcoefct jdcolor jddctmgr jddiffct jdhuff jdinput jdlhuff jdlossls jdlossy jdmainct jdmarker jdmaster jdmerge jdphuff jdpostct jdpred jdsample jdscale jdshuff jdtrans jerror jfdctflt jfdctfst jfdctint jidctflt jidctfst jidctint jidctred jmemmgr jmemnobs jquant1 jquant2 jutils)
+DCMTK_ADD_LIBRARY(ijg16
+  jaricom.c
+  jcapimin.c
+  jcapistd.c
+  jcarith.c
+  jccoefct.c
+  jccolor.c
+  jcdctmgr.c
+  jcdiffct.c
+  jchuff.c
+  jcinit.c
+  jclhuff.c
+  jclossls.c
+  jclossy.c
+  jcmainct.c
+  jcmarker.c
+  jcmaster.c
+  jcodec.c
+  jcomapi.c
+  jcparam.c
+  jcphuff.c
+  jcpred.c
+  jcprepct.c
+  jcsample.c
+  jcscale.c
+  jcshuff.c
+  jctrans.c
+  jdapimin.c
+  jdapistd.c
+  jdarith.c
+  jdatadst.c
+  jdatasrc.c
+  jdcoefct.c
+  jdcolor.c
+  jddctmgr.c
+  jddiffct.c
+  jdhuff.c
+  jdinput.c
+  jdlhuff.c
+  jdlossls.c
+  jdlossy.c
+  jdmainct.c
+  jdmarker.c
+  jdmaster.c
+  jdmerge.c
+  jdphuff.c
+  jdpostct.c
+  jdpred.c
+  jdsample.c
+  jdscale.c
+  jdshuff.c
+  jdtrans.c
+  jerror.c
+  jfdctflt.c
+  jfdctfst.c
+  jfdctint.c
+  jidctflt.c
+  jidctfst.c
+  jidctint.c
+  jidctred.c
+  jmemmgr.c
+  jmemnobs.c
+  jquant1.c
+  jquant2.c
+  jutils.c
+)
index 06b54e40c65d3461d84332ce2d92bf960e01e796..b1c432d964a968a17052990aa14ff90a513a230f 100644 (file)
@@ -211,7 +211,8 @@ jidctred.o: jidctred.c jinclude16.h jconfig16.h \
 jmemmgr.o: jmemmgr.c jinclude16.h jconfig16.h \
  ../../config/include/dcmtk/config/osconfig.h jpeglib16.h jmorecfg16.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h jpegint16.h jerror16.h \
- jmemsys16.h
+ jmemsys16.h ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/constexp.def
 jmemnobs.o: jmemnobs.c jinclude16.h jconfig16.h \
  ../../config/include/dcmtk/config/osconfig.h jpeglib16.h jmorecfg16.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h jpegint16.h jerror16.h \
index 77f28d381fb0c897ce0714f7885ae23c6a5f5907..a551d1bb49c3c35d85a71fbff633940e2ad3ba0d 100644 (file)
@@ -343,6 +343,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 METHODDEF(boolean)
 compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
+  (void)input_buf;
   j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec;
   c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private;
   JDIMENSION MCU_col_num;   /* index of current MCU within row */
@@ -414,7 +415,7 @@ jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
   coef = (c_coef_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                 SIZEOF(c_coef_controller));
-  lossyc->coef_private = (struct jpeg_c_coef_controller *) coef;
+  lossyc->coef_private = (void *) coef;
   lossyc->coef_start_pass = start_pass_coef;
 
   /* Create the coefficient buffer. */
index 6b5ad733da08c006f3df458e3179581f34d1bbaf..ded5cd3a84d1017a2197db7b2591af0da176782b 100644 (file)
@@ -369,6 +369,7 @@ null_convert (j_compress_ptr cinfo,
 METHODDEF(void)
 null_method (j_compress_ptr cinfo)
 {
+  (void) cinfo;
   /* no work needed */
 }
 
index 4211d6112597fab7262e8e8f35d85428d20325b8..54cbffa7eedab83c124678376741eb65a60ce60a 100644 (file)
@@ -353,7 +353,7 @@ jinit_forward_dct (j_compress_ptr cinfo)
   fdct = (fdct_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                                SIZEOF(fdct_controller));
-  lossyc->fdct_private = (struct jpeg_forward_dct *) fdct;
+  lossyc->fdct_private = (void *) fdct;
   lossyc->fdct_start_pass = start_pass_fdctmgr;
 
   switch (cinfo->dct_method) {
index b0eebd10fdaf07dabc1912ca364b2e43b366be56..48b7a1bd321527a06b60c89108207ba899068a09 100644 (file)
@@ -302,6 +302,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 METHODDEF(boolean)
 compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
+  (void)input_buf;
   j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec;
   c_diff_ptr diff = (c_diff_ptr) losslsc->diff_private;
   /* JDIMENSION MCU_col_num; */ /* index of current MCU within row */
index 93554b2004c5d1b2ae3e9ecce9094b52c364f808..ec42d5909935a6dfbf480a0b0aa0e1c98dd0ccbf 100644 (file)
@@ -569,6 +569,7 @@ finish_pass_gather (j_compress_ptr cinfo)
 METHODDEF(boolean)
 need_optimization_pass (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   return TRUE;
 }
 
@@ -587,7 +588,7 @@ jinit_lhuff_encoder (j_compress_ptr cinfo)
   entropy = (lhuff_entropy_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                 SIZEOF(lhuff_entropy_encoder));
-  losslsc->entropy_private = (struct jpeg_entropy_encoder *) entropy;
+  losslsc->entropy_private = (void *) entropy;
   losslsc->pub.entropy_start_pass = start_pass_huff;
   losslsc->pub.need_optimization_pass = need_optimization_pass;
 
index 2432ca9d45aeecbe86c85d38ff53af70828dd1fc..18b865d49200a7d43f4ebf97dab17d9d24897a87 100644 (file)
@@ -224,6 +224,7 @@ emit_dac (j_compress_ptr cinfo)
 /* Since the useful info is so small, we want to emit all the tables in */
 /* one DAC marker.  Therefore this routine does its own scan of the table. */
 {
+  (void)cinfo;
 #ifdef C_ARITH_CODING_SUPPORTED
   char dc_in_use[NUM_ARITH_TBLS];
   char ac_in_use[NUM_ARITH_TBLS];
index a2bfab4772f1791a5593b9e702ce37f68c44d4b8..f6931bc52107cfb468f04349272c4dea607e9196 100644 (file)
@@ -833,7 +833,7 @@ jinit_phuff_encoder (j_compress_ptr cinfo)
   entropy = (phuff_entropy_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                 SIZEOF(phuff_entropy_encoder));
-  lossyc->entropy_private = (struct jpeg_entropy_encoder *) entropy;
+  lossyc->entropy_private = (void *) entropy;
   lossyc->pub.entropy_start_pass = start_pass_phuff;
   lossyc->pub.need_optimization_pass = need_optimization_pass;
 
index 3778db94a0ba60c819ef4a218f84a748342f3de5..270088b3d5e130f274156a234d7ff23e87d6639b 100644 (file)
@@ -213,6 +213,7 @@ jpeg_difference_first_row(j_compress_ptr cinfo, int ci,
          const JSAMPROW input_buf, JSAMPROW prev_row,
          JDIFFROW diff_buf, JDIMENSION width)
 {
+  (void)prev_row;
   DIFFERENCE_1D(INITIAL_PREDICTORx);
 
   /*
index 80766490d4db00a2d8d481c3be199f7547f39667..3663ac018de7f43f4070b2a9acd1431b98a18e15 100644 (file)
@@ -74,6 +74,7 @@ typedef my_downsampler * my_downsample_ptr;
 METHODDEF(void)
 start_pass_downsample (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work for now */
 }
 
index e2547ef80d68ebde8e96377b95bc80964040dbc8..0aead0d75105604754dc4d728b1ce8f3426bf17b 100644 (file)
@@ -34,6 +34,7 @@ METHODDEF(void)
 noscale(j_compress_ptr cinfo,
        JSAMPROW input_buf, JSAMPROW output_buf, JDIMENSION width)
 {
+  (void)cinfo;
   MEMCOPY(output_buf, input_buf, width * SIZEOF(JSAMPLE));
   return;
 }
index a948c37ea922b418dd8584aee1490b23933699e1..6e1fec3cf3153bf698da4f54b6002b507d73f959 100644 (file)
@@ -629,6 +629,7 @@ finish_pass_gather (j_compress_ptr cinfo)
 METHODDEF(boolean)
 need_optimization_pass (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   return TRUE;
 }
 
@@ -647,7 +648,7 @@ jinit_shuff_encoder (j_compress_ptr cinfo)
   entropy = (shuff_entropy_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                                SIZEOF(shuff_entropy_encoder));
-  lossyc->entropy_private = (struct jpeg_entropy_encoder *) entropy;
+  lossyc->entropy_private = (void *) entropy;
   lossyc->pub.entropy_start_pass = start_pass_huff;
   lossyc->pub.need_optimization_pass = need_optimization_pass;
 
index 046a704b04d06367d4dd91eb21e7ed07cc356fdd..eba574f2f2d90d17d747fd5a6376f9b8460a1eca 100644 (file)
@@ -267,6 +267,7 @@ start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
 METHODDEF(boolean)
 compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
+  (void)input_buf;
   j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec;
   c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private;
   JDIMENSION MCU_col_num;   /* index of current MCU within row */
@@ -362,7 +363,7 @@ transencode_coef_controller (j_compress_ptr cinfo,
   coef = (c_coef_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                 SIZEOF(c_coef_controller));
-  lossyc->coef_private = (struct jpeg_c_coef_controller *) coef;
+  lossyc->coef_private = (void *) coef;
 
   /* Save pointer to virtual arrays */
   coef->whole_image = coef_arrays;
index 99f8d13a579264330a1f1596ea67ad114c983523..f37cb5ae1349b58be4b678f83e1cbc4e0c159d2d 100644 (file)
@@ -168,6 +168,7 @@ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
 METHODDEF(void)
 term_source (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work necessary here */
 }
 
index 332b49823eb33a8d9ef7c6524dfab8d66e0126c5..b7054f822a4ef36777c272759641336130de1337 100644 (file)
@@ -229,6 +229,7 @@ decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
 METHODDEF(int)
 dummy_consume_data (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   return JPEG_SUSPENDED;    /* Always indicate nothing was done */
 }
 
index c9814eea2aec5409f49014b4dda9353022a842fc..17881e0563045ffda427fbce909dbfd118ce593a 100644 (file)
@@ -309,6 +309,7 @@ ycck_cmyk_convert (j_decompress_ptr cinfo,
 METHODDEF(void)
 start_pass_dcolor (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work needed */
 }
 
index 63d13ea6b4e82937b1f4d9cdd47eb231f096a053..64113114b413678e446dfccd7497a501e3463f97 100644 (file)
@@ -238,6 +238,7 @@ decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
 METHODDEF(int)
 dummy_consume_data (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   return JPEG_SUSPENDED;    /* Always indicate nothing was done */
 }
 
index f83bacafa81a5dfd640f7f45e4a30fe9b7f44d23..a079a017f277fbc36a1e9c23d173b3cfaa0471c6 100644 (file)
@@ -137,7 +137,11 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
     for (i = 0; i < numsymbols; i++) {
       int sym = htbl->huffval[i];
       if (sym < 0 || sym > 16)
+#ifdef DCMTK_ENABLE_STRICT_HUFFMAN_TABLE_CHECK
     ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
+#else
+    TRACEMS1(cinfo, 1, JTRC_UNOPT_HUFF_TABLE, sym);
+#endif
     }
   }
 }
index f2b6188e84f9f085d9a34c68c618d613d97d1780..15f5468f139ef3392f70f334b82f2852513e692a 100644 (file)
@@ -344,6 +344,12 @@ get_sos (j_decompress_ptr cinfo)
     
     TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,
          compptr->dc_tbl_no, compptr->ac_tbl_no);
+
+    /* This CSi (cc) should differ from the previous CSi */
+    for (ci = 0; ci < i; ci++) {
+      if (cinfo->cur_comp_info[ci] == compptr)
+        ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
+    }
   }
 
   /* Collect the additional scan parameters Ss, Se, Ah/Al. */
index 84875e7c49569a26385a0066fa4cbac496e52cc3..3d44869df73315c91eb55e56cba6d9d41d181e71 100644 (file)
@@ -171,6 +171,7 @@ merged_2v_upsample (j_decompress_ptr cinfo,
             JDIMENSION out_rows_avail)
 /* 2:1 vertical sampling case: may need a spare row. */
 {
+  (void) in_row_groups_avail;
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
   JSAMPROW work_ptrs[2];
   JDIMENSION num_rows;      /* number of rows returned to caller */
@@ -220,6 +221,8 @@ merged_1v_upsample (j_decompress_ptr cinfo,
             JDIMENSION out_rows_avail)
 /* 1:1 vertical sampling case: much easier, never need a spare row. */
 {
+  (void) in_row_groups_avail;
+  (void) out_rows_avail;
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
 
   /* Just do the upsampling. */
index 01c2b63082ee5e26cf09272d23f8850f5b22e207..ac0658c9e07b49670f0b094472e3b8099f0db0ba 100644 (file)
@@ -161,6 +161,8 @@ post_process_prepass (j_decompress_ptr cinfo,
               JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
               JDIMENSION out_rows_avail)
 {
+  (void) output_buf;
+  (void) out_rows_avail;
   my_post_ptr post = (my_post_ptr) cinfo->post;
   JDIMENSION old_next_row, num_rows;
 
@@ -205,6 +207,9 @@ post_process_2pass (j_decompress_ptr cinfo,
             JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
             JDIMENSION out_rows_avail)
 {
+  (void) input_buf;
+  (void) in_row_group_ctr;
+  (void) in_row_groups_avail;
   my_post_ptr post = (my_post_ptr) cinfo->post;
   JDIMENSION num_rows, max_rows;
 
index 245a61e3abf4a7f639c6c5b08a4a12189fa601e7..96aa9845a3d66eae59f33e5645ca14c21489dc20 100644 (file)
@@ -101,6 +101,8 @@ jpeg_undifference1(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   UNDIFFERENCE_1D(INITIAL_PREDICTOR2);
 }
 
@@ -109,7 +111,9 @@ jpeg_undifference2(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
-  UNDIFFERENCE_2D(PREDICTOR2);
+   (void)cinfo;
+  (void)comp_index;
+ UNDIFFERENCE_2D(PREDICTOR2);
   JPEG_UNUSED(Rc);
   JPEG_UNUSED(Rb);
 }
@@ -119,6 +123,8 @@ jpeg_undifference3(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   UNDIFFERENCE_2D(PREDICTOR3);
   JPEG_UNUSED(Rc);
   JPEG_UNUSED(Rb);
@@ -129,6 +135,8 @@ jpeg_undifference4a(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   UNDIFFERENCE_2D(PREDICTOR4A);
   JPEG_UNUSED(Rc);
   JPEG_UNUSED(Rb);
@@ -139,6 +147,8 @@ jpeg_undifference4(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   UNDIFFERENCE_2D(PREDICTOR4);
   JPEG_UNUSED(Rc);
   JPEG_UNUSED(Rb);
@@ -149,6 +159,8 @@ jpeg_undifference5(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR5);
   JPEG_UNUSED(Rc);
@@ -160,6 +172,8 @@ jpeg_undifference5a(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR5A);
   JPEG_UNUSED(Rc);
@@ -171,6 +185,8 @@ jpeg_undifference6(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR6);
   JPEG_UNUSED(Rc);
@@ -182,6 +198,8 @@ jpeg_undifference6a(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR6A);
   JPEG_UNUSED(Rc);
@@ -193,6 +211,8 @@ jpeg_undifference7(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR7);
   JPEG_UNUSED(Rc);
@@ -204,6 +224,8 @@ jpeg_undifference7a(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR7A);
   JPEG_UNUSED(Rc);
@@ -223,6 +245,7 @@ jpeg_undifference_first_row(j_decompress_ptr cinfo, int comp_index,
                 const JDIFFROW diff_buf, JDIFFROW prev_row,
                 JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)prev_row;
   j_lossless_d_ptr losslsd = (j_lossless_d_ptr) cinfo->codec;
 
   UNDIFFERENCE_1D(INITIAL_PREDICTORx);
index cd3b60fa5d02bc5335e4d5035f4868fb4f780d3c..68a52df9180bc0b7019cd5594d108799e3a364c5 100644 (file)
@@ -92,6 +92,7 @@ sep_upsample (j_decompress_ptr cinfo,
           JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
           JDIMENSION out_rows_avail)
 {
+  (void)in_row_groups_avail;
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
   int ci;
   jpeg_component_info * compptr;
@@ -157,6 +158,8 @@ METHODDEF(void)
 fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
            JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)cinfo;
+  (void)compptr;
   *output_data_ptr = input_data;
 }
 
@@ -170,6 +173,9 @@ METHODDEF(void)
 noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
            JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)cinfo;
+  (void)compptr;
+  (void)input_data;
   *output_data_ptr = NULL;  /* safety check */
 }
 
@@ -233,6 +239,7 @@ METHODDEF(void)
 h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
            JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)compptr;
   JSAMPARRAY output_data = *output_data_ptr;
   register JSAMPROW inptr, outptr;
   register JSAMPLE invalue;
@@ -261,6 +268,7 @@ METHODDEF(void)
 h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
            JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)compptr;
   JSAMPARRAY output_data = *output_data_ptr;
   register JSAMPROW inptr, outptr;
   register JSAMPLE invalue;
index 306c40922ddf0cc1c4a1c0966d96f2c87aa600f1..dd7be0474b1f00c44b0030edeece02740529fbd2 100644 (file)
@@ -67,6 +67,7 @@ noscale(j_decompress_ptr cinfo,
        const JDIFFROW diff_buf, JSAMPROW output_buf,
        JDIMENSION width)
 {
+  (void)cinfo;
   unsigned int xindex;
 
   for (xindex = 0; xindex < width; xindex++)
index d90bd1c184c3b6e343ce0282c40b6366d5d7c5ea..31b5453e6d421a35ba3dd804dadee3538c4f0d28 100644 (file)
@@ -181,6 +181,7 @@ JMESSAGE(JTRC_UNKNOWN_LOSSLESS_IDS,
         "Unrecognized component IDs %d %d %d, assuming RGB")
 JMESSAGE(JTRC_UNKNOWN_LOSSY_IDS,
         "Unrecognized component IDs %d %d %d, assuming YCbCr")
+JMESSAGE(JTRC_UNOPT_HUFF_TABLE, "Symbol %d indicates un-optimized Huffman table")
 JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
 JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
 JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
index 9267fc1f7a2214300dfc838ca62197df6593a2d2..14681b5728f7ff9d24de808170fd8d0b7d4ecd8e 100644 (file)
@@ -29,6 +29,7 @@
 #include "jinclude16.h"
 #include "jpeglib16.h"
 #include "jmemsys16.h"      /* import the system-dependent declarations */
+#include "dcmtk/ofstd/ofdiag.h"      /* for DCMTK_DIAGNOSTIC macros */
 
 #ifndef NO_GETENV
 #ifndef HAVE_STDLIB_H       /* <stdlib.h> should declare getenv() */
@@ -483,8 +484,6 @@ alloc_barray (j_common_ptr cinfo, int pool_id,
 }
 
 
-#ifdef NEED_DARRAY
-
 /*
  * Creation of 2-D difference arrays.
  * This is essentially the same as the code for sample arrays, above.
@@ -532,8 +531,6 @@ alloc_darray (j_common_ptr cinfo, int pool_id,
   return result;
 }
 
-#endif
-
 
 /*
  * About virtual array management:
@@ -1071,6 +1068,7 @@ self_destruct (j_common_ptr cinfo)
   jpeg_mem_term(cinfo);     /* system-dependent cleanup */
 }
 
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
 
 /*
  * Memory manager initialization.
@@ -1121,9 +1119,7 @@ jinit_memory_mgr (j_common_ptr cinfo)
   mem->pub.alloc_large = alloc_large;
   mem->pub.alloc_sarray = alloc_sarray;
   mem->pub.alloc_barray = alloc_barray;
-#ifdef NEED_DARRAY
   mem->pub.alloc_darray = alloc_darray;
-#endif
   mem->pub.request_virt_sarray = request_virt_sarray;
   mem->pub.request_virt_barray = request_virt_barray;
   mem->pub.realize_virt_arrays = realize_virt_arrays;
index 6fa0e579b23a5117961b546d1b67a060483d8719..96a249feb4e8f0c50cbae1e2c887eb2bcf9ad459 100644 (file)
@@ -34,12 +34,15 @@ extern void free JPP((void *ptr));
 GLOBAL(void *)
 jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
 {
+  (void) cinfo;
   return (void *) malloc(sizeofobject);
 }
 
 GLOBAL(void)
 jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 {
+  (void) cinfo;
+  (void) sizeofobject;
   free(object);
 }
 
@@ -54,12 +57,15 @@ jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 GLOBAL(void FAR *)
 jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
 {
+  (void) cinfo;
   return (void FAR *) malloc(sizeofobject);
 }
 
 GLOBAL(void)
 jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
 {
+  (void) cinfo;
+  (void) sizeofobject;
   free(object);
 }
 
@@ -73,6 +79,9 @@ GLOBAL(long)
 jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
                    long max_bytes_needed, long already_allocated)
 {
+  (void) cinfo;
+  (void) min_bytes_needed;
+  (void) already_allocated;
   return max_bytes_needed;
 }
 
@@ -87,6 +96,8 @@ GLOBAL(void)
 jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
                         long total_bytes_needed)
 {
+  (void) info;
+  (void) total_bytes_needed;
   ERREXIT(cinfo, JERR_NO_BACKING_STORE);
 }
 
@@ -99,11 +110,13 @@ jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 GLOBAL(long)
 jpeg_mem_init (j_common_ptr cinfo)
 {
+  (void) cinfo;
   return 0;                    /* just set max_memory_to_use to 0 */
 }
 
 GLOBAL(void)
 jpeg_mem_term (j_common_ptr cinfo)
 {
+  (void) cinfo;
   /* no work */
 }
index 1fcc033a3ed1b8f4e6dee3f313616cd491a219f4..7546e7eeb5dbea5baa8275e429ddff4785f12be6 100644 (file)
@@ -783,14 +783,6 @@ typedef struct jvirt_sarray_control * jvirt_sarray_ptr;
 typedef struct jvirt_barray_control * jvirt_barray_ptr;
 
 
-#ifdef C_LOSSLESS_SUPPORTED
-#define NEED_DARRAY
-#else
-#ifdef D_LOSSLESS_SUPPORTED
-#define NEED_DARRAY
-#endif
-#endif
-
 struct jpeg_memory_mgr {
   /* Method pointers */
   JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,
@@ -803,11 +795,9 @@ struct jpeg_memory_mgr {
   JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,
                                      JDIMENSION blocksperrow,
                                      JDIMENSION numrows));
-#ifdef NEED_DARRAY
   JMETHOD(JDIFFARRAY, alloc_darray, (j_common_ptr cinfo, int pool_id,
                                     JDIMENSION diffsperrow,
                                     JDIMENSION numrows));
-#endif
   JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
                                                  int pool_id,
                                                  boolean pre_zero,
index 4077fbb5d1a22c7a4f6fa26896515b28cc71d74b..4874690f20f9aaacd89c26e2467dfddc203f5781 100644 (file)
@@ -251,6 +251,8 @@ output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
    * (Forcing the upper and lower values to the limits ensures that
    * dithering can't produce a color outside the selected gamut.)
    */
+  (void) cinfo;
+  (void) ci;
   return (int) (((IJG_INT32) j * MAXJSAMPLE + maxj/2) / maxj);
 }
 
@@ -260,6 +262,8 @@ largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
 /* Return largest input value that should map to j'th output value */
 /* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */
 {
+  (void) cinfo;
+  (void) ci;
   /* Breakpoints are halfway between values returned by output_value */
   return (int) (((IJG_INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj));
 }
@@ -740,6 +744,7 @@ alloc_fs_workspace (j_decompress_ptr cinfo)
 METHODDEF(void)
 start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
 {
+  (void) is_pre_scan;
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
   size_t arraysize;
   int i;
@@ -797,6 +802,7 @@ start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
 METHODDEF(void)
 finish_pass_1_quant (j_decompress_ptr cinfo)
 {
+  (void) cinfo;
   /* no work in 1-pass case */
 }
 
index f62a992c734764e3ee7a1db3d0bb4770ca518b64..a30c024664d5126bae47b969e7802196b26f06d1 100644 (file)
@@ -224,6 +224,7 @@ METHODDEF(void)
 prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
           JSAMPARRAY output_buf, int num_rows)
 {
+  (void) output_buf;
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
   register JSAMPROW ptr;
   register histptr histp;
@@ -1155,6 +1156,7 @@ finish_pass1 (j_decompress_ptr cinfo)
 METHODDEF(void)
 finish_pass2 (j_decompress_ptr cinfo)
 {
+  (void) cinfo;
   /* no work */
 }
 
index e3f8f683b22b55ba30ca32f9baad343dda227a0b..acf157af186c6b7b118974066178788ba3d23f6f 100644 (file)
@@ -1,2 +1,67 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(ijg8 jaricom jcapimin jcapistd jcarith jccoefct jccolor jcdctmgr jcdiffct jchuff jcinit jclhuff jclossls jclossy jcmainct jcmarker jcmaster jcodec jcomapi jcparam jcphuff jcpred jcprepct jcsample jcscale jcshuff jctrans jdapimin jdapistd jdarith jdatadst jdatasrc jdcoefct jdcolor jddctmgr jddiffct jdhuff jdinput jdlhuff jdlossls jdlossy jdmainct jdmarker jdmaster jdmerge jdphuff jdpostct jdpred jdsample jdscale jdshuff jdtrans jerror jfdctflt jfdctfst jfdctint jidctflt jidctfst jidctint jidctred jmemmgr jmemnobs jquant1 jquant2 jutils)
+DCMTK_ADD_LIBRARY(ijg8
+  jaricom.c
+  jcapimin.c
+  jcapistd.c
+  jcarith.c
+  jccoefct.c
+  jccolor.c
+  jcdctmgr.c
+  jcdiffct.c
+  jchuff.c
+  jcinit.c
+  jclhuff.c
+  jclossls.c
+  jclossy.c
+  jcmainct.c
+  jcmarker.c
+  jcmaster.c
+  jcodec.c
+  jcomapi.c
+  jcparam.c
+  jcphuff.c
+  jcpred.c
+  jcprepct.c
+  jcsample.c
+  jcscale.c
+  jcshuff.c
+  jctrans.c
+  jdapimin.c
+  jdapistd.c
+  jdarith.c
+  jdatadst.c
+  jdatasrc.c
+  jdcoefct.c
+  jdcolor.c
+  jddctmgr.c
+  jddiffct.c
+  jdhuff.c
+  jdinput.c
+  jdlhuff.c
+  jdlossls.c
+  jdlossy.c
+  jdmainct.c
+  jdmarker.c
+  jdmaster.c
+  jdmerge.c
+  jdphuff.c
+  jdpostct.c
+  jdpred.c
+  jdsample.c
+  jdscale.c
+  jdshuff.c
+  jdtrans.c
+  jerror.c
+  jfdctflt.c
+  jfdctfst.c
+  jfdctint.c
+  jidctflt.c
+  jidctfst.c
+  jidctint.c
+  jidctred.c
+  jmemmgr.c
+  jmemnobs.c
+  jquant1.c
+  jquant2.c
+  jutils.c
+)
index b4576e5dfd132f47eca67a70f4093e09df7658c3..134cce8a6d1beec30b5e5765783a1f6980043b5e 100644 (file)
@@ -204,7 +204,8 @@ jidctred.o: jidctred.c jinclude8.h jconfig8.h \
 jmemmgr.o: jmemmgr.c jinclude8.h jconfig8.h \
  ../../config/include/dcmtk/config/osconfig.h jpeglib8.h jmorecfg8.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h jpegint8.h jerror8.h \
- jmemsys8.h
+ jmemsys8.h ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/constexp.def
 jmemnobs.o: jmemnobs.c jinclude8.h jconfig8.h \
  ../../config/include/dcmtk/config/osconfig.h jpeglib8.h jmorecfg8.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h jpegint8.h jerror8.h \
index 88b13a27a9fd9e572157b7419940a890914fc042..7d374f85aaf8f25ee2c66565214162546ec3b5f9 100644 (file)
@@ -343,6 +343,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 METHODDEF(boolean)
 compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
+  (void)input_buf;
   j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec;
   c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private;
   JDIMENSION MCU_col_num;   /* index of current MCU within row */
@@ -414,7 +415,7 @@ jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer)
   coef = (c_coef_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                 SIZEOF(c_coef_controller));
-  lossyc->coef_private = (struct jpeg_c_coef_controller *) coef;
+  lossyc->coef_private = (void *) coef;
   lossyc->coef_start_pass = start_pass_coef;
 
   /* Create the coefficient buffer. */
index a72fb4457918ce2a43d00013a55ff8c70ebc2011..e9b89888bad39d1aa0a1378651b3b6217e052a84 100644 (file)
@@ -340,6 +340,7 @@ null_convert (j_compress_ptr cinfo,
 METHODDEF(void)
 null_method (j_compress_ptr cinfo)
 {
+  (void) cinfo;
   /* no work needed */
 }
 
index 0e65a30e9b4ec7b04aad54dc5cb8e1e67eb5305e..cb85fc4a2716438ea3d272880b49ed88ce9cc271 100644 (file)
@@ -353,7 +353,7 @@ jinit_forward_dct (j_compress_ptr cinfo)
   fdct = (fdct_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                                SIZEOF(fdct_controller));
-  lossyc->fdct_private = (struct jpeg_forward_dct *) fdct;
+  lossyc->fdct_private = (void *) fdct;
   lossyc->fdct_start_pass = start_pass_fdctmgr;
 
   switch (cinfo->dct_method) {
index 07bd842784b99d763404f4af65adaacc44d28193..5757d986d73eb11d58b824d2bb7531731bcabb9a 100644 (file)
@@ -302,6 +302,7 @@ compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 METHODDEF(boolean)
 compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
+  (void)input_buf;
   j_lossless_c_ptr losslsc = (j_lossless_c_ptr) cinfo->codec;
   c_diff_ptr diff = (c_diff_ptr) losslsc->diff_private;
   /* JDIMENSION MCU_col_num; */ /* index of current MCU within row */
index d53a626ecbb4c42dcbc577e4de8cfa2efd748433..fa9ee6d3de9358bfe33ef882015c43625e10c976 100644 (file)
@@ -569,6 +569,7 @@ finish_pass_gather (j_compress_ptr cinfo)
 METHODDEF(boolean)
 need_optimization_pass (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   return TRUE;
 }
 
@@ -587,7 +588,7 @@ jinit_lhuff_encoder (j_compress_ptr cinfo)
   entropy = (lhuff_entropy_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                 SIZEOF(lhuff_entropy_encoder));
-  losslsc->entropy_private = (struct jpeg_entropy_encoder *) entropy;
+  losslsc->entropy_private = (void *) entropy;
   losslsc->pub.entropy_start_pass = start_pass_huff;
   losslsc->pub.need_optimization_pass = need_optimization_pass;
 
index 05ee5f05e7274b5fe27cec4a558e5aacdd5c4501..660acacf691c9cf5ffededd534dc17ed29df2f23 100644 (file)
@@ -224,6 +224,7 @@ emit_dac (j_compress_ptr cinfo)
 /* Since the useful info is so small, we want to emit all the tables in */
 /* one DAC marker.  Therefore this routine does its own scan of the table. */
 {
+  (void)cinfo;
 #ifdef C_ARITH_CODING_SUPPORTED
   char dc_in_use[NUM_ARITH_TBLS];
   char ac_in_use[NUM_ARITH_TBLS];
index 1bf2edeb29aa6dd888e09c61813e9ec2cd2fe3ed..3f3452a9e2626dc958c4b93195ee5317a8abda50 100644 (file)
@@ -833,7 +833,7 @@ jinit_phuff_encoder (j_compress_ptr cinfo)
   entropy = (phuff_entropy_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                 SIZEOF(phuff_entropy_encoder));
-  lossyc->entropy_private = (struct jpeg_entropy_encoder *) entropy;
+  lossyc->entropy_private = (void *) entropy;
   lossyc->pub.entropy_start_pass = start_pass_phuff;
   lossyc->pub.need_optimization_pass = need_optimization_pass;
 
index 030e10c5bc0201f4bafecac18d3bc5956883b629..cae8a0d89b82af2cc7925f9661eee0609b872e6d 100644 (file)
@@ -213,6 +213,7 @@ jpeg_difference_first_row(j_compress_ptr cinfo, int ci,
          const JSAMPROW input_buf, JSAMPROW prev_row,
          JDIFFROW diff_buf, JDIMENSION width)
 {
+  (void)prev_row;
   DIFFERENCE_1D(INITIAL_PREDICTORx);
 
   /*
index 0ba08333f2a6329aa426195073ae1045827ab7da..e3a2cce05aed02492dc111655df61f9513ad1354 100644 (file)
@@ -74,6 +74,7 @@ typedef my_downsampler * my_downsample_ptr;
 METHODDEF(void)
 start_pass_downsample (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work for now */
 }
 
index 62dc88ed0e796ab89b94f387cd4439bf8cf81e82..74cb34a7c447785d2d3c08ef561515495f64717a 100644 (file)
@@ -34,6 +34,7 @@ METHODDEF(void)
 noscale(j_compress_ptr cinfo,
        JSAMPROW input_buf, JSAMPROW output_buf, JDIMENSION width)
 {
+  (void)cinfo;
   MEMCOPY(output_buf, input_buf, width * SIZEOF(JSAMPLE));
   return;
 }
index b933f4550cb7a5c72417e0591496dc3ade035a93..ca84532ea130727a2d4380dc9be230387eea8f71 100644 (file)
@@ -629,6 +629,7 @@ finish_pass_gather (j_compress_ptr cinfo)
 METHODDEF(boolean)
 need_optimization_pass (j_compress_ptr cinfo)
 {
+  (void)cinfo;
   return TRUE;
 }
 
@@ -647,7 +648,7 @@ jinit_shuff_encoder (j_compress_ptr cinfo)
   entropy = (shuff_entropy_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                                SIZEOF(shuff_entropy_encoder));
-  lossyc->entropy_private = (struct jpeg_entropy_encoder *) entropy;
+  lossyc->entropy_private = (void *) entropy;
   lossyc->pub.entropy_start_pass = start_pass_huff;
   lossyc->pub.need_optimization_pass = need_optimization_pass;
 
index 902401b19ec9fbe808dbe3af3dd360f30e41b616..44822f11bb52fe749dd2821597d9e4b2707e45ac 100644 (file)
@@ -267,6 +267,7 @@ start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode)
 METHODDEF(boolean)
 compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
 {
+  (void)input_buf;
   j_lossy_c_ptr lossyc = (j_lossy_c_ptr) cinfo->codec;
   c_coef_ptr coef = (c_coef_ptr) lossyc->coef_private;
   JDIMENSION MCU_col_num;   /* index of current MCU within row */
@@ -362,7 +363,7 @@ transencode_coef_controller (j_compress_ptr cinfo,
   coef = (c_coef_ptr)
     (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
                 SIZEOF(c_coef_controller));
-  lossyc->coef_private = (struct jpeg_c_coef_controller *) coef;
+  lossyc->coef_private = (void *) coef;
 
   /* Save pointer to virtual arrays */
   coef->whole_image = coef_arrays;
index 7296ff8f0066be36b210a981fa2e4ec6ce82264e..086241d4a7909f52b87dd82d942fa06471554e20 100644 (file)
@@ -168,6 +168,7 @@ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
 METHODDEF(void)
 term_source (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work necessary here */
 }
 
index d950446d8e4753c74c26de9236871f22932d2505..22ae0c1a32d6c97317671efdc7bec2e287b6ac94 100644 (file)
@@ -229,6 +229,7 @@ decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
 METHODDEF(int)
 dummy_consume_data (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   return JPEG_SUSPENDED;    /* Always indicate nothing was done */
 }
 
index 91a679ce6aaf56e3d154881988cfea15c7b1ea8e..668760068c86d426bff5bef88df7289241d01704 100644 (file)
@@ -309,6 +309,7 @@ ycck_cmyk_convert (j_decompress_ptr cinfo,
 METHODDEF(void)
 start_pass_dcolor (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   /* no work needed */
 }
 
index 3988c82d7db15304503e960f90d40ed777c3e33d..2c80b1fa2870823c3716ae3ea441b56800f4bb0c 100644 (file)
@@ -238,6 +238,7 @@ decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
 METHODDEF(int)
 dummy_consume_data (j_decompress_ptr cinfo)
 {
+  (void)cinfo;
   return JPEG_SUSPENDED;    /* Always indicate nothing was done */
 }
 
index dc21e48fad1d2499a58a1842ca002d18af34f5d5..a3370760a196cd7e6dd826c56bd2ce2e498616f2 100644 (file)
@@ -138,7 +138,11 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
     for (i = 0; i < numsymbols; i++) {
       int sym = htbl->huffval[i];
       if (sym < 0 || sym > 16)
+#ifdef DCMTK_ENABLE_STRICT_HUFFMAN_TABLE_CHECK
     ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
+#else
+    TRACEMS1(cinfo, 1, JTRC_UNOPT_HUFF_TABLE, sym);
+#endif
     }
   }
 }
index 22f18e567a7900b20ed86e20b19cf04193ad8667..0c4579db835de1b959aff15699be762177708376 100644 (file)
@@ -344,6 +344,12 @@ get_sos (j_decompress_ptr cinfo)
     
     TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,
          compptr->dc_tbl_no, compptr->ac_tbl_no);
+
+    /* This CSi (cc) should differ from the previous CSi */
+    for (ci = 0; ci < i; ci++) {
+      if (cinfo->cur_comp_info[ci] == compptr)
+        ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
+    }
   }
 
   /* Collect the additional scan parameters Ss, Se, Ah/Al. */
index 1a74ca5e6c48d61d6621ff201579c9a7557cc94e..84f89863e733dea4d2e47f2eacdf4f03a4386a27 100644 (file)
@@ -148,6 +148,7 @@ merged_2v_upsample (j_decompress_ptr cinfo,
             JDIMENSION out_rows_avail)
 /* 2:1 vertical sampling case: may need a spare row. */
 {
+  (void) in_row_groups_avail;
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
   JSAMPROW work_ptrs[2];
   JDIMENSION num_rows;      /* number of rows returned to caller */
@@ -197,6 +198,8 @@ merged_1v_upsample (j_decompress_ptr cinfo,
             JDIMENSION out_rows_avail)
 /* 1:1 vertical sampling case: much easier, never need a spare row. */
 {
+  (void) in_row_groups_avail;
+  (void) out_rows_avail;
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
 
   /* Just do the upsampling. */
index 2804cbb19885837526c86b8222edb68eb938c427..2313bcc3e25051a4752e39debade617a5ee1e625 100644 (file)
@@ -161,6 +161,8 @@ post_process_prepass (j_decompress_ptr cinfo,
               JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
               JDIMENSION out_rows_avail)
 {
+  (void) output_buf;
+  (void) out_rows_avail;
   my_post_ptr post = (my_post_ptr) cinfo->post;
   JDIMENSION old_next_row, num_rows;
 
@@ -205,6 +207,9 @@ post_process_2pass (j_decompress_ptr cinfo,
             JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
             JDIMENSION out_rows_avail)
 {
+  (void) input_buf;
+  (void) in_row_group_ctr;
+  (void) in_row_groups_avail;
   my_post_ptr post = (my_post_ptr) cinfo->post;
   JDIMENSION num_rows, max_rows;
 
index a4f336da59cbe787283226a678a0c9d01e0e4127..1ad0faed12a989978982e84e502e5ba2d0c8ee50 100644 (file)
@@ -101,6 +101,8 @@ jpeg_undifference1(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   UNDIFFERENCE_1D(INITIAL_PREDICTOR2);
 }
 
@@ -109,6 +111,8 @@ jpeg_undifference2(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   UNDIFFERENCE_2D(PREDICTOR2);
   JPEG_UNUSED(Rc);
   JPEG_UNUSED(Rb);
@@ -119,6 +123,8 @@ jpeg_undifference3(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   UNDIFFERENCE_2D(PREDICTOR3);
   JPEG_UNUSED(Rc);
   JPEG_UNUSED(Rb);
@@ -129,6 +135,8 @@ jpeg_undifference4(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   UNDIFFERENCE_2D(PREDICTOR4);
   JPEG_UNUSED(Rc);
   JPEG_UNUSED(Rb);
@@ -139,6 +147,8 @@ jpeg_undifference5(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR5);
   JPEG_UNUSED(Rc);
@@ -150,6 +160,8 @@ jpeg_undifference6(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR6);
   JPEG_UNUSED(Rc);
@@ -161,6 +173,8 @@ jpeg_undifference7(j_decompress_ptr cinfo, int comp_index,
            const JDIFFROW diff_buf, const JDIFFROW prev_row,
            JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)cinfo;
+  (void)comp_index;
   SHIFT_TEMPS
   UNDIFFERENCE_2D(PREDICTOR7);
   JPEG_UNUSED(Rc);
@@ -180,6 +194,7 @@ jpeg_undifference_first_row(j_decompress_ptr cinfo, int comp_index,
                 const JDIFFROW diff_buf, JDIFFROW prev_row,
                 JDIFFROW undiff_buf, JDIMENSION width)
 {
+  (void)prev_row;
   j_lossless_d_ptr losslsd = (j_lossless_d_ptr) cinfo->codec;
 
   UNDIFFERENCE_1D(INITIAL_PREDICTORx);
index 024f29663b638178f2bdc33edcf050ceba2a7a1c..a94e405b5dccef5b3d594124423fa3afa38be6f1 100644 (file)
@@ -92,6 +92,7 @@ sep_upsample (j_decompress_ptr cinfo,
           JSAMPARRAY output_buf, JDIMENSION *out_row_ctr,
           JDIMENSION out_rows_avail)
 {
+  (void)in_row_groups_avail;
   my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
   int ci;
   jpeg_component_info * compptr;
@@ -157,6 +158,8 @@ METHODDEF(void)
 fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
            JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)cinfo;
+  (void)compptr;
   *output_data_ptr = input_data;
 }
 
@@ -170,6 +173,9 @@ METHODDEF(void)
 noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
            JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)cinfo;
+  (void)compptr;
+  (void)input_data;
   *output_data_ptr = NULL;  /* safety check */
 }
 
@@ -233,6 +239,7 @@ METHODDEF(void)
 h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
            JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)compptr;
   JSAMPARRAY output_data = *output_data_ptr;
   register JSAMPROW inptr, outptr;
   register JSAMPLE invalue;
@@ -261,6 +268,7 @@ METHODDEF(void)
 h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
            JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
 {
+  (void)compptr;
   JSAMPARRAY output_data = *output_data_ptr;
   register JSAMPROW inptr, outptr;
   register JSAMPLE invalue;
index a83f7d16740fc24e487575293686022d2931c443..7935f965c898e356f0899c4d4860713b6569e977 100644 (file)
@@ -67,6 +67,7 @@ noscale(j_decompress_ptr cinfo,
        const JDIFFROW diff_buf, JSAMPROW output_buf,
        JDIMENSION width)
 {
+  (void)cinfo;
   unsigned int xindex;
 
   for (xindex = 0; xindex < width; xindex++)
index d90bd1c184c3b6e343ce0282c40b6366d5d7c5ea..31b5453e6d421a35ba3dd804dadee3538c4f0d28 100644 (file)
@@ -181,6 +181,7 @@ JMESSAGE(JTRC_UNKNOWN_LOSSLESS_IDS,
         "Unrecognized component IDs %d %d %d, assuming RGB")
 JMESSAGE(JTRC_UNKNOWN_LOSSY_IDS,
         "Unrecognized component IDs %d %d %d, assuming YCbCr")
+JMESSAGE(JTRC_UNOPT_HUFF_TABLE, "Symbol %d indicates un-optimized Huffman table")
 JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u")
 JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u")
 JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d")
index c0ed424859b22b95b992e9c73fc4bccda724aa1d..841ba1aa647d93bbf53a852f26d71d9cae33220e 100644 (file)
@@ -29,6 +29,7 @@
 #include "jinclude8.h"
 #include "jpeglib8.h"
 #include "jmemsys8.h"       /* import the system-dependent declarations */
+#include "dcmtk/ofstd/ofdiag.h"      /* for DCMTK_DIAGNOSTIC macros */
 
 #ifndef NO_GETENV
 #ifndef HAVE_STDLIB_H       /* <stdlib.h> should declare getenv() */
@@ -483,8 +484,6 @@ alloc_barray (j_common_ptr cinfo, int pool_id,
 }
 
 
-#ifdef NEED_DARRAY
-
 /*
  * Creation of 2-D difference arrays.
  * This is essentially the same as the code for sample arrays, above.
@@ -532,7 +531,6 @@ alloc_darray (j_common_ptr cinfo, int pool_id,
   return result;
 }
 
-#endif
 
 
 /*
@@ -1071,6 +1069,7 @@ self_destruct (j_common_ptr cinfo)
   jpeg_mem_term(cinfo);     /* system-dependent cleanup */
 }
 
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
 
 /*
  * Memory manager initialization.
@@ -1121,9 +1120,7 @@ jinit_memory_mgr (j_common_ptr cinfo)
   mem->pub.alloc_large = alloc_large;
   mem->pub.alloc_sarray = alloc_sarray;
   mem->pub.alloc_barray = alloc_barray;
-#ifdef NEED_DARRAY
   mem->pub.alloc_darray = alloc_darray;
-#endif
   mem->pub.request_virt_sarray = request_virt_sarray;
   mem->pub.request_virt_barray = request_virt_barray;
   mem->pub.realize_virt_arrays = realize_virt_arrays;
@@ -1172,3 +1169,4 @@ jinit_memory_mgr (j_common_ptr cinfo)
 #endif
 
 }
+
index 78ae56f7f7ce46cedc7da1e0aa0187e38924c83d..c3db495fd015b492fa5e092457fc63217e739a10 100644 (file)
@@ -34,12 +34,15 @@ extern void free JPP((void *ptr));
 GLOBAL(void *)
 jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject)
 {
+  (void) cinfo;
   return (void *) malloc(sizeofobject);
 }
 
 GLOBAL(void)
 jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 {
+  (void) cinfo;
+  (void) sizeofobject;
   free(object);
 }
 
@@ -54,14 +57,16 @@ jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject)
 GLOBAL(void FAR *)
 jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject)
 {
+  (void) cinfo;
   return (void FAR *) malloc(sizeofobject);
 }
 
 GLOBAL(void)
 jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject)
 {
-
-       free(object);
+  (void) cinfo;
+  (void) sizeofobject;
+  free(object);
 }
 
 
@@ -74,6 +79,9 @@ GLOBAL(long)
 jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed,
                    long max_bytes_needed, long already_allocated)
 {
+  (void) cinfo;
+  (void) min_bytes_needed;
+  (void) already_allocated;
   return max_bytes_needed;
 }
 
@@ -88,6 +96,8 @@ GLOBAL(void)
 jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
                         long total_bytes_needed)
 {
+  (void) info;
+  (void) total_bytes_needed;
   ERREXIT(cinfo, JERR_NO_BACKING_STORE);
 }
 
@@ -100,11 +110,13 @@ jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info,
 GLOBAL(long)
 jpeg_mem_init (j_common_ptr cinfo)
 {
+  (void) cinfo;
   return 0;                    /* just set max_memory_to_use to 0 */
 }
 
 GLOBAL(void)
 jpeg_mem_term (j_common_ptr cinfo)
 {
+  (void) cinfo;
   /* no work */
 }
index 3cb2bf180f09a473c9b60ec249b3c3846d121118..c0bbe91514820159bd34921c0726b41b7ef03b3f 100644 (file)
@@ -780,14 +780,6 @@ typedef struct jvirt_sarray_control * jvirt_sarray_ptr;
 typedef struct jvirt_barray_control * jvirt_barray_ptr;
 
 
-#ifdef C_LOSSLESS_SUPPORTED
-#define NEED_DARRAY
-#else
-#ifdef D_LOSSLESS_SUPPORTED
-#define NEED_DARRAY
-#endif
-#endif
-
 struct jpeg_memory_mgr {
   /* Method pointers */
   JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id,
@@ -800,11 +792,9 @@ struct jpeg_memory_mgr {
   JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id,
                                      JDIMENSION blocksperrow,
                                      JDIMENSION numrows));
-#ifdef NEED_DARRAY
   JMETHOD(JDIFFARRAY, alloc_darray, (j_common_ptr cinfo, int pool_id,
                                     JDIMENSION diffsperrow,
                                     JDIMENSION numrows));
-#endif
   JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo,
                                                  int pool_id,
                                                  boolean pre_zero,
index 90a209c129b003edc4de8ec3a81ee6c7059ba0f4..64b200ce9a2e18290ab980c6daf9ac130c5d96da 100644 (file)
@@ -251,6 +251,8 @@ output_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
    * (Forcing the upper and lower values to the limits ensures that
    * dithering can't produce a color outside the selected gamut.)
    */
+  (void) cinfo;
+  (void) ci;
   return (int) (((IJG_INT32) j * MAXJSAMPLE + maxj/2) / maxj);
 }
 
@@ -260,6 +262,8 @@ largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj)
 /* Return largest input value that should map to j'th output value */
 /* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */
 {
+  (void) cinfo;
+  (void) ci;
   /* Breakpoints are halfway between values returned by output_value */
   return (int) (((IJG_INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj));
 }
@@ -740,6 +744,7 @@ alloc_fs_workspace (j_decompress_ptr cinfo)
 METHODDEF(void)
 start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
 {
+  (void) is_pre_scan;
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
   size_t arraysize;
   int i;
@@ -797,6 +802,7 @@ start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan)
 METHODDEF(void)
 finish_pass_1_quant (j_decompress_ptr cinfo)
 {
+  (void) cinfo;
   /* no work in 1-pass case */
 }
 
index 96c87e6c27a70a654457dbc9f8d6f5d464ef6b28..ccabc6dd388f42950efdf78cad1b3b063179b712 100644 (file)
@@ -224,6 +224,7 @@ METHODDEF(void)
 prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
           JSAMPARRAY output_buf, int num_rows)
 {
+  (void) output_buf;
   my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
   register JSAMPROW ptr;
   register histptr histp;
@@ -1155,6 +1156,7 @@ finish_pass1 (j_decompress_ptr cinfo)
 METHODDEF(void)
 finish_pass2 (j_decompress_ptr cinfo)
 {
+  (void) cinfo;
   /* no work */
 }
 
index a4a8a60b8ae3b1ecb44f2175dac15b05c47ae274..a393efa6882a6e1bca5d8be4a96d1535eaf7e885 100644 (file)
@@ -2,6 +2,35 @@
 include_directories("${dcmjpeg_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" "${dcmjpeg_SOURCE_DIR}/libijg8" "${dcmjpeg_SOURCE_DIR}/libijg12" "${dcmjpeg_SOURCE_DIR}/libijg16" ${ZLIB_INCDIR})
 
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmjpeg ddpiimpl dipijpeg djcodecd djcodece djcparam djdecbas djdecext djdeclol djdecode djdecpro djdecsps djdecsv1 djdijg12 djdijg8 djdijg16 djeijg12 djeijg8 djeijg16 djencbas djencext djenclol djencode djencpro djencsps djencsv1 djrplol djrploss djutils)
+DCMTK_ADD_LIBRARY(dcmjpeg
+  ddpiimpl.cc
+  dipijpeg.cc
+  djcodecd.cc
+  djcodece.cc
+  djcparam.cc
+  djdecbas.cc
+  djdecext.cc
+  djdeclol.cc
+  djdecode.cc
+  djdecpro.cc
+  djdecsps.cc
+  djdecsv1.cc
+  djdijg12.cc
+  djdijg8.cc
+  djdijg16.cc
+  djeijg12.cc
+  djeijg8.cc
+  djeijg16.cc
+  djencbas.cc
+  djencext.cc
+  djenclol.cc
+  djencode.cc
+  djencpro.cc
+  djencsps.cc
+  djencsv1.cc
+  djrplol.cc
+  djrploss.cc
+  djutils.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmjpeg ofstd oflog dcmdata dcmimgle dcmimage ijg8 ijg12 ijg16)
index b06231256398329c767d41f0053becaa258d5552..dc5c0e28a962907a6c0bae18c7775cc988a6f09f 100644 (file)
@@ -152,9 +152,14 @@ dipijpeg.o: dipijpeg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmjpeg/dipijpeg.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diplugin.h \
  ../include/dcmtk/dcmjpeg/djutils.h ../include/dcmtk/dcmjpeg/djdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../dcmjpeg/libijg8/jpeglib8.h ../../dcmjpeg/libijg8/jconfig8.h \
  ../../dcmjpeg/libijg8/jmorecfg8.h ../../dcmjpeg/libijg8/jerror8.h \
- ../../dcmjpeg/libijg8/jpegint8.h ../../dcmjpeg/libijg8/jversion8.h
+ ../../dcmjpeg/libijg8/jpegint8.h ../../dcmjpeg/libijg8/jversion8.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def
 djcodecd.o: djcodecd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmjpeg/djcodecd.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -822,8 +827,13 @@ djdijg12.o: djdijg12.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../dcmjpeg/libijg12/jpeglib12.h ../../dcmjpeg/libijg12/jconfig12.h \
- ../../dcmjpeg/libijg12/jmorecfg12.h ../../dcmjpeg/libijg12/jerror12.h
+ ../../dcmjpeg/libijg12/jmorecfg12.h ../../dcmjpeg/libijg12/jerror12.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def
 djdijg16.o: djdijg16.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmjpeg/djdijg16.h ../include/dcmtk/dcmjpeg/djdecabs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -872,8 +882,13 @@ djdijg16.o: djdijg16.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../dcmjpeg/libijg16/jpeglib16.h ../../dcmjpeg/libijg16/jconfig16.h \
- ../../dcmjpeg/libijg16/jmorecfg16.h ../../dcmjpeg/libijg16/jerror16.h
+ ../../dcmjpeg/libijg16/jmorecfg16.h ../../dcmjpeg/libijg16/jerror16.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def
 djdijg8.o: djdijg8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmjpeg/djdijg8.h ../include/dcmtk/dcmjpeg/djdecabs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -922,8 +937,13 @@ djdijg8.o: djdijg8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../dcmjpeg/libijg8/jpeglib8.h ../../dcmjpeg/libijg8/jconfig8.h \
- ../../dcmjpeg/libijg8/jmorecfg8.h ../../dcmjpeg/libijg8/jerror8.h
+ ../../dcmjpeg/libijg8/jmorecfg8.h ../../dcmjpeg/libijg8/jerror8.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def
 djeijg12.o: djeijg12.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmjpeg/djeijg12.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
@@ -973,9 +993,14 @@ djeijg12.o: djeijg12.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../dcmjpeg/libijg12/jpeglib12.h ../../dcmjpeg/libijg12/jconfig12.h \
  ../../dcmjpeg/libijg12/jmorecfg12.h ../../dcmjpeg/libijg12/jerror12.h \
- ../../dcmjpeg/libijg12/jpegint12.h
+ ../../dcmjpeg/libijg12/jpegint12.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def
 djeijg16.o: djeijg16.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmjpeg/djeijg16.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
@@ -1025,9 +1050,14 @@ djeijg16.o: djeijg16.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../dcmjpeg/libijg16/jpeglib16.h ../../dcmjpeg/libijg16/jconfig16.h \
  ../../dcmjpeg/libijg16/jmorecfg16.h ../../dcmjpeg/libijg16/jerror16.h \
- ../../dcmjpeg/libijg16/jpegint16.h
+ ../../dcmjpeg/libijg16/jpegint16.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def
 djeijg8.o: djeijg8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmjpeg/djeijg8.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
@@ -1077,9 +1107,14 @@ djeijg8.o: djeijg8.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../dcmjpeg/libijg8/jpeglib8.h ../../dcmjpeg/libijg8/jconfig8.h \
  ../../dcmjpeg/libijg8/jmorecfg8.h ../../dcmjpeg/libijg8/jerror8.h \
- ../../dcmjpeg/libijg8/jpegint8.h
+ ../../dcmjpeg/libijg8/jpegint8.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsobjdes.def
 djencbas.o: djencbas.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmjpeg/djencbas.h ../include/dcmtk/dcmjpeg/djcodece.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
index 9f38c031edf6a6d1753168fd070b20879eb4ff34..1fee5dd24a8e828f13b51312f3705872ed35c7df 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2014, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dctypes.h"
 #include "dcmtk/dcmimgle/diimage.h"
 #include "dcmtk/dcmjpeg/dipijpeg.h"
-
-#define INCLUDE_CSETJMP
-#define INCLUDE_CSTDIO
 #include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/ofstd/ofdiag.h"
+#include <csetjmp>
 
 BEGIN_EXTERN_C
 #define boolean ijg_boolean
@@ -42,11 +41,12 @@ BEGIN_EXTERN_C
 #undef const
 #endif
 
-#ifdef USE_STD_CXX_INCLUDES
 // Solaris defines longjmp() in namespace std, other compilers don't...
-namespace std { }
-using namespace std;
-#endif
+using STD_NAMESPACE longjmp;
+using STD_NAMESPACE jmp_buf;
+
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING
 
 // private error handler struct
 struct DIEIJG8ErrorStruct
@@ -59,6 +59,8 @@ struct DIEIJG8ErrorStruct
     const DiJPEGPlugin *instance;
 };
 
+#include DCMTK_DIAGNOSTIC_POP
+
 // callback forward declarations
 void DIEIJG8ErrorExit(j_common_ptr);
 void DIEIJG8OutputMessage(j_common_ptr cinfo);
@@ -137,6 +139,8 @@ void DiJPEGPlugin::outputMessage(void *arg) const
     }
 }
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING
 
 int DiJPEGPlugin::write(DiImage *image,
                         FILE *stream,
@@ -239,6 +243,8 @@ int DiJPEGPlugin::write(DiImage *image,
     return result;
 }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 
 OFString DiJPEGPlugin::getLibraryVersionString()
 {
index b052e0d52f5edce785a82e1a7e3b8330e948445f..45c447639b34b644be41f96653d648f1a1d1d5ba 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2020, OFFIS e.V.
+ *  Copyright (C) 2001-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -47,9 +47,7 @@
 // dcmimgle includes
 #include "dcmtk/dcmimgle/dcmimage.h"  /* for class DicomImage */
 
-#define INCLUDE_CMATH
-#include "dcmtk/ofstd/ofstdinc.h"
-
+#include <cmath>
 
 DJCodecEncoder::DJCodecEncoder()
 : DcmCodec()
@@ -174,16 +172,17 @@ OFCondition DJCodecEncoder::encode(
         // YCbCr color image
         result = encodeColorImage(OFTrue, OFreinterpret_cast(DcmItem*, dataset), toRepParam, pixSeq, djcp, compressionRatio);
         break;
-      case EPI_Unknown:
-        // unknown color model - bail out
-        result = EJ_UnsupportedPhotometricInterpretation;
-        break;
       case EPI_Missing:
         // photometric interpretation missing. If ACR-NEMA compatibility is activated, we treat this as MONOCHOME2, otherwise we report an error
         if (djcp->getAcrNemaCompatibility())
             result = encodeMonochromeImage(OFreinterpret_cast(DcmItem*, dataset), toRepParam, pixSeq, djcp, compressionRatio);
             else result = EJ_UnsupportedPhotometricInterpretation;
         break;
+      case EPI_Unknown:
+      default:
+        // unknown color model - bail out
+        result = EJ_UnsupportedPhotometricInterpretation;
+        break;
     }
 
     // the following operations do not affect the Image Pixel Module
@@ -491,7 +490,7 @@ OFCondition DJCodecEncoder::encodeTrueLossless(
   {
     DcmItem *datsetItem = OFreinterpret_cast(DcmItem*, dataset);
     double compressionRatio = 0.0;
-    const Uint16* pixelData;
+    const Uint16* pixelData = NULL;
     size_t length = 0;
     Uint16 bitsAllocated = 0;
     Uint16 bitsStored = 0;
@@ -508,7 +507,7 @@ OFCondition DJCodecEncoder::encodeTrueLossless(
     OFBool planConfSwitched = OFFalse; // true if planar configuration was toggled
     DcmOffsetList offsetList;
     OFString photometricInterpretation;
-    DcmElement *dummyElem;
+    DcmElement *dummyElem = NULL;
 
     // get relevant attributes for encoding from dataset
     result = datsetItem->findAndGetUint16(DCM_BitsStored, bitsStored);
@@ -523,7 +522,8 @@ OFCondition DJCodecEncoder::encodeTrueLossless(
     if (result.good())
     {
       result = datsetItem->findAndGetSint32(DCM_NumberOfFrames, numberOfFrames);
-      if (result.bad() || numberOfFrames < 1) numberOfFrames = 1;
+      if (result.bad() || numberOfFrames < 1)
+        numberOfFrames = 1;
       result = EC_Normal;
     }
     if (result.bad())
@@ -544,7 +544,7 @@ OFCondition DJCodecEncoder::encodeTrueLossless(
     }
 
     // make sure that all the descriptive attributes have sensible values
-    if ((columns < 1)||(rows < 1)||(samplesPerPixel < 1))
+    if ((columns < 1) || (rows < 1) || (samplesPerPixel < 1))
     {
       DCMJPEG_ERROR("True lossless encoder: Invalid attribute values in pixel module");
       return EC_CannotChangeRepresentation;
@@ -574,10 +574,10 @@ OFCondition DJCodecEncoder::encodeTrueLossless(
       interpr = EPI_Unknown;
 
     // IJG libs need "color by pixel", transform if required
-    if (result.good() && (samplesPerPixel > 1) )
+    if (result.good() && (samplesPerPixel > 1))
     {
       result = datsetItem->findAndGetUint16(DCM_PlanarConfiguration, planarConfiguration);
-      if ( result.good() && (planarConfiguration == 1) )
+      if (result.good() && (planarConfiguration == 1))
       {
         if (bytesAllocated == 1)
           result = togglePlanarConfiguration8(OFreinterpret_cast(Uint8*, OFconst_cast(Uint16*, pixelData)), length, samplesPerPixel, OFstatic_cast(Uint16, 1) /* switch to "by pixel"*/);
@@ -603,7 +603,7 @@ OFCondition DJCodecEncoder::encodeTrueLossless(
     if ((gLocalByteOrder == EBO_BigEndian) && (bitsAllocated == 8))
     {
       result = swapIfNecessary(EBO_LittleEndian, gLocalByteOrder, OFconst_cast(Uint16*, pixelData), OFstatic_cast(Uint32, length), sizeof(Uint16));
-      if ( result.bad() )
+      if (result.bad())
       {
         DCMJPEG_ERROR("True lossless encoder: Unable to swap bytes to respect local byte ordering");
         return EC_CannotChangeRepresentation;
@@ -617,13 +617,16 @@ OFCondition DJCodecEncoder::encodeTrueLossless(
     if (result.good())
     {
       pixelSequence = new DcmPixelSequence(DCM_PixelSequenceTag);
-      if (pixelSequence == NULL) result = EC_MemoryExhausted;
+      if (pixelSequence == NULL)
+        result = EC_MemoryExhausted;
       else
       {
         // create empty offset table
         offsetTable = new DcmPixelItem(DCM_PixelItemTag);
-        if (offsetTable == NULL) result = EC_MemoryExhausted;
-        else pixelSequence->insert(offsetTable);
+        if (offsetTable == NULL)
+          result = EC_MemoryExhausted;
+        else
+          pixelSequence->insert(offsetTable);
       }
     }
 
@@ -638,7 +641,7 @@ OFCondition DJCodecEncoder::encodeTrueLossless(
     if (jpeg)
     {
       // main loop for compression: compress each frame
-      for (unsigned int i=0; i<frameCount && result.good(); i++)
+      for (unsigned int i = 0; i < frameCount && result.good(); i++)
       {
         if (bitsAllocated == 8)
         {
@@ -649,8 +652,8 @@ OFCondition DJCodecEncoder::encodeTrueLossless(
           jpeg->encode(columns, rows, interpr, samplesPerPixel, OFreinterpret_cast(Uint16*, OFconst_cast(Uint8*, framePointer)), jpegData, jpegLen);
         }
         // update variables
-        compressedSize+=jpegLen;
-        framePointer+=frameSize;
+        compressedSize += jpegLen;
+        framePointer += frameSize;
         if (jpegLen == 0)
         {
           DCMJPEG_ERROR("True lossless encoder: Error encoding frame");
@@ -678,7 +681,7 @@ OFCondition DJCodecEncoder::encodeTrueLossless(
       delete pixelSequence;
     delete jpeg; // encoder no longer in use
 
-    if ((result.good()) && (djcp->getCreateOffsetTable()))
+    if (result.good() && djcp->getCreateOffsetTable())
     {
       // create offset table
       result = offsetTable->createOffsetTable(offsetList);
@@ -688,30 +691,34 @@ OFCondition DJCodecEncoder::encodeTrueLossless(
     // but other modules such as SOP Common.  We only perform these
     // changes if we're on the main level of the datsetItem,
     // which should always identify itself as datsetItem, not as item.
-
-    // update derivation description reflecting the JPEG compression applied
-    result = updateDerivationDescription(datsetItem, toRepParam, djcp, OFstatic_cast(Uint8, bitsAllocated), compressionRatio);
-
-    if ( (datsetItem->ident() == EVR_dataset) && result.good() )
+    if (datsetItem->ident() == EVR_dataset)
     {
-      // convert to Secondary Capture if requested by user.
-      // This method creates a new SOP class UID, so it should be executed
-      // after the call to newInstance() which creates a Source Image Sequence.
-      if ( djcp->getConvertToSC() || (djcp->getUIDCreation() == EUC_always) )
+      if (result.good())
+      {
+        // update derivation description reflecting the JPEG compression applied
+        result = updateDerivationDescription(datsetItem, toRepParam, djcp, OFstatic_cast(Uint8, bitsAllocated), compressionRatio);
+      }
+      if (result.good())
       {
-        if (djcp->getConvertToSC())
+        // convert to Secondary Capture if requested by user.
+        // This method creates a new SOP class UID, so it should be executed
+        // after the call to newInstance() which creates a Source Image Sequence.
+        if (djcp->getConvertToSC() || (djcp->getUIDCreation() == EUC_always))
         {
-          result = DcmCodec::convertToSecondaryCapture(datsetItem);
+          if (djcp->getConvertToSC())
+          {
+            result = DcmCodec::convertToSecondaryCapture(datsetItem);
+          }
+          // update image type (set to DERIVED)
+          if (result.good())
+            result = DcmCodec::updateImageType(datsetItem);
+          if (result.good())
+            result = DcmCodec::newInstance(OFreinterpret_cast(DcmItem*, datsetItem), "DCM", "121320", "Uncompressed predecessor");
         }
-        // update image type (set to DERIVED)
-        if (result.good())
-          result = DcmCodec::updateImageType(datsetItem);
-        if (result.good())
-          result = DcmCodec::newInstance(OFreinterpret_cast(DcmItem*, datsetItem), "DCM", "121320", "Uncompressed predecessor");
       }
     }
     // switch _original_ pixel data back to "color by plane", if required
-    if (planConfSwitched)
+    if (result.good() && planConfSwitched)
     {
       if (bytesAllocated == 1)
         result = togglePlanarConfiguration8(OFreinterpret_cast(Uint8*, OFconst_cast(Uint16*, pixelData)), length, samplesPerPixel, OFstatic_cast(Uint16, 0) /*switch to "by plane"*/);
index a4f7382e6ca908e132bad607caf5babd76335133..36e45ee5a3c73b7c94d70451360498f76c8f3f64 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2014, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmjpeg/djdijg12.h"
 #include "dcmtk/dcmjpeg/djcparam.h"
 #include "dcmtk/dcmdata/dcerror.h"
-
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSETJMP
-#define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/ofstd/ofdiag.h"
+#include <csetjmp>
 
 // These two macros are re-defined in the IJG header files.
 // We undefine them here and hope that IJG's configure has
@@ -50,11 +48,12 @@ BEGIN_EXTERN_C
 #undef const
 #endif
 
-#ifdef USE_STD_CXX_INCLUDES
 // Solaris defines longjmp() in namespace std, other compilers don't...
-namespace std { }
-using namespace std;
-#endif
+using STD_NAMESPACE longjmp;
+using STD_NAMESPACE jmp_buf;
+
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING
 
 // private error handler struct
 struct DJDIJG12ErrorStruct
@@ -69,6 +68,8 @@ struct DJDIJG12ErrorStruct
   DJDecompressIJG12Bit *instance;
 };
 
+#include DCMTK_DIAGNOSTIC_POP
+
 // private source manager struct
 struct DJDIJG12SourceManagerStruct
 {
@@ -202,6 +203,8 @@ DJDecompressIJG12Bit::~DJDecompressIJG12Bit()
   cleanup();
 }
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING
 
 OFCondition DJDecompressIJG12Bit::init()
 {
@@ -449,6 +452,8 @@ OFCondition DJDecompressIJG12Bit::decode(
   return EC_Normal;
 }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 void DJDecompressIJG12Bit::emitMessage(int msg_level) const
 {
   // This is how we map the message levels:
index 4eb139dc0439f41633579b8577ad1a398ae4b477..561297339f8f024c1c13d89320b52782237c623f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2018, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmjpeg/djdijg16.h"
 #include "dcmtk/dcmjpeg/djcparam.h"
 #include "dcmtk/dcmdata/dcerror.h"
-
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSETJMP
-#define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/ofstd/ofdiag.h"
+#include <csetjmp>
 
 // These two macros are re-defined in the IJG header files.
 // We undefine them here and hope that IJG's configure has
@@ -50,11 +48,12 @@ BEGIN_EXTERN_C
 #undef const
 #endif
 
-#ifdef USE_STD_CXX_INCLUDES
 // Solaris defines longjmp() in namespace std, other compilers don't...
-namespace std { }
-using namespace std;
-#endif
+using STD_NAMESPACE longjmp;
+using STD_NAMESPACE jmp_buf;
+
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING
 
 // private error handler struct
 struct DJDIJG16ErrorStruct
@@ -69,6 +68,8 @@ struct DJDIJG16ErrorStruct
   DJDecompressIJG16Bit *instance;
 };
 
+#include DCMTK_DIAGNOSTIC_POP
+
 // private source manager struct
 struct DJDIJG16SourceManagerStruct
 {
@@ -202,6 +203,8 @@ DJDecompressIJG16Bit::~DJDecompressIJG16Bit()
   cleanup();
 }
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING
 
 OFCondition DJDecompressIJG16Bit::init()
 {
@@ -452,6 +455,8 @@ OFCondition DJDecompressIJG16Bit::decode(
   return EC_Normal;
 }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 void DJDecompressIJG16Bit::emitMessage(int msg_level) const
 {
   // This is how we map the message levels:
index b8ad8d3a51c3e50a1ae331fca01b2ce2797d0e6a..79730b739b5a8bed4a22118e7c3cb1d447ceac7a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2014, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmjpeg/djdijg8.h"
 #include "dcmtk/dcmjpeg/djcparam.h"
 #include "dcmtk/dcmdata/dcerror.h"
-
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSETJMP
-#define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/ofstd/ofdiag.h"
+#include <csetjmp>
 
 // These two macros are re-defined in the IJG header files.
 // We undefine them here and hope that IJG's configure has
@@ -50,11 +48,13 @@ BEGIN_EXTERN_C
 #undef const
 #endif
 
-#ifdef USE_STD_CXX_INCLUDES
 // Solaris defines longjmp() in namespace std, other compilers don't...
-namespace std { }
-using namespace std;
-#endif
+using STD_NAMESPACE longjmp;
+using STD_NAMESPACE jmp_buf;
+
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING
 
 // private error handler struct
 struct DJDIJG8ErrorStruct
@@ -69,6 +69,8 @@ struct DJDIJG8ErrorStruct
   DJDecompressIJG8Bit *instance;
 };
 
+#include DCMTK_DIAGNOSTIC_POP
+
 // private source manager struct
 struct DJDIJG8SourceManagerStruct
 {
@@ -202,6 +204,8 @@ DJDecompressIJG8Bit::~DJDecompressIJG8Bit()
   cleanup();
 }
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING
 
 OFCondition DJDecompressIJG8Bit::init()
 {
@@ -449,6 +453,8 @@ OFCondition DJDecompressIJG8Bit::decode(
   return EC_Normal;
 }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 void DJDecompressIJG8Bit::emitMessage(int msg_level) const
 {
   // This is how we map the message levels:
index c5c12aee51c9f1aaa56edd79759204d19ebde0ff..9ff7292d870020a947d1321cd92751e60d3a4ff6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2018, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmjpeg/djeijg12.h"
 #include "dcmtk/dcmjpeg/djcparam.h"
 #include "dcmtk/dcmdata/dcerror.h"
-
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSETJMP
-#define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/ofstd/ofdiag.h"
+#include <csetjmp>
 
 // These two macros are re-defined in the IJG header files.
 // We undefine them here and hope that IJG's configure has
@@ -54,11 +52,12 @@ BEGIN_EXTERN_C
 #undef const
 #endif
 
-#ifdef USE_STD_CXX_INCLUDES
 // Solaris defines longjmp() in namespace std, other compilers don't...
-namespace std { }
-using namespace std;
-#endif
+using STD_NAMESPACE longjmp;
+using STD_NAMESPACE jmp_buf;
+
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING
 
 // private error handler struct
 struct DJEIJG12ErrorStruct
@@ -73,6 +72,8 @@ struct DJEIJG12ErrorStruct
   DJCompressIJG12Bit *instance;
 };
 
+#include DCMTK_DIAGNOSTIC_POP
+
 // callback forward declarations
 void DJEIJG12ErrorExit(j_common_ptr);
 void DJEIJG12EmitMessage(j_common_ptr cinfo, int msg_level);
@@ -336,6 +337,9 @@ OFCondition DJCompressIJG12Bit::encode(
   return EC_IllegalCall;
 }
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING
+
 OFCondition DJCompressIJG12Bit::encode(
   Uint16 columns,
   Uint16 rows,
@@ -488,6 +492,8 @@ OFCondition DJCompressIJG12Bit::encode(
   return EC_Normal;
 }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 void DJCompressIJG12Bit::initDestination(jpeg_compress_struct *cinfo)
 {
   cleanup(); // erase old list of compressed blocks, if any
index a85c176c87f6fb538a23de0002d59c75eecadfc4..68ea601ee29c307da32f1b6b6dec34aa51a60ef7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2018, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmjpeg/djeijg16.h"
 #include "dcmtk/dcmjpeg/djcparam.h"
 #include "dcmtk/dcmdata/dcerror.h"
-
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSETJMP
-#define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/ofstd/ofdiag.h"
+#include <csetjmp>
 
 // These two macros are re-defined in the IJG header files.
 // We undefine them here and hope that IJG's configure has
@@ -54,11 +52,13 @@ BEGIN_EXTERN_C
 #undef const
 #endif
 
-#ifdef USE_STD_CXX_INCLUDES
 // Solaris defines longjmp() in namespace std, other compilers don't...
-namespace std { }
-using namespace std;
-#endif
+using STD_NAMESPACE longjmp;
+using STD_NAMESPACE jmp_buf;
+
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING
 
 // private error handler struct
 struct DJEIJG16ErrorStruct
@@ -73,6 +73,8 @@ struct DJEIJG16ErrorStruct
   DJCompressIJG16Bit *instance;
 };
 
+#include DCMTK_DIAGNOSTIC_POP
+
 // callback forward declarations
 void DJEIJG16ErrorExit(j_common_ptr);
 void DJEIJG16EmitMessage(j_common_ptr cinfo, int msg_level);
@@ -181,6 +183,9 @@ OFCondition DJCompressIJG16Bit::encode(
   return EC_IllegalCall;
 }
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING
+
 OFCondition DJCompressIJG16Bit::encode(
   Uint16 columns,
   Uint16 rows,
@@ -324,6 +329,8 @@ OFCondition DJCompressIJG16Bit::encode(
   return EC_Normal;
 }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 void DJCompressIJG16Bit::initDestination(jpeg_compress_struct *cinfo)
 {
   cleanup(); // erase old list of compressed blocks, if any
index 77420938b451a8631029ceef163b02c4da5ad483..c5f40bf95f3f60d1ce8b6a42172494a85f847b5a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2018, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmjpeg/djeijg8.h"
 #include "dcmtk/dcmjpeg/djcparam.h"
 #include "dcmtk/dcmdata/dcerror.h"
-
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSETJMP
-#define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/ofstd/ofdiag.h"
+#include <csetjmp>
 
 // These two macros are re-defined in the IJG header files.
 // We undefine them here and hope that IJG's configure has
@@ -54,11 +52,12 @@ BEGIN_EXTERN_C
 #undef const
 #endif
 
-#ifdef USE_STD_CXX_INCLUDES
 // Solaris defines longjmp() in namespace std, other compilers don't...
-namespace std { }
-using namespace std;
-#endif
+using STD_NAMESPACE longjmp;
+using STD_NAMESPACE jmp_buf;
+
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING
 
 // private error handler struct
 struct DJEIJG8ErrorStruct
@@ -73,6 +72,8 @@ struct DJEIJG8ErrorStruct
   DJCompressIJG8Bit *instance;
 };
 
+#include DCMTK_DIAGNOSTIC_POP
+
 // callback forward declarations
 void DJEIJG8ErrorExit(j_common_ptr);
 void DJEIJG8EmitMessage(j_common_ptr cinfo, int msg_level);
@@ -337,6 +338,9 @@ OFCondition DJCompressIJG8Bit::encode(
   return EC_IllegalCall;
 }
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING
+
 OFCondition DJCompressIJG8Bit::encode(
   Uint16 columns,
   Uint16 rows,
@@ -490,6 +494,8 @@ OFCondition DJCompressIJG8Bit::encode(
   return EC_Normal;
 }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 void DJCompressIJG8Bit::initDestination(jpeg_compress_struct *cinfo)
 {
   cleanup(); // erase old list of compressed blocks, if any
index 968b9eae0a550ff272e9c7b15c72a7ff7c58a63f..87e1c8d22794c2ef777b585aabbafabd7b0ed0b5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2019, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -24,9 +24,6 @@
 #include "dcmtk/dcmdata/dcdeftag.h"  /* for tag constants */
 #include "dcmtk/dcmdata/dcitem.h"    /* for class DcmItem */
 
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 OFLogger DCM_dcmjpegLogger = OFLog::getLogger("dcmtk.dcmjpeg");
 
 makeOFConditionConst(EJ_Suspension,                           OFM_dcmjpeg,  1, OF_error, "IJG codec suspension return"  );
index 0cb3f53ed1eb1925017fe79875fc50fc05f23ce1..f55910465860f6f23d968e6e57384357d4a5897d 100644 (file)
@@ -3,7 +3,7 @@ include_directories("${dcmjpls_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include
 
 # declare executables
 foreach(PROGRAM dcmcjpls dcmdjpls dcml2pnm)
-  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM})
+  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc)
 endforeach()
 
 # make sure executables are linked to the corresponding libraries
index 3877ad97cd14cdcbfb541281e9a0472672ed645d..93c2a2f297f4ec7dc0cc78ea7b616fe4d763bc59 100644 (file)
@@ -1,5 +1,4 @@
 dcmcjpls.o: dcmcjpls.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -8,6 +7,7 @@ dcmcjpls.o: dcmcjpls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -127,7 +127,6 @@ dcmcjpls.o: dcmcjpls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dccodec.h \
  ../include/dcmtk/dcmjpls/djrparam.h
 dcmdjpls.o: dcmdjpls.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -136,6 +135,7 @@ dcmdjpls.o: dcmdjpls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -254,7 +254,6 @@ dcmdjpls.o: dcmdjpls.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmjpls/djdecode.h
 dcml2pnm.o: dcml2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \
  ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -263,6 +262,7 @@ dcml2pnm.o: dcml2pnm.cc ../../dcmimage/apps/dcm2pnm.cc \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
index b1f3eafea661fc8a2e4e76366f6dc0cb65ae47de..85f18eacafc7220975b7d1039b3a936c1575e16c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2020, OFFIS e.V.
+ *  Copyright (C) 2007-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
@@ -447,7 +442,7 @@ LICENSE_FILE_EVALUATE_COMMAND_LINE_OPTIONS
       OFLOG_INFO(dcmcjplsLogger, "DICOM file is already compressed, converting to uncompressed transfer syntax first");
       if (EC_Normal != dataset->chooseRepresentation(EXS_LittleEndianExplicit, NULL))
       {
-        OFLOG_FATAL(dcmcjplsLogger, "No conversion from compressed original to uncompressed transfer syntax possible!");
+        OFLOG_FATAL(dcmcjplsLogger, "no conversion from compressed original to uncompressed transfer syntax possible");
         return 1;
       }
     }
@@ -463,7 +458,7 @@ LICENSE_FILE_EVALUATE_COMMAND_LINE_OPTIONS
         }
     }
 
-    OFLOG_INFO(dcmcjplsLogger, "Convert DICOM file to compressed transfer syntax");
+    OFLOG_INFO(dcmcjplsLogger, "converting DICOM file to compressed transfer syntax");
 
     //create representation parameter
     DJLSRepresentationParameter rp(OFstatic_cast(Uint16, opt_nearlossless_deviation), opt_useLosslessProcess);
@@ -478,9 +473,9 @@ LICENSE_FILE_EVALUATE_COMMAND_LINE_OPTIONS
     }
     if (dataset->canWriteXfer(opt_oxfer))
     {
-      OFLOG_INFO(dcmcjplsLogger, "Output transfer syntax " << opt_oxferSyn.getXferName() << " can be written");
+      OFLOG_INFO(dcmcjplsLogger, "output transfer syntax " << opt_oxferSyn.getXferName() << " can be written");
     } else {
-      OFLOG_FATAL(dcmcjplsLogger, "No conversion to transfer syntax " << opt_oxferSyn.getXferName() << " possible!");
+      OFLOG_FATAL(dcmcjplsLogger, "no conversion to transfer syntax " << opt_oxferSyn.getXferName() << " possible");
       return 1;
     }
 
index df0ac974fdf445fc49cb6cd09f41606a760b69fa..4e9169264926aa54d8bab11800c4dacdd6660110 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2020, OFFIS e.V.
+ *  Copyright (C) 2007-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/ofstd/ofconapp.h"
@@ -303,7 +298,7 @@ LICENSE_FILE_EVALUATE_COMMAND_LINE_OPTIONS
     {
       OFLOG_FATAL(dcmdjplsLogger, error.text() << ": decompressing file: " <<  opt_ifname);
       if (error == EC_CannotChangeRepresentation)
-        OFLOG_FATAL(dcmdjplsLogger, "Input transfer syntax " << original_xfer.getXferName() << " not supported");
+        OFLOG_FATAL(dcmdjplsLogger, "input transfer syntax " << original_xfer.getXferName() << " not supported");
       return 1;
     }
 
index bf16e4c34785e26649c7d7e39957f343fd37912b..614c464918030d0619d08b86187cdb8cada54e37 100644 (file)
@@ -183,7 +183,6 @@ JPEG-LS padding of odd-length bitstreams:
   # end of image segment marker, i.e. FF D9 00. This is not DICOM conformant
   # but required for interoperability with the HP LOCO reference implementation,
   # which does not support extended JPEG-LS bitstreams.
-
 \endverbatim
 
 \subsection dcmcjpls_enc_pix_data_encoding_opt encapsulated pixel data encoding options
@@ -235,7 +234,7 @@ SOP Instance UID:
   +ud  --uid-default
          assign new UID if lossy compression (default)
 
-  # Assigns a new SOP instance UID if the compression is lossy JPEG.
+  # Assigns a new SOP instance UID if the compression is lossy JPEG-LS.
 
   +ua  --uid-always
          always assign new UID
@@ -388,6 +387,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmcjpls_copyright COPYRIGHT
 
-Copyright (C) 2009-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2009-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 81a1a6b9f507c18e8e7a6ac8a63189fb53b56eb2..f8e6510b1fdeaada59500b7239e534a1f8999d84 100644 (file)
@@ -280,6 +280,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmdjpls_copyright COPYRIGHT
 
-Copyright (C) 2009-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2009-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index e9b379673308e98d3729fd12871a71fa1db36e60..99c69c3d8bd64a11b4185bee4940c6a9fd6e411e 100644 (file)
@@ -404,8 +404,7 @@ The following preferred interpolation algorithms can be selected using the
 The \e --write-tiff option is only available when DCMTK has been configured
 and compiled with support for the external \b libtiff TIFF library.  The
 availability of the TIFF compression options depends on the \b libtiff
-configuration.  In particular, the patented LZW algorithm may not be
-available.
+configuration.
 
 The \e --write-png option is only available when DCMTK has been configured
 and compiled with support for the external \b libpng PNG library.  Option
@@ -498,6 +497,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcml2pnm_copyright COPYRIGHT
 
-Copyright (C) 2001-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2001-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index ae0c01728790429bd836dbc39993271bf3e164c8..9a50cee36d7d928512c04d19e8c94b56fa4fd2c5 100644 (file)
@@ -2,6 +2,10 @@
 include_directories("${dcmjpls_SOURCE_DIR}/libcharls" "${ofstd_SOURCE_DIR}/include")
 
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmtkcharls header intrface jpegls)
+DCMTK_ADD_LIBRARY(dcmtkcharls
+  header.cc
+  intrface.cc
+  jpegls.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmtkcharls ofstd oflog)
index 1f5dcd41f58f5b714997be92bcaba1eb4d3fcaa9..9a43fa22b935ece5dded02bc841bfd974bfb2b30 100644 (file)
@@ -1,28 +1,28 @@
 header.o: header.cc config.h util.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../config/include/dcmtk/config/osconfig.h pubtypes.h header.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h pubtypes.h header.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h streams.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h decodstr.h procline.h \
  clrtrans.h encodstr.h
 intrface.o: intrface.cc config.h util.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../config/include/dcmtk/config/osconfig.h pubtypes.h intrface.h \
- ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h pubtypes.h intrface.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -35,19 +35,24 @@ intrface.o: intrface.cc config.h util.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h
 jpegls.o: jpegls.cc config.h util.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../config/include/dcmtk/config/osconfig.h pubtypes.h streams.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h pubtypes.h streams.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h header.h \
  ../../ofstd/include/dcmtk/ofstd/ofmem.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h decodstr.h \
  procline.h clrtrans.h encodstr.h context.h ctxtrmod.h lokuptbl.h \
- lltraits.h deftrait.h scan.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
- ../../ofstd/include/dcmtk/ofstd/oflist.h
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/memacces.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def lltraits.h deftrait.h \
+ scan.h ../../ofstd/include/dcmtk/ofstd/ofmap.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/constexp.def
index 433206c14ee951a9b712de2637defdb16b3a0a7b..1f3dfa33301e6f6c57487f92395e97477df26ca1 100644 (file)
@@ -14,9 +14,8 @@
 #    define assert(t) { }
 #  endif
 #else
-#define INCLUDE_CASSERT
-#include "dcmtk/ofstd/ofstdinc.h"
-#define ASSERT(t) assert(t)
+  #include <cassert>
+ #define ASSERT(t) assert(t)
 #endif
 
 #if defined(_WIN32)
index 7c49e8f0665514c0d1967b348c84a383c4bf12a1..f49770051b0ed28601baecce0faeb3194f423f1f 100644 (file)
@@ -5,9 +5,6 @@
 #ifndef CHARLS_ENCODERSTRATEGY
 #define CHARLS_ENCODERSTRATEGY
 
-#define INCLUDE_NEW
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofmem.h"
 #include "dcmtk/ofstd/ofbmanip.h"
 #include "procline.h"
index b37d104f084a8cdb080bf535b185c4b1a14e25c2..76cfa9368c677023dbca6aa7d02ba088ecdce7aa 100644 (file)
@@ -5,6 +5,7 @@
 
 #ifndef CHARLS_LOOKUPTABLE
 #define CHARLS_LOOKUPTABLE
+#include "dcmtk/ofstd/ofdiag.h"
 
 // Tables for fast decoding of short Golomb Codes. 
 
@@ -37,11 +38,16 @@ public:
 
        enum { cbit = 8 } ;
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_CLASS_MEMACCESS_WARNING
+
        CTable() 
        {
                ::memset(rgtype, 0, sizeof(rgtype));
        }
 
+#include DCMTK_DIAGNOSTIC_POP
+
        void AddEntry(BYTE bvalue, Code c);
        
        inlinehint const Code& Get(LONG value)
index 0cee4d4a2969de67aabdf51d0b08777b0a99a591..b4dea20d8de786ec50056a6d3f6bf873f6c8a79a 100644 (file)
@@ -7,16 +7,13 @@
 
 #include "dcmtk/ofstd/ofmap.h"   /* For OFPair */
 #include "dcmtk/ofstd/oftypes.h" /* For OFTypename */
+#include "dcmtk/ofstd/ofdiag.h"
 
 #include "lokuptbl.h"
 
 // This file contains the code for handling a "scan". Usually an image is encoded as a single scan. 
 
-
-#ifdef _MSC_VER
-#pragma warning (disable: 4127)
-#endif
-
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
 
 extern CTable decodingTables[16];
 extern OFVector<signed char> rgquant8Ll;
index a2ef422c87d4159db887adb512689121140def49..1e7f123bce4349a60672834ba61c6b4fc9e004f4 100644 (file)
@@ -4,9 +4,6 @@
 #ifndef CHARLS_STREAMS
 #define CHARLS_STREAMS
 
-#define INCLUDE_NEW
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofvector.h"
 #include "dcmtk/ofstd/ofbmanip.h"
 #include "util.h"
index 4b39704f645f32a72f67a5efa92d7e4acc9413c6..5c937bbebd7795ff7e4cd9376b5721ee90b040c1 100644 (file)
@@ -6,8 +6,9 @@
 #ifndef CHARLS_UTIL
 #define CHARLS_UTIL
 
-#define INCLUDE_CSTDDEF
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cstddef>
+#include "dcmtk/ofstd/oftypes.h"
+
 #include "pubtypes.h"
 
 #ifndef MAX
index bd928f8298df0ae56fee1f3804d5f2bacfa9828e..efe322c13dfc62f58ff9728dfec6a9b36c9412f9 100644 (file)
@@ -2,6 +2,14 @@
 include_directories("${dcmjpls_SOURCE_DIR}/include" "${ofstd_SOURCE_DIR}/include" "${oflog_SOURCE_DIR}/include" "${dcmdata_SOURCE_DIR}/include" "${dcmimgle_SOURCE_DIR}/include" "${dcmimage_SOURCE_DIR}/include" "${dcmjpls_SOURCE_DIR}/libcharls" ${ZLIB_INCDIR})
 
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmjpls djcparam djdecode djencode djrparam djcodecd djutils djcodece)
+DCMTK_ADD_LIBRARY(dcmjpls
+  djcparam.cc
+  djdecode.cc
+  djencode.cc
+  djrparam.cc
+  djcodecd.cc
+  djutils.cc
+  djcodece.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmjpls ofstd oflog dcmdata dcmimgle dcmimage dcmtkcharls)
index fc0df5c7f2bf60730e80638aef3491fcbc292804..e33199e8d3a8ce44ccf23b93cf7c6123f8889773 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2020, OFFIS e.V.
+ *  Copyright (C) 2007-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -180,7 +180,7 @@ OFCondition DJLSDecoderBase::decode(
       {
         // frame is incomplete. Nevertheless skip to next frame.
         // This permits decompression of faulty multi-frame images.
-        DCMJPLS_WARN("JPEG-LS bitstream invalid or incomplete, ignoring (but image is likely to be incomplete).");
+        DCMJPLS_WARN("JPEG-LS bitstream invalid or incomplete, ignoring (but image is likely to be incomplete)");
         result = EC_Normal;
       }
 
@@ -286,7 +286,7 @@ OFCondition DJLSDecoderBase::decodeFrame(
   if (result.good())
   {
     // We got all the data we need from the dataset, let's start decoding
-    DCMJPLS_DEBUG("Starting to decode frame " << frameNo << " with fragment " << currentItem);
+    DCMJPLS_DEBUG("starting to decode frame " << frameNo << " with fragment " << currentItem);
     result = decodeFrame(fromPixSeq, djcp, dataset, frameNo, currentItem, buffer, bufSize,
         imageFrames, imageColumns, imageRows, imageSamplesPerPixel, bytesPerSample);
   }
@@ -336,12 +336,15 @@ OFCondition DJLSDecoderBase::decodeFrame(
 
   if (imageSamplesPerPixel > 1)
   {
+    // get planar configuration from dataset
+    imagePlanarConfiguration = 2; // invalid value
+    // warn on invalid value; should we also warn on missing attribute or value?
+    if (dataset->findAndGetUint16(DCM_PlanarConfiguration, imagePlanarConfiguration).good() && (imagePlanarConfiguration != 0))
+      DCMJPLS_WARN("invalid value for PlanarConfiguration " << DCM_PlanarConfiguration << ", should be \"0\"");
+
     switch (cp->getPlanarConfiguration())
     {
       case EJLSPC_restore:
-        // get planar configuration from dataset
-        imagePlanarConfiguration = 2; // invalid value
-        dataset->findAndGetUint16(DCM_PlanarConfiguration, imagePlanarConfiguration);
         // determine auto default if not found or invalid
         if (imagePlanarConfiguration > 1)
           imagePlanarConfiguration = determinePlanarConfiguration(imageSopClass, imagePhotometricInterpretation);
@@ -428,11 +431,15 @@ OFCondition DJLSDecoderBase::decodeFrame(
 
       if (result.good() && imageSamplesPerPixel == 3)
       {
+        if (params.colorTransform != 0)
+        {
+          DCMJPLS_WARN("Color Transformation " << params.colorTransform << " is a non-standard HP/JPEG-LS extension");
+        }
         if (imagePlanarConfiguration == 1 && params.ilv != ILV_NONE)
         {
           // The dataset says this should be planarConfiguration == 1, but
           // it isn't -> convert it.
-          DCMJPLS_WARN("different planar configuration in JPEG stream, converting to \"1\"");
+          DCMJPLS_DEBUG("different planar configuration in JPEG-LS bitstream, converting to \"1\"");
           if (bytesPerSample == 1)
             result = createPlanarConfiguration1Byte(OFreinterpret_cast(Uint8*, buffer), imageColumns, imageRows);
           else
@@ -442,7 +449,7 @@ OFCondition DJLSDecoderBase::decodeFrame(
         {
           // The dataset says this should be planarConfiguration == 0, but
           // it isn't -> convert it.
-          DCMJPLS_WARN("different planar configuration in JPEG stream, converting to \"0\"");
+          DCMJPLS_DEBUG("different planar configuration in JPEG-LS bitstream, converting to \"0\"");
           if (bytesPerSample == 1)
             result = createPlanarConfiguration0Byte(OFreinterpret_cast(Uint8*, buffer), imageColumns, imageRows);
           else
index 5e82662783eea2726e69c61c3caeff6d5a552786..ee5efc80108cab625292bea40851bb5f4c63841b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2007-2020, OFFIS e.V.
+ *  Copyright (C) 2007-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -29,9 +29,6 @@
 #include "dcmtk/ofstd/offile.h"      /* for class OFFile */
 #include "dcmtk/ofstd/ofbmanip.h"
 
-#define INCLUDE_CMATH
-#include "dcmtk/ofstd/ofstdinc.h"
-
 // dcmdata includes
 #include "dcmtk/dcmdata/dcdatset.h"  /* for class DcmDataset */
 #include "dcmtk/dcmdata/dcdeftag.h"  /* for tag constants */
@@ -722,7 +719,7 @@ OFCondition DJLSEncoderBase::compressRawFrame(
   if ((jls_params.ilv == ILV_NONE && (ilv == ILV_SAMPLE || ilv == ILV_LINE)) ||
       (ilv == ILV_NONE && (jls_params.ilv == ILV_SAMPLE || jls_params.ilv == ILV_LINE)))
   {
-    DCMJPLS_DEBUG("Converting image from " << (ilv == ILV_NONE ? "color-by-plane" : "color-by-pixel")
+    DCMJPLS_DEBUG("converting image from " << (ilv == ILV_NONE ? "color-by-plane" : "color-by-pixel")
           << " to " << (jls_params.ilv == ILV_NONE ? "color-by-plane" : "color-by-pixel"));
 
     frameBuffer = new Uint8[frameSize];
@@ -784,7 +781,7 @@ OFCondition DJLSEncoderBase::losslessCookedEncode(
   if (result.good()) result = dataset->findAndGetUint16(DCM_BitsAllocated, bitsAllocated);
   if (result.bad()) return result;
 
-  // The cooked encoder only handles the following photometic interpretations
+  // The cooked encoder only handles the following photometric interpretations
   if (photometricInterpretation != "MONOCHROME1" &&
       photometricInterpretation != "MONOCHROME2" &&
       photometricInterpretation != "RGB" &&
@@ -822,12 +819,12 @@ OFCondition DJLSEncoderBase::losslessCookedEncode(
 
   if (bitsStored > 16)
   {
-    DCMJPLS_WARN("Cannot compress image with " << bitsStored << " bits/sample: JPEG-LS supports max. 16 bits.");
+    DCMJPLS_WARN("cannot compress image with " << bitsStored << " bits/sample: JPEG-LS supports max. 16 bits");
     return EC_JLSUnsupportedBitDepth;
   }
   if (bitsStored < 2)
   {
-    DCMJPLS_WARN("Cannot compress image with " << bitsStored << " bit/sample: JPEG-LS requires at least 2 bits.");
+    DCMJPLS_WARN("cannot compress image with " << bitsStored << " bit/sample: JPEG-LS requires at least 2 bits");
     return EC_JLSUnsupportedBitDepth;
   }
 
@@ -920,8 +917,8 @@ OFCondition DJLSEncoderBase::losslessCookedEncode(
         result = dataset->putAndInsertUint16(DCM_BitsAllocated, 16);
       else
         result = dataset->putAndInsertUint16(DCM_BitsAllocated, 8);
-    if (result.good()) result = dataset->putAndInsertUint16(DCM_BitsStored, bitsPerSample);
-    if (result.good()) result = dataset->putAndInsertUint16(DCM_HighBit, bitsPerSample-1);
+    if (result.good()) result = dataset->putAndInsertUint16(DCM_BitsStored, OFstatic_cast(Uint16, bitsPerSample));
+    if (result.good()) result = dataset->putAndInsertUint16(DCM_HighBit, OFstatic_cast(Uint16, (bitsPerSample-1)));
     if (result.good())
     {
       if (photometricInterpretation == "RGB" || photometricInterpretation == "YBR_FULL")
@@ -1103,7 +1100,7 @@ OFCondition DJLSEncoderBase::compressCookedFrame(
   // Unset: jls_params.jfif (thumbnail, dpi)
 
   // set parameters T1, T2, T3, MAXVAL and RESET
-  setCustomParameters(jls_params.custom, depth, nearLosslessDeviation, djcp);
+  setCustomParameters(jls_params.custom, OFstatic_cast(Uint16, depth), nearLosslessDeviation, djcp);
 
   switch (djcp->getJplsInterleaveMode())
   {
@@ -1138,7 +1135,7 @@ OFCondition DJLSEncoderBase::compressCookedFrame(
   // Do we have to convert the image to color-by-plane now?
   if (jls_params.ilv == ILV_NONE && jls_params.components != 1)
   {
-    DCMJPLS_DEBUG("Converting image from color-by-pixel to color-by-plane");
+    DCMJPLS_DEBUG("converting image from color-by-pixel to color-by-plane");
 
     frameBuffer = new Uint8[buffer_size];
     framePointer = frameBuffer;
@@ -1178,7 +1175,7 @@ OFCondition DJLSEncoderBase::convertToUninterleaved(
     Uint32 height,
     Uint16 bitsAllocated) const
 {
-  Uint8 bytesAllocated = bitsAllocated / 8;
+  Uint8 bytesAllocated = OFstatic_cast(Uint8, (bitsAllocated / 8));
   Uint32 planeSize = width * height * bytesAllocated;
 
   if (bitsAllocated % 8 != 0)
@@ -1203,7 +1200,7 @@ OFCondition DJLSEncoderBase::convertToSampleInterleaved(
     Uint32 height,
     Uint16 bitsAllocated) const
 {
-  Uint8 bytesAllocated = bitsAllocated / 8;
+  Uint8 bytesAllocated = OFstatic_cast(Uint8, (bitsAllocated / 8));
   Uint32 planeSize = width * height * bytesAllocated;
 
   if (bitsAllocated % 8 != 0)
index 6ab669f207d4268d29b51ea5379046b01e1c8b5d..48061ecf1b1630ec82771fed5a8d167a7e54ee64 100644 (file)
@@ -3,7 +3,7 @@ include_directories("${dcmjpls_SOURCE_DIR}/include" "${dcmjpeg_SOURCE_DIR}/inclu
 
 # declare executables
 foreach(PROGRAM dcmrecv dcmsend echoscu findscu getscu movescu storescp storescu termscu)
-  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM})
+  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc)
 endforeach()
 
 # declare installation files
index 167ad9d0bf826033d6f6624d90b5dd674b5fc31c..379abb288d90165436c8444e272bf2d94987afd1 100644 (file)
@@ -121,8 +121,7 @@ dcmrecv.o: dcmrecv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrov.h \
  ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h ../include/dcmtk/dcmnet/dndefine.h \
- ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
+ ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.h \
@@ -130,7 +129,12 @@ dcmrecv.o: dcmrecv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
  ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
  ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h
+ ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../../dcmtls/include/dcmtk/dcmtls/tlsopt.h \
+ ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \
+ ../include/dcmtk/dcmnet/dcmlayer.h \
+ ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \
+ ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h
 dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
@@ -255,8 +259,7 @@ dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dndefine.h \
  ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/assoc.h \
  ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
- ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
+ ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
@@ -275,11 +278,11 @@ dcmsend.o: dcmsend.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmjpeg/include/dcmtk/dcmjpeg/dipijpeg.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/diplugin.h
 echoscu.o: echoscu.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -290,7 +293,6 @@ echoscu.o: echoscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -338,7 +340,6 @@ echoscu.o: echoscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dcmtrans.h \
- ../include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
@@ -351,6 +352,7 @@ echoscu.o: echoscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofexit.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsopt.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \
+ ../include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h
 findscu.o: findscu.cc ../../config/include/dcmtk/config/osconfig.h \
@@ -399,7 +401,6 @@ findscu.o: findscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
@@ -418,7 +419,7 @@ findscu.o: findscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
- ../include/dcmtk/dcmnet/diutil.h \
+ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dcmtrans.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
@@ -556,8 +557,7 @@ getscu.o: getscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dndefine.h \
  ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/assoc.h \
  ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
- ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
+ ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
@@ -567,13 +567,13 @@ getscu.o: getscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrmz.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpath.h
 movescu.o: movescu.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -592,7 +592,6 @@ movescu.o: movescu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -646,13 +645,13 @@ movescu.o: movescu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrmz.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h
 storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -667,6 +666,7 @@ storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/ofexit.h \
+ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
  ../../ofstd/include/dcmtk/ofstd/ofdate.h \
  ../../ofstd/include/dcmtk/ofstd/oftime.h ../include/dcmtk/dcmnet/dicom.h \
@@ -674,7 +674,6 @@ storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -716,8 +715,7 @@ storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dcmtrans.h \
- ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/dcasccfg.h \
- ../include/dcmtk/dcmnet/dccftsmp.h \
+ ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
  ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
@@ -734,16 +732,17 @@ storescp.o: storescp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsopt.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \
+ ../include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h
 storescu.o: storescu.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -762,7 +761,6 @@ storescu.o: storescu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -804,8 +802,7 @@ storescu.o: storescu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dcmtrans.h \
- ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/dcasccfg.h \
- ../include/dcmtk/dcmnet/dccftsmp.h \
+ ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
  ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
@@ -822,15 +819,16 @@ storescu.o: storescu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsopt.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \
+ ../include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h
 termscu.o: termscu.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -854,7 +852,6 @@ termscu.o: termscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
index 428bacded042b28f0170e638c51d2486e03bcd28..483699f1a43168069a1bd66ae0ad0f3536649d35 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmnet/dimse.h"
 #include "dcmtk/dcmnet/diutil.h"
 #include "dcmtk/dcmnet/dcmtrans.h"    /* for dcmSocketSend/ReceiveTimeout */
@@ -128,7 +122,7 @@ main(int argc, char *argv[])
   OFOStringStream optStream;
   int result = EXITCODE_NO_ERROR;
 
-  const char *     opt_peer                = NULL;
+  const char *     opt_peer                = "localhost";
   OFCmdUnsignedInt opt_port                = 104;
   const char *     opt_peerTitle           = PEERAPPLICATIONTITLE;
   const char *     opt_ourTitle            = APPLICATIONTITLE;
@@ -141,7 +135,6 @@ main(int argc, char *argv[])
   int              opt_acse_timeout        = 30;
   OFCmdSignedInt   opt_socket_timeout      = 60;
   DcmTLSOptions    tlsOptions(NET_REQUESTOR);
-
   T_ASC_Network *net;
   T_ASC_Parameters *params;
   DIC_NODENAME peerHost;
@@ -196,6 +189,12 @@ main(int argc, char *argv[])
     // add TLS specific command line options if (and only if) we are compiling with OpenSSL
     tlsOptions.addTLSCommandlineOptions(cmd);
 
+#ifdef WITH_OPENSSL
+    cmd.addSubGroup("offline certificate verification:");
+      cmd.addOption("--verify-cert",   "+vc",   1, "[f]ilename: string", "verify certificate against CA settings", OFCommandLine::AF_Exclusive);
+      cmd.addOption("--is-root-cert",  "+rc",   1, "[f]ilename: string", "check if certificate is self-signed root CA", OFCommandLine::AF_Exclusive);
+#endif
+
     /* evaluate command line */
     prepareCmdLineArgs(argc, argv, OFFIS_CONSOLE_APPLICATION);
     if (app.parseCommandLine(cmd, argc, argv))
@@ -230,8 +229,18 @@ main(int argc, char *argv[])
 
       /* command line parameters */
 
+#ifdef WITH_OPENSSL
+      // special handling for the exclusive options that can only be evaluated
+      // once all other options have been processed
+      if ((! cmd.findOption("--verify-cert")) && (! cmd.findOption("--is-root-cert")))
+      {
+        cmd.getParam(1, opt_peer);
+        app.checkParam(cmd.getParamAndCheckMinMax(2, opt_port, 1, 65535));
+      }
+#else
       cmd.getParam(1, opt_peer);
       app.checkParam(cmd.getParamAndCheckMinMax(2, opt_port, 1, 65535));
+#endif
 
       OFLog::configureFromCommandLine(cmd, app);
 
@@ -308,6 +317,45 @@ main(int argc, char *argv[])
         exit(1);
     }
 
+#ifdef WITH_OPENSSL
+    if (cmd.findOption( "--verify-cert" ))
+    {
+        const char *cert_filename = NULL;
+        app.checkValue( cmd.getValue( cert_filename ) );
+
+        cond = tlsOptions.verifyClientCertificate(cert_filename);
+        if (cond.good())
+        {
+          COUT << "Verification of certificate '" << cert_filename << "' passed." << OFendl;
+          return EXITCODE_NO_ERROR;
+        }
+        else
+        {
+          COUT << "Verification of certificate '" << cert_filename << "' failed." << OFendl;
+          return EXITCODE_INVALID_INPUT_FILE;
+        }
+    }
+
+    if (cmd.findOption( "--is-root-cert" ))
+    {
+        const char *cert_filename = NULL;
+        app.checkValue( cmd.getValue( cert_filename ) );
+
+        cond = tlsOptions.isRootCertificate(cert_filename);
+        if (cond.good())
+        {
+          COUT << "Certificate '" << cert_filename << "' is a valid, self-signed root CA." << OFendl;
+          return EXITCODE_NO_ERROR;
+        }
+        else
+        {
+          COUT << "Certificate '" << cert_filename << "' is not a valid, self-signed root CA." << OFendl;
+          return EXITCODE_INVALID_INPUT_FILE;
+        }
+    }
+
+#endif
+
 #ifdef PRIVATE_ECHOSCU_CODE
     PRIVATE_ECHOSCU_CODE
 #endif
@@ -326,8 +374,8 @@ main(int argc, char *argv[])
     int presentationContextID = 1; /* odd byte value 1, 3, 5, .. 255 */
     for (unsigned long ii=0; ii<opt_numPresentationCtx; ii++)
     {
-        cond = ASC_addPresentationContext(params, presentationContextID, UID_VerificationSOPClass,
-                 transferSyntaxes, OFstatic_cast(int, opt_numXferSyntaxes));
+        cond = ASC_addPresentationContext(params, OFstatic_cast(T_ASC_PresentationContextID, presentationContextID), 
+                 UID_VerificationSOPClass, transferSyntaxes, OFstatic_cast(int, opt_numXferSyntaxes));
         presentationContextID += 2;
         if (cond.bad())
         {
index da3e5d0abbfa0c75dd37b7859613c0361e3fbad3..d1306f236aaefb89c7af63c2957a4f57eaa741e3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -77,7 +77,7 @@ int main(int argc, char *argv[])
     OFCmdUnsignedInt      opt_maxReceivePDULength = ASC_DEFAULTMAXPDU;
     E_TransferSyntax      opt_networkTransferSyntax = EXS_Unknown;
     const char *          opt_ourTitle = APPLICATIONTITLE;
-    const char *          opt_peer;
+    const char *          opt_peer = NULL;
     const char *          opt_peerTitle = PEERAPPLICATIONTITLE;
     OFCmdUnsignedInt      opt_port = 104;
     OFCmdUnsignedInt      opt_repeatCount = 1;
index 55f2486b41584139f18b0bc9892c71f11dd43030..4aee0a7c74c645746cfaec0b0171b213a58f2eda 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2011-2019, OFFIS e.V.
+ *  Copyright (C) 2011-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -80,7 +80,7 @@ static void applyOverrideKeys(DcmDataset *dataset);
 int
 main(int argc, char *argv[])
 {
-  const char *opt_peer;
+  const char *opt_peer = NULL;
   OFCmdUnsignedInt opt_port = 104;;
   const char *opt_peerTitle = PEERAPPLICATIONTITLE;
   const char *opt_ourTitle = APPLICATIONTITLE;
index eadbcc429d49f799b764d18db91423057bb389e4..40f41674c0c443a8b5afc6f7c6e2d028047d81d9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#define INCLUDE_CERRNO
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/ofconapp.h"
 #include "dcmtk/dcmnet/dicom.h"
@@ -180,7 +174,7 @@ addOverrideKey(OFConsoleApplication& app, const char *s)
       if (eqPos != OFString_npos)
         valStr = toParse.substr(eqPos+1,toParse.length());
     }
-    DcmTag tag(g,e);
+    DcmTag tag(OFstatic_cast(Uint16, g), OFstatic_cast(Uint16, e));
     if (tag.error() != EC_Normal) {
         sprintf(msg2, "unknown tag: (%04x,%04x)", g, e);
         app.printError(msg2);
@@ -222,7 +216,7 @@ int
 main(int argc, char *argv[])
 {
   T_ASC_Parameters *params = NULL;
-  const char *opt_peer;
+  const char *opt_peer = NULL;
   OFCmdUnsignedInt opt_port = 104;
   DIC_NODENAME peerHost;
   T_ASC_Association *assoc = NULL;
index 78ff9608cdabecd526a62631e1a6363f15d92faf..434c406b24c9478a6e8d23d9098a88803a28ff86 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#define INCLUDE_CCTYPE
-#define INCLUDE_CSIGNAL
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_STAT_H
 #include <sys/stat.h>
@@ -41,12 +34,15 @@ BEGIN_EXTERN_C
 #endif
 END_EXTERN_C
 
+#include <cerrno>
+
 #ifdef HAVE_WINDOWS_H
 #include <direct.h>      /* for _mkdir() */
 #endif
 
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/ofconapp.h"
+#include "dcmtk/ofstd/ofbmanip.h"       /* for OFBitmanipTemplate */
 #include "dcmtk/ofstd/ofdatime.h"
 #include "dcmtk/dcmnet/dicom.h"         /* for DICOM_APPLICATION_ACCEPTOR */
 #include "dcmtk/dcmnet/dimse.h"
@@ -1871,24 +1867,31 @@ storeSCPCallback(
           // create subdirectoryPathAndName (string with full path to new subdirectory)
           OFStandard::combineDirAndFilename(subdirectoryPathAndName, OFStandard::getDirNameFromPath(tmpStr, cbdata->imageFileName), subdirectoryName);
 
-          // check if the subdirectory already exists
-          // if it already exists dump a warning
-          if( OFStandard::dirExists(subdirectoryPathAndName) )
-            OFLOG_WARN(storescpLogger, "subdirectory for study already exists: " << subdirectoryPathAndName);
-          else
-          {
-            // if it does not exist create it
-            OFLOG_INFO(storescpLogger, "creating new subdirectory for study: " << subdirectoryPathAndName);
+          // create the subdirectory and then check errno, in order to avoid a "time of check to time of use" (TOC-TOU) race condition.
 #ifdef HAVE_WINDOWS_H
-            if( _mkdir( subdirectoryPathAndName.c_str() ) == -1 )
+          int mkdirStatus = _mkdir( subdirectoryPathAndName.c_str() );
 #else
-            if( mkdir( subdirectoryPathAndName.c_str(), S_IRWXU | S_IRWXG | S_IRWXO ) == -1 )
+          int mkdirStatus = mkdir( subdirectoryPathAndName.c_str(), S_IRWXU | S_IRWXG | S_IRWXO );
 #endif
+
+          if( mkdirStatus == -1 )
+          {
+            if (errno == EEXIST)
+            {
+              // If the subdirectory already exists, then re-use it. It might have been created by another
+              // process receiving images in parallel.
+              OFLOG_INFO(storescpLogger, "using existing subdirectory for study: " << subdirectoryPathAndName);
+            }
+            else
             {
               OFLOG_ERROR(storescpLogger, "could not create subdirectory for study: " << subdirectoryPathAndName);
               rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
               return;
             }
+          }
+          else
+          {
+            OFLOG_INFO(storescpLogger, "created new subdirectory for study: " << subdirectoryPathAndName);
             // all objects of a study have been received, so a new subdirectory is started.
             // ->timename counter can be reset, because the next filename can't cause a duplicate.
             // if no reset would be done, files of a new study (->new directory) would start with a counter in filename
@@ -2422,8 +2425,13 @@ static void executeCommand( const OFString &cmd )
 #endif
 }
 
-
+#ifdef HAVE_WAITPID
 static void cleanChildren(pid_t pid, OFBool synch)
+#elif defined(HAVE_WAIT3)
+static void cleanChildren(pid_t /* pid */, OFBool synch)
+#else
+static void cleanChildren(pid_t /* pid */, OFBool /* synch */)
+#endif
   /*
    * This function removes child processes that have terminated,
    * i.e. converted to zombies. Should be called now and then.
index 2830a4500f7c83ee10e9b972802d3866414597a3..59696ab5c99bab477c67bdfb95cd4050509edaa6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2019, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
@@ -53,6 +47,9 @@ END_EXTERN_C
 #include "dcmtk/dcmdata/dcuid.h"     /* for dcmtk version name */
 #include "dcmtk/dcmdata/dcostrmz.h"  /* for dcmZlibCompressionLevel */
 #include "dcmtk/dcmtls/tlsopt.h"     /* for DcmTLSOptions */
+#include "dcmtk/ofstd/ofstdinc.h"
+#include <ctime>
+
 
 #ifdef ON_THE_FLY_COMPRESSION
 #include "dcmtk/dcmjpeg/djdecode.h"  /* for JPEG decoders */
@@ -863,8 +860,8 @@ int main(int argc, char *argv[])
       cond = ASC_abortAssociation(assoc);
       if (cond.bad()) {
         OFLOG_ERROR(storescuLogger, "Association Abort Failed: " << DimseCondition::dump(temp_str, cond));
-        return 1;
       }
+      return 1;
     }
 
     /* destroy the association, i.e. free memory of T_ASC_Association* structure. This */
@@ -894,7 +891,7 @@ int main(int argc, char *argv[])
     if (opt_haltOnUnsuccessfulStore && unsuccessfulStoreEncountered) {
       if (lastStatusCode == STATUS_Success) {
         // there must have been some kind of general network error
-        exitCode = 0xff;
+        exitCode = 10;
       } else {
         exitCode = (lastStatusCode >> 8); // only the least significant byte is relevant as exit code
       }
@@ -944,7 +941,7 @@ addPresentationContext(T_ASC_Parameters *params,
   T_ASC_SC_ROLE proposedRole = ASC_SC_ROLE_DEFAULT)
 {
   const char *c_p = transferSyntax.c_str();
-  OFCondition cond = ASC_addPresentationContext(params, presentationContextId,
+  OFCondition cond = ASC_addPresentationContext(params, OFstatic_cast(T_ASC_PresentationContextID, presentationContextId),
     abstractSyntax.c_str(), &c_p, 1, proposedRole);
   return cond;
 }
@@ -966,7 +963,7 @@ addPresentationContext(T_ASC_Parameters *params,
     ++s_cur;
   }
 
-  OFCondition cond = ASC_addPresentationContext(params, presentationContextId,
+  OFCondition cond = ASC_addPresentationContext(params, OFstatic_cast(T_ASC_PresentationContextID, presentationContextId),
     abstractSyntax.c_str(), transferSyntaxes, transferSyntaxCount, proposedRole);
 
   delete[] transferSyntaxes;
@@ -1377,7 +1374,7 @@ storeSCU(T_ASC_Association *assoc, const char *fname)
 #endif
 
   /* prepare the transmission of data */
-  bzero(OFreinterpret_cast(char *, &req), sizeof(req));
+  memset(OFreinterpret_cast(char *, &req), 0, sizeof(req));
   req.MessageID = msgId;
   OFStandard::strlcpy(req.AffectedSOPClassUID, sopClass, sizeof(req.AffectedSOPClassUID));
   OFStandard::strlcpy(req.AffectedSOPInstanceUID, sopInstance, sizeof(req.AffectedSOPInstanceUID));
index 4282d94fea7c7d21e3aa1809265761cdd64610a7..5bb907b88b5beab70eade1fe097f83ad3c86593d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2005-2017, OFFIS e.V.
+ *  Copyright (C) 2005-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofcmdln.h"
 #include "dcmtk/ofstd/ofconapp.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
index 02e91af0fbfeeca7cb797e42c6df612bc8c9c8ea..0f6b75e7de4fe2e2ed2a7a731aaccb0ae0fec7d5 100644 (file)
@@ -26,7 +26,7 @@ OFBool isConnected();
  *  TCP/IP connection is already accepted, while the ACSE negotiation
  *  is not already done but must be implemented by this method.
  *  @param assoc The association to run.
   @param EC_Normal if association could be handled, error otherwise
*  @return EC_Normal if association could be handled, error otherwise
  */
 OFCondition run( T_ASC_Association* assoc );
 
index b36f34b05c9e0a35a82b506a64431cfcf0fa9184..0e86b9cc48768a96ba50118d65d4b9f01507e775 100644 (file)
@@ -127,13 +127,23 @@ certification authority:
   +cd   --add-cert-dir  [d]irectory: string
           add certificates in d to list of certificates
 
-security profile:
+  +crl  --add-crl-file  [f]ilename: string
+          add certificate revocation list file
+          (implies --enable-crl-vfy)
 
-  +px   --profile-bcp195
-          BCP 195 TLS Profile (default)
+  +crv  --enable-crl-vfy
+          enable leaf CRL verification
+
+  +cra  --enable-crl-all
+          enable full chain CRL verification
+
+security profile:
 
   +py   --profile-bcp195-nd
-          Non-downgrading BCP 195 TLS Profile
+          Non-downgrading BCP 195 TLS Profile (default)
+
+  +px   --profile-bcp195
+          BCP 195 TLS Profile
 
   +pz   --profile-bcp195-ex
           Extended BCP 195 TLS Profile
@@ -448,6 +458,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmrecv_copyright COPYRIGHT
 
-Copyright (C) 2013-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2013-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index ff197e38ce7a6d511d057e12c6871aba0690dffe..7e617ac6544b36b21724d8e432c0d2287f91a4b3 100644 (file)
@@ -305,10 +305,10 @@ enforced, i.e. no possibly illegal presentation context will be proposed but
 the corresponding SOP instance will be rejected (if needed).  Please note,
 however, that the size of the decompressed pixel data is not checked.
 
-Please note, however, that the default transfer syntax for "Lossless JPEG
-Compression", "Lossy JPEG Compression" and so on are not always proposed as
-also required by the DICOM standard.  The same limitation applies to other
-compression schemes.  See DICOM PS 3.5 section 10 for details.
+The default transfer syntax for "Lossless JPEG Compression", "Lossy JPEG
+Compression" and so on are not always proposed as also required by the DICOM
+standard.  The same limitation applies to other compression schemes.  See DICOM
+PS 3.5 section 10 for details.
 
 \section dcmsend_logging LOGGING
 
@@ -409,6 +409,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmsend_copyright COPYRIGHT
 
-Copyright (C) 2011-2018 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2011-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index ec45178514c92f0634edc87193e3c8dd4aaef79e..f847b92178bccb9dc3e580be4e2121cbc01b3e6f 100644 (file)
@@ -139,13 +139,23 @@ certification authority:
   +cd   --add-cert-dir  [d]irectory: string
           add certificates in d to list of certificates
 
-security profile:
+  +crl  --add-crl-file  [f]ilename: string
+          add certificate revocation list file
+          (implies --enable-crl-vfy)
 
-  +px   --profile-bcp195
-          BCP 195 TLS Profile (default)
+  +crv  --enable-crl-vfy
+          enable leaf CRL verification
+
+  +cra  --enable-crl-all
+          enable full chain CRL verification
+
+security profile:
 
   +py   --profile-bcp195-nd
-          Non-downgrading BCP 195 TLS Profile
+          Non-downgrading BCP 195 TLS Profile (default)
+
+  +px   --profile-bcp195
+          BCP 195 TLS Profile
 
   +pz   --profile-bcp195-ex
           Extended BCP 195 TLS Profile
@@ -186,6 +196,20 @@ peer authentication:
 
   -ic   --ignore-peer-cert
           don't verify peer certificate
+
+offline certificate verification:
+
+  +vc   --verify-cert  [f]ilename: string
+          verify certificate against CA settings
+
+          # Load a client certificate and check whether it would be accepted
+          # when received during a TLS handshake. Print result and exit.
+
+  +rc   --is-root-cert  [f]ilename: string
+          check if certificate is self-signed root CA
+
+          # Load a client certificate and check whether it is a valid,
+          # self-signed root CA certificate. Print result and exit.
 \endverbatim
 
 \section echoscu_notes NOTES
@@ -260,6 +284,7 @@ EXITCODE_COMMANDLINE_SYNTAX_ERROR         1
 \subsection echoscu_exit_codes_input_file_errors input file errors
 \verbatim
 EXITCODE_CANNOT_READ_INPUT_FILE          20 (*)
+EXITCODE_INVALID_INPUT_FILE              22
 \endverbatim
 
 \subsection echoscu_exit_codes_output_file_errors output file errors
@@ -294,6 +319,6 @@ It is an error if no data dictionary can be loaded.
 
 \section echoscu_copyright COPYRIGHT
 
-Copyright (C) 1994-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1994-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 2b717449419d64d2cab7622d514f223da8a82f75..fb35b7f17d0cfb28099484944a7baf6df10fd2b4 100644 (file)
@@ -190,13 +190,23 @@ certification authority:
   +cd   --add-cert-dir  [d]irectory: string
           add certificates in d to list of certificates
 
-security profile:
+  +crl  --add-crl-file  [f]ilename: string
+          add certificate revocation list file
+          (implies --enable-crl-vfy)
 
-  +px   --profile-bcp195
-          BCP 195 TLS Profile (default)
+  +crv  --enable-crl-vfy
+          enable leaf CRL verification
+
+  +cra  --enable-crl-all
+          enable full chain CRL verification
+
+security profile:
 
   +py   --profile-bcp195-nd
-          Non-downgrading BCP 195 TLS Profile
+          Non-downgrading BCP 195 TLS Profile (default)
+
+  +px   --profile-bcp195
+          BCP 195 TLS Profile
 
   +pz   --profile-bcp195-ex
           Extended BCP 195 TLS Profile
@@ -455,6 +465,6 @@ It is an error if no data dictionary can be loaded.
 
 \section findscu_copyright COPYRIGHT
 
-Copyright (C) 1994-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1994-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index b2a82129e644b6f6a9606abe9028e0b100d2c07c..26b36ed51e67d3ce12fb503ad430bd4976b522b1 100644 (file)
@@ -551,6 +551,6 @@ It is an error if no data dictionary can be loaded.
 
 \section getscu_copyright COPYRIGHT
 
-Copyright (C) 2011-2018 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2011-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index fc8ec2f6fcb90cec8dfea0b2f4de364c081a75f2..649f51a55a5a27b554fb528aeca533ccd490c334 100644 (file)
@@ -568,7 +568,9 @@ SimplifiedAdultEchoSRStorage                         1.2.840.10008.5.1.4.1.1.88.
 PatientRadiationDoseSRStorage                        1.2.840.10008.5.1.4.1.1.88.73
 PlannedImagingAgentAdministrationSRStorage           1.2.840.10008.5.1.4.1.1.88.74
 PerformedImagingAgentAdministrationSRStorage         1.2.840.10008.5.1.4.1.1.88.75
+EnhancedXRayRadiationDoseSRStorage                   1.2.840.10008.5.1.4.1.1.88.76
 ContentAssessmentResultsStorage                      1.2.840.10008.5.1.4.1.1.90.1
+MicroscopyBulkSimpleAnnotationsStorage               1.2.840.10008.5.1.4.1.1.91.1
 EncapsulatedPDFStorage                               1.2.840.10008.5.1.4.1.1.104.1
 EncapsulatedCDAStorage                               1.2.840.10008.5.1.4.1.1.104.2
 EncapsulatedSTLStorage                               1.2.840.10008.5.1.4.1.1.104.3
@@ -580,6 +582,7 @@ RETIRED_StandalonePETCurveStorage                    1.2.840.10008.5.1.4.1.1.129
 EnhancedPETImageStorage                              1.2.840.10008.5.1.4.1.1.130
 BasicStructuredDisplayStorage                        1.2.840.10008.5.1.4.1.1.131
 CTPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.2
+XAPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.8
 RTImageStorage                                       1.2.840.10008.5.1.4.1.1.481.1
 RTDoseStorage                                        1.2.840.10008.5.1.4.1.1.481.2
 RTStructureSetStorage                                1.2.840.10008.5.1.4.1.1.481.3
@@ -600,6 +603,8 @@ RTRadiationSalvageRecordStorage                      1.2.840.10008.5.1.4.1.1.481
 TomotherapeuticRadiationRecordStorage                1.2.840.10008.5.1.4.1.1.481.18
 CArmPhotonElectronRadiationRecordStorage             1.2.840.10008.5.1.4.1.1.481.19
 RoboticRadiationRecordStorage                        1.2.840.10008.5.1.4.1.1.481.20
+RTRadiationSetDeliveryInstructionStorage             1.2.840.10008.5.1.4.1.1.481.21
+RTTreatmentPreparationStorage                        1.2.840.10008.5.1.4.1.1.481.22
 DICOS_CTImageStorage                                 1.2.840.10008.5.1.4.1.1.501.1
 DICOS_DigitalXRayImageStorageForPresentation         1.2.840.10008.5.1.4.1.1.501.2.1
 DICOS_DigitalXRayImageStorageForProcessing           1.2.840.10008.5.1.4.1.1.501.2.2
@@ -781,6 +786,6 @@ It is an error if no data dictionary can be loaded.
 
 \section movescu_copyright COPYRIGHT
 
-Copyright (C) 1994-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1994-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 13da0b40afa6e4d1d70a5260ee023bce53dd0d41..833bc118e3f7756ea55fea908a0559fe6d33f132 100644 (file)
@@ -247,13 +247,23 @@ certification authority:
   +cd   --add-cert-dir  [d]irectory: string
           add certificates in d to list of certificates
 
-security profile:
+  +crl  --add-crl-file  [f]ilename: string
+          add certificate revocation list file
+          (implies --enable-crl-vfy)
 
-  +px   --profile-bcp195
-          BCP 195 TLS Profile (default)
+  +crv  --enable-crl-vfy
+          enable leaf CRL verification
+
+  +cra  --enable-crl-all
+          enable full chain CRL verification
+
+security profile:
 
   +py   --profile-bcp195-nd
-          Non-downgrading BCP 195 TLS Profile
+          Non-downgrading BCP 195 TLS Profile (default)
+
+  +px   --profile-bcp195
+          BCP 195 TLS Profile
 
   +pz   --profile-bcp195-ex
           Extended BCP 195 TLS Profile
@@ -732,7 +742,9 @@ SimplifiedAdultEchoSRStorage                         1.2.840.10008.5.1.4.1.1.88.
 PatientRadiationDoseSRStorage                        1.2.840.10008.5.1.4.1.1.88.73
 PlannedImagingAgentAdministrationSRStorage           1.2.840.10008.5.1.4.1.1.88.74
 PerformedImagingAgentAdministrationSRStorage         1.2.840.10008.5.1.4.1.1.88.75
+EnhancedXRayRadiationDoseSRStorage                   1.2.840.10008.5.1.4.1.1.88.76
 ContentAssessmentResultsStorage                      1.2.840.10008.5.1.4.1.1.90.1
+MicroscopyBulkSimpleAnnotationsStorage               1.2.840.10008.5.1.4.1.1.91.1
 EncapsulatedPDFStorage                               1.2.840.10008.5.1.4.1.1.104.1
 EncapsulatedCDAStorage                               1.2.840.10008.5.1.4.1.1.104.2
 EncapsulatedSTLStorage                               1.2.840.10008.5.1.4.1.1.104.3
@@ -744,6 +756,7 @@ RETIRED_StandalonePETCurveStorage                    1.2.840.10008.5.1.4.1.1.129
 EnhancedPETImageStorage                              1.2.840.10008.5.1.4.1.1.130
 BasicStructuredDisplayStorage                        1.2.840.10008.5.1.4.1.1.131
 CTPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.2
+XAPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.8
 RTImageStorage                                       1.2.840.10008.5.1.4.1.1.481.1
 RTDoseStorage                                        1.2.840.10008.5.1.4.1.1.481.2
 RTStructureSetStorage                                1.2.840.10008.5.1.4.1.1.481.3
@@ -764,6 +777,8 @@ RTRadiationSalvageRecordStorage                      1.2.840.10008.5.1.4.1.1.481
 TomotherapeuticRadiationRecordStorage                1.2.840.10008.5.1.4.1.1.481.18
 CArmPhotonElectronRadiationRecordStorage             1.2.840.10008.5.1.4.1.1.481.19
 RoboticRadiationRecordStorage                        1.2.840.10008.5.1.4.1.1.481.20
+RTRadiationSetDeliveryInstructionStorage             1.2.840.10008.5.1.4.1.1.481.21
+RTTreatmentPreparationStorage                        1.2.840.10008.5.1.4.1.1.481.22
 DICOS_CTImageStorage                                 1.2.840.10008.5.1.4.1.1.501.1
 DICOS_DigitalXRayImageStorageForPresentation         1.2.840.10008.5.1.4.1.1.501.2.1
 DICOS_DigitalXRayImageStorageForProcessing           1.2.840.10008.5.1.4.1.1.501.2.2
@@ -936,6 +951,6 @@ It is an error if no data dictionary can be loaded.
 
 \section storescp_copyright COPYRIGHT
 
-Copyright (C) 1996-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1996-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 74746e6725ec058a0bb576507f35068543e3cd63..7e0151b0e54b7491efc1927256c03240d025c871 100644 (file)
@@ -329,13 +329,23 @@ certification authority:
   +cd   --add-cert-dir  [d]irectory: string
           add certificates in d to list of certificates
 
-security profile:
+  +crl  --add-crl-file  [f]ilename: string
+          add certificate revocation list file
+          (implies --enable-crl-vfy)
 
-  +px   --profile-bcp195
-          BCP 195 TLS Profile (default)
+  +crv  --enable-crl-vfy
+          enable leaf CRL verification
+
+  +cra  --enable-crl-all
+          enable full chain CRL verification
+
+security profile:
 
   +py   --profile-bcp195-nd
-          Non-downgrading BCP 195 TLS Profile
+          Non-downgrading BCP 195 TLS Profile (default)
+
+  +px   --profile-bcp195
+          BCP 195 TLS Profile
 
   +pz   --profile-bcp195-ex
           Extended BCP 195 TLS Profile
@@ -580,6 +590,6 @@ It is an error if no data dictionary can be loaded.
 
 \section storescu_copyright COPYRIGHT
 
-Copyright (C) 1996-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1996-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 6988de9a152f09629216dbcb01365c04a12064c9..2a82280a233bdcbddd304870befc056c87d5e6eb 100644 (file)
@@ -143,6 +143,6 @@ It is an error if no data dictionary can be loaded.
 
 \section termscu_copyright COPYRIGHT
 
-Copyright (C) 2005-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2005-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 2fba26e7387792de2d5e3919335e9c704c37aabb..07660fc6eae6d6d2de336d564603e048606653c2 100644 (file)
@@ -1,5 +1,5 @@
 #
-#  Copyright (C) 2003-2020, OFFIS e.V.
+#  Copyright (C) 2003-2021, OFFIS e.V.
 #  All rights reserved.  See COPYRIGHT file for details.
 #
 #  This software and supporting documentation were developed by
@@ -221,12 +221,14 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib
 # - EncapsulatedMTLStorage
 # - EncapsulatedOBJStorage
 # - EncapsulatedSTLStorage
+# - EnhancedXRayRadiationDoseSRStorage
 # - ExtensibleSRStorage
 # - GrayscalePlanarMPRVolumetricPresentationStateStorage
 # - HangingProtocolStorage
 # - LegacyConvertedEnhancedCTImageStorage
 # - LegacyConvertedEnhancedMRImageStorage
 # - LegacyConvertedEnhancedPETImageStorage
+# - MicroscopyBulkSimpleAnnotationsStorage
 # - MultichannelRespiratoryWaveformStorage
 # - MultipleVolumeRenderingVolumetricPresentationStateStorage
 # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
@@ -244,8 +246,10 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib
 # - RTPhysicianIntentStorage
 # - RTRadiationRecordSetStorage
 # - RTRadiationSalvageRecordStorage
+# - RTRadiationSetDeliveryInstructionStorage
 # - RTRadiationSetStorage
 # - RTSegmentAnnotationStorage
+# - RTTreatmentPreparationStorage
 # - SegmentedVolumeRenderingVolumetricPresentationStateStorage
 # - SimplifiedAdultEchoSRStorage
 # - SleepElectroencephalogramWaveformStorage
@@ -255,6 +259,8 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib
 # - VolumeRenderingVolumetricPresentationStateStorage
 # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage
 # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage
+# - XADefinedProcedureProtocolStorage
+# - XAPerformedProcedureProtocolStorage
 #
 # - DICOS_2DAITStorage
 # - DICOS_3DAITStorage
@@ -424,6 +430,8 @@ PresentationContext128 = XRayRadiationDoseSRStorage\UncompressedOrZlib
 # - EncapsulatedMTLStorage
 # - EncapsulatedOBJStorage
 # - EncapsulatedSTLStorage
+# - EnhancedXRayRadiationDoseSRStorage
+# - MicroscopyBulkSimpleAnnotationsStorage
 # - MultichannelRespiratoryWaveformStorage
 # - MultipleVolumeRenderingVolumetricPresentationStateStorage
 # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
@@ -438,13 +446,17 @@ PresentationContext128 = XRayRadiationDoseSRStorage\UncompressedOrZlib
 # - RTPhysicianIntentStorage
 # - RTRadiationRecordSetStorage
 # - RTRadiationSalvageRecordStorage
+# - RTRadiationSetDeliveryInstructionStorage
 # - RTRadiationSetStorage
 # - RTSegmentAnnotationStorage
+# - RTTreatmentPreparationStorage
 # - SegmentedVolumeRenderingVolumetricPresentationStateStorage
 # - SleepElectroencephalogramWaveformStorage
 # - TomotherapeuticRadiationRecordStorage
 # - TomotherapeuticRadiationStorage
 # - VolumeRenderingVolumetricPresentationStateStorage
+# - XADefinedProcedureProtocolStorage
+# - XAPerformedProcedureProtocolStorage
 #
 # - RETIRED_HardcopyColorImageStorage
 # - RETIRED_HardcopyGrayscaleImageStorage
index e915a09ed5260707125ad2ae092ea44467d36038..09981f403a294909e33dae8c1812adf08a41f485 100644 (file)
@@ -1,5 +1,5 @@
 #
-#  Copyright (C) 2003-2020, OFFIS e.V.
+#  Copyright (C) 2003-2021, OFFIS e.V.
 #  All rights reserved.  See COPYRIGHT file for details.
 #
 #  This software and supporting documentation were developed by
@@ -228,6 +228,7 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2
 # - EnhancedMRColorImageStorage
 # - EnhancedPETImageStorage
 # - EnhancedUSVolumeStorage
+# - EnhancedXRayRadiationDoseSRStorage
 # - ExtensibleSRStorage
 # - GeneralAudioWaveformStorage
 # - GenericImplantTemplateStorage
@@ -244,6 +245,7 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2
 # - LegacyConvertedEnhancedPETImageStorage
 # - LensometryMeasurementsStorage
 # - MacularGridThicknessAndVolumeReportStorage
+# - MicroscopyBulkSimpleAnnotationsStorage
 # - MultichannelRespiratoryWaveformStorage
 # - MultipleVolumeRenderingVolumetricPresentationStateStorage
 # - OphthalmicAxialMeasurementsStorage
@@ -270,8 +272,10 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2
 # - RTPhysicianIntentStorage
 # - RTRadiationRecordSetStorage
 # - RTRadiationSalvageRecordStorage
+# - RTRadiationSetDeliveryInstructionStorage
 # - RTRadiationSetStorage
 # - RTSegmentAnnotationStorage
+# - RTTreatmentPreparationStorage
 # - SegmentationStorage
 # - SegmentedVolumeRenderingVolumetricPresentationStateStorage
 # - SimplifiedAdultEchoSRStorage
@@ -289,6 +293,8 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2
 # - VolumeRenderingVolumetricPresentationStateStorage
 # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage
 # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage
+# - XADefinedProcedureProtocolStorage
+# - XAPerformedProcedureProtocolStorage
 # - XAXRFGrayscaleSoftcopyPresentationStateStorage
 # - XRay3DAngiographicImageStorage
 # - XRay3DCraniofacialImageStorage
index 8025b8948a779ab424f128ec112ea4e303da73de..5daae3949d56b268a3774887065123588686cda8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
@@ -707,6 +707,9 @@ ASC_dropSCPAssociation(T_ASC_Association * association, int timeout = DUL_TIMEOU
 DCMTK_DCMNET_EXPORT OFCondition
 ASC_dropAssociation(T_ASC_Association * association);
 
+DCMTK_DCMNET_EXPORT OFCondition
+ASC_closeTransportConnection(T_ASC_Association * association);
+
 DCMTK_DCMNET_EXPORT OFCondition
 ASC_destroyAssociation(T_ASC_Association ** association);
 
@@ -761,5 +764,6 @@ ASC_role2String(const T_ASC_SC_ROLE role);
 DCMTK_DCMNET_EXPORT DUL_SC_ROLE
 ascRole2dulRole(const T_ASC_SC_ROLE role);
 
-
+DCMTK_DCMNET_EXPORT void
+destroyDULParamPresentationContextList(LST_HEAD ** lst);
 #endif
index a7412c6c391a78046660897d4672fbd9a7eaa0f9..eaf04f5d53a05ef6cb4ceb826a4d87df3e2b8ff7 100644 (file)
@@ -246,6 +246,11 @@ public:
    *  Instead of maintaining a global condition stack (which is difficult
    *  in multi-threaded applications), the error text of the sub-condition
    *  is appended to the newly created condition.
+   *  @param aModule the module for the condition
+   *  @param aCode the code for the condition
+   *  @param aStatus the status for the condition
+   *  @param aText the error text
+   *  @param subCondition the sub-condition
    */
   static OFCondition push(
     unsigned short aModule,
@@ -259,6 +264,8 @@ public:
    *  Instead of maintaining a global condition stack (which is difficult
    *  in multi-threaded applications), the error text of the sub-condition
    *  is appended to the newly created condition.
+   *  @param newCondition the condition
+   *  @param subCondition the sub-condition
    */
   static OFCondition push(
     OFCondition newCondition,
index d3870e1bd862038439e247baf7b355b6f629f4c1..ed12a5b515c1baaa7c023312fcceb45127506f5e 100644 (file)
@@ -51,7 +51,7 @@ private:
 
   /** parses the transfer syntax lists in the config file.
    *  @param cfg association configuration object to initialize
-   *  @param filename name of config file
+   *  @param config filename name of config file
    *  @return EC_Normal if successful, an error code otherwise
    */
   static OFCondition parseTransferSyntaxes(
@@ -60,7 +60,7 @@ private:
 
   /** parses the presentation context lists in the config file.
    *  @param cfg association configuration object to initialize
-   *  @param filename name of config file
+   *  @param config filename name of config file
    *  @return EC_Normal if successful, an error code otherwise
    */
   static OFCondition parsePresentationContexts(
@@ -69,7 +69,7 @@ private:
 
   /** parses the role selection lists in the config file.
    *  @param cfg association configuration object to initialize
-   *  @param filename name of config file
+   *  @param config filename name of config file
    *  @return EC_Normal if successful, an error code otherwise
    */
   static OFCondition parseRoleSelectionItems(
@@ -78,7 +78,7 @@ private:
 
   /** parses the extended negotiation lists in the config file.
    *  @param cfg association configuration object to initialize
-   *  @param filename name of config file
+   *  @param config filename name of config file
    *  @return EC_Normal if successful, an error code otherwise
    */
   static OFCondition parseExtendedNegotiationItems(
@@ -87,7 +87,7 @@ private:
 
   /** parses the association configuration profile lists in the config file.
    *  @param cfg association configuration object to initialize
-   *  @param filename name of config file
+   *  @param config filename name of config file
    *  @return EC_Normal if successful, an error code otherwise
    */
   static OFCondition parseProfiles(
index c7bc419f57453313cb0db378685972108a5ea36c..369ef1b479f4f90d8db3c992f2509954b92a0c9c 100644 (file)
@@ -58,10 +58,14 @@ public:
   /// destructor
   ~DcmAssociationConfiguration();
 
-  /// Copy constructor, performs deep copy
+  /** Copy constructor, performs deep copy
+   * @param arg the DcmAC to copy
+   */
   DcmAssociationConfiguration(const DcmAssociationConfiguration& arg);
 
-  /// Copy assignment operator, performs deep copy
+  /** Copy assignment operator, performs deep copy
+   * @param arg the DcmAC to copy
+   */
   DcmAssociationConfiguration& operator=(const DcmAssociationConfiguration& arg);
 
   /// Reset configuration.
@@ -69,7 +73,7 @@ public:
 
   /** this method prepares a T_ASC_Parameters structure according to the settings
    *  of a profile maintained by this object. It is used by an association initiator.
-   *  @param symbolic profile name, must not be NULL
+   *  @param profile symbolic profile name, must not be NULL
    *  @param params T_ASC_Parameters structure to be filled
    *  @return EC_Normal if successful, an error code otherwise
    */
@@ -79,7 +83,7 @@ public:
 
   /** this method evaluates an incoming association request according to the settings
    *  of a profile maintained by this object. It is used by an association acceptor.
-   *  @param symbolic profile name, must not be NULL
+   *  @param profile symbolic profile name, must not be NULL
    *  @param assoc T_ASC_Association structure to be evaluated
    *  @return EC_Normal if successful, an error code otherwise
    */
index 67549a8f132031d1cac653f61d8899c0c327a9be..fd52b863ab90dd5cf6e08e752b2e23554da220a9 100644 (file)
@@ -48,13 +48,17 @@ public:
     const unsigned char *data,
     Uint32 length);
 
-  /// copy constructor
+  /** copy constructor
+   * @param arg the item to copy
+   */
   DcmExtendedNegotiationItem(const DcmExtendedNegotiationItem& arg);
  
   /// destructor
   ~DcmExtendedNegotiationItem();
 
-  /// assignment operator
+  /** assignment operator
+  * @param arg the item to assign
+  */
   DcmExtendedNegotiationItem& operator=(const DcmExtendedNegotiationItem& arg);
 
   /** checks if the given argument matches the abstract syntax UID
@@ -135,10 +139,14 @@ public:
   /// destructor
   ~DcmExtendedNegotiationMap();
 
-  /// Copy constructor, performs deep copy
+  /** Copy constructor, performs deep copy
+   * @param arg the map to copy
+   */
   DcmExtendedNegotiationMap(const DcmExtendedNegotiationMap& arg);
 
-  /// Copy assignment operator, performs deep copy
+  /** Copy assignment operator, performs deep copy
+   * @param arg the map to assign
+   */
   DcmExtendedNegotiationMap& operator=(const DcmExtendedNegotiationMap& arg);
 
   /** Resets DcmExtendedNegotiationMap and frees any allocated memory
index 72445cba3d0e7ebae336da3dc310e3083d20d291..dce3871745a15c6147ee0e53213883354e4a4535 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,8 +28,6 @@
 #include "dcmtk/ofstd/oftypes.h"
 #include "dcmtk/ofstd/ofstring.h"
 
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/ofstd/ofutil.h"
 
 #include "dcmtk/dcmnet/dndefine.h"
  *  @brief type definitions and classes for transport connections
  */
 
-/** this enum represents the result of a transport layer operation
- *  which may be a transparent TCP/IP or a secure TLS operation.
- */
-enum DcmTransportLayerStatus
-{
-  /** successful operation
-   */
-  TCS_ok,
-
-  /** operation cannot be performed because transport connection
-   *  object was not allocated.
-   */
-  TCS_noConnection,
-
-  /** operation failed due to an error within the TLS protocol layer
-   */
-  TCS_tlsError,
-
-  /** operation failed because an illegal parameter was passed
-   */
-  TCS_illegalCall,
-
-  /** unspecified error
-   */
-  TCS_unspecifiedError
-};
-
 class DcmTransportConnection;
 
 /** factory class which creates transport layer connections.
index 3871654afd1fd719ee42fd0c15f8367883ffbb7b..05dc1eda0495336acf629f735a9a96f1a00c82e8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
+#include "dcmtk/ofstd/ofcond.h"       /* for OFCondition */
 #include "dcmtk/ofstd/ofglobal.h"     /* for OFGlobal */
 #include "dcmtk/ofstd/oftypes.h"      /* for OFBool */
 #include "dcmtk/ofstd/ofstream.h"     /* for ostream */
-#include "dcmtk/dcmnet/dcmlayer.h"    /* for DcmTransportLayerStatus */
-
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/dcmnet/dndefine.h"    /* for DCMTK_DCMNET_EXPORT */
+#include "dcmtk/dcmnet/dntypes.h"     /* for DcmNativeSocketType */
 
 // include this file in doxygen documentation
 
@@ -81,24 +80,24 @@ public:
   /** performs server side handshake on established socket.
    *  This function is used to establish a secure transport connection
    *  over the established TCP connection. Abstract method.
-   *  @return TCS_ok if successful, an error code otherwise.
+   *  @return EC_Normal if successful, an error code otherwise.
    */
-  virtual DcmTransportLayerStatus serverSideHandshake() = 0;
+  virtual OFCondition serverSideHandshake() = 0;
 
   /** performs client side handshake on established socket.
    *  This function is used to establish a secure transport connection
    *  over the established TCP connection. Abstract method.
-   *  @return TCS_ok if successful, an error code otherwise.
+   *  @return EC_Normal if successful, an error code otherwise.
    */
-  virtual DcmTransportLayerStatus clientSideHandshake() = 0;
+  virtual OFCondition clientSideHandshake() = 0;
 
   /** performs a re-negotiation of the connection with different
    *  connection parameters. Used to change the parameters of the
    *  secure transport connection. Abstract method.
    *  @param newSuite string identifying the ciphersuite to be negotiated.
-   *  @return TCS_ok if successful, an error code otherwise.
+   *  @return EC_Normal if successful, an error code otherwise.
    */
-  virtual DcmTransportLayerStatus renegotiate(const char *newSuite) = 0;
+  virtual OFCondition renegotiate(const char *newSuite) = 0;
 
   /** attempts to read nbyte bytes from the transport connection and
    *  writes them into the given buffer. Abstract method.
@@ -122,6 +121,12 @@ public:
    */
   virtual void close() = 0;
 
+  /** Closes the transport connection directly. If a secure connection
+   *  is used, a closure alert is NOT sent before the connection
+   *  is closed. Abstract method.
+   */
+  virtual void closeTransportConnection() = 0;
+
   /** returns the size in bytes of the peer certificate of a secure connection.
    *  May return 0 if connection is transparent TCP/IP.
    *  @return peer certificate length in bytes
@@ -163,12 +168,6 @@ public:
    */
   void dumpConnectionParameters(STD_NAMESPACE ostream& out);
 
-  /** returns an error string for a given error code.
-   *  @param code error code
-   *  @return description for error code
-   */
-  virtual const char *errorString(DcmTransportLayerStatus code) = 0;
-
   /** indicates which of the specified transport connections is ready for
    *  reading. If none of the specified transport connections is ready
    *  for reading, this method blocks up to the specified timeout interval
@@ -266,24 +265,24 @@ public:
   /** performs server side handshake on established socket.
    *  This function is used to establish a secure transport connection
    *  over the established TCP connection.
-   *  @return TCS_ok if successful, an error code otherwise.
+   *  @return EC_Normal if successful, an error code otherwise.
    */
-  virtual DcmTransportLayerStatus serverSideHandshake();
+  virtual OFCondition serverSideHandshake();
 
   /** performs client side handshake on established socket.
    *  This function is used to establish a secure transport connection
    *  over the established TCP connection.
-   *  @return TCS_ok if successful, an error code otherwise.
+   *  @return EC_Normal if successful, an error code otherwise.
    */
-  virtual DcmTransportLayerStatus clientSideHandshake();
+  virtual OFCondition clientSideHandshake();
 
   /** performs a re-negotiation of the connection with different
    *  connection parameters. Used to change the parameters of the
    *  secure transport connection.
    *  @param newSuite string identifying the ciphersuite to be negotiated.
-   *  @return TCS_ok if successful, an error code otherwise.
+   *  @return EC_Normal if successful, an error code otherwise.
    */
-  virtual DcmTransportLayerStatus renegotiate(const char *newSuite);
+  virtual OFCondition renegotiate(const char *newSuite);
 
   /** attempts to read nbyte bytes from the transport connection and
    *  writes them into the given buffer.
@@ -307,6 +306,12 @@ public:
    */
   virtual void close();
 
+  /** Closes the transport connection directly. If a secure connection
+   *  is used, a closure alert is NOT sent before the connection
+   *  is closed.
+   */
+  virtual void closeTransportConnection();
+
   /** returns the size in bytes of the peer certificate of a secure connection.
    *  May return 0 if connection is transparent TCP/IP.
    *  @return peer certificate length in bytes
@@ -340,12 +345,6 @@ public:
    */
   virtual OFString& dumpConnectionParameters(OFString& str);
 
-  /** returns an error string for a given error code.
-   *  @param code error code
-   *  @return description for error code
-   */
-  virtual const char *errorString(DcmTransportLayerStatus code);
-
 private:
 
   /// private undefined copy constructor
index 267c18ddee00279eebcd6c08f8d6ded8708ef9c8..6764794cdd7c9dbbe5605b25526ef157de790dba 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2017, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 #define DCOMPAT_H
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
-#include "dcmtk/ofstd/ofbmanip.h"    /* for bzero workaround */
 #include "dcmtk/dcmnet/dndefine.h"
-
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CTIME
-#define INCLUDE_CSTRING
-#define INCLUDE_CERRNO
-#define INCLUDE_LIBC
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cerrno>
 
 #ifdef HAVE_WINDOWS_H
 #ifndef WIN32_LEAN_AND_MEAN
@@ -181,12 +173,6 @@ DCMTK_DCMNET_EXPORT int dcmtk_flock(int fd, int operation);
 #endif /* !HAVE_FLOCK */
 #endif
 
-#ifndef HAVE_BZERO
-#ifndef bzero
-#define bzero(p,len) memset((void*)(p), 0, (len));
-#endif
-#endif
-
 #ifndef HAVE_PROTOTYPE_GETHOSTNAME
 #ifdef HAVE_GETHOSTNAME
 /* gethostname is in the libraries but we have no prototype */
index 76231def189d602591472e3d527cfbafb7659863..ce85c9839ca5f1006d5c8aa5a4c31ba5eccbd2af 100644 (file)
@@ -123,10 +123,14 @@ protected: /* the two member variables are protected and can be accessed from de
 
 private:
 
-  /// private undefined copy constructor.
+  /** private undefined copy constructor.
+   * @param other documented to avoid doxygen warnings
+   */
   DcmFindSCUCallback(const DcmFindSCUCallback& other);
 
-  /// private undefined assignment operator.
+  /** private undefined assignment operator.
+   * @param other documented to avoid doxygen warnings
+   */
   DcmFindSCUCallback& operator=(const DcmFindSCUCallback& other);
 
 };
@@ -379,10 +383,14 @@ private:
     const char *outputDirectory = NULL,
     STD_NAMESPACE ofstream *outputStream = NULL) const;
 
-  /// Private undefined copy constructor
+  /** Private undefined copy constructor
+   * @param other documented to avoid doxygen warnings
+   */
   DcmFindSCU(const DcmFindSCU& other);
 
-  /// Private undefined assignment operator
+  /** Private undefined assignment operator
+   * @param other documented to avoid doxygen warnings
+   */
   DcmFindSCU& operator=(const DcmFindSCU& other);
 
 private:
index 158061b44212e10fee3816b68cfdff692c637e41..3eb59dae64a93131925faa0e70a20aeff5954a26 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_LIBC
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmnet/cond.h"         /* condition typedefs */
 #include "dcmtk/dcmnet/dcompat.h"      /* compatibility routines */
 #include "dcmtk/dcmdata/dctypes.h"     /* dcmdata toolkit basic types */
index aa808e768f076a60726ce814d9c1d440f944d5d8..a669047b98c6e544bc76ea5cdd57c2fb4c8b64cc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
@@ -402,7 +402,7 @@ typedef enum {
 */
 
 #define DUL_DULCOMPAT     2768240730UL
-#define DUL_DIMSECOMPAT   1048576UL
+#define DUL_DIMSECOMPAT   1114095UL
 #define DUL_MAXPDUCOMPAT  4278190335UL
 
 /* Define the function prototypes for this facility.
@@ -453,6 +453,7 @@ DUL_RequestAssociation(
 */
 DCMTK_DCMNET_EXPORT OFCondition DUL_AbortAssociation(DUL_ASSOCIATIONKEY ** association);
 DCMTK_DCMNET_EXPORT OFCondition DUL_DropAssociation(DUL_ASSOCIATIONKEY ** association);
+DCMTK_DCMNET_EXPORT OFCondition DUL_CloseTransportConnection(DUL_ASSOCIATIONKEY ** association);
 DCMTK_DCMNET_EXPORT OFCondition DUL_DropNetwork(DUL_NETWORKKEY ** network);
 DCMTK_DCMNET_EXPORT OFCondition DUL_ReleaseAssociation(DUL_ASSOCIATIONKEY ** association);
 DCMTK_DCMNET_EXPORT OFCondition DUL_AcknowledgeRelease(DUL_ASSOCIATIONKEY ** association);
diff --git a/dcmnet/include/dcmtk/dcmnet/dulstruc.h b/dcmnet/include/dcmtk/dcmnet/dulstruc.h
new file mode 100644 (file)
index 0000000..6ac9a8f
--- /dev/null
@@ -0,0 +1,333 @@
+/*
+ *
+ *  Copyright (C) 1994-2017, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were partly developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  For further copyrights, see the following paragraphs.
+ *
+ */
+
+/*
+          Copyright (C) 1993, 1994, RSNA and Washington University
+
+          The software and supporting documentation for the Radiological
+          Society of North America (RSNA) 1993, 1994 Digital Imaging and
+          Communications in Medicine (DICOM) Demonstration were developed
+          at the
+                  Electronic Radiology Laboratory
+                  Mallinckrodt Institute of Radiology
+                  Washington University School of Medicine
+                  510 S. Kingshighway Blvd.
+                  St. Louis, MO 63110
+          as part of the 1993, 1994 DICOM Central Test Node project for, and
+          under contract with, the Radiological Society of North America.
+
+          THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER RSNA NOR
+          WASHINGTON UNIVERSITY MAKE ANY WARRANTY ABOUT 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.
+
+          Copyright of the software and supporting documentation is
+          jointly owned by RSNA and Washington University, and free access
+          is hereby granted as a license to use this software, copy this
+          software and prepare derivative works based upon this software.
+          However, any distribution of this software source code or
+          supporting documentation or derivative works (source code and
+          supporting documentation) must include the three paragraphs of
+          the copyright notice.
+*/
+
+/*
+**          DICOM 93
+**        Electronic Radiology Laboratory
+**      Mallinckrodt Institute of Radiology
+**    Washington University School of Medicine
+**
+** Module Name(s):
+** Author, Date:  Stephen M. Moore, 19-May-93
+** Intent:
+**  This header contains private typedefs for the DICOM Upper Layer
+**  (DUL) protocol package.  This is to be used to compile the DUL
+**  package and is not intended to be seen by the applications programmer.
+**  Files at the package level should include this file to get the
+**  proper typedefs and include the public file "dulprotocol.h" to
+**  get the public definitions and function prototypes.  I have omitted
+**  the public definitions and prototypes on purpose so that they
+**  exist in only one location.
+*/
+
+#ifndef DULSTRUC_H
+#define DULSTRUC_H
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+#include "dcmtk/dcmnet/extneg.h"
+#include "dcmtk/dcmnet/dcuserid.h"
+#include "dcmtk/dcmnet/dicom.h"
+#include "dcmtk/dcmnet/dntypes.h"
+#include "dcmtk/dcmnet/dul.h"
+#include "dcmtk/dcmnet/lst.h"
+
+
+class DcmTransportConnection;
+class DcmTransportLayer;
+
+#define NETWORK_DISCONNECTED  2
+#define NETWORK_CONNECTED 3
+
+typedef enum {
+    DUL_ASSOC_WAITINGFORACK,
+    DUL_ASSOC_ESTABLISHED,
+    DUL_ASSOC_RELEASED,
+    DUL_ASSOC_ABORTED,
+    DUL_ASSOC_DROPPED
+}   DUL_ASSOC_STATE;
+
+#define ASSOCIATION_DISCONNECTED  2
+#define ASSOCIATION_ABORTED   4
+#define ASSOCIATION_RELEASED    5
+
+typedef struct {
+    char keyType[40];
+    int applicationFunction;
+    int networkState;
+    int protocolState;
+    int timeout;
+    unsigned long options;
+    union {
+  struct {
+      int port;
+      DcmNativeSocketType listenSocket;
+      DcmTransportLayer *tLayer;
+      int tLayerOwned;
+  }   TCP;
+    }   networkSpecific;
+}   PRIVATE_NETWORKKEY;
+
+typedef struct {
+    char keyType[40];
+    int applicationFunction;
+    char remoteNode[64];
+    DUL_ASSOC_STATE associationState;
+    int protocolState;
+    int networkState;
+    int timeout;
+    time_t timerStart;
+    unsigned long maxPDVRequestor;
+    unsigned long maxPDVAcceptor;
+    unsigned long maxPDV;
+    unsigned long maxPDVInput;
+    unsigned long receiveQp1;
+    unsigned long receiveQp2;
+    char calledAPTitle[20];
+    char callingAPTitle[20];
+    char applicationContextName[68];
+    char abstractSyntaxName[68];
+    void *receivePDUQueue;
+    DUL_PRESENTATIONCONTEXTID presentationContextID;
+    DcmTransportConnection *connection;
+    DUL_PDVLIST pdvList;
+    int inputPDU;
+    unsigned char pduHead[6];
+    unsigned char nextPDUType;
+    unsigned char nextPDUReserved;
+    unsigned long nextPDULength;
+    unsigned long compatibilityMode;
+    int pdvCount;
+    int pdvIndex;
+    void *logHandle;
+    int associatePDUFlag;
+    void *associatePDU;
+    unsigned long associatePDULength;
+    DUL_PDV currentPDV;
+    unsigned char *pdvPointer;
+    unsigned long fragmentBufferLength;
+    unsigned char *fragmentBuffer;
+    DUL_ModeCallback *modeCallback;
+}   PRIVATE_ASSOCIATIONKEY;
+
+#define KEY_NETWORK "KEY NETWORK"
+#define KEY_ASSOCIATION "KEY ASSOCIATION"
+
+#define AE_REQUESTOR  "AE REQUESTOR"
+#define AE_ACCEPTOR "AE ACCEPTOR"
+#define AE_BOTH   "AE BOTH"
+
+#define NO_PDU    1
+#define PDU_HEAD  2
+#define PDU_DATA  2
+
+/* Default timeout for waiting for PDUs.  100 seconds is high,
+** but used for development so we have time to do things with the
+** debugger.  A lower value would be used in a production system.
+*/
+
+#define DEFAULT_TIMEOUT     100
+
+/*  Private definitions */
+
+typedef struct dul_subitem {
+    void *reserved[2];
+    unsigned char type;
+    unsigned char rsv1;
+    unsigned short length;
+    char data[DICOM_UI_LENGTH + 1];
+}   DUL_SUBITEM;
+
+typedef struct dul_maxlength {
+    void *reserved[2];
+    unsigned char type;
+    unsigned char rsv1;
+    unsigned short length;
+    unsigned long maxLength;
+}   DUL_MAXLENGTH;
+
+typedef struct {
+    unsigned char type;
+    unsigned char rsv1;
+    unsigned short length;
+    unsigned short maximumOperationsInvoked;
+    unsigned short maximumOperationsProvided;
+}   PRV_ASYNCOPERATIONS;
+
+typedef struct {
+    unsigned char type;
+    unsigned char rsv1;
+    unsigned short length;
+    char implementationClassUID[DICOM_UI_LENGTH + 1];
+}   PRV_IMPLEMENTATIONCLASSUID;
+
+typedef struct {
+    unsigned char type;
+    unsigned char rsv1;
+    unsigned short length;
+    char implementationVersionName[16 + 1];
+}   PRV_IMPLEMENTATIONVERSIONNAME;
+
+typedef struct {
+    void *reserved[2];
+    unsigned char type;
+    unsigned char rsv1;
+    unsigned short length;
+    unsigned short UIDLength;
+    char SOPClassUID[DICOM_UI_LENGTH + 1];
+    unsigned char SCURole;
+    unsigned char SCPRole;
+}   PRV_SCUSCPROLE;
+
+typedef struct dul_presentationcontext {
+    void *reserved[2];
+    unsigned char type;
+    unsigned char rsv1;
+    unsigned short length;
+    unsigned char contextID;
+    unsigned char rsv2;
+    unsigned char result;
+    unsigned char rsv3;
+
+    DUL_SUBITEM abstractSyntax;
+    LST_HEAD *transferSyntaxList;
+}   PRV_PRESENTATIONCONTEXTITEM;
+
+typedef struct user_info {
+    void *reserved[2];
+    unsigned char type;
+    unsigned char rsv1;
+    unsigned short length;
+    DUL_MAXLENGTH maxLength;                             // 51H: maximum length
+    PRV_ASYNCOPERATIONS asyncOperations;                 // 53H: async operations (not yet implemented!)
+    DUL_SUBITEM implementationClassUID;                  // 52H: implementation class UID
+    DUL_SUBITEM implementationVersionName;               // 55H: implementation version name
+    LST_HEAD *SCUSCPRoleList;                            // 54H: SCP/SCU role selection
+    SOPClassExtendedNegotiationSubItemList *extNegList;  // 56H: extended negotiation
+                                                         // 57H: SOP CLASS COMMON EXTENDED NEGOTIATION (not implemented)
+    UserIdentityNegotiationSubItem *usrIdent;            // 58H: user identity negotiation RQ or AC
+}   DUL_USERINFO;
+
+typedef struct dul_associatepdu {
+    void *reserved[2];
+    unsigned char type;
+    unsigned char rsv1;
+    unsigned long length;
+    unsigned short protocol;
+    unsigned char rsv2[2];
+    char calledAPTitle[18];
+    char callingAPTitle[18];
+    unsigned char rsv3[32];
+
+    DUL_SUBITEM applicationContext;
+    LST_HEAD *presentationContextList;
+    DUL_USERINFO userInfo;
+}   PRV_ASSOCIATEPDU;
+
+typedef struct dul_rejectreleaseabortpdu {
+    void *reserved[2];
+    unsigned char type;
+    unsigned char rsv1;
+    unsigned long length;
+    unsigned char rsv2;
+    unsigned char result;
+    unsigned char source;
+    unsigned char reason;
+}   DUL_REJECTRELEASEABORTPDU;
+
+typedef struct dul_presentationdatavalue {
+    void *reserved[2];
+    unsigned long length;
+    unsigned char presentationContextID;
+    unsigned char messageControlHeader;
+    void *data;
+}   DUL_PRESENTATIONDATAVALUE;
+
+typedef struct dul_datapdu {
+    void *reserved[2];
+    unsigned char type;
+    unsigned char rsv1;
+    unsigned long length;
+    DUL_PRESENTATIONDATAVALUE presentationDataValue;
+}   DUL_DATAPDU;
+
+
+
+
+#define DUL_PROTOCOL      (unsigned short) 0x01
+
+#define DUL_TYPEAPPLICATIONCONTEXT  (unsigned char)0x10
+#define DUL_TYPEPRESENTATIONCONTEXTRQ (unsigned char)0x20
+#define DUL_TYPEPRESENTATIONCONTEXTAC (unsigned char)0x21
+#define DUL_TYPEABSTRACTSYNTAX    (unsigned char)0x30
+#define DUL_TYPETRANSFERSYNTAX    (unsigned char)0x40
+#define DUL_TYPEUSERINFO    (unsigned char)0x50
+#define DUL_TYPEMAXLENGTH   (unsigned char)0x51
+#define DUL_TYPEIMPLEMENTATIONCLASSUID  (unsigned char)0x52
+#define DUL_TYPEASYNCOPERATIONS   (unsigned char)0x53
+#define DUL_TYPESCUSCPROLE    (unsigned char)0x54
+#define DUL_TYPEIMPLEMENTATIONVERSIONNAME (unsigned char)0x55
+
+#define COPY_LONG_BIG(A,B) {  \
+  (B)[0] = (unsigned char)((A)>>24);    \
+  (B)[1] = (unsigned char)((A)>>16) ; \
+  (B)[2] = (unsigned char)((A)>>8) ;  \
+  (B)[3] = (unsigned char)(A) ; }
+#define COPY_SHORT_BIG(A,B) { \
+  (B)[0] = (unsigned char)((A)>>8);   \
+  (B)[1] = (unsigned char)(A) ; }
+
+#define EXTRACT_LONG_BIG(A,B) {     \
+  (B) = (unsigned long)(A)[3]       \
+    | (((unsigned long)(A)[2]) << 8)    \
+    | (((unsigned long)(A)[1]) << 16)   \
+    | (((unsigned long)(A)[0]) << 24);  \
+  }
+
+#define EXTRACT_SHORT_BIG(A,B)  { (B) = (unsigned short)(A)[1] | (((unsigned short)(A)[0]) << 8); }
+
+#endif // #ifndef DULSTRUC_H
diff --git a/dcmnet/include/dcmtk/dcmnet/helpers.h b/dcmnet/include/dcmtk/dcmnet/helpers.h
new file mode 100644 (file)
index 0000000..75a0bc1
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ *
+ *  Copyright (C) 2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were partly developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module: dcmnet
+ *
+ *  Author: Michael Onken
+ *
+ *  Purpose: Collection of helper functions
+ *
+ */
+
+#ifndef DCMNET_HELPERS_H
+#define DCMNET_HELPERS_H
+
+#include "dcmtk/ofstd/ofcond.h"
+#include "dcmtk/dcmnet/dulstruc.h"
+
+struct T_ASC_Parameters;
+class LST_HEAD;
+
+/** Destroys presentationContextList as used in dul_associatepdu
+ *  @param pcList The presentation context list to free (must not be NULL)
+ */
+void
+destroyAssociatePDUPresentationContextList(LST_HEAD ** pcList);
+
+
+/** Destroys userInfo as used in dul_associatepdu
+ *  @param userInfo The user information lists to free (must not be NULL)
+ */
+void
+destroyUserInformationLists(DUL_USERINFO * userInfo);
+
+#endif
index 17c54c1dfbccc8d272be481458c7fc69fc54ff42..9faf46ae93b741aea83d8dc18d8ba40f099b4eeb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2009-2020, OFFIS e.V.
+ *  Copyright (C) 2009-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -102,8 +102,8 @@ struct DCMTK_DCMNET_EXPORT DcmPresentationContextInfo
     DcmPresentationContextInfo()
         : presentationContextID(0)
         , abstractSyntax()
-        , proposedSCRole(0)
-        , acceptedSCRole(0)
+        , proposedSCRole(DUL_SC_ROLE_NONE)
+        , acceptedSCRole(DUL_SC_ROLE_NONE)
         , acceptedTransferSyntax()
     {
     }
@@ -113,9 +113,9 @@ struct DCMTK_DCMNET_EXPORT DcmPresentationContextInfo
     /// Abstract Syntax name (UID) as proposed by SCU
     OFString abstractSyntax;
     /// SCP role as proposed from SCU
-    Uint8 proposedSCRole;
+    DUL_SC_ROLE proposedSCRole;
     /// Role accepted by SCP for this Presentation Context
-    Uint8 acceptedSCRole;
+    DUL_SC_ROLE acceptedSCRole;
     /// Transfer Syntax accepted for this Presentation Context (UID)
     OFString acceptedTransferSyntax;
     // Fields "reserved" and "result" not included from DUL_PRESENTATIONCONTEXT
index ed902ddc12b459d9c35eb4ad839c07a7af29c42b..7ab209616d2846c5bd0466759426bf88a813b151 100644 (file)
@@ -1,5 +1,49 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmnet assoc cond dcasccff dcasccfg dccfenmp dccfpcmp dccfprmp dccfrsmp dccftsmp dccfuidh dcmlayer dcmtrans dcompat dimcancl dimcmd dimdump dimecho dimfind dimget dimmove dimse dimstore diutil dul dulconst dulextra dulfsm dulparse dulpres extneg lst dfindscu dstorscp dstorscu dcuserid scu scp scpthrd scpcfg scppool dwrap)
+DCMTK_ADD_LIBRARY(dcmnet
+  assoc.cc
+  cond.cc
+  dcasccff.cc
+  dcasccfg.cc
+  dccfenmp.cc
+  dccfpcmp.cc
+  dccfprmp.cc
+  dccfrsmp.cc
+  dccftsmp.cc
+  dccfuidh.cc
+  dcmlayer.cc
+  dcmtrans.cc
+  dcompat.cc
+  dcuserid.cc
+  dfindscu.cc
+  dimcancl.cc
+  dimcmd.cc
+  dimdump.cc
+  dimecho.cc
+  dimfind.cc
+  dimget.cc
+  dimmove.cc
+  dimse.cc
+  dimstore.cc
+  diutil.cc
+  dstorscp.cc
+  dstorscu.cc
+  dul.cc
+  dulconst.cc
+  dulextra.cc
+  dulfsm.cc
+  dulparse.cc
+  dulpres.cc
+  dwrap.c
+  extneg.cc
+  helpers.cc
+  lst.cc
+  scp.cc
+  scpcfg.cc
+  scppool.cc
+  scpthrd.cc
+  scu.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmnet ofstd oflog dcmdata)
 DCMTK_TARGET_LINK_LIBRARIES(dcmnet ${WRAP_LIBS})
+set_property(TARGET dcmnet PROPERTY OUTPUT_NAME "dcmnet${DCMTK_TLS_LIBRARY_POSTFIX}")
index 7400369e17a4bbab2952285423c9341f79104cb0..074202bb725b3bd6f30474e161beaa2c84e95b51 100644 (file)
@@ -1,9 +1,9 @@
 assoc.o: assoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dicom.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -14,7 +14,6 @@ assoc.o: assoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -62,17 +61,17 @@ assoc.o: assoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/dcmtrans.h \
- ../include/dcmtk/dcmnet/dcmlayer.h
+ ../include/dcmtk/dcmnet/helpers.h ../include/dcmtk/dcmnet/dulstruc.h
 cond.o: cond.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -96,7 +95,6 @@ dcasccff.o: dcasccff.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -151,7 +149,6 @@ dcasccfg.o: dcasccfg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -265,7 +262,6 @@ dccfrsmp.o: dccfrsmp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -368,12 +364,12 @@ dcmlayer.o: dcmlayer.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/dcmtrans.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h
 dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcmtrans.h \
- ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
- ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
@@ -381,18 +377,13 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../include/dcmtk/dcmnet/dcmlayer.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dntypes.h \
- ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
- ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
- ../include/dcmtk/dcmnet/cond.h \
+ ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/diutil.h \
+ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -407,6 +398,9 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
  ../../oflog/include/dcmtk/oflog/appender.h \
  ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../oflog/include/dcmtk/oflog/layout.h \
  ../../oflog/include/dcmtk/oflog/streams.h \
  ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
@@ -439,16 +433,14 @@ dcmtrans.o: dcmtrans.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/assoc.h \
  ../../ofstd/include/dcmtk/ofstd/oftimer.h
 dcompat.o: dcompat.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/dndefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dicom.h \
- ../include/dcmtk/dcmnet/cond.h \
+ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
@@ -482,6 +474,7 @@ dcompat.o: dcompat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
+ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oflimits.h \
@@ -524,7 +517,6 @@ dcuserid.o: dcuserid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -552,7 +544,8 @@ dcuserid.o: dcuserid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
- ../include/dcmtk/dcmnet/dntypes.h dulstruc.h
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dulstruc.h \
+ ../include/dcmtk/dcmnet/lst.h
 dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dfindscu.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -599,7 +592,6 @@ dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
@@ -632,11 +624,11 @@ dfindscu.o: dfindscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../../ofstd/include/dcmtk/ofstd/ofexit.h
 dimcancl.o: dimcancl.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -647,7 +639,6 @@ dimcancl.o: dimcancl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -697,7 +688,6 @@ dimcancl.o: dimcancl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/assoc.h
 dimcmd.o: dimcmd.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
@@ -705,6 +695,7 @@ dimcmd.o: dimcmd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
@@ -757,18 +748,17 @@ dimcmd.o: dimcmd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/assoc.h dimcmd.h
 dimdump.o: dimdump.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -779,7 +769,6 @@ dimdump.o: dimdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -829,11 +818,11 @@ dimdump.o: dimdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/assoc.h
 dimecho.o: dimecho.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -844,7 +833,6 @@ dimecho.o: dimecho.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -894,11 +882,11 @@ dimecho.o: dimecho.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/assoc.h
 dimfind.o: dimfind.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -909,7 +897,6 @@ dimfind.o: dimfind.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -959,11 +946,11 @@ dimfind.o: dimfind.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/assoc.h
 dimget.o: dimget.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -974,7 +961,6 @@ dimget.o: dimget.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1024,9 +1010,9 @@ dimget.o: dimget.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/assoc.h
 dimmove.o: dimmove.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/oftimer.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
@@ -1040,7 +1026,6 @@ dimmove.o: dimmove.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1090,11 +1075,11 @@ dimmove.o: dimmove.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/assoc.h
 dimse.o: dimse.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -1105,7 +1090,6 @@ dimse.o: dimse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1177,11 +1161,11 @@ dimse.o: dimse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfcache.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h
 dimstore.o: dimstore.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -1192,7 +1176,6 @@ dimstore.o: dimstore.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1244,13 +1227,13 @@ dimstore.o: dimstore.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrmf.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h
 diutil.o: diutil.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -1265,7 +1248,6 @@ diutil.o: diutil.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1434,15 +1416,14 @@ dstorscp.o: dstorscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
- ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
- ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.h \
- ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h
+ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
+ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dimse.h \
+ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/scpcfg.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h
 dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
@@ -1564,8 +1545,7 @@ dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/assoc.h \
  ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
- ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
+ ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
@@ -1574,10 +1554,10 @@ dstorscu.o: dstorscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.h
 dul.o: dul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/dicom.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -1588,7 +1568,6 @@ dul.o: dul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1636,13 +1615,14 @@ dul.o: dul.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
- ../include/dcmtk/dcmnet/assoc.h dulstruc.h dulpriv.h dulfsm.h \
- ../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h
+ ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dulstruc.h \
+ dulpriv.h dulfsm.h ../include/dcmtk/dcmnet/dcmtrans.h \
+ ../include/dcmtk/dcmnet/dcmlayer.h
 dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -1653,7 +1633,6 @@ dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1702,12 +1681,13 @@ dulconst.o: dulconst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
- ../include/dcmtk/dcmnet/assoc.h dulstruc.h dulpriv.h
+ ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dulstruc.h \
+ dulpriv.h
 dulextra.o: dulextra.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -1718,7 +1698,6 @@ dulextra.o: dulextra.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1749,8 +1728,8 @@ dulextra.o: dulextra.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/lst.h ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/dcmnet/dul.h ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/dntypes.h dulstruc.h dulpriv.h \
../include/dcmtk/dcmnet/dcmtrans.h ../include/dcmtk/dcmnet/dcmlayer.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dulstruc.h \
dulpriv.h ../include/dcmtk/dcmnet/dcmtrans.h \
  ../include/dcmtk/dcmnet/diutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -1769,8 +1748,8 @@ dulextra.o: dulextra.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/assoc.h
 dulfsm.o: dulfsm.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
@@ -1783,7 +1762,6 @@ dulfsm.o: dulfsm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1814,7 +1792,8 @@ dulfsm.o: dulfsm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/lst.h ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/dcmnet/dul.h ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/dntypes.h dulstruc.h dulpriv.h dulfsm.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dulstruc.h \
+ dulpriv.h dulfsm.h ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dcmtrans.h \
  ../include/dcmtk/dcmnet/dcmlayer.h ../include/dcmtk/dcmnet/diutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
@@ -1832,11 +1811,11 @@ dulfsm.o: dulfsm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
- ../include/dcmtk/dcmnet/dimse.h \
+ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/helpers.h \
  ../../ofstd/include/dcmtk/ofstd/ofsockad.h
 dulparse.o: dulparse.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -1855,7 +1834,6 @@ dulparse.o: dulparse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1898,7 +1876,8 @@ dulparse.o: dulparse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/assoc.h \
- dulstruc.h dulpriv.h
+ ../include/dcmtk/dcmnet/dulstruc.h ../include/dcmtk/dcmnet/helpers.h \
+ dulpriv.h
 dulpres.o: dulpres.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -1920,7 +1899,6 @@ dulpres.o: dulpres.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -1950,7 +1928,8 @@ dulpres.o: dulpres.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
- ../include/dcmtk/dcmnet/dntypes.h dulstruc.h dulpriv.h dulfsm.h
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dulstruc.h \
+ dulpriv.h dulfsm.h
 extneg.o: extneg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/extneg.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
@@ -1962,6 +1941,55 @@ extneg.o: extneg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/dcmnet/dndefine.h
+helpers.o: helpers.cc ../include/dcmtk/dcmnet/helpers.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../config/include/dcmtk/config/osconfig.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../include/dcmtk/dcmnet/dulstruc.h ../include/dcmtk/dcmnet/extneg.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcuserid.h \
+ ../include/dcmtk/dcmnet/dicom.h ../include/dcmtk/dcmnet/cond.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
+ ../include/dcmtk/dcmnet/dcompat.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dul.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h ../include/dcmtk/dcmnet/lst.h \
+ ../include/dcmtk/dcmnet/assoc.h
 lst.o: lst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/lst.h ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -2026,7 +2054,6 @@ scp.o: scp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
  ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
@@ -2101,7 +2128,11 @@ scp.o: scp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
  ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
  ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h
+ ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \
+ ../include/dcmtk/dcmnet/dcmlayer.h \
+ ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \
+ ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h
 scpcfg.o: scpcfg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -2120,7 +2151,6 @@ scpcfg.o: scpcfg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -2292,15 +2322,18 @@ scppool.o: scppool.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
- ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
- ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.h \
- ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h
+ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
+ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dimse.h \
+ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/scpcfg.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \
+ ../include/dcmtk/dcmnet/dcmlayer.h \
+ ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \
+ ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h
 scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/scpthrd.h ../include/dcmtk/dcmnet/scp.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
@@ -2420,15 +2453,14 @@ scpthrd.o: scpthrd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
- ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
- ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.h \
- ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h
+ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
+ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dimse.h \
+ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/scpcfg.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h
 scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrmf.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \
@@ -2483,7 +2515,6 @@ scu.o: scu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
index 66d8c527b0ba009fa29f02edf3dbe1cbada716ad..6499da2f93cf4ebc73a54b3b57356aa52865b036 100644 (file)
@@ -25,7 +25,7 @@ objs = assoc.o cond.o dcompat.o dimcancl.o dimcmd.o dimdump.o dimecho.o \
        dulfsm.o dulparse.o dulpres.o dul.o lst.o extneg.o dimget.o dcmlayer.o \
        dcmtrans.o dcasccfg.o dcasccff.o dccfuidh.o dccftsmp.o dccfpcmp.o \
        dccfrsmp.o dccfenmp.o dccfprmp.o dfindscu.o dstorscp.o dstorscu.o \
-       dcuserid.o scu.o scp.o scpcfg.o scpthrd.o scppool.o dwrap.o
+       dcuserid.o helpers.o scu.o scp.o scpcfg.o scpthrd.o scppool.o dwrap.o
 
 library = libdcmnet.$(LIBEXT)
 
index 6dbe4ef4d36ad1d1820ae2c30e385adcefffb23d..ccabdb38ea900bd016be39f9a4e5252e06d243cc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 #include "dcmtk/dcmnet/assoc.h"       /* always include the module header */
 #include "dcmtk/dcmnet/diutil.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#define INCLUDE_CERRNO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
 #include "dcmtk/ofstd/ofconsol.h"
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/dcmnet/dcmtrans.h"
+#include "dcmtk/dcmnet/helpers.h"
 
 /*
 ** Constant Definitions
@@ -284,7 +278,7 @@ ASC_createAssociationParameters(T_ASC_Parameters ** params,
 
     *params = (T_ASC_Parameters *) malloc(sizeof(**params));
     if (*params == NULL) return EC_MemoryExhausted;
-    bzero((char*)*params, sizeof(**params));
+    memset((char*)*params, 0, sizeof(**params));
 
     OFStandard::strlcpy((*params)->ourImplementationClassUID,
             OFFIS_IMPLEMENTATION_CLASS_UID,
@@ -343,36 +337,17 @@ ASC_createAssociationParameters(T_ASC_Parameters ** params,
     return EC_Normal;
 }
 
-static void
-destroyPresentationContextList(LST_HEAD ** lst)
-{
-    DUL_PRESENTATIONCONTEXT *pc;
-    DUL_TRANSFERSYNTAX *ts;
-
-    if ((lst == NULL) || (*lst == NULL))
-        return;
-    while ((pc = (DUL_PRESENTATIONCONTEXT*) LST_Dequeue(lst)) != NULL) {
-        if (pc->proposedTransferSyntax != NULL) {
-            while ((ts = (DUL_TRANSFERSYNTAX*) LST_Dequeue(&pc->proposedTransferSyntax)) != NULL) {
-                free(ts);
-            }
-            LST_Destroy(&pc->proposedTransferSyntax);
-        }
-        free(pc);
-    }
-    LST_Destroy(lst);
-}
 
 OFCondition
 ASC_destroyAssociationParameters(T_ASC_Parameters ** params)
 {
 
     /* free the elements in the requested presentation context list */
-    destroyPresentationContextList(
+    destroyDULParamPresentationContextList(
         &((*params)->DULparams.requestedPresentationContext));
 
     /* free the elements in the accepted presentation context list */
-    destroyPresentationContextList(
+    destroyDULParamPresentationContextList(
         &((*params)->DULparams.acceptedPresentationContext));
 
     /* free DUL parameters */
@@ -474,14 +449,57 @@ ASC_getRejectParameters(T_ASC_Parameters * params,
 {
     int reason;
     if (rejectParameters) {
-        rejectParameters->result =
-            (T_ASC_RejectParametersResult) params->DULparams.result;
-        rejectParameters->source =
-            (T_ASC_RejectParametersSource) params->DULparams.resultSource;
+
+        switch (params->DULparams.result)
+        {
+          case ASC_RESULT_REJECTEDPERMANENT:
+          case ASC_RESULT_REJECTEDTRANSIENT:
+            rejectParameters->result =
+              (T_ASC_RejectParametersResult) params->DULparams.result;
+            break;
+          default:
+            DCMNET_ERROR("Received invalid A-ASSOCIATE-RJ reject result 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0')
+              << STD_NAMESPACE setw(4) << params->DULparams.result << ", using default.");
+            rejectParameters->result = ASC_RESULT_REJECTEDPERMANENT;
+            break;
+        }
+
+        switch (params->DULparams.resultSource)
+        {
+          case ASC_SOURCE_SERVICEUSER:
+          case ASC_SOURCE_SERVICEPROVIDER_ACSE_RELATED:
+          case ASC_SOURCE_SERVICEPROVIDER_PRESENTATION_RELATED:
+            rejectParameters->source =
+                (T_ASC_RejectParametersSource) params->DULparams.resultSource;
+            break;
+          default:
+            DCMNET_ERROR("Received invalid A-ASSOCIATE-RJ reject source 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0')
+              << STD_NAMESPACE setw(4) << params->DULparams.resultSource << ", using default.");
+            rejectParameters->source = ASC_SOURCE_SERVICEUSER;
+            break;
+        }
 
         reason = params->DULparams.diagnostic |
             ((params->DULparams.resultSource & 0xff) << 8);
-        rejectParameters->reason = (T_ASC_RejectParametersReason) reason;
+
+        switch (reason)
+        {
+          case ASC_REASON_SU_NOREASON:
+          case ASC_REASON_SU_APPCONTEXTNAMENOTSUPPORTED:
+          case ASC_REASON_SU_CALLINGAETITLENOTRECOGNIZED:
+          case ASC_REASON_SU_CALLEDAETITLENOTRECOGNIZED:
+          case ASC_REASON_SP_ACSE_NOREASON:
+          case ASC_REASON_SP_ACSE_PROTOCOLVERSIONNOTSUPPORTED:
+          case ASC_REASON_SP_PRES_TEMPORARYCONGESTION:
+          case ASC_REASON_SP_PRES_LOCALLIMITEXCEEDED:
+            rejectParameters->reason = (T_ASC_RejectParametersReason) reason;
+            break;
+          default:
+            DCMNET_ERROR("Received invalid A-ASSOCIATE-RJ reject reason 0x" << STD_NAMESPACE hex << STD_NAMESPACE setfill('0')
+              << STD_NAMESPACE setw(4) << reason << ", using default.");
+            rejectParameters->reason = ASC_REASON_SU_NOREASON;
+            break;
+        }
     }
     return EC_Normal;
 }
@@ -743,7 +761,7 @@ ASC_getPresentationContext(T_ASC_Parameters * params,
     int count = 0;
 
     /* make the presentation context structure clean */
-    bzero((char*)presentationContext, sizeof(*presentationContext));
+    memset((char*)presentationContext, 0, sizeof(*presentationContext));
 
     if (params->DULparams.requestedPresentationContext == NULL)
     {
@@ -804,7 +822,7 @@ ASC_getPresentationContext(T_ASC_Parameters * params,
         transfer = (DUL_TRANSFERSYNTAX*) LST_Next(l);
     }
 
-    presentationContext->transferSyntaxCount = count;
+    presentationContext->transferSyntaxCount = OFstatic_cast(unsigned char, count);
 
     return EC_Normal;
 }
@@ -911,7 +929,7 @@ ASC_refusePresentationContext(
     if (proposedContext == NULL) return ASC_BADPRESENTATIONCONTEXTID;
 
     /* we want to mark this proposed context as being refused */
-    proposedContext->result = resultReason;
+    proposedContext->result = OFstatic_cast(unsigned char, resultReason);
 
     acceptedContext = findPresentationContextID(
                               params->DULparams.acceptedPresentationContext,
@@ -919,7 +937,7 @@ ASC_refusePresentationContext(
 
     if (acceptedContext != NULL) {
         /* it is already in the list, mark it as refused */
-        acceptedContext->result = resultReason;
+        acceptedContext->result = OFstatic_cast(unsigned char, resultReason);
         OFStandard::strlcpy(acceptedContext->abstractSyntax,
                proposedContext->abstractSyntax, sizeof(acceptedContext->abstractSyntax));
         /* we must send back a transfer syntax even though this
@@ -943,7 +961,7 @@ ASC_refusePresentationContext(
         cond = DUL_MakePresentationCtx(
             &acceptedContext,
             DUL_SC_ROLE_DEFAULT, DUL_SC_ROLE_DEFAULT,
-            presentationContextID, resultReason,
+            presentationContextID, OFstatic_cast(unsigned char, resultReason),
             proposedContext->abstractSyntax,
             UID_LittleEndianImplicitTransferSyntax, NULL);
         if (cond.bad()) return cond;
@@ -1002,7 +1020,7 @@ ASC_findAcceptedPresentationContext(
     presentationContext->proposedRole = dulRole2ascRole(pc->proposedSCRole);
     presentationContext->acceptedRole = dulRole2ascRole(pc->acceptedSCRole);
 
-    presentationContext->transferSyntaxCount = count;
+    presentationContext->transferSyntaxCount = OFstatic_cast(unsigned char, count);
     OFStandard::strlcpy(presentationContext->acceptedTransferSyntax, pc->acceptedTransferSyntax, sizeof(DIC_UI));
 
     return EC_Normal;
@@ -1706,8 +1724,7 @@ ASC_destroyAssociation(T_ASC_Association ** association)
     }
 
     if ((*association)->params != NULL) {
-        cond = ASC_destroyAssociationParameters(&(*association)->params);
-        if (cond.bad()) return cond;
+        ASC_destroyAssociationParameters(&(*association)->params);
     }
 
     if ((*association)->sendPDVBuffer != NULL)
@@ -1753,7 +1770,7 @@ ASC_receiveAssociation(T_ASC_Network * network,
         ASC_destroyAssociationParameters(&params);
         return EC_MemoryExhausted;
     }
-    bzero((char*)*assoc, sizeof(**assoc));
+    memset((char*)*assoc, 0, sizeof(**assoc));
 
     (*assoc)->params = params;
     (*assoc)->nextMsgID = 1;
@@ -1890,7 +1907,7 @@ ASC_requestAssociation(T_ASC_Network * network,
 
     *assoc = (T_ASC_Association *) malloc(sizeof(**assoc));
     if (*assoc == NULL) return EC_MemoryExhausted;
-    bzero((char*)*assoc, sizeof(**assoc));
+    memset((char*)*assoc, 0, sizeof(**assoc));
 
     (*assoc)->params = params;
     (*assoc)->nextMsgID = 1;
@@ -2130,7 +2147,6 @@ ASC_dropSCPAssociation(T_ASC_Association * association, int timeout)
 }
 
 
-
 OFCondition
 ASC_dropAssociation(T_ASC_Association * association)
 {
@@ -2143,6 +2159,16 @@ ASC_dropAssociation(T_ASC_Association * association)
 }
 
 
+OFCondition
+ASC_closeTransportConnection(T_ASC_Association * association)
+{
+    /* if already dead don't worry */
+    if (association == NULL) return EC_Normal;
+    if (association->DULassociation == NULL) return EC_Normal;
+
+    return DUL_CloseTransportConnection(&association->DULassociation);
+}
+
 
 OFCondition
 ASC_setTransportLayerType(
@@ -2216,3 +2242,23 @@ ASC_dumpConnectionParameters(T_ASC_Association *association, STD_NAMESPACE ostre
     ASC_dumpConnectionParameters(str, association);
     outstream << str << OFendl;
 }
+
+void
+destroyDULParamPresentationContextList(LST_HEAD ** lst)
+{
+    DUL_PRESENTATIONCONTEXT *pc;
+    DUL_TRANSFERSYNTAX *ts;
+
+    if ((lst == NULL) || (*lst == NULL))
+        return;
+    while ((pc = (DUL_PRESENTATIONCONTEXT*) LST_Dequeue(lst)) != NULL) {
+        if (pc->proposedTransferSyntax != NULL) {
+            while ((ts = (DUL_TRANSFERSYNTAX*) LST_Dequeue(&pc->proposedTransferSyntax)) != NULL) {
+                free(ts);
+            }
+            LST_Destroy(&pc->proposedTransferSyntax);
+        }
+        free(pc);
+    }
+    LST_Destroy(lst);
+}
index 1376c10bba5967c53e1e89255c5910c7658822cf..850f3d7294a0c575340073925a9b325df9cf25b0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -23,8 +23,8 @@
 #include "dcmtk/dcmnet/cond.h"
 #include "dcmtk/ofstd/ofstream.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
+// #define INCLUDE_CSTDIO
+// #include "dcmtk/ofstd/ofstdinc.h"
 
 makeOFConditionConst(ASC_BADPRESENTATIONCONTEXTID,      OFM_dcmnet, ASCC_BADPRESENTATIONCONTEXTID,      OF_error, "ASC Bad presentation context ID");
 makeOFConditionConst(ASC_MISSINGTRANSFERSYNTAX,         OFM_dcmnet, ASCC_MISSINGTRANSFERSYNTAX,         OF_error, "ASC Missing transfer syntax");
index 49e1587243610e3526cbbd9e8489e9d14c01be00..57b3d0b14d7db83b81e6e5e3addbb1ca11de0dcf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2013, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcerror.h"  /* for EC_IllegalCall */
 #include "dcmtk/ofstd/ofconfig.h"   /* for class OFConfigFile */
 
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /* config file keys for the association configuration */
 
 #define L2_EXTENDEDNEGOTIATION         "EXTENDEDNEGOTIATION"
index 29d9c8609b1026beb5bff92931e7a5ea0c1c15d1..702983b088cbc8bde6e65863df83439c8914cbb4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2012, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -162,9 +162,10 @@ OFCondition DcmExtendedNegotiationMap::add(
   OFMap<OFString, DcmExtendedNegotiationList*>::iterator it = map_.find(skey);
 
   DcmExtendedNegotiationList * const *value = NULL;
+  DcmExtendedNegotiationList *newentry = NULL;
   if (it == map_.end())
   {
-    DcmExtendedNegotiationList *newentry = new DcmExtendedNegotiationList();
+    newentry = new DcmExtendedNegotiationList();
     map_.insert(OFPair<OFString, DcmExtendedNegotiationList*>(skey, newentry));
     value = &newentry;
   }
index f4730ea93669d6a50e628c5fd8fd5778fde59209..2a5cca4b8431719d7c8fec1350f7fd1dd219f54e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2017, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -123,10 +123,11 @@ OFCondition DcmRoleSelectionMap::add(
   DcmRoleSelectionList * const *value = NULL;
   OFString skey(key);
   OFMap<OFString, DcmRoleSelectionList*>::iterator it = map_.find(skey);
+  DcmRoleSelectionList *newentry = NULL;
 
   if (it == map_.end())
   {
-    DcmRoleSelectionList *newentry = new DcmRoleSelectionList();
+    newentry = new DcmRoleSelectionList();
     map_.insert(OFPair<OFString, DcmRoleSelectionList*>(skey, newentry));
     value = &newentry;
   }
index 9043758f0451e605a80770bf6efcba8b07aff887..51156a0398b37cccbfeb7fd5bd267f1fbabe1498 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2013, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,9 +26,6 @@
 #include "dcmtk/dcmdata/dcuid.h"    /* for dcmFindUIDFromName() */
 #include "dcmtk/dcmdata/dcxfer.h"   /* for gLocalByteOrder */
 
-#define INCLUDE_CSTRING             /* for strcmp() */
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #define SymbolicUID_LocalEndianExplicit    "LocalEndianExplicit"
 #define SymbolicUID_OppositeEndianExplicit "OppositeEndianExplicit"
 
index 0c8b2b4ea6fab463d2f31c4395f92fdf2ba279e4..a29121a24b16be9dc04fed2c96128ee2ec58d0f6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmnet/diutil.h"
 #include "dcmtk/ofstd/ofvector.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CTIME
-#define INCLUDE_CERRNO
-#define INCLUDE_CSIGNAL
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/ofstd/oftimer.h"
 
 BEGIN_EXTERN_C
@@ -75,9 +68,15 @@ DcmTransportConnection::DcmTransportConnection(DcmNativeSocketType openSocket)
 {
   if (theSocket >= 0)
   {
+
 #ifdef DISABLE_SEND_TIMEOUT
+#ifdef _MSC_VER
+#pragma message("Warning: The macro DISABLE_SEND_TIMEOUT is not supported anymore. See 'macros.txt' for details.")
+#else
 #warning The macro DISABLE_SEND_TIMEOUT is not supported anymore. See "macros.txt" for details.
 #endif
+#endif
+
     /* get global timeout for the send() function */
     const Sint32 sendTimeout = dcmSocketSendTimeout.get();
     if (sendTimeout >= 0)
@@ -105,8 +104,13 @@ DcmTransportConnection::DcmTransportConnection(DcmNativeSocketType openSocket)
       }
     }
 #ifdef DISABLE_RECV_TIMEOUT
+#ifdef _MSC_VER
+#pragma message("Warning: The macro DISABLE_RECV_TIMEOUT is not supported anymore. See 'macros.txt' for details.")
+#else
 #warning The macro DISABLE_RECV_TIMEOUT is not supported anymore. See "macros.txt" for details.
 #endif
+#endif
+
     /* get global timeout for the recv() function */
     const Sint32 recvTimeout = dcmSocketReceiveTimeout.get();
     if (recvTimeout >= 0)
@@ -319,19 +323,19 @@ DcmTCPConnection::~DcmTCPConnection()
   close();
 }
 
-DcmTransportLayerStatus DcmTCPConnection::serverSideHandshake()
+OFCondition DcmTCPConnection::serverSideHandshake()
 {
-  return TCS_ok;
+  return EC_Normal;
 }
 
-DcmTransportLayerStatus DcmTCPConnection::clientSideHandshake()
+OFCondition DcmTCPConnection::clientSideHandshake()
 {
-  return TCS_ok;
+  return EC_Normal;
 }
 
-DcmTransportLayerStatus DcmTCPConnection::renegotiate(const char * /* newSuite */ )
+OFCondition DcmTCPConnection::renegotiate(const char * /* newSuite */ )
 {
-  return TCS_ok;
+  return EC_Normal;
 }
 
 ssize_t DcmTCPConnection::read(void *buf, size_t nbyte)
@@ -354,7 +358,12 @@ ssize_t DcmTCPConnection::write(void *buf, size_t nbyte)
 
 void DcmTCPConnection::close()
 {
-  if (getSocket() != -1)
+  closeTransportConnection();
+}
+
+void DcmTCPConnection::closeTransportConnection()
+{
+  if (getSocket() != OFstatic_cast(DcmNativeSocketType, (-1)))
   {
 #ifdef HAVE_WINSOCK_H
     (void) shutdown(getSocket(), 1 /* SD_SEND */);
@@ -363,7 +372,7 @@ void DcmTCPConnection::close()
     (void) ::close(getSocket());
 #endif
   /* forget about this socket (now closed) */
-    setSocket(-1);
+    setSocket(OFstatic_cast(DcmNativeSocketType, (-1)));
   }
 }
 
@@ -404,7 +413,7 @@ OFBool DcmTCPConnection::networkDataAvailable(int timeout)
       t.tv_usec = 0;
 
 #ifdef DCMTK_HAVE_POLL
-  struct pollfd pfd[] = 
+  struct pollfd pfd[] =
   {
     { getSocket(), POLLIN, 0 }
   };
@@ -463,27 +472,3 @@ OFString& DcmTCPConnection::dumpConnectionParameters(OFString& str)
   str = "Transport connection: TCP/IP, unencrypted.";
   return str;
 }
-
-const char *DcmTCPConnection::errorString(DcmTransportLayerStatus code)
-{
-  switch (code)
-  {
-    case TCS_ok:
-      return "no error";
-      /* break; */
-    case TCS_noConnection:
-      return "no secure connection in place";
-      /* break; */
-    case TCS_tlsError:
-      return "TLS error";
-      /* break; */
-    case TCS_illegalCall:
-      return "illegal call";
-      /* break; */
-    case TCS_unspecifiedError:
-      return "unspecified error";
-      /* break; */
-  }
-  return "unknown error code";
-}
-
index e235b9f745a87f04d1608b441346007e059d5f64..69c8b52630f1b26c47fcc5656e664d6dd8ec7714 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2017, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/dcmnet/diutil.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_UNIX_H
 #if defined(macintosh) && defined (HAVE_WINSOCK_H)
 /* unix.h defines timeval incompatible with winsock.h */
@@ -306,7 +300,7 @@ int gethostname(char* name, int namelen)
     struct utsname uts;
     int rc;
 
-    bzero(&uts, sizeof(uts));
+    memset(&uts, 0, sizeof(uts));
     rc = utsname(&uts);
     if (rc >= 0) {
        strncpy(name, uts.nodename, namelen);
index 6a2d72a20dd2a197965a35330ab45f8ba479dd15..f1530fe79b5e60c29dc57d865c9f8aa523ca37e1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2018, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -23,7 +23,7 @@
 #include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
 #include "dcmtk/dcmnet/dcuserid.h"
 #include "dcmtk/dcmnet/dul.h"
-#include "dulstruc.h"
+#include "dcmtk/dcmnet/dulstruc.h"
 
 /* ************************************************************************* */
 /*       Implementation of class UserIdentityNegotiationSubItem              */
index 8af0721a36b4ce9623895ff85223129caa62c9f3..17d726d0e5a44b90d57e340e9c9111d3c5fc57c9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/dcmnet/dfindscu.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#define INCLUDE_CERRNO
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/dcmnet/diutil.h"
 #include "dcmtk/dcmdata/dcfilefo.h"
 #include "dcmtk/dcmdata/dcdicent.h"
@@ -153,23 +147,28 @@ void DcmFindSCUDefaultCallback::callback(
                 {
                     OFCondition cond = EC_Normal;
                     size_t writeFlags = 0;
+                    OFString csetString;
                     DCMNET_DEBUG("Writing response dataset to XML file");
                     /* expect that (0008,0005) is set if extended characters are used */
-                    if (responseIdentifiers->tagExistsWithValue(DCM_SpecificCharacterSet))
+                    if (responseIdentifiers->findAndGetOFStringArray(DCM_SpecificCharacterSet, csetString).good())
                     {
+                        /* for ASCII and UTF-8, there is no need to convert the character strings */
+                        if (!csetString.empty() && (csetString != "ISO_IR 192"))
+                        {
 #ifdef DCMTK_ENABLE_CHARSET_CONVERSION
-                        DCMNET_DEBUG("Converting all element values that are affected by SpecificCharacterSet (0008,0005) to UTF-8");
-                        cond = responseIdentifiers->convertToUTF8();
+                            DCMNET_DEBUG("Converting all element values that are affected by SpecificCharacterSet (0008,0005) to UTF-8");
+                            cond = responseIdentifiers->convertToUTF8();
 #else
-                        if (responseIdentifiers->containsExtendedCharacters(OFFalse /*checkAllStrings*/))
-                        {
-                            DCMNET_WARN("No support for character set conversion available ... quoting non-ASCII characters");
-                            /* make sure that non-ASCII characters are quoted appropriately */
-                            writeFlags |= DCMTypes::XF_convertNonASCII;
-                        } else {
-                            DCMNET_DEBUG("No support for character set conversion available");
-                        }
+                            if (responseIdentifiers->containsExtendedCharacters(OFFalse /*checkAllStrings*/))
+                            {
+                                DCMNET_WARN("No support for character set conversion available ... quoting non-ASCII characters");
+                                /* make sure that non-ASCII characters are quoted appropriately */
+                                writeFlags |= DCMTypes::XF_convertNonASCII;
+                            } else {
+                                DCMNET_DEBUG("No support for character set conversion available");
+                            }
 #endif
+                        }
                     }
                     /* write response dataset to XML file */
                     if (cond.good())
@@ -711,7 +710,7 @@ OFCondition DcmFindSCU::findSCU(
     int n = repeatCount;
 
     /* prepare C-FIND-RQ message */
-    bzero(OFreinterpret_cast(char*, &req), sizeof(req));
+    memset(OFreinterpret_cast(char*, &req), 0, sizeof(req));
     OFStandard::strlcpy(req.AffectedSOPClassUID, abstractSyntax, sizeof(req.AffectedSOPClassUID));
     req.DataSetType = DIMSE_DATASET_PRESENT;
     req.Priority = DIMSE_PRIORITY_MEDIUM;
index 5866c45b3551aeccd7b00dd23658ceb1a4939843..68ff8b8f01c2b20f8575ef4a2681eb61257b1896 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2010, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
@@ -100,7 +94,7 @@ DIMSE_sendCancelRequest(T_ASC_Association * assoc,
        T_ASC_PresentationContextID presId, DIC_US msgId)
 {
     T_DIMSE_Message req;
-    bzero((char*)&req, sizeof(req));
+    memset((char*)&req, 0, sizeof(req));
 
     req.CommandField = DIMSE_C_CANCEL_RQ;
     req.msg.CCancelRQ.MessageIDBeingRespondedTo = msgId;
index 06312d3e8b40d586455c1718a0431e32522bb8a0..31dad0c389de16e251f7dfa5d7c17dd4c6eb8c79 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#define INCLUDE_CERRNO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
@@ -483,7 +476,7 @@ parseCommonRSP(DcmDataset *obj, Uint16 *command,
 static OFCondition
 buildCEchoRQ(T_DIMSE_C_EchoRQ * e, DcmDataset * obj)
 {
-    OFCondition cond = buildCommonRQ(obj, DIMSE_C_ECHO_RQ, e->MessageID, e->DataSetType); RET(cond);
+    OFCondition cond = buildCommonRQ(obj, DIMSE_C_ECHO_RQ, e->MessageID, OFstatic_cast(Uint16, e->DataSetType)); RET(cond);
     cond = addString(obj, DCM_AffectedSOPClassUID, e->AffectedSOPClassUID, OFFalse); RET(cond);
 
     return cond;
@@ -523,7 +516,7 @@ buildCEchoRSP(T_DIMSE_C_EchoRSP * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRSP(obj, DIMSE_C_ECHO_RSP,
         e->MessageIDBeingRespondedTo,
-        e->DataSetType, e->DimseStatus); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond);
 
     /* build optional items */
     if (e->opts & O_ECHO_AFFECTEDSOPCLASSUID) {
@@ -571,7 +564,7 @@ static OFCondition
 buildCStoreRQ(T_DIMSE_C_StoreRQ * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRQ(obj, DIMSE_C_STORE_RQ, e->MessageID,
-        e->DataSetType); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType)); RET(cond);
 
     /* build other mandatory items */
     cond = addString(obj, DCM_AffectedSOPClassUID,
@@ -579,7 +572,7 @@ buildCStoreRQ(T_DIMSE_C_StoreRQ * e, DcmDataset * obj)
     cond = addString(obj, DCM_AffectedSOPInstanceUID,
         e->AffectedSOPInstanceUID, OFFalse); RET(cond);
     cond = addUS(obj, DCM_Priority,
-        e->Priority); RET(cond);
+        OFstatic_cast(Uint16, e->Priority)); RET(cond);
 
     /* build optional items */
     if (e->opts & O_STORE_MOVEORIGINATORAETITLE) {
@@ -646,7 +639,7 @@ buildCStoreRSP(T_DIMSE_C_StoreRSP * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRSP(obj, DIMSE_C_STORE_RSP,
         e->MessageIDBeingRespondedTo,
-        e->DataSetType, e->DimseStatus); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond);
 
     /* build optional items */
     if (e->opts & O_STORE_AFFECTEDSOPCLASSUID) {
@@ -711,13 +704,13 @@ buildCFindRQ(T_DIMSE_C_FindRQ * e, DcmDataset * obj)
 {
 
     OFCondition cond = buildCommonRQ(obj, DIMSE_C_FIND_RQ, e->MessageID,
-        e->DataSetType); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType)); RET(cond);
 
     /* build other mandatory items */
     cond = addString(obj, DCM_AffectedSOPClassUID,
         e->AffectedSOPClassUID, OFFalse); RET(cond);
     cond = addUS(obj, DCM_Priority,
-        e->Priority); RET(cond);
+        OFstatic_cast(Uint16, e->Priority)); RET(cond);
 
     return cond;
 }
@@ -760,7 +753,7 @@ buildCFindRSP(T_DIMSE_C_FindRSP * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRSP(obj, DIMSE_C_FIND_RSP,
         e->MessageIDBeingRespondedTo,
-        e->DataSetType, e->DimseStatus); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond);
 
     /* build optional items */
     if (e->opts & O_FIND_AFFECTEDSOPCLASSUID) {
@@ -808,13 +801,13 @@ static OFCondition
 buildCGetRQ(T_DIMSE_C_GetRQ * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRQ(obj, DIMSE_C_GET_RQ, e->MessageID,
-        e->DataSetType); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType)); RET(cond);
 
     /* build other mandatory items */
     cond = addString(obj, DCM_AffectedSOPClassUID,
         e->AffectedSOPClassUID, OFFalse); RET(cond);
     cond = addUS(obj, DCM_Priority,
-        e->Priority); RET(cond);
+        OFstatic_cast(Uint16, e->Priority)); RET(cond);
 
     return cond;
 }
@@ -857,7 +850,7 @@ buildCGetRSP(T_DIMSE_C_GetRSP * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRSP(obj, DIMSE_C_GET_RSP,
         e->MessageIDBeingRespondedTo,
-        e->DataSetType, e->DimseStatus); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond);
 
     /* build optional items */
     if (e->opts & O_GET_AFFECTEDSOPCLASSUID) {
@@ -937,12 +930,12 @@ static OFCondition
 buildCMoveRQ(T_DIMSE_C_MoveRQ * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRQ(obj, DIMSE_C_MOVE_RQ, e->MessageID,
-        e->DataSetType); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType)); RET(cond);
 
     /* build other mandatory items */
     cond = addString(obj, DCM_AffectedSOPClassUID,
         e->AffectedSOPClassUID, OFFalse); RET(cond);
-    cond = addUS(obj, DCM_Priority, e->Priority); RET(cond);
+    cond = addUS(obj, DCM_Priority, OFstatic_cast(Uint16, e->Priority)); RET(cond);
     cond = addString(obj, DCM_MoveDestination, e->MoveDestination, OFFalse); RET(cond);
 
     return cond;
@@ -988,7 +981,7 @@ buildCMoveRSP(T_DIMSE_C_MoveRSP * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRSP(obj, DIMSE_C_MOVE_RSP,
         e->MessageIDBeingRespondedTo,
-        e->DataSetType, e->DimseStatus); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond);
 
     /* build optional items */
     if (e->opts & O_MOVE_AFFECTEDSOPCLASSUID) {
@@ -1070,7 +1063,7 @@ buildCCancelRQ(T_DIMSE_C_CancelRQ * e, DcmDataset * obj)
     OFCondition cond = addUS(obj, DCM_CommandField, DIMSE_C_CANCEL_RQ); RET(cond);
     cond = addUS(obj, DCM_MessageIDBeingRespondedTo,
         e->MessageIDBeingRespondedTo); RET(cond);
-    cond = addUS(obj, DCM_CommandDataSetType, e->DataSetType); RET(cond);
+    cond = addUS(obj, DCM_CommandDataSetType, OFstatic_cast(Uint16, e->DataSetType)); RET(cond);
 
     return EC_Normal;
 }
@@ -1109,7 +1102,7 @@ static OFCondition
 buildNEventReportRQ(T_DIMSE_N_EventReportRQ * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRQ(obj, DIMSE_N_EVENT_REPORT_RQ, e->MessageID,
-        e->DataSetType); RET(cond);
+       OFstatic_cast(Uint16,  e->DataSetType)); RET(cond);
     cond = addString(obj, DCM_AffectedSOPClassUID,
         e->AffectedSOPClassUID, OFFalse); RET(cond);
     cond = addString(obj, DCM_AffectedSOPInstanceUID,
@@ -1158,7 +1151,7 @@ buildNEventReportRSP(T_DIMSE_N_EventReportRSP * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRSP(obj, DIMSE_N_EVENT_REPORT_RSP,
         e->MessageIDBeingRespondedTo,
-        e->DataSetType, e->DimseStatus); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond);
 
     /* build optional items */
     if (e->opts & O_NEVENTREPORT_AFFECTEDSOPCLASSUID) {
@@ -1221,7 +1214,7 @@ static OFCondition
 buildNGetRQ(T_DIMSE_N_GetRQ * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRQ(obj, DIMSE_N_GET_RQ, e->MessageID,
-        e->DataSetType); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType)); RET(cond);
     cond = addString(obj, DCM_RequestedSOPClassUID,
         e->RequestedSOPClassUID, OFFalse); RET(cond);
     cond = addString(obj, DCM_RequestedSOPInstanceUID,
@@ -1274,7 +1267,7 @@ static OFCondition
 buildNGetRSP(T_DIMSE_N_GetRSP * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRSP(obj, DIMSE_N_GET_RSP, e->MessageIDBeingRespondedTo,
-        e->DataSetType, e->DimseStatus); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond);
 
     /* build optional items */
     if (e->opts & O_NGET_AFFECTEDSOPCLASSUID) {
@@ -1330,7 +1323,7 @@ static OFCondition
 buildNSetRQ(T_DIMSE_N_SetRQ * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRQ(obj, DIMSE_N_SET_RQ, e->MessageID,
-        e->DataSetType); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType)); RET(cond);
     cond = addString(obj, DCM_RequestedSOPClassUID,
         e->RequestedSOPClassUID, OFFalse); RET(cond);
     cond = addString(obj, DCM_RequestedSOPInstanceUID,
@@ -1373,7 +1366,7 @@ static OFCondition
 buildNSetRSP(T_DIMSE_N_SetRSP * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRSP(obj, DIMSE_N_SET_RSP, e->MessageIDBeingRespondedTo,
-        e->DataSetType, e->DimseStatus); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond);
 
     /* build optional items */
     if (e->opts & O_NSET_AFFECTEDSOPCLASSUID) {
@@ -1429,7 +1422,7 @@ static OFCondition
 buildNActionRQ(T_DIMSE_N_ActionRQ * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRQ(obj, DIMSE_N_ACTION_RQ, e->MessageID,
-        e->DataSetType); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType)); RET(cond);
     cond = addString(obj, DCM_RequestedSOPClassUID,
         e->RequestedSOPClassUID, OFFalse); RET(cond);
     cond = addString(obj, DCM_RequestedSOPInstanceUID,
@@ -1478,7 +1471,7 @@ buildNActionRSP(T_DIMSE_N_ActionRSP * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRSP(obj, DIMSE_N_ACTION_RSP,
         e->MessageIDBeingRespondedTo,
-        e->DataSetType, e->DimseStatus); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond);
 
     /* build optional items */
     if (e->opts & O_NACTION_AFFECTEDSOPCLASSUID) {
@@ -1541,7 +1534,7 @@ static OFCondition
 buildNCreateRQ(T_DIMSE_N_CreateRQ * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRQ(obj, DIMSE_N_CREATE_RQ, e->MessageID,
-        e->DataSetType); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType)); RET(cond);
     cond = addString(obj, DCM_AffectedSOPClassUID,
         e->AffectedSOPClassUID, OFFalse); RET(cond);
     /* build optional items */
@@ -1593,7 +1586,7 @@ buildNCreateRSP(T_DIMSE_N_CreateRSP * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRSP(obj, DIMSE_N_CREATE_RSP,
         e->MessageIDBeingRespondedTo,
-        e->DataSetType, e->DimseStatus); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond);
 
     /* build optional items */
     if (e->opts & O_NCREATE_AFFECTEDSOPCLASSUID) {
@@ -1649,7 +1642,7 @@ static OFCondition
 buildNDeleteRQ(T_DIMSE_N_DeleteRQ * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRQ(obj, DIMSE_N_DELETE_RQ, e->MessageID,
-        e->DataSetType); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType)); RET(cond);
     cond = addString(obj, DCM_RequestedSOPClassUID,
         e->RequestedSOPClassUID, OFFalse); RET(cond);
     cond = addString(obj, DCM_RequestedSOPInstanceUID,
@@ -1693,7 +1686,7 @@ buildNDeleteRSP(T_DIMSE_N_DeleteRSP * e, DcmDataset * obj)
 {
     OFCondition cond = buildCommonRSP(obj, DIMSE_N_DELETE_RSP,
         e->MessageIDBeingRespondedTo,
-        e->DataSetType, e->DimseStatus); RET(cond);
+        OFstatic_cast(Uint16, e->DataSetType), e->DimseStatus); RET(cond);
 
     /* build optional items */
     if (e->opts & O_NDELETE_AFFECTEDSOPCLASSUID) {
@@ -1881,7 +1874,7 @@ DIMSE_parseCmdObject(T_DIMSE_Message *msg, DcmDataset *obj)
     }
 
     /* initialize msg structure */
-    bzero((char*)msg, sizeof(*msg));
+    memset((char*)msg, 0, sizeof(*msg));
     msg->CommandField = (T_DIMSE_Command)cmd;
 
     /* depending on the command, parse the rest of obj */
index 8c647b63a3a831f02fc9d2bded1c66fad20ea8bc..f13ec187b6b40117c82face9c0cc557c5a12f542 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2020, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
index 5fde574eb6ae6803d5687a59e86631c22e71fae8..cb5fe4528e46e3e4305b78105d89c30d7c9bc32c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmnet/diutil.h"
 #include "dcmtk/dcmnet/dimse.h"     /* always include the module header */
 #include "dcmtk/dcmnet/cond.h"
@@ -117,8 +112,8 @@ DIMSE_echoUser(
         return makeDcmnetCondition(DIMSEC_NOVALIDPRESENTATIONCONTEXTID, OF_error, buf);
     }
 
-    bzero((char*)&req, sizeof(req));
-    bzero((char*)&rsp, sizeof(rsp));
+    memset((char*)&req, 0, sizeof(req));
+    memset((char*)&rsp, 0, sizeof(rsp));
 
     req.CommandField = DIMSE_C_ECHO_RQ;
     req.msg.CEchoRQ.MessageID = msgId;
@@ -159,7 +154,7 @@ DIMSE_sendEchoResponse(T_ASC_Association * assoc,
 {
     T_DIMSE_Message rsp;
 
-    bzero((char*)&rsp, sizeof(rsp));
+    memset((char*)&rsp, 0, sizeof(rsp));
 
     rsp.CommandField = DIMSE_C_ECHO_RSP;
     rsp.msg.CEchoRSP.MessageIDBeingRespondedTo = req->MessageID;
index 1fd98e2f7b4988917ed530b13ee1172ecc9cc0e8..b9d49409621b24bdf29b09d31576281a1981a9c3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
@@ -150,8 +144,8 @@ DIMSE_findUser(
     if (requestIdentifiers == NULL) return DIMSE_NULLKEY;
 
     /* initialize the variables which represent DIMSE C-FIND-RQ and DIMSE C-FIND-RSP messages */
-    bzero((char*)&req, sizeof(req));
-    bzero((char*)&rsp, sizeof(rsp));
+    memset((char*)&req, 0, sizeof(req));
+    memset((char*)&rsp, 0, sizeof(rsp));
 
     /* set corresponding values in the request message variable */
     req.CommandField = DIMSE_C_FIND_RQ;
@@ -172,7 +166,7 @@ DIMSE_findUser(
     while (cond == EC_Normal && DICOM_PENDING_STATUS(status))
     {
        /* initialize the response to collect */
-        bzero((char*)&rsp, sizeof(rsp));
+        memset((char*)&rsp, 0, sizeof(rsp));
         if (rspIds != NULL) {
             delete rspIds;
             rspIds = NULL;
@@ -297,7 +291,7 @@ DIMSE_sendFindResponse(T_ASC_Association * assoc,
     T_DIMSE_Message rsp;
 
     /* create response message */
-    bzero((char*)&rsp, sizeof(rsp));
+    memset((char*)&rsp, 0, sizeof(rsp));
     rsp.CommandField = DIMSE_C_FIND_RSP;
     rsp.msg.CFindRSP = *response;
     rsp.msg.CFindRSP.MessageIDBeingRespondedTo = request->MessageID;
@@ -375,7 +369,7 @@ DIMSE_findProvider(
         {
             /* if the IDs are the same go ahead */
             /* initialize the C-FIND-RSP message variable */
-            bzero((char*)&rsp, sizeof(rsp));
+            memset((char*)&rsp, 0, sizeof(rsp));
             rsp.DimseStatus = STATUS_FIND_Pending_MatchesAreContinuing;
 
             /* as long as no error occurred and the status of the C-FIND-RSP message which will */
index f1375c698db1238126ee2829bbaa5ac4ace22fa5..e62a7951f6e9098adcbff0cb7fd9b2a1199d8a0d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2020, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
@@ -104,8 +98,8 @@ DIMSE_getUser(
 
     if (requestIdentifiers == NULL) return DIMSE_NULLKEY;
 
-    bzero((char*)&req, sizeof(req));
-    bzero((char*)&rsp, sizeof(rsp));
+    memset((char*)&req, 0, sizeof(req));
+    memset((char*)&rsp, 0, sizeof(rsp));
 
     req.CommandField = DIMSE_C_GET_RQ;
     request->DataSetType = DIMSE_DATASET_PRESENT;
@@ -157,7 +151,7 @@ DIMSE_getUser(
             /* break; */ // never reached after continue statement
         }
 
-        bzero((char*)&rsp, sizeof(rsp));
+        memset((char*)&rsp, 0, sizeof(rsp));
 
         cond = DIMSE_receiveCommand(assoc, blockMode, timeout, &presID,
                 &rsp, statusDetail);
@@ -233,7 +227,7 @@ DIMSE_sendGetResponse(T_ASC_Association * assoc,
     T_DIMSE_Message rsp;
     unsigned int opts;
 
-    bzero((char*)&rsp, sizeof(rsp));
+    memset((char*)&rsp, 0, sizeof(rsp));
     rsp.CommandField = DIMSE_C_GET_RSP;
     rsp.msg.CGetRSP = *response;
     /* copy over stuff from request */
@@ -314,7 +308,7 @@ DIMSE_getProvider(
         }
         else
         {
-            bzero((char*)&rsp, sizeof(rsp));
+            memset((char*)&rsp, 0, sizeof(rsp));
             rsp.DimseStatus = STATUS_GET_Pending_SubOperationsAreContinuing;   /* assume */
 
             while (cond == EC_Normal && rsp.DimseStatus == STATUS_GET_Pending_SubOperationsAreContinuing && normal)
index 01a4fb9e727a5c80be60642ad9a1ac41d882030a..78136644fc49090d3a0e6ef00f1d56d647968aef 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/oftimer.h"
 
 #ifdef HAVE_FCNTL_H
@@ -170,8 +164,8 @@ DIMSE_moveUser(
 
     if (requestIdentifiers == NULL) return DIMSE_NULLKEY;
 
-    bzero((char*)&req, sizeof(req));
-    bzero((char*)&rsp, sizeof(rsp));
+    memset((char*)&req, 0, sizeof(req));
+    memset((char*)&rsp, 0, sizeof(rsp));
 
     req.CommandField = DIMSE_C_MOVE_RQ;
     request->DataSetType = DIMSE_DATASET_PRESENT;
@@ -215,7 +209,7 @@ DIMSE_moveUser(
             continue;    /* continue with main loop */
         }
 
-        bzero((char*)&rsp, sizeof(rsp));
+        memset((char*)&rsp, 0, sizeof(rsp));
 
         cond = DIMSE_receiveCommand(assoc, blockMode, timeout, &presID, &rsp, statusDetail);
         if (cond != EC_Normal) {
@@ -308,7 +302,7 @@ DIMSE_sendMoveResponse(
     T_DIMSE_Message rsp;
     unsigned int opts;
 
-    bzero((char*)&rsp, sizeof(rsp));
+    memset((char*)&rsp, 0, sizeof(rsp));
     rsp.CommandField = DIMSE_C_MOVE_RSP;
     rsp.msg.CMoveRSP = *response;
     /* copy over stuff from request */
@@ -388,7 +382,7 @@ DIMSE_moveProvider(
         if (presIdData != presIdCmd) {
           cond = makeDcmnetCondition(DIMSEC_INVALIDPRESENTATIONCONTEXTID, OF_error, "DIMSE: Presentation Contexts of Command and Data Differ");
         } else {
-            bzero((char*)&rsp, sizeof(rsp));
+            memset((char*)&rsp, 0, sizeof(rsp));
             rsp.DimseStatus = STATUS_MOVE_Pending_SubOperationsAreContinuing;   /* assume */
 
             while (cond == EC_Normal && rsp.DimseStatus == STATUS_MOVE_Pending_SubOperationsAreContinuing && normal) {
index 50784afdb14977be63bfc48fd34c2c7754ee1dd2..cabbeb4631bab5481f7c8d5de7fe647b5ec4b97c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_UNIX_H
 #if defined(macintosh) && defined (HAVE_WINSOCK_H)
 /* unix.h defines timeval incompatible with winsock.h */
@@ -688,8 +681,11 @@ sendDcmDataset(
     Uint32 bytesTransmitted = 0;
     DUL_PDVLIST pdvList;
     DUL_PDV pdv;
+
+#if 0
     /* the following variable is currently unused, leave it for future use */
     unsigned long pdvCount = 0;
+#endif
     DcmWriteCache wcache;
 
     /* initialize some local variables (we want to use the association's send buffer */
@@ -807,7 +803,9 @@ sendDcmDataset(
 
             /* count the bytes and the amount of PDVs which were transmitted */
             bytesTransmitted += OFstatic_cast(Uint32, rtnLength);
+#if 0
             pdvCount += pdvList.count;
+#endif
 
             /* execute callback function to indicate progress */
             if (callback) {
@@ -1515,7 +1513,7 @@ DIMSE_receiveDataSetInMemory(
     DcmDataset *dset = NULL;
     DUL_PDV pdv;
     T_ASC_PresentationContextID pid = 0;
-    E_TransferSyntax xferSyntax;
+    E_TransferSyntax xferSyntax = EXS_Unknown;
     OFBool last = OFFalse;
     DIC_UL pdvCount = 0;
     DIC_UL bytesRead = 0;
index 5db5ea88835c098db1f7a6d2ffb72f68754ec443..24fc4dced297788d0e74d793b17800787eab2d31 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_FCNTL_H
 #include <fcntl.h>
 #endif
@@ -180,13 +174,17 @@ DIMSE_storeUser(
     DIMSE_PrivateUserContext callbackCtx;
     DIMSE_ProgressCallback privCallback = NULL;
     T_DIMSE_StoreProgress progress;
+    progress.state = DIMSE_StoreBegin;
+    progress.callbackCount = 0;
+    progress.progressBytes = 0;
+    progress.totalBytes = 0;
 
     /* if there is no image file or no data set, no data can be sent */
     if (imageFileName == NULL && imageDataSet == NULL) return DIMSE_NULLKEY;
 
     /* initialize the variables which represent DIMSE C-STORE request and DIMSE C-STORE response messages */
-    bzero((char*)&req, sizeof(req));
-    bzero((char*)&rsp, sizeof(rsp));
+    memset((char*)&req, 0, sizeof(req));
+    memset((char*)&rsp, 0, sizeof(rsp));
 
     /* set corresponding values in the request message variable */
     req.CommandField = DIMSE_C_STORE_RQ;
@@ -319,7 +317,7 @@ DIMSE_sendStoreResponse(T_ASC_Association * assoc,
     T_DIMSE_Message     rsp;
 
     /* create response message */
-    bzero((char*)&rsp, sizeof(rsp));
+    memset((char*)&rsp, 0, sizeof(rsp));
     rsp.CommandField = DIMSE_C_STORE_RSP;
     response->MessageIDBeingRespondedTo = request->MessageID;
     OFStandard::strlcpy(response->AffectedSOPClassUID, request->AffectedSOPClassUID, sizeof(response->AffectedSOPClassUID));
@@ -404,8 +402,14 @@ DIMSE_storeProvider( T_ASC_Association *assoc,
     DcmDataset *statusDetail = NULL;
     T_DIMSE_StoreProgress progress;
 
+    /* initialize progress struct */
+    progress.state = DIMSE_StoreBegin;
+    progress.callbackCount = 1;
+    progress.progressBytes = 0;
+    progress.totalBytes = 0;
+
     /* initialize the C-STORE-RSP message variable */
-    bzero((char*)&response, sizeof(response));
+    memset((char*)&response, 0, sizeof(response));
     response.DimseStatus = STATUS_STORE_Success;      /* assume */
     response.MessageIDBeingRespondedTo = request->MessageID;
     response.DataSetType = DIMSE_DATASET_NULL;  /* always for C-STORE-RSP */
@@ -420,9 +424,6 @@ DIMSE_storeProvider( T_ASC_Association *assoc,
         /* only if caller requires */
         privCallback = privateProviderCallback; /* function defined above */
         callbackCtx.callbackData = callbackData;
-        progress.state = DIMSE_StoreBegin;
-        progress.callbackCount = 1;
-        progress.progressBytes = 0;
         progress.totalBytes = dcmGuessModalityBytes(request->AffectedSOPClassUID);
         callbackCtx.progress = &progress;
         callbackCtx.request = request;
index 856143d8ca303c2bc82f73749f9ceca734e27a62..b294afe5614b09cfa256bbdb635a80968858aa47 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_UNIX_H
 #if defined(macintosh) && defined (HAVE_WINSOCK_H)
 /* unix.h defines timeval incompatible with winsock.h */
@@ -177,7 +171,8 @@ DU_getStringDOElement(DcmItem *obj, DcmTagKey t, char *s, size_t bufsize)
             s[0] = '\0';
         } else {
             ec =  elem->getString(aString);
-            OFStandard::strlcpy(s, aString, bufsize);
+            if (ec == EC_Normal)
+                OFStandard::strlcpy(s, aString, bufsize);
         }
     }
     return (ec == EC_Normal);
@@ -366,8 +361,8 @@ DU_cfindStatusString(Uint16 statusCode)
       case STATUS_FIND_Refused_SOPClassNotSupported:
           s = "Refused: SOPClassNotSupported";
           break;
-      case STATUS_FIND_Failed_IdentifierDoesNotMatchSOPClass:
-          s = "Failed: IdentifierDoesNotMatchSOPClass";
+      case STATUS_FIND_Error_DataSetDoesNotMatchSOPClass:
+          s = "Error: DataSetDoesNotMatchSOPClass";
           break;
       case STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest:
           s = "Cancel: MatchingTerminatedDueToCancelRequest";
@@ -410,14 +405,14 @@ DU_cmoveStatusString(Uint16 statusCode)
       case STATUS_MOVE_Refused_OutOfResourcesSubOperations:
           s = "Refused: OutOfResourcesSubOperations";
           break;
-      case STATUS_MOVE_Failed_SOPClassNotSupported:
-          s = "Failed: SOPClassNotSupported";
+      case STATUS_MOVE_Refused_SOPClassNotSupported:
+          s = "Refused: SOPClassNotSupported";
           break;
-      case STATUS_MOVE_Failed_MoveDestinationUnknown:
-          s = "Failed: MoveDestinationUnknown";
+      case STATUS_MOVE_Refused_MoveDestinationUnknown:
+          s = "Refused: MoveDestinationUnknown";
           break;
-      case STATUS_MOVE_Failed_IdentifierDoesNotMatchSOPClass:
-          s = "Failed: IdentifierDoesNotMatchSOPClass";
+      case STATUS_MOVE_Error_DataSetDoesNotMatchSOPClass:
+          s = "Error: DataSetDoesNotMatchSOPClass";
           break;
       case STATUS_MOVE_Cancel_SubOperationsTerminatedDueToCancelIndication:
           s = "Cancel: SubOperationsTerminatedDueToCancelIndication";
@@ -461,11 +456,11 @@ DU_cgetStatusString(Uint16 statusCode)
       case STATUS_GET_Refused_OutOfResourcesSubOperations:
           s = "Refused: OutOfResourcesSubOperations";
           break;
-      case STATUS_GET_Failed_SOPClassNotSupported:
-          s = "Failed: SOPClassNotSupported";
+      case STATUS_GET_Refused_SOPClassNotSupported:
+          s = "Refused: SOPClassNotSupported";
           break;
-      case STATUS_GET_Failed_IdentifierDoesNotMatchSOPClass:
-          s = "Failed: IdentifierDoesNotMatchSOPClass";
+      case STATUS_GET_Error_DataSetDoesNotMatchSOPClass:
+          s = "Error: DataSetDoesNotMatchSOPClass";
           break;
       case STATUS_GET_Cancel_SubOperationsTerminatedDueToCancelIndication:
           s = "Cancel: SubOperationsTerminatedDueToCancelIndication";
@@ -512,8 +507,8 @@ DU_ncreateStatusString(Uint16 statusCode)
       case STATUS_N_InvalidAttributeValue:
           s = "Failure: InvalidAttributeValue";
           break;
-      case STATUS_N_InvalidObjectInstance:
-          s = "Failure: InvalidObjectInstance";
+      case STATUS_N_InvalidSOPInstance:
+          s = "Failure: InvalidSOPInstance";
           break;
       case STATUS_N_MissingAttribute:
           s = "Failure: MissingAttribute";
@@ -530,8 +525,8 @@ DU_ncreateStatusString(Uint16 statusCode)
       case STATUS_N_NoSuchSOPClass:
           s = "Failure: NoSuchSOPClass";
           break;
-      case STATUS_N_NoSuchObjectInstance:
-          s = "Failure: NoSuchObjectInstance";
+      case STATUS_N_NoSuchSOPInstance:
+          s = "Failure: NoSuchSOPInstance";
           break;
       case STATUS_N_ProcessingFailure:
           s = "Failure: ProcessingFailure";
@@ -577,8 +572,8 @@ DU_ngetStatusString(Uint16 statusCode)
       case STATUS_N_DuplicateInvocation:
           s = "Failure: DuplicateInvocation";
           break;
-      case STATUS_N_InvalidObjectInstance:
-          s = "Failure: InvalidObjectInstance";
+      case STATUS_N_InvalidSOPInstance:
+          s = "Failure: InvalidSOPInstance";
           break;
       case STATUS_N_MistypedArgument:
           s = "Failure: MistypedArgument";
@@ -586,8 +581,8 @@ DU_ngetStatusString(Uint16 statusCode)
       case STATUS_N_NoSuchSOPClass:
           s = "Failure: NoSuchSOPClass";
           break;
-      case STATUS_N_NoSuchObjectInstance:
-          s = "Failure: NoSuchObjectInstance";
+      case STATUS_N_NoSuchSOPInstance:
+          s = "Failure: NoSuchSOPInstance";
           break;
       case STATUS_N_ProcessingFailure:
           s = "Failure: ProcessingFailure";
@@ -639,8 +634,8 @@ DU_nsetStatusString(Uint16 statusCode)
       case STATUS_N_MistypedArgument:
           s = "Failure: MistypedArgument";
           break;
-      case STATUS_N_InvalidObjectInstance:
-          s = "Failure: InvalidObjectInstance";
+      case STATUS_N_InvalidSOPInstance:
+          s = "Failure: InvalidSOPInstance";
           break;
       case STATUS_N_MissingAttributeValue:
           s = "Failure: MissingAttributeValue";
@@ -651,8 +646,8 @@ DU_nsetStatusString(Uint16 statusCode)
       case STATUS_N_NoSuchSOPClass:
           s = "Failure: NoSuchSOPClass";
           break;
-      case STATUS_N_NoSuchObjectInstance:
-          s = "Failure: NoSuchObjectInstance";
+      case STATUS_N_NoSuchSOPInstance:
+          s = "Failure: NoSuchSOPInstance";
           break;
       case STATUS_N_ProcessingFailure:
           s = "Failure: ProcessingFailure";
@@ -701,8 +696,8 @@ DU_nactionStatusString(Uint16 statusCode)
       case STATUS_N_InvalidArgumentValue:
           s = "Failure: InvalidArgumentValue";
           break;
-      case STATUS_N_InvalidObjectInstance:
-          s = "Failure: InvalidObjectInstance";
+      case STATUS_N_InvalidSOPInstance:
+          s = "Failure: InvalidSOPInstance";
           break;
       case STATUS_N_MistypedArgument:
           s = "Failure: MistypedArgument";
@@ -716,8 +711,8 @@ DU_nactionStatusString(Uint16 statusCode)
       case STATUS_N_NoSuchSOPClass:
           s = "Failure: NoSuchSOPClass";
           break;
-      case STATUS_N_NoSuchObjectInstance:
-          s = "Failure: NoSuchObjectInstance";
+      case STATUS_N_NoSuchSOPInstance:
+          s = "Failure: NoSuchSOPInstance";
           break;
       case STATUS_N_ProcessingFailure:
           s = "Failure: ProcessingFailure";
@@ -760,8 +755,8 @@ DU_ndeleteStatusString(Uint16 statusCode)
       case STATUS_N_DuplicateInvocation:
           s = "Failure: DuplicateInvocation";
           break;
-      case STATUS_N_InvalidObjectInstance:
-          s = "Failure: InvalidObjectInstance";
+      case STATUS_N_InvalidSOPInstance:
+          s = "Failure: InvalidSOPInstance";
           break;
       case STATUS_N_MistypedArgument:
           s = "Failure: MistypedArgument";
@@ -769,8 +764,8 @@ DU_ndeleteStatusString(Uint16 statusCode)
       case STATUS_N_NoSuchSOPClass:
           s = "Failure: NoSuchSOPClass";
           break;
-      case STATUS_N_NoSuchObjectInstance:
-          s = "Failure: NoSuchObjectInstance";
+      case STATUS_N_NoSuchSOPInstance:
+          s = "Failure: NoSuchSOPInstance";
           break;
       case STATUS_N_ProcessingFailure:
           s = "Failure: ProcessingFailure";
@@ -816,8 +811,8 @@ DU_neventReportStatusString(Uint16 statusCode)
       case STATUS_N_InvalidArgumentValue:
           s = "Failure: InvalidArgumentValue";
           break;
-      case STATUS_N_InvalidObjectInstance:
-          s = "Failure: InvalidObjectInstance";
+      case STATUS_N_InvalidSOPInstance:
+          s = "Failure: InvalidSOPInstance";
           break;
       case STATUS_N_MistypedArgument:
           s = "Failure: MistypedArgument";
@@ -831,8 +826,8 @@ DU_neventReportStatusString(Uint16 statusCode)
       case STATUS_N_NoSuchSOPClass:
           s = "Failure: NoSuchSOPClass";
           break;
-      case STATUS_N_NoSuchObjectInstance:
-          s = "Failure: NoSuchObjectInstance";
+      case STATUS_N_NoSuchSOPInstance:
+          s = "Failure: NoSuchSOPInstance";
           break;
       case STATUS_N_ProcessingFailure:
           s = "Failure: ProcessingFailure";
index 26cf9a1cb2c1a2a17aa098c408ad206c7d7a874b..e491ae5ea27d6e1e67be384e7a65828f321d6621 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2013-2017, OFFIS e.V.
+ *  Copyright (C) 2013-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -24,6 +24,8 @@
 
 #include "dcmtk/dcmnet/dstorscp.h"
 #include "dcmtk/dcmnet/diutil.h"
+#include "dcmtk/ofstd/ofstdinc.h"
+#include <ctime>
 
 
 // constant definitions
index 45421af35f818b50d6cd42b28de20132e1c3d94e..db85304a7ca25513a39528d507f42673c2ea86bb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2011-2019, OFFIS e.V.
+ *  Copyright (C) 2011-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,6 +28,8 @@
 #include "dcmtk/dcmdata/dcdatutl.h"
 #include "dcmtk/dcmnet/dstorscu.h"
 #include "dcmtk/dcmnet/diutil.h"
+#include "dcmtk/ofstd/ofstdinc.h"
+#include <ctime>
 
 
 // these are private DIMSE status codes of the class "pending"
index b8e9cc04443f0beae1df4e29c8e7792fb37c167a..1aba744d736c5a4cfd54e31933ecaa302b9d6837 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/dcmnet/diutil.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CERRNO
-#define INCLUDE_CSIGNAL
-#define INCLUDE_CTIME
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
@@ -109,23 +101,13 @@ BEGIN_EXTERN_C
 #endif
 #ifdef WITH_TCPWRAPPER
 #include <tcpd.h>               /* for hosts_ctl */
-
-BEGIN_EXTERN_C
 int dcmtk_hosts_access(struct request_info *req);
-END_EXTERN_C
-#endif
-#ifdef HAVE_SIGNAL_H
-// On Solaris with Sun Workshop 11, <signal.h> declares signal() but <csignal> does not
-#include <signal.h>
 #endif
-END_EXTERN_C
-
-BEGIN_EXTERN_C
 /* declare extern "C" typedef for signal handler function pointer */
 #ifdef SIGNAL_HANDLER_WITH_ELLIPSE
-typedef void (*mySIG_TYP)(...);
+typedef void(*mySIG_TYP)(...);
 #else
-typedef void (*mySIG_TYP)(int);
+typedef void(*mySIG_TYP)(int);
 #endif
 END_EXTERN_C
 
@@ -133,6 +115,7 @@ END_EXTERN_C
 #include <poll.h>
 #endif
 
+
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmnet/dcompat.h"
 #include "dcmtk/dcmnet/dicom.h"
@@ -142,7 +125,7 @@ END_EXTERN_C
 #include "dcmtk/ofstd/ofstd.h"
 
 #include "dcmtk/dcmnet/dul.h"
-#include "dulstruc.h"
+#include "dcmtk/dcmnet/dulstruc.h"
 #include "dulpriv.h"
 #include "dulfsm.h"
 #include "dcmtk/dcmnet/dcmtrans.h"
@@ -542,7 +525,7 @@ DUL_RequestAssociation(
          */
         OFCondition cond2 = PRV_StateMachine(network, association, TRANS_CONN_CLOSED, (*association)->protocolState, NULL);
         destroyAssociationKey(association);
-        return makeDcmnetSubCondition(DULC_REQUESTASSOCIATIONFAILED, OF_error, "Failed to establish association", DimseCondition::push(cond2, cond));
+        return cond;
     }
     cond = PRV_StateMachine(network, association,
       TRANS_CONN_CONFIRM_LOCAL_USER, (*association)->protocolState, params);
@@ -937,6 +920,40 @@ DUL_DropAssociation(DUL_ASSOCIATIONKEY ** callerAssociation)
 }
 
 
+/* DUL_CloseTransportConnection
+**
+** Purpose:
+**      This function closes the transport connection of an Association
+**      without notifying the peer application. This routine should only
+**      be used by the parent process after an association has been
+**      delegated to a forked child.
+**
+** Parameter Dictionary:
+**      callerAssociation  Caller's handle to the Association that is to
+**                         be dropped.
+**
+** Return Values:
+**
+**
+*/
+OFCondition
+DUL_CloseTransportConnection(DUL_ASSOCIATIONKEY ** callerAssociation)
+{
+    PRIVATE_ASSOCIATIONKEY ** association = (PRIVATE_ASSOCIATIONKEY **) callerAssociation;
+    OFCondition cond = checkAssociation(association);
+    if (cond.bad()) return cond;
+
+    if ((*association)->connection)
+    {
+     (*association)->connection->closeTransportConnection();
+     delete (*association)->connection;
+     (*association)->connection = NULL;
+    }
+    destroyAssociationKey(association);
+    return EC_Normal;
+}
+
+
 /* DUL_ReleaseAssociation
 **
 ** Purpose:
@@ -1773,8 +1790,8 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
              * '"\my\dir\"' but instead ends up as '"\my\dir\\"' (single quotes for
              *  demonstration purposes). Make sure nobody passes a zero length string.
              */
-            size_t len = strlen(command_argv[i]);
-            if ((len > 0) && (command_argv[i][len - 1] == '\\'))
+            size_t len2 = strlen(command_argv[i]);
+            if ((len2 > 0) && (command_argv[i][len2 - 1] == '\\'))
             {
                    cmdLine += "\\";
             }
@@ -1923,8 +1940,12 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
      */
 
 #ifdef DONT_DISABLE_NAGLE_ALGORITHM
+#ifdef _MSC_VER
+#pragma message("The macro DONT_DISABLE_NAGLE_ALGORITHM is not supported anymore. See 'macros.txt' for details.")
+#else
 #warning The macro DONT_DISABLE_NAGLE_ALGORITHM is not supported anymore. See "macros.txt" for details.
 #endif
+#endif
 
 #ifdef DISABLE_NAGLE_ALGORITHM
     int tcpNoDelay = 1; // disable
@@ -2046,15 +2067,7 @@ receiveTransportConnectionTCP(PRIVATE_NETWORKKEY ** network,
       return makeDcmnetCondition(DULC_TCPINITERROR, OF_error, msg.c_str());
     }
 
-    DcmTransportLayerStatus tcsStatus;
-    if (TCS_ok != (tcsStatus = (*association)->connection->serverSideHandshake()))
-    {
-      OFString msg = "DUL secure transport layer: ";
-      msg += (*association)->connection->errorString(tcsStatus);
-      return makeDcmnetCondition(DULC_TLSERROR, OF_error, msg.c_str());
-    }
-
-    return EC_Normal;
+    return (*association)->connection->serverSideHandshake();
 }
 
 
@@ -2212,7 +2225,7 @@ initializeNetworkTCP(PRIVATE_NETWORKKEY ** key, void *parameter)
       /* Name socket using wildcards */
       server.sin_family = AF_INET;
       server.sin_addr.s_addr = INADDR_ANY;
-      server.sin_port = (unsigned short) htons((*key)->networkSpecific.TCP.port);
+      server.sin_port = (unsigned short) htons(OFstatic_cast(u_short, ((*key)->networkSpecific.TCP.port)));
       if (bind(sock, (struct sockaddr *) & server, sizeof(server)))
       {
         OFString msg = "TCP Initialization Error: ";
index c0643c2bc9efb27dd6498e8aed95bbc313dbbeb4..5900b7b7e4baccea49f0de42efb05f634a9bad4e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmnet/dicom.h"
 #include "dcmtk/dcmnet/cond.h"
 #include "dcmtk/dcmnet/diutil.h"
 #include "dcmtk/dcmnet/lst.h"
 #include "dcmtk/dcmnet/dul.h"
-#include "dulstruc.h"
+#include "dcmtk/dcmnet/dulstruc.h"
 #include "dulpriv.h"
 #include "dcmtk/ofstd/ofconsol.h"
 
@@ -669,7 +664,7 @@ constructSubItem(char *name, unsigned char type,
     if (strlen(name) < 1 || strlen(name) > 64)
     {
         char buf[1024];
-        sprintf(buf,"Illegal service parameter: %s", name);
+        OFStandard::snprintf(buf, 1024, "Illegal service parameter: %s", name);
         return makeDcmnetCondition(DULC_ILLEGALSERVICEPARAMETER, OF_error, buf);
     }
     subItem->type = type;
@@ -1141,7 +1136,7 @@ constructSCUSCPSubItem(char *name, unsigned char type, unsigned char scuRole,
     if (strlen(name) < 1 || strlen(name) > 64)
     {
         char buf[1024];
-        sprintf(buf,"Illegal service parameter: %s", name);
+        OFStandard::snprintf(buf, 1024, "Illegal service parameter: %s", name);
         return makeDcmnetCondition(DULC_ILLEGALSERVICEPARAMETER, OF_error, buf);
     }
 
index 9845f3e4c7d17c59200b5e59f9deefc8b4498a57..06079a9427d7fc24c16248f087a1980e8dae3101 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 #include <winsock2.h>
 #endif
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CERRNO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
 #include "dcmtk/dcmnet/lst.h"
 #include "dcmtk/dcmnet/cond.h"
 #include "dcmtk/dcmnet/dul.h"
-#include "dulstruc.h"
+#include "dcmtk/dcmnet/dulstruc.h"
 #include "dulpriv.h"
 #include "dcmtk/dcmnet/dcmtrans.h"
 #include "dcmtk/dcmnet/diutil.h"
index 91dcc7fcb910b7e607938829580a49af461cdf8f..bba4b5ae7c2b71681c55e743c13506855f77c7b5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2018, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 #include <ws2tcpip.h>
 #endif
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CERRNO
-#define INCLUDE_CSIGNAL
-#define INCLUDE_CTIME
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
@@ -109,11 +100,12 @@ END_EXTERN_C
 #endif
 
 #include "dcmtk/ofstd/ofstream.h"
+#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/dcmnet/dicom.h"
 #include "dcmtk/dcmnet/lst.h"
 #include "dcmtk/dcmnet/cond.h"
 #include "dcmtk/dcmnet/dul.h"
-#include "dulstruc.h"
+#include "dcmtk/dcmnet/dulstruc.h"
 #include "dulpriv.h"
 #include "dulfsm.h"
 #include "dcmtk/ofstd/ofbmanip.h"
@@ -122,7 +114,10 @@ END_EXTERN_C
 #include "dcmtk/dcmnet/dcmtrans.h"
 #include "dcmtk/dcmnet/dcmlayer.h"
 #include "dcmtk/dcmnet/diutil.h"
+#include "dcmtk/dcmnet/helpers.h"
 #include "dcmtk/ofstd/ofsockad.h" /* for class OFSockAddr */
+#include <ctime>
+
 
 /* At least Solaris doesn't define this */
 #ifndef INADDR_NONE
@@ -310,9 +305,6 @@ findPresentationCtx(LST_HEAD ** lst, DUL_PRESENTATIONCONTEXTID contextID);
 PRV_SCUSCPROLE *
 findSCUSCPRole(LST_HEAD ** lst, char *abstractSyntax);
 
-void destroyPresentationContextList(LST_HEAD ** l);
-void destroyUserInformationLists(DUL_USERINFO * userInfo);
-
 static volatile FSM_Event_Description Event_Table[] = {
     {A_ASSOCIATE_REQ_LOCAL_USER, "A-ASSOCIATE request (local user)"},
     {TRANS_CONN_CONFIRM_LOCAL_USER, "Transport conn confirmation (local)"},
@@ -1021,7 +1013,7 @@ AE_3_AssociateConfirmationAccept(PRIVATE_NETWORKKEY ** /*network*/,
 
         }
 
-        destroyPresentationContextList(&assoc.presentationContextList);
+        destroyAssociatePDUPresentationContextList(&assoc.presentationContextList);
         destroyUserInformationLists(&assoc.userInfo);
         service->peerMaxPDU = assoc.userInfo.maxLength.maxLength;
         (*association)->maxPDV = assoc.userInfo.maxLength.maxLength;
@@ -1238,7 +1230,7 @@ AE_6_ExamineAssociateRequest(PRIVATE_NETWORKKEY ** /*network*/,
                assoc.userInfo.implementationVersionName.data, 16 + 1);
         (*association)->associationState = DUL_ASSOC_ESTABLISHED;
 
-        destroyPresentationContextList(&assoc.presentationContextList);
+        destroyAssociatePDUPresentationContextList(&assoc.presentationContextList);
         destroyUserInformationLists(&assoc.userInfo);
 
         /* If this PDU is ok with us */
@@ -2266,7 +2258,7 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network,
           return makeDcmnetCondition(DULC_UNKNOWNHOST, OF_error, buf2);
         }
     }
-    server.setPort(OFstatic_cast(unsigned short, htons(port)));
+    server.setPort(OFstatic_cast(unsigned short, htons(OFstatic_cast(unsigned short, port))));
 
     // get global connection timeout
     Sint32 connectTimeout = dcmConnectionTimeout.get();
@@ -2486,8 +2478,12 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network,
          */
 
 #ifdef DONT_DISABLE_NAGLE_ALGORITHM
+#ifdef _MSC_VER
+#pragma message("The macro DONT_DISABLE_NAGLE_ALGORITHM is not supported anymore. See 'macros.txt' for details.")
+#else
 #warning The macro DONT_DISABLE_NAGLE_ALGORITHM is not supported anymore. See "macros.txt" for details.
 #endif
+#endif
 
 #ifdef DISABLE_NAGLE_ALGORITHM
         int tcpNoDelay = 1; // disable
@@ -2522,15 +2518,7 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network,
 #endif
         }
 
-       DcmTransportLayerStatus tcsStatus;
-       if (TCS_ok != (tcsStatus = (*association)->connection->clientSideHandshake()))
-       {
-         DCMNET_ERROR("TLS client handshake failed");
-         OFString msg = "DUL secure transport layer: ";
-         msg += (*association)->connection->errorString(tcsStatus);
-         return makeDcmnetCondition(DULC_TLSERROR, OF_error, msg.c_str());
-       }
-       return EC_Normal;
+        return (*association)->connection->clientSideHandshake();
     }
 }
 
@@ -2599,7 +2587,7 @@ sendAssociationRQTCP(PRIVATE_NETWORKKEY ** /*network*/,
       }
     }
 
-    destroyPresentationContextList(&associateRequest.presentationContextList);
+    destroyAssociatePDUPresentationContextList(&associateRequest.presentationContextList);
     destroyUserInformationLists(&associateRequest.userInfo);
     if (cond.bad())
         return cond;
@@ -2682,7 +2670,7 @@ sendAssociationACTCP(PRIVATE_NETWORKKEY ** /*network*/,
       }
     }
 
-    destroyPresentationContextList(&associateReply.presentationContextList);
+    destroyAssociatePDUPresentationContextList(&associateReply.presentationContextList);
     destroyUserInformationLists(&associateReply.userInfo);
 
     if (cond.bad()) return cond;
@@ -3692,6 +3680,19 @@ defragmentTCP(DcmTransportConnection *connection, DUL_BLOCKOPTIONS block, time_t
         /* we actually did receive data or an error occurred */
         do
         {
+#if 0
+            /* the original patch submitted for DCMTK issue #1006 contains a sleep statement here
+             * that should actually not be necessary. We're leaving it in the code for now
+             * with this comment. If your code (in non-blocking mode, on Windows) works if
+             * and only if this gets enabled, please let us know: <bugs@dcmtk.org> */
+#ifdef HAVE_WINSOCK_H
+            if (OFStandard::getLastNetworkErrorCode().value() == WSAEWOULDBLOCK)
+            {
+                Sleep(1);
+            }
+#endif
+#endif
+
             /* if DUL_NOBLOCK is specified as a blocking option, we only want to wait a certain
              * time for receiving data over the network. If no data was received during that time,
              * DUL_READTIMEOUT shall be returned. Note that if DUL_BLOCK is specified the application
@@ -3710,7 +3711,11 @@ defragmentTCP(DcmTransportConnection *connection, DUL_BLOCKOPTIONS block, time_t
             /* data has become available, now call read(). */
             bytesRead = connection->read((char*)b, size_t(l));
 
-        } while (bytesRead == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
+        } while ((bytesRead == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR)
+#ifdef HAVE_WINSOCK_H
+                 || (bytesRead == -1 && (OFStandard::getLastNetworkErrorCode().value() == WSAEWOULDBLOCK))
+#endif
+                 );
 
         /* if we actually received data, move the buffer pointer to its own end, update the variable */
         /* that determines the end of the first loop, and update the reference parameter return variable */
@@ -3988,48 +3993,3 @@ findSCUSCPRole(LST_HEAD ** lst, char *abstractSyntax)
     }
     return NULL;
 }
-
-void
-destroyPresentationContextList(LST_HEAD ** l)
-{
-    PRV_PRESENTATIONCONTEXTITEM
-    * prvCtx;
-    DUL_SUBITEM
-        * subItem;
-
-    if (*l == NULL)
-        return;
-
-    prvCtx = (PRV_PRESENTATIONCONTEXTITEM*)LST_Dequeue(l);
-    while (prvCtx != NULL) {
-        subItem = (DUL_SUBITEM*)LST_Dequeue(&prvCtx->transferSyntaxList);
-        while (subItem != NULL) {
-            free(subItem);
-            subItem = (DUL_SUBITEM*)LST_Dequeue(&prvCtx->transferSyntaxList);
-        }
-        LST_Destroy(&prvCtx->transferSyntaxList);
-        free(prvCtx);
-        prvCtx = (PRV_PRESENTATIONCONTEXTITEM*)LST_Dequeue(l);
-    }
-    LST_Destroy(l);
-}
-
-void
-destroyUserInformationLists(DUL_USERINFO * userInfo)
-{
-    PRV_SCUSCPROLE
-    * role;
-
-    role = (PRV_SCUSCPROLE*)LST_Dequeue(&userInfo->SCUSCPRoleList);
-    while (role != NULL) {
-        free(role);
-        role = (PRV_SCUSCPROLE*)LST_Dequeue(&userInfo->SCUSCPRoleList);
-    }
-    LST_Destroy(&userInfo->SCUSCPRoleList);
-
-    /* extended negotiation */
-    delete userInfo->extNegList; userInfo->extNegList = NULL;
-
-    /* user identity negotiation */
-    delete userInfo->usrIdent; userInfo->usrIdent = NULL;
-}
index 0a84f3850b9431b1e87558442e1a691a9658f7e0..c5e3373fa6a9f27660c0f8fc3145cfd0a3c38b4b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2020, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofstd.h"  // for OFStandard::safeSubtract() and safeAdd()
 #include "dcmtk/dcmnet/dicom.h"
@@ -75,7 +70,8 @@
 #include "dcmtk/dcmnet/lst.h"
 #include "dcmtk/dcmnet/dul.h"
 #include "dcmtk/dcmnet/diutil.h"
-#include "dulstruc.h"
+#include "dcmtk/dcmnet/dulstruc.h"
+#include "dcmtk/dcmnet/helpers.h"
 #include "dulpriv.h"
 #include "dcmtk/ofstd/ofconsol.h"
 
@@ -102,6 +98,7 @@ parseSCUSCPRole(PRV_SCUSCPROLE * role, unsigned char *buf,
                 unsigned long *length, unsigned long availData);
 static void trim_trailing_spaces(char *s);
 
+
 static OFCondition
 parseExtNeg(SOPClassExtendedNegotiationSubItem* extNeg, unsigned char *buf,
             unsigned long *length, unsigned long availData);
@@ -147,9 +144,6 @@ parseAssociate(unsigned char *buf, unsigned long pduLength,
         * context;
 
     (void) memset(assoc, 0, sizeof(*assoc));
-    if ((assoc->presentationContextList = LST_Create()) == NULL) return EC_MemoryExhausted;
-    if ((assoc->userInfo.SCUSCPRoleList = LST_Create()) == NULL) return EC_MemoryExhausted;
-
     // Check if the PDU actually is long enough for the fields we read
     if (pduLength < 2 + 2 + 16 + 16 + 32)
         return makeLengthError("associate PDU", pduLength, 2 + 2 + 16 + 16 + 32);
@@ -210,6 +204,8 @@ parseAssociate(unsigned char *buf, unsigned long pduLength,
             << "Called AP Title:  " << assoc->calledAPTitle << OFendl
             << "Calling AP Title: " << assoc->callingAPTitle);
     }
+    if ((assoc->presentationContextList = LST_Create()) == NULL) return EC_MemoryExhausted;
+    if ((assoc->userInfo.SCUSCPRoleList = LST_Create()) == NULL) return EC_MemoryExhausted;
     while ((cond.good()) && (pduLength > 0))
     {
         type = *buf;
@@ -224,44 +220,80 @@ parseAssociate(unsigned char *buf, unsigned long pduLength,
             {
                 buf += itemLength;
                 if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength))
-                  return makeUnderflowError("Application Context item", pduLength, itemLength);
-                DCMNET_TRACE("Successfully parsed Application Context");
+                {
+                    cond = makeUnderflowError("Application Context item", pduLength, itemLength);
+                }
+                else
+                {
+                    DCMNET_TRACE("Successfully parsed Application Context");
+                }
             }
             break;
         case DUL_TYPEPRESENTATIONCONTEXTRQ:
         case DUL_TYPEPRESENTATIONCONTEXTAC:
             context = (PRV_PRESENTATIONCONTEXTITEM*)malloc(sizeof(PRV_PRESENTATIONCONTEXTITEM));
-            if (context == NULL) return EC_MemoryExhausted;
-            (void) memset(context, 0, sizeof(*context));
-            cond = parsePresentationContext(type, context, buf, &itemLength, pduLength);
-            if (cond.bad()) return cond;
-            buf += itemLength;
-            if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength))
-              return makeUnderflowError("Presentation Context item", pduLength, itemLength);
-            LST_Enqueue(&assoc->presentationContextList, (LST_NODE*)context);
-            DCMNET_TRACE("Successfully parsed Presentation Context");
+            if (context != NULL)
+            {
+                (void) memset(context, 0, sizeof(*context));
+                cond = parsePresentationContext(type, context, buf, &itemLength, pduLength);
+                if (cond.bad())
+                {
+                    free(context);
+                }
+                else
+                {
+                    buf += itemLength;
+                    if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength))
+                    {
+                        cond =  makeUnderflowError("Presentation Context item", pduLength, itemLength);
+                    }
+                    else
+                    {
+                        LST_Enqueue(&assoc->presentationContextList, (LST_NODE*)context);
+                        DCMNET_TRACE("Successfully parsed Presentation Context");
+                    }
+                }
+            }
+            else
+            {
+                cond = EC_MemoryExhausted;
+            }
             break;
         case DUL_TYPEUSERINFO:
             // parse user info, which can contain several sub-items like User
             // Identity Negotiation or SOP Class Extended Negotiation
             cond = parseUserInfo(&assoc->userInfo, buf, &itemLength, assoc->type, pduLength);
-            if (cond.bad())
-                return cond;
-            buf += itemLength;
-            if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength))
-              return makeUnderflowError("User Information item", pduLength, itemLength);
-            DCMNET_TRACE("Successfully parsed User Information");
+            if (cond.good())
+            {
+                buf += itemLength;
+                if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength))
+                {
+                    cond = makeUnderflowError("User Information item", pduLength, itemLength);
+                }
+                else
+                {
+                    DCMNET_TRACE("Successfully parsed User Information");
+                }
+            }
             break;
         default:
             cond = parseDummy(buf, &itemLength, pduLength);
-            if (cond.bad())
-                return cond;
-            buf += itemLength;
-            if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength))
-              return makeUnderflowError("unknown item type", pduLength, itemLength);
+            if (cond.good())
+            {
+                buf += itemLength;
+                if (!OFStandard::safeSubtract(pduLength, itemLength, pduLength))
+                {
+                    cond = makeUnderflowError("unknown item type", pduLength, itemLength);
+                }
+            }
             break;
         }
     }
+    if (cond.bad())
+    {
+      destroyAssociatePDUPresentationContextList(&assoc->presentationContextList);
+      destroyUserInformationLists(&assoc->userInfo);
+    }
     return cond;
 }
 
@@ -409,7 +441,11 @@ parsePresentationContext(unsigned char type,
                 subItem = (DUL_SUBITEM*)malloc(sizeof(DUL_SUBITEM));
                 if (subItem == NULL) return EC_MemoryExhausted;
                 cond = parseSubItem(subItem, buf, &length, presentationLength);
-                if (cond.bad()) return cond;
+                if (cond.bad())
+                {
+                    free(subItem);
+                    return cond;
+                }
                 LST_Enqueue(&context->transferSyntaxList, (LST_NODE*)subItem);
                 buf += length;
                 if (!OFStandard::safeSubtract(presentationLength, length, presentationLength))
@@ -530,7 +566,11 @@ parseUserInfo(DUL_USERINFO * userInfo,
             role = (PRV_SCUSCPROLE*)malloc(sizeof(PRV_SCUSCPROLE));
             if (role == NULL) return EC_MemoryExhausted;
             cond = parseSCUSCPRole(role, buf, &length, userLength);
-            if (cond.bad()) return cond;
+            if (cond.bad())
+            {
+                free(role);
+                return cond;
+            }
             LST_Enqueue(&userInfo->SCUSCPRoleList, (LST_NODE*)role);
             buf += length;
             if (!OFStandard::safeSubtract(userLength, OFstatic_cast(short unsigned int, length), userLength))
@@ -810,7 +850,7 @@ parseExtNeg(SOPClassExtendedNegotiationSubItem* extNeg, unsigned char *buf,
 
     int remain = (int)(*length - (buf - bufStart));
 
-    extNeg->serviceClassAppInfoLength = remain;
+    extNeg->serviceClassAppInfoLength = OFstatic_cast(unsigned short, remain);
     extNeg->serviceClassAppInfo = new unsigned char[remain];
     for (int i=0; i<remain; i++) {
         extNeg->serviceClassAppInfo[i] = *buf++;
index a0b8d618c756478ff7049b26cfe19d8a34e81ffd..7ba3beef11b75eba2eeb77856eb2a340e2793180 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2019, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were partly developed by
 #include "dcmtk/ofstd/ofcond.h"
 #include "dcmtk/ofstd/ofstd.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CERRNO
-#define INCLUDE_CSIGNAL
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/dcmnet/dicom.h"
 #include "dcmtk/dcmnet/cond.h"
 #include "dcmtk/dcmnet/lst.h"
 #include "dcmtk/dcmnet/dul.h"
-#include "dulstruc.h"
+#include "dcmtk/dcmnet/dulstruc.h"
 #include "dulpriv.h"
 #include "dulfsm.h"
 
diff --git a/dcmnet/libsrc/dulstruc.h b/dcmnet/libsrc/dulstruc.h
deleted file mode 100644 (file)
index 22da6ec..0000000
+++ /dev/null
@@ -1,325 +0,0 @@
-/*
- *
- *  Copyright (C) 1994-2017, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were partly developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *  For further copyrights, see the following paragraphs.
- *
- */
-
-/*
-          Copyright (C) 1993, 1994, RSNA and Washington University
-
-          The software and supporting documentation for the Radiological
-          Society of North America (RSNA) 1993, 1994 Digital Imaging and
-          Communications in Medicine (DICOM) Demonstration were developed
-          at the
-                  Electronic Radiology Laboratory
-                  Mallinckrodt Institute of Radiology
-                  Washington University School of Medicine
-                  510 S. Kingshighway Blvd.
-                  St. Louis, MO 63110
-          as part of the 1993, 1994 DICOM Central Test Node project for, and
-          under contract with, the Radiological Society of North America.
-
-          THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER RSNA NOR
-          WASHINGTON UNIVERSITY MAKE ANY WARRANTY ABOUT 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.
-
-          Copyright of the software and supporting documentation is
-          jointly owned by RSNA and Washington University, and free access
-          is hereby granted as a license to use this software, copy this
-          software and prepare derivative works based upon this software.
-          However, any distribution of this software source code or
-          supporting documentation or derivative works (source code and
-          supporting documentation) must include the three paragraphs of
-          the copyright notice.
-*/
-
-/*
-**          DICOM 93
-**        Electronic Radiology Laboratory
-**      Mallinckrodt Institute of Radiology
-**    Washington University School of Medicine
-**
-** Module Name(s):
-** Author, Date:  Stephen M. Moore, 19-May-93
-** Intent:
-**  This header contains private typedefs for the DICOM Upper Layer
-**  (DUL) protocol package.  This is to be used to compile the DUL
-**  package and is not intended to be seen by the applications programmer.
-**  Files at the package level should include this file to get the
-**  proper typedefs and include the public file "dulprotocol.h" to
-**  get the public definitions and function prototypes.  I have omitted
-**  the public definitions and prototypes on purpose so that they
-**  exist in only one location.
-*/
-
-#ifndef DULSTRUC_H
-#define DULSTRUC_H
-
-#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
-#include "dcmtk/dcmnet/extneg.h"
-#include "dcmtk/dcmnet/dcuserid.h"
-
-class DcmTransportConnection;
-class DcmTransportLayer;
-
-#define NETWORK_DISCONNECTED  2
-#define NETWORK_CONNECTED 3
-
-typedef enum {
-    DUL_ASSOC_WAITINGFORACK,
-    DUL_ASSOC_ESTABLISHED,
-    DUL_ASSOC_RELEASED,
-    DUL_ASSOC_ABORTED,
-    DUL_ASSOC_DROPPED
-}   DUL_ASSOC_STATE;
-
-#define ASSOCIATION_DISCONNECTED  2
-#define ASSOCIATION_ABORTED   4
-#define ASSOCIATION_RELEASED    5
-
-typedef struct {
-    char keyType[40];
-    int applicationFunction;
-    int networkState;
-    int protocolState;
-    int timeout;
-    unsigned long options;
-    union {
-  struct {
-      int port;
-      DcmNativeSocketType listenSocket;
-      DcmTransportLayer *tLayer;
-      int tLayerOwned;
-  }   TCP;
-    }   networkSpecific;
-}   PRIVATE_NETWORKKEY;
-
-typedef struct {
-    char keyType[40];
-    int applicationFunction;
-    char remoteNode[64];
-    DUL_ASSOC_STATE associationState;
-    int protocolState;
-    int networkState;
-    int timeout;
-    time_t timerStart;
-    unsigned long maxPDVRequestor;
-    unsigned long maxPDVAcceptor;
-    unsigned long maxPDV;
-    unsigned long maxPDVInput;
-    unsigned long receiveQp1;
-    unsigned long receiveQp2;
-    char calledAPTitle[20];
-    char callingAPTitle[20];
-    char applicationContextName[68];
-    char abstractSyntaxName[68];
-    void *receivePDUQueue;
-    DUL_PRESENTATIONCONTEXTID presentationContextID;
-    DcmTransportConnection *connection;
-    DUL_PDVLIST pdvList;
-    int inputPDU;
-    unsigned char pduHead[6];
-    unsigned char nextPDUType;
-    unsigned char nextPDUReserved;
-    unsigned long nextPDULength;
-    unsigned long compatibilityMode;
-    int pdvCount;
-    int pdvIndex;
-    void *logHandle;
-    int associatePDUFlag;
-    void *associatePDU;
-    unsigned long associatePDULength;
-    DUL_PDV currentPDV;
-    unsigned char *pdvPointer;
-    unsigned long fragmentBufferLength;
-    unsigned char *fragmentBuffer;
-    DUL_ModeCallback *modeCallback;
-}   PRIVATE_ASSOCIATIONKEY;
-
-#define KEY_NETWORK "KEY NETWORK"
-#define KEY_ASSOCIATION "KEY ASSOCIATION"
-
-#define AE_REQUESTOR  "AE REQUESTOR"
-#define AE_ACCEPTOR "AE ACCEPTOR"
-#define AE_BOTH   "AE BOTH"
-
-#define NO_PDU    1
-#define PDU_HEAD  2
-#define PDU_DATA  2
-
-/* Default timeout for waiting for PDUs.  100 seconds is high,
-** but used for development so we have time to do things with the
-** debugger.  A lower value would be used in a production system.
-*/
-
-#define DEFAULT_TIMEOUT     100
-
-/*  Private definitions */
-
-typedef struct dul_subitem {
-    void *reserved[2];
-    unsigned char type;
-    unsigned char rsv1;
-    unsigned short length;
-    char data[DICOM_UI_LENGTH + 1];
-}   DUL_SUBITEM;
-
-typedef struct dul_maxlength {
-    void *reserved[2];
-    unsigned char type;
-    unsigned char rsv1;
-    unsigned short length;
-    unsigned long maxLength;
-}   DUL_MAXLENGTH;
-
-typedef struct {
-    unsigned char type;
-    unsigned char rsv1;
-    unsigned short length;
-    unsigned short maximumOperationsInvoked;
-    unsigned short maximumOperationsProvided;
-}   PRV_ASYNCOPERATIONS;
-
-typedef struct {
-    unsigned char type;
-    unsigned char rsv1;
-    unsigned short length;
-    char implementationClassUID[DICOM_UI_LENGTH + 1];
-}   PRV_IMPLEMENTATIONCLASSUID;
-
-typedef struct {
-    unsigned char type;
-    unsigned char rsv1;
-    unsigned short length;
-    char implementationVersionName[16 + 1];
-}   PRV_IMPLEMENTATIONVERSIONNAME;
-
-typedef struct {
-    void *reserved[2];
-    unsigned char type;
-    unsigned char rsv1;
-    unsigned short length;
-    unsigned short UIDLength;
-    char SOPClassUID[DICOM_UI_LENGTH + 1];
-    unsigned char SCURole;
-    unsigned char SCPRole;
-}   PRV_SCUSCPROLE;
-
-typedef struct dul_presentationcontext {
-    void *reserved[2];
-    unsigned char type;
-    unsigned char rsv1;
-    unsigned short length;
-    unsigned char contextID;
-    unsigned char rsv2;
-    unsigned char result;
-    unsigned char rsv3;
-
-    DUL_SUBITEM abstractSyntax;
-    LST_HEAD *transferSyntaxList;
-}   PRV_PRESENTATIONCONTEXTITEM;
-
-typedef struct user_info {
-    void *reserved[2];
-    unsigned char type;
-    unsigned char rsv1;
-    unsigned short length;
-    DUL_MAXLENGTH maxLength;                             // 51H: maximum length
-    PRV_ASYNCOPERATIONS asyncOperations;                 // 53H: async operations (not yet implemented!)
-    DUL_SUBITEM implementationClassUID;                  // 52H: implementation class UID
-    DUL_SUBITEM implementationVersionName;               // 55H: implementation version name
-    LST_HEAD *SCUSCPRoleList;                            // 54H: SCP/SCU role selection
-    SOPClassExtendedNegotiationSubItemList *extNegList;  // 56H: extended negotiation
-                                                         // 57H: SOP CLASS COMMON EXTENDED NEGOTIATION (not implemented)
-    UserIdentityNegotiationSubItem *usrIdent;            // 58H: user identity negotiation RQ or AC
-}   DUL_USERINFO;
-
-typedef struct dul_associatepdu {
-    void *reserved[2];
-    unsigned char type;
-    unsigned char rsv1;
-    unsigned long length;
-    unsigned short protocol;
-    unsigned char rsv2[2];
-    char calledAPTitle[18];
-    char callingAPTitle[18];
-    unsigned char rsv3[32];
-
-    DUL_SUBITEM applicationContext;
-    LST_HEAD *presentationContextList;
-    DUL_USERINFO userInfo;
-}   PRV_ASSOCIATEPDU;
-
-typedef struct dul_rejectreleaseabortpdu {
-    void *reserved[2];
-    unsigned char type;
-    unsigned char rsv1;
-    unsigned long length;
-    unsigned char rsv2;
-    unsigned char result;
-    unsigned char source;
-    unsigned char reason;
-}   DUL_REJECTRELEASEABORTPDU;
-
-typedef struct dul_presentationdatavalue {
-    void *reserved[2];
-    unsigned long length;
-    unsigned char presentationContextID;
-    unsigned char messageControlHeader;
-    void *data;
-}   DUL_PRESENTATIONDATAVALUE;
-
-typedef struct dul_datapdu {
-    void *reserved[2];
-    unsigned char type;
-    unsigned char rsv1;
-    unsigned long length;
-    DUL_PRESENTATIONDATAVALUE presentationDataValue;
-}   DUL_DATAPDU;
-
-#define DUL_PROTOCOL      (unsigned short) 0x01
-
-#define DUL_TYPEAPPLICATIONCONTEXT  (unsigned char)0x10
-#define DUL_TYPEPRESENTATIONCONTEXTRQ (unsigned char)0x20
-#define DUL_TYPEPRESENTATIONCONTEXTAC (unsigned char)0x21
-#define DUL_TYPEABSTRACTSYNTAX    (unsigned char)0x30
-#define DUL_TYPETRANSFERSYNTAX    (unsigned char)0x40
-#define DUL_TYPEUSERINFO    (unsigned char)0x50
-#define DUL_TYPEMAXLENGTH   (unsigned char)0x51
-#define DUL_TYPEIMPLEMENTATIONCLASSUID  (unsigned char)0x52
-#define DUL_TYPEASYNCOPERATIONS   (unsigned char)0x53
-#define DUL_TYPESCUSCPROLE    (unsigned char)0x54
-#define DUL_TYPEIMPLEMENTATIONVERSIONNAME (unsigned char)0x55
-
-#define COPY_LONG_BIG(A,B) {  \
-  (B)[0] = (unsigned char)((A)>>24);    \
-  (B)[1] = (unsigned char)((A)>>16) ; \
-  (B)[2] = (unsigned char)((A)>>8) ;  \
-  (B)[3] = (unsigned char)(A) ; }
-#define COPY_SHORT_BIG(A,B) { \
-  (B)[0] = (unsigned char)((A)>>8);   \
-  (B)[1] = (unsigned char)(A) ; }
-
-#define EXTRACT_LONG_BIG(A,B) {     \
-  (B) = (unsigned long)(A)[3]       \
-    | (((unsigned long)(A)[2]) << 8)    \
-    | (((unsigned long)(A)[1]) << 16)   \
-    | (((unsigned long)(A)[0]) << 24);  \
-  }
-
-#define EXTRACT_SHORT_BIG(A,B)  { (B) = (unsigned short)(A)[1] | (((unsigned short)(A)[0]) << 8); }
-
-#endif // #ifndef DULSTRUC_H
diff --git a/dcmnet/libsrc/helpers.cc b/dcmnet/libsrc/helpers.cc
new file mode 100644 (file)
index 0000000..9121926
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ *
+ *  Copyright (C) 2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were partly developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module: dcmnet
+ *
+ *  Author: Michael Onken
+ *
+ *  Purpose: Collection of helper functions
+ *
+ */
+
+#include "dcmtk/dcmnet/helpers.h"
+#include "dcmtk/dcmnet/lst.h"
+#include "dcmtk/dcmnet/assoc.h"
+#include "dcmtk/dcmnet/dulstruc.h"
+
+void
+destroyAssociatePDUPresentationContextList(LST_HEAD ** pcList)
+{
+    PRV_PRESENTATIONCONTEXTITEM
+        * prvCtx;
+    DUL_SUBITEM
+        * subItem;
+
+    if (*pcList == NULL)
+        return;
+
+    prvCtx = (PRV_PRESENTATIONCONTEXTITEM*)LST_Dequeue(pcList);
+    while (prvCtx != NULL) {
+        subItem = (DUL_SUBITEM*)LST_Dequeue(&prvCtx->transferSyntaxList);
+        while (subItem != NULL) {
+            free(subItem);
+            subItem = (DUL_SUBITEM*)LST_Dequeue(&prvCtx->transferSyntaxList);
+        }
+        LST_Destroy(&prvCtx->transferSyntaxList);
+        free(prvCtx);
+        prvCtx = (PRV_PRESENTATIONCONTEXTITEM*)LST_Dequeue(pcList);
+    }
+    LST_Destroy(pcList);
+}
+
+
+void
+destroyUserInformationLists(DUL_USERINFO * userInfo)
+{
+    PRV_SCUSCPROLE
+        * role;
+
+    role = (PRV_SCUSCPROLE*)LST_Dequeue(&userInfo->SCUSCPRoleList);
+    while (role != NULL) {
+        free(role);
+        role = (PRV_SCUSCPROLE*)LST_Dequeue(&userInfo->SCUSCPRoleList);
+    }
+    LST_Destroy(&userInfo->SCUSCPRoleList);
+
+    /* extended negotiation */
+    delete userInfo->extNegList;
+    userInfo->extNegList = NULL;
+
+    /* user identity negotiation */
+    delete userInfo->usrIdent;
+    userInfo->usrIdent = NULL;
+}
index e5f57a532e104ecffd41ab971ab63e9acad803cf..0798306832e73ec717882b50f1700d67d096308e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2009-2020, OFFIS e.V.
+ *  Copyright (C) 2009-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -853,7 +853,7 @@ OFCondition DcmSCP::sendSTOREResponse(const T_ASC_PresentationContextID presID,
     // Send back response
     T_DIMSE_Message response;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&response, sizeof(response));
+    memset((char*)&response, 0, sizeof(response));
     T_DIMSE_C_StoreRSP& storeRsp       = response.msg.CStoreRSP;
     response.CommandField              = DIMSE_C_STORE_RSP;
     storeRsp.MessageIDBeingRespondedTo = messageID;
@@ -968,7 +968,7 @@ OFCondition DcmSCP::sendFINDResponse(const T_ASC_PresentationContextID presID,
     // Send back response
     T_DIMSE_Message response;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&response, sizeof(response));
+    memset((char*)&response, 0, sizeof(response));
     T_DIMSE_C_FindRSP& findRsp        = response.msg.CFindRSP;
     response.CommandField             = DIMSE_C_FIND_RSP;
     findRsp.MessageIDBeingRespondedTo = messageID;
@@ -1090,7 +1090,7 @@ OFCondition DcmSCP::sendMOVEResponse(const T_ASC_PresentationContextID presID,
     // Send back response
     T_DIMSE_Message response;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&response, sizeof(response));
+    memset((char*)&response, 0, sizeof(response));
     T_DIMSE_C_MoveRSP& moveRsp        = response.msg.CMoveRSP;
     response.CommandField             = DIMSE_C_MOVE_RSP;
     moveRsp.MessageIDBeingRespondedTo = messageID;
@@ -1212,7 +1212,7 @@ OFCondition DcmSCP::sendACTIONResponse(const T_ASC_PresentationContextID presID,
     // Send back response
     T_DIMSE_Message response;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&response, sizeof(response));
+    memset((char*)&response, 0, sizeof(response));
     T_DIMSE_N_ActionRSP& actionRsp      = response.msg.NActionRSP;
     response.CommandField               = DIMSE_N_ACTION_RSP;
     actionRsp.MessageIDBeingRespondedTo = messageID;
@@ -1312,7 +1312,7 @@ OFCondition DcmSCP::handleEVENTREPORTRequest(T_DIMSE_N_EventReportRQ& reqMessage
     // Send back response
     T_DIMSE_Message response;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&response, sizeof(response));
+    memset((char*)&response, 0, sizeof(response));
     T_DIMSE_N_EventReportRSP& eventReportRsp = response.msg.NEventReportRSP;
     response.CommandField                    = DIMSE_N_EVENT_REPORT_RSP;
     eventReportRsp.MessageIDBeingRespondedTo = reqMessage.MessageID;
@@ -1367,7 +1367,7 @@ OFCondition DcmSCP::sendEVENTREPORTRequest(const T_ASC_PresentationContextID pre
     T_ASC_PresentationContextID pcid = presID;
     T_DIMSE_Message request;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&request, sizeof(request));
+    memset((char*)&request, 0, sizeof(request));
     T_DIMSE_N_EventReportRQ& eventReportReq = request.msg.NEventReportRQ;
     DcmDataset* statusDetail                = NULL;
 
index 1e4dd631d8d36f96407db5e259f817b401da684e..2a7c3eea12cbc99f6a435144dc402ed08714e202 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2008-2019, OFFIS e.V.
+ *  Copyright (C) 2008-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,6 +27,7 @@
 #include "dcmtk/dcmnet/scu.h"
 #include "dcmtk/ofstd/ofmem.h" /* for OFunique_ptr */
 
+
 #ifdef WITH_ZLIB
 #include <zlib.h> /* for zlibVersion() */
 #endif
@@ -601,7 +602,7 @@ OFCondition DcmSCU::sendECHORequest(const T_ASC_PresentationContextID presID)
     /* Now, assemble DIMSE message */
     T_DIMSE_Message msg;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&msg, sizeof(msg));
+    memset((char*)&msg, 0, sizeof(msg));
     T_DIMSE_C_EchoRQ* req = &(msg.msg.CEchoRQ);
     // Set type of message
     msg.CommandField = DIMSE_C_ECHO_RQ;
@@ -633,7 +634,7 @@ OFCondition DcmSCU::sendECHORequest(const T_ASC_PresentationContextID presID)
     /* Receive response */
     T_DIMSE_Message rsp;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&rsp, sizeof(rsp));
+    memset((char*)&rsp, 0, sizeof(rsp));
 
     DcmDataset* statusDetail = NULL;
     cond = receiveDIMSECommand(&pcid, &rsp, &statusDetail, NULL /* not interested in the command set */);
@@ -695,7 +696,7 @@ OFCondition DcmSCU::sendSTORERequest(const T_ASC_PresentationContextID presID,
     DcmDataset* statusDetail         = NULL;
     T_DIMSE_Message msg;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&msg, sizeof(msg));
+    memset((char*)&msg, 0, sizeof(msg));
     T_DIMSE_C_StoreRQ* req = &(msg.msg.CStoreRQ);
 
     // Set type of message
@@ -834,7 +835,7 @@ OFCondition DcmSCU::sendSTORERequest(const T_ASC_PresentationContextID presID,
     /* Receive response */
     T_DIMSE_Message rsp;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&rsp, sizeof(rsp));
+    memset((char*)&rsp, 0, sizeof(rsp));
     cond = receiveDIMSECommand(&pcid, &rsp, &statusDetail, NULL /* not interested in the command set */);
     if (cond.bad())
     {
@@ -896,7 +897,7 @@ OFCondition DcmSCU::sendMOVERequest(const T_ASC_PresentationContextID presID,
     T_ASC_PresentationContextID pcid = presID;
     T_DIMSE_Message msg;
     // make sure everything is zeroed (especially options)
-    bzero((char*)&msg, sizeof(msg));
+    memset((char*)&msg, 0, sizeof(msg));
     DcmDataset* statusDetail = NULL;
     T_DIMSE_C_MoveRQ* req    = &(msg.msg.CMoveRQ);
     // Set type of message
@@ -940,7 +941,7 @@ OFCondition DcmSCU::sendMOVERequest(const T_ASC_PresentationContextID presID,
     {
         T_DIMSE_Message rsp;
         // Make sure everything is zeroed, especially options
-        bzero((char*)&rsp, sizeof(rsp));
+        memset((char*)&rsp, 0, sizeof(rsp));
         statusDetail = NULL;
 
         // Receive command set
@@ -1064,7 +1065,7 @@ OFCondition DcmSCU::sendCGETRequest(const T_ASC_PresentationContextID presID,
     T_ASC_PresentationContextID pcid = presID;
     T_DIMSE_Message msg;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&msg, sizeof(msg));
+    memset((char*)&msg, 0, sizeof(msg));
     T_DIMSE_C_GetRQ* req = &(msg.msg.CGetRQ);
     // Set type of message
     msg.CommandField = DIMSE_C_GET_RQ;
@@ -1118,7 +1119,7 @@ OFCondition DcmSCU::handleCGETSession(const T_ASC_PresentationContextID /* presI
     {
         T_DIMSE_Message rsp;
         // Make sure everything is zeroed (especially options)
-        bzero((char*)&rsp, sizeof(rsp));
+        memset((char*)&rsp, 0, sizeof(rsp));
 
         DcmDataset* statusDetail         = NULL;
         T_ASC_PresentationContextID pcid = 0;
@@ -1373,7 +1374,7 @@ DcmSCU::sendSTOREResponse(T_ASC_PresentationContextID presID, Uint16 status, con
     // Send back response
     T_DIMSE_Message response;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&response, sizeof(response));
+    memset((char*)&response, 0, sizeof(response));
     T_DIMSE_C_StoreRSP& storeRsp       = response.msg.CStoreRSP;
     response.CommandField              = DIMSE_C_STORE_RSP;
     storeRsp.MessageIDBeingRespondedTo = request.MessageID;
@@ -1470,7 +1471,7 @@ DcmSCU::sendFINDRequest(const T_ASC_PresentationContextID presID, DcmDataset* qu
     T_ASC_PresentationContextID pcid = presID;
     T_DIMSE_Message msg;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&msg, sizeof(msg));
+    memset((char*)&msg, 0, sizeof(msg));
 
     DcmDataset* statusDetail = NULL;
     T_DIMSE_C_FindRQ* req    = &(msg.msg.CFindRQ);
@@ -1513,7 +1514,7 @@ DcmSCU::sendFINDRequest(const T_ASC_PresentationContextID presID, DcmDataset* qu
     {
         T_DIMSE_Message rsp;
         // Make sure everything is zeroed (especially options)
-        bzero((char*)&rsp, sizeof(rsp));
+        memset((char*)&rsp, 0, sizeof(rsp));
 
         statusDetail = NULL;
 
@@ -1621,7 +1622,7 @@ OFCondition DcmSCU::sendCANCELRequest(const T_ASC_PresentationContextID presID)
     T_ASC_PresentationContextID pcid = presID;
     T_DIMSE_Message msg;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&msg, sizeof(msg));
+    memset((char*)&msg, 0, sizeof(msg));
     T_DIMSE_C_CancelRQ* req = &(msg.msg.CCancelRQ);
     // Set type of message
     msg.CommandField = DIMSE_C_CANCEL_RQ;
@@ -1687,7 +1688,7 @@ OFCondition DcmSCU::sendACTIONRequest(const T_ASC_PresentationContextID presID,
     T_ASC_PresentationContextID pcid = presID;
     T_DIMSE_Message request;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&request, sizeof(request));
+    memset((char*)&request, 0, sizeof(request));
     T_DIMSE_N_ActionRQ& actionReq = request.msg.NActionRQ;
     DcmDataset* statusDetail      = NULL;
 
@@ -1728,7 +1729,7 @@ OFCondition DcmSCU::sendACTIONRequest(const T_ASC_PresentationContextID presID,
 
     // Receive response
     T_DIMSE_Message response;
-    bzero((char*)&response, sizeof(response));
+    memset((char*)&response, 0, sizeof(response));
     cond = receiveDIMSECommand(&pcid, &response, &statusDetail, NULL /* commandSet */);
     if (cond.bad())
     {
@@ -1822,7 +1823,7 @@ OFCondition DcmSCU::sendEVENTREPORTRequest(const T_ASC_PresentationContextID pre
     T_ASC_PresentationContextID pcid = presID;
     T_DIMSE_Message request;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&request, sizeof(request));
+    memset((char*)&request, 0, sizeof(request));
 
     T_DIMSE_N_EventReportRQ& eventReportReq = request.msg.NEventReportRQ;
     DcmDataset* statusDetail                = NULL;
@@ -1867,7 +1868,7 @@ OFCondition DcmSCU::sendEVENTREPORTRequest(const T_ASC_PresentationContextID pre
     // Receive response
     T_DIMSE_Message response;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&response, sizeof(response));
+    memset((char*)&response, 0, sizeof(response));
 
     cond = receiveDIMSECommand(&pcid, &response, &statusDetail, NULL /* commandSet */);
     if (cond.bad())
@@ -1952,7 +1953,7 @@ OFCondition DcmSCU::handleEVENTREPORTRequest(DcmDataset*& reqDataset, Uint16& ev
     T_ASC_PresentationContextID presIDdset;
     T_DIMSE_Message request;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&request, sizeof(request));
+    memset((char*)&request, 0, sizeof(request));
     T_DIMSE_N_EventReportRQ& eventReportReq = request.msg.NEventReportRQ;
     DcmDataset* dataset                     = NULL;
     DcmDataset* statusDetail                = NULL;
@@ -2038,7 +2039,7 @@ OFCondition DcmSCU::handleEVENTREPORTRequest(DcmDataset*& reqDataset, Uint16& ev
     // Send back response
     T_DIMSE_Message response;
     // Make sure everything is zeroed (especially options)
-    bzero((char*)&response, sizeof(response));
+    memset((char*)&response, 0, sizeof(response));
 
     T_DIMSE_N_EventReportRSP& eventReportRsp = response.msg.NEventReportRSP;
     response.CommandField                    = DIMSE_N_EVENT_REPORT_RSP;
@@ -2171,7 +2172,7 @@ OFCondition DcmSCU::sendDIMSEMessage(const T_ASC_PresentationContextID presID,
     delete m_openDIMSERequest;
     m_openDIMSERequest = new T_DIMSE_Message;
     // Make sure everyhting is zeroed (especially options)
-    bzero((char*)&m_openDIMSERequest, sizeof(m_openDimseRequest));
+    memset((char*)&m_openDIMSERequest, 0, sizeof(m_openDimseRequest));
     memcpy((char*)m_openDIMSERequest, msg, sizeof(*m_openDIMSERequest));
   }
 #endif
index b8c0ab5a8340ad0dac27a70eed6b42e0a910feac..54238364f5f123271d18c17f408a56be93374b90 100644 (file)
@@ -1,5 +1,12 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(dcmnet_tests tests tdump tdimse tpool tscuscp tscusession)
+DCMTK_ADD_EXECUTABLE(dcmnet_tests
+  tdimse.cc
+  tdump.cc
+  tests.cc
+  tpool.cc
+  tscuscp.cc
+  tscusession.cc
+)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(dcmnet_tests dcmnet)
index 172d63bfbf54f05f68486f06bb215f79cbcf590b..44bc07c9b14f0c93b433c2cf096201ed980754c3 100644 (file)
@@ -1,3 +1,73 @@
+tdimse.o: tdimse.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../../ofstd/include/dcmtk/ofstd/oftest.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexit.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/dicom.h \
+ ../include/dcmtk/dcmnet/cond.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
+ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/assoc.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/constexp.def
 tdump.o: tdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
@@ -60,10 +130,11 @@ tdump.o: tdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h ../include/dcmtk/dcmnet/dndefine.h \
- ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
+ ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/assoc.h \
@@ -243,8 +314,7 @@ tpool.o: tpool.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h ../include/dcmtk/dcmnet/dndefine.h \
- ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
+ ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.h \
@@ -254,13 +324,13 @@ tpool.o: tpool.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
  ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/scu.h
 tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
@@ -376,8 +446,7 @@ tscuscp.o: tscuscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../include/dcmtk/dcmnet/assoc.h ../include/dcmtk/dcmnet/dicom.h \
  ../include/dcmtk/dcmnet/cond.h ../include/dcmtk/dcmnet/dndefine.h \
- ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
+ ../include/dcmtk/dcmnet/dcompat.h ../include/dcmtk/dcmnet/lst.h \
  ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
  ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.h \
@@ -505,16 +574,15 @@ tscusession.o: tscusession.cc \
  ../include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../include/dcmtk/dcmnet/dndefine.h ../include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h ../include/dcmtk/dcmnet/lst.h \
- ../include/dcmtk/dcmnet/dul.h ../include/dcmtk/dcmnet/extneg.h \
- ../include/dcmtk/dcmnet/dcuserid.h ../include/dcmtk/dcmnet/dntypes.h \
- ../include/dcmtk/dcmnet/dimse.h ../include/dcmtk/dcmnet/diutil.h \
- ../include/dcmtk/dcmnet/scpcfg.h ../include/dcmtk/dcmnet/dcasccff.h \
- ../include/dcmtk/dcmnet/dcasccfg.h ../include/dcmtk/dcmnet/dccftsmp.h \
- ../include/dcmtk/dcmnet/dccfuidh.h ../include/dcmtk/dcmnet/dccfpcmp.h \
- ../include/dcmtk/dcmnet/dccfrsmp.h ../include/dcmtk/dcmnet/dccfenmp.h \
- ../include/dcmtk/dcmnet/dccfprmp.h ../include/dcmtk/dcmnet/scu.h \
- ../../ofstd/include/dcmtk/ofstd/oftest.h \
+ ../include/dcmtk/dcmnet/lst.h ../include/dcmtk/dcmnet/dul.h \
+ ../include/dcmtk/dcmnet/extneg.h ../include/dcmtk/dcmnet/dcuserid.h \
+ ../include/dcmtk/dcmnet/dntypes.h ../include/dcmtk/dcmnet/dimse.h \
+ ../include/dcmtk/dcmnet/diutil.h ../include/dcmtk/dcmnet/scpcfg.h \
+ ../include/dcmtk/dcmnet/dcasccff.h ../include/dcmtk/dcmnet/dcasccfg.h \
+ ../include/dcmtk/dcmnet/dccftsmp.h ../include/dcmtk/dcmnet/dccfuidh.h \
+ ../include/dcmtk/dcmnet/dccfpcmp.h ../include/dcmtk/dcmnet/dccfrsmp.h \
+ ../include/dcmtk/dcmnet/dccfenmp.h ../include/dcmtk/dcmnet/dccfprmp.h \
+ ../include/dcmtk/dcmnet/scu.h ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
index 512f887721eece7c489f5d5ed937b85690ad24ac..8f023c648ec046ebf43c3229605b37161c52283d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2020-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -24,7 +24,8 @@
 
 #include "dcmtk/ofstd/oftest.h"
 #include "dcmtk/dcmnet/dimse.h"
-
+#include "dcmtk/ofstd/ofdiag.h"
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
 
 OFTEST(dcmnet_dimseStatusClass)
 {
index 6b8cf3be3aee63d876fb70a35a47518573f8bb81..31ddfe5f505c5c1a5f68db8f07e3ce03d8be5a74 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017, OFFIS e.V.
+ *  Copyright (C) 2017-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #ifdef WITH_THREADS
 
-#define INCLUDE_CMATH
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/ofstd/oftest.h"
 #include "dcmtk/ofstd/oftimer.h"
 #include "dcmtk/dcmnet/scp.h"
 #include "dcmtk/dcmnet/scu.h"
 
-
+#include <cmath>
 
 static OFLogger t_scuscp_logger= OFLog::getLogger("dcmtk.test.tscuscp");
 
-/** Method that ensures that the current thread is actually sleeping for the
- *  defined number of seconds (at least).
- *  The problem with the regular sleep() function called from OFStandard::sleep
- *  is that it might be interrupted by signals or a network timeout (depending
- *  on the operating system). This methods re-executes OFStandard'S sleep method
- *  until the desired number of seconds have elapsed.
- *  @param sleep The number of seconds to sleep (at least)
- */
-static void force_sleep(Uint32 sleep)
-{
-    OFTimer timer;
-    double elapsed = timer.getDiff();
-    while (elapsed < (double)sleep)
-    {
-        // Use ceiling since otherwise we could wait too short
-        OFStandard::sleep(OFstatic_cast(unsigned int, ceil(sleep-elapsed)));
-        elapsed = timer.getDiff();
-    }
-}
-
-
 /** SCP derived from DcmSCP in order to test two types of virtual methods:
  *  <ul>
  *    <li> Notifiers: Called for some events happening in DcmSCP. So far
@@ -225,7 +202,7 @@ void scu_sends_echo(
   const int secs_after_echo = 0)
 {
     // make sure server is up
-    force_sleep(2);
+    OFStandard::forceSleep(2);
     DcmSCU scu;
     scu.setAETitle("TEST_SCU");
     scu.setPeerAETitle(called_ae_title);
@@ -243,7 +220,7 @@ void scu_sends_echo(
         OFCHECK(result.good());
         result = scu.sendECHORequest(1);
         OFCHECK(result.good());
-        force_sleep(secs_after_echo);
+        OFStandard::forceSleep(secs_after_echo);
         if (do_release)
         {
             result = scu.releaseAssociation();
@@ -275,7 +252,7 @@ OFTEST_FLAGS(dcmnet_scp_stop_after_current_association, EF_Slow)
     // Send ECHO, and wait to be sure SCP has time to exit
     scu_sends_echo("STOP_AFTER_ASSOC");
     // Make sure server would have time to return
-    force_sleep(2);
+    OFStandard::forceSleep(2);
 
     // Check whether all test variables have the correct values
     OFCHECK(scp.m_listen_result == EC_NotYetImplemented); // still listening
@@ -288,7 +265,7 @@ OFTEST_FLAGS(dcmnet_scp_stop_after_current_association, EF_Slow)
     scp.clear();
     scp.m_set_stop_after_assoc = OFTrue;
     scu_sends_echo("STOP_AFTER_ASSOC");
-    force_sleep(2);
+    OFStandard::forceSleep(2);
 
     // Check whether all test variables have the correct values
     OFCHECK(scp.m_listen_result == NET_EC_StopAfterAssociation);
@@ -345,7 +322,7 @@ OFTEST_FLAGS(dcmnet_scp_fail_on_disallowed_host, EF_Slow)
     scp.start();
 
     scu_sends_echo("REJECT_HOST", OFTrue /* expect that association is being refused */);
-    force_sleep(2);  // make sure server would have time to return
+    OFStandard::forceSleep(2);  // make sure server would have time to return
 
     // Check whether all test variables have the correct values
     OFCHECK(scp.m_listen_result == NET_EC_StopAfterAssociation);
@@ -377,7 +354,7 @@ OFTEST_FLAGS(dcmnet_scp_builtin_verification_support, EF_Slow)
     // Send echo and receive response
     scu_sends_echo("TEST_BUILTIN_VER");
     // make sure server would have time to return
-    force_sleep(1);
+    OFStandard::forceSleep(1);
 
     // Check whether all test variables have the correct values
     OFCHECK(scp.m_listen_result == NET_EC_StopAfterAssociation);
@@ -402,7 +379,7 @@ OFTEST_FLAGS(dcmnet_scp_stop_after_timeout, EF_Slow)
     config.setConnectionTimeout(5);
     scp.m_set_stop_after_timeout = OFTrue;
     scp.start();
-    force_sleep(1);
+    OFStandard::forceSleep(1);
     scu_sends_echo("STOP_ON_TIMEOUT");
     // Wait for server to return after connection has been served and timeout
     // has been reached
@@ -435,7 +412,7 @@ OFTEST_FLAGS(dcmnet_scp_no_stop_wo_request_noblock, EF_Slow)
 
     // Check whether all test variables have the correct values, especially that
     // timeout occurred but did not lead to a stop
-    force_sleep(5);
+    OFStandard::forceSleep(5);
     OFCHECK(scp.m_listen_result == EC_NotYetImplemented);      // still listening
     OFCHECK(scp.m_stop_after_assoc_result == OFFalse);
     OFCHECK(scp.m_stop_after_timeout_result == OFFalse);
@@ -462,7 +439,7 @@ OFTEST_FLAGS(dcmnet_scp_no_stop_wo_request_block, EF_Slow)
     scu_sends_echo("NO_STOP_BLOCK");
 
     // Give some time to SCP so it could return
-    force_sleep(3);
+    OFStandard::forceSleep(3);
 
     // Check whether all test variables have the correct values
     // SCP did not return yet (check whether it is still connected)
@@ -539,7 +516,7 @@ void test_role_selection(const T_ASC_SC_ROLE r_req,
     scp.start();
 
     // Ensure server is up and listening
-    force_sleep(1);
+    OFStandard::forceSleep(1);
 
     // Configure SCP and run it against SCP with the desired role
     DcmSCU scu;
index 7ae4ff53a2ab7a95362ea1306a5b31941d72af72..08a24dbbf852597a2597235465d2f00c10a4fb47 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019-2020, OFFIS e.V.
+ *  Copyright (C) 2019-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #ifdef WITH_THREADS
 
-#define INCLUDE_CMATH
 #include "dcmtk/dcmnet/scp.h"
 #include "dcmtk/dcmnet/scu.h"
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/ofstd/oftest.h"
 #include "dcmtk/ofstd/oftimer.h"
 
+#include <cmath>
+
 static Uint8 NUM_DIMSE_REQUESTS = 5;
 
 /** Method that ensures that the current thread is actually sleeping for the
index 4087463409c02f4e7522017edff248d87a6ac126..f0397107c113349c868765f4f6b494e97f98a5b5 100644 (file)
@@ -1,4 +1,10 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmpmap dpmtypes dpmmodparametricmapseries dpmmodparametricmapimage dpmparametricmapbase dpmparametricmapiod)
+DCMTK_ADD_LIBRARY(dcmpmap
+  dpmmodparametricmapimage.cc
+  dpmmodparametricmapseries.cc
+  dpmparametricmapbase.cc
+  dpmparametricmapiod.cc
+  dpmtypes.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmpmap dcmfg dcmiod dcmdata ofstd oflog)
index 42bdd71d1e6e56cc51ef9868bed38562ba53571d..65f3eb1ff44643168dbf04dcc9731aaa9f72063d 100644 (file)
@@ -3,12 +3,12 @@ dpmmodparametricmapimage.o: dpmmodparametricmapimage.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
@@ -76,12 +76,12 @@ dpmmodparametricmapseries.o: dpmmodparametricmapseries.cc \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
@@ -353,9 +353,9 @@ dpmparametricmapbase.o: dpmparametricmapbase.cc \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \
  ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/diag/push.def \
  ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \
  ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \
@@ -523,9 +523,9 @@ dpmparametricmapiod.o: dpmparametricmapiod.cc \
  ../../dcmiod/include/dcmtk/dcmiod/modgeneralimage.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
  ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/diag/push.def \
  ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \
  ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \
index a31f97929e5289c7a6c4f8b938c592649c9df54b..1b5e9cdf8e3f5192712ea739abedf27d1a9e64d4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016-2018, Open Connections GmbH
+ *  Copyright (C) 2016-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -222,8 +222,16 @@ IODSOPCommonModule& DPMParametricMapBase::getIODSOPCommonModule()
   return DPMParametricMapBase::IODImage::getSOPCommon();
 }
 
-
+#ifdef __SUNPRO_CC
+// the SunPro compiler would complain that the DCMTK_DCMPMAP_EXPORT attribute cannot be applied
+// to an explicit template instantiation.
+template DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODImagePixelModule<Uint16>));
+template DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODImagePixelModule<Sint16>));
+template DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODFloatingPointImagePixelModule));
+template DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODDoubleFloatingPointImagePixelModule));
+#else
 template DCMTK_DCMPMAP_EXPORT DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODImagePixelModule<Uint16>));
 template DCMTK_DCMPMAP_EXPORT DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODImagePixelModule<Sint16>));
 template DCMTK_DCMPMAP_EXPORT DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODFloatingPointImagePixelModule));
 template DCMTK_DCMPMAP_EXPORT DPMParametricMapBase::DPMParametricMapBase(OFin_place_type_t(IODDoubleFloatingPointImagePixelModule));
+#endif
index 1b5e059058135d620fc93aff197c7a21d1fecd35..276afb53efc442e514df270fef7d2a51f5345be1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016-2019, Open Connections GmbH
+ *  Copyright (C) 2016-2021, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -1017,6 +1017,25 @@ template class DPMParametricMapIOD::Frames<Sint16>;
 template class DPMParametricMapIOD::Frames<Float32>;
 template class DPMParametricMapIOD::Frames<Float64>;
 
+#ifdef __SUNPRO_CC
+// the SunPro compiler would complain that the DCMTK_DCMPMAP_EXPORT attribute cannot be applied
+// to an explicit template instantiation.
+
+// Helper macro to not to write the same thing multiple times
+#define INSTANTIATE_CREATE(T) template OFvariant<OFCondition,DPMParametricMapIOD>\
+DPMParametricMapIOD::create<T >(const OFString& modality,\
+                                const OFString& seriesNumber,\
+                                const OFString& instanceNumber,\
+                                const Uint16 rows,\
+                                const Uint16 columns,\
+                                const IODEnhGeneralEquipmentModule::EquipmentInfo& equipmentInfo,\
+                                const ContentIdentificationMacro& contentIdentification,\
+                                const OFString& imageFlavor,\
+                                const OFString& derivedPixelContrast,\
+                                const DPMTypes::ContentQualification& contentQualification)
+
+#else
+
 // Helper macro to not to write the same thing multiple times
 #define INSTANTIATE_CREATE(T) template DCMTK_DCMPMAP_EXPORT OFvariant<OFCondition,DPMParametricMapIOD>\
 DPMParametricMapIOD::create<T >(const OFString& modality,\
@@ -1030,6 +1049,8 @@ DPMParametricMapIOD::create<T >(const OFString& modality,\
                                 const OFString& derivedPixelContrast,\
                                 const DPMTypes::ContentQualification& contentQualification)
 
+#endif
+
 // Instantiate all four permitted create() methods
 INSTANTIATE_CREATE(IODImagePixelModule<Uint16>);
 INSTANTIATE_CREATE(IODImagePixelModule<Sint16>);
index 776e46222075015cec5065f2639bf77842b338d7..0209208aa5a6b489dc8aa0d409045e6b6f99a033 100644 (file)
@@ -3,7 +3,7 @@ include_directories(${dcmtls_SOURCE_DIR}/include ${LIBXML_INCDIR})
 
 # declare executables
 foreach(PROGRAM dcmmkcrv dcmmklut dcmp2pgm dcmprscp dcmprscu dcmpschk dcmpsmk dcmpsprt dcmpsrcv dcmpssnd)
-  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM})
+  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc)
 endforeach()
 
 # make sure executables are linked to the corresponding libraries
index 8b610b218e4ed9968d79c8d29b0a25ea1f7ff1ff..8b2ee66f49a7c4b62d3e3a2586b0f71b6e0f7306 100644 (file)
@@ -1,11 +1,11 @@
 dcmmkcrv.o: dcmmkcrv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -119,6 +119,7 @@ dcmmkcrv.o: dcmmkcrv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h
 dcmmklut.o: dcmmklut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -127,7 +128,6 @@ dcmmklut.o: dcmmklut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -244,13 +244,13 @@ dcmmklut.o: dcmmklut.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofrand.h
 dcmp2pgm.o: dcmp2pgm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dviface.h ../include/dcmtk/dcmpstat/dvpscf.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
@@ -373,7 +373,6 @@ dcmp2pgm.o: dcmp2pgm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \
@@ -412,11 +411,11 @@ dcmp2pgm.o: dcmp2pgm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofexit.h
 dcmprscp.o: dcmprscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dvpsdef.h ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
@@ -542,7 +541,6 @@ dcmprscp.o: dcmprscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \
@@ -557,6 +555,7 @@ dcmprscp.o: dcmprscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../ofstd/include/dcmtk/ofstd/offname.h \
  ../include/dcmtk/dcmpstat/dvcache.h \
+ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmnet/include/dcmtk/dcmnet/diutil.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
@@ -569,19 +568,18 @@ dcmprscp.o: dcmprscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/helpers/timehelp.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlstrans.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \
- ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h
 dcmprscu.o: dcmprscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dvpsdef.h ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -720,6 +718,7 @@ dcmprscu.o: dcmprscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../ofstd/include/dcmtk/ofstd/offname.h \
  ../include/dcmtk/dcmpstat/dvcache.h \
+ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
@@ -746,13 +745,13 @@ dcmprscu.o: dcmprscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpsabl.h ../include/dcmtk/dcmpstat/dvpshlp.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlstrans.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \
- ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h
 dcmpschk.o: dcmpschk.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -875,7 +874,6 @@ dcmpschk.o: dcmpschk.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
  ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmpstat/dcmpstat.h ../include/dcmtk/dcmpstat/dvpstyp.h \
@@ -886,12 +884,12 @@ dcmpschk.o: dcmpschk.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpsvwl.h ../include/dcmtk/dcmpstat/dvpsdal.h \
  ../include/dcmtk/dcmpstat/dvpssvl.h ../include/dcmtk/dcmpstat/dvpspl.h
 dcmpsmk.o: dcmpsmk.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
@@ -1010,7 +1008,6 @@ dcmpsmk.o: dcmpsmk.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
  ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../include/dcmtk/dcmpstat/dcmpstat.h ../include/dcmtk/dcmpstat/dvpstyp.h \
@@ -1022,8 +1019,8 @@ dcmpsmk.o: dcmpsmk.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpssvl.h ../include/dcmtk/dcmpstat/dvpspl.h \
  ../include/dcmtk/dcmpstat/dvpshlp.h
 dcmpsprt.o: dcmpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dviface.h ../include/dcmtk/dcmpstat/dvpscf.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -1152,7 +1149,6 @@ dcmpsprt.o: dcmpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \
@@ -1195,10 +1191,10 @@ dcmpsrcv.o: dcmpsrcv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -1349,10 +1345,10 @@ dcmpssnd.o: dcmpssnd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -1436,7 +1432,7 @@ dcmpssnd.o: dcmpssnd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpsmsg.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlstrans.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \
- ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h
index cd651aff939731ea0299736b76fbd06938a4139f..23aa97dbe46c0128f23f14473b77067afbe14760 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2019, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/ofrand.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CMATH
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef WITH_ZLIB
 #include <zlib.h>        /* for zlibVersion() */
 #endif
@@ -571,8 +565,8 @@ static OFCondition createLUT(const unsigned int numberOfBits,
         if (descriptor)
         {
             if (EC_Normal==result) result = descriptor->putUint16(numEntries16, 0);
-            if (EC_Normal==result) result = descriptor->putUint16((Uint16)firstMapped, 1);
-            if (EC_Normal==result) result = descriptor->putUint16(numberOfBits, 2);
+            if (EC_Normal==result) result = descriptor->putUint16(OFstatic_cast(Uint16, firstMapped), 1);
+            if (EC_Normal==result) result = descriptor->putUint16(OFstatic_cast(Uint16, numberOfBits), 2);
             if (EC_Normal==result) result = item.insert(descriptor, OFTrue /*replaceOld*/);
         } else
             return EC_MemoryExhausted;
index f7c39413b0bc3fe69fbb0a4a42edcc3a448ef419..1dd8b9f3d9b27f50e7fa29d05cd7c7fd0d66a1fb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2019, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -369,20 +369,20 @@ int main(int argc, char *argv[])
         OFLOG_WARN(dcmprscpLogger, "unknown TLS profile '" << profileName << "', ignoring");
       }
 
-      if (TCS_ok != tLayer->setTLSProfile(tlsProfile))
+      if (tLayer->setTLSProfile(tlsProfile).bad())
       {
         OFLOG_FATAL(dcmprscpLogger, "unable to select the TLS security profile");
         return 1;
       }
 
       // activate cipher suites
-      if (TCS_ok != tLayer->activateCipherSuites())
+      if (tLayer->activateCipherSuites().bad())
       {
         OFLOG_FATAL(dcmprscpLogger, "unable to activate the selected list of TLS ciphersuites");
         return 1;
       }
 
-      if (tlsCACertificateFolder && (TCS_ok != tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat)))
+      if (tlsCACertificateFolder && (tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat).bad()))
       {
         OFLOG_WARN(dcmprscpLogger, "unable to load certificates from directory '" << tlsCACertificateFolder << "', ignoring");
       }
@@ -392,12 +392,12 @@ int main(int argc, char *argv[])
       }
       tLayer->setPrivateKeyPasswd(tlsPrivateKeyPassword); // never prompt on console
 
-      if (TCS_ok != tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat))
+      if (tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat).bad())
       {
         OFLOG_FATAL(dcmprscpLogger, "unable to load private TLS key from '" << tlsPrivateKeyFile<< "'");
         return 1;
       }
-      if (TCS_ok != tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat))
+      if (tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat).bad())
       {
         OFLOG_FATAL(dcmprscpLogger, "unable to load certificate from '" << tlsCertificateFile << "'");
         return 1;
index 15644d2573a7c674e836ce1528d52b832e62c1a5..9f3656a0e4fee7dc99c8f47034447ca242e08a4f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (C) 1999-2020, OFFIS e.V.
+ *  Copyright (C) 1999-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -22,9 +22,6 @@
 
 #include "dcmtk/dcmnet/dcompat.h"     /* compatibility code, needs to be included before dirent.h */
 
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 /* This #if code is suggested by the gnu autoconf documentation */
 #ifdef HAVE_DIRENT_H
@@ -387,7 +384,7 @@ static OFCondition spoolJobList(
  */
 static OFBool readValuePair(FILE *infile, OFString& key, OFString& value)
 {
-  int c;
+  int c = 0;
   int mode = 0;
   key.clear();
   value.clear();
@@ -897,20 +894,20 @@ int main(int argc, char *argv[])
         OFLOG_WARN(dcmprscuLogger, "unknown TLS profile '" << profileName << "', ignoring");
       }
 
-      if (TCS_ok != tLayer->setTLSProfile(tlsProfile))
+      if (tLayer->setTLSProfile(tlsProfile).bad())
       {
         OFLOG_FATAL(dcmprscuLogger, "unable to select the TLS security profile");
         return 1;
       }
 
       // activate cipher suites
-      if (TCS_ok != tLayer->activateCipherSuites())
+      if (tLayer->activateCipherSuites().bad())
       {
         OFLOG_FATAL(dcmprscuLogger, "unable to activate the selected list of TLS ciphersuites");
         return 1;
       }
 
-      if (tlsCACertificateFolder && (TCS_ok != tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat)))
+      if (tlsCACertificateFolder && (tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat).bad()))
       {
         OFLOG_WARN(dcmprscuLogger, "unable to load certificates from directory '" << tlsCACertificateFolder << "', ignoring");
       }
@@ -922,12 +919,12 @@ int main(int argc, char *argv[])
 
       if (!tlsPrivateKeyFile.empty() && !tlsCertificateFile.empty())
       {
-        if (TCS_ok != tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat))
+        if (tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat).bad())
         {
           OFLOG_FATAL(dcmprscuLogger, "unable to load private TLS key from '" << tlsPrivateKeyFile<< "'");
           return 1;
         }
-        if (TCS_ok != tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat))
+        if (tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat).bad())
         {
           OFLOG_FATAL(dcmprscuLogger, "unable to load certificate from '" << tlsCertificateFile << "'");
           return 1;
index 42f394dd118287c6e2db16ed8a2e30730514e527..e7716c6f6df3149d363556b8aeb18bbc85efeb84 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2018, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -22,9 +22,6 @@
 
 #include "dcmtk/config/osconfig.h"     /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofstring.h"      /* for class OFString */
 #include "dcmtk/ofstd/ofconapp.h"      /* for OFConsoleApplication */
index 061c3ca80446705d10fc5af3581136b58c0947e6..67cd9a0d8c423bb3428b93da0aa678bba7fa9451 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofconapp.h"
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/dcmdata/cmdlnarg.h"
@@ -311,7 +306,7 @@ int main(int argc, char *argv[])
     /* add additional image references to pstate */
     if (cmd.getParamCount() > 2)
     {
-        OFLOG_INFO(dcmpsmkLogger, "adding additonal image reference(s)");
+        OFLOG_INFO(dcmpsmkLogger, "adding additional image reference(s)");
         const int count = cmd.getParamCount();
         for (int i = 2; i < count; i++)
         {
index 574f7603ad59d8bd93bc8e7b213dd76a743c50a4..b0d69d187768518c3a2f987ddbb30355d915c7f5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2020, OFFIS e.V.
+ *  Copyright (C) 1999-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,9 +26,6 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmpstat/dviface.h"
 #include "dcmtk/dcmpstat/dvpssp.h"
@@ -73,7 +70,6 @@ static int addOverlay(const char *filename,
                 input >> ysize;
                 if ((xpos + xsize <= width) && (ypos + ysize <= height))
                 {
-                    unsigned int value;
                     Uint16 *p = pixel + (ypos * width) + xpos;
                     for (unsigned long ys = 0; ys < ysize; ys++)
                     {
@@ -86,7 +82,7 @@ static int addOverlay(const char *filename,
                               return 0;
                             }
                             if (c != '0')
-                                *p = gray;
+                                *p = OFstatic_cast(Uint16, gray);
                             p++;
                         }
                         p += (width - xsize);
@@ -148,8 +144,8 @@ int main(int argc, char *argv[])
     OFBool                    opt_annotationIllumination = OFTrue;
     const char *              opt_annotationString = NULL;
 
-    OFCmdUnsignedInt          opt_illumination = (OFCmdUnsignedInt)-1;
-    OFCmdUnsignedInt          opt_reflection = (OFCmdUnsignedInt)-1;
+    OFCmdUnsignedInt          opt_illumination = OFstatic_cast(OFCmdUnsignedInt, -1);
+    OFCmdUnsignedInt          opt_reflection = OFstatic_cast(OFCmdUnsignedInt, -1);
 
     OFConsoleApplication app(OFFIS_CONSOLE_APPLICATION , "Read DICOM images and presentation states and render print job", rcsid);
     OFCommandLine cmd;
@@ -478,9 +474,9 @@ int main(int argc, char *argv[])
       OFLOG_WARN(dcmpsprtLogger, "cannot set trim, ignoring.");
     if (EC_Normal != dvi.getPrintHandler().setRequestedDecimateCropBehaviour(opt_decimate))
       OFLOG_WARN(dcmpsprtLogger, "cannot set requested decimate/crop behaviour, ignoring.");
-    if ((opt_illumination != (OFCmdUnsignedInt)-1)&&(EC_Normal != dvi.getPrintHandler().setPrintIllumination((Uint16)opt_illumination)))
+    if ((opt_illumination != OFstatic_cast(OFCmdUnsignedInt, -1))&&(EC_Normal != dvi.getPrintHandler().setPrintIllumination(OFstatic_cast(Uint16, opt_illumination))))
       OFLOG_WARN(dcmpsprtLogger, "cannot set illumination to '" << opt_illumination << "', ignoring.");
-    if ((opt_reflection != (OFCmdUnsignedInt)-1)&&(EC_Normal != dvi.getPrintHandler().setPrintReflectedAmbientLight((Uint16)opt_reflection)))
+    if ((opt_reflection != OFstatic_cast(OFCmdUnsignedInt, -1))&&(EC_Normal != dvi.getPrintHandler().setPrintReflectedAmbientLight(OFstatic_cast(Uint16, opt_reflection))))
       OFLOG_WARN(dcmpsprtLogger, "cannot set reflected ambient light to '" << opt_reflection << "', ignoring.");
 
     if ((opt_copies > 0)&&(EC_Normal != dvi.setPrinterNumberOfCopies(opt_copies)))
index 0a578c5edba8a29336382c5bcba39e6c7ff06f4d..cfe7745d4e6663fce77222b01fc1c1b455496f4f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2020, OFFIS e.V.
+ *  Copyright (C) 1999-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -1140,20 +1140,20 @@ int main(int argc, char *argv[])
         OFLOG_WARN(dcmpsrcvLogger, "unknown TLS profile '" << profileName << "', ignoring");
       }
 
-      if (TCS_ok != tLayer->setTLSProfile(tlsProfile))
+      if (tLayer->setTLSProfile(tlsProfile).bad())
       {
         OFLOG_FATAL(dcmpsrcvLogger, "unable to select the TLS security profile");
         return 1;
       }
 
       // activate cipher suites
-      if (TCS_ok != tLayer->activateCipherSuites())
+      if (tLayer->activateCipherSuites().bad())
       {
         OFLOG_FATAL(dcmpsrcvLogger, "unable to activate the selected list of TLS ciphersuites");
         return 1;
       }
 
-      if (tlsCACertificateFolder && (TCS_ok != tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat)))
+      if (tlsCACertificateFolder && (tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat).bad()))
       {
         OFLOG_WARN(dcmpsrcvLogger, "unable to load certificates from directory '" << tlsCACertificateFolder << "', ignoring");
       }
@@ -1163,12 +1163,12 @@ int main(int argc, char *argv[])
       }
       tLayer->setPrivateKeyPasswd(tlsPrivateKeyPassword); // never prompt on console
 
-      if (TCS_ok != tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat))
+      if (tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat).bad())
       {
         OFLOG_FATAL(dcmpsrcvLogger, "unable to load private TLS key from '" << tlsPrivateKeyFile<< "'");
         return 1;
       }
-      if (TCS_ok != tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat))
+      if (tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat).bad())
       {
         OFLOG_FATAL(dcmpsrcvLogger, "unable to load certificate from '" << tlsCertificateFile << "'");
         return 1;
index 3af864852e09fae8849f4545d0f0ecc717975f18..cdbf3642076f143e73892526ee9c2bed63d449d8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2019, OFFIS e.V.
+ *  Copyright (C) 1999-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -307,7 +307,7 @@ static OFCondition addAllStoragePresentationContexts(T_ASC_Parameters *params, i
 
     for (int i=0; i<numberOfDcmLongSCUStorageSOPClassUIDs && cond.good(); i++) {
         cond = ASC_addPresentationContext(
-            params, pid, dcmLongSCUStorageSOPClassUIDs[i],
+            params, OFstatic_cast(T_ASC_PresentationContextID, pid), dcmLongSCUStorageSOPClassUIDs[i],
             transferSyntaxes, transferSyntaxCount);
         pid += 2;       /* only odd presentation context id's */
     }
@@ -589,20 +589,20 @@ int main(int argc, char *argv[])
         OFLOG_WARN(dcmpssndLogger, "unknown TLS profile '" << profileName << "', ignoring");
       }
 
-      if (TCS_ok != tLayer->setTLSProfile(tlsProfile))
+      if (tLayer->setTLSProfile(tlsProfile).bad())
       {
         OFLOG_FATAL(dcmpssndLogger, "unable to select the TLS security profile");
         return 1;
       }
 
       // activate cipher suites
-      if (TCS_ok != tLayer->activateCipherSuites())
+      if (tLayer->activateCipherSuites().bad())
       {
         OFLOG_FATAL(dcmpssndLogger, "unable to activate the selected list of TLS ciphersuites");
         return 1;
       }
 
-      if (tlsCACertificateFolder && (TCS_ok != tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat)))
+      if (tlsCACertificateFolder && (tLayer->addTrustedCertificateDir(tlsCACertificateFolder, keyFileFormat).bad()))
       {
         OFLOG_WARN(dcmpssndLogger, "unable to load certificates from directory '" << tlsCACertificateFolder << "', ignoring");
       }
@@ -614,12 +614,12 @@ int main(int argc, char *argv[])
 
       if (!tlsPrivateKeyFile.empty() && !tlsCertificateFile.empty())
       {
-        if (TCS_ok != tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat))
+        if (tLayer->setPrivateKeyFile(tlsPrivateKeyFile.c_str(), keyFileFormat).bad())
         {
           OFLOG_FATAL(dcmpssndLogger, "unable to load private TLS key from '" << tlsPrivateKeyFile<< "'");
           return 1;
         }
-        if (TCS_ok != tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat))
+        if (tLayer->setCertificateFile(tlsCertificateFile.c_str(), keyFileFormat).bad())
         {
           OFLOG_FATAL(dcmpssndLogger, "unable to load certificate from '" << tlsCertificateFile << "'");
           return 1;
index 0d0c7e8b3395c68c58ff5836974b08ace152fc52..42d72010c91d3bc2c687c5085aa4607f631d6812 100644 (file)
@@ -178,6 +178,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmmkcrv_copyright COPYRIGHT
 
-Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index fa7ab2259cfc77159584749ffdfe76f001d2b028..e0d4ffc90e0146791e0c7fbe79407b6bc3b5a7de 100644 (file)
@@ -248,6 +248,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmmklut_copyright COPYRIGHT
 
-Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 8254ac3439af1a02a681b949452b57125d58144c..8ca1465deeac469b490e574c7d7955b619ddc3a1 100644 (file)
@@ -19,7 +19,7 @@ a grayscale softcopy presentation state object into a monochrome bitmap
 with 8 bits/pixel.  The bitmap is stored either as "Portable Gray Map" (PGM)
 or as a DICOM secondary capture image object.  If no presentation state is
 read from file, a default presentation state is created.  The utility allows
-to read a configuration file of the Softcopy Presentation State Viewer upon
+one to read a configuration file of the Softcopy Presentation State Viewer upon
 startup.  In this case, the settings from the configuration file affecting
 the rendering of the presentation state are used, e.g. a correction of the
 gray scale range according to Barten's model (DICOM part 14) can be
@@ -170,6 +170,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmp2pgm_copyright COPYRIGHT
 
-Copyright (C) 1998-2017 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index da6262a1edd9b2172e6bd8a0d604942a70fa8579..06d95541b34b50cfe7a899c11ea2c183880067c6 100644 (file)
@@ -22,7 +22,7 @@ The \b dcmprscp utility accepts print jobs from a remote Print SCU.  It does
 not create real hardcopies but stores print jobs in the local DICOMscope
 database as a set of Stored Print objects (one per page) and Hardcopy
 Grayscale images (one per film box N-SET).  The DICOMscope application allows
-to load a Stored Print object created by \b dcmprscp and to render a screen
+one to load a Stored Print object created by \b dcmprscp and to render a screen
 preview of the hardcopy.  The \b dcmprscp utility reads the characteristics of
 the printer to be emulated from the configuration file.
 
@@ -141,6 +141,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmprscp_copyright COPYRIGHT
 
-Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1999-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 7fa53e949c13644139fcca1571ff97f8f04c5f38..a1b7dad380066c9250e1958f80966f416959e6ba 100644 (file)
@@ -201,6 +201,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmprscu_copyright COPYRIGHT
 
-Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1999-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index a060142aa489c8476ec4c3ba64e1e042b174fca3..94a5b9e7065ef72530c511b65b2d82f3e5939dea 100644 (file)
@@ -132,6 +132,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmpschk_copyright COPYRIGHT
 
-Copyright (C) 2000-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2000-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 58ff17a44e2733938bbc8cf19eac50b0657a9e5d..548bd5655aab93de1529573ccac2952a9632c584 100644 (file)
@@ -17,7 +17,7 @@ dcmpsmk [options] dcmfile-in dcmfile-out
 The \b dcmpsmk utility reads a DICOM image file and creates a grayscale
 softcopy presentation state object according to Supplement 33.  The
 presentation state object is written back to file.  A number of command line
-options allow to specify how certain constructs that might be present in
+options allow one to specify how certain constructs that might be present in
 the image file should be referenced or activated in the presentation state.
 The newly created presentation state references the source image and
 contains values that should allow for a "reasonable" display of the image
@@ -245,6 +245,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmpsmk_copyright COPYRIGHT
 
-Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 7e4d2bd3c6e1ec306578e91abbe8b0122c46deed..1a6292d5ac441eb5348d90cde7662132d732a9a7 100644 (file)
@@ -312,6 +312,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmpsprt_copyright COPYRIGHT
 
-Copyright (C) 1999-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1999-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index de928659d60cf34196e6558287e972e66de9289d..69449b6043c48a965c42d8165033ca7f51bc4936 100644 (file)
@@ -130,6 +130,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmpsrcv_copyright COPYRIGHT
 
-Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index fc64ba601cdd49131afe8c4dbab6d2af2f336d5a..f34a6fa1a088ac823c8c5e04c416973659b4c14e 100644 (file)
@@ -138,6 +138,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmpssnd_copyright COPYRIGHT
 
-Copyright (C) 1998-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1998-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 4dc1c8114825149afec3923bf8ef5a0abafc3c03..dcc305fe9ea744805a78e48c2c4a171e1796e0dc 100644 (file)
@@ -58,7 +58,7 @@ class DCMTK_DCMPSTAT_EXPORT DVInterface: public DVConfiguration
     *     If a non-existing filename (or NULL) is passed, an empty configuration file
     *     is assumed.
     *  @param useLog (optional) flag specifying whether a general log file should be used
-    *     (config entry GENERAL\APPLICATION\LOGFILE).
+    *     (config entry GENERAL\\APPLICATION\\LOGFILE).
     */
     DVInterface(const char *config_file = NULL, OFBool useLog = OFFalse);
 
@@ -1690,12 +1690,18 @@ private:
     void clearIndexCache();
 
     /** clears specified index record (and makes pos invalid)
+     *  @param record the index record to clear
+     *  @param recpos the position
      */
     void clearIndexRecord(IdxRecord &record,
                           int &recpos);
 
     /** reads specified index record (comparing pos with oldpos to avoid redundant
      *  loading)
+     *  @param pos the position
+     *  @param record the index record
+     *  @param oldpos the old position
+     *  @return OFTrue on success, OFFalse otherwise
      */
     OFBool readIndexRecord(const int pos,
                            IdxRecord &record,
@@ -1707,28 +1713,46 @@ private:
     void updateStatusCache();
 
     /** returns pointer to study struct specified by given UIDs or to current study
+     *  @param studyUID the UID of the study
+     *  @param seriesUID the UID of the series
+     *  @return pointer to study struct specified by given UIDs or to current study or NULL
      */
     DVStudyCache::ItemStruct *getStudyStruct(const char *studyUID = NULL,
                                              const char *seriesUID = NULL);
 
     /** returns pointer to series struct specified by given UIDs or to current series
+     *  @param studyUID the UID of the study
+     *  @param seriesUID the UID of the series
+     *  @param instanceUID the UID of the instance
+     *  @return pointer to series struct specified by given UIDs or to current series or NULL
      */
     DVSeriesCache::ItemStruct *getSeriesStruct(const char *studyUID = NULL,
                                                const char *seriesUID = NULL,
                                                const char *instanceUID = NULL);
 
     /** returns pointer to instance struct specified by given UIDs or to current instance
+     *  @param studyUID the UID of the study
+     *  @param seriesUID the UID of the series
+     *  @param instanceUID the UID of the instance
+     *  @return pointer to instance struct specified by given UIDs or to current instance or NULL
      */
     DVInstanceCache::ItemStruct *getInstanceStruct(const char *studyUID = NULL,
                                                    const char *seriesUID = NULL,
                                                    const char *instanceUID = NULL);
 
     /** returns index of specified study within study description record
+     *  @param study the study description records to search in
+     *  @param uid the id of the study
+     *  @return the study index if found, -1 otherwise
      */
     int findStudyIdx(StudyDescRecord *study,
                      const char *uid);
 
     /** conditionally deletes given image file (only if file resides in index.dat directory)
+     *  @param filename the path to the file
+     *  @return 0: given filename is invalid
+     *          1: image file has been deleted
+     *          2: image file has not been deleted
      */
     int deleteImageFile(const char *filename);
 
@@ -1739,6 +1763,8 @@ private:
 
     /** modifies the review flag for one instance in the database (see method with three UID
      *  parameters)
+     *  @param idx index
+     *  @return EC_Normal upon success, an error code otherwise
      */
     OFCondition instanceReviewed(int pos);
 
index 0f3237fdb5471f3a36e1ba4ea4826bab9a0ea966..8d6991617fa7fa0631aa810f1a6b656214b3df3b 100644 (file)
@@ -116,6 +116,7 @@ public:
     DVPSStoredPrint_PList& basicFilmBoxList);
 
   /** compares the SOP instance UID with the given UID string.
+   *  @param uid the uid to compare with
    *  @return OFTrue if UIDs are equal, OFFalse otherwise.
    */
   OFBool isInstance(const char *uid);
index 88ab21d834637512742a1d7e06ba9e2a17fb2355..d0bf75c45f670427914f9b4d837ae8b7554f3a90 100644 (file)
@@ -149,7 +149,7 @@ public:
 
   /** adds the given graphic object to
    *  the list of graphic objects managed by this object.
-   *  @param text graphic object to be inserted.
+   *  @param graphic text graphic object to be inserted.
    */
   void addGraphicObject(DVPSGraphicObject *graphic);
   
index d7bcdef31cb01bbea9a32c0614ce00a08cd2067c..e0dc1c7938dac613cadc5c1a038d35cef3f16d2a 100644 (file)
@@ -115,7 +115,7 @@ public:
   OFCondition setGraphicType(DVPSGraphicType gtype);
 
   /** sets the graphic filled status for the graphic object
-   *  @param isFilled OFTrue if graphic is filled, OFFalse otherwise.
+   *  @param filled OFTrue if graphic is filled, OFFalse otherwise.
    *  @return EC_Normal if successful, an error code otherwise.
    */
   OFCondition setFilled(OFBool filled);
index 6bc6e535801d3ab5b10b01d0e33f0215936d2968..64dffddef27bc7803a5fd2a215dd92dd218e3e13 100644 (file)
@@ -92,7 +92,7 @@ public:
 
   /** adds the given graphic object to
    *  the list of graphic objects managed by this object.
-   *  @param text graphic object to be inserted.
+   *  @param graphic text graphic object to be inserted.
    */
   void addGraphicObject(DVPSGraphicObject *graphic);
 
index 6efda158c1723fb44bf1cb4fbe0b39cb2cbc06df..df081c54a00bbbca2aa366c33644fd179a017e87 100644 (file)
@@ -256,13 +256,13 @@ public:
    */
   const char *getImageConfigurationInformation(size_t idx);
 
-  /** gets the current SOP Instance UID for the given registered image box..
+  /** gets the current SOP Instance UID for the given registered image box.
    *  @param idx index, must be < getNumberOfImages()
    *  @return SOP Instance UID, may be NULL.
    */
   const char *getSOPInstanceUID(size_t idx);
 
-  /** gets the referenced Presentation LUT SOP Instance UID for the given registered image box..
+  /** gets the referenced Presentation LUT SOP Instance UID for the given registered image box.
    *  @param idx index, must be < getNumberOfImages()
    *  @return SOP Instance UID, may be NULL.
    */
index c27232290c5cf55f97ff46c193835bbedb6a7bd7..936a619d57b7f654862f6f6eba9e8b3aaed06883 100644 (file)
@@ -65,7 +65,7 @@ public:
   void addStringToPayload(const char *str);
 
   /** adds an integer into the message payload.
-   *  @param value to write
+   *  @param value to write
    */
   void addIntToPayload(Uint32 i);
 
@@ -176,53 +176,53 @@ public:
   virtual ~DVPSIPCClient();
 
   /** sends ApplicationTerminates notification to server.
-   *  @param Uint32 message status, see constants defined in DVPSIPCMessage
+   *  @param status Uint32 message status, see constants defined in DVPSIPCMessage
    */
   void notifyApplicationTerminates(Uint32 status);
 
   /** sends ReceivedUnencryptedDICOMConnection notification to server.
-   *  @param Uint32 message status, see constants defined in DVPSIPCMessage
+   *  @param status Uint32 message status, see constants defined in DVPSIPCMessage
    *  @param txt textual description of notification for server
    */
   void notifyReceivedUnencryptedDICOMConnection(Uint32 status, const char *txt);
 
   /** sends ReceivedEncryptedDICOMConnection notification to server.
-   *  @param Uint32 message status, see constants defined in DVPSIPCMessage
+   *  @param status Uint32 message status, see constants defined in DVPSIPCMessage
    *  @param txt textual description of notification for server
    */
   void notifyReceivedEncryptedDICOMConnection(Uint32 status, const char *txt);
 
   /** sends ConnectionClosed notification to server.
-   *  @param Uint32 message status, see constants defined in DVPSIPCMessage
+   *  @param status Uint32 message status, see constants defined in DVPSIPCMessage
    */
   void notifyConnectionClosed(Uint32 status);
 
   /** sends ConnectionAborted notification to server.
-   *  @param Uint32 message status, see constants defined in DVPSIPCMessage
+   *  @param status Uint32 message status, see constants defined in DVPSIPCMessage
    *  @param txt textual description of notification for server
    */
   void notifyConnectionAborted(Uint32 status, const char *txt);
 
   /** sends RequestedUnencryptedDICOMConnection notification to server.
-   *  @param Uint32 message status, see constants defined in DVPSIPCMessage
+   *  @param status Uint32 message status, see constants defined in DVPSIPCMessage
    *  @param txt textual description of notification for server
    */
   void notifyRequestedUnencryptedDICOMConnection(Uint32 status, const char *txt);
 
   /** sends RequestedEncryptedDICOMConnection notification to server.
-   *  @param Uint32 message status, see constants defined in DVPSIPCMessage
+   *  @param status Uint32 message status, see constants defined in DVPSIPCMessage
    *  @param txt textual description of notification for server
    */
   void notifyRequestedEncryptedDICOMConnection(Uint32 status, const char *txt);
 
   /** sends ReceivedDICOMObject notification to server.
-   *  @param Uint32 message status, see constants defined in DVPSIPCMessage
+   *  @param status Uint32 message status, see constants defined in DVPSIPCMessage
    *  @param txt textual description of DICOM object
    */
   void notifyReceivedDICOMObject(Uint32 status, const char *txt);
 
   /** sends SentDICOMObject notification to server.
-   *  @param Uint32 message status, see constants defined in DVPSIPCMessage
+   *  @param status Uint32 message status, see constants defined in DVPSIPCMessage
    *  @param txt textual description of DICOM object
    */
   void notifySentDICOMObject(Uint32 status, const char *txt);
index 6072eb5179ced17ec39b7047dea626d57f22355f..4ba68cfa01af5653d59ca63fd113e8092e168507 100644 (file)
@@ -117,7 +117,7 @@ public:
    *  The overlay data is copied into the presentation state, i.e. the DICOM dataset
    *  can be deleted after execution of this method.
    *  @param overlayIOD the DICOM dataset from which the overlay is to be read
-   *  @groupInItem the repeating group 0x6000..0x61F (even) of the overlay to be read
+   *  @param groupInItem the repeating group 0x6000..0x61F (even) of the overlay to be read
    *  @param newGroup repeating group number 0x6000-0x601F (even) to be used for
    *    the overlay in the presentation state.
    *  @return EC_Normal upon success, an error code otherwise.
index 7b92bd2983d01174bdc9a39804f51eb27d994c08..4eabb36ec676af73a5ffd71f21dc12230a1bcd93 100644 (file)
@@ -210,8 +210,8 @@ public:
   void setEventHandler(DVPSPrintEventHandler *handler) { eventHandler = handler; }
 
   /** sets the blocking and timeout mode for receive operations.
-   *  @param blockMode blocking mode
-   *  @param timeout
+   *  @param blocking blocking mode
+   *  @param timeOut
    */
   void setTimeout(T_DIMSE_BlockingMode blocking, int timeOut) { blockMode=blocking; timeout=timeOut; }
 
index dd464fd170efcb65d87f3cb591915880e89cb4b8..fd02233bef164398518c10ea30daf3bd27f88963 100644 (file)
@@ -99,7 +99,7 @@ public:
   /** remove image reference from this series reference if present.
    *  If an image reference with a SOP instance UID corresponding to the
    *  passed UID is found, it is removed from this series reference.
-   *  @param uid a pointer to the image SOP instance UID.
+   *  @param sopinstanceuid a pointer to the image SOP instance UID.
    */
   void removeImageReference(const char *sopinstanceuid);
 
index 62e7e2b1c0eae9146fc9eff4bc97c9caa6035538..7e42afb290608447b3d9ee022356543f1bfd23d1 100644 (file)
@@ -119,7 +119,7 @@ class DCMTK_DCMPSTAT_EXPORT DVPSStoredPrint
    */
   OFCondition setPrinterName(const char *name);
 
-  /** sets the image display format to 'STANDARD\columns,rows'.
+  /** sets the image display format to 'STANDARD\\columns,rows'.
    *  The caller must make sure that the column and row values are
    *  valid for the selected printer.
    *  @param columns number of columns
@@ -232,7 +232,7 @@ class DCMTK_DCMPSTAT_EXPORT DVPSStoredPrint
    *  are reset to default. For all registered images, magnification, smoothing type
    *  and configuration information are also set back to default.
    *  @param name name of the new printer (optional)
-   *  @param aetitle of the new printer (optional)
+   *  @param destinationAE aetitle of the new printer (optional)
    *  @return EC_Normal if successful, an error code otherwise.
    */
   OFCondition newPrinter(const char *name = NULL, const char *destinationAE = NULL); // short cut, delete all optional settings
index 0259ba8258deb2ab530adf7ffa378ba796a8f95e..5396bc918fc1b9904fcfc3ea328c2ae2a369a780 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2012, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,6 +27,8 @@
 #include "dcmtk/dcmdata/dcitem.h"
 #include "dcmtk/dcmpstat/dpdefine.h"
 
+#include <cmath>
+
 class DVPSTextObject;
 
 
index 1f71a69355e42ab34acca6c04b7d1f1f42cb9172..43327ec64beacf20334770b5b7b15edb917e1389 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2010, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,9 +27,6 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 /** describes how to handle overlays when creating a default presentation state
  *  for an image.
  */
index d7a4ecec1c617fa9be26b9acbdc692dca6c89636..29d6cc40e83226a64063c41aeb75264f651ec584 100644 (file)
@@ -77,7 +77,7 @@ public:
 
   /** assigns the contents of this VOI LUT to the
    *  references passed as parameters.
-   *  @param reference to the Softcopy VOI in which the LUT is stored.
+   *  @param voi reference to the Softcopy VOI in which the LUT is stored.
    */
   OFCondition assign(DVPSSoftcopyVOI& voi);
 
index b4c39071f39c935a24a9d1a9013938a43d532f3b..dc1aa4a4ba003712615ed0b1989f9022febae40c 100644 (file)
@@ -138,7 +138,7 @@ public:
    *    separately.  If main dataset is to be signed, it must be included in this stack.
    *  @param attributesNotToSignInMainDataset list of attribute tags that should be
    *    omitted from the signature on the main dataset level
-   *  @param usedID user ID in configuration file, must not be NULL
+   *  @param userID user ID in configuration file, must not be NULL
    *  @param passwd passwd password for private key, may be NULL
    *  @return EC_Normal if successful, an error code otherwise.
    */
index 920c5e4031c67c2620812c68d8b1c31ff78532d2..57e0287b82a20caab23c97647f0154ceb3fbffb2 100644 (file)
@@ -1,4 +1,51 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmpstat dcmpstat dviface dvpsab dvpsabl dvpsal dvpsall dvpscf dvpscu dvpscul dvpsda dvpsdal dvpsfs dvpsga dvpsgal dvpsgl dvpsgll dvpsgr dvpsgrl dvpshlp dvpsib dvpsibl dvpsmsg dvpsov dvpsovl dvpspl dvpspl2 dvpspll dvpspr dvpsprt dvpsri dvpsril dvpsrs dvpsrsl dvpssp dvpsspl dvpssv dvpssvl dvpstat dvpstx dvpstxl dvpsvl dvpsvll dvpsvw dvpsvwl dvsighdl)
+DCMTK_ADD_LIBRARY(dcmpstat
+  dcmpstat.cc
+  dviface.cc
+  dvpsab.cc
+  dvpsabl.cc
+  dvpsal.cc
+  dvpsall.cc
+  dvpscf.cc
+  dvpscu.cc
+  dvpscul.cc
+  dvpsda.cc
+  dvpsdal.cc
+  dvpsfs.cc
+  dvpsga.cc
+  dvpsgal.cc
+  dvpsgl.cc
+  dvpsgll.cc
+  dvpsgr.cc
+  dvpsgrl.cc
+  dvpshlp.cc
+  dvpsib.cc
+  dvpsibl.cc
+  dvpsmsg.cc
+  dvpsov.cc
+  dvpsovl.cc
+  dvpspl.cc
+  dvpspl2.cc
+  dvpspll.cc
+  dvpspr.cc
+  dvpsprt.cc
+  dvpsri.cc
+  dvpsril.cc
+  dvpsrs.cc
+  dvpsrsl.cc
+  dvpssp.cc
+  dvpsspl.cc
+  dvpssv.cc
+  dvpssvl.cc
+  dvpstat.cc
+  dvpstx.cc
+  dvpstxl.cc
+  dvpsvl.cc
+  dvpsvll.cc
+  dvpsvw.cc
+  dvpsvwl.cc
+  dvsighdl.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmpstat ofstd oflog dcmdata dcmimgle dcmimage dcmnet dcmdsig dcmtls dcmsr dcmqrdb)
+set_property(TARGET dcmpstat PROPERTY OUTPUT_NAME "dcmpstat${DCMTK_TLS_LIBRARY_POSTFIX}")
index ef66ce2feb8f274e14e7a4767e0b351b53525c5c..73583dc551aa6b3461f717b49812059ffe649822 100644 (file)
@@ -132,13 +132,13 @@ dcmpstat.o: dcmpstat.cc ../../config/include/dcmtk/config/osconfig.h \
 dviface.o: dviface.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dviface.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dvpscf.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
@@ -261,7 +261,6 @@ dviface.o: dviface.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcspchrs.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h \
@@ -276,6 +275,7 @@ dviface.o: dviface.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../ofstd/include/dcmtk/ofstd/offname.h \
  ../include/dcmtk/dcmpstat/dvcache.h ../include/dcmtk/dcmpstat/dvpsdef.h \
+ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/digsdfn.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/didispfn.h \
  ../../dcmimgle/include/dcmtk/dcmimgle/didefine.h \
@@ -360,20 +360,20 @@ dviface.o: dviface.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbs.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlstrans.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \
- ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsdefin.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlslayer.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmtls/include/dcmtk/dcmtls/tlsciphr.h
 dvpsab.o: dvpsab.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
@@ -432,12 +432,12 @@ dvpsabl.o: dvpsabl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmpstat/dvpsabl.h ../include/dcmtk/dcmpstat/dvpstyp.h \
  ../include/dcmtk/dcmpstat/dpdefine.h \
@@ -498,12 +498,12 @@ dvpsal.o: dvpsal.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmpstat/dvpsal.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -722,13 +722,13 @@ dvpscf.o: dvpscf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oferror.h
 dvpscu.o: dvpscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpscu.h ../include/dcmtk/dcmpstat/dvpstyp.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -1018,11 +1018,11 @@ dvpsdal.o: dvpsdal.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dvpstyp.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
@@ -1133,7 +1133,6 @@ dvpsdal.o: dvpsdal.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpsril.h ../include/dcmtk/dcmpstat/dvpsri.h
 dvpsfs.o: dvpsfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpsfs.h ../include/dcmtk/dcmpstat/dvpstyp.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
@@ -1143,6 +1142,7 @@ dvpsfs.o: dvpsfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -1253,7 +1253,6 @@ dvpsfs.o: dvpsfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
@@ -1998,10 +1997,10 @@ dvpshlp.o: dvpshlp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
@@ -2050,7 +2049,6 @@ dvpshlp.o: dvpshlp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../include/dcmtk/dcmpstat/dvpsdef.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
@@ -2234,7 +2232,6 @@ dvpsib.o: dvpsib.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
@@ -2246,7 +2243,6 @@ dvpsib.o: dvpsib.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpspl.h
 dvpsibl.o: dvpsibl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpsibl.h ../include/dcmtk/dcmpstat/dvpstyp.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
@@ -2254,6 +2250,7 @@ dvpsibl.o: dvpsibl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
@@ -2367,7 +2364,6 @@ dvpsibl.o: dvpsibl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
@@ -2377,17 +2373,16 @@ dvpsibl.o: dvpsibl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpshlp.h
 dvpsmsg.o: dvpsmsg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../include/dcmtk/dcmpstat/dvpsmsg.h ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -2414,6 +2409,7 @@ dvpsmsg.o: dvpsmsg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -2422,7 +2418,6 @@ dvpsmsg.o: dvpsmsg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \
- ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofsockad.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
@@ -2666,12 +2661,12 @@ dvpspl.o: dvpspl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
@@ -2732,7 +2727,6 @@ dvpspl.o: dvpspl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
@@ -2830,7 +2824,6 @@ dvpspl2.o: dvpspl2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
@@ -2841,13 +2834,13 @@ dvpspl2.o: dvpspl2.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h
 dvpspll.o: dvpspll.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpspll.h ../include/dcmtk/dcmpstat/dvpstyp.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
@@ -2860,7 +2853,6 @@ dvpspll.o: dvpspll.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -3027,7 +3019,6 @@ dvpspr.o: dvpspr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
@@ -3050,13 +3041,13 @@ dvpspr.o: dvpspr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h
 dvpsprt.o: dvpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dvpsprt.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dvpstyp.h ../include/dcmtk/dcmpstat/dvpspll.h \
  ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
@@ -3070,7 +3061,6 @@ dvpsprt.o: dvpsprt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -3214,12 +3204,12 @@ dvpsri.o: dvpsri.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
@@ -3275,12 +3265,12 @@ dvpsril.o: dvpsril.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
@@ -3343,12 +3333,12 @@ dvpsrs.o: dvpsrs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../include/dcmtk/dcmpstat/dvpsrs.h ../include/dcmtk/dcmpstat/dvpsril.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -3408,12 +3398,12 @@ dvpsrsl.o: dvpsrsl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
@@ -3475,12 +3465,12 @@ dvpsrsl.o: dvpsrsl.cc ../../config/include/dcmtk/config/osconfig.h \
 dvpssp.o: dvpssp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpssp.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dvpstyp.h ../include/dcmtk/dcmpstat/dvpspll.h \
  ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
@@ -3494,7 +3484,6 @@ dvpssp.o: dvpssp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -3642,13 +3631,13 @@ dvpssp.o: dvpssp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpsgr.h ../include/dcmtk/dcmpstat/dvpsri.h
 dvpsspl.o: dvpsspl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpsspl.h ../include/dcmtk/dcmpstat/dvpstyp.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
@@ -3698,7 +3687,6 @@ dvpsspl.o: dvpsspl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
@@ -3803,12 +3791,12 @@ dvpssv.o: dvpssv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
@@ -3875,12 +3863,12 @@ dvpssvl.o: dvpssvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
@@ -3942,6 +3930,7 @@ dvpssvl.o: dvpssvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvris.h
 dvpstat.o: dvpstat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dvpstat.h ../include/dcmtk/dcmpstat/dcmpstat.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -3951,7 +3940,6 @@ dvpstat.o: dvpstat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -4324,13 +4312,13 @@ dvpstxl.o: dvpstxl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpstyp.h
 dvpsvl.o: dvpsvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpsvl.h ../include/dcmtk/dcmpstat/dvpstyp.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -4445,10 +4433,10 @@ dvpsvll.o: dvpsvll.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
  ../../ofstd/include/dcmtk/ofstd/offile.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
@@ -4561,9 +4549,9 @@ dvpsvw.o: dvpsvw.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
@@ -4675,12 +4663,12 @@ dvpsvwl.o: dvpsvwl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
@@ -4735,12 +4723,12 @@ dvpsvwl.o: dvpsvwl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvpsvw.h ../include/dcmtk/dcmpstat/dvpsdef.h
 dvsighdl.o: dvsighdl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmpstat/dvsighdl.h ../include/dcmtk/dcmpstat/dvpstyp.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../dcmsign/include/dcmtk/dcmsign/sicertvf.h \
@@ -4803,5 +4791,5 @@ dvsighdl.o: dvsighdl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmsign/include/dcmtk/dcmsign/sinullpr.h \
  ../../dcmsign/include/dcmtk/dcmsign/sisprof.h \
  ../../dcmsign/include/dcmtk/dcmsign/siprivat.h \
- ../../dcmsign/include/dcmtk/dcmsign/siripemd.h \
+ ../../dcmsign/include/dcmtk/dcmsign/simdmac.h \
  ../../dcmsign/include/dcmtk/dcmsign/simac.h
index b98cdb6ab169af120edcbd2cfe7ac273ffba7be8..f35ca16cdbe58b71d7063251157d501bf9890dcc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmpstat/dvpstx.h"      /* for DVPSTextObject, needed by MSVC5 with STL */
 #include "dcmtk/dcmpstat/dvpsgr.h"      /* for DVPSGraphicObject, needed by MSVC5 with STL */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CMATH
-#define INCLUDE_CTIME
-#define INCLUDE_LIBC
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
-
 OFLogger DCM_dcmpstatLogger = OFLog::getLogger("dcmtk.dcmpstat");
 OFLogger DCM_dcmpstatDumpLogger = OFLog::getLogger("dcmtk.dcmpstat.dump");
 OFLogger DCM_dcmpstatLogfileLogger = OFLog::getLogger("dcmtk.dcmpstat.logfile");
@@ -966,7 +957,9 @@ OFCondition DcmPresentationState::createFromImage(
   if (result==EC_Normal) result = seriesInstanceUID.putString(dcmGenerateUniqueIdentifier(uid, SITE_SERIES_UID_ROOT));
   if (result==EC_Normal) result = sOPInstanceUID.putString(dcmGenerateUniqueIdentifier(uid));
   if (result==EC_Normal) result = seriesNumber.putString(DEFAULT_seriesNumber);
-  if (result==EC_Normal) result = specificCharacterSet.putString(DEFAULT_specificCharacterSet);
+
+  /* If no other character set is specified by the image, we use ISO_IR 100 as the default */
+  if ((result==EC_Normal) && (specificCharacterSet.getLength() == 0)) result = specificCharacterSet.putString(DEFAULT_specificCharacterSet);
 
   if (result==EC_Normal)
   {
index d5f452267bcad4d40de061d2a5eeb2c1c81a99c9..940c5c201275775a3eedd1e4240375f99df23baf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2020, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmqrdb/dcmqrdbi.h"   /* for DB_UpperMaxBytesPerStudy */
 #include "dcmtk/dcmqrdb/dcmqrdbs.h"   /* for DcmQueryRetrieveDatabaseStatus */
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CCTYPE
-#define INCLUDE_CMATH
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>   /* for fork */
@@ -2004,9 +1998,16 @@ int DVInterface::deleteImageFile(const char *filename)
 {
     if ((filename != NULL) && (pHandle != NULL))
     {
-        const char *pos;
-        if (((pos = strrchr(filename, OFstatic_cast(int, PATH_SEPARATOR))) == NULL) ||   // check whether image file resides in index.dat directory
-            (strncmp(filename, pHandle->getStorageArea(), pos - filename) == 0))
+        const char *pos = strrchr(filename, OFstatic_cast(int, PATH_SEPARATOR));
+#ifdef _WIN32
+        // Windows accepts both backslash and forward slash as path separators.
+        const char *pos2 = strrchr(filename, OFstatic_cast(int, '/'));
+
+        // if pos2 points to a character closer to the end of the string, use this instead of strPos
+        if ((pos == NULL) || ((pos2 != NULL) && (pos2 > pos))) pos = pos2;
+#endif
+        // check whether image file resides in index.dat directory
+        if ((pos == NULL) || (strncmp(filename, pHandle->getStorageArea(), pos - filename) == 0))
         {
 //            DB_deleteImageFile((/*const */char *)filename);
             if (unlink(filename) == 0)
@@ -2725,6 +2726,8 @@ OFCondition DVInterface::saveHardcopyGrayscaleImage(
       if (EC_Normal==status) status = DVPSHelper::putStringValue(dataset, DCM_InstanceCreationDate, aString.c_str());
       DVPSHelper::currentTime(aString);
       if (EC_Normal==status) status = DVPSHelper::putStringValue(dataset, DCM_InstanceCreationTime, aString.c_str());
+      const char *specificCharSet = pState->getCharsetString();
+      if (status.good() && specificCharSet) status = DVPSHelper::putStringValue(dataset, DCM_SpecificCharacterSet, specificCharSet);
 
       // Hardcopy Grayscale Image Module
       if (EC_Normal==status) status = DVPSHelper::putStringValue(dataset, DCM_PhotometricInterpretation, "MONOCHROME2");
index 18e4359a0724672fb8bf0391fb2997b7a9404c47..e07247abc128ea48fed7f90876fb463c3f3a1ff0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmpstat/dvpsdef.h"     /* for constants */
 #include "dcmtk/ofstd/ofstd.h"       /* for class OFStandard */
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifndef HAVE_WINDOWS_H
 /* some Unix operating systems do not define a prototype for strncasecmp
  * although the function is known.
@@ -181,7 +176,7 @@ static Uint32 countValues(const char *str)
     Uint32 result = 0;
     if (*str) result++;
     char c;
-    while ((c = *str++)) if (c == '\\') result++;
+    while ((c = *str++) != '\0') if (c == '\\') result++;
     return result;
   }
   return 0;
index 17ef491a363ed4b82349ae8eff9b152fed96a9df..934683c2ff7c30ccfda7c858cdaa4859df9df26c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -30,9 +30,6 @@
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/dcmpstat/dvpsrs.h"      /* for DVPSReferencedSeries, needed by MSVC5 with STL */
 
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 /* --------------- class DVPSDisplayedArea --------------- */
 
 DVPSDisplayedArea::DVPSDisplayedArea()
index b4d6598f30b6cd29e264790a39b4eabc610f7dea..5a5173c1559a1ed20c380e7c1cb20c7e4a70bbb3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmpstat/dvpsri.h"      /* for DVPSReferencedImage, needed by MSVC5 with STL */
 
 
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 /* --------------- class DVPSFilmSession --------------- */
 
 DVPSFilmSession::DVPSFilmSession(Uint16 illumin, Uint16 reflection)
-: sopInstanceUID(NULL)
+: sopInstanceUID()
 , numberOfCopies(DCM_NumberOfCopies)
 , printPriority(DCM_PrintPriority)
 , mediumType(DCM_MediumType)
@@ -797,8 +794,15 @@ OFCondition DVPSFilmSession::addPresentationLUTReference(DcmItem& dset)
   DcmElement *delem=NULL;
   OFCondition result = EC_Normal;
 
-  ADD_TO_DATASET(DcmUnsignedShort, illumination)
-  ADD_TO_DATASET(DcmUnsignedShort, reflectedAmbientLight)
+  if (illumination.getLength() > 0)
+  {
+    ADD_TO_DATASET(DcmUnsignedShort, illumination)
+  }
+
+  if (reflectedAmbientLight.getLength() > 0)
+  {
+    ADD_TO_DATASET(DcmUnsignedShort, reflectedAmbientLight)
+  }
 
   if (referencedPresentationLUTInstanceUID.getLength() > 0)
   {
index 4e2373b4019774c9f4f5e5fdd720089d8469ec2b..0f50516838e6f38cb678d0c61fe2d127c5334903 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -24,8 +24,6 @@
 #include "dcmtk/dcmpstat/dvpsgl.h"
 #include "dcmtk/dcmpstat/dvpsdef.h"     /* for constants and macros */
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
 
 /* --------------- class DVPSGraphicLayer --------------- */
 
index cc27733e81d5d9ac76ffdb8548001d2bfd8b9909..dc0576d6c319b6cc0a9c3bde410f7900b50c11e6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmnet/dcompat.h"     /* compatibility routines */
 #include "dcmtk/dcmdata/dctk.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CERRNO
-#define INCLUDE_CTIME
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>   /* for fork */
index b0e5f27395599fe34836b1bf62a45ce20e27dee1..15344e33bcc2be9875a0c6369f6b9a71087d5fa3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -288,7 +288,7 @@ void DVPSIPCClient::requestConnection()
 #endif
   OFSockAddr server;
   OFStandard::getAddressByHostname("localhost", server);
-  server.setPort(OFstatic_cast(unsigned short, htons(port)));
+  server.setPort(OFstatic_cast(unsigned short, htons(OFstatic_cast(unsigned short, port))));
 
   if (connect(s, server.getSockaddr(), server.size()) < 0)
   {
index a88553a7cb657eeb6e1139a9a4b6a58dd283fc23..1b2b7a35bbcc282f117ccf5010fb568aab21ea93 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2010, OFFIS e.V.
+ *  Copyright (C) 1999-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -42,7 +42,7 @@ DVPSPresentationLUT_PList::DVPSPresentationLUT_PList(const DVPSPresentationLUT_P
   OFListConstIterator(DVPSPresentationLUT *) first = arg.list_.begin();
   OFListConstIterator(DVPSPresentationLUT *) last = arg.list_.end();
   while (first != last)
-  {     
+  {
     list_.push_back((*first)->clone());
     ++first;
   }
@@ -58,7 +58,7 @@ void DVPSPresentationLUT_PList::clear()
   OFListIterator(DVPSPresentationLUT *) first = list_.begin();
   OFListIterator(DVPSPresentationLUT *) last = list_.end();
   while (first != last)
-  {     
+  {
     delete (*first);
     first = list_.erase(first);
   }
@@ -71,7 +71,7 @@ OFCondition DVPSPresentationLUT_PList::read(DcmItem &dset)
   DVPSPresentationLUT *newLUT = NULL;
   DcmSequenceOfItems *dseq=NULL;
   DcmItem *ditem=NULL;
-  
+
   if (EC_Normal == dset.search(DCM_RETIRED_PresentationLUTContentSequence, stack, ESM_fromHere, OFFalse))
   {
     dseq=(DcmSequenceOfItems *)stack.top();
@@ -89,8 +89,8 @@ OFCondition DVPSPresentationLUT_PList::read(DcmItem &dset)
         } else result = EC_MemoryExhausted;
       }
     }
-  }    
-  
+  }
+
   return result;
 }
 
@@ -101,7 +101,7 @@ OFCondition DVPSPresentationLUT_PList::write(DcmItem &dset)
   OFCondition result = EC_Normal;
   DcmSequenceOfItems *dseq=NULL;
   DcmItem *ditem=NULL;
-  
+
   dseq = new DcmSequenceOfItems(DCM_RETIRED_PresentationLUTContentSequence);
   if (dseq)
   {
@@ -141,8 +141,8 @@ void DVPSPresentationLUT_PList::cleanup(const char *filmBox, DVPSImageBoxContent
       delete (*first);
       first = list_.erase(first);
     }
-  }    
-  return; 
+  }
+  return;
 }
 
 DVPSPresentationLUT *DVPSPresentationLUT_PList::findPresentationLUT(const char *instanceUID)
@@ -164,14 +164,14 @@ DVPSPresentationLUT *DVPSPresentationLUT_PList::findPresentationLUT(const char *
 const char *DVPSPresentationLUT_PList::addPresentationLUT(DVPSPresentationLUT *newLUT, OFBool inversePLUT)
 {
   if (newLUT == NULL) return NULL;
-  
+
   DiLookupTable *diLUT = NULL;
-  const char *result = NULL;  
+  const char *result = NULL;
 
-  // 'INVERSE' LUT shape is undefined for Print and has already 
+  // 'INVERSE' LUT shape is undefined for Print and has already
   // been rendered into the bitmap at this stage.
   DVPSPresentationLUTType lutType = newLUT->getType();
-  if (lutType == DVPSP_inverse) lutType = DVPSP_identity; 
+  if (lutType == DVPSP_inverse) lutType = DVPSP_identity;
 
   DVPSPresentationLUT *myLUT = newLUT->clone();
   if (myLUT)
@@ -180,7 +180,7 @@ const char *DVPSPresentationLUT_PList::addPresentationLUT(DVPSPresentationLUT *n
     if (myLUT->getType() == DVPSP_inverse) myLUT->setType(DVPSP_identity);
     if (lutType == DVPSP_table)
     {
-      if (inversePLUT) myLUT->invert();         
+      if (inversePLUT) myLUT->invert();
       diLUT = myLUT->createDiLookupTable();
     }
   } else return NULL;
@@ -194,10 +194,10 @@ const char *DVPSPresentationLUT_PList::addPresentationLUT(DVPSPresentationLUT *n
     {
       if (lutType == DVPSP_table)
       {
-       if ((*first)->compareDiLookupTable(diLUT))
-       {
-         result = (*first)->getSOPInstanceUID(); 
-         break;
+        if ((*first)->compareDiLookupTable(diLUT))
+        {
+          result = (*first)->getSOPInstanceUID();
+          break;
         }
       } else {
         result = (*first)->getSOPInstanceUID();
@@ -207,13 +207,13 @@ const char *DVPSPresentationLUT_PList::addPresentationLUT(DVPSPresentationLUT *n
     ++first;
   }
   delete diLUT;
-  
+
   if (result)
   {
     delete myLUT;
     return result;
   }
-    
+
   // no match, store new LUT
   char uid[100];
   dcmGenerateUniqueIdentifier(uid);
@@ -232,7 +232,7 @@ void DVPSPresentationLUT_PList::printSCPDelete(T_DIMSE_Message& rq, T_DIMSE_Mess
   OFBool found = OFFalse;
   OFString theUID(rq.msg.NDeleteRQ.RequestedSOPInstanceUID);
   while ((first != last) && (!found))
-  {     
+  {
     if (theUID == (*first)->getSOPInstanceUID()) found = OFTrue;
     else ++first;
   }
@@ -244,6 +244,6 @@ void DVPSPresentationLUT_PList::printSCPDelete(T_DIMSE_Message& rq, T_DIMSE_Mess
   } else {
     // presentation LUT does not exist or wrong instance UID
     DCMPSTAT_WARN("cannot delete presentation LUT with instance UID '" << rq.msg.NDeleteRQ.RequestedSOPInstanceUID << "': object does not exist.");
-    rsp.msg.NDeleteRSP.DimseStatus = STATUS_N_NoSuchObjectInstance;
+    rsp.msg.NDeleteRSP.DimseStatus = STATUS_N_NoSuchSOPInstance;
   }
 }
index f1766b7f4447fc3ff6b09def79e4ca74c2f6d7dc..3633fd6e14d7862a53b47d98aafc4984006436e6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2018, OFFIS e.V.
+ *  Copyright (C) 2000-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -767,7 +767,7 @@ void DVPSPrintSCP::printerNGet(T_DIMSE_Message& rq, T_DIMSE_Message& rsp, DcmDat
     }
   } else {
     DCMPSTAT_WARN("cannot retrieve printer information, instance UID is not well-known printer SOP instance UID.");
-    rsp.msg.NGetRSP.DimseStatus = STATUS_N_NoSuchObjectInstance;
+    rsp.msg.NGetRSP.DimseStatus = STATUS_N_NoSuchSOPInstance;
   }
 }
 
@@ -796,7 +796,7 @@ void DVPSPrintSCP::filmSessionNSet(T_DIMSE_Message& rq, DcmDataset *rqDataset, T
   } else {
     // film session does not exist or wrong instance UID
     DCMPSTAT_WARN("cannot update film session, object not found.");
-    rsp.msg.NSetRSP.DimseStatus = STATUS_N_NoSuchObjectInstance;
+    rsp.msg.NSetRSP.DimseStatus = STATUS_N_NoSuchSOPInstance;
   }
 }
 
@@ -818,7 +818,7 @@ void DVPSPrintSCP::filmSessionNAction(T_DIMSE_Message& rq, T_DIMSE_Message& rsp)
   } else {
     // film session does not exist or wrong instance UID
     DCMPSTAT_WARN("cannot print film session, object not found.");
-    rsp.msg.NActionRSP.DimseStatus = STATUS_N_NoSuchObjectInstance;
+    rsp.msg.NActionRSP.DimseStatus = STATUS_N_NoSuchSOPInstance;
   }
 }
 
@@ -909,7 +909,7 @@ void DVPSPrintSCP::filmBoxNCreate(DcmDataset *rqDataset, T_DIMSE_Message& rsp, D
   } else {
     // no film session, refuse n-create
     DCMPSTAT_WARN("cannot create film box without film session.");
-    rsp.msg.NCreateRSP.DimseStatus = STATUS_N_InvalidObjectInstance;
+    rsp.msg.NCreateRSP.DimseStatus = STATUS_N_InvalidSOPInstance;
     rsp.msg.NCreateRSP.opts = 0;  // don't include affected SOP instance UID
   }
 }
@@ -956,7 +956,7 @@ void DVPSPrintSCP::filmSessionNDelete(T_DIMSE_Message& rq, T_DIMSE_Message& rsp)
   } else {
     // film session does not exist or wrong instance UID
     DCMPSTAT_WARN("cannot delete film session with instance UID '" << rq.msg.NDeleteRQ.RequestedSOPInstanceUID << "': object does not exist.");
-    rsp.msg.NDeleteRSP.DimseStatus = STATUS_N_NoSuchObjectInstance;
+    rsp.msg.NDeleteRSP.DimseStatus = STATUS_N_NoSuchSOPInstance;
   }
 }
 
index 5142a03fe9dfde21afe3e448488d8fb81a378208..684229a7c58c3bd516bf1984547483bee3955819 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmpstat/dvpsri.h"
 #include "dcmtk/dcmpstat/dvpsdef.h"   /* for constants and macros */
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /* --------------- class DVPSReferencedImage --------------- */
 
 DVPSReferencedImage::DVPSReferencedImage()
index c13c73d6f843a466c5e4ab3d0d497dc3c858e707..98b1201a7fb1c91954c86ae9e70d8b77be98e8db 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2019, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -46,9 +46,7 @@
 #include "dcmtk/dcmpstat/dvpsgr.h"      /* for DVPSGraphicObject, needed by MSVC5 with STL */
 #include "dcmtk/dcmpstat/dvpsri.h"      /* for DVPSReferencedImage, needed by MSVC5 with STL */
 
-#define INCLUDE_CMATH
-#define INCLUDE_CTIME
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cmath>
 
 #define DIMSE_STATUS_OK(status) (((status) == 0) || DICOM_WARNING_STATUS(status))
 #define DIMSE_STATUS_BAD(status) (((status) != 0) && !(DICOM_WARNING_STATUS(status)))
@@ -1383,8 +1381,15 @@ OFCondition DVPSStoredPrint::addPresentationLUTReference(DcmItem& dset)
   DcmElement *delem=NULL;
   OFCondition result = EC_Normal;
 
-  ADD_TO_DATASET(DcmUnsignedShort, illumination)
-  ADD_TO_DATASET(DcmUnsignedShort, reflectedAmbientLight)
+  if (illumination.getLength() > 0)
+  {
+    ADD_TO_DATASET(DcmUnsignedShort, illumination)
+  }
+
+  if (reflectedAmbientLight.getLength() > 0)
+  {
+    ADD_TO_DATASET(DcmUnsignedShort, reflectedAmbientLight)
+  }
 
   if (presentationLUTInstanceUID.size() > 0)
   {
@@ -1431,6 +1436,12 @@ OFCondition DVPSStoredPrint::printSCUcreateBasicFilmSession(
   // add illumination and reflection, and presentation LUT reference if necessary.
   if ((printHandler.printerSupportsPresentationLUT()) && plutInSession) result = addPresentationLUTReference(dset);
 
+  if (result.good() && (specificCharacterSet.getLength() > 0))
+  {
+    DcmElement *delem=NULL;
+    ADD_TO_DATASET(DcmCodeString, specificCharacterSet)
+  }
+
   if (result==EC_Normal)
   {
     OFCondition cond = printHandler.createRQ(UID_BasicFilmSessionSOPClass, filmSessionInstanceUID, &dset, status, attributeListOut);
index 6f591527b2be7029eee4abfee918a2c3df84cc94..4baa2e585a50da047c47fa1de72d8bf6bb60c840 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2010, OFFIS e.V.
+ *  Copyright (C) 1998-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -113,7 +113,7 @@ void DVPSStoredPrint_PList::printSCPBasicFilmBoxSet(
   } else {
     // film box does not exist or wrong instance UID
     DCMPSTAT_WARN("cannot update film box, object not found.");
-    rsp.msg.NSetRSP.DimseStatus = STATUS_N_NoSuchObjectInstance;
+    rsp.msg.NSetRSP.DimseStatus = STATUS_N_NoSuchSOPInstance;
   }
 }
 
@@ -142,7 +142,7 @@ void DVPSStoredPrint_PList::printSCPBasicGrayscaleImageBoxSet(
     DcmFileFormat imageFile;
     DcmDataset *imageDataset = imageFile.getDataset();
 
-    if (newib->printSCPSet(cfg, cfgname, rqDataset, rsp, rspDataset, *imageDataset, 
+    if (newib->printSCPSet(cfg, cfgname, rqDataset, rsp, rspDataset, *imageDataset,
         sp->getReferencedPresentationLUTAlignment(), presentationLUTnegotiated))
     {
       if (EC_Normal == sp->writeHardcopyImageAttributes(*imageDataset))
@@ -174,7 +174,7 @@ void DVPSStoredPrint_PList::printSCPBasicGrayscaleImageBoxSet(
   } else {
     // image box does not exist or wrong instance UID
     DCMPSTAT_WARN("cannot update basic grayscale image box, object not found.");
-    rsp.msg.NSetRSP.DimseStatus = STATUS_N_NoSuchObjectInstance;
+    rsp.msg.NSetRSP.DimseStatus = STATUS_N_NoSuchSOPInstance;
   }
 }
 
@@ -224,7 +224,7 @@ void DVPSStoredPrint_PList::printSCPBasicFilmBoxAction(
   } else {
     // film box does not exist or wrong instance UID
     DCMPSTAT_WARN("cannot print film box, object not found.");
-    rsp.msg.NActionRSP.DimseStatus = STATUS_N_NoSuchObjectInstance;
+    rsp.msg.NActionRSP.DimseStatus = STATUS_N_NoSuchSOPInstance;
   }
 }
 
@@ -293,7 +293,7 @@ void DVPSStoredPrint_PList::printSCPBasicFilmBoxDelete(T_DIMSE_Message& rq, T_DI
   } else {
     // film box does not exist or wrong instance UID
     DCMPSTAT_WARN("cannot delete film box with instance UID '" << rq.msg.NDeleteRQ.RequestedSOPInstanceUID << "': object does not exist.");
-    rsp.msg.NDeleteRSP.DimseStatus = STATUS_N_NoSuchObjectInstance;
+    rsp.msg.NDeleteRSP.DimseStatus = STATUS_N_NoSuchSOPInstance;
   }
 }
 
@@ -329,12 +329,12 @@ OFBool DVPSStoredPrint_PList::matchesPresentationLUT(DVPSPrintPresentationLUTAli
 {
   OFBool result = OFTrue;
   OFListConstIterator(DVPSStoredPrint *) first = list_.begin();
-  OFListConstIterator(DVPSStoredPrint *) last = list_.end();  
+  OFListConstIterator(DVPSStoredPrint *) last = list_.end();
   while (first != last)
   {
     result = result && (*first)->matchesPresentationLUT(align);
     ++first;
-  }  
+  }
   return result;
 }
 
@@ -345,7 +345,7 @@ void DVPSStoredPrint_PList::overridePresentationLUTSettings(
       DVPSPrintPresentationLUTAlignment newAlignment)
 {
   OFListIterator(DVPSStoredPrint *) first = list_.begin();
-  OFListIterator(DVPSStoredPrint *) last = list_.end();  
+  OFListIterator(DVPSStoredPrint *) last = list_.end();
   while (first != last)
   {
     (*first)->overridePresentationLUTSettings(newIllumination, newReflectedAmbientLight, newReferencedPLUT, newAlignment);
index aefb58e177083b43b041ef250412e9c0022a159d..79a23943897e4410ca304394c29ce4ad8076c8cc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2018, OFFIS e.V.
+ *  Copyright (C) 1999-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -285,7 +285,8 @@ OFCondition DVPSSoftcopyVOI_PList::createFromImage(
     if (haveWindow && ((voiActivation==DVPSV_preferVOIWindow)||(! haveLUT)))
     {
       // create VOI window
-      Float64 wc, ww;
+      Float64 wc = 0.0;
+      Float64 ww = 0.0;
       char *wexp = NULL;
       result = windowCenter.getFloat64(wc,0);
       if (EC_Normal==result) result = windowWidth.getFloat64(ww,0);
index d603272a0b2c6d32e239e8e5d949d70da6c07408..ce2f5ad5ffe4cc2213319cd82e43347f8ce05bd9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2017, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmpstat/dvpstx.h"      /* for DVPSTextObject, needed by MSVC5 with STL */
 #include "dcmtk/dcmpstat/dvpsgr.h"      /* for DVPSGraphicObject, needed by MSVC5 with STL */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CMATH
-#define INCLUDE_CTIME
-#define INCLUDE_LIBC
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
 
 /* --------------- class DVPresentationState --------------- */
 
@@ -1088,7 +1080,8 @@ OFCondition DVPresentationState::setGammaVOILUT(double gammaValue, DVPSObjectApp
   signed long firstMapped = 0;
   if (haveActiveVOIWindow())    // use active VOI window to specify the LUT descriptor
   {
-    double ww, wc;
+    double ww = 0.0;
+    double wc = 0.0;
     if ((getCurrentWindowWidth(ww) == EC_Normal) && (getCurrentWindowCenter(wc) == EC_Normal))
     {
       if (ww <= 65536)
@@ -1554,8 +1547,8 @@ void DVPresentationState::renderPixelData(OFBool display)
     /* remove all external overlays that are not active as overlay or bitmap shutter */
     for (unsigned int remgroup=0x6000; remgroup <= 0x601F; remgroup += 2)
     {
-      if ((remgroup != bitmapShutterGroup)&&((! overlayList.haveOverlayGroup(remgroup))||
-          (NULL == activationLayerList.getActivationLayer(remgroup))))
+      if ((remgroup != bitmapShutterGroup)&&((! overlayList.haveOverlayGroup(OFstatic_cast(Uint16, remgroup)))||
+          (NULL == activationLayerList.getActivationLayer(OFstatic_cast(Uint16, remgroup)))))
       {
          currentImage->removeOverlay(remgroup); // ignore return value.
       }
index 639d355135efb620862d904137841c98ab11bbaf..adc619b7e2a0da16d6980d3c1403e64321e31e7c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,9 +25,6 @@
 #include "dcmtk/ofstd/ofstring.h"
 #include "dcmtk/dcmpstat/dvpsdef.h"     /* for constants and macros */
 
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 
 /* --------------- class DVPSTextObject --------------- */
 
index 427a79a3287215654d74594e29e6e48f53633097..cf6bab1f44f1b9716ed6517e0f0ccc613ec24eb3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2017, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,9 +25,6 @@
 #include "dcmtk/dcmdata/dctk.h"
 #include "dcmtk/ofstd/ofstd.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 /* --------------- class DVPSVOIWindow --------------- */
 
 DVPSVOIWindow::DVPSVOIWindow()
index 99918e7734577807b803414a6744ae83f3413bf4..083b4f76443e31cd2c953b525cfc20a2dc59e79f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2020, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -33,7 +33,7 @@
 #include "dcmtk/dcmsign/sitypes.h"
 #include "dcmtk/dcmsign/sinullpr.h"
 #include "dcmtk/dcmsign/siprivat.h"
-#include "dcmtk/dcmsign/siripemd.h"
+#include "dcmtk/dcmsign/simdmac.h"
 
 #include "dcmtk/ofstd/ofstream.h"
 
@@ -333,7 +333,7 @@ void DVSignatureHandler::updateDigitalSignatureInformation(DcmItem& /*dataset*/,
           cert->getCertValidityNotAfter(aString);
           os << aString.c_str() << htmlEndl
              << htmlLine4 << "Public key" << htmlNext;
-          const char *ecname = NULL;
+          OFString ecname;
           switch (cert->getKeyType())
           {
             case EKT_RSA:
@@ -344,7 +344,7 @@ void DVSignatureHandler::updateDigitalSignatureInformation(DcmItem& /*dataset*/,
               break;
             case EKT_EC:
               ecname = cert->getCertCurveName();
-              if (ecname)
+              if (ecname.length() > 0)
               {
                 os << "EC, curve " << ecname << ", " << cert->getCertKeyBits() << " bits";
               }
@@ -825,7 +825,7 @@ OFCondition DVSignatureHandler::createSignature(
   if (! key.matchesCertificate(cert)) return EC_IllegalCall; // private key does not match certificate
 
   DcmSignature signer;
-  SiRIPEMD160 mac;
+  SiMDMAC mac(EMT_RIPEMD160);
   SiNullProfile nullProfile;
   DVSignatureHandlerSignatureProfile mainProfile(attributesNotToSignInMainDataset);
   
index f3fae247e899ef54119a798134d5f478aaf92c8a..b5ce1da98057cba7cdc1ef9a4db04793e584f7ba 100644 (file)
@@ -1,5 +1,5 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(msgserv msgserv)
+DCMTK_ADD_EXECUTABLE(msgserv msgserv.cc)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(msgserv dcmpstat dcmdsig dcmsr dcmimage dcmimgle dcmqrdb dcmnet dcmtls dcmdata oflog ofstd)
index 35485ec727a3da21626b6d02c7797edfd6c929e2..79f30097211764d90903af30236a2ad823e3df10 100644 (file)
@@ -1,5 +1,4 @@
 msgserv.o: msgserv.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmpstat/dvpsmsg.h ../include/dcmtk/dcmpstat/dpdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
@@ -8,6 +7,7 @@ msgserv.o: msgserv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -50,12 +50,10 @@ msgserv.o: msgserv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofexit.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
- ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
index a4ed2771c50df1f7485122cb32d1f4505835d11d..fd72976832aedd7695691571f1eb590855e45280 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2018, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -49,10 +49,6 @@ BEGIN_EXTERN_C
 #endif
 END_EXTERN_C
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CERRNO
-#define INCLUDE_CTIME
-#include "dcmtk/ofstd/ofstdinc.h"
 
 #include "dcmtk/dcmpstat/dvpsmsg.h"     /* for class DVPSIPCMessage */
 #include "dcmtk/dcmdata/cmdlnarg.h"    /* for prepareCmdLineArgs */
index 7dc4b3c452a6aa5bf00cb25848c9ef3718d0df0b..7f4938ac0e9c371a4ecf8027d3bf1641e6fad11b 100644 (file)
@@ -1,6 +1,6 @@
 # declare executables
 foreach(PROGRAM dcmqrscp dcmqridx dcmqrti)
-  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM})
+  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc)
 endforeach()
 
 # make sure executables are linked to the corresponding libraries
index 9bb15d232c225a15e1df8beea2c08ec7c5aac482..baa70a7a8510f374fb46bed837ec827e65239b3f 100644 (file)
@@ -1,10 +1,10 @@
 dcmqridx.o: dcmqridx.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
@@ -30,7 +30,6 @@ dcmqridx.o: dcmqridx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -79,12 +78,12 @@ dcmqridx.o: dcmqridx.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmqrdb/dcmqrdbi.h ../include/dcmtk/dcmqrdb/dcmqrdba.h \
  ../../ofstd/include/dcmtk/ofstd/offname.h
 dcmqrscp.o: dcmqrscp.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
@@ -106,7 +105,6 @@ dcmqrscp.o: dcmqrscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -174,12 +172,12 @@ dcmqrscp.o: dcmqrscp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/offname.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcmqrti.o: dcmqrti.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmqrdb/dcmqrtis.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -191,7 +189,6 @@ dcmqrti.o: dcmqrti.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
index bdfa25b6df6d229fe5e6df809b7ba7e10a4245be..71fdbb2ab07598b333b2e8a7b203dcbb983c72cc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2018, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofconapp.h"
 #include "dcmtk/ofstd/ofcmdln.h"
 #include "dcmtk/dcmdata/dcdict.h"
index 591fb1ff4b1f15202e21bc799b8503a1b44076a7..0ddc933c183322c6ed237506d9b80415820cc125 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2019, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#define INCLUDE_CTIME
-#define INCLUDE_LIBC
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
@@ -105,7 +97,7 @@ static void mangleAssociationProfileKey(OFString& key)
   {
     if (!isspace(key[ui]))
     {
-      key[ui] = toupper(key[ui]);
+      key[ui] = OFstatic_cast(char, toupper(key[ui]));
       ++ui;
     }
     else key.erase(ui, 1);
index 0e78905f1981dda26c806efdc57e5f0638f68cf3..0acceed3569a56cccf7c567ba21e6d6a83bda40e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2017, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#define INCLUDE_CERRNO
-#define INCLUDE_CTIME
-#define INCLUDE_CSIGNAL
-#include "dcmtk/ofstd/ofstdinc.h"
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_FILE_H
 #include <sys/file.h>
index 3db240144d0ff73013133959dc29a60f2bab456e..3be0ce613d60a008040f8eb29b4ffc4e727f2236 100644 (file)
@@ -131,6 +131,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmqridx_copyright COPYRIGHT
 
-Copyright (C) 1993-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1993-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 620793daed221c9943b2f473909d71649ad2479e..e4dfcb0a194a210b3e3ce3c020d8ecef777b5008 100644 (file)
@@ -857,7 +857,9 @@ SimplifiedAdultEchoSRStorage                         1.2.840.10008.5.1.4.1.1.88.
 PatientRadiationDoseSRStorage                        1.2.840.10008.5.1.4.1.1.88.73
 PlannedImagingAgentAdministrationSRStorage           1.2.840.10008.5.1.4.1.1.88.74
 PerformedImagingAgentAdministrationSRStorage         1.2.840.10008.5.1.4.1.1.88.75
+EnhancedXRayRadiationDoseSRStorage                   1.2.840.10008.5.1.4.1.1.88.76
 ContentAssessmentResultsStorage                      1.2.840.10008.5.1.4.1.1.90.1
+MicroscopyBulkSimpleAnnotationsStorage               1.2.840.10008.5.1.4.1.1.91.1
 EncapsulatedPDFStorage                               1.2.840.10008.5.1.4.1.1.104.1
 EncapsulatedCDAStorage                               1.2.840.10008.5.1.4.1.1.104.2
 EncapsulatedSTLStorage                               1.2.840.10008.5.1.4.1.1.104.3
@@ -869,6 +871,7 @@ RETIRED_StandalonePETCurveStorage                    1.2.840.10008.5.1.4.1.1.129
 EnhancedPETImageStorage                              1.2.840.10008.5.1.4.1.1.130
 BasicStructuredDisplayStorage                        1.2.840.10008.5.1.4.1.1.131
 CTPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.2
+XAPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.8
 RTImageStorage                                       1.2.840.10008.5.1.4.1.1.481.1
 RTDoseStorage                                        1.2.840.10008.5.1.4.1.1.481.2
 RTStructureSetStorage                                1.2.840.10008.5.1.4.1.1.481.3
@@ -889,6 +892,8 @@ RTRadiationSalvageRecordStorage                      1.2.840.10008.5.1.4.1.1.481
 TomotherapeuticRadiationRecordStorage                1.2.840.10008.5.1.4.1.1.481.18
 CArmPhotonElectronRadiationRecordStorage             1.2.840.10008.5.1.4.1.1.481.19
 RoboticRadiationRecordStorage                        1.2.840.10008.5.1.4.1.1.481.20
+RTRadiationSetDeliveryInstructionStorage             1.2.840.10008.5.1.4.1.1.481.21
+RTTreatmentPreparationStorage                        1.2.840.10008.5.1.4.1.1.481.22
 DICOS_CTImageStorage                                 1.2.840.10008.5.1.4.1.1.501.1
 DICOS_DigitalXRayImageStorageForPresentation         1.2.840.10008.5.1.4.1.1.501.2.1
 DICOS_DigitalXRayImageStorageForProcessing           1.2.840.10008.5.1.4.1.1.501.2.2
@@ -1093,6 +1098,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmqrscp_copyright COPYRIGHT
 
-Copyright (C) 1993-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1993-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 995ddbc3d6735732c808e4521fd9b6499166adb8..942e55f1aaf440d08637f2f0c28a95cf8add1a2d 100644 (file)
@@ -443,6 +443,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmqrti_copyright COPYRIGHT
 
-Copyright (C) 1993-2014 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1993-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index dcafed600ae6b038e2132747c3a5e3e7aa6f8f9e..43e02e8345a557d9cdf60a5bbe4f0fbcc441f8db 100644 (file)
@@ -1,5 +1,5 @@
 #
-#  Copyright (C) 2017-2020, OFFIS e.V.
+#  Copyright (C) 2017-2021, OFFIS e.V.
 #  All rights reserved.  See COPYRIGHT file for details.
 #
 #  This software and supporting documentation were developed by
@@ -247,12 +247,14 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib
 # - EncapsulatedMTLStorage
 # - EncapsulatedOBJStorage
 # - EncapsulatedSTLStorage
+# - EnhancedXRayRadiationDoseSRStorage
 # - ExtensibleSRStorage
 # - GrayscalePlanarMPRVolumetricPresentationStateStorage
 # - HangingProtocolStorage
 # - LegacyConvertedEnhancedCTImageStorage
 # - LegacyConvertedEnhancedMRImageStorage
 # - LegacyConvertedEnhancedPETImageStorage
+# - MicroscopyBulkSimpleAnnotationsStorage
 # - MultichannelRespiratoryWaveformStorage
 # - MultipleVolumeRenderingVolumetricPresentationStateStorage
 # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
@@ -269,8 +271,10 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib
 # - RTPhysicianIntentStorage
 # - RTRadiationRecordSetStorage
 # - RTRadiationSalvageRecordStorage
+# - RTRadiationSetDeliveryInstructionStorage
 # - RTRadiationSetStorage
 # - RTSegmentAnnotationStorage
+# - RTTreatmentPreparationStorage
 # - SegmentedVolumeRenderingVolumetricPresentationStateStorage
 # - SimplifiedAdultEchoSRStorage
 # - SleepElectroencephalogramWaveformStorage
@@ -280,6 +284,8 @@ PresentationContext128 = DRAFT_WaveformStorage\UncompressedOrZlib
 # - VolumeRenderingVolumetricPresentationStateStorage
 # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage
 # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage
+# - XADefinedProcedureProtocolStorage
+# - XAPerformedProcedureProtocolStorage
 #
 # - DICOS_2DAITStorage
 # - DICOS_3DAITStorage
@@ -449,6 +455,8 @@ PresentationContext128 = XRayRadiationDoseSRStorage\UncompressedOrZlib
 # - EncapsulatedMTLStorage
 # - EncapsulatedOBJStorage
 # - EncapsulatedSTLStorage
+# - EnhancedXRayRadiationDoseSRStorage
+# - MicroscopyBulkSimpleAnnotationsStorage
 # - MultichannelRespiratoryWaveformStorage
 # - MultipleVolumeRenderingVolumetricPresentationStateStorage
 # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
@@ -463,13 +471,17 @@ PresentationContext128 = XRayRadiationDoseSRStorage\UncompressedOrZlib
 # - RTPhysicianIntentStorage
 # - RTRadiationRecordSetStorage
 # - RTRadiationSalvageRecordStorage
+# - RTRadiationSetDeliveryInstructionStorage
 # - RTRadiationSetStorage
 # - RTSegmentAnnotationStorage
+# - RTTreatmentPreparationStorage
 # - SegmentedVolumeRenderingVolumetricPresentationStateStorage
 # - SleepElectroencephalogramWaveformStorage
 # - TomotherapeuticRadiationRecordStorage
 # - TomotherapeuticRadiationStorage
 # - VolumeRenderingVolumetricPresentationStateStorage
+# - XADefinedProcedureProtocolStorage
+# - XAPerformedProcedureProtocolStorage
 #
 # - RETIRED_HardcopyColorImageStorage
 # - RETIRED_HardcopyGrayscaleImageStorage
@@ -678,6 +690,7 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2
 # - EnhancedMRColorImageStorage
 # - EnhancedPETImageStorage
 # - EnhancedUSVolumeStorage
+# - EnhancedXRayRadiationDoseSRStorage
 # - ExtensibleSRStorage
 # - GeneralAudioWaveformStorage
 # - GenericImplantTemplateStorage
@@ -694,6 +707,7 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2
 # - LegacyConvertedEnhancedPETImageStorage
 # - LensometryMeasurementsStorage
 # - MacularGridThicknessAndVolumeReportStorage
+# - MicroscopyBulkSimpleAnnotationsStorage
 # - MultichannelRespiratoryWaveformStorage
 # - MultipleVolumeRenderingVolumetricPresentationStateStorage
 # - OphthalmicAxialMeasurementsStorage
@@ -720,8 +734,10 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2
 # - RTPhysicianIntentStorage
 # - RTRadiationRecordSetStorage
 # - RTRadiationSalvageRecordStorage
+# - RTRadiationSetDeliveryInstructionStorage
 # - RTRadiationSetStorage
 # - RTSegmentAnnotationStorage
+# - RTTreatmentPreparationStorage
 # - SegmentationStorage
 # - SegmentedVolumeRenderingVolumetricPresentationStateStorage
 # - SimplifiedAdultEchoSRStorage
@@ -739,6 +755,8 @@ PresentationContext128 = VideoPhotographicImageStorage\MPEG2
 # - VolumeRenderingVolumetricPresentationStateStorage
 # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage
 # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage
+# - XADefinedProcedureProtocolStorage
+# - XAPerformedProcedureProtocolStorage
 # - XAXRFGrayscaleSoftcopyPresentationStateStorage
 # - XRay3DAngiographicImageStorage
 # - XRay3DCraniofacialImageStorage
@@ -927,12 +945,14 @@ Role127 = DRAFT_WaveformStorage\BOTH
 # - EncapsulatedMTLStorage
 # - EncapsulatedOBJStorage
 # - EncapsulatedSTLStorage
+# - EnhancedXRayRadiationDoseSRStorage
 # - ExtensibleSRStorage
 # - GrayscalePlanarMPRVolumetricPresentationStateStorage
 # - HangingProtocolStorage
 # - LegacyConvertedEnhancedCTImageStorage
 # - LegacyConvertedEnhancedMRImageStorage
 # - LegacyConvertedEnhancedPETImageStorage
+# - MicroscopyBulkSimpleAnnotationsStorage
 # - MultichannelRespiratoryWaveformStorage
 # - MultipleVolumeRenderingVolumetricPresentationStateStorage
 # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
@@ -950,8 +970,10 @@ Role127 = DRAFT_WaveformStorage\BOTH
 # - RTPhysicianIntentStorage
 # - RTRadiationRecordSetStorage
 # - RTRadiationSalvageRecordStorage
+# - RTRadiationSetDeliveryInstructionStorage
 # - RTRadiationSetStorage
 # - RTSegmentAnnotationStorage
+# - RTTreatmentPreparationStorage
 # - SegmentedVolumeRenderingVolumetricPresentationStateStorage
 # - SimplifiedAdultEchoSRStorage
 # - SleepElectroencephalogramWaveformStorage
@@ -961,6 +983,8 @@ Role127 = DRAFT_WaveformStorage\BOTH
 # - VolumeRenderingVolumetricPresentationStateStorage
 # - WideFieldOphthalmicPhotographyStereographicProjectionImageStorage
 # - WideFieldOphthalmicPhotography3DCoordinatesImageStorage
+# - XADefinedProcedureProtocolStorage
+# - XAPerformedProcedureProtocolStorage
 #
 # - DICOS_2DAITStorage
 # - DICOS_3DAITStorage
@@ -1118,6 +1142,8 @@ Role127 = XRayRadiationDoseSRStorage\BOTH
 # - EncapsulatedMTLStorage
 # - EncapsulatedOBJStorage
 # - EncapsulatedSTLStorage
+# - EnhancedXRayRadiationDoseSRStorage
+# - MicroscopyBulkSimpleAnnotationsStorage
 # - MultichannelRespiratoryWaveformStorage
 # - MultipleVolumeRenderingVolumetricPresentationStateStorage
 # - OphthalmicOpticalCoherenceTomographyBscanVolumeAnalysisStorage
@@ -1132,13 +1158,17 @@ Role127 = XRayRadiationDoseSRStorage\BOTH
 # - RTPhysicianIntentStorage
 # - RTRadiationRecordSetStorage
 # - RTRadiationSalvageRecordStorage
+# - RTRadiationSetDeliveryInstructionStorage
 # - RTRadiationSetStorage
 # - RTSegmentAnnotationStorage
+# - RTTreatmentPreparationStorage
 # - SegmentedVolumeRenderingVolumetricPresentationStateStorage
 # - SleepElectroencephalogramWaveformStorage
 # - TomotherapeuticRadiationRecordStorage
 # - TomotherapeuticRadiationStorage
 # - VolumeRenderingVolumetricPresentationStateStorage
+# - XADefinedProcedureProtocolStorage
+# - XAPerformedProcedureProtocolStorage
 #
 # - RETIRED_HardcopyColorImageStorage
 # - RETIRED_HardcopyGrayscaleImageStorage
index c47b4432a5048445f2d78467da64bbb1cefe83ab..486ef377ba3448453a1cf7981d97f75e71217aba 100644 (file)
@@ -59,7 +59,7 @@ public:
     }
 
     /** set DIMSE status
-     *  param s new status
+     *  @param s new status
      */
     void setStatus(DIC_US s) { status = s; }
 
index 03ebfc1b44380d2c828672f104207e8d9da3a84b..68e8a4e23ac67700cc43c2f55d2479345eeda230 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2017, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -24,8 +24,7 @@
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
+
 #include "dcmtk/ofstd/ofcmdln.h"
 #include "dcmtk/oflog/oflog.h"
 #include "dcmtk/dcmqrdb/qrdefine.h"
index 9a3cec58e92bbcc361705c034719e73acb6640c5..45a441fe7812a9a8ea5f8aaaebe45fea6b66fa75 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2017, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/ofstd/ofcond.h"
 #include "dcmtk/dcmqrdb/qrdefine.h"
 
index 371f342b302272f196118f35cb3c85aaa800f398..0dd9df5746987141673cbcf9c796439724604dad 100644 (file)
@@ -258,6 +258,7 @@ public:
 
   /** enable/disable the DB quota system (default: enabled) which causes images
    *  to be deleted if certain boundaries (number of studies, bytes per study) are exceeded.
+   *  @param enable weather to disable/enable
    */
   void enableQuotaSystem(OFBool enable);
 
index 38d65e84e335c5a84956afaf5d8e97fb7ced3fa6..30f40bd257731203d3dc159388d1198831022f92 100644 (file)
@@ -161,9 +161,13 @@ public:
     DB_SerializedTagKey XTag ;
 
 private:
-    /// private undefined copy constructor
+    /** private undefined copy constructor
+     * @param copy documented to avoid doxygen warning
+     */
     DB_SmallDcmElmt(const DB_SmallDcmElmt& copy);
-    /// private undefined copy assignment operator
+    /** private undefined copy assignment operator
+     * @param copy documented to avoid doxygen warning
+     */
     DB_SmallDcmElmt& operator=(const DB_SmallDcmElmt& copy);
 };
 
@@ -187,9 +191,13 @@ struct DCMTK_DCMQRDB_EXPORT DB_ElementList
     OFoptional<OFString> utf8Value ;
 
 private:
-    /// private undefined copy constructor
+    /** private undefined copy constructor
+     * @param copy documented to avoid doxygen warning
+     */
     DB_ElementList(const DB_ElementList& copy);
-    /// private undefined copy assignment operator
+    /** private undefined copy assignment operator
+     * @param copy documented to avoid doxygen warning
+     */
     DB_ElementList& operator=(const DB_ElementList& copy);
 };
 
index 2767d22afe8545b6fb712313518c6c5cc098ed15..5a852fc80dc6f9024299973be3636cc0a0840a8d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2011, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,9 +28,6 @@
 #include "dcmtk/dcmnet/assoc.h"
 #include "dcmtk/dcmqrdb/qrdefine.h"
 
-#define INCLUDE_CTIME
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
@@ -78,6 +75,7 @@ public:
    *  given aetitle. Used to enforce an ad-hoc rule that allows only
    *  one parallel association to negotiate storage presentation contexts
    *  for each storage area (aetitle)
+   *  @param calledAETitle the given aetitle
    */
   OFBool haveProcessWithWriteAccess(const char *calledAETitle) const;
 
index 95ce4789268e59873e0fd9f5f96ea7acfc2f0167..832fa9fc4aef572b9d5b7738556abbc68477ff17 100644 (file)
@@ -1,4 +1,16 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmqrdb dcmqrcbf dcmqrcbg dcmqrcbm dcmqrcbs dcmqrcnf dcmqrdbi dcmqrdbs dcmqropt dcmqrptb dcmqrsrv dcmqrtis)
+DCMTK_ADD_LIBRARY(dcmqrdb
+  dcmqrcbf.cc
+  dcmqrcbg.cc
+  dcmqrcbm.cc
+  dcmqrcbs.cc
+  dcmqrcnf.cc
+  dcmqrdbi.cc
+  dcmqrdbs.cc
+  dcmqropt.cc
+  dcmqrptb.cc
+  dcmqrsrv.cc
+  dcmqrtis.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmqrdb ofstd dcmdata dcmnet)
index 157ec1394e4840f56de0fcf5855ff20f0b53e90c..56c971ba862370113aa7ac30e2663d50bb24ce0b 100644 (file)
@@ -2,10 +2,10 @@ dcmqrcbf.o: dcmqrcbf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmqrdb/dcmqrcbf.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -17,7 +17,6 @@ dcmqrcbf.o: dcmqrcbf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -86,10 +85,10 @@ dcmqrcbg.o: dcmqrcbg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmqrdb/dcmqrcbg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -101,7 +100,6 @@ dcmqrcbg.o: dcmqrcbg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -170,10 +168,10 @@ dcmqrcbm.o: dcmqrcbm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmqrdb/dcmqrcbm.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -185,7 +183,6 @@ dcmqrcbm.o: dcmqrcbm.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -262,10 +259,10 @@ dcmqrcbs.o: dcmqrcbs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmqrdb/dcmqrcbs.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -277,7 +274,6 @@ dcmqrcbs.o: dcmqrcbs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -344,12 +340,12 @@ dcmqrcbs.o: dcmqrcbs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/offname.h
 dcmqrcnf.o: dcmqrcnf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmqrdb/dcmqrcnf.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -391,13 +387,13 @@ dcmqrcnf.o: dcmqrcnf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofmap.h \
  ../../ofstd/include/dcmtk/ofstd/ofchrenc.h
 dcmqrdbi.o: dcmqrdbi.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstd.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -415,7 +411,6 @@ dcmqrdbi.o: dcmqrdbi.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -584,7 +579,6 @@ dcmqropt.o: dcmqropt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
@@ -632,7 +626,6 @@ dcmqrptb.o: dcmqrptb.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -708,7 +701,6 @@ dcmqrsrv.o: dcmqrsrv.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -784,10 +776,10 @@ dcmqrsrv.o: dcmqrsrv.cc ../../config/include/dcmtk/config/osconfig.h \
 dcmqrtis.o: dcmqrtis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmqrdb/dcmqrtis.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -799,7 +791,6 @@ dcmqrtis.o: dcmqrtis.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
index 091e3d85d2cf0a671a768289b94b9d7ce3697d9e..8815c5b6e3589a8ff153bd624017fe9298fc097a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2017, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -40,6 +40,7 @@ void DcmQueryRetrieveFindContext::callbackHandler(
     DcmDataset **responseIdentifiers,
     DcmDataset **stDetail)
 {
+    (void) options_;
     OFCondition dbcond = EC_Normal;
     DcmQueryRetrieveDatabaseStatus dbStatus(priorStatus);
 
index ab1c61b978c34a83ae15338e2826d2b3ca4991a1..fee635b485e0becdfc471510476dc88d3dd298f5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2019, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -287,9 +287,9 @@ void DcmQueryRetrieveGetContext::getNextImage(DcmQueryRetrieveDatabaseStatus * d
     char subImgFileName[MAXPATHLEN + 1];    /* sub-operation image file */
 
     /* clear out strings */
-    bzero(subImgFileName, sizeof(subImgFileName));
-    bzero(subImgSOPClass, sizeof(subImgSOPClass));
-    bzero(subImgSOPInstance, sizeof(subImgSOPInstance));
+    memset(subImgFileName, 0, sizeof(subImgFileName));
+    memset(subImgSOPClass, 0, sizeof(subImgSOPClass));
+    memset(subImgSOPInstance, 0, sizeof(subImgSOPInstance));
 
     /* get DB response */
     dbcond = dbHandle.nextMoveResponse(
index d3e07295cebba2ecce9632eb3cd0f5552e771e9c..6cbf7756503bad848852bc96df8dc14dad0d5e99 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2019, OFFIS e.V.
+ *  Copyright (C) 1993-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -96,7 +96,7 @@ void DcmQueryRetrieveMoveContext::callbackHandler(
              */
             cond = buildSubAssociation(request);
             if (cond == QR_EC_InvalidPeer) {
-                dbStatus.setStatus(STATUS_MOVE_Failed_MoveDestinationUnknown);
+                dbStatus.setStatus(STATUS_MOVE_Refused_MoveDestinationUnknown);
             } else if (cond.bad()) {
                 /* failed to build association, must fail move */
                 failAllSubOperations(&dbStatus);
@@ -289,7 +289,7 @@ OFCondition DcmQueryRetrieveMoveContext::buildSubAssociation(T_DIMSE_C_MoveRQ *r
     DIC_NODENAME dstHostName;
     DIC_NODENAME dstHostNamePlusPort;
     int dstPortNumber;
-    T_ASC_Parameters *params;
+    T_ASC_Parameters *params = NULL;
     OFString temp_str;
 
     OFStandard::strlcpy(dstAETitle, request->MoveDestination, DIC_AE_LEN + 1);
@@ -393,9 +393,9 @@ void DcmQueryRetrieveMoveContext::moveNextImage(DcmQueryRetrieveDatabaseStatus *
     char subImgFileName[MAXPATHLEN + 1];    /* sub-operation image file */
 
     /* clear out strings */
-    bzero(subImgFileName, sizeof(subImgFileName));
-    bzero(subImgSOPClass, sizeof(subImgSOPClass));
-    bzero(subImgSOPInstance, sizeof(subImgSOPInstance));
+    memset(subImgFileName, 0, sizeof(subImgFileName));
+    memset(subImgSOPClass, 0, sizeof(subImgSOPClass));
+    memset(subImgSOPInstance,0, sizeof(subImgSOPInstance));
 
     /* get DB response */
     dbcond = dbHandle.nextMoveResponse(
@@ -424,9 +424,9 @@ void DcmQueryRetrieveMoveContext::failAllSubOperations(DcmQueryRetrieveDatabaseS
     char subImgFileName[MAXPATHLEN + 1];    /* sub-operation image file */
 
     /* clear out strings */
-    bzero(subImgFileName, sizeof(subImgFileName));
-    bzero(subImgSOPClass, sizeof(subImgSOPClass));
-    bzero(subImgSOPInstance, sizeof(subImgSOPInstance));
+    memset(subImgFileName, 0, sizeof(subImgFileName));
+    memset(subImgSOPClass, 0, sizeof(subImgSOPClass));
+    memset(subImgSOPInstance, 0, sizeof(subImgSOPInstance));
 
     while (dbStatus->status() == STATUS_Pending) {
         /* get DB response */
@@ -698,7 +698,7 @@ OFCondition DcmQueryRetrieveMoveContext::addAllStoragePresentationContexts(T_ASC
 
     for (i = 0; i < numberOfDcmLongSCUStorageSOPClassUIDs && cond.good(); i++) {
         cond = ASC_addPresentationContext(
-            params, pid, dcmLongSCUStorageSOPClassUIDs[i],
+            params, OFstatic_cast(T_ASC_PresentationContextID, pid), dcmLongSCUStorageSOPClassUIDs[i],
             transferSyntaxes, numTransferSyntaxes);
         pid += 2;   /* only odd presentation context id's */
     }
index 4b4b0bcb8647aab12ec33110278dad327af9d660..686c9df2a7dbfb1d3f86d3ea2e97c48b88fccc1d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2020, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 #include "dcmtk/dcmqrdb/dcmqrcnf.h"
 
-/* includes */
-#define INCLUDE_CSTDIO
-#define INCLUDE_CCTYPE
-#define INCLUDE_CSTDARG
-#define INCLUDE_CSTRING
-#define INCLUDE_CLIMITS
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/ofstd/ofcmdln.h"
 #include "dcmtk/ofstd/ofmap.h"
 #include "dcmtk/ofstd/ofchrenc.h"
 
+#include <climits>
+
 OFLogger DCM_dcmqrdbLogger = OFLog::getLogger("dcmtk.dcmqrdb");
 
 static void freePeer(OFMap<const void *, OFBool> &pointersToFree, struct DcmQueryRetrieveConfigPeer *entry)
index 60fdb4afba2b6f705691fe33941c4da0a322ca02..95fb02d0ef7728593f93cb1f640414119eac5119 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2019, OFFIS e.V.
+ *  Copyright (C) 1993-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -34,20 +34,19 @@ BEGIN_EXTERN_C
 #endif
 END_EXTERN_C
 
-#define INCLUDE_CCTYPE
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/ofstd/ofstd.h"
 
 #include "dcmtk/dcmqrdb/dcmqrdbs.h"
 #include "dcmtk/dcmqrdb/dcmqrdbi.h"
 #include "dcmtk/dcmqrdb/dcmqrcnf.h"
 #include "dcmtk/dcmqrdb/dcmqropt.h"
-
+#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/dcmqrdb/dcmqridx.h"
 #include "dcmtk/dcmnet/diutil.h"
 #include "dcmtk/dcmdata/dcfilefo.h"
 #include "dcmtk/dcmdata/dcmatch.h"
+#include <ctime>
+
 
 /* ========================= static data ========================= */
 
@@ -723,7 +722,7 @@ static OFCondition DB_GetTagKeyAttr (DcmTagKey tag, DB_KEY_TYPE *keyAttr)
 
 static void DB_DuplicateElement (DB_SmallDcmElmt *src, DB_SmallDcmElmt *dst)
 {
-    bzero( (char*)dst, sizeof (DB_SmallDcmElmt));
+    memset( (char*)dst, 0, sizeof (DB_SmallDcmElmt));
     dst -> XTag = src -> XTag;
     dst -> ValueLength = src -> ValueLength;
 
@@ -731,7 +730,7 @@ static void DB_DuplicateElement (DB_SmallDcmElmt *src, DB_SmallDcmElmt *dst)
         dst -> PValueField = NULL;
     else {
         dst -> PValueField = (char *)malloc ((int) src -> ValueLength+1);
-        bzero(dst->PValueField, (size_t)(src->ValueLength+1));
+        memset(dst->PValueField, 0, (size_t)(src->ValueLength+1));
         if (dst->PValueField != NULL) {
             memcpy (dst -> PValueField,  src -> PValueField,
                 (size_t) src -> ValueLength);
@@ -838,6 +837,7 @@ public:
         if (!query->elem.ValueLength)
             return OFTrue;
 
+        (void)findRequestConverter;
         OFString buffer;
         const char* pQuery = query->elem.PValueField;
         const char* pQueryEnd = pQuery + query->elem.ValueLength;
@@ -1119,6 +1119,10 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::testFindRequestList (
                     DCMQRDB_DEBUG("Non Unique Key found (level " << level << ")");
                     return QR_EC_IndexDatabaseError ;
                 }
+                else if (plist->elem.ValueLength == 0) {
+                    DCMQRDB_DEBUG("Unique Key value is empty (level " << level << ")");
+                    return QR_EC_IndexDatabaseError ;
+                }
                 else if (uniqueKeyFound) {
                     DCMQRDB_DEBUG("More than one Unique Key found (level " << level << ")");
                     return QR_EC_IndexDatabaseError ;
@@ -1126,6 +1130,10 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::testFindRequestList (
                 else
                     uniqueKeyFound = OFTrue ;
             }
+            if (! uniqueKeyFound) {
+                DCMQRDB_DEBUG("No Unique Key found (level " << level << ")");
+                return QR_EC_IndexDatabaseError ;
+            }
         }
 
         /**** If current level is the QueryLevel
@@ -1443,7 +1451,7 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::startFindRequest(
 
     if (!qrLevelFound) {
         /* The Query/Retrieve Level is missing */
-        status->setStatus(STATUS_FIND_Failed_IdentifierDoesNotMatchSOPClass);
+        status->setStatus(STATUS_FIND_Error_DataSetDoesNotMatchSOPClass);
         DCMQRDB_WARN("DB_startFindRequest(): missing Query/Retrieve Level");
         handle_->idxCounter = -1 ;
         DB_FreeElementList (handle_->findRequestList) ;
@@ -1477,9 +1485,9 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::startFindRequest(
             DB_FreeElementList (handle_->findRequestList) ;
             handle_->findRequestList = NULL ;
 #ifdef DEBUG
-            DCMQRDB_DEBUG("DB_startFindRequest () : STATUS_FIND_Failed_IdentifierDoesNotMatchSOPClass - Invalid RequestList");
+            DCMQRDB_DEBUG("DB_startFindRequest () : STATUS_FIND_Error_DataSetDoesNotMatchSOPClass - Invalid RequestList");
 #endif
-            status->setStatus(STATUS_FIND_Failed_IdentifierDoesNotMatchSOPClass);
+            status->setStatus(STATUS_FIND_Error_DataSetDoesNotMatchSOPClass);
             return (cond) ;
         }
     }
@@ -1577,7 +1585,11 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::startFindRequest(
 OFCondition DcmQueryRetrieveIndexDatabaseHandle::nextFindResponse (
                 DcmDataset      **findResponseIdentifiers,
                 DcmQueryRetrieveDatabaseStatus  *status,
+#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
                 const DcmQueryRetrieveCharacterSetOptions& characterSetOptions)
+#else
+                const DcmQueryRetrieveCharacterSetOptions& /* characterSetOptions */)
+#endif
 {
 
     DB_ElementList      *plist = NULL;
@@ -1938,6 +1950,10 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::testMoveRequestList (
                     DCMQRDB_DEBUG("Non Unique Key found (level " << level << ")");
                     return QR_EC_IndexDatabaseError ;
                 }
+                else if (plist->elem.ValueLength == 0) {
+                    DCMQRDB_DEBUG("Unique Key value is empty (level " << level << ")");
+                    return QR_EC_IndexDatabaseError ;
+                }
                 else if (uniqueKeyFound) {
                     DCMQRDB_DEBUG("More than one Unique Key found (level " << level << ")");
                     return QR_EC_IndexDatabaseError ;
@@ -2023,7 +2039,7 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::startMoveRequest(
 #endif
 
     else {
-        status->setStatus(STATUS_MOVE_Failed_SOPClassNotSupported);
+        status->setStatus(STATUS_MOVE_Refused_SOPClassNotSupported);
         return (QR_EC_IndexDatabaseError) ;
     }
 
@@ -2118,7 +2134,7 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::startMoveRequest(
 
     if (!qrLevelFound) {
         /* The Query/Retrieve Level is missing */
-        status->setStatus(STATUS_MOVE_Failed_IdentifierDoesNotMatchSOPClass);
+        status->setStatus(STATUS_MOVE_Error_DataSetDoesNotMatchSOPClass);
         DCMQRDB_WARN("DB_startMoveRequest(): missing Query/Retrieve Level");
         handle_->idxCounter = -1 ;
         DB_FreeElementList (handle_->findRequestList) ;
@@ -2153,9 +2169,9 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::startMoveRequest(
             DB_FreeElementList (handle_->findRequestList) ;
             handle_->findRequestList = NULL ;
 #ifdef DEBUG
-            DCMQRDB_DEBUG("DB_startMoveRequest () : STATUS_MOVE_Failed_IdentifierDoesNotMatchSOPClass - Invalid RequestList");
+            DCMQRDB_DEBUG("DB_startMoveRequest () : STATUS_MOVE_Error_DataSetDoesNotMatchSOPClass - Invalid RequestList");
 #endif
-            status->setStatus(STATUS_MOVE_Failed_IdentifierDoesNotMatchSOPClass);
+            status->setStatus(STATUS_MOVE_Error_DataSetDoesNotMatchSOPClass);
             return (cond) ;
         }
     }
@@ -2285,7 +2301,7 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::nextMoveResponse(
     OFStandard::strlcpy(SOPInstanceUID, (char *) idxRec. SOPInstanceUID, SOPInstanceUIDSize) ;
     OFStandard::strlcpy(imageFileName, (char *) idxRec. filename, imageFileNameSize) ;
 
-    *numberOfRemainingSubOperations = --handle_->NumberRemainOperations ;
+    *numberOfRemainingSubOperations = OFstatic_cast(unsigned short, (--handle_->NumberRemainOperations));
 
     nextlist = handle_->moveCounterList->next ;
     free (handle_->moveCounterList) ;
@@ -2670,7 +2686,7 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::storeRequest (
     /**** Initialize an IdxRecord
     ***/
 
-    bzero((char*)&idxRec, sizeof(idxRec));
+    memset((char*)&idxRec, 0, sizeof(idxRec));
 
     DB_IdxInitRecord (&idxRec, 0) ;
 
@@ -2716,7 +2732,7 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::storeRequest (
     }
 
     /* InstanceStatus */
-    idxRec.hstat = (isNew) ? DVIF_objectIsNew : DVIF_objectIsNotNew;
+    idxRec.hstat = OFstatic_cast(char, ((isNew) ? DVIF_objectIsNew : DVIF_objectIsNotNew));
 
     /* InstanceDescription */
     OFBool useDescrTag = OFTrue;
@@ -2742,6 +2758,7 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::storeRequest (
                    (strcmp(SOPClassUID, UID_ChestCADSRStorage) == 0) ||
                    (strcmp(SOPClassUID, UID_ColonCADSRStorage) == 0) ||
                    (strcmp(SOPClassUID, UID_XRayRadiationDoseSRStorage) == 0) ||
+                   (strcmp(SOPClassUID, UID_EnhancedXRayRadiationDoseSRStorage) == 0) ||
                    (strcmp(SOPClassUID, UID_SpectaclePrescriptionReportStorage) == 0) ||
                    (strcmp(SOPClassUID, UID_MacularGridThicknessAndVolumeReportStorage) == 0) ||
                    (strcmp(SOPClassUID, UID_ImplantationPlanSRDocumentStorage) == 0) ||
@@ -2833,7 +2850,7 @@ OFCondition DcmQueryRetrieveIndexDatabaseHandle::storeRequest (
       return (QR_EC_IndexDatabaseError) ;
     }
 
-    bzero((char *)pStudyDesc, SIZEOF_STUDYDESC);
+    memset((char *)pStudyDesc, 0, SIZEOF_STUDYDESC);
     DB_GetStudyDesc(pStudyDesc) ;
 
     stat(imageFileName, &stat_buf) ;
index 4cc0998f7cdce05bc981d26163b14afda83a8958..2f654b859330bfd7a88007d6c0b3206640dd853e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2010, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -23,9 +23,7 @@
 #include "dcmtk/dcmqrdb/dcmqrdbs.h"
 #include "dcmtk/dcmdata/dcdatset.h"    /* for class DcmDataset */
 
-#define INCLUDE_CSTDDEF
-#include "dcmtk/ofstd/ofstdinc.h"
-
+#include <cmath>
 
 DcmQueryRetrieveDatabaseStatus::DcmQueryRetrieveDatabaseStatus(Uint16 s)
 : status_(s)
index 355ad6c6ac1ec2f5dc0d4d6641cc4859a1d1f73e..31ddffb85e62cb3ff01cdf49885b1f62e3537fc4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2017, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -22,9 +22,6 @@
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 #include "dcmtk/dcmqrdb/dcmqropt.h"
 
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
-
 makeOFConditionConst(QR_EC_IndexDatabaseError, OFM_dcmqrdb, 1, OF_error, "Index database error");
 makeOFConditionConst(QR_EC_InvalidPeer,        OFM_dcmqrdb, 2, OF_error, "Invalid peer for move operation");
 
index b2fbdca82795bcd949bd4e0779cbf8d331ad3f7a..5eefbffd796d3ae5ce671df5d33fcd36b337458d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2018, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -22,6 +22,9 @@
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 #include "dcmtk/dcmqrdb/dcmqrptb.h"
 #include "dcmtk/dcmqrdb/dcmqropt.h"
+#include "dcmtk/ofstd/ofstdinc.h"
+#include <ctime>
+
 
 /** helper class that describes entries in the process slot table. Internal use only.
  */
@@ -103,6 +106,7 @@ DcmQueryRetrieveProcessSlot::DcmQueryRetrieveProcessSlot(
 
 OFBool DcmQueryRetrieveProcessSlot::isProcessWithWriteAccess(const char *calledAETitle) const
 {
+  (void) startTime_;
   return (hasStorageAbility_ && calledAETitle && calledAETitle_ == calledAETitle);
 }
 
index 7f01409c5dd3bb28bd65b676df48e0b327502cef..157e6c0224105234358a483d85e47ee6ae0b6285 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2018, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -447,11 +447,25 @@ void DcmQueryRetrieveSCP::refuseAnyStorageContexts(T_ASC_Association * assoc)
 {
     int i;
     T_ASC_PresentationContextID pid;
+    T_ASC_PresentationContext ctx;
 
     for (i = 0; i < numberOfDcmAllStorageSOPClassUIDs; i++) {
         do {
-          pid = ASC_findAcceptedPresentationContextID(assoc, dcmAllStorageSOPClassUIDs[i]);
-          if (pid != 0) ASC_refusePresentationContext(assoc->params, pid, ASC_P_USERREJECTION);
+            pid = ASC_findAcceptedPresentationContextID(assoc, dcmAllStorageSOPClassUIDs[i]);
+            if (pid != 0) {
+                if (ASC_findAcceptedPresentationContext(assoc->params, pid, &ctx).bad() ||
+                    ctx.acceptedRole != ASC_SC_ROLE_SCP) {
+                    // pid refers to a storage presentation context in which the client is not
+                    // exclusively acting as SCP (i.e. receiver of images).
+                    // Reject this presentation context to enforce the "read-only" nature
+                    // of the storage area.
+                    ASC_refusePresentationContext(assoc->params, pid, ASC_P_USERREJECTION);
+                }
+                else {
+                    // for the current SOP class, role negotiation is active. Skip to the next one.
+                    pid = 0;
+                }
+            }
         } while (pid != 0); // repeat as long as we find presentation contexts for this SOP class - there might be multiple ones.
     }
 }
index f11a2b1ad1723e1a61c97c71b0101f85a62d3573..77780bd682d00ba140964beca88001a58c13b645 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1993-2018, OFFIS e.V.
+ *  Copyright (C) 1993-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -29,6 +29,9 @@
 #include "dcmtk/dcmqrdb/dcmqrdbs.h"
 #include "dcmtk/dcmdata/dcfilefo.h"
 #include "dcmtk/dcmqrdb/dcmqropt.h"
+#include "dcmtk/ofstd/ofstdinc.h"
+#include <ctime>
+
 
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_STAT_H
@@ -288,7 +291,7 @@ TI_addSeriesEntry(TI_StudyEntry *study, DcmDataset *reply)
     series = (TI_SeriesEntry*) malloc(sizeof(TI_SeriesEntry));
     if (series == NULL) return OFFalse;
 
-    bzero((char*)series, sizeof(TI_SeriesEntry)); /* make sure its clean */
+    memset((char*)series, 0, sizeof(TI_SeriesEntry)); /* make sure its clean */
 
     /* extract info from reply */
     ok = DU_getStringDOElement(reply, DCM_SeriesInstanceUID, series->seriesInstanceUID, sizeof(series->seriesInstanceUID));
@@ -364,8 +367,8 @@ TI_addImageEntry(TI_SeriesEntry *series, DcmDataset *reply)
     image = (TI_ImageEntry*) malloc(sizeof(TI_ImageEntry));
     if (image == NULL) return OFFalse;
 
-    bzero((char*)image, sizeof(TI_ImageEntry)); /* make sure its clean */
-    bzero((char*)studyID, sizeof(DIC_CS));
+    memset((char*)image, 0, sizeof(TI_ImageEntry)); /* make sure its clean */
+    memset((char*)studyID, 0, sizeof(DIC_CS));
 
     /* extract info from reply */
     ok = DU_getStringDOElement(reply, DCM_SOPInstanceUID, image->sopInstanceUID, sizeof(image->sopInstanceUID));
@@ -442,7 +445,7 @@ TI_addStudyEntry(TI_DBEntry *db, DcmDataset *reply)
     se = (TI_StudyEntry*) malloc(sizeof(TI_StudyEntry));
     if (se == NULL) return OFFalse;
 
-    bzero((char*)se, sizeof(TI_StudyEntry));  /* make sure its clean */
+    memset((char*)se, 0, sizeof(TI_StudyEntry));  /* make sure its clean */
 
     /* extract info from reply */
     ok = DU_getStringDOElement(reply, DCM_StudyInstanceUID, se->studyInstanceUID, sizeof(se->studyInstanceUID));
@@ -486,7 +489,7 @@ DcmQueryRetrieveTelnetInitiator::DcmQueryRetrieveTelnetInitiator(
 , blockMode_(DIMSE_BLOCKING)
 , dimse_timeout_(0)
 {
-  bzero((char*)peerNames, sizeof(peerNames));
+  memset((char*)peerNames, 0, sizeof(peerNames));
 }
 
 OFBool DcmQueryRetrieveTelnetInitiator::TI_detachAssociation(OFBool abortFlag)
@@ -586,14 +589,14 @@ OFCondition DcmQueryRetrieveTelnetInitiator::addPresentationContexts(T_ASC_Param
     /* first add presentation contexts for find and verification */
     for (i=0; i<(int)DIM_OF(abstractSyntaxes) && cond.good(); i++)
     {
-        cond = ASC_addPresentationContext( params, pid, abstractSyntaxes[i], transferSyntaxes, numTransferSyntaxes);
+        cond = ASC_addPresentationContext( params, OFstatic_cast(T_ASC_PresentationContextID, pid), abstractSyntaxes[i], transferSyntaxes, numTransferSyntaxes);
         pid += 2; /* only odd presentation context id's */
     }
 
     /* and then for all storage SOP classes */
     for (i=0; i<numberOfDcmLongSCUStorageSOPClassUIDs && cond.good(); i++)
     {
-      cond = ASC_addPresentationContext( params, pid, dcmLongSCUStorageSOPClassUIDs[i], transferSyntaxes, numTransferSyntaxes);
+      cond = ASC_addPresentationContext( params, OFstatic_cast(T_ASC_PresentationContextID, pid), dcmLongSCUStorageSOPClassUIDs[i], transferSyntaxes, numTransferSyntaxes);
       pid += 2;/* only odd presentation context id's */
     }
 
@@ -811,7 +814,7 @@ OFBool DcmQueryRetrieveTelnetInitiator::TI_storeImage(char *sopClass, char *sopI
         seriesNumber, modality, imageNumber);
     printf("  Image UID: %s\n", sopInstance);
     fflush(stdout);
-    bzero((char*)&req, sizeof(req));
+    memset((char*)&req, 0, sizeof(req));
     req.MessageID = msgId;
     OFStandard::strlcpy(req.AffectedSOPClassUID, sopClass, sizeof(req.AffectedSOPClassUID));
     OFStandard::strlcpy(req.AffectedSOPInstanceUID, sopInstance, sizeof(req.AffectedSOPInstanceUID));
@@ -958,7 +961,7 @@ OFBool DcmQueryRetrieveTelnetInitiator::TI_title(int arg, const char * /*cmdbuf*
         printf("TI_title: arg=%d\n", arg);
     }
 
-    bzero(peerTitle, sizeof(peerTitle));
+    memset(peerTitle, 0, sizeof(peerTitle));
     if (assoc) {
         ASC_getAPTitles(assoc->params, NULL, 0, peerTitle, sizeof(peerTitle), NULL, 0);
     }
@@ -1112,7 +1115,6 @@ OFBool DcmQueryRetrieveTelnetInitiator::TI_quit(int arg, const char * /*cmdbuf*/
     TI_detachAssociation(OFFalse);
     printf("Good Bye, Auf Wiedersehen, Au Revoir\n");
     exit(0);
-    return OFTrue;
 }
 
 OFBool DcmQueryRetrieveTelnetInitiator::TI_actualizeStudies()
@@ -1662,7 +1664,7 @@ OFBool DcmQueryRetrieveTelnetInitiator::TI_send(int /*arg*/, const char *cmdbuf)
         return OFTrue;
     }
 
-    bzero(cmdarg, sizeof(cmdarg));
+    memset(cmdarg, 0, sizeof(cmdarg));
 
     narg = sscanf(cmdbuf, "send %s %d", cmdarg, &iarg);
     if (narg == 1)
@@ -1682,6 +1684,7 @@ void DcmQueryRetrieveTelnetInitiator::TI_userInput()
 {
     char cmdBuf[1024];  /* can't have lines longer than this */
     int arg;
+    memset(cmdBuf, 0, 1024);
 
     /* make the first database current */
     currentdb = 0;
@@ -2117,7 +2120,7 @@ void DcmQueryRetrieveTelnetInitiator::createConfigEntries(
     else
     {
       dbEntry = (TI_DBEntry*) malloc( sizeof(TI_DBEntry) );
-      bzero( (char*)dbEntry, sizeof(*dbEntry) );
+      memset( (char*)dbEntry, 0, sizeof(*dbEntry) );
       dbEntry->title = ctnTitles[i];
 
       for( j=0 ; j<peerNamesCount ; j++ )
@@ -2151,7 +2154,7 @@ void DcmQueryRetrieveTelnetInitiator::createConfigEntries(
     {
       // add DB
       dbEntry = (TI_DBEntry*) malloc( sizeof( TI_DBEntry ) );
-      bzero( (char*)dbEntry, sizeof(*dbEntry) );
+      memset( (char*)dbEntry, 0, sizeof(*dbEntry) );
       dbEntry->title = remoteDBTitles[i];
       dbEntry->isRemoteDB = OFTrue;
 
index e3f97a94c66cd4b708194934024f65a575c37d81..ad990ea0bb829915c90784de2cf3b7587fdd494d 100644 (file)
@@ -1,5 +1,5 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(drtdump drtdump)
+DCMTK_ADD_EXECUTABLE(drtdump drtdump.cc)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(drtdump dcmrt dcmdata oflog ofstd)
index c55c00abec873f9f2b2ae99f18d812b591616fb0..52b024b8f951fe9ccdc53104048eec966f9e3d5c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (c) 2010-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
+ *  Copyright (c) 2010-2021, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Test read and write methods of DICOM RT classes
@@ -199,13 +199,16 @@ static OFCondition dumpRTImage(STD_NAMESPACE ostream &out,
                 appendToString(outString, tmpString, "" /*prefix*/, " mm" /*suffix*/);
             out << "Radiation Machine     : " << outString << OFendl;
         }
-        Uint16 rows, columns;
+        Uint16 rows = 0;
+        Uint16 columns = 0;
         if (rtObject.getRows(rows).good() &&
             rtObject.getColumns(columns).good())
         {
             out << "Image Resolution      : " << columns << " x " << rows << OFendl;
         }
-        Uint16 bitsAllocated, bitsStored, highBit;
+        Uint16 bitsAllocated = 0;
+        Uint16 bitsStored = 0;
+        Uint16 highBit = 0;
         if (rtObject.getBitsAllocated(bitsAllocated).good() &&
             rtObject.getBitsStored(bitsStored).good() &&
             rtObject.getHighBit(highBit).good())
index 5d1c230465564e159b9b4cfd9e9fae4ed8c1edd7..3bc5527bf26d2c6a39f49ea7f2462d8c14d780da 100644 (file)
@@ -181,7 +181,7 @@ It is an error if no data dictionary can be loaded.
 
 \section drtdump_copyright COPYRIGHT
 
-Copyright (C) 2010-2014 by OFFIS e.V. and ICSMED AG, Escherweg 2, 26121
+Copyright (C) 2010-2022 by OFFIS e.V. and ICSMED AG, Escherweg 2, 26121
 Oldenburg, Germany.
 
 */
index e2b40431620b7f42f851515ae5df37a3eb2e51f7..c875456f0ff0008ac2dfdb592bccc8ce473fee92 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012, OFFIS e.V.
+ *  Copyright (C) 2012-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -31,8 +31,8 @@
  * class provides several helper functions on top of DRTDoseIOD.
  *
  * @note These functions hopefully simplify working with DRTDoseIOD. This is a
- * work in progress, please propose any improvements which would make working
- * with this class easier for you and that your consider useful.
+ *   work in progress, please propose any improvements which would make working
+ *   with this class easier for you and that you consider useful.
  */
 class DCMTK_DCMRT_EXPORT DRTDose : public DRTDoseIOD
 {
index 33f583ebd28e9642a5ccaeee34e4ace92aba048d..6f0b7683ddc849906de0a7bcb8ed425b9bbc8415 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012-2016, OFFIS e.V.
+ *  Copyright (C) 2012-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -34,8 +34,8 @@
  * represented through DicomImage.
  *
  * @note These functions hopefully simplify working with DRTImageIOD. This is a
- * work in progress, please propose any improvements which would make working
- * with this class easier for you and that your consider useful.
+ *   work in progress, please propose any improvements which would make working
+ *   with this class easier for you and that you consider useful.
  */
 class DCMTK_DCMRT_EXPORT DRTImage : public DRTImageIOD
 {
index fce704eb6b9fb86dc7afcdd0df9156783e7bcdcb..11c923b899e3d5a5df5d0ad0f04212e27b544cce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012, OFFIS e.V.
+ *  Copyright (C) 2012-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -31,8 +31,8 @@
  * provides several helper functions on top of DRTPlanIOD.
  *
  * @note These functions hopefully simplify working with DRTPlanIOD. This is a
- * work in progress, please propose any improvements which would make working
- * with this class easier for you and that your consider useful.
+ *   work in progress, please propose any improvements which would make working
+ *   with this class easier for you and that you consider useful.
  */
 class DCMTK_DCMRT_EXPORT DRTPlan : public DRTPlanIOD {
 public:
index e42542c08f6889c455adfb890c1fb66e58c628a8..aa5da2ce7eba02db00e463c7d5c0a21d6f222850 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012, OFFIS e.V.
+ *  Copyright (C) 2012-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -31,8 +31,8 @@
  * provides several helper functions on top of DRTStructureSet.
  *
  * @note These functions hopefully simplify working with DRTStructureSetIOD.
- * This is a work in progress, please propose any improvements which would make
- * working with this class easier for you and that your consider useful.
+ *   This is a work in progress, please propose any improvements which would make
+ *   working with this class easier for you and that you consider useful.
  */
 class DCMTK_DCMRT_EXPORT DRTStructureSet : public DRTStructureSetIOD
 {
@@ -57,7 +57,7 @@ public:
      */
     DRTReferencedFrameOfReferenceSequence::Item& getFrameOfReference(const OFString& uid);
 
-    /** find a region of interest by its roi number.
+    /** find a region of interest by its ROI number.
      *  @param roiNumber the ROI to find.
      *  @return the item representing the region of interest or the
      *          EmptyDefaultItem of the DRTStructureSetROISequence.
index d655a9dc659d2dc0a2c6b96fb7aef3a7008d0ea4..666bb7e1e1d649f36be87158513e0596986956e9 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *
  *  Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
- *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class DRTImageIOD
@@ -82,6 +82,7 @@
 #include "dcmtk/dcmrt/seq/drtudis.h"   // for UDISequence
 #include "dcmtk/dcmrt/seq/drtvls.h"    // for VOILUTSequence
 
+#include <cmath>
 
 /** Interface class for RTImageIOD
  *  @note Because of its many member variables, an instance of this class requires quite
index b1147766b567f3e36836e575007210b00adf10ad..104b3c799f9f6d15d403d9a8bf85fa67daed95ce 100644 (file)
@@ -1,4 +1,236 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmrt drtdose drtimage drtplan drtstrct drttreat drtionpl drtiontr drmdose drmimage drmplan drmstrct drttypes drtaadcs drtadcs drtads drtafs drtags drtajcs drtas1 drtas5 drtas6 drtas7 drtass drtbads drtbas drtbcps drtbl2 drtbl5 drtbldls drtbldps drtblds1 drtblds5 drtblds6 drtbldts drtbrcss drtbrdrs drtbrs drtbs drtbss drtbvcps drtcbars drtccs drtcctus drtcdrs drtces drtcgis drtchs drtcims drtcis drtcncs drtcos drtcpas drtcpis drtcps drtcsas drtcs drtcshs drtcsis drtcsrs drtcss drtdcs drtdddps drtddps drtdias drtdimcs drtdimrs drtdirs drtdrs drtds drtdspcs drtdss drtdvhs drtdvrrs drteas drtecs drtes drtfds drtfes drtfgs drtfgss drtfms drtfsss drtgas drtgmcs drtgms drtgpis drthsdrs drtiais drtians drtiblds drtibls drtibs drticpds drticps drtics drtiis drtipiqs drtircs drtiseis drtitts drtiwps drtiws drtlsds6 drtlsds7 drtlsds drtmacds drtmas drtmdrs drtmls drtmps drtmris drtmss drtmucs drtoas drtois drtopis drtos drtpbcs drtpcs drtpcxs drtpdecs drtpdeds drtpfms drtpics drtporcs drtporis drtppcs drtprsis drtpscs drtpsics drtpss drtpsss drtpvis drtqds drtras drtrbas2 drtrbas8 drtrbls drtrbos1 drtrbos6 drtrbos7 drtrbs2 drtrbs4 drtrbs8 drtrcdrs drtrcos drtrcps drtrcs drtrdros drtrdrs1 drtrdrs6 drtrdrs8 drtrds drtrecs drtrfgs drtrfors drtrics drtrims drtris drtrlsds drtrmdrs drtrms drtrmss6 drtrmss7 drtrpcs drtrpis drtrppcs drtrpphs drtrpps drtrppss drtrps drtrris1 drtrris6 drtrris9 drtrrms drtrros drtrrpcs drtrrros drtrrs drtrrshs drtrrtps3 drtrrtps4 drtrrtps5 drtrrtps drtrscs drtrsers drtrses drtrshs6 drtrshs7 drtrshs drtrsis drtrsns drtrsos drtrsrs drtrss drtrsss drtrsts drtrtrs2 drtrtrs4 drtrvis drtwrsrs drtrws drtrwvms drtscris drtscs drtsdcs drtsds drtshds drtsins drtsis drtsns drtspccs drtspcs drtspgis drtsptcs drtss drtssrcs drtssrs drtsss drttms0 drttms9 drttscds drttsibs drttsmds drttts drtudis drtvls drtwps drtwrs drtws drtxrs)
+DCMTK_ADD_LIBRARY(dcmrt
+  drmdose.cc
+  drmimage.cc
+  drmplan.cc
+  drmstrct.cc
+  drtaadcs.cc
+  drtadcs.cc
+  drtads.cc
+  drtafs.cc
+  drtags.cc
+  drtajcs.cc
+  drtas1.cc
+  drtas5.cc
+  drtas6.cc
+  drtas7.cc
+  drtass.cc
+  drtbads.cc
+  drtbas.cc
+  drtbcps.cc
+  drtbl2.cc
+  drtbl5.cc
+  drtbldls.cc
+  drtbldps.cc
+  drtblds1.cc
+  drtblds5.cc
+  drtblds6.cc
+  drtbldts.cc
+  drtbrcss.cc
+  drtbrdrs.cc
+  drtbrs.cc
+  drtbs.cc
+  drtbss.cc
+  drtbvcps.cc
+  drtcbars.cc
+  drtccs.cc
+  drtcctus.cc
+  drtcdrs.cc
+  drtces.cc
+  drtcgis.cc
+  drtchs.cc
+  drtcims.cc
+  drtcis.cc
+  drtcncs.cc
+  drtcos.cc
+  drtcpas.cc
+  drtcpis.cc
+  drtcps.cc
+  drtcs.cc
+  drtcsas.cc
+  drtcshs.cc
+  drtcsis.cc
+  drtcsrs.cc
+  drtcss.cc
+  drtdcs.cc
+  drtdddps.cc
+  drtddps.cc
+  drtdias.cc
+  drtdimcs.cc
+  drtdimrs.cc
+  drtdirs.cc
+  drtdose.cc
+  drtdrs.cc
+  drtds.cc
+  drtdspcs.cc
+  drtdss.cc
+  drtdvhs.cc
+  drtdvrrs.cc
+  drteas.cc
+  drtecs.cc
+  drtes.cc
+  drtfds.cc
+  drtfes.cc
+  drtfgs.cc
+  drtfgss.cc
+  drtfms.cc
+  drtfsss.cc
+  drtgas.cc
+  drtgmcs.cc
+  drtgms.cc
+  drtgpis.cc
+  drthsdrs.cc
+  drtiais.cc
+  drtians.cc
+  drtiblds.cc
+  drtibls.cc
+  drtibs.cc
+  drticpds.cc
+  drticps.cc
+  drtics.cc
+  drtiis.cc
+  drtimage.cc
+  drtionpl.cc
+  drtiontr.cc
+  drtipiqs.cc
+  drtircs.cc
+  drtiseis.cc
+  drtitts.cc
+  drtiwps.cc
+  drtiws.cc
+  drtlsds.cc
+  drtlsds6.cc
+  drtlsds7.cc
+  drtmacds.cc
+  drtmas.cc
+  drtmdrs.cc
+  drtmls.cc
+  drtmps.cc
+  drtmris.cc
+  drtmss.cc
+  drtmucs.cc
+  drtoas.cc
+  drtois.cc
+  drtopis.cc
+  drtos.cc
+  drtpbcs.cc
+  drtpcs.cc
+  drtpcxs.cc
+  drtpdecs.cc
+  drtpdeds.cc
+  drtpfms.cc
+  drtpics.cc
+  drtplan.cc
+  drtporcs.cc
+  drtporis.cc
+  drtppcs.cc
+  drtprsis.cc
+  drtpscs.cc
+  drtpsics.cc
+  drtpss.cc
+  drtpsss.cc
+  drtpvis.cc
+  drtqds.cc
+  drtras.cc
+  drtrbas2.cc
+  drtrbas8.cc
+  drtrbls.cc
+  drtrbos1.cc
+  drtrbos6.cc
+  drtrbos7.cc
+  drtrbs2.cc
+  drtrbs4.cc
+  drtrbs8.cc
+  drtrcdrs.cc
+  drtrcos.cc
+  drtrcps.cc
+  drtrcs.cc
+  drtrdros.cc
+  drtrdrs1.cc
+  drtrdrs6.cc
+  drtrdrs8.cc
+  drtrds.cc
+  drtrecs.cc
+  drtrfgs.cc
+  drtrfors.cc
+  drtrics.cc
+  drtrims.cc
+  drtris.cc
+  drtrlsds.cc
+  drtrmdrs.cc
+  drtrms.cc
+  drtrmss6.cc
+  drtrmss7.cc
+  drtrpcs.cc
+  drtrpis.cc
+  drtrppcs.cc
+  drtrpphs.cc
+  drtrpps.cc
+  drtrppss.cc
+  drtrps.cc
+  drtrris1.cc
+  drtrris6.cc
+  drtrris9.cc
+  drtrrms.cc
+  drtrros.cc
+  drtrrpcs.cc
+  drtrrros.cc
+  drtrrs.cc
+  drtrrshs.cc
+  drtrrtps.cc
+  drtrrtps3.cc
+  drtrrtps4.cc
+  drtrrtps5.cc
+  drtrscs.cc
+  drtrsers.cc
+  drtrses.cc
+  drtrshs.cc
+  drtrshs6.cc
+  drtrshs7.cc
+  drtrsis.cc
+  drtrsns.cc
+  drtrsos.cc
+  drtrsrs.cc
+  drtrss.cc
+  drtrsss.cc
+  drtrsts.cc
+  drtrtrs2.cc
+  drtrtrs4.cc
+  drtrvis.cc
+  drtrws.cc
+  drtrwvms.cc
+  drtscris.cc
+  drtscs.cc
+  drtsdcs.cc
+  drtsds.cc
+  drtshds.cc
+  drtsins.cc
+  drtsis.cc
+  drtsns.cc
+  drtspccs.cc
+  drtspcs.cc
+  drtspgis.cc
+  drtsptcs.cc
+  drtss.cc
+  drtssrcs.cc
+  drtssrs.cc
+  drtsss.cc
+  drtstrct.cc
+  drttms0.cc
+  drttms9.cc
+  drttreat.cc
+  drttscds.cc
+  drttsibs.cc
+  drttsmds.cc
+  drttts.cc
+  drttypes.cc
+  drtudis.cc
+  drtvls.cc
+  drtwps.cc
+  drtwrs.cc
+  drtwrsrs.cc
+  drtws.cc
+  drtxrs.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmrt ofstd oflog dcmdata dcmimgle)
index b92237423d1842a094352f671ef9894d0ce6d3ae..cdb051a30bd8e87519beec42c33aea77913a2691 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012-2015, OFFIS e.V.
+ *  Copyright (C) 2012-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -68,7 +68,7 @@ protected:
     {
         unsignedT result;
         if (pixelData_.getPartialValue(&result, OFstatic_cast(Uint32, pixelNumber * sizeof(unsignedT)), OFstatic_cast(Uint32, sizeof(unsignedT))).bad())
-            return -1;
+            return OFstatic_cast(unsignedT, (-1));
         return result;
     }
 
@@ -148,7 +148,7 @@ double DRTDose::getDose(unsigned int x, unsigned int y, unsigned int frame) cons
 OFCondition DRTDose::getDose(double &result, unsigned int x, unsigned int y, unsigned int frame) const
 {
     double gridScaling;
-    double dose;
+    double dose = 0.0;
     OFCondition cond = getDoseGridScaling(gridScaling);
     if (cond.good())
         cond = getUnscaledDose(dose, x, y, frame);
@@ -170,9 +170,10 @@ double DRTDose::getUnscaledDose(unsigned int x, unsigned int y, unsigned int fra
 static OFCondition getImageParameters(const DRTDose& dose, Uint32& frames, Uint16& rows, Uint16& columns, Uint16& bitsAllocated, Uint16& pixelRep)
 {
     OFCondition cond = EC_Normal;
-    Sint32 tmp;
-    Uint16 bitsStored, highBit;
-
+    Sint32 tmp = 0;
+    Uint16 bitsStored = 0;
+    Uint16 highBit = 0;
     // tbd: Would be nice to know which getter failed
     if (cond.good())
         cond = dose.getNumberOfFrames(tmp);
@@ -249,7 +250,7 @@ OFCondition DRTDose::getDoseImage(OFVector<double> &result, unsigned int frame)
     Uint32 frames;
     Uint32 offset, length;
     Uint16 rows, columns, bitsAllocated, pixelRep;
-    double doseGridScaling;
+    double doseGridScaling = 0.0;
     OFCondition cond = EC_Normal;
 
     result.clear();
index ed6c27d85ee1a16ba4a65268c8d25c23b6a84f6a..03feeffe8623d0a0f2fc07cb7878c6e4cf866cce 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *
  *  Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
- *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class DRTAssigningJurisdictionCodeSequence
@@ -16,6 +16,8 @@
 
 #include "dcmtk/dcmrt/seq/drtajcs.h"
 
+#include <cmath>
+
 
 // --- item class ---
 
index 7b31e02279d4e5cbf708c38b751e4b59443f1982..b7c6020540203ebc0d33c3d3333cc9ddb841cb65 100644 (file)
@@ -1,13 +1,14 @@
 /*
  *
  *  Copyright (C) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
- *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class DRTContourSequence
  *
  *  Generated automatically from DICOM PS 3.3-2017e
  *  File created on 2017-12-05 09:30:54
+ *  Last modified on 2021-02-01 by Riesmeier
  *
  */
 
 
 DRTContourSequence::Item::Item(const OFBool emptyDefaultItem)
   : EmptyDefaultItem(emptyDefaultItem),
-    AttachedContours(DCM_AttachedContours),
+    AttachedContours(DCM_RETIRED_AttachedContours),
     ContourData(DCM_ContourData),
     ContourGeometricType(DCM_ContourGeometricType),
     ContourImageSequence(emptyDefaultItem /*emptyDefaultSequence*/),
     ContourNumber(DCM_ContourNumber),
-    ContourOffsetVector(DCM_ContourOffsetVector),
-    ContourSlabThickness(DCM_ContourSlabThickness),
+    ContourOffsetVector(DCM_RETIRED_ContourOffsetVector),
+    ContourSlabThickness(DCM_RETIRED_ContourSlabThickness),
     NumberOfContourPoints(DCM_NumberOfContourPoints)
 {
 }
index eae31b95b4a017074b188fca656fdf6a71b76229..14233d59aeee11b8a1bc73c987886783d8f70fad 100644 (file)
@@ -8,6 +8,7 @@
  *
  *  Generated automatically from DICOM PS 3.3-2017e
  *  File created on 2017-12-05 09:30:54
+ *  Last modified on 2022-01-26 by Riesmeier
  *
  */
 
@@ -156,7 +157,7 @@ DRTIonPlanIOD::DRTIonPlanIOD()
     RTPlanTime(DCM_RTPlanTime),
     TreatmentProtocols(DCM_TreatmentProtocols),
     PlanIntent(DCM_PlanIntent),
-    TreatmentSites(DCM_TreatmentSites),
+    TreatmentSites(DCM_RETIRED_TreatmentSites),
     RTPlanGeometry(DCM_RTPlanGeometry),
     ReferencedStructureSetSequence(),
     ReferencedDoseSequence(),
index b147317a13d95fb63060a6c5ef2691b852dd6034..7ee0a627b71271fdba12ce67631dc41f196584d0 100644 (file)
@@ -8,6 +8,7 @@
  *
  *  Generated automatically from DICOM PS 3.3-2017e
  *  File created on 2017-12-05 09:30:54
+ *  Last modified on 2022-01-26 by Riesmeier
  *
  */
 
@@ -156,7 +157,7 @@ DRTPlanIOD::DRTPlanIOD()
     RTPlanTime(DCM_RTPlanTime),
     TreatmentProtocols(DCM_TreatmentProtocols),
     PlanIntent(DCM_PlanIntent),
-    TreatmentSites(DCM_TreatmentSites),
+    TreatmentSites(DCM_RETIRED_TreatmentSites),
     RTPlanGeometry(DCM_RTPlanGeometry),
     ReferencedStructureSetSequence(),
     ReferencedDoseSequence(),
index b98a8d30846dbf50ede80b06b7e4f584d0a9deb8..3aee4312f240fa57c78d7d5752703e130f00ca10 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *
- *  Copyright (c) 2008-2012, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
- *  Copyright (C) 2013-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (c) 2008-2021, OFFIS e.V. and ICSMED AG, Oldenburg, Germany
+ *  Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class DRTTypes
 
 #include "dcmtk/ofstd/ofstd.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /*------------------------*
  *  constant definitions  *
  *------------------------*/
index 318250056d607fe89622538f36427b3c6a682d8b..4aba331550165b9bbf646522a6b5187ef0a51c6b 100644 (file)
@@ -1,6 +1,10 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(drttest drttest)
-DCMTK_ADD_EXECUTABLE(dcmrt_tests tests tsearch)
+DCMTK_ADD_EXECUTABLE(drttest drttest.cc)
+DCMTK_ADD_EXECUTABLE(dcmrt_tests
+  tests.cc
+  tsearch.cc
+  tcontour.cc
+)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(drttest dcmrt dcmdata oflog ofstd)
index 6c471d3c73046ac064189d0e219116ee2b561631..79f265c290988dfda3ec8f6283cd4c713310d716 100644 (file)
@@ -248,6 +248,207 @@ drttest.o: drttest.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmrt/seq/drtrtrs4.h \
  ../include/dcmtk/dcmrt/seq/drttscds.h \
  ../include/dcmtk/dcmrt/seq/drttsmds.h
+tcontour.o: tcontour.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../../ofstd/include/dcmtk/ofstd/oftest.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexit.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../include/dcmtk/dcmrt/drtstrct.h ../include/dcmtk/dcmrt/drttypes.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpixseq.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdate.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
+ ../../ofstd/include/dcmtk/ofstd/oftime.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrst.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvruc.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrut.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrobow.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpixel.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrpobw.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcovlay.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrat.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrss.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrsv.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvruv.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrfl.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrov.h \
+ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
+ ../include/dcmtk/dcmrt/seq/drtadcs.h ../include/dcmtk/dcmrt/seq/drtecs.h \
+ ../include/dcmtk/dcmrt/seq/drtbrs.h \
+ ../include/dcmtk/dcmrt/seq/drtbrcss.h \
+ ../include/dcmtk/dcmrt/seq/drtcsis.h \
+ ../include/dcmtk/dcmrt/seq/drtcsrs.h \
+ ../include/dcmtk/dcmrt/seq/drtcctus.h \
+ ../include/dcmtk/dcmrt/seq/drtcpis.h ../include/dcmtk/dcmrt/seq/drtics.h \
+ ../include/dcmtk/dcmrt/seq/drtpics.h \
+ ../include/dcmtk/dcmrt/seq/drtcgis.h ../include/dcmtk/dcmrt/seq/drtces.h \
+ ../include/dcmtk/dcmrt/seq/drtois.h \
+ ../include/dcmtk/dcmrt/seq/drtporcs.h \
+ ../include/dcmtk/dcmrt/seq/drtcsas.h \
+ ../include/dcmtk/dcmrt/seq/drtdimcs.h \
+ ../include/dcmtk/dcmrt/seq/drtdcs.h ../include/dcmtk/dcmrt/seq/drtdss.h \
+ ../include/dcmtk/dcmrt/seq/drtdspcs.h \
+ ../include/dcmtk/dcmrt/seq/drteas.h ../include/dcmtk/dcmrt/seq/drtgms.h \
+ ../include/dcmtk/dcmrt/seq/drtgmcs.h \
+ ../include/dcmtk/dcmrt/seq/drtgpis.h \
+ ../include/dcmtk/dcmrt/seq/drtipiqs.h \
+ ../include/dcmtk/dcmrt/seq/drtaadcs.h \
+ ../include/dcmtk/dcmrt/seq/drtafs.h ../include/dcmtk/dcmrt/seq/drtajcs.h \
+ ../include/dcmtk/dcmrt/seq/drthsdrs.h \
+ ../include/dcmtk/dcmrt/seq/drtians.h \
+ ../include/dcmtk/dcmrt/seq/drtiais.h \
+ ../include/dcmtk/dcmrt/seq/drtiseis.h \
+ ../include/dcmtk/dcmrt/seq/drtmps.h ../include/dcmtk/dcmrt/seq/drtmris.h \
+ ../include/dcmtk/dcmrt/seq/drtoas.h ../include/dcmtk/dcmrt/seq/drtmas.h \
+ ../include/dcmtk/dcmrt/seq/drtopis.h \
+ ../include/dcmtk/dcmrt/seq/drtpbcs.h \
+ ../include/dcmtk/dcmrt/seq/drtpsics.h \
+ ../include/dcmtk/dcmrt/seq/drtpscs.h \
+ ../include/dcmtk/dcmrt/seq/drtppcs.h \
+ ../include/dcmtk/dcmrt/seq/drtpcxs.h ../include/dcmtk/dcmrt/seq/drtccs.h \
+ ../include/dcmtk/dcmrt/seq/drtcncs.h \
+ ../include/dcmtk/dcmrt/seq/drtcims.h \
+ ../include/dcmtk/dcmrt/seq/drtmucs.h \
+ ../include/dcmtk/dcmrt/seq/drtrsos.h \
+ ../include/dcmtk/dcmrt/seq/drtporis.h \
+ ../include/dcmtk/dcmrt/seq/drtprsis.h \
+ ../include/dcmtk/dcmrt/seq/drtpsss.h \
+ ../include/dcmtk/dcmrt/seq/drtpdecs.h \
+ ../include/dcmtk/dcmrt/seq/drtdias.h \
+ ../include/dcmtk/dcmrt/seq/drtpdeds.h \
+ ../include/dcmtk/dcmrt/seq/drtpcs.h ../include/dcmtk/dcmrt/seq/drtrcs.h \
+ ../include/dcmtk/dcmrt/seq/drtcs.h ../include/dcmtk/dcmrt/seq/drtcis.h \
+ ../include/dcmtk/dcmrt/seq/drtrros.h \
+ ../include/dcmtk/dcmrt/seq/drtrpps.h \
+ ../include/dcmtk/dcmrt/seq/drtrecs.h \
+ ../include/dcmtk/dcmrt/seq/drtrics.h \
+ ../include/dcmtk/dcmrt/seq/drtsptcs.h \
+ ../include/dcmtk/dcmrt/seq/drtrrs.h \
+ ../include/dcmtk/dcmrt/seq/drtrrros.h \
+ ../include/dcmtk/dcmrt/seq/drtspccs.h \
+ ../include/dcmtk/dcmrt/seq/drtrppcs.h \
+ ../include/dcmtk/dcmrt/seq/drtrfors.h \
+ ../include/dcmtk/dcmrt/seq/drtrsts.h \
+ ../include/dcmtk/dcmrt/seq/drtrses.h \
+ ../include/dcmtk/dcmrt/seq/drtrims.h ../include/dcmtk/dcmrt/seq/drtris.h \
+ ../include/dcmtk/dcmrt/seq/drtrpphs.h \
+ ../include/dcmtk/dcmrt/seq/drtdimrs.h \
+ ../include/dcmtk/dcmrt/seq/drtdirs.h \
+ ../include/dcmtk/dcmrt/seq/drtwrsrs.h \
+ ../include/dcmtk/dcmrt/seq/drtwrs.h ../include/dcmtk/dcmrt/seq/drtxrs.h \
+ ../include/dcmtk/dcmrt/seq/drtrps.h \
+ ../include/dcmtk/dcmrt/seq/drtrppss.h \
+ ../include/dcmtk/dcmrt/seq/drtrsers.h \
+ ../include/dcmtk/dcmrt/seq/drtrss.h ../include/dcmtk/dcmrt/seq/drtrpis.h \
+ ../include/dcmtk/dcmrt/seq/drtras.h \
+ ../include/dcmtk/dcmrt/seq/drtrrpcs.h \
+ ../include/dcmtk/dcmrt/seq/drtrpcs.h \
+ ../include/dcmtk/dcmrt/seq/drtspcs.h \
+ ../include/dcmtk/dcmrt/seq/drtrscs.h \
+ ../include/dcmtk/dcmrt/seq/drtsdcs.h ../include/dcmtk/dcmrt/seq/drtsis.h \
+ ../include/dcmtk/dcmrt/seq/drtsins.h \
+ ../include/dcmtk/dcmrt/seq/drtspgis.h \
+ ../include/dcmtk/dcmrt/seq/drtscs.h ../include/dcmtk/dcmrt/seq/drtsss.h \
+ ../include/dcmtk/dcmrt/seq/drtssrcs.h \
+ ../include/dcmtk/dcmrt/seq/drtssrs.h \
+ ../include/dcmtk/dcmrt/seq/drtscris.h \
+ ../include/dcmtk/dcmrt/seq/drtudis.h
 tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/oftest.h \
  ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
index 63f9b3a09819c7f0c1c1e2a51f0ea69d4c7fbc7e..fc20797e01f10f8246d98a39da3805952560c2ba 100644 (file)
@@ -23,7 +23,7 @@ LIBDIRS = -L$(top_srcdir)/libsrc -L$(dcmimgledir)/libsrc -L$(dcmdatadir)/libsrc
 LOCALLIBS = -ldcmrt -ldcmimgle -ldcmdata -loflog -lofstd \
        $(TIFFLIBS) $(PNGLIBS) $(ZLIBLIBS) $(CHARCONVLIBS) $(MATHLIBS)
 
-test_objs = tests.o tsearch.o
+test_objs = tests.o tsearch.o tcontour.o
 objs = drttest.o $(test_objs)
 progs = drttest tests
 
@@ -40,10 +40,10 @@ install: all
 
 
 check: tests
-       ./tests
+       DCMDICTPATH=../data/dicom.dic ./tests
 
 check-exhaustive: tests
-       ./tests -x
+       DCMDICTPATH=../data/dicom.dic ./tests -x
 
 
 clean:
diff --git a/dcmrt/tests/tcontour.cc b/dcmrt/tests/tcontour.cc
new file mode 100644 (file)
index 0000000..aa6da3e
--- /dev/null
@@ -0,0 +1,62 @@
+/*
+ *
+ *  Copyright (C) 2021, J. Riesmeier, Oldenburg, Germany
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation are maintained by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmrt
+ *
+ *  Author:  Joerg Riesmeier
+ *
+ *  Purpose: test program for adding contour data to an RT Structure Set
+ *
+ */
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+#include "dcmtk/ofstd/oftest.h"
+#include "dcmtk/dcmrt/drtstrct.h"
+
+
+OFTEST(dcmrt_contour)
+{
+    DRTStructureSetIOD structureSet;
+    DRTROIContourSequence &roiContourSequence = structureSet.getROIContourSequence();
+    DRTROIContourSequence::Item *roiContourSequenceItem = NULL;
+
+    // add new item
+    OFCHECK(roiContourSequence.addItem(roiContourSequenceItem).good());
+    if (roiContourSequenceItem != NULL)
+    {
+        DRTContourSequence &contourSequence = roiContourSequenceItem->getContourSequence();
+        DRTContourSequence::Item *contourSequenceItem = NULL;
+        // also add a new item to the nested sub-sequence
+        OFCHECK(contourSequence.addItem(contourSequenceItem).good());
+        if (roiContourSequenceItem != NULL)
+        {
+            // set contour data (dummy values)
+            OFCHECK(contourSequenceItem->setContourData("100\\200\\146\\101\\201\\147").good());
+        }
+    }
+
+    // check if contour data was set correctly
+    OFVector<Float64> contourData;
+    OFCHECK(structureSet.getROIContourSequence().getItem(0).getContourSequence().getItem(0).getContourData(contourData).good());
+    OFCHECK_EQUAL(contourData.size(), 6);
+    if (contourData.size() >= 6)
+    {
+        OFCHECK_EQUAL(contourData.at(0), 100);
+        OFCHECK_EQUAL(contourData.at(1), 200);
+        OFCHECK_EQUAL(contourData.at(2), 146);
+        OFCHECK_EQUAL(contourData.at(3), 101);
+        OFCHECK_EQUAL(contourData.at(4), 201);
+        OFCHECK_EQUAL(contourData.at(5), 147);
+    }
+}
index 40840d2c4c201626a88d066be63ebd3c99da4283..81b771fdf42dee80a5c61f1f2df35e37ed442009 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012-2016, OFFIS e.V.
+ *  Copyright (C) 2012-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -24,4 +24,5 @@
 #include "dcmtk/ofstd/oftest.h"
 
 OFTEST_REGISTER(dcmrt_search);
+OFTEST_REGISTER(dcmrt_contour);
 OFTEST_MAIN("dcmrt")
index 3e825da83b99adcde92953786cda47be6321ad48..9acebb0fcc273b9dc00456ad2f7a2bdbb71f29c4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2022, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -130,6 +130,23 @@ public:
      */
     virtual OFBool getCheckFGOnWrite();
 
+    /** If enabled, dimensions are checked before actual writing.
+     *  This can be very time-consuming if many frames are present.
+     *  Disabling should only be done if the user knows that the functional groups
+     *  are valid, wants to to adapt the functional groups manually after calling
+     *   write() or knows what he's doing otherwise.<br>
+     *  Per default, checking is enabled.
+     *  @param  doCheck If OFTrue, checking will be performed. If OFFalse,
+     *          no checks are performed.
+     */
+    virtual void setCheckDimensionsOnWrite(const OFBool doCheck);
+
+    /** Returns whether dimensions are checked before actual
+     *  writing is performed in the write() method.
+     *  @return OFTrue if checking is performed, OFFalse otherwise
+     */
+    virtual OFBool getCheckDimensionsOnWrite();
+
     // -------------------- creation ---------------------
 
     /** Factory method to create a binary segmentation object from the minimal
@@ -195,7 +212,10 @@ public:
 
     /** Get number of frames, based on the number of items in the shared
      *  functional functional groups sequence (i.e.\ the attribute Number of
-     *  Frames) is not trusted).
+     *  Frames) is not trusted). Note that this returns the numbers of frames
+     *  present in memory. In practice (i.e. for writing later on), the number
+     *  of frames must not exceed 2^31-1 (maximum value of Number of Frames
+     *  attribute, enforced by writing routines).
      *  @return The number of frames handled by this object
      */
     size_t getNumberOfFrames();
@@ -218,7 +238,9 @@ public:
         return this->m_SegmentationFractionalType;
     }
 
-    /** Get the Number of Segments
+    /** Get the Number of Segments. Note that this returns the numbers of Segments
+     *  present in memory. In practice, the number of segments must not exceed
+     *  2^16-1 (enforced by writing routines).
      *  @return The number of segments handled by this object
      */
     size_t getNumberOfSegments();
@@ -266,14 +288,14 @@ public:
      *  @param  segmentNumber The logical segment number
      *  @return The segment if segment number is valid, NULL otherwise
      */
-    virtual DcmSegment* getSegment(const unsigned int segmentNumber);
+    virtual DcmSegment* getSegment(const size_t segmentNumber);
 
     /** Get logical segment number by providing a pointer to a given segment
      *  @param  segment The segment to find the logical segment number for
      *  @param  segmentNumber The segment number. 0 if segment could not be found.
      *  @return OFTrue if segment could be found, OFFalse otherwise.
      */
-    virtual OFBool getSegmentNumber(const DcmSegment* segment, unsigned int& segmentNumber);
+    virtual OFBool getSegmentNumber(const DcmSegment* segment, size_t& segmentNumber);
 
     /** Reference to the Performed Procedure Step that led to the creation of this
      *  segmentation object. This is required if this object is created in an MPPS
@@ -466,11 +488,9 @@ protected:
 
     /** Write fractional frames to given pixel data buffer
      *  @param  pixData The filled pixel data buffer returned by the method
-     *  @param  numFrames The number of frames to write
-     *  @param  pixDataLength The length of buffer in pixData (in bytes) returned by this method.
      *  @return EC_Normal if writing was successful, error otherwise
      */
-    virtual OFCondition writeFractionalFrames(Uint8* pixData, Uint32 numFrames, const size_t pixDataLength);
+    OFCondition writeFractionalFrames(Uint8* pixData);
 
     /** Write binary frames to given given pixel data buffer
      *  @param  pixData The filled pixel data buffer returned by the method
@@ -524,16 +544,16 @@ protected:
      *  @param  colorModel The color model used
      *  @return EC_Normal if reading/checking was successful, error otherwise
      */
-    virtual OFCondition getAndCheckImagePixelAttributes(DcmItem& dataset,
-                                                        Uint16& allocated,
-                                                        Uint16& stored,
-                                                        Uint16& high,
-                                                        Uint16& spp,
-                                                        Uint16& pixelRep,
-                                                        Uint16& rows,
-                                                        Uint16& cols,
-                                                        Uint16& numberOfFrames,
-                                                        OFString& colorModel);
+    OFCondition getAndCheckImagePixelAttributes(DcmItem& dataset,
+                                                Uint16& allocated,
+                                                Uint16& stored,
+                                                Uint16& high,
+                                                Uint16& spp,
+                                                Uint16& pixelRep,
+                                                Uint16& rows,
+                                                Uint16& cols,
+                                                Uint32& numberOfFrames,
+                                                OFString& colorModel);
 
     /** This is the counterpart to the extractFrames() function. It takes a number
      *  of frames that are in binary segmentation format (i.e. "bit-packed") and
@@ -628,7 +648,7 @@ private:
      *  @result OFTrue if length is valid, OFFalse otherwise
      */
     OFBool
-    checkPixDataLength(DcmElement* pixelData, const Uint16 rows, const Uint16 cols, const Uint16& numberOfFrames);
+    checkPixDataLength(DcmElement* pixelData, const Uint16 rows, const Uint16 cols, const Uint32& numberOfFrames);
 
     /** Loads file
      *  @param  dcmff The file format to load into
@@ -667,7 +687,7 @@ private:
      */
     OFCondition readSegmentationType(DcmItem& item);
 
-    /** Decompress the given dataset
+    /** Decompress the given dataset, if compressed in Deflated or RLE transfer syntax.
      *  @param  dset The dataset to be decompressed
      *  @return EC_Normal if decompression worked (or dataset has already been
      *  decompressed), IOD_EC_CannotDecompress otherwise
index f7987c0c9de0446ed4ad849886d75488ceb782b5..5d5ca9c325ea8014a68bb69c1d24402626e9b2ec 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2022, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -58,10 +58,10 @@ public:
      *          successful; memory is allocated by the function
      *  @param  segmentLabel Free text label for the segment
      *  @param  segmentedPropertyCategory The segmented property category.
-     *          Baseline CID 7150 “Segmentation Property Categories” should be
+     *          Baseline CID 7150 "Segmentation Property Categories" should be
      *          used.
      *  @param  segmentedPropertyType The segmented property type. Baseline CID
-     *          7151 “Segmentation Property Types”
+     *          7151 "Segmentation Property Types"
      *  @param  algoType The algorithm type used for segmenting this segment
      *  @param  algoName Algorithm name (required if algoType is not MANUAL)
      *  @return EC_Normal if creation was successful, error otherwise
@@ -97,7 +97,7 @@ public:
     /** Get Segment Number
      *  @return The Segment number
      */
-    virtual unsigned int getSegmentNumber();
+    virtual Uint16 getSegmentNumber();
 
     /** Get Segment Label
      *  @param  value Reference to variable in which the value should be stored
index 450831e87d4b447cd2efa6d6f2f1dca52a9c8e2b..7b6de3adc936408a1914d73eac7910ffcfd8adb9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2020, Open Connections GmbH
+ *  Copyright (C) 2015-2022, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -55,7 +55,12 @@ extern DCMTK_DCMSEG_EXPORT OFLogger DCM_dcmsegLogger;
  *  using an unsigned 16 Bit Integer within "Segment Number" starting with 1.
  *  Thus maximally 65535 segments can be stored.
  */
-const Uint32 DCM_SEG_MAX_SEGMENTS = 65535;
+const Uint16 DCM_SEG_MAX_SEGMENTS = 65535; // 2^16-1
+
+/** Number of frames for Segmentation objects is limited (besides others) by
+ *  the Number of Frames attribute which permits values up to a maximum of 2^31-1.
+ */
+const Uint32 DCM_SEG_MAX_FRAMES = 2147483647; // 2^31-1
 
 /** @name Specific error conditions for module dcmseg
  *  These error codes can be used in addition to the general purpose
@@ -73,6 +78,8 @@ extern DCMTK_DCMSEG_EXPORT const OFConditionConst SG_EC_UnknownSegmentationType;
 extern DCMTK_DCMSEG_EXPORT const OFConditionConst SG_EC_InvalidValue;
 /// error: not enough data
 extern DCMTK_DCMSEG_EXPORT const OFConditionConst SG_EC_NotEnoughData;
+/// error: too many frames
+extern DCMTK_DCMSEG_EXPORT const OFConditionConst SG_EC_MaxFramesReached;
 
 /** General purpose class hiding global functions, constants and types in the
  *  segmentation context from the global namespace.
index a315d5398662ab7244407b0dcd6b2246000d026a..f11bfae3e175ed78b253386af5c6210b3d51f5c5 100644 (file)
@@ -1,4 +1,9 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmseg segdoc segment segtypes segutils)
+DCMTK_ADD_LIBRARY(dcmseg
+  segdoc.cc
+  segment.cc
+  segtypes.cc
+  segutils.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmseg dcmfg dcmiod dcmdata ofstd oflog)
index 230616167d529a5e884d6a8a4131e141c3181fa8..ebe17cb673ae598ad9c6e02c59e33340a27515d9 100644 (file)
@@ -131,13 +131,6 @@ segdoc.o: segdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \
  ../include/dcmtk/dcmseg/segdoc.h \
  ../../dcmfg/include/dcmtk/dcmfg/concatenationloader.h \
- ../../ofstd/include/dcmtk/ofstd/oftuple.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
  ../../dcmfg/include/dcmtk/dcmfg/fginterface.h \
  ../../dcmfg/include/dcmtk/dcmfg/fg.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodimage.h \
@@ -157,10 +150,13 @@ segdoc.o: segdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \
  ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
  ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \
  ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
  ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \
  ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \
@@ -291,13 +287,6 @@ segment.o: segment.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgdefine.h \
  ../../dcmfg/include/dcmtk/dcmfg/concatenationloader.h \
- ../../ofstd/include/dcmtk/ofstd/oftuple.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
  ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgbase.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgtypes.h \
@@ -322,10 +311,13 @@ segment.o: segment.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \
  ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
  ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \
  ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
  ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \
  ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \
index 1489d6779bd52f20cdc52ac162c0340d9d64cbee..d6f786250df808b1278c13a683d43ef74fe04dd9 100644 (file)
@@ -1,6 +1,6 @@
 /*
+ *  Copyright (C) 2015-2022, Open Connections GmbH
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -316,6 +316,16 @@ OFBool DcmSegmentation::getCheckFGOnWrite()
     return m_FGInterface.getCheckOnWrite();
 }
 
+void DcmSegmentation::setCheckDimensionsOnWrite(const OFBool doCheck)
+{
+    m_DimensionModule.setCheckOnWrite(doCheck);
+}
+
+OFBool DcmSegmentation::getCheckDimensionsOnWrite()
+{
+    return m_DimensionModule.getCheckOnWrite();
+}
+
 OFCondition DcmSegmentation::writeWithSeparatePixelData(DcmItem& dataset, Uint8*& pixData, size_t& pixDataLength)
 {
     // FGInterface::write() will know whether it has to check FG structure
@@ -392,14 +402,12 @@ OFCondition DcmSegmentation::writeWithSeparatePixelData(DcmItem& dataset, Uint8*
         if (m_SegmentationType == DcmSegTypes::ST_BINARY)
             result = writeBinaryFrames(pixData, rows, cols, pixDataLength);
         else if (m_SegmentationType == DcmSegTypes::ST_FRACTIONAL)
-            result = writeFractionalFrames(pixData, numFrames, pixDataLength);
+            result = writeFractionalFrames(pixData);
         else
             result = SG_EC_UnknownSegmentationType;
         if (result.bad())
         {
             delete[] pixData;
-            pixData       = NULL;
-            pixDataLength = 0;
         }
     }
 
@@ -455,9 +463,12 @@ OFCondition DcmSegmentation::addSegment(DcmSegment* seg, Uint16& segmentNumber)
 
 OFCondition DcmSegmentation::addFrame(Uint8* pixData)
 {
-    OFCondition result;
+    if (m_Frames.size() >= DCM_SEG_MAX_FRAMES)
+        return SG_EC_MaxFramesReached;
 
-    Uint16 rows, cols;
+    OFCondition result;
+    Uint16 rows = 0;
+    Uint16 cols = 0;
     if (getImagePixel().getRows(rows).good() && getImagePixel().getColumns(cols).good())
     {
         DcmIODTypes::Frame* frame = NULL;
@@ -532,7 +543,7 @@ void DcmSegmentation::getFramesForSegment(const size_t& segmentNumber, OFVector<
         Uint16 refSeg;
         if (fg->getReferencedSegmentNumber(refSeg).good())
         {
-            if (refSeg == segmentNumber)
+            if (OFstatic_cast(size_t, refSeg) == segmentNumber)
             {
                 frameNumbers.push_back(count);
             }
@@ -548,6 +559,9 @@ OFCondition DcmSegmentation::addForAllFrames(const FGBase& group)
 OFCondition
 DcmSegmentation::addFrame(Uint8* pixData, const Uint16 segmentNumber, const OFVector<FGBase*>& perFrameInformation)
 {
+    if (m_Frames.size() >= DCM_SEG_MAX_FRAMES)
+        return SG_EC_MaxFramesReached;
+
     Uint32 frameNo = OFstatic_cast(Uint32, m_Frames.size()); // will be the index of the frame (counted from 0)
     OFCondition result;
 
@@ -726,7 +740,7 @@ OFCondition DcmSegmentation::setContentIdentification(const ContentIdentificatio
 
 /* -- Getter for DICOM attributes -- */
 
-DcmSegment* DcmSegmentation::getSegment(const unsigned int segmentNumber)
+DcmSegment* DcmSegmentation::getSegment(const size_t segmentNumber)
 {
     // check for invalid index
     if ((segmentNumber == 0) || (segmentNumber > m_Segments.size()))
@@ -738,7 +752,7 @@ DcmSegment* DcmSegmentation::getSegment(const unsigned int segmentNumber)
     return m_Segments[segmentNumber - 1];
 }
 
-OFBool DcmSegmentation::getSegmentNumber(const DcmSegment* segment, unsigned int& segmentNumber)
+OFBool DcmSegmentation::getSegmentNumber(const DcmSegment* segment, size_t& segmentNumber)
 {
     segmentNumber = 0;
     size_t max    = m_Segments.size();
@@ -746,8 +760,7 @@ OFBool DcmSegmentation::getSegmentNumber(const DcmSegment* segment, unsigned int
     {
         if (m_Segments.at(count) == segment)
         {
-            // logical segment numbering starts with 1 but vector index with 0
-            segmentNumber = OFstatic_cast(unsigned int, count + 1);
+            segmentNumber = OFstatic_cast(Uint16, count + 1);
             return OFTrue;
         }
     }
@@ -805,9 +818,10 @@ OFCondition DcmSegmentation::readSegments(DcmItem& item)
 OFCondition DcmSegmentation::readFrames(DcmItem& dataset)
 {
     OFCondition result;
-    Uint16 allocated, stored, high, spp, pixelRep, rows, cols, numberOfFrames;
-    allocated = stored = high = spp = rows = cols = numberOfFrames = 0;
-    pixelRep                                                       = 2; // invalid value for this attribute
+    Uint16 allocated, stored, high, spp, pixelRep, rows, cols;
+    Uint32 numberOfFrames = 0;
+    allocated = stored = high = spp = rows = cols = 0;
+    pixelRep                                      = 2; // invalid value for this attribute
     OFString colorModel;
 
     /* check the typical image pixel attributes and get correct(ed) values */
@@ -872,7 +886,7 @@ OFCondition DcmSegmentation::getAndCheckImagePixelAttributes(DcmItem& dataset,
                                                              Uint16& pixelRep,
                                                              Uint16& rows,
                                                              Uint16& cols,
-                                                             Uint16& numberOfFrames,
+                                                             Uint32& numberOfFrames,
                                                              OFString& colorModel)
 {
     OFBool fail = OFFalse;
@@ -910,7 +924,7 @@ OFCondition DcmSegmentation::getAndCheckImagePixelAttributes(DcmItem& dataset,
         }
         else
         {
-            numberOfFrames = OFstatic_cast(Uint16, numFrames);
+            numberOfFrames = OFstatic_cast(Uint32, numFrames);
         }
     }
 
@@ -983,9 +997,12 @@ OFCondition DcmSegmentation::writeDataset(DcmItem& dataset)
     OFCondition result = writeWithSeparatePixelData(dataset, pixData, pixDataLength);
     if (result.good())
     {
+        // Check whether pixel data length exceeds maximum number of bytes for uncompressed pixel data,
+        // enforced by length field of Pixel Data attribute VR OB/OW if written in explicit VR transfer syntax.
         if (pixDataLength <= 4294967294UL)
         {
-            result = dataset.putAndInsertUint8Array(DCM_PixelData, pixData, OFstatic_cast(unsigned long, pixDataLength));
+            result
+                = dataset.putAndInsertUint8Array(DCM_PixelData, pixData, OFstatic_cast(unsigned long, pixDataLength));
         }
         else
         {
@@ -1024,15 +1041,10 @@ OFCondition DcmSegmentation::writeMultiFrameFunctionalGroupsModule(DcmItem& data
 
 OFCondition DcmSegmentation::writeMultiFrameDimensionModule(DcmItem& dataset)
 {
-    OFCondition result = m_DimensionModule.checkDimensions(&dataset);
-    if (result.good())
-    {
-        result = m_DimensionModule.write(dataset);
-    }
-    return result;
+    return m_DimensionModule.write(dataset);
 }
 
-OFCondition DcmSegmentation::writeFractionalFrames(Uint8* pixData, const Uint32 numFrames, const size_t pixDataLength)
+OFCondition DcmSegmentation::writeFractionalFrames(Uint8* pixData)
 {
     OFVector<DcmIODTypes::Frame*>::iterator it = m_Frames.begin();
     // Just copy bytes for each frame as is
@@ -1158,7 +1170,7 @@ void DcmSegmentation::clearData()
 OFBool DcmSegmentation::checkPixDataLength(DcmElement* pixelData,
                                            const Uint16 rows,
                                            const Uint16 cols,
-                                           const Uint16& numberOfFrames)
+                                           const Uint32& numberOfFrames)
 {
     // Get actual length of pixel data in bytes
     size_t length = pixelData->getLengthField();
@@ -1210,7 +1222,7 @@ OFCondition DcmSegmentation::getTotalBytesRequired(const Uint16& rows,
     if (m_SegmentationType == DcmSegTypes::ST_BINARY)
     {
         // check whether the 1-bit pixels exactly fit into bytes
-        remainder = (OFstatic_cast(size_t, rows) * cols) % 8;
+        remainder = bytesRequired % 8;
         // number of bytes that work on an exact fit
         bytesRequired = bytesRequired / 8;
         // add one byte if we have a remainder
@@ -1311,9 +1323,14 @@ OFBool DcmSegmentation::check(const OFBool checkFGStructure)
         DCMSEG_ERROR("No segments defined");
         return OFFalse;
     }
+    if (m_Segments.size() > DCM_SEG_MAX_SEGMENTS)
+    {
+        DCMSEG_ERROR("Too many segments defined");
+        return OFFalse;
+    }
     if (m_Segments.size() > m_Frames.size())
     {
-        DCMSEG_ERROR("There are more segments than frames defined");
+        DCMSEG_ERROR("More segments than frames defined");
         return OFFalse;
     }
 
@@ -1431,7 +1448,7 @@ void DcmSegmentation::concatFrames(OFVector<DcmIODTypes::Frame*> frames, Uint8*
         // previous frame; mask out those bits not belonging to previous frame.
         // This will potentially create some empty bits on the left of the byte,
         // that the current frame can use to store the its own first bits.
-        firstByte = (writePos[0] << freeBits) >> freeBits;
+        firstByte = OFstatic_cast(unsigned char, (writePos[0] << freeBits)) >> freeBits;
         memcpy(writePos, (*frame)->pixData, (*frame)->length);
         // If the previous frame left over some unused bits, shift the current frame
         // that number of bits to the left, and restore the original bits of the
@@ -1461,6 +1478,6 @@ void DcmSegmentation::concatFrames(OFVector<DcmIODTypes::Frame*> frames, Uint8*
     // last byte. Fill them with zeros (though not required by the standard).
     if (freeBits > 0)
     {
-        *writePos = (*writePos >> freeBits) << freeBits;
+        *writePos = (OFstatic_cast(unsigned char, *writePos) >> freeBits) << freeBits;
     }
 }
index 8db7b5fc6b8116593dea709df960e1659f235464..f7741487693bfabc4f157b1cb11db986b89961ce 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2022, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -163,12 +163,21 @@ void DcmSegment::initIODRules()
 
 // -------------- getters --------------------
 
-unsigned int DcmSegment::getSegmentNumber()
+Uint16 DcmSegment::getSegmentNumber()
 {
-    unsigned int value = 0;
+    Uint16 value = 0;
     if (m_SegmentationDoc != NULL)
     {
-        m_SegmentationDoc->getSegmentNumber(this, value);
+        size_t big = 0;
+        m_SegmentationDoc->getSegmentNumber(this, big);
+        if (big <= DCM_SEG_MAX_SEGMENTS)
+        {
+            value = OFstatic_cast(Uint16, big);
+        }
+        else
+        {
+            DCMSEG_ERROR("More segments (" << big << ") defined than permitted (" << DCM_SEG_MAX_SEGMENTS << ")");
+        }
     }
     return value;
 }
index dd1aacce4e143012f4890b05530af436b76ef36f..60adc7987db9c72e40c82cec0a009e724397aaaa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2022, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -38,6 +38,7 @@ makeOFConditionConst(SG_EC_NoSuchSegment, OFM_dcmseg, 2, OF_error, "No such segm
 makeOFConditionConst(SG_EC_UnknownSegmentationType, OFM_dcmseg, 3, OF_error, "Unknown Segmentation Type");
 makeOFConditionConst(SG_EC_InvalidValue, OFM_dcmseg, 4, OF_error, "Invalid value for Segmentation SOP Class");
 makeOFConditionConst(SG_EC_NotEnoughData, OFM_dcmseg, 5, OF_error, "Not enough data");
+makeOFConditionConst(SG_EC_MaxFramesReached, OFM_dcmseg, 6, OF_error, "Maximum Number of Frames reached");
 
 DcmSegTypes::E_SegmentationType DcmSegTypes::OFString2Segtype(const OFString& value)
 {
@@ -329,12 +330,12 @@ OFCondition SegmentedPropertyTypeCodeItem::write(DcmItem& item)
         if (result.good())
         {
             DcmIODUtil::writeSubSequence<OFVector<CodeSequenceMacro*> >(result,
-                                                                        DCM_SegmentedPropertyTypeModifierCodeSequence,
-                                                                        m_SegmentedPropertyTypeModifierCode,
-                                                                        item,
-                                                                        "1-n",
-                                                                        "3",
-                                                                        "SegmentDescriptionMacro");
+                                                                       DCM_SegmentedPropertyTypeModifierCodeSequence,
+                                                                       m_SegmentedPropertyTypeModifierCode,
+                                                                       item,
+                                                                       "1-n",
+                                                                       "3",
+                                                                       "SegmentDescriptionMacro");
         }
     }
     return result;
index 509cf02775f1052d045ac085f5c4d4a0b81f1c9f..aac9e4c98ad8fdab8365087c14af9f37f2c31d4e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, Open Connections GmbH
+ *  Copyright (C) 2015-2022, Open Connections GmbH
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -130,7 +130,7 @@ void DcmSegUtils::alignFrameOnBitPosition(Uint8* buf, const size_t bufLen, const
 {
     if (numBits > 7)
     {
-        DCMSEG_ERROR("Invalid input data: shiftFrameBitsLeft() can only shift 0-7 bits");
+        DCMSEG_ERROR("Invalid input data: alignFrameOnBitPosition() can only shift 0-7 bits");
         return;
     }
     Uint8 carryOver = 0;
@@ -146,7 +146,7 @@ void DcmSegUtils::alignFrameOnBitPosition(Uint8* buf, const size_t bufLen, const
         buf[x] |= carryOver;
         // Compute carry over bits for next byte to be handled, i.e. those bits at the left that will be
         // overwritten in the next byte
-        carryOver = current >> (8 - numBits);
+        carryOver = OFstatic_cast(unsigned char, current) >> (8 - numBits);
     }
 }
 
@@ -167,12 +167,12 @@ void DcmSegUtils::debugDumpBin(Uint8* buffer, size_t length, const char* what)
 
 OFString DcmSegUtils::debugByte2Bin(Uint8 b)
 {
-    OFString result("", 8);
+    OFString result("00000000");
     for (int i = 7; i >= 0; i--)
     {
         result[i] = (b & 1) + '0';
 
-        b >>= 1;
+        b = OFstatic_cast(unsigned char, b) >> 1;
     }
     return result;
 }
index 61b8e20a1dadd67f5eb11dd618cbafc692135f2b..cbdc13de5470f068edd77909fe4fce834f485593 100644 (file)
@@ -1,5 +1,11 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(dcmseg_tests tests tutils troundtrip.cc tconcat_binary)
+DCMTK_ADD_EXECUTABLE(dcmseg_tests
+  tbigdim.cc
+  tests.cc
+  tutils.cc
+  troundtrip.cc
+  tconcat_binary.cc
+)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(dcmseg_tests dcmseg dcmfg dcmiod dcmdata oflog ofstd)
index e10a91ed727243f776f272ea912885648bba8651..60eff3c0739cdd09aa41ce681f8964d555ef4dcc 100644 (file)
@@ -1,3 +1,176 @@
+tbigdim.o: tbigdim.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmseg/segdoc.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrui.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
+ ../../dcmfg/include/dcmtk/dcmfg/concatenationcreator.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdicent.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcmetinf.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdatset.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcfilefo.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdicdir.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdirrec.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrulup.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrul.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpixseq.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdate.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
+ ../../ofstd/include/dcmtk/ofstd/oftime.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrtm.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrpn.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrsh.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrst.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvruc.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrut.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrobow.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpixel.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrpobw.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcovlay.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrat.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrss.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrus.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrsl.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrsv.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvruv.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrfl.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrfd.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrof.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrod.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrol.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrov.h \
+ ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
+ ../../dcmfg/include/dcmtk/dcmfg/fgdefine.h \
+ ../../dcmfg/include/dcmtk/dcmfg/concatenationloader.h \
+ ../../dcmiod/include/dcmtk/dcmiod/iodtypes.h \
+ ../../dcmiod/include/dcmtk/dcmiod/ioddef.h \
+ ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \
+ ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
+ ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \
+ ../../dcmfg/include/dcmtk/dcmfg/fgbase.h \
+ ../../dcmfg/include/dcmtk/dcmfg/fgtypes.h \
+ ../../dcmfg/include/dcmtk/dcmfg/fginterface.h \
+ ../../dcmfg/include/dcmtk/dcmfg/fg.h \
+ ../../dcmiod/include/dcmtk/dcmiod/iodimage.h \
+ ../../dcmiod/include/dcmtk/dcmiod/iodcommn.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modcommoninstanceref.h \
+ ../../dcmiod/include/dcmtk/dcmiod/iodmacro.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modbase.h \
+ ../../dcmiod/include/dcmtk/dcmiod/iodreferences.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modequipment.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modfor.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modgeneralseries.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modgeneralstudy.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modpatient.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modpatientstudy.h \
+ ../../ofstd/include/dcmtk/ofstd/ofoption.h \
+ ../../ofstd/include/dcmtk/ofstd/ofalign.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modsopcommon.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modgeneralimage.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
+ ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modmultiframefg.h \
+ ../../dcmiod/include/dcmtk/dcmiod/modsegmentationseries.h \
+ ../include/dcmtk/dcmseg/segdef.h ../include/dcmtk/dcmseg/segtypes.h \
+ ../include/dcmtk/dcmseg/segment.h \
+ ../../ofstd/include/dcmtk/ofstd/oftest.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconapp.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcmdln.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
+ ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexit.h \
+ ../../dcmfg/include/dcmtk/dcmfg/fgpixmsr.h \
+ ../../dcmfg/include/dcmtk/dcmfg/fgplanor.h \
+ ../../dcmfg/include/dcmtk/dcmfg/fgplanpo.h \
+ ../../dcmfg/include/dcmtk/dcmfg/fgseg.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstrutl.h \
+ ../../ofstd/include/dcmtk/ofstd/oftempf.h
 tconcat_binary.o: tconcat_binary.cc \
  ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmfg/include/dcmtk/dcmfg/concatenationcreator.h \
@@ -121,13 +294,6 @@ tconcat_binary.o: tconcat_binary.cc \
  ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
- ../../ofstd/include/dcmtk/ofstd/oftuple.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
  ../include/dcmtk/dcmseg/segdoc.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgbase.h \
@@ -153,10 +319,13 @@ tconcat_binary.o: tconcat_binary.cc \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \
  ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
  ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \
  ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
  ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \
  ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \
@@ -342,13 +511,6 @@ troundtrip.o: troundtrip.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodutil.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdatutl.h \
  ../../dcmiod/include/dcmtk/dcmiod/iodrules.h \
- ../../ofstd/include/dcmtk/ofstd/oftuple.h \
- ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
- ../../ofstd/include/dcmtk/ofstd/diag/push.def \
- ../../ofstd/include/dcmtk/ofstd/diag/mmtag.def \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefrd.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuple.h \
- ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
  ../../dcmfg/include/dcmtk/dcmfg/fgfracon.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgbase.h \
  ../../dcmfg/include/dcmtk/dcmfg/fgtypes.h \
@@ -373,10 +535,13 @@ troundtrip.o: troundtrip.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelvariant.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixelbase.h \
  ../../ofstd/include/dcmtk/ofstd/ofvriant.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/variant.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/helpers.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/push.def \
  ../../ofstd/include/dcmtk/ofstd/diag/cnvrsn.def \
  ../../ofstd/include/dcmtk/ofstd/diag/vsprfw.def \
+ ../../ofstd/include/dcmtk/ofstd/diag/pop.def \
  ../../dcmiod/include/dcmtk/dcmiod/modenhequipment.h \
  ../../dcmiod/include/dcmtk/dcmiod/modimagepixel.h \
  ../../dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h \
index 55b7bfd77fc341936902e9c45f78eab9349cceb2..ff5eec18b44ef20901e0ef48ee3aaba805fcecce 100644 (file)
@@ -25,7 +25,7 @@ LOCALLIBS = -ldcmseg -ldcmfg -ldcmiod -ldcmdata -loflog -lofstd $(ZLIBLIBS) \
 LOCALINCLUDES = -I$(top_srcdir)/include -I$(ofstddir)/include -I$(oflogdir)/include \
        -I$(dcmdatadir)/include -I$(dcmioddir)/include -I$(dcmfgdir)/include \
 
-test_objs = tconcat_binary.o tests.o troundtrip.o tutils.o
+test_objs = tbigdim.o tconcat_binary.o tests.o troundtrip.o tutils.o
 objs = $(test_objs)
 progs = tests
 
diff --git a/dcmseg/tests/tbigdim.cc b/dcmseg/tests/tbigdim.cc
new file mode 100644 (file)
index 0000000..4dc1c01
--- /dev/null
@@ -0,0 +1,306 @@
+/*
+ *
+ *  Copyright (C) 2022, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  dcmseg
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Test for creating and reading Segmentation with many frames/segments
+ *
+ */
+
+#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
+#include "dcmtk/ofstd/oftest.h"
+#include "dcmtk/dcmseg/segtypes.h" /* for DCMSEG_DEBUG */
+
+#ifdef HAVE_STL_MAP
+#include "dcmtk/dcmseg/segdoc.h"
+#include "dcmtk/dcmseg/segment.h"
+
+#include "dcmtk/dcmfg/fgfracon.h"
+#include "dcmtk/dcmfg/fgpixmsr.h"
+#include "dcmtk/dcmfg/fgplanor.h"
+#include "dcmtk/dcmfg/fgplanpo.h"
+#include "dcmtk/dcmfg/fgseg.h"
+#include "dcmtk/dcmiod/iodmacro.h"
+#include "dcmtk/dcmdata/dcxfer.h"
+#include "dcmtk/ofstd/ofmem.h"
+#include "dcmtk/ofstd/ofstrutl.h"
+#include "dcmtk/ofstd/oftempf.h"
+
+static const Uint8 NUM_ROWS             = 5;
+static const Uint8 NUM_COLS             = 5;
+
+// Restrict to 1.000.000 Frames since the theoretical 2^31-1 number of frames
+// results in too much memory usage and waiting time
+static const Uint32 NUM_FRAMES           = 1000000;
+static const Uint16 NUM_SEGS             = DCM_SEG_MAX_SEGMENTS;
+
+static const Uint8 NUM_PIXELS_PER_FRAME = NUM_COLS * NUM_ROWS;
+
+static DcmSegmentation* create();
+static void setGenericValues(DcmSegmentation* seg);
+static void addSharedFGs(DcmSegmentation* seg);
+static void addSegments(DcmSegmentation* seg);
+static void addFrames(DcmSegmentation* seg);
+static void addDimensions(DcmSegmentation* seg);
+static void checkCreatedObject(DcmDataset& seg);
+
+OFTEST_FLAGS(dcmseg_bigdim, EF_Slow)
+{
+    // Make sure data dictionary is loaded
+    if (!dcmDataDict.isDictionaryLoaded())
+    {
+        OFCHECK_FAIL("no data dictionary loaded, check environment variable: " DCM_DICT_ENVIRONMENT_VARIABLE);
+        return;
+    }
+
+    // Creation
+    DcmSegmentation* seg = create();
+    setGenericValues(seg);
+    addSharedFGs(seg);
+    addSegments(seg);
+    addFrames(seg);
+    addDimensions(seg);
+
+    // Write to dataset and compare its dump with expected result
+    DcmFileFormat dcmff;
+    DcmDataset* ds = dcmff.getDataset();
+    seg->setCheckDimensionsOnWrite(OFFalse);
+    seg->setCheckFGOnWrite(OFFalse);
+    OFCondition result = seg->writeDataset(*ds);
+    OFCHECK(result.good());
+
+    // Save to disk, and re-load to test import
+    OFTempFile tf;
+    OFString temp_fn = tf.getFilename();
+    OFCHECK(!temp_fn.empty());
+    OFCHECK(dcmff.saveFile(temp_fn.c_str(), EXS_LittleEndianExplicit).good());
+
+    // Read object from dataset into DcmSegmentation object, write again to dataset and
+    // check whether object after writing is identical to object after writing.
+    // the same expected result
+    delete seg;
+    seg = NULL;
+    DcmSegmentation::loadFile(temp_fn, seg).good();
+    OFCHECK(seg != OFnullptr);
+    if (seg)
+    {
+        DcmDataset dset;
+        seg->setCheckDimensionsOnWrite(OFFalse);
+        seg->setCheckFGOnWrite(OFFalse);
+        OFCHECK(seg->writeDataset(dset).good());
+        checkCreatedObject(dset);
+        delete seg;
+    }
+}
+
+static DcmSegmentation* create()
+{
+    IODGeneralEquipmentModule::EquipmentInfo eq("Open Connections", "OC CT", "4711", "0.1");
+    ContentIdentificationMacro ci("1", "LABEL", "DESCRIPTION", "Doe^John");
+    DcmSegmentation* seg = NULL;
+    OFCondition result;
+    DcmSegmentation::createFractionalSegmentation(seg, NUM_ROWS, NUM_COLS, DcmSegTypes::SFT_OCCUPANCY, 255, eq, ci);
+    OFCHECK(result.good());
+    OFCHECK(seg != OFnullptr);
+    seg->setCheckFGOnWrite(OFFalse);
+    seg->setCheckDimensionsOnWrite(OFFalse);
+    return seg;
+}
+
+static void setGenericValues(DcmSegmentation* seg)
+{
+    if (!seg)
+        return;
+    OFCHECK(seg->getPatient().setPatientName("Bond^James").good());
+    OFCHECK(seg->getPatient().setPatientID("007").good());
+    OFCHECK(seg->getPatient().setPatientBirthDate("19771007").good());
+    OFCHECK(seg->getStudy().setStudyDate("20190801").good());
+    OFCHECK(seg->getStudy().setStudyTime("120000").good());
+    OFCHECK(seg->getStudy().setStudyID("1").good());
+    OFCHECK(seg->getPatientStudy().setPatientAge("040Y").good());
+    OFCHECK(seg->getSeries().setSeriesDescription("Test Description").good());
+    OFCHECK(seg->getSeries().setSeriesNumber("1").good());
+    OFCHECK(seg->getSeries().setPatientPosition("HFS").good());
+
+    // Those values are usually computed automatically. UIDS are generated and date/times are set to current values.
+    // But in order to compare the "old" dump with the freshly created image attributes, we set some values manually,
+    // so that they are not overwritten with new, automatically created values later.
+    OFCHECK(seg->getStudy().setStudyInstanceUID("1.2.276.0.7230010.3.1.2.8323329.14863.1565940357.864811").good());
+    OFCHECK(seg->getFrameOfReference().setFrameOfReferenceUID("2.25.30853397773651184949181049330553108086").good());
+    OFCHECK(seg->getSeries().setSeriesInstanceUID("1.2.276.0.7230010.3.1.3.8323329.14863.1565940357.864812").good());
+    OFCHECK(seg->getSOPCommon().setSOPInstanceUID("1.2.276.0.7230010.3.1.4.8323329.14863.1565940357.864813").good());
+    OFCHECK(seg->getGeneralImage().setContentDate("20190927").good());
+    OFCHECK(seg->getGeneralImage().setContentTime("153857").good());
+}
+
+static void addSharedFGs(DcmSegmentation* seg)
+{
+    if (!seg)
+        return;
+
+    FGPixelMeasures meas;
+    OFCHECK(meas.setPixelSpacing("0.1\\0.1").good());
+    OFCHECK(meas.setSliceThickness("1.0").good());
+    OFCHECK(meas.setSpacingBetweenSlices("0.05").good());
+
+    FGPlanePosPatient planpo;
+    OFCHECK(planpo.setImagePositionPatient("0.0", "0.0", "0.0").good());
+
+    FGPlaneOrientationPatient planor;
+    OFCHECK(planor.setImageOrientationPatient("1.0", "0.0", "0.0", "0.0", "1.0", "0.0").good());
+
+    OFCHECK(seg->addForAllFrames(meas).good());
+    OFCHECK(seg->addForAllFrames(planpo).good());
+    OFCHECK(seg->addForAllFrames(planor).good());
+}
+
+
+
+static void addSegments(DcmSegmentation* seg)
+{
+    for (Uint16 s = 0; s < NUM_SEGS; s++)
+    {
+        DcmSegment* segment = NULL;
+        CodeSequenceMacro category("85756007", "SCT", "Tissue");
+        CodeSequenceMacro propType("51114001", "SCT", "Artery");
+        char buf[100];
+        sprintf(buf, "SEGLABEL_%hu", s);
+        OFCHECK(DcmSegment::create(segment, buf, category, propType, DcmSegTypes::SAT_AUTOMATIC, "OC_DUMMY")
+                    .good());
+        OFCHECK(segment != OFnullptr);
+        Uint16 dontCare = 0;
+        OFCHECK(seg->addSegment(segment, dontCare).good());
+    }
+}
+
+
+static void addFrames(DcmSegmentation* seg)
+{
+    if (!seg)
+        return;
+
+    FGSegmentation* fg_seg = new FGSegmentation();
+    FGFrameContent* fg     = new FGFrameContent();
+    OFCHECK(fg && fg_seg);
+    fg->setStackID("1");
+    if (fg)
+    {
+        for (Uint32 frameNo = 1; frameNo <= NUM_FRAMES; frameNo++)
+        {
+            // Frame Acqusition Number is set to the current frame number. Since attribute is 16 bits
+            // only (but optional), this is only done as long as frame number is within 16 bit range.
+            if (frameNo <= DCM_SEG_MAX_SEGMENTS)
+                OFCHECK(fg->setFrameAcquisitionNumber(OFstatic_cast(Uint16, frameNo)).good());
+            OFCHECK(fg->setFrameReferenceDateTime("20190816092557").good());
+            OFCHECK(fg->setFrameAcquisitionDateTime("20190816092557").good());
+            OFCHECK(fg->setFrameAcquisitionDuration(0.001).good());
+            OFCHECK(fg->setInStackPositionNumber(frameNo).good());
+            OFCHECK(fg->setDimensionIndexValues(1, 0).good());
+            OFCHECK(fg->setDimensionIndexValues(frameNo, 1).good());
+            OFVector<FGBase*> groups;
+            groups.push_back(fg);
+
+            Uint8* data = new Uint8[NUM_PIXELS_PER_FRAME];
+            for (Uint8 i = 0; i < NUM_PIXELS_PER_FRAME; ++i)
+            {
+                data[i] = i;
+            }
+            OFCHECK(fg_seg->setReferencedSegmentNumber(frameNo % (DCM_SEG_MAX_SEGMENTS + 1)).good()); // limit/loop to 16 bit
+            OFVector<FGBase*> perFrameFGs;
+            perFrameFGs.push_back(fg);
+            perFrameFGs.push_back(fg_seg);
+            OFCHECK(seg->addFrame(data, frameNo % (DCM_SEG_MAX_SEGMENTS + 1), perFrameFGs).good());
+            delete[] data;
+        }
+    }
+    delete fg;
+    delete fg_seg;
+}
+
+static void addDimensions(DcmSegmentation* seg)
+{
+    if (!seg)
+        return;
+    IODMultiframeDimensionModule& dims = seg->getDimensions();
+    OFCHECK(dims.addDimensionIndex(
+                    DCM_StackID, "2.25.30855560781715986879861690673941231222", DCM_FrameContentSequence, "STACK_DIM")
+                .good());
+    OFCHECK(dims.addDimensionIndex(DCM_InStackPositionNumber,
+                                   "2.25.30855560781715986879861690673941231222",
+                                   DCM_FrameContentSequence,
+                                   "STACK_DIM")
+                .good());
+    OFunique_ptr<IODMultiframeDimensionModule::DimensionOrganizationItem> org(
+        new IODMultiframeDimensionModule::DimensionOrganizationItem);
+    if (org)
+    {
+        org->setDimensionOrganizationUID("2.25.30855560781715986879861690673941231222");
+        dims.getDimensionOrganizationSequence().push_back(org.release());
+    }
+}
+
+
+static void checkCreatedObject(DcmDataset& dset)
+{
+    OFString str;
+    Sint32 sint32;
+
+    dset.findAndGetSint32(DCM_NumberOfFrames, sint32);
+    OFCHECK(NUM_FRAMES == sint32);
+
+    DcmElement *elem = NULL;
+    OFCHECK(dset.findAndGetElement(DCM_PixelData, elem).good());
+    if (elem != OFnullptr)
+    {
+        unsigned long count = 0;
+        const Uint8* pixData = NULL;
+        OFCHECK(dset.findAndGetUint8Array(DCM_PixelData, pixData, &count).good());
+        OFCHECK(count == NUM_FRAMES * NUM_PIXELS_PER_FRAME);
+        for (size_t p = 0; p < count; p++)
+        {
+            OFCHECK(pixData[p] == p % (NUM_PIXELS_PER_FRAME));
+        }
+    }
+    DcmSequenceOfItems *seq = NULL;
+    OFCHECK(dset.findAndGetSequence(DCM_PerFrameFunctionalGroupsSequence, seq).good());
+    if (seq != NULL)
+    {
+        size_t card = seq->card();
+        OFCHECK(card == NUM_FRAMES);
+        DcmItem* item = seq->getItem(0);
+        for (size_t n = 0; (n < card) && (item != NULL); n++)
+        {
+            DcmItem* fgItem = NULL;
+            OFCHECK(item->findAndGetSequenceItem(DCM_SegmentIdentificationSequence, fgItem, 0).good());
+            if (item != NULL)
+            {
+                Uint16 segNum = 0;
+                OFCHECK(fgItem->findAndGetUint16(DCM_ReferencedSegmentNumber, segNum).good());
+                OFCHECK(segNum == ((n + 1) % (DCM_SEG_MAX_SEGMENTS + 1)));
+
+            }
+            item = OFstatic_cast(DcmItem*, seq->nextInContainer(item));
+        }
+    }
+}
+#else
+
+// Dummy version of the test case. Needed to prevent ctest test failure.
+OFTEST(dcmseg_bigdim)
+{
+    DCMSEG_DEBUG("Will not run dcmseg_bigdim test: std::map support (HAVE_STL_MAP) must be defined to complete the test in acceptable time");
+}
+
+#endif // HAVE_STL_MAP
index e9cb54e1e1262c93308e607b5b3d3d861c8689e6..f992abd0f54b71216cbd6e0de8ea8d3c4019aed4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, OFFIS e.V.
+ *  Copyright (C) 2015-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -23,6 +23,7 @@
 
 #include "dcmtk/ofstd/oftest.h"
 
+OFTEST_REGISTER(dcmseg_bigdim);
 OFTEST_REGISTER(dcmseg_utils);
 OFTEST_REGISTER(dcmseg_roundtrip);
 OFTEST_REGISTER(dcmseg_concat_binary);
index 472eaf1ef31f995a0ff9144c26f72045c70b6097..91e567e842b851d0dc550ebb5e9fde90df26e579 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019-2020, OFFIS e.V.
+ *  Copyright (C) 2019-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -31,6 +31,7 @@
 #include "dcmtk/dcmfg/fgplanpo.h"
 #include "dcmtk/dcmfg/fgseg.h"
 #include "dcmtk/dcmiod/iodmacro.h"
+#include "dcmtk/dcmdata/dcxfer.h"
 #include "dcmtk/ofstd/ofmem.h"
 #include "dcmtk/ofstd/ofstrutl.h"
 #include "dcmtk/ofstd/oftempf.h"
@@ -285,6 +286,7 @@ static void checkConcatenationInstance(size_t numInstance, DcmSegmentation* srcI
 {
     DcmSegmentation* concat = NULL;
     OFCHECK(DcmSegmentation::loadDataset(*concatInstance, concat).good());
+    if (concat == NULL) return; // loadDataset() failed, we cannot continue
     size_t numFrames;
     numFrames = concat->getNumberOfFrames();
     OFCHECK(numFrames == 1);
@@ -327,7 +329,7 @@ static void checkConcatenationInstance(size_t numInstance, DcmSegmentation* srcI
             && (cShared == concat->getFunctionalGroups().getShared()->end()));
     DcmSequenceOfItems* cPerFrame = NULL;
     OFCHECK(concatInstance->findAndGetSequence(DCM_PerFrameFunctionalGroupsSequence, cPerFrame).good());
-    OFCHECK(cPerFrame->card() == 1);
+    OFCHECK(cPerFrame && (cPerFrame->card() == 1));
 
     OFBool perFrame = OFFalse;
     FGBase* fg      = concat->getFunctionalGroups().get(0, DcmFGTypes::EFG_FRAMECONTENT, perFrame);
@@ -406,7 +408,11 @@ static void prepareExpectedDump()
 {
     EXPECTED_DUMP = "\n";
     EXPECTED_DUMP += "# Dicom-Data-Set\n";
-    EXPECTED_DUMP += "# Used TransferSyntax: Little Endian Explicit\n";
+    // DcmDataset.print() produces dumps in local endianess, so make sure the dump reflects the current machine
+    if (gLocalByteOrder == EBO_LittleEndian)
+        EXPECTED_DUMP += "# Used TransferSyntax: Little Endian Explicit\n";
+    else
+        EXPECTED_DUMP += "# Used TransferSyntax: Big Endian Explicit\n";
     EXPECTED_DUMP += "(0008,0008) CS [DERIVED\\PRIMARY]                        #  16, 2 ImageType\n";
     EXPECTED_DUMP += "(0008,0016) UI =SegmentationStorage                     #  28, 1 SOPClassUID\n";
     EXPECTED_DUMP
index 2ac47a80fa57215d50865bf46b5b1abc12ef61ef..ab0f15c4e6910137f65ada3a4d9366d5bcb78efc 100644 (file)
@@ -1,6 +1,6 @@
 # declare directories containing used libraries
 # declare executables
-DCMTK_ADD_EXECUTABLE(dcmsign dcmsign)
+DCMTK_ADD_EXECUTABLE(dcmsign dcmsign.cc)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(dcmsign dcmdsig dcmdata oflog ofstd)
index 7b05d8817974cafd59c370a9555d96d2c11fd531..f6f54c5f16c1d2eb0c37b4878ae832abd7b7d8fb 100644 (file)
@@ -1,5 +1,4 @@
 dcmsign.o: dcmsign.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/cmdlnarg.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -8,6 +7,7 @@ dcmsign.o: dcmsign.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -58,12 +58,10 @@ dcmsign.o: dcmsign.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsign/sibrsapr.h ../include/dcmtk/dcmsign/siautopr.h \
  ../include/dcmtk/dcmsign/sicreapr.h ../include/dcmtk/dcmsign/sisrpr.h \
  ../include/dcmtk/dcmsign/sisrvpr.h ../include/dcmtk/dcmsign/simac.h \
- ../include/dcmtk/dcmsign/simd5.h ../include/dcmtk/dcmsign/sisha1.h \
- ../include/dcmtk/dcmsign/sisha256.h ../include/dcmtk/dcmsign/sisha384.h \
- ../include/dcmtk/dcmsign/sisha512.h ../include/dcmtk/dcmsign/siripemd.h \
- ../include/dcmtk/dcmsign/siprivat.h ../include/dcmtk/dcmsign/sicert.h \
- ../include/dcmtk/dcmsign/sitsfs.h ../include/dcmtk/dcmsign/sitstamp.h \
- ../include/dcmtk/dcmsign/sicertvf.h \
+ ../include/dcmtk/dcmsign/simdmac.h ../include/dcmtk/dcmsign/siprivat.h \
+ ../include/dcmtk/dcmsign/sicert.h ../include/dcmtk/dcmsign/sitsfs.h \
+ ../include/dcmtk/dcmsign/sitstamp.h ../include/dcmtk/dcmsign/sicertvf.h \
+ ../include/dcmtk/dcmsign/siexit.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcswap.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
index ce5317ab0e9a492657530a8348cfbf370581bf8b..f7067b73ccb1211a53bc595b155aeb3f2744df32 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2020, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
 
 #include "dcmtk/dcmdata/cmdlnarg.h"
 #include "dcmtk/oflog/oflog.h"
@@ -54,12 +49,7 @@ static char rcsid[] = "$dcmtk: " OFFIS_CONSOLE_APPLICATION " v"
 #include "dcmtk/dcmsign/sisrpr.h"
 #include "dcmtk/dcmsign/sisrvpr.h"
 #include "dcmtk/dcmsign/simac.h"
-#include "dcmtk/dcmsign/simd5.h"
-#include "dcmtk/dcmsign/sisha1.h"
-#include "dcmtk/dcmsign/sisha256.h"
-#include "dcmtk/dcmsign/sisha384.h"
-#include "dcmtk/dcmsign/sisha512.h"
-#include "dcmtk/dcmsign/siripemd.h"
+#include "dcmtk/dcmsign/simdmac.h"
 #include "dcmtk/dcmsign/siprivat.h"
 #include "dcmtk/dcmsign/sicert.h"
 #include "dcmtk/dcmsign/sitsfs.h"
@@ -553,35 +543,35 @@ int main(int argc, char *argv[])
     if (cmd.findOption("--mac-ripemd160"))
     {
       app.checkDependence("--mac-ripemd160", "--sign or --sign-item", (opt_operation == DSO_sign) || (opt_operation == DSO_signItem));
-      opt_mac = new SiRIPEMD160();
+      opt_mac = new SiMDMAC(EMT_RIPEMD160);
     }
     if (cmd.findOption("--mac-sha1"))
     {
       app.checkDependence("--mac-sha1", "--sign or --sign-item", (opt_operation == DSO_sign) || (opt_operation == DSO_signItem));
-      opt_mac = new SiSHA1();
+      opt_mac = new SiMDMAC(EMT_SHA1);
     }
     if (cmd.findOption("--mac-md5"))
     {
       app.checkDependence("--mac-md5", "--sign or --sign-item", (opt_operation == DSO_sign) || (opt_operation == DSO_signItem));
-      opt_mac = new SiMD5();
+      opt_mac = new SiMDMAC(EMT_MD5);
     }
     if (cmd.findOption("--mac-sha256"))
     {
       app.checkDependence("--mac-sha256", "--sign or --sign-item", (opt_operation == DSO_sign) || (opt_operation == DSO_signItem));
-      opt_mac = new SiSHA256();
+      opt_mac = new SiMDMAC(EMT_SHA256);
     }
     if (cmd.findOption("--mac-sha384"))
     {
       app.checkDependence("--mac-sha384", "--sign or --sign-item", (opt_operation == DSO_sign) || (opt_operation == DSO_signItem));
-      opt_mac = new SiSHA384();
+      opt_mac = new SiMDMAC(EMT_SHA384);
     }
     if (cmd.findOption("--mac-sha512"))
     {
       app.checkDependence("--mac-sha512", "--sign or --sign-item", (opt_operation == DSO_sign) || (opt_operation == DSO_signItem));
-      opt_mac = new SiSHA512();
+      opt_mac = new SiMDMAC(EMT_SHA512);
     }
     cmd.endOptionBlock();
-    if (opt_mac == NULL) opt_mac = new SiRIPEMD160();
+    if (opt_mac == NULL) opt_mac = new SiMDMAC(EMT_RIPEMD160);
 
     cmd.beginOptionBlock();
     if (cmd.findOption("--no-sig-purpose"))
@@ -867,11 +857,11 @@ int main(int argc, char *argv[])
   }
 
 cleanup:
-
   delete opt_timeStamp;
   delete opt_mac;
   delete opt_profile;
   delete opt_tagList;
+  DcmSignature::cleanupLibrary();
   return result;
 }
 
index ceb1766dcc64335aeb37f040ce1d7c1307882515..5cd097d1666ff1bc49e4fc197433607184800d5f 100644 (file)
@@ -582,6 +582,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dcmsign_copyright COPYRIGHT
 
-Copyright (C) 2000-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2000-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 114029b7dfe3b2c9b75662d038b8f1890028d700..cce07e813b0ff28d3864b6b531518a68374b963e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2019, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -31,9 +31,6 @@
 #include "dcmtk/dcmdata/dcxfer.h"    /* for E_TransferSyntax */
 #include "dcmtk/dcmsign/sipurpos.h"  /* for E_SignaturePurposeType */
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 class DcmAttributeTag;
 class DcmDateTime;
 class DcmItem;
@@ -64,6 +61,11 @@ public:
    */
   static void initializeLibrary();
 
+  /** cleans up the dcmsign library including the underlying OpenSSL library.
+   *  this method should be called by main() before program end to avoid memory leaks.
+   */
+  static void cleanupLibrary();
+
   /// default constructor
   DcmSignature();
 
@@ -333,6 +335,7 @@ private:
 
   /// pointer to certified timestamp for currently selected signature item
   SiTimeStamp *selectedTimestamp;
+
 };
 
 #endif
index 4aefc687ef5834f5888f6e686d9df76e464325a5..bf3dfbc42ae910fead39790bffae16d6cf08c875 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2019, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -134,11 +134,11 @@ public:
   long getCertKeyBits();
 
   /** returns the name of the elliptic curve used in the certificate.
-   *  @return NULL if the certificate is not of elliptic curve type,
+   *  @return empty string if the certificate is not of elliptic curve type,
    *    "unnamed curve" if the curve name has not been stored in the certificate,
    *    or the short name of the elliptic curve if available.
    */
-  const char *getCertCurveName();
+  OFString getCertCurveName();
 
   /** checks if the length of the public key in the certificate is too short
    *  and must be considered weak. Currently, an RSA or DSA key with less than
index 59ea7e319ae5a7a5b8c15b5a8cd1f295a576f8d6..c636fbd9b777c4f0c7328bba063261eec5fae2a3 100644 (file)
@@ -52,7 +52,7 @@ public:
 
   /** loads a certificate from a file and adds it to the pool of trusted certificates.
    *  @param fileName path to the certificate file
-   *  @param filetype file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1
+   *  @param fileType file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1
    *  @return SI_EC_Normal if successful, an error code otherwise
    */
   virtual OFCondition addTrustedCertificateFile(const char *fileName, int fileType);
@@ -69,8 +69,8 @@ public:
 
   /** loads all files as certificates from the specified directory and adds them
    *  to the pool of trusted certificates.
-   *  @param fileName path to the directory containing certificate files
-   *  @param filetype file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1
+   *  @param pathName path to the directory containing certificate files
+   *  @param fileType file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1
    *  @return SI_EC_Normal if successful, an error code otherwise
    */
   virtual OFCondition addTrustedCertificateDir(const char *pathName, int fileType);
@@ -78,7 +78,7 @@ public:
   /** loads a certificate revocation list (CRL) in X.509 format from a file and
    *  adds it to the pool of trusted certificates and CRLs.
    *  @param fileName path to the CRL file
-   *  @param filetype file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1
+   *  @param fileType file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1
    *  @return SI_EC_Normal if successful, an error code otherwise
    */
   virtual OFCondition addCertificateRevocationList(const char *fileName, int fileType);
diff --git a/dcmsign/include/dcmtk/dcmsign/sidsa.h b/dcmsign/include/dcmtk/dcmsign/sidsa.h
deleted file mode 100644 (file)
index 4dc5ac1..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- *
- *  Copyright (C) 1998-2019, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiDSA
- *
- */
-
-#ifndef SIDSA_H
-#define SIDSA_H
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/sialgo.h"
-#include "dcmtk/ofstd/oftypes.h"
-
-class SiPrivateKey;
-struct dsa_st;
-typedef struct dsa_st DSA;
-
-/** 
- *  This class implements the DSA public key crypto algorithms.
- *  @remark This class is only available if DCMTK is compiled with
- *  OpenSSL support enabled.
- */
-
-class DCMTK_DCMSIGN_EXPORT SiDSA : public SiAlgorithm
-{   
-public:
-
-  /** constructor
-   *  @param pointer to public DSA key
-   */
-  SiDSA(DSA *key);
-
-  /// destructor
-  virtual ~SiDSA();
-
-  /** creates a signature.
-   *  @param inputHash array of hash key bytes that are to be signed
-   *  @param inputHashSize length of hash key array in bytes
-   *  @param inputHashAlgorithm MAC algorithm used for creation of hash key. Ignored for DSA signatures.
-   *  @param outputSignature pointer to array of at least getSize() which must be allocated by caller.
-   *  @param outputSignatureSize returns the number of bytes written to outputSignature.
-   *  @return SI_EC_Normal if successful, errorcode otherwise.
-   */
-  virtual OFCondition sign(
-    const unsigned char *inputHash, 
-    unsigned long inputHashSize,
-    E_MACType inputHashAlgorithm,
-    unsigned char *outputSignature,
-    unsigned long &outputSignatureSize);
-
-  /** verifies a signature.
-   *  @param inputHash array of bytes containing hash key to be verified against signature
-   *  @param inputHashSize length of hash key array in bytes
-   *  @param inputHashAlgorithm MAC algorithm used for creation of hash key. Ignored for DSA signatures.
-   *  @param inputSignature array of bytes containing signature to be verified
-   *  @param inputSignatureSize length of signature array in bytes
-   *  @param verified returns whether the signature was successfully verified
-   *  @return SI_EC_Normal if successful, errorcode otherwise.
-   */
-  virtual OFCondition verify(
-    const unsigned char *inputHash, 
-    unsigned long inputHashSize,
-    E_MACType inputHashAlgorithm,
-    const unsigned char *inputSignature,
-    unsigned long inputSignatureSize,
-    OFBool &verified);
-
-  /** returns the size of a block of encrypted/decrypted ciphertext in bytes.
-   *  The result depends on the public key algorithm, key size and padding scheme.
-   *  In general the input to decrypt() or encrypt() must be less than or equal
-   *  to this block size.  The output of decrypt() or encrypt() is always equal
-   *  to this block size.
-   *  @return block size for this public key cryptosystem and key
-   */
-  virtual unsigned long getSize() const;
-
-  /** returns the type of public key algorithm computed by this object
-   *  @return type of public key algorithm
-   */
-  virtual E_KeyType keyType() const;    
-
-private:
-
-  /// private undefined copy constructor
-  SiDSA(SiDSA& arg);
-
-  /// private undefined copy assignment operator
-  SiDSA& operator=(SiDSA& arg);
-
-  /// DSA key used for signature/verification
-  DSA *dsa;
-
-};
-
-#endif
-#endif
diff --git a/dcmsign/include/dcmtk/dcmsign/siecdsa.h b/dcmsign/include/dcmtk/dcmsign/siecdsa.h
deleted file mode 100644 (file)
index 4883cd6..0000000
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- *
- *  Copyright (C) 1998-2019, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiDSA
- *
- */
-
-#ifndef SIECDSA_H
-#define SIECDSA_H
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/sialgo.h"
-#include "dcmtk/ofstd/oftypes.h"
-
-class SiPrivateKey;
-struct ec_key_st;
-typedef struct ec_key_st EC_KEY;
-
-/**
- *  This class implements the ECDSA public key crypto algorithms.
- *  @remark This class is only available if DCMTK is compiled with
- *  OpenSSL support enabled.
- */
-
-class DCMTK_DCMSIGN_EXPORT SiECDSA : public SiAlgorithm
-{
-public:
-
-  /** constructor
-   *  @param pointer to public ECDSA key
-   */
-  SiECDSA(EC_KEY *key);
-
-  /// destructor
-  virtual ~SiECDSA();
-
-  /** creates a signature.
-   *  @param inputHash array of hash key bytes that are to be signed
-   *  @param inputHashSize length of hash key array in bytes
-   *  @param inputHashAlgorithm MAC algorithm used for creation of hash key. Ignored for ECDSA signatures.
-   *  @param outputSignature pointer to array of at least getSize() which must be allocated by caller.
-   *  @param outputSignatureSize returns the number of bytes written to outputSignature.
-   *  @return SI_EC_Normal if successful, errorcode otherwise.
-   */
-  virtual OFCondition sign(
-    const unsigned char *inputHash,
-    unsigned long inputHashSize,
-    E_MACType inputHashAlgorithm,
-    unsigned char *outputSignature,
-    unsigned long &outputSignatureSize);
-
-  /** verifies a signature.
-   *  @param inputHash array of bytes containing hash key to be verified against signature
-   *  @param inputHashSize length of hash key array in bytes
-   *  @param inputHashAlgorithm MAC algorithm used for creation of hash key. Ignored for ECDSA signatures.
-   *  @param inputSignature array of bytes containing signature to be verified
-   *  @param inputSignatureSize length of signature array in bytes
-   *  @param verified returns whether the signature was successfully verified
-   *  @return SI_EC_Normal if successful, errorcode otherwise.
-   */
-  virtual OFCondition verify(
-    const unsigned char *inputHash,
-    unsigned long inputHashSize,
-    E_MACType inputHashAlgorithm,
-    const unsigned char *inputSignature,
-    unsigned long inputSignatureSize,
-    OFBool &verified);
-
-  /** returns the size of a block of encrypted/decrypted ciphertext in bytes.
-   *  The result depends on the public key algorithm, key size and padding scheme.
-   *  In general the input to decrypt() or encrypt() must be less than or equal
-   *  to this block size.  The output of decrypt() or encrypt() is always equal
-   *  to this block size.
-   *  @return block size for this public key cryptosystem and key
-   */
-  virtual unsigned long getSize() const;
-
-  /** returns the type of public key algorithm computed by this object
-   *  @return type of public key algorithm
-   */
-  virtual E_KeyType keyType() const;
-
-private:
-
-  /// private undefined copy constructor
-  SiECDSA(SiECDSA& arg);
-
-  /// private undefined copy assignment operator
-  SiECDSA& operator=(SiECDSA& arg);
-
-  /// ECDSA key used for signature/verification
-  EC_KEY *ecdsa;
-
-};
-
-#endif
-#endif
index fe0eda80e9a9514a796ee03e03921b1a67836e56..3e22fa8f777eab57cf837e6b862d2e0882b9eade 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2019, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -32,9 +32,6 @@
 #include "dcmtk/dcmdata/dcxfer.h"    /* for E_TransferSyntax */
 #include "dcmtk/dcmdata/dcdeftag.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 class SiMAC;
 class DcmItem;
 class DcmElement;
diff --git a/dcmsign/include/dcmtk/dcmsign/simd5.h b/dcmsign/include/dcmtk/dcmsign/simd5.h
deleted file mode 100644 (file)
index 1ccaa43..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- *
- *  Copyright (C) 1998-2019, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiMD5
- *
- */
-
-#ifndef SIMD5_H
-#define SIMD5_H
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/simac.h"
-#include "dcmtk/dcmsign/sitypes.h"
-
-struct MD5state_st;
-typedef struct MD5state_st MD5_CTX;
-
-/**
- * a class implementing the hash function MD5
- * @remark this class is only available if DCMTK is compiled with
- * OpenSSL support enabled.
- */
-class DCMTK_DCMSIGN_EXPORT SiMD5 : public SiMAC
-{
-public:
-  /// default constructor
-  SiMD5();
-
-  /// destructor
-  virtual ~SiMD5();
-
-  /** initializes the MAC algorithm.
-   *  @return status code
-   */
-  virtual OFCondition initialize();
-
-  /** feeds data into the MAC algorithm
-   *  @param data pointer to raw data to be fed into the MAC, must not be NULL
-   *  @param length number of bytes in raw data array
-   *  @return status code
-   */
-  virtual OFCondition digest(const unsigned char *data, unsigned long length);
-
-  /** finalizes the MAC and writes it to the given output array,
-   *  which must be at least getSize() bytes large.
-   *  After a call to finalize, the MAC algorithm must be initialized
-   *  again, see initialize().
-   *  @param result pointer to array of getSize() bytes into which the MAC is written
-   *  @return status code
-   */
-  virtual OFCondition finalize(unsigned char *result);
-
-  /** returns the size of a MAC in bytes.
-   *  @return block size for this MAC algorithm
-   */
-  virtual unsigned long getSize() const;
-
-  /** returns the type of MAC algorithm computed by this object
-   *  @return type of MAC algorithm
-   */
-  virtual E_MACType macType() const;
-
-  /** returns the DICOM identifier for this MAC algorithm
-   *  @return DICOM defined term for algorithm
-   */
-  virtual const char *getDefinedTerm() const;
-
-private:
-
-  /// private undefined copy constructor
-  SiMD5(SiMD5& arg);
-
-  /// private undefined copy assignment operator
-  SiMD5& operator=(SiMD5& arg);
-
-  /// OpenSSL MD5 context
-  MD5_CTX *ctx;
-};
-
-#endif
-#endif
diff --git a/dcmsign/include/dcmtk/dcmsign/simdmac.h b/dcmsign/include/dcmtk/dcmsign/simdmac.h
new file mode 100644 (file)
index 0000000..61d23b3
--- /dev/null
@@ -0,0 +1,112 @@
+/*
+ *
+ *  Copyright (C) 1998-2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module: dcmsign
+ *
+ *  Author: Norbert Loxen, Marco Eichelberg
+ *
+ *  Purpose:
+ *    classes: SiMDMAC
+ *
+ */
+
+#ifndef SIMDMAC_H
+#define SIMDMAC_H
+
+#include "dcmtk/config/osconfig.h"
+
+#ifdef WITH_OPENSSL
+
+#include "dcmtk/dcmsign/simac.h"
+#include "dcmtk/dcmsign/sitypes.h"
+
+BEGIN_EXTERN_C
+#include <openssl/opensslv.h>
+END_EXTERN_C
+
+#ifndef HAVE_OPENSSL_DECLARATION_NEW_EVP_MD_CTX
+struct env_md_ctx_st;
+typedef struct env_md_ctx_st EVP_MD_CTX;
+#else
+struct evp_md_ctx_st;
+typedef struct evp_md_ctx_st EVP_MD_CTX;
+#endif
+
+/**
+ * a class implementing all supported hash functions using the OpenSSL EVP_MD high level API.
+ * @remark this class is only available if DCMTK is compiled with
+ * OpenSSL support enabled.
+ */
+class DCMTK_DCMSIGN_EXPORT SiMDMAC : public SiMAC
+{
+public:
+  /// default constructor
+  SiMDMAC(E_MACType mactype);
+
+  /// destructor
+  virtual ~SiMDMAC();
+
+  /** initializes the MAC algorithm.
+   *  @return status code
+   */
+  virtual OFCondition initialize();
+
+  /** feeds data into the MAC algorithm
+   *  @param data pointer to raw data to be fed into the MAC, must not be NULL
+   *  @param length number of bytes in raw data array
+   *  @return status code
+   */
+  virtual OFCondition digest(const unsigned char *data, unsigned long length);
+
+  /** finalizes the MAC and writes it to the given output array,
+   *  which must be at least getSize() bytes large.
+   *  After a call to finalize, the MAC algorithm must be initialized
+   *  again, see initialize().
+   *  @param result pointer to array of getSize() bytes into which the MAC is written
+   *  @return status code
+   */
+  virtual OFCondition finalize(unsigned char *result);
+
+  /** returns the size of a MAC in bytes.
+   *  @return block size for this MAC algorithm
+   */
+  virtual unsigned long getSize() const;
+
+  /** returns the type of MAC algorithm computed by this object
+   *  @return type of MAC algorithm
+   */
+  virtual E_MACType macType() const;
+
+  /** returns the DICOM identifier for this MAC algorithm
+   *  @return DICOM defined term for algorithm
+   */
+  virtual const char *getDefinedTerm() const;
+
+private:
+
+  /// private undefined copy constructor
+  SiMDMAC(SiMDMAC& arg);
+
+  /// private undefined copy assignment operator
+  SiMDMAC& operator=(SiMDMAC& arg);
+
+  /// OpenSSL MAC context
+  EVP_MD_CTX *ctx;
+
+  /// MAC type
+  E_MACType macType_;
+
+};
+
+#endif
+#endif
diff --git a/dcmsign/include/dcmtk/dcmsign/sipkey.h b/dcmsign/include/dcmtk/dcmsign/sipkey.h
new file mode 100644 (file)
index 0000000..0d0f636
--- /dev/null
@@ -0,0 +1,121 @@
+/*
+ *
+ *  Copyright (C) 1998-2020, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module: dcmsign
+ *
+ *  Author: Norbert Loxen, Marco Eichelberg
+ *
+ *  Purpose:
+ *    classes: SiPKEY
+ *
+ */
+
+#ifndef SIPKEY_H
+#define SIPKEY_H
+
+#include "dcmtk/config/osconfig.h"
+
+#ifdef WITH_OPENSSL
+
+#include "dcmtk/dcmsign/sialgo.h"
+#include "dcmtk/ofstd/oftypes.h"
+
+class SiPrivateKey;
+struct evp_pkey_st;
+typedef struct evp_pkey_st EVP_PKEY;
+
+/**
+ *  This class implements all supported public key crypto algorithms
+ *  using the OpenSSL EVP_PKEY high level API.
+ *  @remark this class is only available if DCMTK is compiled with
+ *  OpenSSL support enabled.
+ */
+
+class DCMTK_DCMSIGN_EXPORT SiPKEY : public SiAlgorithm
+{
+public:
+
+  /** constructor
+   *  @param key pointer to public or private key
+   *  @param owned if true, ownership of the key is transferred to the SiPKEY instance
+   */
+  SiPKEY(EVP_PKEY *key, OFBool owned);
+
+  /// destructor
+  virtual ~SiPKEY();
+
+  /** creates a signature.
+   *  @param inputHash array of hash key bytes that are to be signed
+   *  @param inputHashSize length of hash key array in bytes
+   *  @param inputHashAlgorithm MAC algorithm used for creation of hash key.
+   *    Required for creation of PKCS#1 RSA signature padding.
+   *  @param outputSignature pointer to array of at least getSize() which must be allocated by caller.
+   *  @param outputSignatureSize returns the number of bytes written to outputSignature.
+   *  @return SI_EC_Normal if successful, errorcode otherwise.
+   */
+  virtual OFCondition sign(
+    const unsigned char *inputHash,
+    unsigned long inputHashSize,
+    E_MACType inputHashAlgorithm,
+    unsigned char *outputSignature,
+    unsigned long &outputSignatureSize);
+
+  /** verifies a signature.
+   *  @param inputHash array of bytes containing hash key to be verified against signature
+   *  @param inputHashSize length of hash key array in bytes
+   *  @param inputHashAlgorithm MAC algorithm used for creation of hash key.
+   *    Required for creation of PKCS#1 RSA signature padding.
+   *  @param inputSignature array of bytes containing signature to be verified
+   *  @param inputSignatureSize length of signature array in bytes
+   *  @param verified returns whether the signature was successfully verified
+   *  @return SI_EC_Normal if successful, errorcode otherwise.
+   */
+  virtual OFCondition verify(
+    const unsigned char *inputHash,
+    unsigned long inputHashSize,
+    E_MACType inputHashAlgorithm,
+    const unsigned char *inputSignature,
+    unsigned long inputSignatureSize,
+    OFBool &verified);
+
+  /** returns the size of a block of encrypted/decrypted ciphertext in bytes.
+   *  The result depends on the public key algorithm, key size and padding scheme.
+   *  In general the input to decrypt() or encrypt() must be less than or equal
+   *  to this block size.  The output of decrypt() or encrypt() is always equal
+   *  to this block size.
+   *  @return block size for this public key cryptosystem and key
+   */
+  virtual unsigned long getSize() const;
+
+  /** returns the type of public key algorithm computed by this object
+   *  @return type of public key algorithm
+   */
+  virtual E_KeyType keyType() const;
+
+private:
+
+  /// private undefined copy constructor
+  SiPKEY(SiPKEY& arg);
+
+  /// private undefined copy assignment operator
+  SiPKEY& operator=(SiPKEY& arg);
+
+  /// key used for signature/verification
+  EVP_PKEY *signing_key;
+
+  /// indicates if the signing key object is owned by this instance.
+  OFBool owned_;
+};
+
+#endif
+#endif
diff --git a/dcmsign/include/dcmtk/dcmsign/siripemd.h b/dcmsign/include/dcmtk/dcmsign/siripemd.h
deleted file mode 100644 (file)
index 3381bda..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- *
- *  Copyright (C) 1998-2019, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Norbert Loxen, Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiRIPEMD160
- *
- */
-
-#ifndef SIRIPEMD_H
-#define SIRIPEMD_H
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/simac.h"
-#include "dcmtk/dcmsign/sitypes.h"
-
-struct RIPEMD160state_st;
-typedef struct RIPEMD160state_st RIPEMD160_CTX;
-
-/**
- * a class implementing the hash function RIPEMD160
- * @remark this class is only available if DCMTK is compiled with
- * OpenSSL support enabled.
- */
-class DCMTK_DCMSIGN_EXPORT SiRIPEMD160 : public SiMAC
-{
-public:
-  /// default constructor
-  SiRIPEMD160();
-
-  /// destructor
-  virtual ~SiRIPEMD160();
-
-  /** initializes the MAC algorithm.
-   *  @return status code
-   */
-  virtual OFCondition initialize();
-
-  /** feeds data into the MAC algorithm
-   *  @param data pointer to raw data to be fed into the MAC, must not be NULL
-   *  @param length number of bytes in raw data array
-   *  @return status code
-   */
-  virtual OFCondition digest(const unsigned char *data, unsigned long length);
-
-  /** finalizes the MAC and writes it to the given output array,
-   *  which must be at least getSize() bytes large.
-   *  After a call to finalize, the MAC algorithm must be initialized
-   *  again, see initialize().
-   *  @param result pointer to array of getSize() bytes into which the MAC is written
-   *  @return status code
-   */
-  virtual OFCondition finalize(unsigned char *result);
-
-  /** returns the size of a MAC in bytes.
-   *  @return block size for this MAC algorithm
-   */
-  virtual unsigned long getSize() const;
-
-  /** returns the type of MAC algorithm computed by this object
-   *  @return type of MAC algorithm
-   */
-  virtual E_MACType macType() const;
-
-  /** returns the DICOM identifier for this MAC algorithm
-   *  @return DICOM defined term for algorithm
-   */
-  virtual const char *getDefinedTerm() const;
-
-private:
-
-  /// private undefined copy constructor
-  SiRIPEMD160(SiRIPEMD160& arg);
-
-  /// private undefined copy assignment operator
-  SiRIPEMD160& operator=(SiRIPEMD160& arg);
-
-  /// OpenSSL RIPEMD 160 context
-  RIPEMD160_CTX *ctx;
-};
-
-#endif
-#endif
diff --git a/dcmsign/include/dcmtk/dcmsign/sirsa.h b/dcmsign/include/dcmtk/dcmsign/sirsa.h
deleted file mode 100644 (file)
index 7e08958..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
- *
- *  Copyright (C) 1998-2019, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Norbert Loxen, Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiRSA
- *
- */
-
-#ifndef SIRSA_H
-#define SIRSA_H
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/sialgo.h"
-#include "dcmtk/ofstd/oftypes.h"
-
-class SiPrivateKey;
-struct rsa_st;
-typedef struct rsa_st RSA;
-
-/** 
- *  This class implements the RSA public key crypto algorithms.
- *  @remark this class is only available if DCMTK is compiled with
- *  OpenSSL support enabled.
- */
-
-class DCMTK_DCMSIGN_EXPORT SiRSA : public SiAlgorithm
-{   
-public:
-
-  /** constructor
-   *  @param pointer to public RSA key
-   */
-  SiRSA(RSA *key);
-  
-  /// destructor
-  virtual ~SiRSA();
-
-  /** creates a signature.
-   *  @param inputHash array of hash key bytes that are to be signed
-   *  @param inputHashSize length of hash key array in bytes
-   *  @param inputHashAlgorithm MAC algorithm used for creation of hash key.
-   *    Required for creation of PKCS#1 RSA signature padding.
-   *  @param outputSignature pointer to array of at least getSize() which must be allocated by caller.
-   *  @param outputSignatureSize returns the number of bytes written to outputSignature.
-   *  @return SI_EC_Normal if successful, errorcode otherwise.
-   */
-  virtual OFCondition sign(
-    const unsigned char *inputHash, 
-    unsigned long inputHashSize,
-    E_MACType inputHashAlgorithm,
-    unsigned char *outputSignature,
-    unsigned long &outputSignatureSize);
-
-  /** verifies a signature.
-   *  @param inputHash array of bytes containing hash key to be verified against signature
-   *  @param inputHashSize length of hash key array in bytes
-   *  @param inputHashAlgorithm MAC algorithm used for creation of hash key.
-   *    Required for creation of PKCS#1 RSA signature padding.
-   *  @param inputSignature array of bytes containing signature to be verified
-   *  @param inputSignatureSize length of signature array in bytes
-   *  @param verified returns whether the signature was successfully verified
-   *  @return SI_EC_Normal if successful, errorcode otherwise.
-   */
-  virtual OFCondition verify(
-    const unsigned char *inputHash, 
-    unsigned long inputHashSize,
-    E_MACType inputHashAlgorithm,
-    const unsigned char *inputSignature,
-    unsigned long inputSignatureSize,
-    OFBool &verified);
-
-  /** returns the size of a block of encrypted/decrypted ciphertext in bytes.
-   *  The result depends on the public key algorithm, key size and padding scheme.
-   *  In general the input to decrypt() or encrypt() must be less than or equal
-   *  to this block size.  The output of decrypt() or encrypt() is always equal
-   *  to this block size.
-   *  @return block size for this public key cryptosystem and key
-   */
-  virtual unsigned long getSize() const;
-
-  /** returns the type of public key algorithm computed by this object
-   *  @return type of public key algorithm
-   */
-  virtual E_KeyType keyType() const;    
-
-private:
-
-  /// private undefined copy constructor
-  SiRSA(SiRSA& arg);
-
-  /// private undefined copy assignment operator
-  SiRSA& operator=(SiRSA& arg);
-
-  /// RSA key used for signature/verification
-  RSA *rsa;
-
-};
-
-#endif
-#endif
diff --git a/dcmsign/include/dcmtk/dcmsign/sisha1.h b/dcmsign/include/dcmtk/dcmsign/sisha1.h
deleted file mode 100644 (file)
index db58e2f..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- *
- *  Copyright (C) 1998-2019, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Norbert Loxen, Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiSHA1
- *
- */
-
-#ifndef SISHA1_H
-#define SISHA1_H
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/simac.h"
-#include "dcmtk/dcmsign/sitypes.h"
-
-struct SHAstate_st;
-typedef struct SHAstate_st SHA_CTX;
-
-/**
- * a class implementing the hash function SHA1
- * @remark this class is only available if DCMTK is compiled with
- * OpenSSL support enabled.
- */
-class DCMTK_DCMSIGN_EXPORT SiSHA1 : public SiMAC
-{
-public:
-  /// default constructor
-  SiSHA1();
-
-  /// destructor
-  virtual ~SiSHA1();
-
-  /** initializes the MAC algorithm.
-   *  @return status code
-   */
-  virtual OFCondition initialize();
-
-  /** feeds data into the MAC algorithm
-   *  @param data pointer to raw data to be fed into the MAC, must not be NULL
-   *  @param length number of bytes in raw data array
-   *  @return status code
-   */
-  virtual OFCondition digest(const unsigned char *data, unsigned long length);
-
-  /** finalizes the MAC and writes it to the given output array,
-   *  which must be at least getSize() bytes large.
-   *  After a call to finalize, the MAC algorithm must be initialized
-   *  again, see initialize().
-   *  @param result pointer to array of getSize() bytes into which the MAC is written
-   *  @return status code
-   */
-  virtual OFCondition finalize(unsigned char *result);
-
-  /** returns the size of a MAC in bytes.
-   *  @return block size for this MAC algorithm
-   */
-  virtual unsigned long getSize() const;
-
-  /** returns the type of MAC algorithm computed by this object
-   *  @return type of MAC algorithm
-   */
-  virtual E_MACType macType() const;
-
-  /** returns the DICOM identifier for this MAC algorithm
-   *  @return DICOM defined term for algorithm
-   */
-  virtual const char *getDefinedTerm() const;
-
-private:
-
-  /// private undefined copy constructor
-  SiSHA1(SiSHA1& arg);
-
-  /// private undefined copy assignment operator
-  SiSHA1& operator=(SiSHA1& arg);
-
-  /// OpenSSL SHA1 context
-  SHA_CTX *ctx;
-};
-
-#endif
-#endif
diff --git a/dcmsign/include/dcmtk/dcmsign/sisha256.h b/dcmsign/include/dcmtk/dcmsign/sisha256.h
deleted file mode 100644 (file)
index a891587..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *
- *  Copyright (C) 2016-2018, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiSHA256
- *
- */
-
-#ifndef SISHA256_H
-#define SISHA256_H
-
-#include "dcmtk/config/osconfig.h"
-#include "dcmtk/dcmsign/simac.h"
-#include "dcmtk/dcmsign/sitypes.h"
-
-#ifdef WITH_OPENSSL
-
-struct SHA256state_st;
-typedef struct SHA256state_st SHA256_CTX;
-
-/**
- * a class implementing the hash function SHA256
- * @remark this class is only available if DCMTK is compiled with
- * OpenSSL support enabled.
- */
-class DCMTK_DCMSIGN_EXPORT SiSHA256 : public SiMAC
-{
-public:
-  /// default constructor
-  SiSHA256();
-
-  /// destructor
-  virtual ~SiSHA256();
-
-  /** initializes the MAC algorithm.
-   *  @return status code
-   */
-  virtual OFCondition initialize();
-
-  /** feeds data into the MAC algorithm
-   *  @param data pointer to raw data to be fed into the MAC, must not be NULL
-   *  @param length number of bytes in raw data array
-   *  @return status code
-   */
-  virtual OFCondition digest(const unsigned char *data, unsigned long length);
-
-  /** finalizes the MAC and writes it to the given output array,
-   *  which must be at least getSize() bytes large.
-   *  After a call to finalize, the MAC algorithm must be initialized
-   *  again, see initialize().
-   *  @param result pointer to array of getSize() bytes into which the MAC is written
-   *  @return status code
-   */
-  virtual OFCondition finalize(unsigned char *result);
-
-  /** returns the size of a MAC in bytes.
-   *  @return block size for this MAC algorithm
-   */
-  virtual unsigned long getSize() const;
-
-  /** returns the type of MAC algorithm computed by this object
-   *  @return type of MAC algorithm
-   */
-  virtual E_MACType macType() const;
-
-  /** returns the DICOM identifier for this MAC algorithm
-   *  @return DICOM defined term for algorithm
-   */
-  virtual const char *getDefinedTerm() const;
-
-private:
-
-  /// private undefined copy constructor
-  SiSHA256(SiSHA256& arg);
-
-  /// private undefined copy assignment operator
-  SiSHA256& operator=(SiSHA256& arg);
-
-  /// OpenSSL SHA256 context
-  SHA256_CTX *ctx;
-};
-
-#endif
-#endif
diff --git a/dcmsign/include/dcmtk/dcmsign/sisha384.h b/dcmsign/include/dcmtk/dcmsign/sisha384.h
deleted file mode 100644 (file)
index fef7f8c..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *
- *  Copyright (C) 2016-2018, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiSHA384
- *
- */
-
-#ifndef SISHA384_H
-#define SISHA384_H
-
-#include "dcmtk/config/osconfig.h"
-#include "dcmtk/dcmsign/simac.h"
-#include "dcmtk/dcmsign/sitypes.h"
-
-#ifdef WITH_OPENSSL
-
-struct SHA512state_st;
-typedef struct SHA512state_st SHA512_CTX;
-
-/**
- * a class implementing the hash function SHA384
- * @remark this class is only available if DCMTK is compiled with
- * OpenSSL support enabled.
- */
-class DCMTK_DCMSIGN_EXPORT SiSHA384 : public SiMAC
-{
-public:
-  /// default constructor
-  SiSHA384();
-
-  /// destructor
-  virtual ~SiSHA384();
-
-  /** initializes the MAC algorithm.
-   *  @return status code
-   */
-  virtual OFCondition initialize();
-
-  /** feeds data into the MAC algorithm
-   *  @param data pointer to raw data to be fed into the MAC, must not be NULL
-   *  @param length number of bytes in raw data array
-   *  @return status code
-   */
-  virtual OFCondition digest(const unsigned char *data, unsigned long length);
-
-  /** finalizes the MAC and writes it to the given output array,
-   *  which must be at least getSize() bytes large.
-   *  After a call to finalize, the MAC algorithm must be initialized
-   *  again, see initialize().
-   *  @param result pointer to array of getSize() bytes into which the MAC is written
-   *  @return status code
-   */
-  virtual OFCondition finalize(unsigned char *result);
-
-  /** returns the size of a MAC in bytes.
-   *  @return block size for this MAC algorithm
-   */
-  virtual unsigned long getSize() const;
-
-  /** returns the type of MAC algorithm computed by this object
-   *  @return type of MAC algorithm
-   */
-  virtual E_MACType macType() const;
-
-  /** returns the DICOM identifier for this MAC algorithm
-   *  @return DICOM defined term for algorithm
-   */
-  virtual const char *getDefinedTerm() const;
-
-private:
-
-  /// private undefined copy constructor
-  SiSHA384(SiSHA384& arg);
-
-  /// private undefined copy assignment operator
-  SiSHA384& operator=(SiSHA384& arg);
-
-  /// OpenSSL SHA384 context
-  SHA512_CTX *ctx;
-};
-
-#endif
-#endif
diff --git a/dcmsign/include/dcmtk/dcmsign/sisha512.h b/dcmsign/include/dcmtk/dcmsign/sisha512.h
deleted file mode 100644 (file)
index 19b05e8..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- *
- *  Copyright (C) 2016-2018, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiSHA512
- *
- */
-
-#ifndef SISHA512_H
-#define SISHA512_H
-
-#include "dcmtk/config/osconfig.h"
-#include "dcmtk/dcmsign/simac.h"
-#include "dcmtk/dcmsign/sitypes.h"
-
-#ifdef WITH_OPENSSL
-
-struct SHA512state_st;
-typedef struct SHA512state_st SHA512_CTX;
-
-/**
- * a class implementing the hash function SHA512
- * @remark this class is only available if DCMTK is compiled with
- * OpenSSL support enabled.
- */
-class DCMTK_DCMSIGN_EXPORT SiSHA512 : public SiMAC
-{
-public:
-  /// default constructor
-  SiSHA512();
-
-  /// destructor
-  virtual ~SiSHA512();
-
-  /** initializes the MAC algorithm.
-   *  @return status code
-   */
-  virtual OFCondition initialize();
-
-  /** feeds data into the MAC algorithm
-   *  @param data pointer to raw data to be fed into the MAC, must not be NULL
-   *  @param length number of bytes in raw data array
-   *  @return status code
-   */
-  virtual OFCondition digest(const unsigned char *data, unsigned long length);
-
-  /** finalizes the MAC and writes it to the given output array,
-   *  which must be at least getSize() bytes large.
-   *  After a call to finalize, the MAC algorithm must be initialized
-   *  again, see initialize().
-   *  @param result pointer to array of getSize() bytes into which the MAC is written
-   *  @return status code
-   */
-  virtual OFCondition finalize(unsigned char *result);
-
-  /** returns the size of a MAC in bytes.
-   *  @return block size for this MAC algorithm
-   */
-  virtual unsigned long getSize() const;
-
-  /** returns the type of MAC algorithm computed by this object
-   *  @return type of MAC algorithm
-   */
-  virtual E_MACType macType() const;
-
-  /** returns the DICOM identifier for this MAC algorithm
-   *  @return DICOM defined term for algorithm
-   */
-  virtual const char *getDefinedTerm() const;
-
-private:
-
-  /// private undefined copy constructor
-  SiSHA512(SiSHA512& arg);
-
-  /// private undefined copy assignment operator
-  SiSHA512& operator=(SiSHA512& arg);
-
-  /// OpenSSL SHA512 context
-  SHA512_CTX *ctx;
-};
-
-#endif
-#endif
index 69d1e54d0c32d6bb53ed93930a412673008bf967..5190fa1f2c85de8452ab5c344d068ef5d44645b8 100644 (file)
@@ -58,7 +58,7 @@ public:
   virtual OFBool isAllowableMACType(E_MACType macType) const = 0;
 
   /** checks whether the given MAC object can be used with this security profile.
-   *  @param macType object to be checked
+   *  @param mac macType object to be checked
    *  @return true if object is allowable for this profile, false otherwise.
    */
   virtual OFBool isAllowableMAC(const SiMAC& mac) const;
index db078fe1283c6ee207987bc6e7217d1c63d172ea..7bb4257de3a808a12701717a6e52fc044518346c 100644 (file)
@@ -1,9 +1,26 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(
-  dcmdsig dcsighlp dcsignat siautopr sibrsapr sicert sicertvf sicreapr
-  sidsa siecdsa simaccon simd5 sinullpr siprivat sipurpos siripemd sirsa
-  sisha1 sisprof sisrpr sisrvpr sitstamp sitypes sisha256 sisha384
-  sisha512 sitsfs)
+DCMTK_ADD_LIBRARY(dcmdsig
+  dcsighlp.cc
+  dcsignat.cc
+  siautopr.cc
+  sibrsapr.cc
+  sicert.cc
+  sicertvf.cc
+  sicreapr.cc
+  simaccon.cc
+  simdmac.cc
+  sinullpr.cc
+  sipkey.cc
+  siprivat.cc
+  sipurpos.cc
+  sisprof.cc
+  sisrpr.cc
+  sisrvpr.cc
+  sitsfs.cc
+  sitstamp.cc
+  sitypes.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmdsig ofstd dcmdata)
 DCMTK_TARGET_LINK_LIBRARIES(dcmdsig ${OPENSSL_LIBS})
+set_property(TARGET dcmdsig PROPERTY OUTPUT_NAME "dcmdsig${DCMTK_TLS_LIBRARY_POSTFIX}")
index e60234d7b65790d9935bd666f4a90fc6eefa2195..42e6e64fcc816c4c05fd98b29006ec9a17c9d6bb 100644 (file)
@@ -68,7 +68,8 @@ dcsighlp.o: dcsighlp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsign/sicreapr.h ../include/dcmtk/dcmsign/sibrsapr.h \
  ../include/dcmtk/dcmsign/siautopr.h ../include/dcmtk/dcmsign/sisrvpr.h \
  ../include/dcmtk/dcmsign/sisrpr.h \
- ../../ofstd/include/dcmtk/ofstd/ofexit.h
+ ../../ofstd/include/dcmtk/ofstd/ofexit.h \
+ ../include/dcmtk/dcmsign/siexit.h
 dcsignat.o: dcsignat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsign/dcsignat.h ../include/dcmtk/dcmsign/sitypes.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -144,11 +145,9 @@ dcsignat.o: dcsignat.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsign/simac.h ../include/dcmtk/dcmsign/simaccon.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrmb.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h \
- ../include/dcmtk/dcmsign/simd5.h ../include/dcmtk/dcmsign/siprivat.h \
- ../include/dcmtk/dcmsign/siripemd.h ../include/dcmtk/dcmsign/sisha1.h \
- ../include/dcmtk/dcmsign/sisha256.h ../include/dcmtk/dcmsign/sisha384.h \
- ../include/dcmtk/dcmsign/sisha512.h ../include/dcmtk/dcmsign/sisprof.h \
- ../include/dcmtk/dcmsign/sitstamp.h ../include/dcmtk/dcmsign/sitsfs.h
+ ../include/dcmtk/dcmsign/siprivat.h ../include/dcmtk/dcmsign/simdmac.h \
+ ../include/dcmtk/dcmsign/sisprof.h ../include/dcmtk/dcmsign/sitstamp.h \
+ ../include/dcmtk/dcmsign/sitsfs.h
 siautopr.o: siautopr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsign/siautopr.h ../include/dcmtk/dcmsign/sibrsapr.h \
  ../include/dcmtk/dcmsign/sisprof.h ../include/dcmtk/dcmsign/sitypes.h \
@@ -287,9 +286,8 @@ sicert.o: sicert.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/logmacro.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../include/dcmtk/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sirsa.h \
- ../include/dcmtk/dcmsign/sialgo.h ../include/dcmtk/dcmsign/sidsa.h \
- ../include/dcmtk/dcmsign/siecdsa.h \
+ ../include/dcmtk/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sipkey.h \
+ ../include/dcmtk/dcmsign/sialgo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
@@ -412,82 +410,6 @@ sicreapr.o: sicreapr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h
-sidsa.o: sidsa.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmsign/sidsa.h ../include/dcmtk/dcmsign/sialgo.h \
- ../include/dcmtk/dcmsign/sitypes.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../oflog/include/dcmtk/oflog/oflog.h \
- ../../oflog/include/dcmtk/oflog/logger.h \
- ../../oflog/include/dcmtk/oflog/config.h \
- ../../oflog/include/dcmtk/oflog/config/defines.h \
- ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
- ../../oflog/include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../oflog/include/dcmtk/oflog/tstring.h \
- ../../oflog/include/dcmtk/oflog/tchar.h \
- ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
- ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../../oflog/include/dcmtk/oflog/layout.h \
- ../../oflog/include/dcmtk/oflog/streams.h \
- ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
- ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
- ../../oflog/include/dcmtk/oflog/spi/filter.h \
- ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
- ../../oflog/include/dcmtk/oflog/spi/logfact.h \
- ../../oflog/include/dcmtk/oflog/logmacro.h \
- ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
- ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../include/dcmtk/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sicert.h \
- ../include/dcmtk/dcmsign/siprivat.h
-siecdsa.o: siecdsa.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmsign/siecdsa.h ../include/dcmtk/dcmsign/sialgo.h \
- ../include/dcmtk/dcmsign/sitypes.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../oflog/include/dcmtk/oflog/oflog.h \
- ../../oflog/include/dcmtk/oflog/logger.h \
- ../../oflog/include/dcmtk/oflog/config.h \
- ../../oflog/include/dcmtk/oflog/config/defines.h \
- ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
- ../../oflog/include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../oflog/include/dcmtk/oflog/tstring.h \
- ../../oflog/include/dcmtk/oflog/tchar.h \
- ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
- ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../../oflog/include/dcmtk/oflog/layout.h \
- ../../oflog/include/dcmtk/oflog/streams.h \
- ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
- ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
- ../../oflog/include/dcmtk/oflog/spi/filter.h \
- ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
- ../../oflog/include/dcmtk/oflog/spi/logfact.h \
- ../../oflog/include/dcmtk/oflog/logmacro.h \
- ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
- ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../include/dcmtk/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sicert.h \
- ../include/dcmtk/dcmsign/siprivat.h
 simaccon.o: simaccon.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsign/simaccon.h ../include/dcmtk/dcmsign/sitypes.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -553,8 +475,8 @@ simaccon.o: simaccon.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcwcache.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcfcache.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcistrma.h
-simd5.o: simd5.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmsign/simd5.h ../include/dcmtk/dcmsign/simac.h \
+simdmac.o: simdmac.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmsign/simdmac.h ../include/dcmtk/dcmsign/simac.h \
  ../include/dcmtk/dcmsign/sitypes.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -635,142 +557,8 @@ sinullpr.o: sinullpr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h
-siprivat.o: siprivat.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmsign/siprivat.h ../include/dcmtk/dcmsign/sitypes.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../oflog/include/dcmtk/oflog/oflog.h \
- ../../oflog/include/dcmtk/oflog/logger.h \
- ../../oflog/include/dcmtk/oflog/config.h \
- ../../oflog/include/dcmtk/oflog/config/defines.h \
- ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
- ../../oflog/include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../oflog/include/dcmtk/oflog/tstring.h \
- ../../oflog/include/dcmtk/oflog/tchar.h \
- ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
- ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../../oflog/include/dcmtk/oflog/layout.h \
- ../../oflog/include/dcmtk/oflog/streams.h \
- ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
- ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
- ../../oflog/include/dcmtk/oflog/spi/filter.h \
- ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
- ../../oflog/include/dcmtk/oflog/spi/logfact.h \
- ../../oflog/include/dcmtk/oflog/logmacro.h \
- ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
- ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../include/dcmtk/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sirsa.h \
- ../include/dcmtk/dcmsign/sialgo.h ../include/dcmtk/dcmsign/sidsa.h \
- ../include/dcmtk/dcmsign/siecdsa.h ../include/dcmtk/dcmsign/sicert.h
-sipurpos.o: sipurpos.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmsign/sipurpos.h ../include/dcmtk/dcmsign/sidefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../include/dcmtk/dcmsign/sitypes.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../oflog/include/dcmtk/oflog/oflog.h \
- ../../oflog/include/dcmtk/oflog/logger.h \
- ../../oflog/include/dcmtk/oflog/config.h \
- ../../oflog/include/dcmtk/oflog/config/defines.h \
- ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
- ../../oflog/include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../oflog/include/dcmtk/oflog/tstring.h \
- ../../oflog/include/dcmtk/oflog/tchar.h \
- ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
- ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../../oflog/include/dcmtk/oflog/layout.h \
- ../../oflog/include/dcmtk/oflog/streams.h \
- ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
- ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
- ../../oflog/include/dcmtk/oflog/spi/filter.h \
- ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
- ../../oflog/include/dcmtk/oflog/spi/logfact.h \
- ../../oflog/include/dcmtk/oflog/logmacro.h \
- ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
- ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
- ../../ofstd/include/dcmtk/ofstd/offile.h \
- ../../ofstd/include/dcmtk/ofstd/ofstd.h \
- ../../ofstd/include/dcmtk/ofstd/oflist.h \
- ../../ofstd/include/dcmtk/ofstd/oflimits.h \
- ../../config/include/dcmtk/config/arith.h \
- ../../ofstd/include/dcmtk/ofstd/oferror.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
- ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
- ../../ofstd/include/dcmtk/ofstd/ofthread.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
- ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
- ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h
-siripemd.o: siripemd.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmsign/siripemd.h ../include/dcmtk/dcmsign/simac.h \
- ../include/dcmtk/dcmsign/sitypes.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../oflog/include/dcmtk/oflog/oflog.h \
- ../../oflog/include/dcmtk/oflog/logger.h \
- ../../oflog/include/dcmtk/oflog/config.h \
- ../../oflog/include/dcmtk/oflog/config/defines.h \
- ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
- ../../oflog/include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../oflog/include/dcmtk/oflog/tstring.h \
- ../../oflog/include/dcmtk/oflog/tchar.h \
- ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
- ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../../oflog/include/dcmtk/oflog/layout.h \
- ../../oflog/include/dcmtk/oflog/streams.h \
- ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
- ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
- ../../oflog/include/dcmtk/oflog/spi/filter.h \
- ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
- ../../oflog/include/dcmtk/oflog/spi/logfact.h \
- ../../oflog/include/dcmtk/oflog/logmacro.h \
- ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
- ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../include/dcmtk/dcmsign/sidefine.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h
-sirsa.o: sirsa.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmsign/sirsa.h ../include/dcmtk/dcmsign/sialgo.h \
+sipkey.o: sipkey.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmsign/sipkey.h ../include/dcmtk/dcmsign/sialgo.h \
  ../include/dcmtk/dcmsign/sitypes.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -807,9 +595,8 @@ sirsa.o: sirsa.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
  ../include/dcmtk/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sicert.h \
  ../include/dcmtk/dcmsign/siprivat.h
-sisha1.o: sisha1.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmsign/sisha1.h ../include/dcmtk/dcmsign/simac.h \
- ../include/dcmtk/dcmsign/sitypes.h \
+siprivat.o: siprivat.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmsign/siprivat.h ../include/dcmtk/dcmsign/sitypes.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
@@ -843,96 +630,17 @@ sisha1.o: sisha1.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/logmacro.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../include/dcmtk/dcmsign/sidefine.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h
-sisha256.o: sisha256.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmsign/sisha256.h ../include/dcmtk/dcmsign/simac.h \
- ../include/dcmtk/dcmsign/sitypes.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../include/dcmtk/dcmsign/sidefine.h ../include/dcmtk/dcmsign/sipkey.h \
+ ../include/dcmtk/dcmsign/sialgo.h ../include/dcmtk/dcmsign/sicert.h
+sipurpos.o: sipurpos.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmsign/sipurpos.h ../include/dcmtk/dcmsign/sidefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../oflog/include/dcmtk/oflog/oflog.h \
- ../../oflog/include/dcmtk/oflog/logger.h \
- ../../oflog/include/dcmtk/oflog/config.h \
- ../../oflog/include/dcmtk/oflog/config/defines.h \
- ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
- ../../oflog/include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../oflog/include/dcmtk/oflog/tstring.h \
- ../../oflog/include/dcmtk/oflog/tchar.h \
- ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
- ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../../oflog/include/dcmtk/oflog/layout.h \
- ../../oflog/include/dcmtk/oflog/streams.h \
- ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
- ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
- ../../oflog/include/dcmtk/oflog/spi/filter.h \
- ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
- ../../oflog/include/dcmtk/oflog/spi/logfact.h \
- ../../oflog/include/dcmtk/oflog/logmacro.h \
- ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
- ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../include/dcmtk/dcmsign/sidefine.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h
-sisha384.o: sisha384.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmsign/sisha384.h ../include/dcmtk/dcmsign/simac.h \
- ../include/dcmtk/dcmsign/sitypes.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
- ../../oflog/include/dcmtk/oflog/oflog.h \
- ../../oflog/include/dcmtk/oflog/logger.h \
- ../../oflog/include/dcmtk/oflog/config.h \
- ../../oflog/include/dcmtk/oflog/config/defines.h \
- ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
- ../../oflog/include/dcmtk/oflog/loglevel.h \
- ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../../oflog/include/dcmtk/oflog/tstring.h \
- ../../oflog/include/dcmtk/oflog/tchar.h \
- ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
- ../../oflog/include/dcmtk/oflog/appender.h \
- ../../ofstd/include/dcmtk/ofstd/ofmem.h \
- ../../ofstd/include/dcmtk/ofstd/ofutil.h \
- ../../ofstd/include/dcmtk/ofstd/oftraits.h \
- ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../../oflog/include/dcmtk/oflog/layout.h \
- ../../oflog/include/dcmtk/oflog/streams.h \
- ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
- ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
- ../../oflog/include/dcmtk/oflog/spi/filter.h \
- ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
- ../../oflog/include/dcmtk/oflog/spi/logfact.h \
- ../../oflog/include/dcmtk/oflog/logmacro.h \
- ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
- ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../include/dcmtk/dcmsign/sidefine.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h
-sisha512.o: sisha512.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/dcmsign/sisha512.h ../include/dcmtk/dcmsign/simac.h \
  ../include/dcmtk/dcmsign/sitypes.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
- ../../ofstd/include/dcmtk/ofstd/ofcast.h \
- ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
@@ -960,9 +668,27 @@ sisha512.o: sisha512.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../oflog/include/dcmtk/oflog/logmacro.h \
  ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
  ../../oflog/include/dcmtk/oflog/tracelog.h \
- ../include/dcmtk/dcmsign/sidefine.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h
+ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h
 sisprof.o: sisprof.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsign/sisprof.h ../include/dcmtk/dcmsign/sitypes.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
@@ -1259,12 +985,9 @@ sitstamp.o: sitstamp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdeftag.h \
- ../include/dcmtk/dcmsign/simd5.h ../include/dcmtk/dcmsign/simac.h \
- ../include/dcmtk/dcmsign/siripemd.h ../include/dcmtk/dcmsign/sisha1.h \
- ../include/dcmtk/dcmsign/sisha256.h ../include/dcmtk/dcmsign/sisha384.h \
- ../include/dcmtk/dcmsign/sisha512.h ../include/dcmtk/dcmsign/sicert.h \
- ../include/dcmtk/dcmsign/sicertvf.h ../include/dcmtk/dcmsign/dcsignat.h \
- ../include/dcmtk/dcmsign/sipurpos.h \
+ ../include/dcmtk/dcmsign/simdmac.h ../include/dcmtk/dcmsign/simac.h \
+ ../include/dcmtk/dcmsign/sicert.h ../include/dcmtk/dcmsign/sicertvf.h \
+ ../include/dcmtk/dcmsign/dcsignat.h ../include/dcmtk/dcmsign/sipurpos.h \
  ../../ofstd/include/dcmtk/ofstd/ofdatime.h \
  ../../ofstd/include/dcmtk/ofstd/ofdate.h \
  ../../ofstd/include/dcmtk/ofstd/oftime.h
index 511a340c3740be984fc4a78661cd249ce4b6e669..5d20f2aa590817784af42f9291a9d29773c25228 100644 (file)
@@ -19,10 +19,10 @@ dcmdatadir = $(top_srcdir)/../dcmdata
 LOCALINCLUDES = -I$(ofstddir)/include -I$(oflogdir)/include -I$(dcmdatadir)/include
 LOCALDEFS =
 
-objs = dcsignat.o sicert.o sidsa.o simd5.o siprivat.o sirsa.o sisprof.o \
-       siautopr.o sicreapr.o simaccon.o sinullpr.o siripemd.o sisha1.o \
-       sitypes.o sicertvf.o sibrsapr.o sisha256.o sisha384.o sisha512.o siecdsa.o \
-       sisrpr.o sisrvpr.o sipurpos.o dcsighlp.o sitstamp.o sitsfs.o
+objs = dcsignat.o sicert.o siprivat.o sipkey.o sisprof.o \
+       siautopr.o sicreapr.o simaccon.o sinullpr.o simdmac.o \
+       sitypes.o sicertvf.o sibrsapr.o sisrpr.o sisrvpr.o \
+       sipurpos.o dcsighlp.o sitstamp.o sitsfs.o
 
 library = libdcmdsig.$(LIBEXT)
 
index ff9f966f1cd810bc18546b58bcba185fbbbabb20..080a8d6fb16057dea3ed152dcedcc2827c6bb7d8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2020, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -84,7 +84,7 @@ int DcmSignatureHelper::readNextToken(const char *c, int& pos, DcmTagKey& key, U
     unsigned int group=0;
     unsigned int elem=0;
     if (2 != sscanf(c+spos,"%x,%x", &group, &elem)) return 0; // parse error
-    key = DcmTagKey(group,elem);
+    key = DcmTagKey(OFstatic_cast(Uint16, group),OFstatic_cast(Uint16, elem));
     pos = ++lpos;
     return 1; // tag key
   }
@@ -182,7 +182,7 @@ OFBool DcmSignatureHelper::addTag(const char *c, DcmAttributeTag& tagList)
     }
     dcmDataDict.rdunlock();
   } else {
-    if (EC_Normal == tagList.putTagVal(DcmTagKey(group,elem), tagList.getVM())) result = OFTrue;
+    if (EC_Normal == tagList.putTagVal(DcmTagKey(OFstatic_cast(Uint16, group),OFstatic_cast(Uint16, elem)), tagList.getVM())) result = OFTrue;
   }
   return result;
 }
@@ -851,7 +851,7 @@ void DcmSignatureHelper::printSignatureDetails(DcmSignature& sig, DcmStack& stac
       DCMSIGN_INFO("      Validity                : not before " << aString);
       cert->getCertValidityNotAfter(aString);
       DCMSIGN_INFO("      Validity                : not after " << aString);
-      const char *ecname = NULL;
+      OFString ecname;
       switch (cert->getKeyType())
       {
         case EKT_RSA:
@@ -862,7 +862,7 @@ void DcmSignatureHelper::printSignatureDetails(DcmSignature& sig, DcmStack& stac
           break;
         case EKT_EC:
           ecname = cert->getCertCurveName();
-          if (ecname)
+          if (ecname.length() > 0)
           {
             DCMSIGN_INFO("      Public key              : EC, curve " << ecname << ", " << cert->getCertKeyBits() << " bits");
           }
index e22ab23e3437d4ece5f0bab803a19d839a76268c..9e81a22d27cd56cf0bf40baf4b56616ca378035e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2019, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmsign/sicert.h"
 #include "dcmtk/dcmsign/simac.h"
 #include "dcmtk/dcmsign/simaccon.h"
-#include "dcmtk/dcmsign/simd5.h"
 #include "dcmtk/dcmsign/siprivat.h"
-#include "dcmtk/dcmsign/siripemd.h"
-#include "dcmtk/dcmsign/sisha1.h"
-#include "dcmtk/dcmsign/sisha256.h"
-#include "dcmtk/dcmsign/sisha384.h"
-#include "dcmtk/dcmsign/sisha512.h"
+#include "dcmtk/dcmsign/simdmac.h"
 #include "dcmtk/dcmsign/sisprof.h"
 #include "dcmtk/dcmsign/sitstamp.h"
 #include "dcmtk/dcmsign/sitsfs.h"
 BEGIN_EXTERN_C
 #include <openssl/evp.h>
 #include <openssl/err.h>
+#include <openssl/ssl.h>
+#ifdef HAVE_OPENSSL_PROVIDER_H
+#include <openssl/provider.h>
+#endif
 END_EXTERN_C
 
 
 /* static helper methods */
 
+#ifdef HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD
+static OSSL_PROVIDER *legacyProvider = NULL;
+static OSSL_PROVIDER *defaultProvider = NULL;
+#endif
+
 void DcmSignature::initializeLibrary()
 {
+  SSL_library_init();
+  SSL_load_error_strings();
   OpenSSL_add_all_algorithms();
-  ERR_load_crypto_strings();
+#ifdef HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD
+  // load the legacy provider, which is needed for RIPEMD160
+  if (legacyProvider == NULL) legacyProvider = OSSL_PROVIDER_load(NULL, "legacy");
+  if (legacyProvider == NULL) DCMSIGN_ERROR("Unable to load the OpenSSL Legacy Provider, RIPEMD160 and MD5 not available");
+
+  // explicitly also load the default provider
+  if (defaultProvider == NULL) defaultProvider = OSSL_PROVIDER_load(NULL, "default");
+  if (defaultProvider == NULL) DCMSIGN_ERROR("Unable to load the OpenSSL Default Provider");
+#endif
+}
+
+void DcmSignature::cleanupLibrary()
+{
+#ifdef HAVE_OPENSSL_PROTOTYPE_OSSL_PROVIDER_LOAD
+  if (legacyProvider)
+  {
+    OSSL_PROVIDER_unload(legacyProvider);
+    legacyProvider = NULL;
+  }
+  if (defaultProvider)
+  {
+    OSSL_PROVIDER_unload(defaultProvider);
+    defaultProvider = NULL;
+  }
+#endif
 }
 
 OFCondition DcmSignature::getMACIDnumber(DcmItem &item, Uint16& macid)
@@ -476,6 +506,19 @@ OFCondition DcmSignature::createSignature(
     else
     {
       result = mac.finalize(digest);
+
+      if (dcmsignLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
+      {
+        OFString logString;
+        char c[5];
+        for (size_t i=0; i<digestLength; i++)
+        {
+           sprintf(c, "%02hu", OFstatic_cast(unsigned short, digest[i]));
+           logString += c;
+        }
+        DCMSIGN_DEBUG("DcmSignature::createSignature(): " << mac.getDefinedTerm() << " MAC = " << logString);
+      }
+
       if (result.good()) result = algorithm->sign(digest, digestLength, mac.macType(), signature, sigLength);
     }
   }
@@ -710,12 +753,12 @@ OFCondition DcmSignature::verifyCurrent()
       OFString macidentifier;
       if ((((DcmElement *)(stack.top()))->getOFString(macidentifier, 0)).good())
       {
-        if (macidentifier == SI_DEFTERMS_RIPEMD160) mac = new SiRIPEMD160();
-        else if (macidentifier == SI_DEFTERMS_SHA1) mac = new SiSHA1();
-        else if (macidentifier == SI_DEFTERMS_MD5)  mac = new SiMD5();
-        else if (macidentifier == SI_DEFTERMS_SHA256) mac = new SiSHA256();
-        else if (macidentifier == SI_DEFTERMS_SHA384) mac = new SiSHA384();
-        else if (macidentifier == SI_DEFTERMS_SHA512) mac = new SiSHA512();
+        if (macidentifier == SI_DEFTERMS_RIPEMD160) mac = new SiMDMAC(EMT_RIPEMD160);
+        else if (macidentifier == SI_DEFTERMS_SHA1) mac = new SiMDMAC(EMT_SHA1);
+        else if (macidentifier == SI_DEFTERMS_MD5)  mac = new SiMDMAC(EMT_MD5);
+        else if (macidentifier == SI_DEFTERMS_SHA256) mac = new SiMDMAC(EMT_SHA256);
+        else if (macidentifier == SI_DEFTERMS_SHA384) mac = new SiMDMAC(EMT_SHA384);
+        else if (macidentifier == SI_DEFTERMS_SHA512) mac = new SiMDMAC(EMT_SHA512);
         if (mac == NULL) result = SI_EC_VerificationFailed_UnsupportedMACAlgorithm;
       } else result = SI_EC_VerificationFailed_NoMAC;
     } else result = SI_EC_VerificationFailed_NoMAC;
@@ -789,6 +832,17 @@ OFCondition DcmSignature::verifyCurrent()
           result = mac->finalize(digest);
           if (result.good())
           {
+            if (dcmsignLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
+            {
+              OFString logString;
+              char c[5];
+              for (size_t i=0; i<digestLength; i++)
+              {
+                 sprintf(c, "%02hu", OFstatic_cast(unsigned short, digest[i]));
+                 logString += c;
+              }
+              DCMSIGN_DEBUG("DcmSignature::verifyCurrent(): " << mac->getDefinedTerm() << " MAC = " << logString);
+            }
             result = algorithm->verify(digest, digestLength, mac->macType(), sigData, sigLength, verified);
             if ((result.good()) && (! verified)) result = SI_EC_VerificationFailed_Corrupted;
           }
index 9ea05d5d3cec23d98b0026c12d50dc78b9f45344..683f4f1a0038e96037dbc15b00583c391e4c0017 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2019, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,9 +25,7 @@
 #ifdef WITH_OPENSSL
 
 #include "dcmtk/dcmsign/sicert.h"
-#include "dcmtk/dcmsign/sirsa.h"   /* for class SiRSA */
-#include "dcmtk/dcmsign/sidsa.h"   /* for class SiDSA */
-#include "dcmtk/dcmsign/siecdsa.h" /* for class SiECDSA */
+#include "dcmtk/dcmsign/sipkey.h"
 #include "dcmtk/dcmdata/dcstack.h"
 #include "dcmtk/dcmdata/dcitem.h"
 #include "dcmtk/dcmdata/dcvrcs.h"
@@ -42,9 +40,15 @@ BEGIN_EXTERN_C
 #include <openssl/err.h>
 END_EXTERN_C
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#ifndef HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE
 #define X509_get0_notBefore(x) X509_get_notBefore(x)
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER
 #define X509_get0_notAfter(x) X509_get_notAfter(x)
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID
 #define EVP_PKEY_id(key) key->type
 #endif
 
@@ -102,30 +106,7 @@ SiAlgorithm *SiCertificate::createAlgorithmForPublicKey()
   if (x509)
   {
     EVP_PKEY *pkey = X509_extract_key(x509);
-    if (pkey)
-    {
-      switch(EVP_PKEY_type(EVP_PKEY_id(pkey)))
-      {
-        case EVP_PKEY_RSA:
-          result = new SiRSA(EVP_PKEY_get1_RSA(pkey));
-          break;
-        case EVP_PKEY_DSA:
-          result = new SiDSA(EVP_PKEY_get1_DSA(pkey));
-          break;
-        case EVP_PKEY_EC:
-#ifdef OPENSSL_NO_EC
-          result = new SiECDSA(NULL);
-#else
-          result = new SiECDSA(EVP_PKEY_get1_EC_KEY(pkey));
-#endif
-          break;
-        case EVP_PKEY_DH:
-        default:
-          /* nothing */
-          break;
-      }
-      EVP_PKEY_free(pkey);
-    }
+    if (pkey) result = new SiPKEY(pkey, OFTrue);
   }
   return result;
 }
@@ -184,13 +165,8 @@ OFCondition SiCertificate::read(DcmItem& item)
           {
             if (data)
             {
-#if OPENSSL_VERSION_NUMBER >= 0x00908000L
-              // incompatible API change in OpenSSL 0.9.8
               const Uint8 *cdata = data;
               x509 = d2i_X509(NULL, &cdata, cert->getLength());
-#else
-              x509 = d2i_X509(NULL, &data, cert->getLength());
-#endif
               if (x509 == NULL)
               {
                 DCMSIGN_WARN("Unable to parse X.509 certificate.");
@@ -432,17 +408,25 @@ long SiCertificate::getCertKeyBits()
   return certPubKeyBits;
 }
 
-const char *SiCertificate::getCertCurveName()
+OFString SiCertificate::getCertCurveName()
 {
-  const char *result = NULL;
+  OFString result;
 #ifndef OPENSSL_NO_EC
   if (x509)
   {
     EVP_PKEY *pkey = X509_extract_key(x509);
     if (pkey && EVP_PKEY_type(EVP_PKEY_id(pkey)) == EVP_PKEY_EC)
     {
-      // we have an elliptic curve. Access EC key.
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+      // we have an elliptic curve.
+#ifdef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME
+      /* code for OpenSSL 3.0 and newer */
+      char groupname[100];
+      groupname[0] = '\0';
+      EVP_PKEY_get_group_name(pkey, groupname, 100,  NULL);
+      result = groupname;
+#else
+      /* code for older OpenSSL versions */
+#ifndef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY
       EC_KEY *eckey = EVP_PKEY_get1_EC_KEY(pkey);
 #else
       const EC_KEY *eckey = EVP_PKEY_get0_EC_KEY(pkey);
@@ -461,10 +445,12 @@ const char *SiCertificate::getCertCurveName()
           }
           else result = "unnamed curve";
         }
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#ifndef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET0_EC_KEY
         EC_KEY_free(eckey);
 #endif
       }
+#endif /* HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_GET_GROUP_NAME */
+
       EVP_PKEY_free(pkey);
     }
   }
@@ -634,13 +620,9 @@ OFCondition SiCertificate::convertASN1Time(const ASN1_TIME *d, OFDateTime& dt)
 {
   if (d)
   {
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
     // Before OpenSSL 1.1.0, the first parameter of ASN1_TIME_to_generalizedtime()
-    // was not declared const, as it should be
+    // was not declared const. We cast the const away, which should work with old and new versions.
     ASN1_GENERALIZEDTIME *gm = ASN1_TIME_to_generalizedtime(OFconst_cast(ASN1_TIME *, d), NULL);
-#else
-    ASN1_GENERALIZEDTIME *gm = ASN1_TIME_to_generalizedtime(d, NULL);
-#endif
     if (gm)
     {
       OFCondition result = convertGeneralizedTime(gm, dt);
diff --git a/dcmsign/libsrc/sidsa.cc b/dcmsign/libsrc/sidsa.cc
deleted file mode 100644 (file)
index a2dc384..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- *
- *  Copyright (C) 1998-2016, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Norbert Loxen, Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiDSA
- *
- */
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/sidsa.h"
-#include "dcmtk/dcmsign/sicert.h"
-#include "dcmtk/dcmsign/siprivat.h"
-
-BEGIN_EXTERN_C
-#include <openssl/err.h>
-#include <openssl/evp.h>
-#include <openssl/dsa.h>
-END_EXTERN_C
-
-SiDSA::SiDSA(DSA *key)
-: dsa(key)
-{
-}
-
-
-SiDSA::~SiDSA()
-{
-  if (dsa) DSA_free(dsa);
-}
-
-
-OFCondition SiDSA::sign(
-    const unsigned char *inputHash, 
-    unsigned long inputHashSize,
-    E_MACType inputHashAlgorithm,
-    unsigned char *outputSignature,
-    unsigned long &outputSignatureSize)
-{
-    if (dsa==NULL) return SI_EC_InitializationFailed;    
-    int openSSLmac = 0;
-    switch (inputHashAlgorithm)
-    {
-      case EMT_SHA1:
-        openSSLmac = NID_sha1;
-        break;
-      case EMT_RIPEMD160:
-        openSSLmac = NID_ripemd160;
-        break;
-      case EMT_MD5:
-        openSSLmac = NID_md5;
-        break;
-      case EMT_SHA256:
-        openSSLmac = NID_sha256;
-        break;
-      case EMT_SHA384:
-        openSSLmac = NID_sha384;
-        break;
-      case EMT_SHA512:
-        openSSLmac = NID_sha512;
-        break;
-    }
-    unsigned int sigLen = 0;
-    int error = DSA_sign(openSSLmac, inputHash, (unsigned int)inputHashSize, outputSignature, &sigLen, dsa);
-    outputSignatureSize = sigLen;    
-    if (error < 0) return SI_EC_OpenSSLFailure;
-    return EC_Normal;    
-}
-
-
-OFCondition SiDSA::verify(
-    const unsigned char *inputHash, 
-    unsigned long inputHashSize,
-    E_MACType inputHashAlgorithm,
-    const unsigned char *inputSignature,
-    unsigned long inputSignatureSize,
-    OFBool &verified)
-{
-    verified = OFFalse;
-    if (dsa==NULL) return SI_EC_InitializationFailed;
-    int openSSLmac = 0;
-    switch (inputHashAlgorithm)
-    {
-      case EMT_SHA1:
-        openSSLmac = NID_sha1;
-        break;
-      case EMT_RIPEMD160:
-        openSSLmac = NID_ripemd160;
-        break;
-      case EMT_MD5:
-        openSSLmac = NID_md5;
-        break;
-      case EMT_SHA256:
-        openSSLmac = NID_sha256;
-        break;
-      case EMT_SHA384:
-        openSSLmac = NID_sha384;
-        break;
-      case EMT_SHA512:
-        openSSLmac = NID_sha512;
-        break;
-    }
-
-    // we have to cast away const on inputSignature yet because of OpenSSL limitations
-    int error = DSA_verify(openSSLmac, inputHash, (unsigned int)inputHashSize, (unsigned char *)inputSignature, (unsigned int)inputSignatureSize, dsa);
-    if (error < 0) return SI_EC_OpenSSLFailure; else if (error > 0) verified = OFTrue;
-    return EC_Normal;
-}
-
-
-unsigned long SiDSA::getSize() const
-{   
-  if (dsa == NULL) return 0;
-  return DSA_size(dsa);
-}
-
-
-E_KeyType SiDSA::keyType() const
-{
-  return EKT_DSA;
-}
-
-#else /* WITH_OPENSSL */
-
-int sidsa_cc_dummy_to_keep_linker_from_moaning = 0;
-
-#endif
diff --git a/dcmsign/libsrc/siecdsa.cc b/dcmsign/libsrc/siecdsa.cc
deleted file mode 100644 (file)
index f1b3502..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- *
- *  Copyright (C) 1998-2019, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Norbert Loxen, Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiECDSA
- *
- */
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/siecdsa.h"
-#include "dcmtk/dcmsign/sicert.h"
-#include "dcmtk/dcmsign/siprivat.h"
-
-BEGIN_EXTERN_C
-#include <openssl/err.h>
-#include <openssl/evp.h>
-#ifndef OPENSSL_NO_EC
-#include <openssl/ec.h>
-#include <openssl/ecdsa.h>
-#endif
-END_EXTERN_C
-
-SiECDSA::SiECDSA(EC_KEY *key)
-: ecdsa(key)
-{
-}
-
-#ifndef OPENSSL_NO_EC
-
-SiECDSA::~SiECDSA()
-{
-  if (ecdsa) EC_KEY_free(ecdsa);
-}
-
-
-OFCondition SiECDSA::sign(
-    const unsigned char *inputHash,
-    unsigned long inputHashSize,
-    E_MACType inputHashAlgorithm,
-    unsigned char *outputSignature,
-    unsigned long &outputSignatureSize)
-{
-    if (ecdsa==NULL) return SI_EC_InitializationFailed;
-    int openSSLmac = 0;
-    switch (inputHashAlgorithm)
-    {
-      case EMT_SHA1:
-        openSSLmac = NID_sha1;
-        break;
-      case EMT_RIPEMD160:
-        openSSLmac = NID_ripemd160;
-        break;
-      case EMT_MD5:
-        openSSLmac = NID_md5;
-        break;
-      case EMT_SHA256:
-        openSSLmac = NID_sha256;
-        break;
-      case EMT_SHA384:
-        openSSLmac = NID_sha384;
-        break;
-      case EMT_SHA512:
-        openSSLmac = NID_sha512;
-        break;
-    }
-    unsigned int sigLen = 0;
-    int error = ECDSA_sign(openSSLmac, inputHash, (unsigned int)inputHashSize, outputSignature, &sigLen, ecdsa);
-    outputSignatureSize = sigLen;
-    if (error < 0) return SI_EC_OpenSSLFailure;
-    return EC_Normal;
-}
-
-
-OFCondition SiECDSA::verify(
-    const unsigned char *inputHash,
-    unsigned long inputHashSize,
-    E_MACType inputHashAlgorithm,
-    const unsigned char *inputSignature,
-    unsigned long inputSignatureSize,
-    OFBool &verified)
-{
-    verified = OFFalse;
-    if (ecdsa==NULL) return SI_EC_InitializationFailed;
-    int openSSLmac = 0;
-    switch (inputHashAlgorithm)
-    {
-      case EMT_SHA1:
-        openSSLmac = NID_sha1;
-        break;
-      case EMT_RIPEMD160:
-        openSSLmac = NID_ripemd160;
-        break;
-      case EMT_MD5:
-        openSSLmac = NID_md5;
-        break;
-      case EMT_SHA256:
-        openSSLmac = NID_sha256;
-        break;
-      case EMT_SHA384:
-        openSSLmac = NID_sha384;
-        break;
-      case EMT_SHA512:
-        openSSLmac = NID_sha512;
-        break;
-    }
-
-    // we have to cast away const on inputSignature yet because of OpenSSL limitations
-    int error = ECDSA_verify(openSSLmac, inputHash, (unsigned int)inputHashSize, (unsigned char *)inputSignature, (unsigned int)inputSignatureSize, ecdsa);
-
-    if (error < 0)
-    {
-      const char *err = ERR_reason_error_string(ERR_peek_error());
-      if (err) DCMSIGN_ERROR("OpenSSL error: " << err);
-      return SI_EC_OpenSSLFailure;
-    }
-    else if (error > 0) verified = OFTrue;
-
-    return EC_Normal;
-}
-
-
-unsigned long SiECDSA::getSize() const
-{
-  if (ecdsa == NULL) return 0;
-  return ECDSA_size(ecdsa);
-}
-
-#else /* OPENSSL_NO_EC */
-
-SiECDSA::~SiECDSA()
-{
-}
-
-OFCondition SiECDSA::sign(
-    const unsigned char * /* inputHash */,
-    unsigned long /* inputHashSize */,
-    E_MACType /* inputHashAlgorithm */,
-    unsigned char * /* outputSignature */,
-    unsigned long& /* outputSignatureSize */)
-{
-    return SI_EC_EllipticCurveNotSupported;
-}
-
-OFCondition SiECDSA::verify(
-    const unsigned char * /* inputHash */,
-    unsigned long /* inputHashSize */,
-    E_MACType /* inputHashAlgorithm */,
-    const unsigned char * /* inputSignature */,
-    unsigned long /* inputSignatureSize */,
-    OFBool& /* verified */)
-{
-    return SI_EC_EllipticCurveNotSupported;
-}
-
-unsigned long SiECDSA::getSize() const
-{
-  return 0;
-}
-
-#endif /* OPENSSL_NO_EC */
-
-E_KeyType SiECDSA::keyType() const
-{
-  return EKT_EC;
-}
-
-#else /* WITH_OPENSSL */
-
-int SiECDSA_cc_dummy_to_keep_linker_from_moaning = 0;
-
-#endif
diff --git a/dcmsign/libsrc/simd5.cc b/dcmsign/libsrc/simd5.cc
deleted file mode 100644 (file)
index 204d246..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- *
- *  Copyright (C) 1998-2010, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiMD5
- *
- */
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/simd5.h"
-#include "dcmtk/dcmdata/dcerror.h"
-
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
-
-BEGIN_EXTERN_C
-#include <openssl/md5.h>
-END_EXTERN_C
-
-SiMD5::SiMD5()
-: ctx(new MD5_CTX())
-{
-  initialize();
-}
-
-SiMD5::~SiMD5()
-{
-  delete ctx;
-}
-
-unsigned long SiMD5::getSize() const
-{
-  return MD5_DIGEST_LENGTH;
-}
-
-OFCondition SiMD5::initialize()
-{
-  MD5_Init(ctx);
-  return EC_Normal;
-}
-
-OFCondition SiMD5::digest(const unsigned char *data, unsigned long length)
-{
-  if (length == 0) return EC_Normal;
-  if ((data == NULL)||(ctx == NULL)) return EC_IllegalCall;
-  MD5_Update(ctx, data, length);
-  return EC_Normal;
-}
-
-OFCondition SiMD5::finalize(unsigned char *result)
-{
-  if ((result == NULL)||(ctx == NULL)) return EC_IllegalCall;
-  MD5_Final(result, ctx);
-  return EC_Normal;  
-}
-
-E_MACType SiMD5::macType() const
-{
-  return EMT_MD5;
-}
-
-const char *SiMD5::getDefinedTerm() const
-{
-  return SI_DEFTERMS_MD5;
-}
-
-
-#else /* WITH_OPENSSL */
-
-int simd5_cc_dummy_to_keep_linker_from_moaning = 0;
-
-#endif
diff --git a/dcmsign/libsrc/simdmac.cc b/dcmsign/libsrc/simdmac.cc
new file mode 100644 (file)
index 0000000..1fae225
--- /dev/null
@@ -0,0 +1,156 @@
+/*
+ *
+ *  Copyright (C) 1998-2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module: dcmsign
+ *
+ *  Author: Norbert Loxen, Marco Eichelberg
+ *
+ *  Purpose:
+ *    classes: SiMDMAC
+ *
+ */
+
+#include "dcmtk/config/osconfig.h"
+
+#ifdef WITH_OPENSSL
+
+#include "dcmtk/dcmsign/simdmac.h"
+#include "dcmtk/dcmdata/dcerror.h"
+
+BEGIN_EXTERN_C
+#include <openssl/evp.h>
+END_EXTERN_C
+
+
+SiMDMAC::SiMDMAC(E_MACType mactype)
+: ctx(NULL)
+, macType_(mactype)
+{
+  initialize();
+}
+
+SiMDMAC::~SiMDMAC()
+{
+  EVP_MD_CTX_destroy(ctx); // This is the same as EVP_MD_CTX_free() in OpenSSL 3.0
+}
+
+unsigned long SiMDMAC::getSize() const
+{
+  if (ctx) return EVP_MD_CTX_size(ctx);
+  return 0;
+}
+
+OFCondition SiMDMAC::initialize()
+{
+  EVP_MD_CTX_destroy(ctx); // This is the same as EVP_MD_CTX_free() in OpenSSL 3.0
+
+  ctx = EVP_MD_CTX_create(); // This is the same as EVP_MD_CTX_new() in OpenSSL 3.0
+  if (ctx==NULL) return SI_EC_InitializationFailed;
+
+  const EVP_MD *md_type = NULL;
+  switch (macType_)
+  {
+    case EMT_SHA1:
+      md_type = EVP_sha1();
+      break;
+    case EMT_RIPEMD160:
+      md_type = EVP_ripemd160();
+      break;
+    case EMT_MD5:
+      md_type = EVP_md5();
+      break;
+    case EMT_SHA256:
+      md_type = EVP_sha256();
+      break;
+    case EMT_SHA384:
+      md_type = EVP_sha384();
+      break;
+    case EMT_SHA512:
+      md_type = EVP_sha512();
+      break;
+  }
+  if (md_type==NULL) return SI_EC_InitializationFailed;
+
+  if (EVP_DigestInit_ex(ctx, md_type, NULL) <= 0)
+  {
+     DCMSIGN_DEBUG("SiMDMAC::initialize(): call to EVP_DigestInit_ex() failed");
+     EVP_MD_CTX_destroy(ctx); // This is the same as EVP_MD_CTX_free() in OpenSSL 3.0
+     ctx = NULL;
+     return SI_EC_OpenSSLFailure;
+  }
+
+  return EC_Normal;
+}
+
+OFCondition SiMDMAC::digest(const unsigned char *data, unsigned long length)
+{
+  if (length == 0) return EC_Normal;
+  if (ctx==NULL) return SI_EC_InitializationFailed;
+  if (data == NULL) return EC_IllegalCall;
+
+  if (EVP_DigestUpdate(ctx, data, length) <= 0)
+  {
+     DCMSIGN_DEBUG("SiMDMAC::digest(): call to EVP_DigestUpdate() failed");
+     return SI_EC_OpenSSLFailure;
+  }
+  return EC_Normal;
+}
+
+OFCondition SiMDMAC::finalize(unsigned char *result)
+{
+  if (ctx==NULL) return SI_EC_InitializationFailed;
+  if (result==NULL) return EC_IllegalCall;
+  if (EVP_DigestFinal_ex(ctx, result, NULL) <= 0)
+  {
+     DCMSIGN_DEBUG("SiMDMAC::finalize(): call to EVP_DigestFinal_ex() failed");
+     return SI_EC_OpenSSLFailure;
+  }
+  return EC_Normal;
+}
+
+E_MACType SiMDMAC::macType() const
+{
+  return macType_;
+}
+
+const char *SiMDMAC::getDefinedTerm() const
+{
+  switch (macType_)
+  {
+    case EMT_SHA1:
+      return SI_DEFTERMS_SHA1;
+      break;
+    case EMT_RIPEMD160:
+      return SI_DEFTERMS_RIPEMD160;
+      break;
+    case EMT_MD5:
+      return SI_DEFTERMS_MD5;
+      break;
+    case EMT_SHA256:
+      return SI_DEFTERMS_SHA256;
+      break;
+    case EMT_SHA384:
+      return SI_DEFTERMS_SHA384;
+      break;
+    case EMT_SHA512:
+      return SI_DEFTERMS_SHA512;
+      break;
+  }
+  return "UNKNOWN_MAC";
+}
+
+#else /* WITH_OPENSSL */
+
+int simdmac_cc_dummy_to_keep_linker_from_moaning = 0;
+
+#endif
diff --git a/dcmsign/libsrc/sipkey.cc b/dcmsign/libsrc/sipkey.cc
new file mode 100644 (file)
index 0000000..8455287
--- /dev/null
@@ -0,0 +1,263 @@
+/*
+ *
+ *  Copyright (C) 1998-2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module: dcmsign
+ *
+ *  Author: Norbert Loxen, Marco Eichelberg
+ *
+ *  Purpose:
+ *    classes: SiPKEY
+ *
+ */
+
+#include "dcmtk/config/osconfig.h"
+
+#ifdef WITH_OPENSSL
+
+#include "dcmtk/dcmsign/sipkey.h"
+#include "dcmtk/dcmsign/sicert.h"
+#include "dcmtk/dcmsign/siprivat.h"
+
+BEGIN_EXTERN_C
+#include <openssl/err.h>
+#include <openssl/evp.h>
+#include <openssl/rsa.h>
+END_EXTERN_C
+
+SiPKEY::SiPKEY(EVP_PKEY *key, OFBool owned)
+: signing_key(key)
+, owned_(owned)
+{
+}
+
+SiPKEY::~SiPKEY()
+{
+  if (owned_ && signing_key) EVP_PKEY_free(signing_key);
+}
+
+
+OFCondition SiPKEY::sign(
+    const unsigned char *inputHash,
+    unsigned long inputHashSize,
+    E_MACType inputHashAlgorithm,
+    unsigned char *outputSignature,
+    unsigned long &outputSignatureSize)
+{
+    if (signing_key==NULL) return SI_EC_InitializationFailed;
+    const EVP_MD *openSSLmac = NULL;
+    switch (inputHashAlgorithm)
+    {
+      case EMT_SHA1:
+        openSSLmac = EVP_sha1();
+        break;
+      case EMT_RIPEMD160:
+        openSSLmac = EVP_ripemd160();
+        break;
+      case EMT_MD5:
+        openSSLmac = EVP_md5();
+        break;
+      case EMT_SHA256:
+        openSSLmac = EVP_sha256();
+        break;
+      case EMT_SHA384:
+        openSSLmac = EVP_sha384();
+        break;
+      case EMT_SHA512:
+        openSSLmac = EVP_sha512();
+        break;
+    }
+
+    E_KeyType keytype = keyType();
+    size_t sigLen = outputSignatureSize;
+    OFCondition result = EC_Normal;
+
+    // create context structure
+    EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new(signing_key, NULL /* no engine */);
+    if (ctx == NULL)
+    {
+      DCMSIGN_DEBUG("SiPKEY::sign(): call to EVP_PKEY_CTX_new() failed");
+      result = SI_EC_OpenSSLFailure;
+    }
+
+    if (result.good())
+    {
+      // initialize signature operation
+      if (EVP_PKEY_sign_init(ctx) <= 0)
+      {
+        DCMSIGN_DEBUG("SiPKEY::sign(): call to EVP_PKEY_sign_init() failed");
+        result = SI_EC_OpenSSLFailure;
+      }
+    }
+
+    if (result.good() && (keytype == EKT_RSA))
+    {
+      // set padding mode (only for RSA keys)
+      if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING) <= 0)
+      {
+        DCMSIGN_DEBUG("SiPKEY::sign(): call to EVP_PKEY_CTX_set_rsa_padding() failed");
+        result = SI_EC_OpenSSLFailure;
+      }
+    }
+
+    if (result.good() && (keytype == EKT_RSA))
+    {
+      // set MAC used for hash key generation (only for RSA keys)
+      if (EVP_PKEY_CTX_set_signature_md(ctx, openSSLmac) <= 0)
+      {
+        DCMSIGN_DEBUG("SiPKEY::sign(): call to EVP_PKEY_CTX_set_signature_md() failed");
+        result = SI_EC_OpenSSLFailure;
+      }
+    }
+
+    if (result.good())
+    {
+      // finally, create the signature
+      if (EVP_PKEY_sign(ctx, outputSignature, &sigLen, inputHash, inputHashSize) <= 0)
+      {
+        DCMSIGN_DEBUG("SiPKEY::sign(): call to EVP_PKEY_sign() failed");
+        result = SI_EC_OpenSSLFailure;
+      }
+    }
+
+    // clean up context. Call is safe if ctx==NULL.
+    EVP_PKEY_CTX_free(ctx);
+
+    outputSignatureSize = OFstatic_cast(unsigned long, sigLen);
+    return result;
+}
+
+
+OFCondition SiPKEY::verify(
+    const unsigned char *inputHash,
+    unsigned long inputHashSize,
+    E_MACType inputHashAlgorithm,
+    const unsigned char *inputSignature,
+    unsigned long inputSignatureSize,
+    OFBool &verified)
+{
+    verified = OFFalse;
+    if (signing_key==NULL) return SI_EC_InitializationFailed;
+
+    const EVP_MD *openSSLmac = NULL;
+    switch (inputHashAlgorithm)
+    {
+      case EMT_SHA1:
+        openSSLmac = EVP_sha1();
+        break;
+      case EMT_RIPEMD160:
+        openSSLmac = EVP_ripemd160();
+        break;
+      case EMT_MD5:
+        openSSLmac = EVP_md5();
+        break;
+      case EMT_SHA256:
+        openSSLmac = EVP_sha256();
+        break;
+      case EMT_SHA384:
+        openSSLmac = EVP_sha384();
+        break;
+      case EMT_SHA512:
+        openSSLmac = EVP_sha512();
+        break;
+    }
+
+    E_KeyType keytype = keyType();
+    OFCondition result = EC_Normal;
+
+    // create context structure
+    EVP_PKEY_CTX *ctx = EVP_PKEY_CTX_new(signing_key, NULL /* no engine */);
+    if (ctx == NULL)
+    {
+      DCMSIGN_DEBUG("SiPKEY::verify(): call to EVP_PKEY_CTX_new() failed");
+      result = SI_EC_OpenSSLFailure;
+    }
+
+    if (result.good())
+    {
+      // initialize signature operation
+      if (EVP_PKEY_verify_init(ctx) <= 0)
+      {
+        DCMSIGN_DEBUG("SiPKEY::verify(): call to EVP_PKEY_verify_init() failed");
+        result = SI_EC_OpenSSLFailure;
+      }
+    }
+
+    if (result.good() && (keytype == EKT_RSA))
+    {
+      // set padding mode (only for RSA keys)
+      if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_PKCS1_PADDING) <= 0)
+      {
+        DCMSIGN_DEBUG("SiPKEY::verify(): call to EVP_PKEY_CTX_set_rsa_padding() failed");
+        result = SI_EC_OpenSSLFailure;
+      }
+    }
+
+    if (result.good() && (keytype == EKT_RSA))
+    {
+      // set MAC used for hash key generation (only for RSA keys)
+      if (EVP_PKEY_CTX_set_signature_md(ctx, openSSLmac) <= 0)
+      {
+        DCMSIGN_DEBUG("SiPKEY::verify(): call to EVP_PKEY_CTX_set_signature_md() failed");
+        result = SI_EC_OpenSSLFailure;
+      }
+    }
+
+    if (result.good())
+    {
+      // finally, create the signature
+      if (EVP_PKEY_verify(ctx, inputSignature, inputSignatureSize, inputHash, inputHashSize) > 0) verified = OFTrue;
+    }
+
+    // clean up structures. Both calls are safe if parameter is NULL.
+    EVP_PKEY_CTX_free(ctx);
+
+    return result;
+}
+
+unsigned long SiPKEY::getSize() const
+{
+  if (signing_key == NULL) return 0;
+  return EVP_PKEY_size(signing_key);
+}
+
+
+E_KeyType SiPKEY::keyType() const
+{
+  E_KeyType result = EKT_none;
+  if (signing_key) switch(EVP_PKEY_type(EVP_PKEY_id(signing_key)))
+  {
+    case EVP_PKEY_RSA:
+      result = EKT_RSA;
+      break;
+    case EVP_PKEY_DSA:
+      result = EKT_DSA;
+      break;
+    case EVP_PKEY_DH:
+      result = EKT_DH;
+      break;
+    case EVP_PKEY_EC:
+      result = EKT_EC;
+      break;
+    default:
+      /* nothing */
+      break;
+  }
+
+  return result;
+}
+
+#else /* WITH_OPENSSL */
+
+int sirsa_cc_dummy_to_keep_linker_from_moaning = 0;
+
+#endif
index d6bff55f840a79d1940c419580388e508c36d1b9..c42d52aa27e41fdd3de6109f3c8b0a6fd5ab595a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2019, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #ifdef WITH_OPENSSL
 
 #include "dcmtk/dcmsign/siprivat.h"
-#include "dcmtk/dcmsign/sirsa.h"
-#include "dcmtk/dcmsign/sidsa.h"
-#include "dcmtk/dcmsign/siecdsa.h"
+#include "dcmtk/dcmsign/sipkey.h"
 #include "dcmtk/dcmsign/sicert.h"
 
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #include <openssl/evp.h>
 #include <openssl/x509.h>
 #include <openssl/pem.h>
 END_EXTERN_C
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#ifndef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_ID
 #define EVP_PKEY_id(key) key->type
 #endif
 
@@ -154,29 +149,7 @@ E_KeyType SiPrivateKey::getKeyType() const
 
 SiAlgorithm *SiPrivateKey::createAlgorithmForPrivateKey()
 {
-  if (pkey)
-  {
-    switch(EVP_PKEY_type(EVP_PKEY_id(pkey)))
-    {
-      case EVP_PKEY_RSA:
-        return new SiRSA(EVP_PKEY_get1_RSA(pkey));
-        /* break; */
-      case EVP_PKEY_DSA:
-        return new SiDSA(EVP_PKEY_get1_DSA(pkey));
-        /* break; */
-      case EVP_PKEY_EC:
-#ifdef OPENSSL_NO_EC
-        return new SiECDSA(NULL);
-#else
-        return new SiECDSA(EVP_PKEY_get1_EC_KEY(pkey));
-#endif
-        /* break; */
-      case EVP_PKEY_DH:
-      default:
-        /* nothing */
-        break;
-    }
-  }
+  if (pkey) return new SiPKEY(pkey, OFFalse);
   return NULL;
 }
 
diff --git a/dcmsign/libsrc/siripemd.cc b/dcmsign/libsrc/siripemd.cc
deleted file mode 100644 (file)
index ba62942..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- *
- *  Copyright (C) 1998-2010, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Norbert Loxen, Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiRIPEMD160
- *
- */
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/siripemd.h"
-#include "dcmtk/dcmdata/dcerror.h"
-
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
-
-BEGIN_EXTERN_C
-#include <openssl/ripemd.h>
-END_EXTERN_C
-
-SiRIPEMD160::SiRIPEMD160()
-: ctx(new RIPEMD160_CTX())
-{
-  initialize();
-}
-
-SiRIPEMD160::~SiRIPEMD160()
-{
-  delete ctx;
-}
-
-unsigned long SiRIPEMD160::getSize() const
-{
-  return RIPEMD160_DIGEST_LENGTH;
-}
-
-OFCondition SiRIPEMD160::initialize()
-{
-  RIPEMD160_Init(ctx);
-  return EC_Normal;
-}
-
-OFCondition SiRIPEMD160::digest(const unsigned char *data, unsigned long length)
-{
-  if (length == 0) return EC_Normal;
-  if ((data == NULL)||(ctx == NULL)) return EC_IllegalCall;
-  RIPEMD160_Update(ctx, data, length);
-  return EC_Normal;
-}
-
-OFCondition SiRIPEMD160::finalize(unsigned char *result)
-{
-  if ((result == NULL)||(ctx == NULL)) return EC_IllegalCall;
-  RIPEMD160_Final(result, ctx);
-  return EC_Normal;  
-}
-
-E_MACType SiRIPEMD160::macType() const
-{
-  return EMT_RIPEMD160;
-}
-
-const char *SiRIPEMD160::getDefinedTerm() const
-{
-  return SI_DEFTERMS_RIPEMD160;
-}
-
-#else /* WITH_OPENSSL */
-
-int siripemd_cc_dummy_to_keep_linker_from_moaning = 0;
-
-#endif
diff --git a/dcmsign/libsrc/sirsa.cc b/dcmsign/libsrc/sirsa.cc
deleted file mode 100644 (file)
index ab7605a..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- *
- *  Copyright (C) 1998-2016, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Norbert Loxen, Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiRSA
- *
- */
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/sirsa.h"
-#include "dcmtk/dcmsign/sicert.h"
-#include "dcmtk/dcmsign/siprivat.h"
-
-BEGIN_EXTERN_C
-#include <openssl/err.h>
-#include <openssl/evp.h>
-#include <openssl/rsa.h>  /* for RSA */
-END_EXTERN_C
-
-SiRSA::SiRSA(RSA *key)
-: rsa(key)
-{
-}
-
-SiRSA::~SiRSA()
-{
-  if (rsa) RSA_free(rsa);
-}
-
-
-OFCondition SiRSA::sign(
-    const unsigned char *inputHash, 
-    unsigned long inputHashSize,
-    E_MACType inputHashAlgorithm,
-    unsigned char *outputSignature,
-    unsigned long &outputSignatureSize)
-{
-    if (rsa==NULL) return SI_EC_InitializationFailed;    
-    int openSSLmac = 0;
-    switch (inputHashAlgorithm)
-    {
-      case EMT_SHA1:
-        openSSLmac = NID_sha1;
-        break;
-      case EMT_RIPEMD160:
-        openSSLmac = NID_ripemd160;
-        break;
-      case EMT_MD5:
-        openSSLmac = NID_md5;
-        break;
-      case EMT_SHA256:
-        openSSLmac = NID_sha256;
-        break;
-      case EMT_SHA384:
-        openSSLmac = NID_sha384;
-        break;
-      case EMT_SHA512:
-        openSSLmac = NID_sha512;
-        break;
-    }
-    unsigned int sigLen = 0;
-    // we have to cast away const on inputHash yet because of OpenSSL limitations
-    int error = RSA_sign(openSSLmac, (unsigned char *)inputHash, (unsigned int)inputHashSize, outputSignature, &sigLen, rsa);
-    outputSignatureSize = sigLen;    
-    if (error < 0) return SI_EC_OpenSSLFailure;
-    return EC_Normal;    
-}
-
-
-OFCondition SiRSA::verify(
-    const unsigned char *inputHash, 
-    unsigned long inputHashSize,
-    E_MACType inputHashAlgorithm,
-    const unsigned char *inputSignature,
-    unsigned long inputSignatureSize,
-    OFBool &verified)
-{
-    verified = OFFalse;
-    if (rsa==NULL) return SI_EC_InitializationFailed;    
-
-    int openSSLmac = 0;
-    switch (inputHashAlgorithm)
-    {
-      case EMT_SHA1:
-        openSSLmac = NID_sha1;
-        break;
-      case EMT_RIPEMD160:
-        openSSLmac = NID_ripemd160;
-        break;
-      case EMT_MD5:
-        openSSLmac = NID_md5;
-        break;
-      case EMT_SHA256:
-        openSSLmac = NID_sha256;
-        break;
-      case EMT_SHA384:
-        openSSLmac = NID_sha384;
-        break;
-      case EMT_SHA512:
-        openSSLmac = NID_sha512;
-        break;
-    }
-    // we have to cast away const on inputHash yet because of OpenSSL limitations
-    // we have to cast away const on inputSignature yet because of OpenSSL limitations
-    int error = RSA_verify(openSSLmac, (unsigned char *)inputHash, (unsigned int)inputHashSize, (unsigned char *)inputSignature, (unsigned int)inputSignatureSize, rsa);
-    if (error < 0) return SI_EC_OpenSSLFailure; else if (error > 0) verified = OFTrue;
-    return EC_Normal;
-}
-
-unsigned long SiRSA::getSize() const
-{   
-  if (rsa == NULL) return 0;
-  return RSA_size(rsa);
-}
-
-
-E_KeyType SiRSA::keyType() const
-{
-  return EKT_RSA;
-}
-
-#else /* WITH_OPENSSL */
-
-int sirsa_cc_dummy_to_keep_linker_from_moaning = 0;
-
-#endif
diff --git a/dcmsign/libsrc/sisha1.cc b/dcmsign/libsrc/sisha1.cc
deleted file mode 100644 (file)
index 109e6fc..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *
- *  Copyright (C) 1998-2010, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Norbert Loxen, Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiSHA1
- *
- */
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/sisha1.h"
-#include "dcmtk/dcmdata/dcerror.h"
-
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
-
-BEGIN_EXTERN_C
-#include <openssl/sha.h>
-END_EXTERN_C
-
-SiSHA1::SiSHA1()
-: ctx(new SHA_CTX())
-{
-  initialize();
-}
-
-SiSHA1::~SiSHA1()
-{
-  delete ctx;
-}
-
-unsigned long SiSHA1::getSize() const
-{
-  return SHA_DIGEST_LENGTH;
-}
-
-OFCondition SiSHA1::initialize()
-{
-  SHA1_Init(ctx);
-  return EC_Normal;
-}
-
-OFCondition SiSHA1::digest(const unsigned char *data, unsigned long length)
-{
-  if (length == 0) return EC_Normal;
-  if ((data == NULL)||(ctx == NULL)) return EC_IllegalCall;
-  SHA1_Update(ctx, data, length);
-  return EC_Normal;
-}
-
-OFCondition SiSHA1::finalize(unsigned char *result)
-{
-  if ((result == NULL)||(ctx == NULL)) return EC_IllegalCall;
-  SHA1_Final(result, ctx);
-  return EC_Normal;  
-}
-
-E_MACType SiSHA1::macType() const
-{
-  return EMT_SHA1;
-}
-
-const char *SiSHA1::getDefinedTerm() const
-{
-  return SI_DEFTERMS_SHA1;
-}
-
-#else /* WITH_OPENSSL */
-
-int sisha1_cc_dummy_to_keep_linker_from_moaning = 0;
-
-#endif
diff --git a/dcmsign/libsrc/sisha256.cc b/dcmsign/libsrc/sisha256.cc
deleted file mode 100644 (file)
index 0900ec7..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *
- *  Copyright (C) 2016, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiSHA256
- *
- */
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/sisha256.h"
-#include "dcmtk/dcmdata/dcerror.h"
-
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
-
-BEGIN_EXTERN_C
-#include <openssl/sha.h>
-END_EXTERN_C
-
-SiSHA256::SiSHA256()
-: ctx(new SHA256_CTX())
-{
-  initialize();
-}
-
-SiSHA256::~SiSHA256()
-{
-  delete ctx;
-}
-
-unsigned long SiSHA256::getSize() const
-{
-  return SHA256_DIGEST_LENGTH;
-}
-
-OFCondition SiSHA256::initialize()
-{
-  SHA256_Init(ctx);
-  return EC_Normal;
-}
-
-OFCondition SiSHA256::digest(const unsigned char *data, unsigned long length)
-{
-  if (length == 0) return EC_Normal;
-  if ((data == NULL)||(ctx == NULL)) return EC_IllegalCall;
-  SHA256_Update(ctx, data, length);
-  return EC_Normal;
-}
-
-OFCondition SiSHA256::finalize(unsigned char *result)
-{
-  if ((result == NULL)||(ctx == NULL)) return EC_IllegalCall;
-  SHA256_Final(result, ctx);
-  return EC_Normal;  
-}
-
-E_MACType SiSHA256::macType() const
-{
-  return EMT_SHA256;
-}
-
-const char *SiSHA256::getDefinedTerm() const
-{
-  return SI_DEFTERMS_SHA256;
-}
-
-#else /* WITH_OPENSSL */
-
-int sisha256_cc_dummy_to_keep_linker_from_moaning = 0;
-
-#endif
diff --git a/dcmsign/libsrc/sisha384.cc b/dcmsign/libsrc/sisha384.cc
deleted file mode 100644 (file)
index 67ca32d..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *
- *  Copyright (C) 2016-2018, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiSHA384
- *
- */
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/sisha384.h"
-#include "dcmtk/dcmdata/dcerror.h"
-
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
-
-BEGIN_EXTERN_C
-#include <openssl/sha.h>
-END_EXTERN_C
-
-
-SiSHA384::SiSHA384()
-: ctx(new SHA512_CTX())
-{
-  initialize();
-}
-
-SiSHA384::~SiSHA384()
-{
-  delete ctx;
-}
-
-unsigned long SiSHA384::getSize() const
-{
-  return SHA384_DIGEST_LENGTH;
-}
-
-OFCondition SiSHA384::initialize()
-{
-  SHA384_Init(ctx);
-  return EC_Normal;
-}
-
-OFCondition SiSHA384::digest(const unsigned char *data, unsigned long length)
-{
-  if (length == 0) return EC_Normal;
-  if ((data == NULL)||(ctx == NULL)) return EC_IllegalCall;
-  SHA384_Update(ctx, data, length);
-  return EC_Normal;
-}
-
-OFCondition SiSHA384::finalize(unsigned char *result)
-{
-  if ((result == NULL)||(ctx == NULL)) return EC_IllegalCall;
-  SHA384_Final(result, ctx);
-  return EC_Normal;
-}
-
-E_MACType SiSHA384::macType() const
-{
-  return EMT_SHA384;
-}
-
-const char *SiSHA384::getDefinedTerm() const
-{
-  return SI_DEFTERMS_SHA384;
-}
-
-#else /* WITH_OPENSSL */
-
-int sisha384_cc_dummy_to_keep_linker_from_moaning = 0;
-
-#endif
diff --git a/dcmsign/libsrc/sisha512.cc b/dcmsign/libsrc/sisha512.cc
deleted file mode 100644 (file)
index 3b08cf1..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- *
- *  Copyright (C) 2016, OFFIS e.V.
- *  All rights reserved.  See COPYRIGHT file for details.
- *
- *  This software and supporting documentation were developed by
- *
- *    OFFIS e.V.
- *    R&D Division Health
- *    Escherweg 2
- *    D-26121 Oldenburg, Germany
- *
- *
- *  Module: dcmsign
- *
- *  Author: Marco Eichelberg
- *
- *  Purpose:
- *    classes: SiSHA512
- *
- */
-
-#include "dcmtk/config/osconfig.h"
-
-#ifdef WITH_OPENSSL
-
-#include "dcmtk/dcmsign/sisha512.h"
-#include "dcmtk/dcmdata/dcerror.h"
-
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
-
-BEGIN_EXTERN_C
-#include <openssl/sha.h>
-END_EXTERN_C
-
-SiSHA512::SiSHA512()
-: ctx(new SHA512_CTX())
-{
-  initialize();
-}
-
-SiSHA512::~SiSHA512()
-{
-  delete ctx;
-}
-
-unsigned long SiSHA512::getSize() const
-{
-  return SHA512_DIGEST_LENGTH;
-}
-
-OFCondition SiSHA512::initialize()
-{
-  SHA512_Init(ctx);
-  return EC_Normal;
-}
-
-OFCondition SiSHA512::digest(const unsigned char *data, unsigned long length)
-{
-  if (length == 0) return EC_Normal;
-  if ((data == NULL)||(ctx == NULL)) return EC_IllegalCall;
-  SHA512_Update(ctx, data, length);
-  return EC_Normal;
-}
-
-OFCondition SiSHA512::finalize(unsigned char *result)
-{
-  if ((result == NULL)||(ctx == NULL)) return EC_IllegalCall;
-  SHA512_Final(result, ctx);
-  return EC_Normal;  
-}
-
-E_MACType SiSHA512::macType() const
-{
-  return EMT_SHA512;
-}
-
-const char *SiSHA512::getDefinedTerm() const
-{
-  return SI_DEFTERMS_SHA512;
-}
-
-#else /* WITH_OPENSSL */
-
-int sisha512_cc_dummy_to_keep_linker_from_moaning = 0;
-
-#endif
index ab6a524c2140ce42c9b09bf60ccea1be451b77ad..2fe31dbec90f94e80f14ec0774125c4bc8ba1113 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, OFFIS e.V.
+ *  Copyright (C) 2019-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcerror.h"
 #include "dcmtk/dcmdata/dcitem.h"
 #include "dcmtk/dcmdata/dcdeftag.h"
-#include "dcmtk/dcmsign/simd5.h"
-#include "dcmtk/dcmsign/siripemd.h"
-#include "dcmtk/dcmsign/sisha1.h"
-#include "dcmtk/dcmsign/sisha256.h"
-#include "dcmtk/dcmsign/sisha384.h"
-#include "dcmtk/dcmsign/sisha512.h"
+#include "dcmtk/dcmsign/simdmac.h"
 #include "dcmtk/dcmsign/sicert.h"
 #include "dcmtk/dcmsign/sicertvf.h"
 #include "dcmtk/dcmsign/dcsignat.h"
@@ -48,16 +43,43 @@ BEGIN_EXTERN_C
 #include <openssl/x509.h>
 END_EXTERN_C
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#ifndef HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTBEFORE
 #define X509_get0_notBefore(x) X509_get_notBefore(x)
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_X509_GET0_NOTAFTER
 #define X509_get0_notAfter(x) X509_get_notAfter(x)
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_STATUS
 #define TS_STATUS_INFO_get0_status(x) (x)->status
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_TEXT
 #define TS_STATUS_INFO_get0_text(x) (x)->text
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_TS_STATUS_INFO_GET0_FAILURE_INFO
 #define TS_STATUS_INFO_get0_failure_info(x) (x)->failure_info
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTS_SET_CERTS
 #define TS_VERIFY_CTS_set_certs(x,y) ((x)->certs = (y))
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_DATA
 #define TS_VERIFY_CTX_set_data(x,y) ((x)->data = (y))
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_FLAGS
 #define TS_VERIFY_CTX_set_flags(x,y) ((x)->flags = (y))
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_TS_VERIFY_CTX_SET_STORE
 #define TS_VERIFY_CTX_set_store(x,y) ((x)->store = (y))
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_ASN1_STRING_GET0_DATA
 #define ASN1_STRING_get0_data(x) ASN1_STRING_data((asn1_string_st*)x)
 #endif
 
@@ -158,27 +180,27 @@ OFCondition SiTimeStamp::create_ts_query(
   switch (tsq_mac_)
   {
     case EMT_SHA1:
-      mac = new SiSHA1();
+      mac = new SiMDMAC(EMT_SHA1);
       evpmd = EVP_sha1();
       break;
     case EMT_RIPEMD160:
-      mac = new SiRIPEMD160();
+      mac = new SiMDMAC(EMT_RIPEMD160);
       evpmd = EVP_ripemd160();
       break;
     case EMT_MD5:
-      mac = new SiMD5();
+      mac = new SiMDMAC(EMT_MD5);
       evpmd = EVP_md5();
       break;
     case EMT_SHA256:
-      mac = new SiSHA256();
+      mac = new SiMDMAC(EMT_SHA256);
       evpmd = EVP_sha256();
       break;
     case EMT_SHA384:
-      mac = new SiSHA384();
+      mac = new SiMDMAC(EMT_SHA384);
       evpmd = EVP_sha384();
       break;
     case EMT_SHA512:
-      mac = new SiSHA512();
+      mac = new SiMDMAC(EMT_SHA512);
       evpmd = EVP_sha512();
       break;
     default:
@@ -619,7 +641,7 @@ OFCondition SiTimeStamp::check_ts_response(
   SiMAC *mac = NULL;
   if (result.good())
   {
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#ifndef HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM
     ASN1_OBJECT *mac_oid = NULL;
     void *ppval = NULL;
 #else
@@ -640,22 +662,22 @@ OFCondition SiTimeStamp::check_ts_response(
       switch (mac_nid)
       {
         case NID_sha1:
-          mac = new SiSHA1();
+          mac = new SiMDMAC(EMT_SHA1);
           break;
         case NID_ripemd160:
-          mac = new SiRIPEMD160();
+          mac = new SiMDMAC(EMT_RIPEMD160);
           break;
         case NID_md5:
-          mac = new SiMD5();
+          mac = new SiMDMAC(EMT_MD5);
           break;
         case NID_sha256:
-          mac = new SiSHA256();
+          mac = new SiMDMAC(EMT_SHA256);
           break;
         case NID_sha384:
-          mac = new SiSHA384();
+          mac = new SiMDMAC(EMT_SHA384);
           break;
         case NID_sha512:
-          mac = new SiSHA512();
+          mac = new SiMDMAC(EMT_SHA512);
           break;
         default:
           DCMSIGN_ERROR("timestamp response validation failed: unsupported MAC algorithm " << ( mac_name ? mac_name : "(unknown)") << " in timestamp response");
@@ -1205,7 +1227,7 @@ OFCondition SiTimeStamp::verifyTSSignature(SiCertificateVerifier& cv)
       DCMSIGN_INFO("      Validity                : not before " << aString);
       cert.getCertValidityNotAfter(aString);
       DCMSIGN_INFO("      Validity                : not after " << aString);
-      const char *ecname = NULL;
+      OFString ecname;
       switch (cert.getKeyType())
       {
         case EKT_RSA:
@@ -1216,7 +1238,7 @@ OFCondition SiTimeStamp::verifyTSSignature(SiCertificateVerifier& cv)
           break;
         case EKT_EC:
           ecname = cert.getCertCurveName();
-          if (ecname)
+          if (ecname.length() > 0)
           {
             DCMSIGN_INFO("      Public key              : EC, curve " << ecname << ", " << cert.getCertKeyBits() << " bits");
           }
@@ -1282,12 +1304,9 @@ OFCondition SiTimeStamp::verifyTSToken(
 
     if (result.good())
     {
-
-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
+      // In OpenSSL 1.0.1 and earlier, the first parameter was not const
+      // We cast the const away, which should work with old and new versions
       BIO *bio = BIO_new_mem_buf(OFconst_cast(Uint8 *, signature), sigLength);
-#else
-      BIO *bio = BIO_new_mem_buf(signature, sigLength);
-#endif
       if (bio)
       {
         // set the digital signature as the raw data against which
index c0224bfa5186b84650eb7db8a2a034516db2a522..120e7f115acd6c7956356b78f1371ccfde696902 100644 (file)
@@ -1,6 +1,6 @@
 # declare executables
 foreach(PROGRAM dsr2html dsr2xml dsrdump xml2dsr)
-  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM})
+  DCMTK_ADD_EXECUTABLE(${PROGRAM} ${PROGRAM}.cc)
 endforeach()
 
 # make sure executables are linked to the corresponding libraries
index 83bdc066fd928265ee4540d89684dd70f5ee2967..302a0477b9e54e922a9510e1caa80fbb6e6c19ac 100644 (file)
@@ -5,12 +5,12 @@ dsr2html.o: dsr2html.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -84,6 +84,7 @@ dsr2html.o: dsr2html.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
@@ -111,7 +112,6 @@ dsr2html.o: dsr2html.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \
@@ -145,12 +145,12 @@ dsr2xml.o: dsr2xml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -224,6 +224,7 @@ dsr2xml.o: dsr2xml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
@@ -251,7 +252,6 @@ dsr2xml.o: dsr2xml.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \
@@ -285,12 +285,12 @@ dsrdump.o: dsrdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -364,6 +364,7 @@ dsrdump.o: dsrdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
@@ -391,7 +392,6 @@ dsrdump.o: dsrdump.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \
@@ -425,12 +425,12 @@ xml2dsr.o: xml2dsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -504,6 +504,7 @@ xml2dsr.o: xml2dsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
@@ -531,7 +532,6 @@ xml2dsr.o: xml2dsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \
index 1c8b44c7915fcf3d069992b77528cf9be1470e14..a952d426fb01bab1165e0bb979df0c4ce115c76a 100644 (file)
@@ -10,7 +10,7 @@
   <xsd:annotation>
     <xsd:documentation xml:lang="en">
       XML Schema for DCMTK tools dsr2xml and xml2dsr.
-      Copyright (C) 2003-2019, OFFIS e.V. and J. Riesmeier
+      Copyright (C) 2003-2021, OFFIS e.V. and J. Riesmeier
       All rights reserved.  See COPYRIGHT file for details.
     </xsd:documentation>
   </xsd:annotation>
@@ -91,6 +91,9 @@
         </xsd:complexType>
       </xsd:element>
       <xsd:element name="sex" type="dsr:Sex" minOccurs="0"/>
+      <!-- strictly speaking, Patient's Size and Weight belong to the Study IE -->
+      <xsd:element name="size" type="dsr:DecimalString" minOccurs="0"/>
+      <xsd:element name="weight" type="dsr:DecimalString" minOccurs="0"/>
     </xsd:sequence>
   </xsd:complexType>
 
       <xsd:enumeration value="Colon CAD SR"/>
       <xsd:enumeration value="Procedure Log"/>
       <xsd:enumeration value="X-Ray Radiation Dose SR"/>
+      <xsd:enumeration value="Enhanced X-Ray Radiation Dose SR"/>
       <xsd:enumeration value="Spectacle Prescription Report"/>
       <xsd:enumeration value="Macular Grid Thickness and Volume Report"/>
       <xsd:enumeration value="Implantation Plan SR Document"/>
index 1a62fb1ab513a4e780544ffa6f24a59a991d3a35..89b3a10c770df67403a5f5953cb3a623616bdfbd 100644 (file)
@@ -356,6 +356,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dsr2html_copyright COPYRIGHT
 
-Copyright (C) 2000-2019 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2000-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 233d11683d439ef4788258b946f4635ec3058229..db7f1a4b312f49bf777becd1569df2b61dec5bd7 100644 (file)
@@ -344,6 +344,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dsr2xml_copyright COPYRIGHT
 
-Copyright (C) 2000-2019 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2000-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 56dac7a353fd258edc20d77b256b2d3ef205aad7..f84f0cde8154d5050a8f2c6ea8359dd92f42b1fb 100644 (file)
@@ -294,6 +294,6 @@ It is an error if no data dictionary can be loaded.
 
 \section dsrdump_copyright COPYRIGHT
 
-Copyright (C) 2000-2019 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2000-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index e73e6f67b81d98489b4b373ade94b3931ecd10fd..bfb99004777640e3ca449c5168cb8a034ea53fd5 100644 (file)
@@ -310,6 +310,6 @@ It is an error if no data dictionary can be loaded.
 
 \section xml2dsr_copyright COPYRIGHT
 
-Copyright (C) 2003-2019 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 2003-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 481ff731f0212ad80afc0c8ebed622f7a2fed5a9..bfc7afccad80c066f1533b87e341de1d253baaff 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID100_QuantitativeDiagnosticImagingProcedures
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:49 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:10 by J. Riesmeier
  *
  */
 
@@ -28,7 +28,7 @@
 
 /** Implementation of DCMR Context Group:
  *  CID 100 - Quantitative Diagnostic Imaging Procedures.
- *  (type: extensible, version: 20190817)
+ *  (type: extensible, version: 20210905)
  */
 class DCMTK_CMR_EXPORT CID100_QuantitativeDiagnosticImagingProcedures
   : public DSRContextGroup
@@ -46,7 +46,7 @@ class DCMTK_CMR_EXPORT CID100_QuantitativeDiagnosticImagingProcedures
         MagneticResonanceImagingGuidance,
         /// (126020,DCM,"Multiparametric MRI")
         MultiparametricMRI,
-        /// (126021,DCM,"Multiparametric MRI of prostate")
+        /// (719178004,SCT,"Multiparametric MRI of prostate")
         MultiparametricMRIOfProstate,
         /// (126022,DCM,"Multiparametric MRI of whole body")
         MultiparametricMRIOfWholeBody,
index b30ac7165abe2d72e1405cbf5957312701cab317..3228a9a535c9d2189d3eb8ac908f608b266a4b25 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID10013_CTAcquisitionType
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:16 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:20 by J. Riesmeier
  *
  */
 
index 0b7866ea4491bf0d88fc618a0e6cf9dc6ab846b0..273f50ecb2fd4e0d90eafb8b4557720fdd9dda2f 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID10033_CTReconstructionAlgorithm
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:18 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:21 by J. Riesmeier
  *
  */
 
index e71165adeac1d2cb739f45e2555808693df64975..537db9d6890094341b55bf2c2f0a76e6cb39e283 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID11_RouteOfAdministration
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:44 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:08 by J. Riesmeier
  *
  */
 
index 63a057cfc888825c6dffc29e9a60de44e3d3eb79..d8f4fed1d68c57b74afb70bac21cfc8c6a196829 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID244_Laterality
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:51 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:11 by J. Riesmeier
  *
  */
 
diff --git a/dcmsr/include/dcmtk/dcmsr/cmr/cid247.h b/dcmsr/include/dcmtk/dcmsr/cmr/cid247.h
new file mode 100644 (file)
index 0000000..2abca0c
--- /dev/null
@@ -0,0 +1,160 @@
+/*
+ *
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  Header file for class CID247_LateralityLeftRightOnly
+ *
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:11 by J. Riesmeier
+ *
+ */
+
+
+#ifndef CMR_CID247_H
+#define CMR_CID247_H
+
+#include "dcmtk/config/osconfig.h"   /* make sure OS specific configuration is included first */
+
+#include "dcmtk/dcmsr/dsrctxgr.h"
+#include "dcmtk/dcmsr/cmr/define.h"
+
+#include "dcmtk/ofstd/ofmap.h"
+
+
+/*---------------------*
+ *  class declaration  *
+ *---------------------*/
+
+/** Implementation of DCMR Context Group:
+ *  CID 247 - Laterality Left-Right Only.
+ *  (type: extensible, version: 20190524)
+ */
+class DCMTK_CMR_EXPORT CID247_LateralityLeftRightOnly
+  : public DSRContextGroup
+{
+
+  public:
+
+    /** types of laterality left-right only
+     */
+    enum EnumType
+    {
+        /// (24028007,SCT,"Right")
+        Right,
+        /// (7771000,SCT,"Left")
+        Left
+    };
+
+    /** (default) constructor
+     ** @param  selectedValue  coded entry to be selected as the current value (optional).
+     *                         Should be a valid code according to the DICOM definitions
+     *                         for this context group, i.e. no checks are performed.
+     *                         Call DSRContextGroup::checkSelectedValue() if needed.
+     */
+    CID247_LateralityLeftRightOnly(const DSRCodedEntryValue &selectedValue = DSRCodedEntryValue());
+
+    /** constructor
+     ** @param  selectedValue         type mapped to a coded entry that is selected as the
+     *                                current value
+     ** @param  enhancedEncodingMode  set enhanced encoding mode for coded entry (if enabled)
+     */
+    CID247_LateralityLeftRightOnly(const EnumType selectedValue,
+                                   const OFBool enhancedEncodingMode = OFFalse);
+
+    /** select a coded entry given by its type as the current value
+     ** @param  selectedValue         type mapped to a coded entry that is selected as the
+     *                                current value
+     *  @param  enhancedEncodingMode  set enhanced encoding mode for coded entry (if enabled)
+     ** @return status, EC_Normal if successful, an error code otherwise
+     */
+    virtual OFCondition selectValue(const EnumType selectedValue,
+                                    const OFBool enhancedEncodingMode = OFFalse);
+
+  // --- static helper functions ---
+
+    /** initialize this context group explicitly.  Internally, the list of standard coded
+     *  entries is created and initialized by calling getCodes().
+     ** @note This function can be called multiple times but in case of multi-threaded
+     *        applications should be called at least once before any instance of this class
+     *        is actually used.  For single-threaded applications, there is no need to call
+     *        it since the initialization is done implicitly.
+     */
+    static void initialize();
+
+    /** cleanup this context group, i.e.\ delete the internal list of standard coded entries.
+     *  Usually, there is no need to call this method, but it might be useful in order to
+     *  explicitly free the associated memory, e.g. when checking for memory leaks.  The list
+     *  will be recreated automatically when needed (or when initialize() is called).
+     */
+    static void cleanup();
+
+    /** map a given type to the associated coded entry
+     ** @param  value                 type that should be mapped to a coded entry
+     *  @param  enhancedEncodingMode  set enhanced encoding mode for coded entry (if enabled)
+     ** @return coded entry that is associated with the given type
+     */
+    static DSRCodedEntryValue getCodedEntry(const EnumType value,
+                                            const OFBool enhancedEncodingMode = OFFalse);
+
+  // --- reintroduce methods from base class
+
+     using DSRContextGroup::selectValue;
+     using DSRContextGroup::findCodedEntry;
+
+
+  protected:
+
+    /// type used for storing and managing the coded entries
+    typedef OFMap<EnumType, DSRBasicCodedEntry> CodeList;
+
+    /** print details on coded entries that are contained in this context group.
+     *  See DSRCodedEntryValue::print() for details of the coded entry output.
+     ** @param  stream  stream to which the output should be printed
+     */
+    virtual void printCodes(STD_NAMESPACE ostream &stream) const;
+
+    /** search for a given coded entry in this context group
+     ** @param  searchForCodedEntry   coded entry to be searched for
+     *  @param  foundCodedEntry       pointer to variable that will store the coded entry
+     *                                (if found and pointer is not NULL)
+     *  @param  enhancedEncodingMode  set enhanced encoding mode for coded entry (if enabled)
+     ** @return result of the search process, also defines the type of the entry
+     */
+    virtual OFCondition findCodedEntry(const DSRCodedEntryValue &searchForCodedEntry,
+                                       DSRCodedEntryValue *foundCodedEntry,
+                                       const OFBool enhancedEncodingMode = OFFalse) const;
+
+  // --- static helper function ---
+
+    /** get list of standard coded entries that are managed by this context group.
+     *  Internally, the singleton pattern is used, so the list is initialized only once.
+     *  Please note that this function is not thread-safe.  Therefore, the initialize()
+     *  function can be called before any instance of this class is actually used.
+     ** @return reference to list of coded entries managed by this context group
+     */
+    static CodeList &getCodes();
+
+    /** set the "Enhanced Encoding Mode" for a given coded entry
+     ** @param  codedEntryValue  coded entry for which the enhanced encoding mode is set
+     ** @return status, EC_Normal if successful, an error code otherwise
+     */
+    static OFCondition setEnhancedEncodingMode(DSRCodedEntryValue &codedEntryValue);
+
+
+  private:
+
+    /// pointer to internal code list (use a static variable for singleton pattern)
+    static CodeList *Codes;
+};
+
+
+/*-------------------*
+ *  type definition  *
+ *-------------------*/
+
+// define short name for the context group class
+typedef CID247_LateralityLeftRightOnly CMR_CID247;
+
+
+#endif
index 6428318470e1b16cf37e6af16ebe99c90339c351..416f6242e4cfd00e9cac7185701050299ba0d803 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID29_AcquisitionModality
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:45 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:09 by J. Riesmeier
  *
  */
 
index e9ebfb44741a09c337fda513d387c32b8060a461..3c53fdc8e016a4af88f727f330d302de97a64500 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID4020_PETRadionuclide
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:55 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:12 by J. Riesmeier
  *
  */
 
index 1242c5a81f32e8fc3d3481e9bd1ecd4ae881f614..5a33fde9d389fc94e02efe54e454a396087243fb 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID4021_PETRadiopharmaceutical
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:57 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:13 by J. Riesmeier
  *
  */
 
@@ -40,8 +40,6 @@ class DCMTK_CMR_EXPORT CID4021_PETRadiopharmaceutical
      */
     enum EnumType
     {
-        /// (C000591008,MSH,"^18^Fluorine flortaucipir")
-        _18_FluorineFlortaucipir,
         /// (126752,DCM,"28H1 ^89^Zr")
         _28H1_89Zr,
         /// (126713,DCM,"2FA F^18^")
index 28e324ef899fee2409a7b878a356c92cd4be8897..4a9d2c7b6936dabe6fe5326a2c7b438c9d3033f9 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID4031_CommonAnatomicRegions
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:59 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:14 by J. Riesmeier
  *
  */
 
@@ -28,7 +28,7 @@
 
 /** Implementation of DCMR Context Group:
  *  CID 4031 - Common Anatomic Regions.
- *  (type: extensible, version: 20200704)
+ *  (type: extensible, version: 20210120)
  */
 class DCMTK_CMR_EXPORT CID4031_CommonAnatomicRegions
   : public DSRContextGroup
@@ -54,6 +54,8 @@ class DCMTK_CMR_EXPORT CID4031_CommonAnatomicRegions
         ApexOfLung,
         /// (28273000,SCT,"Bile duct")
         BileDuct,
+        /// (34707002,SCT,"Biliary tract")
+        BiliaryTract,
         /// (89837001,SCT,"Bladder")
         Bladder,
         /// (72001000,SCT,"Bone of lower limb")
index 6e2df82ed30c6e604c7f39dab1c11e0d5c2b50ae..a01890ccb87b27fd3711181159b4dcc9bf320f07 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID42_NumericValueQualifier
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:47 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:09 by J. Riesmeier
  *
  */
 
@@ -40,29 +40,29 @@ class DCMTK_CMR_EXPORT CID42_NumericValueQualifier
      */
     enum EnumType
     {
-        /// (114000,DCM,"Not a number")
+        /// (114000,DCM,"Not a number"), included from CID 43
         NotANumber,
-        /// (114001,DCM,"Negative Infinity")
+        /// (114001,DCM,"Negative Infinity"), included from CID 43
         NegativeInfinity,
-        /// (114002,DCM,"Positive Infinity")
+        /// (114002,DCM,"Positive Infinity"), included from CID 43
         PositiveInfinity,
-        /// (114003,DCM,"Divide by zero")
+        /// (114003,DCM,"Divide by zero"), included from CID 43
         DivideByZero,
-        /// (114004,DCM,"Underflow")
+        /// (114004,DCM,"Underflow"), included from CID 43
         Underflow,
-        /// (114005,DCM,"Overflow")
+        /// (114005,DCM,"Overflow"), included from CID 43
         Overflow,
-        /// (114006,DCM,"Measurement failure")
+        /// (114006,DCM,"Measurement failure"), included from CID 43
         MeasurementFailure,
-        /// (114007,DCM,"Measurement not attempted")
-        MeasurementNotAttempted,
-        /// (114008,DCM,"Calculation failure")
+        /// (114008,DCM,"Calculation failure"), included from CID 43
         CalculationFailure,
-        /// (114009,DCM,"Value out of range")
+        /// (114009,DCM,"Value out of range"), included from CID 43
         ValueOutOfRange,
-        /// (114010,DCM,"Value unknown")
+        /// (114007,DCM,"Measurement not attempted"), included from CID 44
+        MeasurementNotAttempted,
+        /// (114010,DCM,"Value unknown"), included from CID 44
         ValueUnknown,
-        /// (114011,DCM,"Value indeterminate")
+        /// (114011,DCM,"Value indeterminate"), included from CID 44
         ValueIndeterminate
     };
 
index 7fc03e4e43ed0a4e271078509be7cf50509ddf79..3d73d832e8eea3ffeafd66a0e52182b8ed64c6d8 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID6147_ResponseCriteria
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:01 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:14 by J. Riesmeier
  *
  */
 
index a99eb4bec8d2dae948fc4a36db08a5f1593109ec..8466ddf01a3f06ceac9e98d14b245d2de1e13543 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID7021_MeasurementReportDocumentTitles
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:03 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:15 by J. Riesmeier
  *
  */
 
index 048c916e4f7f9abc95eed2b4119ffae86d1aa498..f49ec950577b41ce29692cfaa0a389f0ce2d355a 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID7181_AbstractMultiDimensionalImageModelComponentUnits
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:05 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:16 by J. Riesmeier
  *
  */
 
index 2567e285a78290d86be6e8d683a270135af84810..473dfe2f8ab2e8d004c3c2e6b8bcdf88af239ce9 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID7445_DeviceParticipatingRoles
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:06 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:16 by J. Riesmeier
  *
  */
 
index b64e0fc25a9f40d18469363e792000ad80472f39..d67574ea435ada403f0ea0334793829d9ea8431a 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID7452_OrganizationalRoles
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:08 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:17 by J. Riesmeier
  *
  */
 
index d7160ceb0c335011d4bf955b20d53461cd4e4c67..3f174aa23684925b5ef16d1e03dcefdfc8e51b8b 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID7453_PerformingRoles
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:10 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:18 by J. Riesmeier
  *
  */
 
index 14cdd9dd2cc4ccf1f968dc814e42e3f373b8fdd0..235c288f64994e98e7a6d6027e119ceaa444f54c 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID7464_GeneralRegionOfInterestMeasurementModifiers
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:12 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:19 by J. Riesmeier
  *
  */
 
index f71d08601ef0233c19dbfa6388ec4a64ae37c7aa..675e5a98d29830a3ec0ec0ffe6b224beb2382440 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CID7469_GenericIntensityAndSizeMeasurements
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:14 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:20 by J. Riesmeier
  *
  */
 
index 8a1cd56e682d5cce789ff24da01de78639a91539..e941844064e1af4b5a4e0d0a3cba7f6360a510cc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CMR_SRNumericMeasurementValue
@@ -50,10 +50,10 @@ class DCMTK_CMR_EXPORT CMR_SRNumericMeasurementValue
                                   const OFBool check = OFTrue);
 
     /** constructor
-     ** @param  valueQualifier  code representing the numeric value qualifier.  Used to
-     *                          specify the reason for the absence of the measured value
-     *                          sequence, i.e. why the numeric value and measurement unit
-     *                          are empty.
+     ** @param  valueQualifier  code representing the numeric value qualifier (mandatory).
+     *                          Used to specify the reason for the absence of the measured
+     *                          value sequence, i.e. why the numeric value and measurement
+     *                          unit are empty.
      *  @param  check           if enabled, check value for validity before setting it.
      *                          See corresponding setValue() method for details.
      */
@@ -63,10 +63,7 @@ class DCMTK_CMR_EXPORT CMR_SRNumericMeasurementValue
     /** constructor
      ** @param  numericValue     numeric value (VR=DS, mandatory)
      *  @param  measurementUnit  code representing the units of measurement (mandatory)
-     *  @param  valueQualifier   code representing the numeric value qualifier (optional).
-     *                           Can also be used to specify the reason for the absence of
-     *                           the measured value sequence (where 'numericValue' and
-     *                           'measurementUnit' are stored).
+     *  @param  valueQualifier   code representing the numeric value qualifier (optional)
      *  @param  check            if enabled, check values for validity before setting them.
      *                           See corresponding setValue() method for details.
      */
@@ -117,10 +114,8 @@ class DCMTK_CMR_EXPORT CMR_SRNumericMeasurementValue
      *  needed.
      ** @param  numericValue     numeric value to be set (VR=DS, mandatory)
      *  @param  measurementUnit  measurement unit to be set (mandatory)
-     *  @param  valueQualifier   numeric value qualifier to be set (optional).  Can also be
-     *                           used to specify the reason for the absence of the measured
-     *                           value sequence (where 'numericValue' and 'measurementUnit'
-     *                           are stored).  Use an empty code to remove the current value.
+     *  @param  valueQualifier   numeric value qualifier to be set (optional).
+     *                           Use an empty code to remove the current value.
      *  @param  check            if enabled, check values for validity before setting them.
      *                           See checkXXX() methods for details.
      ** @return status, EC_Normal if successful, an error code otherwise
@@ -135,8 +130,8 @@ class DCMTK_CMR_EXPORT CMR_SRNumericMeasurementValue
      *  Value Sequence, or the reason for the absence of the Measured Value Sequence Item.
      *  Before setting the code, it is usually checked.  If the code is invalid the current
      *  code is not replaced and remains unchanged.
-     ** @param  valueQualifier  numeric value qualifier to be set (optional).  Use an empty
-     *                          code to remove the current value.
+     ** @param  valueQualifier  numeric value qualifier to be set (conditional).
+     *                          Use an empty code to remove the current value.
      *  @param  check           if enabled, check value for validity before setting it.
      *                          See checkNumericValueQualifier() method for details.
      ** @return status, EC_Normal if successful, an error code otherwise
index 2838da0026aadbe42a4116056a4ad36158e23529..dd7c7694de5f819e69b1ae0eaf811700b766cbf0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2016-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class CMR_SRNumericMeasurementValueWithUnits
@@ -56,10 +56,10 @@ class CMR_SRNumericMeasurementValueWithUnits
                                            const OFBool check = OFTrue);
 
     /** constructor
-     ** @param  valueQualifier  code representing the numeric value qualifier.  Used to
-     *                          specify the reason for the absence of the measured value
-     *                          sequence, i.e. why the numeric value and measurement unit
-     *                          are empty.
+     ** @param  valueQualifier  code representing the numeric value qualifier (mandatory).
+     *                          Used to specify the reason for the absence of the measured
+     *                          value sequence, i.e. why the numeric value and measurement
+     *                          unit are empty.
      *  @param  check           if enabled, check value for validity before setting it.
      *                          See corresponding setValue() method for details.
      */
@@ -69,10 +69,7 @@ class CMR_SRNumericMeasurementValueWithUnits
     /** constructor
      ** @param  numericValue     numeric value (VR=DS, mandatory)
      *  @param  measurementUnit  code representing the units of measurement (mandatory)
-     *  @param  valueQualifier   code representing the numeric value qualifier (optional).
-     *                           Can also be used to specify the reason for the absence of
-     *                           the measured value sequence (where 'numericValue' and
-     *                           'measurementUnit' are stored).
+     *  @param  valueQualifier   code representing the numeric value qualifier (optional)
      *  @param  check            if enabled, check values for validity before setting them.
      *                           See corresponding setValue() method for details.
      */
@@ -126,10 +123,8 @@ class CMR_SRNumericMeasurementValueWithUnits
      *  needed.
      ** @param  numericValue     numeric value to be set (VR=DS, mandatory)
      *  @param  measurementUnit  measurement unit to be set (mandatory)
-     *  @param  valueQualifier   numeric value qualifier to be set (optional).  Can also be
-     *                           used to specify the reason for the absence of the measured
-     *                           value sequence (where 'numericValue' and 'measurementUnit'
-     *                           are stored).  Use an empty code to remove the current value.
+     *  @param  valueQualifier   numeric value qualifier to be set (optional).
+     *                           Use an empty code to remove the current value.
      *  @param  check            if enabled, check values for validity before setting them.
      *                           See checkXXX() methods for details.
      ** @return status, EC_Normal if successful, an error code otherwise
index 98a653b5cb5d8983df8140aa806600816354ab70..22da61644a827e55de2578f6bec20664bca623aa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016-2017, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2016-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class TID1411_VolumetricROIMeasurements
@@ -82,8 +82,7 @@ class DCMTK_CMR_EXPORT TID1411_VolumetricROIMeasurements
     /** check whether the current internal state is valid.
      *  That means, whether the base class is valid and whether all mandatory content
      *  items and included templates are valid (present), i.e. hasMeasurementGroup(),
-     *  hasTrackingIdentifier(), hasTrackingUniqueIdentifier(), hasReferencedSegment(),
-     *  hasSourceSeriesForSegmentation() and hasROIMeasurements() return true.
+     *  hasReferencedSegment() and hasSourceSeriesForSegmentation() return true.
      ** @return OFTrue if valid, OFFalse otherwise
      */
     OFBool isValid() const;
@@ -102,13 +101,13 @@ class DCMTK_CMR_EXPORT TID1411_VolumetricROIMeasurements
     OFBool hasMeasurementGroup(const OFBool checkChildren = OFFalse) const;
 
     /** check whether the 'Tracking Identifier' content item (TID 1411 - Row 2) is
-     *  present.  This content item is mandatory, i.e. should be present with a value.
+     *  present.  This content item is optional, i.e. might be absent.
      ** @return OFTrue if the tracking identifier is present, OFFalse otherwise
      */
     OFBool hasTrackingIdentifier() const;
 
     /** check whether the 'Tracking Unique Identifier' content item (TID 1411 - Row 3) is
-     *  present.  This content item is mandatory, i.e. should be present with a value.
+     *  present.  This content item is optional, i.e. might be absent.
      ** @return OFTrue if the tracking unique identifier is present, OFFalse otherwise
      */
     OFBool hasTrackingUniqueIdentifier() const;
@@ -127,10 +126,10 @@ class DCMTK_CMR_EXPORT TID1411_VolumetricROIMeasurements
     OFBool hasSourceSeriesForSegmentation() const;
 
     /** check whether there is an included 'ROI Measurements' template (TID 1411 -
-     *  Row 15) in this measurement template.  Initially, this mandatory sub-template
-     *  is created and included by the constructor of this class.  After clear() has
-     *  been called, the content item has to be recreated, which is done automatically
-     *  when needed.
+     *  Row 15) in this measurement template.  Initially, the optional sub-template
+     *  TID 1419 is created and included by the constructor of this class.  After clear()
+     *  has been called, the content item has to be recreated, which is done
+     *  automatically when needed.
      ** @param  checkChildren  flag, which is enabled by default, indicating whether to
      *                         check for any children, i.e.\ whether the respective
      *                         sub-template has any content (child nodes).  If OFFalse,
@@ -141,7 +140,8 @@ class DCMTK_CMR_EXPORT TID1411_VolumetricROIMeasurements
 
     /** get current measurement value of this measurement group as defined by TID 1419
      *  (ROI Measurements), i.e.\ the current instance of TID 1411 - Row 15.
-     *  This included template is mandatory, i.e. should be present and not be empty.
+     *  This included template is optional, i.e. might be empty and, therefore, does not
+     *  contribute any content items to the tree.
      *  Further instances can be added by calling addMeasurement().
      ** @return reference to internally managed SR template (current instance)
      */
index 23bd094417ce0c4eae16ccb6379ab672b65740a3..73ab5e91040382c0f61a4fe4a3515346c9306900 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017-2018, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2017-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class TID1419_ROIMeasurements_Measurement
@@ -102,7 +102,7 @@ class DCMTK_CMR_EXPORT TID1419_ROIMeasurements_Measurement
     }
 
     /** create a new measurement.
-     *  Clear the entire measurement and create the mandatory (and other supported) content
+     *  Clear the entire measurement and create the mandatory and other supported content
      *  items of this template, i.e.\ TID 1419 - Row 5 and 20.
      ** @param  conceptName   coded entry specifying the concept name of the measurement
      *                        (e.g.\ from the given context group 'T_Measurement')
index 9892b8d7e29b128fc145e7fa952eff116b640ce7..daa76cf1dafce0dfd259d9ad239a242028561c32 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class TID1500_MeasurementReport
@@ -105,39 +105,50 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport
 
     /** check whether the current internal state is valid.
      *  That means, check whether the base class is valid, the mandatory included
-     *  templates TID 1204, 1001 and 1600 are valid, and whether hasProcedureReported()
-     *  as well as hasImagingMeasurements() or hasQualitativeEvaluations() return true.
-     *  In addition, each of the included templates TID 1411 and 1501 should either be
-     *  empty or valid.
+     *  template TID 1001 is valid, and whether hasImagingMeasurements() or
+     *  hasQualitativeEvaluations() return true.  In addition, each of the included
+     *  templates TID 1204, 1411, 1501 and 1600 should either be empty or valid.
      ** @return OFTrue if valid, OFFalse otherwise
      */
     virtual OFBool isValid() const;
 
     /** check whether there are any 'Procedure reported' content items (TID 1500 - Row 4)
-     *  in this measurement report.  This content item is mandatory, i.e. one or more
-     *  instances of the associated content item should be present.
+     *  in this measurement report.  This content item is optional, i.e. might be absent.
      ** @return OFTrue if at least one procedure reported is present, OFFalse otherwise
      */
     OFBool hasProcedureReported() const;
 
+    /** check whether there is an included 'Image Library' template (TID 1500 - Row 8)
+     *  in this measurement report.  Initially, the optional sub-template TID 1600 is
+     *  created (without content items) and included by the constructor of this class.
+     *  After clear() has been called or no document title is passed to the constructor,
+     *  it can be created again by calling createNewMeasurementReport().
+     ** @param  checkChildren  optional flag indicating whether to also check for any
+     *                         children, i.e.\ whether the respective sub-template has
+     *                         any content (child nodes).  By default, the presence of
+     *                         the "included template" content item is checked only.
+     ** @return OFTrue if image library is present, OFFalse otherwise
+     */
+    OFBool hasImageLibrary(const OFBool checkChildren = OFFalse) const;
+
     /** check whether there is an 'Imaging Measurements' content item (TID 1500 - Row 6)
      *  in this measurement report.  Initially, this conditional content item is created
      *  by the constructor of this class.  After clear() has been called or no document
      *  title is passed to the constructor, it can be created again by calling
      *  createNewMeasurementReport().
      ** @param  checkChildren  optional flag indicating whether to also check for any
-     *                         children, i.e.\ whether the respective content item has
-     *                         child nodes.  By default, the presence of the higher-level
-     *                         CONTAINER is checked only.
+     *                         children, i.e.\ whether the respective sub-template has
+     *                         any content (child nodes).  By default, the presence of
+     *                         the "included template" content item is checked only.
      ** @return OFTrue if imaging measurements are present, OFFalse otherwise
      */
     OFBool hasImagingMeasurements(const OFBool checkChildren = OFFalse) const;
 
     /** check whether there is an included 'Volumetric ROI Measurements' template
-     *  (TID 1500 - Row 8) in this measurement report.  Initially, this optional
-     *  sub-template is created and included by the constructor of this class.  After
-     *  clear() has been called or no document title is passed to the constructor, it
-     *  can be created again by calling createNewMeasurementReport().
+     *  (TID 1500 - Row 8) in this measurement report.  Initially, the optional
+     *  sub-template TID 1511 is created and included by the constructor of this class
+     *  After clear() has been called or no document title is passed to the constructor,
+     *  it can be created again by calling createNewMeasurementReport().
      ** @param  checkChildren  optional flag indicating whether to also check for any
      *                         children, i.e.\ whether the respective sub-template has
      *                         any content (child nodes).  By default, the presence of
@@ -147,10 +158,10 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport
     OFBool hasVolumetricROIMeasurements(const OFBool checkChildren = OFFalse) const;
 
     /** check whether there is an included 'Measurement Group' template (TID 1500 -
-     *  Row 9) in this measurement report.  Initially, this optional sub-template is
-     *  created and included by the constructor of this class.  After clear() has been
-     *  called or no document title is passed to the constructor, it can be created again
-     *  by calling createNewMeasurementReport().
+     *  Row 9) in this measurement report.  Initially, the optional sub-template TID
+     *  1501 is created and included by the constructor of this class.  After clear() has
+     *  been called or no document title is passed to the constructor, it can be created
+     *  again by calling createNewMeasurementReport().
      ** @param  checkChildren  optional flag indicating whether to also check for any
      *                         children, i.e.\ whether the respective sub-template has
      *                         any content (child nodes).  By default, the presence of
@@ -170,7 +181,8 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport
     OFBool hasQualitativeEvaluations(const OFBool checkChildren = OFFalse) const;
 
     /** get language of this report as defined by TID 1204 (Language of Content Item and
-     *  Descendants).  This included template is mandatory, i.e. should not be empty.
+     *  Descendants).  This included template is optional, i.e. might be empty and,
+     *  therefore, does not contribute any content items to the tree.
      ** @return reference to internally managed SR template
      */
     inline TID1204_LanguageOfContentItemAndDescendants &getLanguage() const
@@ -188,7 +200,8 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport
     }
 
     /** get image library of this report as defined by TID 1600 (Image Library).
-     *  This included template is mandatory, i.e. should not be empty.
+     *  This included template is optional, i.e. might be empty and, therefore, does not
+     *  contribute any content items to the tree.
      ** @return reference to internally managed SR template
      */
     inline TID1600_ImageLibrary &getImageLibrary() const
@@ -198,7 +211,8 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport
 
     /** get volumetric ROI measurements of this report as defined by TID 1411 (Volumetric
      *  ROI Measurements), i.e.\ the current instance of TID 1500 - Row 8.
-     *  This included template is optional, i.e. might be empty (but not absent).
+     *  This included template is optional, i.e. might be empty and, therefore, does not
+     *  add any content items to the tree.
      *  Further instances can be added by calling addVolumetricROIMeasurements().
      ** @return reference to internally managed SR template (current instance)
      */
@@ -209,7 +223,8 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport
 
     /** get individual measurements of this report as defined by TID 1501 (Measurement
      *  Group), i.e.\ the current instance of TID 1500 - Row 9.
-     *  This included template is optional, i.e. might be empty (but not absent).
+     *  This included template is optional, i.e. might be empty and, therefore, does not
+     *  contribute any content items to the tree.
      *  Further instances can be added by calling addIndividualMeasurements().
      ** @return reference to internally managed SR template (current instance)
      */
@@ -225,7 +240,7 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport
     OFCondition getDocumentTitle(DSRCodedEntryValue &titleCode);
 
     /** create a new measurement report.
-     *  Clear the report and create the mandatory (and other supported) content items of
+     *  Clear the report and create the mandatory and other supported content items of
      *  this template, i.e.\ TID 1500 - Row 1 to 6 and 8 to 9.
      ** @param  title  document title to be set (from CID 7021 - Measurement Report
      *                 Document Titles), i.e.\ the concept name of the root node
@@ -311,7 +326,7 @@ class DCMTK_CMR_EXPORT TID1500_MeasurementReport
 
   protected:
 
-    /** create the mandatory (and other supported) content items of this template,
+    /** create the mandatory and other supported content items of this template,
      *  i.e.\ TID 1500 - Row 1 to 6 and 8.  It is expected that the tree is currently
      *  empty.
      ** @param  title  coded entry that specifies the document title to be set
index b9349e73171bd4d568b1c5134d47f81d716db789..ece84ff2a530122842149d6abeb71647034b009a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2017-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class TID1501_MeasurementGroup
@@ -78,9 +78,8 @@ class DCMTK_CMR_EXPORT TID1501_MeasurementGroup
 
     /** check whether the current internal state is valid.
      *  That means, whether the base class is valid and whether all mandatory content
-     *  items and included templates are valid (present), i.e. hasMeasurementGroup(),
-     *  hasTrackingIdentifier(), hasTrackingUniqueIdentifier() and hasMeasurements()
-     *  return true.
+     *  items and included templates are valid (present), i.e. hasMeasurementGroup()
+     *  and hasMeasurements() return true.
      ** @return OFTrue if valid, OFFalse otherwise
      */
     OFBool isValid() const;
@@ -99,21 +98,22 @@ class DCMTK_CMR_EXPORT TID1501_MeasurementGroup
     OFBool hasMeasurementGroup(const OFBool checkChildren = OFFalse) const;
 
     /** check whether the 'Tracking Identifier' content item (TID 1501 - Row 2) is
-     *  present.  This content item is mandatory, i.e. should be present with a value.
+     *  present.  This content item is optional, i.e. might be absent.
      ** @return OFTrue if the tracking identifier is present, OFFalse otherwise
      */
     OFBool hasTrackingIdentifier() const;
 
     /** check whether the 'Tracking Unique Identifier' content item (TID 1501 - Row 3) is
-     *  present.  This content item is mandatory, i.e. should be present with a value.
+     *  present.  This content item is optional, i.e. might be absent.
      ** @return OFTrue if the tracking unique identifier is present, OFFalse otherwise
      */
     OFBool hasTrackingUniqueIdentifier() const;
 
     /** check whether there is an included 'Measurement' template (TID 1501 - Row 10) in
-     *  this measurement template.  Initially, this mandatory sub-template is created and
-     *  included by the constructor of this class.  After clear() has been called, the
-     *  content item has to be recreated, which is done automatically when needed.
+     *  this measurement template.  Initially, the mandatory sub-template TID 300 is
+     *  created and included by the constructor of this class.  After clear() has been
+     *  called, the content item has to be recreated, which is done automatically when
+     *  needed.
      ** @param  checkChildren  flag, which is enabled by default, indicating whether to
      *                         check for any children, i.e.\ whether the respective
      *                         sub-template has any content (child nodes).  If OFFalse,
index 490c7cbd59b8553ca114d056eae5a3df6637d94e..95d5bfd34fb41b0573d842c06170cac15abfa8cd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file for class TID1600_ImageLibrary
index 1b3cba5401d5963ffc228d73b6659a6a3df70144..358dc6381b4d0c975493c106f317606e89fc4b95 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file with DICOM Controlled Terminology Code Definitions (Coding Scheme "DCM", Version "01")
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 10:55:18 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-11 09:59:28 by J. Riesmeier
  *
  */
 
@@ -34,8 +34,8 @@
  *  code definitions  *
  *--------------------*/
 
-// total number of codes: 4387
-// - retired: 199
+// total number of codes: 4632
+// - retired: 201
 // - no name: 27
 // - not unique: 17
 
@@ -48,6 +48,7 @@
 // The "cleaned camel-case version of the code meaning" is an attempt to map the free text
 // description of the code meaning to a compiler-friendly but still human-readable representation.
 
+#define CODE_DCM_Annotation                                                DSRBasicCodedEntry("ANN", "DCM", "Annotation")
 #define CODE_DCM_Autorefraction                                            DSRBasicCodedEntry("AR", "DCM", "Autorefraction")
 #define CODE_DCM_Archive                                                   DSRBasicCodedEntry("ARCHIVE", "DCM", "Archive")
 #define CODE_DCM_RETIRED_Angioscopy                                        DSRBasicCodedEntry("AS", "DCM", "Angioscopy")
 #define CODE_DCM_PartiallySucceeded                                        DSRBasicCodedEntry("111223", "DCM", "Partially Succeeded")
 #define CODE_DCM_Failed                                                    DSRBasicCodedEntry("111224", "DCM", "Failed")
 #define CODE_DCM_NotAttempted                                              DSRBasicCodedEntry("111225", "DCM", "Not Attempted")
-#define CODE_DCM_IndividualImpressionRecommendationAnalysis                DSRBasicCodedEntry("111233", "DCM", "Individual Impression / Recommendation Analysis")
-#define CODE_DCM_OverallImpressionRecommendationAnalysis                   DSRBasicCodedEntry("111234", "DCM", "Overall Impression / Recommendation Analysis")
+#define CODE_DCM_IndividualImpressionRecommendationAnalysis                DSRBasicCodedEntry("111233", "DCM", "Individual Impression/Recommendation Analysis")
+#define CODE_DCM_OverallImpressionRecommendationAnalysis                   DSRBasicCodedEntry("111234", "DCM", "Overall Impression/Recommendation Analysis")
 #define CODE_DCM_Unusable_QualityRendersImageUnusable                      DSRBasicCodedEntry("111235", "DCM", "Unusable - Quality renders image unusable")
 #define CODE_DCM_Usable_DoesNotMeetTheQualityControlStandard               DSRBasicCodedEntry("111236", "DCM", "Usable - Does not meet the quality control standard")
 #define CODE_DCM_Usable_MeetsTheQualityControlStandard                     DSRBasicCodedEntry("111237", "DCM", "Usable - Meets the quality control standard")
 #define CODE_DCM_EntranceExposureAtRP                                      DSRBasicCodedEntry("111636", "DCM", "Entrance Exposure at RP")
 #define CODE_DCM_AccumulatedAverageGlandularDose                           DSRBasicCodedEntry("111637", "DCM", "Accumulated Average Glandular Dose")
 #define CODE_DCM_PatientEquivalentThickness                                DSRBasicCodedEntry("111638", "DCM", "Patient Equivalent Thickness")
+#define CODE_DCM_VirtualGrid                                               DSRBasicCodedEntry("111640", "DCM", "Virtual grid")
 #define CODE_DCM_FixedGrid                                                 DSRBasicCodedEntry("111641", "DCM", "Fixed grid")
 #define CODE_DCM_FocusedGrid                                               DSRBasicCodedEntry("111642", "DCM", "Focused grid")
 #define CODE_DCM_ReciprocatingGrid                                         DSRBasicCodedEntry("111643", "DCM", "Reciprocating grid")
 #define CODE_DCM_Coalescent                                                DSRBasicCodedEntry("112157", "DCM", "Coalescent")
 #define CODE_DCM_Lobar                                                     DSRBasicCodedEntry("112158", "DCM", "Lobar")
 #define CODE_DCM_HyperAcute                                                DSRBasicCodedEntry("112159", "DCM", "Hyper-acute")
-#define CODE_DCM_Homogeneous_uniformOpacity                                DSRBasicCodedEntry("112160", "DCM", "Homogeneous (uniform opacity)")
+#define CODE_DCM_Homogeneous                                               DSRBasicCodedEntry("112160", "DCM", "Homogeneous")
 #define CODE_DCM_Inhomogeneous                                             DSRBasicCodedEntry("112161", "DCM", "Inhomogeneous")
 #define CODE_DCM_Target                                                    DSRBasicCodedEntry("112162", "DCM", "Target")
 #define CODE_DCM_Fibrocalcific                                             DSRBasicCodedEntry("112163", "DCM", "Fibrocalcific")
 #define CODE_DCM_Generic3DPlanning                                         DSRBasicCodedEntry("112341", "DCM", "Generic 3D Planning")
 #define CODE_DCM_GenericPlanningForHipReplacement                          DSRBasicCodedEntry("112342", "DCM", "Generic Planning for Hip Replacement")
 #define CODE_DCM_GenericPlanningForKneeReplacement                         DSRBasicCodedEntry("112343", "DCM", "Generic Planning for Knee Replacement")
-#define CODE_DCM_MuellerMethodPlanningForHipReplacement                    DSRBasicCodedEntry("112344", "DCM", "Müller Method Planning for Hip Replacement")
+#define CODE_DCM_MuellerMethodPlanningForHipReplacement                    DSRBasicCodedEntry("112344", "DCM", "Mueller Method Planning for Hip Replacement")
 #define CODE_DCM_ImplantationPlan                                          DSRBasicCodedEntry("112345", "DCM", "Implantation Plan")
 #define CODE_DCM_SelectedImplantComponent                                  DSRBasicCodedEntry("112346", "DCM", "Selected Implant Component")
 #define CODE_DCM_ComponentID                                               DSRBasicCodedEntry("112347", "DCM", "Component ID")
 #define CODE_DCM_ImagingMeasurements                                       DSRBasicCodedEntry("126010", "DCM", "Imaging Measurements")
 #define CODE_DCM_DerivedImagingMeasurements                                DSRBasicCodedEntry("126011", "DCM", "Derived Imaging Measurements")
 #define CODE_DCM_MultiparametricMRI                                        DSRBasicCodedEntry("126020", "DCM", "Multiparametric MRI")
-#define CODE_DCM_MultiparametricMRIOfProstate                              DSRBasicCodedEntry("126021", "DCM", "Multiparametric MRI of prostate")
+#define CODE_DCM_RETIRED_MultiparametricMRIOfProstate                      DSRBasicCodedEntry("126021", "DCM", "Multiparametric MRI of prostate")
 #define CODE_DCM_MultiparametricMRIOfWholeBody                             DSRBasicCodedEntry("126022", "DCM", "Multiparametric MRI of whole body")
 #define CODE_DCM_LWHMethodForVolumeOfEllipsoid                             DSRBasicCodedEntry("126029", "DCM", "LWH method for volume of ellipsoid")
 #define CODE_DCM_SumOfSegmentedVoxelMethodForVolume                        DSRBasicCodedEntry("126030", "DCM", "Sum of segmented voxel method for volume")
 #define CODE_DCM_SyringeAttached                                           DSRBasicCodedEntry("130163", "DCM", "Syringe attached")
 #define CODE_DCM_SyringeDetached                                           DSRBasicCodedEntry("130164", "DCM", "Syringe detached")
 #define CODE_DCM_TotalKeepVeinOpenVolumeAdministered                       DSRBasicCodedEntry("130165", "DCM", "Total Keep Vein Open Volume Administered")
-#define CODE_DCM_AutomaticAdministrationPhase                              DSRBasicCodedEntry("130168", "DCM", "Automatic Administration Phase")
-#define CODE_DCM_AutomaticProgrammedHoldPhase                              DSRBasicCodedEntry("130169", "DCM", "Automatic Programmed Hold Phase")
-#define CODE_DCM_AutomaticWithManualHoldPhase                              DSRBasicCodedEntry("130170", "DCM", "Automatic with Manual Hold Phase")
-#define CODE_DCM_AutomaticWithManualInjectPhase                            DSRBasicCodedEntry("130171", "DCM", "Automatic with Manual Inject Phase")
+#define CODE_DCM_AutomaticProgrammedAdministrationPhase                    DSRBasicCodedEntry("130168", "DCM", "Automatic Programmed Administration Phase")
+#define CODE_DCM_AutomaticProgrammedDelayPhase                             DSRBasicCodedEntry("130169", "DCM", "Automatic Programmed Delay Phase")
+#define CODE_DCM_RETIRED_AutomaticWithManualHoldPhase                      DSRBasicCodedEntry("130170", "DCM", "Automatic with Manual Hold Phase")
+#define CODE_DCM_AutomatedManualInjectPhase                                DSRBasicCodedEntry("130171", "DCM", "Automated Manual Inject Phase")
 #define CODE_DCM_ManuallyTriggeredInjectionInformation                     DSRBasicCodedEntry("130172", "DCM", "Manually Triggered Injection Information")
 #define CODE_DCM_AutomatedAdministration                                   DSRBasicCodedEntry("130173", "DCM", "Automated Administration")
 #define CODE_DCM_ManualAdministration                                      DSRBasicCodedEntry("130174", "DCM", "Manual Administration")
 #define CODE_DCM_ContrastReactionProphylacticAgent                         DSRBasicCodedEntry("130259", "DCM", "Contrast Reaction Prophylactic Agent")
 #define CODE_DCM_ImagingAgentAdministrationPerformedPhaseUID               DSRBasicCodedEntry("130261", "DCM", "Imaging Agent Administration Performed Phase UID")
 #define CODE_DCM_ReferencedImagingAgentAdministrationPhaseUID              DSRBasicCodedEntry("130262", "DCM", "Referenced Imaging Agent Administration Phase UID")
+#define CODE_DCM_AutomaticProgrammedWaitPhase                              DSRBasicCodedEntry("130263", "DCM", "Automatic Programmed Wait Phase")
+#define CODE_DCM_ImagingAgentAdministrationInjectorPhaseIdentifier         DSRBasicCodedEntry("130264", "DCM", "Imaging Agent Administration Injector Phase Identifier")
+#define CODE_DCM_ImagingAgentAdministrationPhaseWithManualHold             DSRBasicCodedEntry("130265", "DCM", "Imaging Agent Administration Phase with Manual Hold")
+#define CODE_DCM_ProgrammedHoldStarted                                     DSRBasicCodedEntry("130266", "DCM", "Programmed hold started")
+#define CODE_DCM_ManualHoldStarted                                         DSRBasicCodedEntry("130267", "DCM", "Manual hold started")
+#define CODE_DCM_ManualResumeFromHold                                      DSRBasicCodedEntry("130268", "DCM", "Manual resume from hold")
+#define CODE_DCM_TerminatedHoldDueToTimeout                                DSRBasicCodedEntry("130269", "DCM", "Terminated hold due to timeout")
 #define CODE_DCM_Median                                                    DSRBasicCodedEntry("130290", "DCM", "Median")
 #define CODE_DCM_SkinOfParaspinalAreaOfTheNeck                             DSRBasicCodedEntry("130300", "DCM", "Skin of paraspinal area of the neck")
 #define CODE_DCM_SkinOfParaspinalAreaOfTheSuperiorBack                     DSRBasicCodedEntry("130301", "DCM", "Skin of paraspinal area of the superior back")
 #define CODE_DCM_NumberOfFirstDegreeRelativesAffectedByMalignantMelanoma   DSRBasicCodedEntry("130487", "DCM", "Number of first-degree relatives affected by malignant melanoma")
 #define CODE_DCM_RegionInSpace                                             DSRBasicCodedEntry("130488", "DCM", "Region in Space")
 #define CODE_DCM_ReferencedRegionOfInterestIdentifier                      DSRBasicCodedEntry("130489", "DCM", "Referenced Region of Interest Identifier")
+#define CODE_DCM_Centerline                                                DSRBasicCodedEntry("130490", "DCM", "Centerline")
+#define CODE_DCM_StimulationMode                                           DSRBasicCodedEntry("130491", "DCM", "Stimulation Mode")
+#define CODE_DCM_StimulusSamplePosition                                    DSRBasicCodedEntry("130492", "DCM", "Stimulus Sample Position")
+#define CODE_DCM_StimulusTimeOffset                                        DSRBasicCodedEntry("130493", "DCM", "Stimulus Time Offset")
+#define CODE_DCM_NumberOfStimulusEvents                                    DSRBasicCodedEntry("130494", "DCM", "Number of Stimulus Events")
+#define CODE_DCM_FrequencyOfStimulusEvents                                 DSRBasicCodedEntry("130495", "DCM", "Frequency of Stimulus Events")
+#define CODE_DCM_AccumulatedDoseData                                       DSRBasicCodedEntry("130500", "DCM", "Accumulated Dose Data")
+#define CODE_DCM_IrradiationEventSummaryData                               DSRBasicCodedEntry("130501", "DCM", "Irradiation Event Summary Data")
+#define CODE_DCM_ReferencePointDosimetry                                   DSRBasicCodedEntry("130502", "DCM", "Reference Point Dosimetry")
+#define CODE_DCM_IsRejectedAcquisition                                     DSRBasicCodedEntry("130503", "DCM", "Is Rejected Acquisition")
+#define CODE_DCM_ReasonForRejectingAcquisition                             DSRBasicCodedEntry("130504", "DCM", "Reason for Rejecting Acquisition")
+#define CODE_DCM_IrradiationDetails                                        DSRBasicCodedEntry("130505", "DCM", "Irradiation Details")
+#define CODE_DCM_RDSRFrameOfReferenceOrigin                                DSRBasicCodedEntry("130506", "DCM", "RDSR Frame of Reference Origin")
+#define CODE_DCM_RDSRFrameOfReferenceDescription                           DSRBasicCodedEntry("130507", "DCM", "RDSR Frame of Reference Description")
+#define CODE_DCM_RadiationSourceCharacteristics                            DSRBasicCodedEntry("130508", "DCM", "Radiation Source Characteristics")
+#define CODE_DCM_XRayFilterThickness                                       DSRBasicCodedEntry("130509", "DCM", "X-Ray Filter Thickness")
+#define CODE_DCM_ReportedValueType                                         DSRBasicCodedEntry("130510", "DCM", "Reported Value Type")
+#define CODE_DCM_RadiationTechnique                                        DSRBasicCodedEntry("130511", "DCM", "Radiation Technique")
+#define CODE_DCM_Filtration                                                DSRBasicCodedEntry("130512", "DCM", "Filtration")
+#define CODE_DCM_Attenuators                                               DSRBasicCodedEntry("130513", "DCM", "Attenuators")
+#define CODE_DCM_RadiationOutput                                           DSRBasicCodedEntry("130514", "DCM", "Radiation Output")
+#define CODE_DCM_AirKermaAtOutputMeasurementPoint                          DSRBasicCodedEntry("130515", "DCM", "Air Kerma at Output Measurement Point")
+#define CODE_DCM_RadiationFieldArea                                        DSRBasicCodedEntry("130516", "DCM", "Radiation Field Area")
+#define CODE_DCM_RadiationFieldOutline                                     DSRBasicCodedEntry("130517", "DCM", "Radiation Field Outline")
+#define CODE_DCM_ValueTiming                                               DSRBasicCodedEntry("130518", "DCM", "Value Timing")
+#define CODE_DCM_XRaySourceReferenceCoordinateSystem                       DSRBasicCodedEntry("130519", "DCM", "X-Ray Source Reference Coordinate System")
+#define CODE_DCM_TransformationMatrix                                      DSRBasicCodedEntry("130520", "DCM", "Transformation Matrix")
+#define CODE_DCM_CenterOfRotation                                          DSRBasicCodedEntry("130521", "DCM", "Center of Rotation")
+#define CODE_DCM_RotationPlaneNormalPoint                                  DSRBasicCodedEntry("130522", "DCM", "Rotation Plane Normal Point")
+#define CODE_DCM_RotationAngle                                             DSRBasicCodedEntry("130523", "DCM", "Rotation Angle")
+#define CODE_DCM_BeamPosition                                              DSRBasicCodedEntry("130524", "DCM", "Beam Position")
+#define CODE_DCM_OutputMeasurementPointPosition                            DSRBasicCodedEntry("130525", "DCM", "Output Measurement Point Position")
+#define CODE_DCM_ReferencePointPosition                                    DSRBasicCodedEntry("130526", "DCM", "Reference Point Position")
+#define CODE_DCM_IdentificationOfTheAttenuator                             DSRBasicCodedEntry("130527", "DCM", "Identification of the Attenuator")
+#define CODE_DCM_AttenuatorPosition                                        DSRBasicCodedEntry("130528", "DCM", "Attenuator Position")
+#define CODE_DCM_PatientAttenuationCharacteristics                         DSRBasicCodedEntry("130529", "DCM", "Patient Attenuation Characteristics")
+#define CODE_DCM_ProcedureCharacteristics                                  DSRBasicCodedEntry("130530", "DCM", "Procedure Characteristics")
+#define CODE_DCM_AttenuatorCharacteristics                                 DSRBasicCodedEntry("130531", "DCM", "Attenuator Characteristics")
+#define CODE_DCM_DurationOfTimePeriod                                      DSRBasicCodedEntry("130532", "DCM", "Duration of Time Period")
+#define CODE_DCM_BeginningOfTimePeriod                                     DSRBasicCodedEntry("130533", "DCM", "Beginning of Time Period")
+#define CODE_DCM_EndOfTimePeriod                                           DSRBasicCodedEntry("130534", "DCM", "End of Time Period")
+#define CODE_DCM_MiddleOfTimePeriod                                        DSRBasicCodedEntry("130535", "DCM", "Middle of Time Period")
+#define CODE_DCM_RoomOrigin                                                DSRBasicCodedEntry("130536", "DCM", "Room Origin")
+#define CODE_DCM_EquipmentOrigin                                           DSRBasicCodedEntry("130537", "DCM", "Equipment Origin")
+#define CODE_DCM_PatientSupportOrigin                                      DSRBasicCodedEntry("130538", "DCM", "Patient Support Origin")
+#define CODE_DCM_IsocenterOrigin                                           DSRBasicCodedEntry("130539", "DCM", "Isocenter Origin")
+#define CODE_DCM_PatientCoordinateSystemOrigin                             DSRBasicCodedEntry("130540", "DCM", "Patient Coordinate System Origin")
+#define CODE_DCM_10cmDosimetryPhantom                                      DSRBasicCodedEntry("130541", "DCM", "10 cm Dosimetry Phantom")
+#define CODE_DCM_MagneticFieldStrength                                     DSRBasicCodedEntry("130542", "DCM", "Magnetic field strength")
+#define CODE_DCM_EndorectalCoilUsed                                        DSRBasicCodedEntry("130543", "DCM", "Endorectal coil used")
+#define CODE_DCM_EndorectalCoilType                                        DSRBasicCodedEntry("130544", "DCM", "Endorectal coil type")
+#define CODE_DCM_InflatableEndorectalCoilFillSubstance                     DSRBasicCodedEntry("130545", "DCM", "Inflatable endorectal coil fill substance")
+#define CODE_DCM_CrossSectionalScanPlaneOrientation                        DSRBasicCodedEntry("130546", "DCM", "Cross-sectional scan plane orientation")
+#define CODE_DCM_DynamicContrastEnhancedTemporalResolution                 DSRBasicCodedEntry("130547", "DCM", "Dynamic contrast-enhanced temporal resolution")
+#define CODE_DCM_GenitourinaryHistory                                      DSRBasicCodedEntry("130548", "DCM", "Genitourinary History")
+#define CODE_DCM_ImagingStudyQuality                                       DSRBasicCodedEntry("130549", "DCM", "Imaging Study Quality")
+#define CODE_DCM_ImagingSeriesQuality                                      DSRBasicCodedEntry("130550", "DCM", "Imaging Series Quality")
+#define CODE_DCM_ReportingSystem                                           DSRBasicCodedEntry("130551", "DCM", "Reporting system")
+#define CODE_DCM_ProstateMRIRelevantProcedureInformation                   DSRBasicCodedEntry("130552", "DCM", "Prostate MRI relevant procedure information")
+#define CODE_DCM_ProstateImagingFindings                                   DSRBasicCodedEntry("130553", "DCM", "Prostate Imaging Findings")
+#define CODE_DCM_OverallProstateFinding                                    DSRBasicCodedEntry("130554", "DCM", "Overall Prostate Finding")
+#define CODE_DCM_LocalizedProstateFinding                                  DSRBasicCodedEntry("130555", "DCM", "Localized Prostate Finding")
+#define CODE_DCM_ProstateRelationalMeasurements                            DSRBasicCodedEntry("130556", "DCM", "Prostate relational measurements")
+#define CODE_DCM_DistanceFromNeurovascularBundle                           DSRBasicCodedEntry("130557", "DCM", "Distance from neurovascular bundle")
+#define CODE_DCM_LesionCapsularContactLength                               DSRBasicCodedEntry("130558", "DCM", "Lesion capsular contact length")
+#define CODE_DCM_ExtraProstaticFinding                                     DSRBasicCodedEntry("130559", "DCM", "Extra-prostatic Finding")
+#define CODE_DCM_PIRADSLocalizedAbnormalityAssessment                      DSRBasicCodedEntry("130560", "DCM", "PI-RADS Localized Abnormality Assessment")
+#define CODE_DCM_PIRADST2WILesionAssessment                                DSRBasicCodedEntry("130561", "DCM", "PI-RADS T2WI Lesion Assessment")
+#define CODE_DCM_PIRADSDWILesionAssessment                                 DSRBasicCodedEntry("130562", "DCM", "PI-RADS DWI Lesion Assessment")
+#define CODE_DCM_PIRADSDCELesionAssessment                                 DSRBasicCodedEntry("130563", "DCM", "PI-RADS DCE Lesion Assessment")
+#define CODE_DCM_PIRADSV2dot0                                              DSRBasicCodedEntry("130564", "DCM", "PI-RADS v2.0")
+#define CODE_DCM_PIRADSV2dot1                                              DSRBasicCodedEntry("130565", "DCM", "PI-RADS v2.1")
+#define CODE_DCM_DiffusionWeightedAcquisitionHighestBValueImage            DSRBasicCodedEntry("130566", "DCM", "Diffusion-weighted Acquisition Highest b-value image")
+#define CODE_DCM_DynamicContrastEnhancedAcquisition                        DSRBasicCodedEntry("130567", "DCM", "Dynamic Contrast-Enhanced Acquisition")
+#define CODE_DCM_DynamicContrastEnhancedAcquisitionSubtractionImage        DSRBasicCodedEntry("130568", "DCM", "Dynamic Contrast-Enhanced Acquisition Subtraction image")
+#define CODE_DCM_UtricleCyst                                               DSRBasicCodedEntry("130569", "DCM", "Utricle cyst")
+#define CODE_DCM_ProtocolNotFollowed                                       DSRBasicCodedEntry("130570", "DCM", "Protocol not followed")
+#define CODE_DCM_CoilPlacementConcern                                      DSRBasicCodedEntry("130571", "DCM", "Coil placement concern")
+#define CODE_DCM_CoilSelectionConcern                                      DSRBasicCodedEntry("130572", "DCM", "Coil selection concern")
+#define CODE_DCM_StudyPerformedDidNotMatchRequest                          DSRBasicCodedEntry("130573", "DCM", "Study performed did not match request")
+#define CODE_DCM_IncompleteStudy                                           DSRBasicCodedEntry("130574", "DCM", "Incomplete study")
+#define CODE_DCM_SuboptimalPatientPreparation                              DSRBasicCodedEntry("130575", "DCM", "Suboptimal patient preparation")
+#define CODE_DCM_AnatomyCoverageIncomplete                                 DSRBasicCodedEntry("130576", "DCM", "Anatomy coverage incomplete")
+#define CODE_DCM_PoorFOVSelection                                          DSRBasicCodedEntry("130577", "DCM", "Poor FOV selection")
+#define CODE_DCM_PoorSNR                                                   DSRBasicCodedEntry("130578", "DCM", "Poor SNR")
+#define CODE_DCM_PoorContrastTiming                                        DSRBasicCodedEntry("130579", "DCM", "Poor contrast timing")
+#define CODE_DCM_InadequateContrastEnhancement                             DSRBasicCodedEntry("130580", "DCM", "Inadequate contrast enhancement")
+#define CODE_DCM_SubtractionImageMissing                                   DSRBasicCodedEntry("130581", "DCM", "Subtraction image missing")
+#define CODE_DCM_UnwantedSubtractionImages                                 DSRBasicCodedEntry("130582", "DCM", "Unwanted subtraction images")
+#define CODE_DCM_ExpectedBValueIsMissing                                   DSRBasicCodedEntry("130583", "DCM", "Expected b-value is missing")
+#define CODE_DCM_SevereDistortionInTheAreaOfInterest                       DSRBasicCodedEntry("130584", "DCM", "Severe distortion in the area of interest")
+#define CODE_DCM_ExpectedADCMapIsMissing                                   DSRBasicCodedEntry("130585", "DCM", "Expected ADC map is missing")
+#define CODE_DCM_DistortionArtifactInTheAreaOfInterest                     DSRBasicCodedEntry("130586", "DCM", "Distortion artifact in the area of interest")
+#define CODE_DCM_NoFamilyHistoryOfProstateCancer                           DSRBasicCodedEntry("130587", "DCM", "No family history of prostate cancer")
+#define CODE_DCM_PreBiopsyLocalizationOfProstateLesion                     DSRBasicCodedEntry("130588", "DCM", "Pre-biopsy localization of prostate lesion")
+#define CODE_DCM_ActiveSurveillanceOfProstateCancer                        DSRBasicCodedEntry("130589", "DCM", "Active surveillance of prostate cancer")
+#define CODE_DCM_AssessChange                                              DSRBasicCodedEntry("130590", "DCM", "Assess change")
+#define CODE_DCM_FocalAbnormality                                          DSRBasicCodedEntry("130591", "DCM", "Focal abnormality")
+#define CODE_DCM_NonFocalAbnormality                                       DSRBasicCodedEntry("130592", "DCM", "Non-focal abnormality")
+#define CODE_DCM_PartiallyEncapsulated                                     DSRBasicCodedEntry("130593", "DCM", "Partially encapsulated")
+#define CODE_DCM_CompletelyEncapsulated                                    DSRBasicCodedEntry("130594", "DCM", "Completely encapsulated")
+#define CODE_DCM_ADCHyperintense                                           DSRBasicCodedEntry("130595", "DCM", "ADC Hyperintense")
+#define CODE_DCM_ADCHypointense                                            DSRBasicCodedEntry("130596", "DCM", "ADC Hypointense")
+#define CODE_DCM_PersistentDelayedPhase_Type1Curve                         DSRBasicCodedEntry("130597", "DCM", "Persistent delayed phase: Type 1 curve")
+#define CODE_DCM_PlateauDelayedPhase_Type2Curve                            DSRBasicCodedEntry("130598", "DCM", "Plateau delayed phase: Type 2 curve")
+#define CODE_DCM_WashoutDelayedPhase_Type3Curve                            DSRBasicCodedEntry("130599", "DCM", "Washout delayed phase: Type 3 curve")
+#define CODE_DCM_PositiveDCE                                               DSRBasicCodedEntry("130600", "DCM", "Positive DCE")
+#define CODE_DCM_NegativeDCE                                               DSRBasicCodedEntry("130601", "DCM", "Negative DCE")
+#define CODE_DCM_EarlyContrastEnhancement                                  DSRBasicCodedEntry("130602", "DCM", "Early Contrast Enhancement")
+#define CODE_DCM_DiffuseContrastEnhancement                                DSRBasicCodedEntry("130603", "DCM", "Diffuse Contrast Enhancement")
+#define CODE_DCM_FocalContrastEnhancement                                  DSRBasicCodedEntry("130604", "DCM", "Focal Contrast Enhancement")
+#define CODE_DCM_Perfluorocarbon                                           DSRBasicCodedEntry("130605", "DCM", "Perfluorocarbon")
+#define CODE_DCM_ESUR2012ProstateMRIAcquisitionRequirements                DSRBasicCodedEntry("130606", "DCM", "ESUR 2012 prostate MRI acquisition requirements")
+#define CODE_DCM_PIRADS2dot0ProstateMRIAcquisitionRequirements             DSRBasicCodedEntry("130607", "DCM", "PI-RADS 2.0 prostate MRI acquisition requirements")
+#define CODE_DCM_PIRADS2dot1ProstateMRIAcquisitionRequirements             DSRBasicCodedEntry("130608", "DCM", "PI-RADS 2.1 prostate MRI acquisition requirements")
+#define CODE_DCM_2DShearWaveElastography                                   DSRBasicCodedEntry("130609", "DCM", "2D Shear Wave Elastography")
+#define CODE_DCM_3DShearWaveElastography                                   DSRBasicCodedEntry("130610", "DCM", "3D Shear Wave Elastography")
+#define CODE_DCM_ShearWaveSpeed                                            DSRBasicCodedEntry("130611", "DCM", "Shear Wave Speed")
+#define CODE_DCM_ShearWaveDispersionSlope                                  DSRBasicCodedEntry("130612", "DCM", "Shear Wave Dispersion Slope")
+#define CODE_DCM_ROIDepth                                                  DSRBasicCodedEntry("130613", "DCM", "ROI Depth")
+#define CODE_DCM_InterquartileRangeOfPopulation                            DSRBasicCodedEntry("130614", "DCM", "Interquartile Range of population")
+#define CODE_DCM_InterquartileRangeToMedianRatioOfPopulation               DSRBasicCodedEntry("130615", "DCM", "Interquartile Range to Median Ratio of population")
+#define CODE_DCM_PointShearWaveElastography                                DSRBasicCodedEntry("130616", "DCM", "Point Shear Wave Elastography")
+#define CODE_DCM_LeftVentricleApicalAnteroseptalSegment                    DSRBasicCodedEntry("130620", "DCM", "left ventricle apical anteroseptal segment")
+#define CODE_DCM_LeftVentricleApicalInferoseptalSegment                    DSRBasicCodedEntry("130621", "DCM", "left ventricle apical inferoseptal segment")
+#define CODE_DCM_LeftVentricleApicalInferolateralSegment                   DSRBasicCodedEntry("130622", "DCM", "left ventricle apical inferolateral segment")
+#define CODE_DCM_LeftVentricleApicalAnterolateralSegment                   DSRBasicCodedEntry("130623", "DCM", "left ventricle apical anterolateral segment")
+#define CODE_DCM_IsocentricSetupMethod                                     DSRBasicCodedEntry("130630", "DCM", "Isocentric Setup Method")
+#define CODE_DCM_ControlledSSDSetupMethod                                  DSRBasicCodedEntry("130631", "DCM", "Controlled SSD Setup Method")
+#define CODE_DCM_TBISetupMethod                                            DSRBasicCodedEntry("130632", "DCM", "TBI Setup Method")
+#define CODE_DCM_StereotacticSetupMethod                                   DSRBasicCodedEntry("130633", "DCM", "Stereotactic Setup Method")
+#define CODE_DCM_SkinAppositionSetupMethod                                 DSRBasicCodedEntry("130634", "DCM", "Skin Apposition Setup Method")
+#define CODE_DCM_OcularGazeSetupMethod                                     DSRBasicCodedEntry("130635", "DCM", "Ocular Gaze Setup Method")
+#define CODE_DCM_PatientShieldingProcedure                                 DSRBasicCodedEntry("130636", "DCM", "Patient Shielding Procedure")
+#define CODE_DCM_PatientFixationProcedure                                  DSRBasicCodedEntry("130637", "DCM", "Patient Fixation Procedure")
+#define CODE_DCM_PatientAlignmentProcedure                                 DSRBasicCodedEntry("130638", "DCM", "Patient Alignment Procedure")
+#define CODE_DCM_PatientMotionManagementSetupProcedure                     DSRBasicCodedEntry("130639", "DCM", "Patient Motion Management Setup Procedure")
+#define CODE_DCM_CavityRadiationShield                                     DSRBasicCodedEntry("130640", "DCM", "Cavity radiation shield")
+#define CODE_DCM_IndependentRadiationShield                                DSRBasicCodedEntry("130641", "DCM", "Independent radiation shield")
+#define CODE_DCM_OpticalDistanceMeter                                      DSRBasicCodedEntry("130642", "DCM", "Optical Distance Meter")
+#define CODE_DCM_MechanicalPointer                                         DSRBasicCodedEntry("130643", "DCM", "Mechanical Pointer")
+#define CODE_DCM_RadiofrequencyTransponder                                 DSRBasicCodedEntry("130644", "DCM", "Radiofrequency Transponder")
+#define CODE_DCM_InfraredMarker                                            DSRBasicCodedEntry("130645", "DCM", "Infrared Marker")
+#define CODE_DCM_RadioactiveMarker                                         DSRBasicCodedEntry("130646", "DCM", "Radioactive Marker")
+#define CODE_DCM_ThermalImager                                             DSRBasicCodedEntry("130647", "DCM", "Thermal Imager")
+#define CODE_DCM_CombinedStructuredLightThermalImager                      DSRBasicCodedEntry("130648", "DCM", "Combined Structured Light/Thermal Imager")
+#define CODE_DCM_OcularFixationLight                                       DSRBasicCodedEntry("130649", "DCM", "Ocular Fixation Light")
+#define CODE_DCM_CoachingDevice                                            DSRBasicCodedEntry("130650", "DCM", "Coaching Device")
+#define CODE_DCM_PatientDistractionDevice                                  DSRBasicCodedEntry("130651", "DCM", "Patient Distraction Device")
+#define CODE_DCM_CollisionChecks                                           DSRBasicCodedEntry("130652", "DCM", "Collision checks")
+#define CODE_DCM_BreastBridge                                              DSRBasicCodedEntry("130653", "DCM", "Breast Bridge")
+#define CODE_DCM_AbdominalCompressionBelt                                  DSRBasicCodedEntry("130654", "DCM", "Abdominal Compression Belt")
+#define CODE_DCM_AbdominalCompressionArch                                  DSRBasicCodedEntry("130655", "DCM", "Abdominal Compression Arch")
+#define CODE_DCM_HeadFixationBoard                                         DSRBasicCodedEntry("130656", "DCM", "Head Fixation Board")
+#define CODE_DCM_CouchIndexLabel                                           DSRBasicCodedEntry("130657", "DCM", "Couch Index Label")
+#define CODE_DCM_FixationDeviceAngle                                       DSRBasicCodedEntry("130658", "DCM", "Fixation Device Angle")
+#define CODE_DCM_AbdominalCompressionPlatePositionNumber                   DSRBasicCodedEntry("130659", "DCM", "Abdominal Compression Plate Position Number")
+#define CODE_DCM_AbdominalCompressionBeltLength                            DSRBasicCodedEntry("130660", "DCM", "Abdominal Compression Belt Length")
+#define CODE_DCM_AbdominalCompressionBeltPressure                          DSRBasicCodedEntry("130661", "DCM", "Abdominal Compression Belt Pressure")
+#define CODE_DCM_ReferencedPatientAlignmentReference                       DSRBasicCodedEntry("130662", "DCM", "Referenced Patient Alignment Reference")
+#define CODE_DCM_RTRadiationPreviouslyDelivered                            DSRBasicCodedEntry("130663", "DCM", "RT Radiation previously delivered")
+#define CODE_DCM_TreatmentUnnecessary                                      DSRBasicCodedEntry("130664", "DCM", "Treatment unnecessary")
+#define CODE_DCM_TreatmentExceedsPatientTolerance                          DSRBasicCodedEntry("130665", "DCM", "Treatment exceeds patient tolerance")
+#define CODE_DCM_RadiotherapyFiducial                                      DSRBasicCodedEntry("130666", "DCM", "Radiotherapy Fiducial")
+#define CODE_DCM_LongitudinalLagrangianStrain                              DSRBasicCodedEntry("130670", "DCM", "Longitudinal Lagrangian Strain")
+#define CODE_DCM_PeakLongitudinalLagrangianStrain                          DSRBasicCodedEntry("130671", "DCM", "Peak Longitudinal Lagrangian Strain")
+#define CODE_DCM_TimeToPeakLongitudinalLagrangianStrain                    DSRBasicCodedEntry("130672", "DCM", "Time to Peak Longitudinal Lagrangian Strain")
+#define CODE_DCM_MechanicalDispersion                                      DSRBasicCodedEntry("130673", "DCM", "Mechanical Dispersion")
+#define CODE_DCM_LongitudinalLagrangianStrainRate                          DSRBasicCodedEntry("130674", "DCM", "Longitudinal Lagrangian Strain Rate")
+#define CODE_DCM_RadialLagrangianStrain                                    DSRBasicCodedEntry("130675", "DCM", "Radial Lagrangian Strain")
+#define CODE_DCM_RadialLagrangianStrainRate                                DSRBasicCodedEntry("130676", "DCM", "Radial Lagrangian Strain Rate")
+#define CODE_DCM_CircumferentialLagrangianStrain                           DSRBasicCodedEntry("130677", "DCM", "Circumferential Lagrangian Strain")
+#define CODE_DCM_CircumferentialLagrangianStrainRate                       DSRBasicCodedEntry("130678", "DCM", "Circumferential Lagrangian Strain Rate")
+#define CODE_DCM_2DSpeckleTracking                                         DSRBasicCodedEntry("130679", "DCM", "2D Speckle Tracking")
+#define CODE_DCM_3DSpeckleTracking                                         DSRBasicCodedEntry("130680", "DCM", "3D Speckle Tracking")
+#define CODE_DCM_ApicalFourChamberRVFocused                                DSRBasicCodedEntry("130681", "DCM", "Apical four chamber RV Focused")
+#define CODE_DCM_ApicalFourChamberRVModified                               DSRBasicCodedEntry("130682", "DCM", "Apical four chamber RV Modified")
+#define CODE_DCM_EndocardialMethod                                         DSRBasicCodedEntry("130683", "DCM", "Endocardial Method")
+#define CODE_DCM_EpicardialMethod                                          DSRBasicCodedEntry("130684", "DCM", "Epicardial Method")
+#define CODE_DCM_MyocardialMidlayerMethod                                  DSRBasicCodedEntry("130685", "DCM", "Myocardial Midlayer Method")
+#define CODE_DCM_LVEndSystolicGLSMultiviewMean_Endocardial                 DSRBasicCodedEntry("130686", "DCM", "LV End-systolic GLS Multiview Mean (Endocardial)")
+#define CODE_DCM_LVEndSystolicGLS4CH_Endocardial                           DSRBasicCodedEntry("130687", "DCM", "LV End-systolic GLS 4CH (Endocardial)")
+#define CODE_DCM_LVEndSystolicGLS2CH_Endocardial                           DSRBasicCodedEntry("130688", "DCM", "LV End-systolic GLS 2CH (Endocardial)")
+#define CODE_DCM_LVEndSystolicGLSALAX_Endocardial                          DSRBasicCodedEntry("130689", "DCM", "LV End-systolic GLS ALAX (Endocardial)")
+#define CODE_DCM_LVPeakSystolicGLSMultiviewMean_Endocardial                DSRBasicCodedEntry("130690", "DCM", "LV Peak Systolic GLS Multiview Mean (Endocardial)")
+#define CODE_DCM_LVPeakSystolicGLS4CH_Endocardial                          DSRBasicCodedEntry("130691", "DCM", "LV Peak Systolic GLS 4CH (Endocardial)")
+#define CODE_DCM_LVPeakSystolicGLS2CH_Endocardial                          DSRBasicCodedEntry("130692", "DCM", "LV Peak Systolic GLS 2CH (Endocardial)")
+#define CODE_DCM_LVPeakSystolicGLSALAX_Endocardial                         DSRBasicCodedEntry("130693", "DCM", "LV Peak Systolic GLS ALAX (Endocardial)")
+#define CODE_DCM_LVPeakGLSMultiviewMean_Endocardial                        DSRBasicCodedEntry("130694", "DCM", "LV Peak GLS Multiview Mean (Endocardial)")
+#define CODE_DCM_LVPeakGLS4CH_Endocardial                                  DSRBasicCodedEntry("130695", "DCM", "LV Peak GLS 4CH (Endocardial)")
+#define CODE_DCM_LVPeakGLS2CH_Endocardial                                  DSRBasicCodedEntry("130696", "DCM", "LV Peak GLS 2CH (Endocardial)")
+#define CODE_DCM_LVPeakGLSALAX_Endocardial                                 DSRBasicCodedEntry("130697", "DCM", "LV Peak GLS ALAX (Endocardial)")
+#define CODE_DCM_LVEndSystolicMechanicalDispersion                         DSRBasicCodedEntry("130698", "DCM", "LV End-systolic Mechanical Dispersion")
+#define CODE_DCM_MitralValveClosure                                        DSRBasicCodedEntry("130699", "DCM", "Mitral Valve Closure")
+#define CODE_DCM_MitralValveOpening                                        DSRBasicCodedEntry("130700", "DCM", "Mitral Valve Opening")
+#define CODE_DCM_AorticValveClosure                                        DSRBasicCodedEntry("130701", "DCM", "Aortic Valve Closure")
+#define CODE_DCM_AorticValveOpening                                        DSRBasicCodedEntry("130702", "DCM", "Aortic Valve Opening")
+#define CODE_DCM_Fp9                                                       DSRBasicCodedEntry("130710", "DCM", "Fp9")
+#define CODE_DCM_Fp10                                                      DSRBasicCodedEntry("130711", "DCM", "Fp10")
+#define CODE_DCM_AF9                                                       DSRBasicCodedEntry("130712", "DCM", "AF9")
+#define CODE_DCM_AF10                                                      DSRBasicCodedEntry("130713", "DCM", "AF10")
+#define CODE_DCM_PO9                                                       DSRBasicCodedEntry("130714", "DCM", "PO9")
+#define CODE_DCM_PO10                                                      DSRBasicCodedEntry("130715", "DCM", "PO10")
+#define CODE_DCM_O9                                                        DSRBasicCodedEntry("130716", "DCM", "O9")
+#define CODE_DCM_O10                                                       DSRBasicCodedEntry("130717", "DCM", "O10")
+#define CODE_DCM_CoronaryArteryDiseaseAssessment                           DSRBasicCodedEntry("130720", "DCM", "Coronary Artery Disease Assessment")
+#define CODE_DCM_OronaryArteryDiseaseAssessmentModifier                    DSRBasicCodedEntry("130721", "DCM", "oronary Artery Disease Assessment Modifier")
+#define CODE_DCM_CoronaryArteryDiseaseStenosisAssessmentModifier           DSRBasicCodedEntry("130722", "DCM", "Coronary Artery Disease Stenosis Assessment Modifier")
+#define CODE_DCM_0_DocumentedAbsenceOfCAD                                  DSRBasicCodedEntry("130723", "DCM", "0 - Documented absence of CAD")
+#define CODE_DCM_1_MinimalNonObstructiveCAD                                DSRBasicCodedEntry("130724", "DCM", "1 - Minimal non-obstructive CAD")
+#define CODE_DCM_2_MildNonObstructiveCAD                                   DSRBasicCodedEntry("130725", "DCM", "2 - Mild non-obstructive CAD")
+#define CODE_DCM_3_ModerateStenosis                                        DSRBasicCodedEntry("130726", "DCM", "3 - Moderate stenosis")
+#define CODE_DCM_4_SevereStenosis                                          DSRBasicCodedEntry("130727", "DCM", "4 - Severe stenosis")
+#define CODE_DCM_4A_SevereStenosis                                         DSRBasicCodedEntry("130728", "DCM", "4A - Severe stenosis")
+#define CODE_DCM_4B_SevereStenosis                                         DSRBasicCodedEntry("130729", "DCM", "4B - Severe stenosis")
+#define CODE_DCM_5_TotalCoronaryOcclusion                                  DSRBasicCodedEntry("130730", "DCM", "5 - Total coronary occlusion")
+#define CODE_DCM_N_NonDiagnosticStudy                                      DSRBasicCodedEntry("130731", "DCM", "N - Non-diagnostic study")
+#define CODE_DCM_N_NonDiagnosticSegments                                   DSRBasicCodedEntry("130732", "DCM", "N - Non-diagnostic segments")
+#define CODE_DCM_S_Stent                                                   DSRBasicCodedEntry("130733", "DCM", "S - Stent")
+#define CODE_DCM_G_Graft                                                   DSRBasicCodedEntry("130734", "DCM", "G - Graft")
+#define CODE_DCM_V_VulnerablePlaque                                        DSRBasicCodedEntry("130735", "DCM", "V - Vulnerable plaque")
+#define CODE_DCM_TitaniumAlloy_TitaniumMolybdenum15Zirconium5Aluminium3    DSRBasicCodedEntry("130736", "DCM", "Titanium alloy (Titanium Molybdenum-15 Zirconium-5 Aluminium-3)")
+#define CODE_DCM_RTSegmentMaterial                                         DSRBasicCodedEntry("130737", "DCM", "RT Segment Material")
+#define CODE_DCM_DoseLimitInterlock                                        DSRBasicCodedEntry("130738", "DCM", "Dose Limit Interlock")
+#define CODE_DCM_ClearanceInterlock                                        DSRBasicCodedEntry("130739", "DCM", "Clearance Interlock")
+#define CODE_DCM_MachineClearanceInterlock                                 DSRBasicCodedEntry("130740", "DCM", "Machine Clearance Interlock")
+#define CODE_DCM_PatientClearanceInterlock                                 DSRBasicCodedEntry("130741", "DCM", "Patient Clearance Interlock")
+#define CODE_DCM_AccessoryClearanceInterlock                               DSRBasicCodedEntry("130742", "DCM", "Accessory Clearance Interlock")
+#define CODE_DCM_OutOfToleranceInterlock                                   DSRBasicCodedEntry("130743", "DCM", "Out of Tolerance Interlock")
+#define CODE_DCM_InterlockResolved                                         DSRBasicCodedEntry("130744", "DCM", "Interlock Resolved")
+#define CODE_DCM_CTDoseLengthProductSubTotal                               DSRBasicCodedEntry("130745", "DCM", "CT Dose Length Product Sub-Total")
+#define CODE_DCM_RTRegistrationMark                                        DSRBasicCodedEntry("130746", "DCM", "RT Registration Mark")
+#define CODE_DCM_IsodoseVolume                                             DSRBasicCodedEntry("130747", "DCM", "Isodose Volume")
+#define CODE_DCM_RadiotherapyDoseRegion                                    DSRBasicCodedEntry("130748", "DCM", "Radiotherapy Dose Region")
+#define CODE_DCM_QualityControlMaterialImage                               DSRBasicCodedEntry("130750", "DCM", "Quality control material image")
+#define CODE_DCM_TissueNotOfInterest                                       DSRBasicCodedEntry("130751", "DCM", "Tissue not of interest")
 
 #endif
index 935826dff72c419cec0fe6c0707722470e4bc0f8..83b54a728eed84194d639517be1022c0bc6ab323 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file with NCI Thesaurus Code Definitions (Coding Scheme "NCIt")
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 10:55:26 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-11 09:59:32 by J. Riesmeier
  *
  */
 
@@ -34,7 +34,7 @@
  *  code definitions  *
  *--------------------*/
 
-// total number of codes: 42
+// total number of codes: 49
 // - retired: 0
 // - no name: 0
 // - not unique: 0
 // The "cleaned camel-case version of the code meaning" is an attempt to map the free text
 // description of the code meaning to a compiler-friendly but still human-readable representation.
 
+#define CODE_NCIt_IndexLesion                                              DSRBasicCodedEntry("C110961", "NCIt", "Index lesion")
 #define CODE_NCIt_EnhancingLesion                                          DSRBasicCodedEntry("C113842", "NCIt", "Enhancing Lesion")
 #define CODE_NCIt_RANO                                                     DSRBasicCodedEntry("C114879", "NCIt", "RANO")
 #define CODE_NCIt_DCFPyL_F18                                               DSRBasicCodedEntry("C116352", "NCIt", "DCFPyL F^18^")
 #define CODE_NCIt_Technetium99mTrofolastat                                 DSRBasicCodedEntry("C116887", "NCIt", "Technetium^99m Trofolastat")
 #define CODE_NCIt_PSMA11_Ga68                                              DSRBasicCodedEntry("C118961", "NCIt", "PSMA-11 Ga^68^")
 #define CODE_NCIt_Sarcosine_C11                                            DSRBasicCodedEntry("C122684", "NCIt", "Sarcosine C^11^")
+#define CODE_NCIt_IrreversibleElectroporation                              DSRBasicCodedEntry("C131483", "NCIt", "Irreversible electroporation")
+#define CODE_NCIt_4Kscore                                                  DSRBasicCodedEntry("C142184", "NCIt", "4Kscore")
 #define CODE_NCIt_SoftTissueSarcoma_excludingRhabdomyosarcoma              DSRBasicCodedEntry("C148457", "NCIt", "Soft tissue sarcoma, excluding rhabdomyosarcoma")
+#define CODE_NCIt_Cryoablation                                             DSRBasicCodedEntry("C15215", "NCIt", "Cryoablation")
 #define CODE_NCIt_166Holmium                                               DSRBasicCodedEntry("C1943", "NCIt", "^166^Holmium")
 #define CODE_NCIt_MouseMammaryFatPad                                       DSRBasicCodedEntry("C22550", "NCIt", "Mouse mammary fat pad")
 #define CODE_NCIt_Middle                                                   DSRBasicCodedEntry("C25569", "NCIt", "Middle")
 #define CODE_NCIt_NativeHawaiianOrOtherPacificIslander                     DSRBasicCodedEntry("C41219", "NCIt", "Native Hawaiian or other Pacific Islander")
 #define CODE_NCIt_AdverseEvent                                             DSRBasicCodedEntry("C41331", "NCIt", "Adverse Event")
 #define CODE_NCIt_TemperatureSensorDeviceComponent                         DSRBasicCodedEntry("C50304", "NCIt", "Temperature sensor device component")
+#define CODE_NCIt_Experience                                               DSRBasicCodedEntry("C54627", "NCIt", "Experience")
 #define CODE_NCIt_Reviewer                                                 DSRBasicCodedEntry("C54634", "NCIt", "Reviewer")
 #define CODE_NCIt_Ion                                                      DSRBasicCodedEntry("C597", "NCIt", "Ion")
 #define CODE_NCIt_AdLibitum                                                DSRBasicCodedEntry("C64636", "NCIt", "ad libitum")
 #define CODE_NCIt_ActivitySession                                          DSRBasicCodedEntry("C67447", "NCIt", "Activity Session")
+#define CODE_NCIt_FocusedUltrasoundAblation                                DSRBasicCodedEntry("C68681", "NCIt", "Focused ultrasound ablation")
 #define CODE_NCIt_UnitConversionFactor                                     DSRBasicCodedEntry("C70774", "NCIt", "Unit Conversion Factor")
 #define CODE_NCIt_MedicalProductExpirationDate                             DSRBasicCodedEntry("C70854", "NCIt", "Medical Product Expiration Date")
 #define CODE_NCIt_CardiotonicAgent                                         DSRBasicCodedEntry("C78322", "NCIt", "Cardiotonic agent")
@@ -86,6 +92,7 @@
 #define CODE_NCIt_LightCycle                                               DSRBasicCodedEntry("C90419", "NCIt", "Light cycle")
 #define CODE_NCIt_WaterDelivery                                            DSRBasicCodedEntry("C90486", "NCIt", "Water delivery")
 #define CODE_NCIt_Dosimetrist                                              DSRBasicCodedEntry("C93176", "NCIt", "Dosimetrist")
+#define CODE_NCIt_Abnormality                                              DSRBasicCodedEntry("C9440", "NCIt", "Abnormality")
 #define CODE_NCIt_ReferenceRegion                                          DSRBasicCodedEntry("C94970", "NCIt", "Reference Region")
 #define CODE_NCIt_DCFBC_F18                                                DSRBasicCodedEntry("C96234", "NCIt", "DCFBC F^18^")
 #define CODE_NCIt_Adjudicator                                              DSRBasicCodedEntry("C96561", "NCIt", "Adjudicator")
index a665cf212e09021f52d8afc27ab3a3cccb7d25c1..c4a9a2c74e2f7de95c8960f4623ae8e85b978b57 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Header file with UMLS Code Definitions (Coding Scheme "UMLS")
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 10:55:25 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-11 09:59:31 by J. Riesmeier
  *
  */
 
@@ -34,7 +34,7 @@
  *  code definitions  *
  *--------------------*/
 
-// total number of codes: 50
+// total number of codes: 51
 // - retired: 0
 // - no name: 0
 // - not unique: 0
@@ -61,6 +61,7 @@
 #define CODE_UMLS_Thermography                                             DSRBasicCodedEntry("C0039810", "UMLS", "Thermography")
 #define CODE_UMLS_Alphaxalone                                              DSRBasicCodedEntry("C0051482", "UMLS", "Alphaxalone")
 #define CODE_UMLS_Fluanisone                                               DSRBasicCodedEntry("C0060473", "UMLS", "Fluanisone")
+#define CODE_UMLS_KevlarAramidFiber                                        DSRBasicCodedEntry("C0064329", "UMLS", "Kevlar Aramid Fiber")
 #define CODE_UMLS_HeatLamp                                                 DSRBasicCodedEntry("C0181514", "UMLS", "Heat lamp")
 #define CODE_UMLS_UnknownPrimaryNeoplasiaSite                              DSRBasicCodedEntry("C0221297", "UMLS", "unknown primary neoplasia site")
 #define CODE_UMLS_RestrictedDiet                                           DSRBasicCodedEntry("C0425422", "UMLS", "Restricted diet")
index 59d1de5abc58591a5698403bc743b670c38887c6..edce0d0c698b4b9c40cfe1ef918d1ca7167da837 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2017, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -363,25 +363,31 @@ class DCMTK_DCMSR_EXPORT DSRCompositeReferenceValue
      *  The only checks performed are that the UID is non-empty and that it conforms to the
      *  corresponding VR (UI) and VM (1).  Derived classes should overwrite this method for
      *  more specific tests (e.g. allowing only particular SOP classes).
-     ** @param  sopClassUID   SOP class UID to be checked
+     ** @param  sopClassUID     SOP class UID to be checked
+     *  @param  reportWarnings  if enabled, report warning messages to the logger
      ** @return status, EC_Normal if value is valid, an error code otherwise
      */
-    virtual OFCondition checkSOPClassUID(const OFString &sopClassUID) const;
+    virtual OFCondition checkSOPClassUID(const OFString &sopClassUID,
+                                         const OFBool reportWarnings = OFFalse) const;
 
     /** check the specified SOP instance UID for validity.
      *  The only checks performed are that the UID is non-empty and that it conforms to the
      *  corresponding VR (UI) and VM (1).  Derived classes should overwrite this method for
      *  more specific tests.
-     *  @param  sopInstanceUID  SOP instance UID to be checked
+     ** @param  sopInstanceUID  SOP instance UID to be checked
+     *  @param  reportWarnings  if enabled, report warning messages to the logger
      ** @return status, EC_Normal if value is valid, an error code otherwise
      */
-    virtual OFCondition checkSOPInstanceUID(const OFString &sopInstanceUID) const;
+    virtual OFCondition checkSOPInstanceUID(const OFString &sopInstanceUID,
+                                            const OFBool reportWarnings = OFFalse) const;
 
     /** check the currently stored reference value for validity.
      *  See above checkXXX() methods for details.
+     ** @param  reportWarnings  if enabled, report a warning message on each deviation
+     *                          from an expected value to the logger
      ** @return status, EC_Normal if current value is valid, an error code otherwise
      */
-    OFCondition checkCurrentValue() const;
+    OFCondition checkCurrentValue(const OFBool reportWarnings = OFFalse) const;
 
     /// reference SOP class UID (VR=UI, type 1)
     OFString SOPClassUID;
index 83172e7aa1aa642e6f9eeb74c097dc8411d1464b..8e64b2a05688579a0049693d41b6e684e493d95f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2020, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -34,6 +34,7 @@
 
 #include "dcmtk/dcmdata/dcvrcs.h"
 #include "dcmtk/dcmdata/dcvrda.h"
+#include "dcmtk/dcmdata/dcvrds.h"
 #include "dcmtk/dcmdata/dcvris.h"
 #include "dcmtk/dcmdata/dcvrlo.h"
 #include "dcmtk/dcmdata/dcvrpn.h"
@@ -139,10 +140,10 @@ class DCMTK_DCMSR_EXPORT DSRDocument
     virtual OFCondition readPatientData(DcmItem &dataset,
                                         const size_t flags = 0);
 
-    /** read study data from DICOM dataset. Also reads patient data.
-     *  The list of data elements that are read can be found under "Patient Module" and
-     *  "General Study Module" in the member variable section of this class.  Other data
-     *  is not changed, so be careful when using this method.
+    /** read study data from DICOM dataset.  Also reads patient data.
+     *  The list of data elements that are read can be found under "Patient Module", "General
+     *  Study Module" and "Patient Study Module" in the member variable section of this class.
+     *  Other data is not changed, so be careful when using this method.
      *  @param  dataset  reference to DICOM dataset from which the data should be read
      *  @param  flags    optional flag used to customize the reading process (see DSRTypes::RF_xxx)
      ** @return status, EC_Normal if successful, an error code otherwise
@@ -523,6 +524,22 @@ class DCMTK_DCMSR_EXPORT DSRDocument
     virtual OFCondition getPatientSex(OFString &value,
                                       const signed long pos = 0) const;
 
+    /** get patient's size
+     ** @param  value  reference to variable in which the value should be stored
+     *  @param  pos    index of the value to get (0..vm-1), -1 for all components
+     ** @return status, EC_Normal if successful, an error code otherwise
+     */
+    virtual OFCondition getPatientSize(OFString &value,
+                                       const signed long pos = 0) const;
+
+    /** get patient's weight
+     ** @param  value  reference to variable in which the value should be stored
+     *  @param  pos    index of the value to get (0..vm-1), -1 for all components
+     ** @return status, EC_Normal if successful, an error code otherwise
+     */
+    virtual OFCondition getPatientWeight(OFString &value,
+                                         const signed long pos = 0) const;
+
     /** get referring physician's name
      ** @param  value  reference to variable in which the value should be stored
      *  @param  pos    index of the value to get (0..vm-1), -1 for all components
@@ -783,6 +800,22 @@ class DCMTK_DCMSR_EXPORT DSRDocument
     virtual OFCondition setPatientSex(const OFString &value,
                                       const OFBool check = OFTrue);
 
+    /** set patient's size
+     ** @param  value  value to be set (single value only) or "" for no value
+     *  @param  check  check 'value' for conformance with VR (DS) and VM (1) if enabled
+     ** @return status, EC_Normal if successful, an error code otherwise
+     */
+    virtual OFCondition setPatientSize(const OFString &value,
+                                       const OFBool check = OFTrue);
+
+    /** set patient's weight
+     ** @param  value  value to be set (single value only) or "" for no value
+     *  @param  check  check 'value' for conformance with VR (DS) and VM (1) if enabled
+     ** @return status, EC_Normal if successful, an error code otherwise
+     */
+    virtual OFCondition setPatientWeight(const OFString &value,
+                                         const OFBool check = OFTrue);
+
     /** set referring physician's name
      ** @param  value  value to be set (single value only) or "" for no value
      *  @param  check  check 'value' for conformance with VR (PN) and VM (1) if enabled
@@ -981,7 +1014,7 @@ class DCMTK_DCMSR_EXPORT DSRDocument
      *  After generating a new study instance UID the method createNewSeries() is called,
      *  i.e. also a new series instance UID and SOP instance UID are generated.  This is
      *  a requirement of the DICOM standard.  All other study-related attributes are
-     *  cleared.
+     *  cleared (including the attributes from the Patient Study Module).
      */
     virtual void createNewStudy();
 
@@ -1361,6 +1394,13 @@ class DCMTK_DCMSR_EXPORT DSRDocument
     /// Patient's Sex: (CS, 1, 2)
     DcmCodeString       PatientSex;
 
+    // --- Patient Study Module (U) ---
+
+    /// Patient's Size: (DS, 1, 3)
+    DcmDecimalString    PatientSize;
+    /// Patient's Weight: (DS, 1, 3)
+    DcmDecimalString    PatientWeight;
+
     // --- General Equipment Module (M) ---
 
     /// Manufacturer: (LO, 1, 2)
index 0a615fe5edf2a132199323affc11c824c3b72a34..8ad1cf7bc26619752c58cb522d49fb34d7f7e331 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2020, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -442,27 +442,33 @@ class DCMTK_DCMSR_EXPORT DSRImageReferenceValue
      *  This method further specializes the checks performed in the base class
      *  DSRCompositeReferenceValue.  All image and segmentation SOP classes that
      *  are defined in DICOM PS 3.6-2020c are allowed.
-     ** @param  sopClassUID  SOP class UID to be checked
+     ** @param  sopClassUID     SOP class UID to be checked
+     *  @param  reportWarnings  if enabled, report warning messages to the logger
      ** @return status, EC_Normal if value is valid, an error code otherwise
      */
-    virtual OFCondition checkSOPClassUID(const OFString &sopClassUID) const;
+    virtual OFCondition checkSOPClassUID(const OFString &sopClassUID,
+                                         const OFBool reportWarnings = OFFalse) const;
 
     /** check the given reference to a presentation state object for validity.
      *  The reference is "valid" if both UIDs are empty or both are not empty and
      *  SOP class UID refers to a softcopy presentation state object (see
      *  DSRTypes::E_PresentationStateType for a list of supported SOP classes).
      ** @param  referenceValue  value to be checked
+     *  @param  reportWarnings  if enabled, report warning messages to the logger
      ** @return status, EC_Normal if value is valid, an error code otherwise
      */
-    virtual OFCondition checkPresentationState(const DSRCompositeReferenceValue &referenceValue) const;
+    virtual OFCondition checkPresentationState(const DSRCompositeReferenceValue &referenceValue,
+                                               const OFBool reportWarnings = OFFalse) const;
 
     /** check the given reference to a real world value mapping object for validity.
      *  The reference is "valid" if both UIDs are empty or both are not empty and
      *  SOP class UID refers to the "Real World Value Mapping Storage SOP Class".
      ** @param  referenceValue  value to be checked
+     *  @param  reportWarnings  if enabled, report warning messages to the logger
      ** @return status, EC_Normal if value is valid, an error code otherwise
      */
-    virtual OFCondition checkRealWorldValueMapping(const DSRCompositeReferenceValue &referenceValue) const;
+    virtual OFCondition checkRealWorldValueMapping(const DSRCompositeReferenceValue &referenceValue,
+                                                   const OFBool reportWarnings = OFFalse) const;
 
     /** check the given list of frame and segment numbers for validity.
      *  Either both lists have to be empty or only one of them has to be non-empty,
@@ -472,8 +478,7 @@ class DCMTK_DCMSR_EXPORT DSRImageReferenceValue
      ** @param  sopClassUID     SOP class UID of the image object to be checked
      *  @param  frameList       list of referenced frame numbers to be checked
      *  @param  segmentList     list of referenced segment numbers to be checked
-     *  @param  reportWarnings  if enabled, report a warning message on each deviation
-     *                          from an expected value to the logger
+     *  @param  reportWarnings  if enabled, report a warning message to the logger
      ** @return status, EC_Normal if checked data is valid, an error code otherwise
      */
     OFCondition checkListData(const OFString &sopClassUID,
@@ -484,9 +489,11 @@ class DCMTK_DCMSR_EXPORT DSRImageReferenceValue
     /** check the currently stored image reference value for validity.
      *  See above checkXXX() methods and DSRCompositeReferenceValue::checkCurrentValue()
      *  for details.
+     ** @param  reportWarnings  if enabled, report a warning message on each deviation
+     *                          from an expected value to the logger
      ** @return status, EC_Normal if current value is valid, an error code otherwise
      */
-    OFCondition checkCurrentValue() const;
+    OFCondition checkCurrentValue(const OFBool reportWarnings = OFFalse) const;
 
 
   private:
index 6ac6812b8372e0f69c5633e580405703a9af9d34..9e6ea9ba1e089a61a7152eab88f5a0236e251310 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2016, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -62,10 +62,10 @@ class DCMTK_DCMSR_EXPORT DSRNumericMeasurementValue
                                const OFBool check = OFTrue);
 
     /** constructor
-     ** @param  valueQualifier  code representing the numeric value qualifier.  Used to
-     *                          specify the reason for the absence of the measured value
-     *                          sequence, i.e. why the numeric value and measurement unit
-     *                          are empty.
+     ** @param  valueQualifier  code representing the numeric value qualifier (mandatory).
+     *                          Used to specify the reason for the absence of the measured
+     *                          value sequence, i.e. why the numeric value and measurement
+     *                          unit are empty.
      *  @param  check           if enabled, check value for validity before setting it.
      *                          See corresponding setValue() method for details.
      */
@@ -75,10 +75,7 @@ class DCMTK_DCMSR_EXPORT DSRNumericMeasurementValue
     /** constructor
      ** @param  numericValue     numeric value (VR=DS, mandatory)
      *  @param  measurementUnit  code representing the units of measurement (mandatory)
-     *  @param  valueQualifier   code representing the numeric value qualifier (optional).
-     *                           Can also be used to specify the reason for the absence of
-     *                           the measured value sequence (where 'numericValue' and
-     *                           'measurementUnit' are stored).
+     *  @param  valueQualifier   code representing the numeric value qualifier (optional)
      *  @param  check            if enabled, check values for validity before setting them.
      *                           See corresponding setValue() method for details.
      */
@@ -196,7 +193,7 @@ class DCMTK_DCMSR_EXPORT DSRNumericMeasurementValue
 
     /** write measured value sequence and numeric value qualifier code sequence to dataset.
      *  The measured value sequence is always written (might be empty, though).  The numeric
-     *  value qualifier code sequence is optional and, therefore, only written if non-empty.
+     *  value qualifier code sequence is conditional and, therefore, only written if non-empty.
      ** @param  dataset  DICOM dataset to which the sequences should be written
      ** @return status, EC_Normal if successful, an error code otherwise
      */
@@ -206,7 +203,8 @@ class DCMTK_DCMSR_EXPORT DSRNumericMeasurementValue
      ** @param  docStream    output stream to which the main HTML/XHTML document is written
      *  @param  annexStream  output stream to which the HTML/XHTML document annex is written
      *  @param  annexNumber  reference to the variable where the current annex number is stored.
-     *                       Value is increased automatically by 1 after a new entry has been added.
+     *                       Value is increased automatically by 1 after a new entry has been
+     *                       added.
      *  @param  flags        flag used to customize the output (see DSRTypes::HF_xxx)
      ** @return status, EC_Normal if successful, an error code otherwise
      */
@@ -245,7 +243,7 @@ class DCMTK_DCMSR_EXPORT DSRNumericMeasurementValue
         return MeasurementUnit;
     }
 
-    /** get numeric value qualifier (optional)
+    /** get numeric value qualifier (conditional)
      ** @return reference to current numeric value qualifier code (might be invalid or empty)
      */
     inline const DSRCodedEntryValue &getNumericValueQualifier() const
@@ -259,8 +257,7 @@ class DCMTK_DCMSR_EXPORT DSRNumericMeasurementValue
      */
     OFCondition getMeasurementUnit(DSRCodedEntryValue &measurementUnit) const;
 
-    /** get copy of numeric value qualifier (optional).
-     *  Can be used to specify the reason for the absence of the measured value sequence.
+    /** get copy of numeric value qualifier (conditional)
      ** @param  valueQualifier  reference to variable in which the code should be stored
      ** @return always returns EC_Normal
      */
@@ -316,8 +313,8 @@ class DCMTK_DCMSR_EXPORT DSRNumericMeasurementValue
     /** set empty numeric value and measurement unit with a numeric value qualifier.
      *  Before setting the value, it is usually checked.  If the value is invalid, the
      *  current numeric measurement value is not replaced and remains unchanged.
-     ** @param  valueQualifier  numeric value qualifier to be set.  Used to specify the
-     *                          reason for the absence of the measured value sequence,
+     ** @param  valueQualifier  numeric value qualifier to be set.  Shall be used to specify
+     *                          the reason for the absence of the measured value sequence,
      *                          i.e. why the numeric value and measurement unit are empty.
      *  @param  check           if enabled, check value for validity before setting it.
      *                          See checkNumericValueQualifier() method for details.
@@ -335,10 +332,8 @@ class DCMTK_DCMSR_EXPORT DSRNumericMeasurementValue
      *  needed.
      ** @param  numericValue     numeric value to be set (VR=DS, mandatory)
      *  @param  measurementUnit  measurement unit to be set (mandatory)
-     *  @param  valueQualifier   numeric value qualifier to be set (optional).  Can also be
-     *                           used to specify the reason for the absence of the measured
-     *                           value sequence (where 'numericValue' and 'measurementUnit'
-     *                           are stored).  Use an empty code to remove the current value.
+     *  @param  valueQualifier   numeric value qualifier to be set (optional).
+     *                           Use an empty code to remove the current value.
      *  @param  check            if enabled, check values for validity before setting them.
      *                           See checkXXX() methods for details.
      ** @return status, EC_Normal if successful, an error code otherwise
@@ -410,12 +405,12 @@ class DCMTK_DCMSR_EXPORT DSRNumericMeasurementValue
                                    const OFBool check = OFTrue);
 
     /** set numeric value qualifier.
-     *  This optional code specifies the qualification of the Numeric Value in the Measured
+     *  This conditional code specifies the qualification of the Numeric Value in the Measured
      *  Value Sequence, or the reason for the absence of the Measured Value Sequence Item.
      *  Before setting the code, it is usually checked.  If the code is invalid the current
      *  code is not replaced and remains unchanged.
-     ** @param  valueQualifier  numeric value qualifier to be set (optional).  Use an empty
-     *                          code to remove the current value.
+     ** @param  valueQualifier  numeric value qualifier to be set (conditional).
+     *                          Use an empty code to remove the current value.
      *  @param  check           if enabled, check value for validity before setting it.
      *                          See checkNumericValueQualifier() method for details.
      ** @return status, EC_Normal if successful, an error code otherwise
@@ -539,7 +534,7 @@ class DCMTK_DCMSR_EXPORT DSRNumericMeasurementValue
     OFString               NumericValue;
     /// Measurement Unit (type 1 within a type 2 sequence)
     DSRCodedEntryValue     MeasurementUnit;
-    /// Numeric Value Qualifier (type 3)
+    /// Numeric Value Qualifier (type 1C)
     DSRCodedEntryValue     ValueQualifier;
     /// Floating Point Value (VR=FD, type 1C)
     DcmFloatingPointDouble FloatingPointValue;
index 5ec109acac48c6dc6c6f74d0662b2d26836ea45a..31759b8516c4dda0284dd38b82e403205fe5dcf9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2018, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -282,7 +282,7 @@ template<class T> class DSRListOfItems
             ItemList.push_back(item);
             result = EC_Normal;
         } else {
-            OFLIST_TYPENAME OFListIterator(T) iterator = ItemList.begin();
+            OFLIST_TYPENAME OFListConstIterator(T) iterator = ItemList.begin();
             if (gotoItemPos(idx, iterator))
             {
                 ItemList.insert(iterator, 1, item);
@@ -299,7 +299,7 @@ template<class T> class DSRListOfItems
     OFCondition removeItem(const size_t idx)
     {
         OFCondition result = EC_IllegalParameter;
-        OFLIST_TYPENAME OFListIterator(T) iterator = ItemList.begin();
+        OFLIST_TYPENAME OFListConstIterator(T) iterator = ItemList.begin();
         if (gotoItemPos(idx, iterator))
         {
             ItemList.erase(iterator);
index 190b3fc56a3b01a7e99fc0e74970bc48ad22649f..e566c9b9d2a511dc3eeacfdbf3868b28bfce084e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2020, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -521,6 +521,8 @@ class DCMTK_DCMSR_EXPORT DSRTypes
         DT_ProcedureLog,
         /// DICOM IOD: X-Ray Radiation Dose SR
         DT_XRayRadiationDoseSR,
+        /// DICOM IOD: Enhanced X-Ray Radiation Dose SR (not yet implemented)
+        DT_EnhancedXRayRadiationDoseSR,
         /// DICOM IOD: Spectacle Prescription Report
         DT_SpectaclePrescriptionReport,
         /// DICOM IOD: Macular Grid Thickness and Volume Report
index a85cf24381efca13c239aec12d6fc391e93c0cae..f5b21aa07b7ccab20095c4257381c7846b51a8c1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2020, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -217,10 +217,12 @@ class DCMTK_DCMSR_EXPORT DSRWaveformReferenceValue
      *  This method further specializes the checks performed in the base class
      *  DSRCompositeReferenceValue.  All waveform SOP classes that are defined
      *  in DICOM PS 3.6-2020c are allowed.
-     ** @param  sopClassUID  SOP class UID to be checked
+     ** @param  sopClassUID     SOP class UID to be checked
+     *  @param  reportWarnings  if enabled, report warning messages to the logger
      ** @return status, EC_Normal if value is valid, an error code otherwise
      */
-    virtual OFCondition checkSOPClassUID(const OFString &sopClassUID) const;
+    virtual OFCondition checkSOPClassUID(const OFString &sopClassUID,
+                                         const OFBool reportWarnings = OFFalse) const;
 
 
   private:
index f2a2a1cbe88fb178d34532eefa0028caf19c6219..6cc94f45c5c0cfec55f3fe704790306ecc047c04 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2019, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/ofstd/oftypes.h"    /* for definition of OFBool */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDDEF
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef WITH_LIBXML
 
 #ifdef __ibmxl__
index a1f4cb19cc682c8bedb429200891581973923a14..2d474512ab1d89ac2c86e3d068129eca217d6d9a 100644 (file)
@@ -1,4 +1,44 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(cmr init logger srnumvl tid300 tid1001 tid1204 tid1411 tid1419m tid1500 tid1501 tid15def tid1600 tid4019 cid11 cid29 cid29e cid42 cid100 cid244 cid244e cid4020 cid4021 cid4031 cid4031e cid5000 cid5001 cid6147 cid7021 cid7181 cid7445 cid7452 cid7453 cid7464 cid7469 cid10013 cid10013e cid10033 cid10033e)
+DCMTK_ADD_LIBRARY(cmr
+  cid100.cc
+  cid10013.cc
+  cid10013e.cc
+  cid10033.cc
+  cid10033e.cc
+  cid11.cc
+  cid244.cc
+  cid244e.cc
+  cid247.cc
+  cid29.cc
+  cid29e.cc
+  cid4020.cc
+  cid4021.cc
+  cid4031.cc
+  cid4031e.cc
+  cid42.cc
+  cid5000.cc
+  cid5001.cc
+  cid6147.cc
+  cid7021.cc
+  cid7181.cc
+  cid7445.cc
+  cid7452.cc
+  cid7453.cc
+  cid7464.cc
+  cid7469.cc
+  init.cc
+  logger.cc
+  srnumvl.cc
+  tid1001.cc
+  tid1204.cc
+  tid1411.cc
+  tid1419m.cc
+  tid1500.cc
+  tid1501.cc
+  tid15def.cc
+  tid1600.cc
+  tid300.cc
+  tid4019.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(cmr dcmsr)
index 60123a94c717895deff0caccf90292beee4d2e06..9740ed0629d74d35442e837e580c1d288c27e7df 100644 (file)
@@ -5,12 +5,12 @@ cid100.o: cid100.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -67,12 +67,12 @@ cid10013.o: cid10013.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -130,12 +130,12 @@ cid10013e.o: cid10013e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -192,12 +192,12 @@ cid10033.o: cid10033.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -255,12 +255,12 @@ cid10033e.o: cid10033e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -317,12 +317,12 @@ cid11.o: cid11.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -379,12 +379,12 @@ cid244.o: cid244.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -441,12 +441,74 @@ cid244e.o: cid244e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexbl.h \
+ ../include/dcmtk/dcmsr/cmr/define.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmap.h
+cid247.o: cid247.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmsr/cmr/cid247.h ../include/dcmtk/dcmsr/dsrctxgr.h \
+ ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
+ ../include/dcmtk/dcmsr/dsdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -503,12 +565,12 @@ cid29.o: cid29.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -565,12 +627,12 @@ cid29e.o: cid29e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -628,12 +690,12 @@ cid4020.o: cid4020.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -690,12 +752,12 @@ cid4021.o: cid4021.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -752,12 +814,12 @@ cid4031.o: cid4031.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -815,12 +877,12 @@ cid4031e.o: cid4031e.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -877,12 +939,12 @@ cid42.o: cid42.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -939,12 +1001,12 @@ cid5000.o: cid5000.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1001,12 +1063,12 @@ cid5001.o: cid5001.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1063,12 +1125,12 @@ cid6147.o: cid6147.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1125,12 +1187,12 @@ cid7021.o: cid7021.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1187,12 +1249,12 @@ cid7181.o: cid7181.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1249,12 +1311,12 @@ cid7445.o: cid7445.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1311,12 +1373,12 @@ cid7452.o: cid7452.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1373,12 +1435,12 @@ cid7453.o: cid7453.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1435,12 +1497,12 @@ cid7464.o: cid7464.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1497,12 +1559,12 @@ cid7469.o: cid7469.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1557,7 +1619,6 @@ init.o: init.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmsr/cmr/cid11.h ../include/dcmtk/dcmsr/dsrctxgr.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
  ../include/dcmtk/dcmsr/dsdefine.h \
@@ -1566,6 +1627,7 @@ init.o: init.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1673,12 +1735,12 @@ srnumvl.o: srnumvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1740,12 +1802,12 @@ tid1001.o: tid1001.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1828,12 +1890,12 @@ tid1204.o: tid1204.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1915,12 +1977,12 @@ tid1411.o: tid1411.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2015,12 +2077,12 @@ tid1419m.o: tid1419m.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2112,12 +2174,12 @@ tid1500.o: tid1500.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2222,12 +2284,12 @@ tid1501.o: tid1501.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2332,12 +2394,12 @@ tid1600.o: tid1600.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2432,12 +2494,12 @@ tid300.o: tid300.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2528,12 +2590,12 @@ tid4019.o: tid4019.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
index ce7497a11354013f0485dc118ba7bd1fd4f4d639..05acf259e1858e211bdbb6cec7b973807c4b9dcc 100644 (file)
@@ -23,10 +23,10 @@ LOCALDEFS =
 
 objs = init.o logger.o srnumvl.o tid300.o tid1001.o tid1204.o tid1411.o tid1419m.o \
        tid1500.o tid1501.o tid15def.o tid1600.o tid4019.o \
-       cid11.o cid29.o cid29e.o cid42.o cid100.o cid244.o cid244e.o cid4020.o \
-       cid4021.o cid4031.o cid4031e.o cid5000.o cid5001.o cid6147.o cid7021.o \
-       cid7181.o cid7445.o cid7452.o cid7453.o cid7464.o cid7469.o cid10013.o \
-       cid10013e.o cid10033.o cid10033e.o
+       cid11.o cid29.o cid29e.o cid42.o cid100.o cid244.o cid244e.o cid247.o \
+       cid4020.o cid4021.o cid4031.o cid4031e.o cid5000.o cid5001.o cid6147.o \
+       cid7021.o cid7181.o cid7445.o cid7452.o cid7453.o cid7464.o cid7469.o \
+       cid10013.o cid10013e.o cid10033.o cid10033e.o
 library = libcmr.$(LIBEXT)
 
 
index ace0841aaccf32b98f88525f536d84722f714af0..2ab37d139680cdafaccdcf18f9204128ff2136c5 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID100_QuantitativeDiagnosticImagingProcedures
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:49 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:10 by J. Riesmeier
  *
  */
 
@@ -18,7 +18,7 @@
 
 // general information on CID 100 (Quantitative Diagnostic Imaging Procedures)
 #define CONTEXT_GROUP_NUMBER  "100"
-#define CONTEXT_GROUP_VERSION "20190817"
+#define CONTEXT_GROUP_VERSION "20210905"
 #define CONTEXT_GROUP_UID     "1.2.840.10008.6.1.998"
 #define CONTEXT_GROUP_TYPE    OFTrue  /* extensible */
 
@@ -152,7 +152,7 @@ CID100_QuantitativeDiagnosticImagingProcedures::CodeList &CID100_QuantitativeDia
         Codes->insert(OFMake_pair(ImagingProcedure, DSRBasicCodedEntry("363679005", "SCT", "Imaging procedure")));
         Codes->insert(OFMake_pair(MagneticResonanceImagingGuidance, DSRBasicCodedEntry("258177008", "SCT", "Magnetic resonance imaging guidance")));
         Codes->insert(OFMake_pair(MultiparametricMRI, DSRBasicCodedEntry("126020", "DCM", "Multiparametric MRI")));
-        Codes->insert(OFMake_pair(MultiparametricMRIOfProstate, DSRBasicCodedEntry("126021", "DCM", "Multiparametric MRI of prostate")));
+        Codes->insert(OFMake_pair(MultiparametricMRIOfProstate, DSRBasicCodedEntry("719178004", "SCT", "Multiparametric MRI of prostate")));
         Codes->insert(OFMake_pair(MultiparametricMRIOfWholeBody, DSRBasicCodedEntry("126022", "DCM", "Multiparametric MRI of whole body")));
         Codes->insert(OFMake_pair(DynamicMagneticResonanceImagingOfKnee, DSRBasicCodedEntry("433139009", "SCT", "Dynamic magnetic resonance imaging of knee")));
         Codes->insert(OFMake_pair(DynamicMagneticResonanceImagingOfPelvis, DSRBasicCodedEntry("446315002", "SCT", "Dynamic magnetic resonance imaging of pelvis")));
index b5b15172f36620dc25ff5568c425f1cc86489ed6..0f26c4484d18eaa10421f74ffc4aa45e71f0acdc 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID10013_CTAcquisitionType
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:16 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:20 by J. Riesmeier
  *
  */
 
index 45940351a2672cd345694c4ac4a09c34193980f2..7b77f5f872d33a2feee00fb71a7e3f4c3f284a7b 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID10033_CTReconstructionAlgorithm
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:18 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:21 by J. Riesmeier
  *
  */
 
index 3819068cbf000d2b64664b0be187694cc07a4b8b..e47d49bacaa1f26aac9204f93358af98ff29edcc 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID11_RouteOfAdministration
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:44 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:08 by J. Riesmeier
  *
  */
 
index 44a3a71cc08685e9f9f16bb06eea303799bd68a7..3056a91f39bcb2f1d62c22c12925e35cc56b2589 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID244_Laterality
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:51 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:11 by J. Riesmeier
  *
  */
 
diff --git a/dcmsr/libcmr/cid247.cc b/dcmsr/libcmr/cid247.cc
new file mode 100644 (file)
index 0000000..8118286
--- /dev/null
@@ -0,0 +1,163 @@
+/*
+ *
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  Source file for class CID247_LateralityLeftRightOnly
+ *
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:11 by J. Riesmeier
+ *
+ */
+
+
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+#include "dcmtk/dcmsr/cmr/cid247.h"
+
+
+// general information on CID 247 (Laterality Left-Right Only)
+#define CONTEXT_GROUP_NUMBER  "247"
+#define CONTEXT_GROUP_VERSION "20190524"
+#define CONTEXT_GROUP_UID     "1.2.840.10008.6.1.1284"
+#define CONTEXT_GROUP_TYPE    OFTrue  /* extensible */
+
+// initialize global/static variable
+CID247_LateralityLeftRightOnly::CodeList *CID247_LateralityLeftRightOnly::Codes = NULL;
+
+
+CID247_LateralityLeftRightOnly::CID247_LateralityLeftRightOnly(const DSRCodedEntryValue &selectedValue)
+  : DSRContextGroup(CONTEXT_GROUP_NUMBER, "DCMR", CONTEXT_GROUP_VERSION, CONTEXT_GROUP_UID, selectedValue)
+{
+    setExtensible(CONTEXT_GROUP_TYPE);
+}
+
+
+CID247_LateralityLeftRightOnly::CID247_LateralityLeftRightOnly(const EnumType selectedValue,
+                                                               const OFBool enhancedEncodingMode)
+  : DSRContextGroup(CONTEXT_GROUP_NUMBER, "DCMR", CONTEXT_GROUP_VERSION, CONTEXT_GROUP_UID, getCodedEntry(selectedValue, enhancedEncodingMode))
+{
+    setExtensible(CONTEXT_GROUP_TYPE);
+}
+
+
+OFCondition CID247_LateralityLeftRightOnly::selectValue(const EnumType selectedValue,
+                                                        const OFBool enhancedEncodingMode)
+{
+    /* never check the coded entry */
+    return DSRContextGroup::selectValue(getCodedEntry(selectedValue, enhancedEncodingMode), OFFalse /*check*/, OFFalse /*definedContextGroup*/);
+}
+
+
+OFCondition CID247_LateralityLeftRightOnly::findCodedEntry(const DSRCodedEntryValue &searchForCodedEntry,
+                                                           DSRCodedEntryValue *foundCodedEntry,
+                                                           const OFBool enhancedEncodingMode) const
+{
+    OFCondition result = SR_EC_CodedEntryNotInContextGroup;
+    /* first, search for standard codes */
+    CodeList::const_iterator iter = getCodes().begin();
+    CodeList::const_iterator last = getCodes().end();
+    /* iterate over coded entry list */
+    while (iter != last)
+    {
+        /* if found, exit loop */
+        if (searchForCodedEntry == iter->second)
+        {
+            /* return coded entry (if requested) */
+            if (foundCodedEntry != NULL)
+            {
+                *foundCodedEntry = iter->second;
+                /* also set enhanced encoding mode (if enabled) */
+                if (!foundCodedEntry->isEmpty() && enhancedEncodingMode)
+                    setEnhancedEncodingMode(*foundCodedEntry);
+            }
+            result = SR_EC_CodedEntryInStandardContextGroup;
+            break;
+        }
+        ++iter;
+    }
+    /* if not, continue with extended codes */
+    if (result.bad())
+    {
+        result = DSRContextGroup::findCodedEntry(searchForCodedEntry, foundCodedEntry);
+        /* tbd: set "enhanced encoding mode" to mark a local/extended version? */
+    }
+    return result;
+}
+
+
+void CID247_LateralityLeftRightOnly::printCodes(STD_NAMESPACE ostream &stream) const
+{
+    /* print standard codes */
+    stream << "Standard codes:" << OFendl;
+    CodeList::const_iterator iter = getCodes().begin();
+    CodeList::const_iterator last = getCodes().end();
+    /* iterate over coded entry list */
+    while (iter != last)
+    {
+        stream << "  ";
+        /* print coded entry */
+        DSRCodedEntryValue(iter->second).print(stream);
+        stream << OFendl;
+        ++iter;
+    }
+    /* print extended codes */
+    DSRContextGroup::printCodes(stream);
+}
+
+
+// static functions
+
+void CID247_LateralityLeftRightOnly::initialize()
+{
+    /* create and initialize code list */
+    getCodes();
+}
+
+
+void CID247_LateralityLeftRightOnly::cleanup()
+{
+    /* delete code list, it will be recreated automatically when needed */
+    delete Codes;
+    Codes = NULL;
+}
+
+
+DSRCodedEntryValue CID247_LateralityLeftRightOnly::getCodedEntry(const EnumType value,
+                                                                 const OFBool enhancedEncodingMode)
+{
+    DSRCodedEntryValue codedEntry;
+    /* search for given enumerated value */
+    CodeList::iterator iter = getCodes().find(value);
+    /* if found, set the coded entry */
+    if (iter != getCodes().end())
+    {
+        codedEntry = iter->second;
+        /* also set enhanced encoding mode (if enabled) */
+        if (!codedEntry.isEmpty() && enhancedEncodingMode)
+            setEnhancedEncodingMode(codedEntry);
+    }
+    return codedEntry;
+}
+
+
+CID247_LateralityLeftRightOnly::CodeList &CID247_LateralityLeftRightOnly::getCodes()
+{
+    /* check whether code list has already been created and initialized */
+    if (Codes == NULL)
+    {
+        /* create a new code list (should never fail) */
+        Codes = new CodeList();
+        /* and initialize it by adding the coded entries */
+        Codes->insert(OFMake_pair(Right, DSRBasicCodedEntry("24028007", "SCT", "Right")));
+        Codes->insert(OFMake_pair(Left, DSRBasicCodedEntry("7771000", "SCT", "Left")));
+    }
+    /* should never be NULL */
+    return *Codes;
+}
+
+
+OFCondition CID247_LateralityLeftRightOnly::setEnhancedEncodingMode(DSRCodedEntryValue &codedEntryValue)
+{
+    return codedEntryValue.setEnhancedEncodingMode(CONTEXT_GROUP_NUMBER, "DCMR", CONTEXT_GROUP_VERSION, CONTEXT_GROUP_UID);
+}
index 5f4fe3009a057344a2101d0c432ec55b169ca0e9..74e424a25374ca61992dfbdbc645d94f3723d2b6 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID29_AcquisitionModality
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:45 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:09 by J. Riesmeier
  *
  */
 
index bdaaa6bf444404675d535054f9929f75578fac09..e8dd5f222b6b324e292c60ca520a73fdd1fc8d66 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID4020_PETRadionuclide
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:55 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:12 by J. Riesmeier
  *
  */
 
index f23843480397f980c4d7bfaee71b84a97320619e..05155d0eb51975b24e6739ac29589dcd80ab1bd0 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID4021_PETRadiopharmaceutical
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:57 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:13 by J. Riesmeier
  *
  */
 
@@ -149,7 +149,6 @@ CID4021_PETRadiopharmaceutical::CodeList &CID4021_PETRadiopharmaceutical::getCod
         /* create a new code list (should never fail) */
         Codes = new CodeList();
         /* and initialize it by adding the coded entries */
-        Codes->insert(OFMake_pair(_18_FluorineFlortaucipir, DSRBasicCodedEntry("C000591008", "MSH", "^18^Fluorine flortaucipir")));
         Codes->insert(OFMake_pair(_28H1_89Zr, DSRBasicCodedEntry("126752", "DCM", "28H1 ^89^Zr")));
         Codes->insert(OFMake_pair(_2FA_F18, DSRBasicCodedEntry("126713", "DCM", "2FA F^18^")));
         Codes->insert(OFMake_pair(_7D12_89Zr, DSRBasicCodedEntry("126751", "DCM", "7D12 ^89^Zr")));
index f92396b4f14815684358087c2eae1661cad3a205..bc994103e2f7629b4be8adb3e6288674e33eea36 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID4031_CommonAnatomicRegions
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:59 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:14 by J. Riesmeier
  *
  */
 
@@ -18,7 +18,7 @@
 
 // general information on CID 4031 (Common Anatomic Regions)
 #define CONTEXT_GROUP_NUMBER  "4031"
-#define CONTEXT_GROUP_VERSION "20200704"
+#define CONTEXT_GROUP_VERSION "20210120"
 #define CONTEXT_GROUP_UID     "1.2.840.10008.6.1.308"
 #define CONTEXT_GROUP_TYPE    OFTrue  /* extensible */
 
@@ -156,6 +156,7 @@ CID4031_CommonAnatomicRegions::CodeList &CID4031_CommonAnatomicRegions::getCodes
         Codes->insert(OFMake_pair(Anus, DSRBasicCodedEntry("53505006", "SCT", "Anus")));
         Codes->insert(OFMake_pair(ApexOfLung, DSRBasicCodedEntry("86598002", "SCT", "Apex of Lung")));
         Codes->insert(OFMake_pair(BileDuct, DSRBasicCodedEntry("28273000", "SCT", "Bile duct")));
+        Codes->insert(OFMake_pair(BiliaryTract, DSRBasicCodedEntry("34707002", "SCT", "Biliary tract")));
         Codes->insert(OFMake_pair(Bladder, DSRBasicCodedEntry("89837001", "SCT", "Bladder")));
         Codes->insert(OFMake_pair(BoneOfLowerLimb, DSRBasicCodedEntry("72001000", "SCT", "Bone of lower limb")));
         Codes->insert(OFMake_pair(BoneOfUpperLimb, DSRBasicCodedEntry("371195002", "SCT", "Bone of upper limb")));
index ddd1d1d1fcee9df7e3cdc63f0d35521a3326de52..84b51cb6a6bc56ac742649341a0f6966c66352cb 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID42_NumericValueQualifier
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:12:47 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:09 by J. Riesmeier
  *
  */
 
@@ -156,9 +156,9 @@ CID42_NumericValueQualifier::CodeList &CID42_NumericValueQualifier::getCodes()
         Codes->insert(OFMake_pair(Underflow, DSRBasicCodedEntry("114004", "DCM", "Underflow")));
         Codes->insert(OFMake_pair(Overflow, DSRBasicCodedEntry("114005", "DCM", "Overflow")));
         Codes->insert(OFMake_pair(MeasurementFailure, DSRBasicCodedEntry("114006", "DCM", "Measurement failure")));
-        Codes->insert(OFMake_pair(MeasurementNotAttempted, DSRBasicCodedEntry("114007", "DCM", "Measurement not attempted")));
         Codes->insert(OFMake_pair(CalculationFailure, DSRBasicCodedEntry("114008", "DCM", "Calculation failure")));
         Codes->insert(OFMake_pair(ValueOutOfRange, DSRBasicCodedEntry("114009", "DCM", "Value out of range")));
+        Codes->insert(OFMake_pair(MeasurementNotAttempted, DSRBasicCodedEntry("114007", "DCM", "Measurement not attempted")));
         Codes->insert(OFMake_pair(ValueUnknown, DSRBasicCodedEntry("114010", "DCM", "Value unknown")));
         Codes->insert(OFMake_pair(ValueIndeterminate, DSRBasicCodedEntry("114011", "DCM", "Value indeterminate")));
     }
index a44da5bbe459cf7720c272d9720348979c7b69a7..c90b33cd967ae2ff36b3692000cf86e82a7e6d71 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID6147_ResponseCriteria
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:01 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:14 by J. Riesmeier
  *
  */
 
index 73dba877ace846e4c0ba24056e965fed441800e1..29840ae03b4066f180f9a4a597d43b78691f4218 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID7021_MeasurementReportDocumentTitles
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:03 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:15 by J. Riesmeier
  *
  */
 
index bdd2db76327699ee5335a3761e9c42fde7919f00..ac1d1bbbce704588cd9b5b3760d350d84d281966 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID7181_AbstractMultiDimensionalImageModelComponentUnits
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:05 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:16 by J. Riesmeier
  *
  */
 
index c1417c894e1d0e699ebee9d0bf6d21ffdc9e8cb3..a9ee4d01737dececb097d3ae6da2c44b03f29762 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID7445_DeviceParticipatingRoles
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:06 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:16 by J. Riesmeier
  *
  */
 
index c725c23934d3c3e0e4c4b99b6dfbc2c6650d619e..952721ebb903885067c5cbd8696318fc9c2d4e2e 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID7452_OrganizationalRoles
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:08 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:17 by J. Riesmeier
  *
  */
 
index a48f95c31dcbcd10f6af5451f1a9986e80e4bd02..c3c9e659f73e96d1ae014c37b22cc9630c6e772a 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID7453_PerformingRoles
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:10 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:18 by J. Riesmeier
  *
  */
 
index af3124fcaab9cfe0b3f29e5eefc55bcda66a8c7b..1348f90c36df0d9bd17ad2fc1fb61d35333dd37e 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID7464_GeneralRegionOfInterestMeasurementModifiers
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:12 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:19 by J. Riesmeier
  *
  */
 
index 5ccdd3ba17858393494664b17b3447f6b7aa51ad..14fc4682506c241acaeb42c67aa38ed7b0d0b7d3 100644 (file)
@@ -1,12 +1,12 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2022, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class CID7469_GenericIntensityAndSizeMeasurements
  *
- *  Generated automatically from DICOM PS 3.16-2020e
- *  File created on 2020-11-25 11:13:14 by J. Riesmeier
+ *  Generated automatically from DICOM PS 3.16-2022b
+ *  File created on 2022-04-12 13:01:20 by J. Riesmeier
  *
  */
 
index c85b13a5c8b324220b3204eaa2c23b58a20e0d60..b070f2b5ae7627917854b54d0f653e85cce3bfeb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016-2019, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2016-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class TID1411_VolumetricROIMeasurements
@@ -83,8 +83,7 @@ OFBool TID1411_VolumetricROIMeasurements<T1, T2, T3, T4>::isValid() const
 {
     /* check whether base class is valid and all required content items are present */
     return DSRSubTemplate::isValid() &&
-        hasMeasurementGroup() && hasTrackingIdentifier() && hasTrackingUniqueIdentifier() &&
-        hasReferencedSegment() && hasSourceSeriesForSegmentation() && hasMeasurements(OFTrue /*checkChildren*/);
+        hasMeasurementGroup() && hasReferencedSegment() && hasSourceSeriesForSegmentation();
 }
 
 
@@ -147,7 +146,7 @@ OFBool TID1411_VolumetricROIMeasurements<T1, T2, T3, T4>::hasMeasurements(const
     if (checkChildren)
     {
         DSRDocumentTreeNodeCursor cursor(getRoot());
-        /* go to content item at TID 1411 (Volumetric ROI Measurements) Row 13 */
+        /* go to content item at TID 1411 (Volumetric ROI Measurements) Row 15 */
         if (gotoEntryFromNodeList(cursor, LAST_MEASUREMENT) > 0)
         {
             /* check whether any of the "included TID 1419 templates" is non-empty */
index c3e7bc7628854abbccb3b1b5fa09b2d9c90981eb..f6320e26de9843a0dd728f5c8b92fbdb3bfed29d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2017, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class TID1500_MeasurementReport
 #define MEASUREMENT_REPORT               0
 #define OBSERVATION_CONTEXT              1
 #define LAST_PROCEDURE_REPORTED          2
-#define IMAGING_MEASUREMENTS             3
-#define LAST_VOLUMETRIC_ROI_MEASUREMENTS 4
-#define LAST_MEASUREMENT_GROUP           5
-#define QUALITATIVE_EVALUATIONS          6
-#define NUMBER_OF_LIST_ENTRIES           7
+#define IMAGE_LIBRARY                    3
+#define IMAGING_MEASUREMENTS             4
+#define LAST_VOLUMETRIC_ROI_MEASUREMENTS 5
+#define LAST_MEASUREMENT_GROUP           6
+#define QUALITATIVE_EVALUATIONS          7
+#define NUMBER_OF_LIST_ENTRIES           8
 
 // general information on TID 1500 (Measurement Report)
 #define TEMPLATE_NUMBER      "1500"
@@ -51,9 +52,9 @@ TID1500_MeasurementReport::TID1500_MeasurementReport(const CID7021_MeasurementRe
   : DSRRootTemplate(DT_EnhancedSR, TEMPLATE_NUMBER, MAPPING_RESOURCE, MAPPING_RESOURCE_UID),
     Language(new TID1204_LanguageOfContentItemAndDescendants()),
     ObservationContext(new TID1001_ObservationContext()),
-    ImageLibrary(new TID1600_ImageLibrary()),
-    VolumetricROIMeasurements(new TID1411_Measurements()),
-    MeasurementGroup(new TID1501_Measurements())
+    ImageLibrary(new TID1600_ImageLibrary(OFFalse /*createLibrary*/)),
+    VolumetricROIMeasurements(new TID1411_Measurements(OFFalse /*createGroup*/)),
+    MeasurementGroup(new TID1501_Measurements(OFFalse /*createGroup*/))
 {
     setExtensible(TEMPLATE_TYPE);
     setOrderSignificant(TEMPLATE_ORDER);
@@ -80,8 +81,10 @@ OFBool TID1500_MeasurementReport::isValid() const
 {
     /* check whether base class is valid and all required content items are present */
     return DSRRootTemplate::isValid() &&
-        Language->isValid() && ObservationContext->isValid() && ImageLibrary->isValid() &&
-        hasProcedureReported() && (hasImagingMeasurements() || hasQualitativeEvaluations()) &&
+        ObservationContext->isValid() &&
+        (hasImagingMeasurements() || hasQualitativeEvaluations()) &&
+        (Language->isEmpty() || Language->isValid()) &&
+        (ImageLibrary->isEmpty() || ImageLibrary->isValid()) &&
         (VolumetricROIMeasurements->isEmpty() || VolumetricROIMeasurements->isValid()) &&
         (MeasurementGroup->isEmpty() || MeasurementGroup->isValid());
 }
@@ -94,6 +97,32 @@ OFBool TID1500_MeasurementReport::hasProcedureReported() const
 }
 
 
+OFBool TID1500_MeasurementReport::hasImageLibrary(const OFBool checkChildren) const
+{
+    OFBool result = OFFalse;
+    /* need to check for child nodes? */
+    if (checkChildren)
+    {
+        DSRDocumentTreeNodeCursor cursor(getRoot());
+        /* go to content item at TID 1500 (Measurement Report) Row 5 */
+        if (gotoEntryFromNodeList(cursor, IMAGE_LIBRARY) > 0)
+        {
+            /* check whether "included TID 1600 template" is non-empty */
+            if (cursor.isValid() && (cursor.getNode()->getValueType() == VT_includedTemplate))
+            {
+                const DSRSubTemplate *subTempl = OFstatic_cast(const DSRIncludedTemplateTreeNode *, cursor.getNode())->getValue().get();
+                if (subTempl != NULL)
+                    result = !subTempl->isEmpty() && subTempl->compareTemplateIdentication("1600", "DCMR");
+            }
+        }
+    } else {
+        /* check for content item at TID 1500 (Measurement Report) Row 5 */
+        result = (getEntryFromNodeList(IMAGE_LIBRARY) > 0);
+    }
+    return result;
+}
+
+
 OFBool TID1500_MeasurementReport::hasImagingMeasurements(const OFBool checkChildren) const
 {
     OFBool result = OFFalse;
@@ -249,7 +278,7 @@ OFCondition TID1500_MeasurementReport::createNewMeasurementReport(const CID7021_
                                                                   const OFBool check)
 {
     clear();
-    /* TID 1500 (Measurement Report) Row 1 */
+    /* TID 1500 (Measurement Report) Row 1 ff. */
     return createMeasurementReport(title, check);
 }
 
@@ -296,7 +325,7 @@ OFCondition TID1500_MeasurementReport::addVolumetricROIMeasurements(const OFBool
         if (!checkEmpty || !VolumetricROIMeasurements->isEmpty())
         {
             /* create new instance of TID 1411 (Volumetric ROI Measurements) */
-            TID1411_Measurements *subTempl = new TID1411_Measurements();
+            TID1411_Measurements *subTempl = new TID1411_Measurements(OFFalse /*createGroup*/);
             if (subTempl != NULL)
             {
                 /* store (shared) reference to new instance */
@@ -325,7 +354,7 @@ OFCondition TID1500_MeasurementReport::addIndividualMeasurements(const OFBool ch
         if (!checkEmpty || !MeasurementGroup->isEmpty())
         {
             /* create new instance of TID 1501 (Measurement Group) */
-            TID1501_Measurements *subTempl = new TID1501_Measurements();
+            TID1501_Measurements *subTempl = new TID1501_Measurements(OFFalse /*createGroup*/);
             if (subTempl != NULL)
             {
                 /* store (shared) reference to new instance */
@@ -419,6 +448,7 @@ OFCondition TID1500_MeasurementReport::createMeasurementReport(const CID7021_Mea
             /* TID 1500 (Measurement Report) Row 5 */
             CHECK_RESULT(includeTemplate(ImageLibrary, AM_afterCurrent, RT_contains));
             CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1500 - Row 5"));
+            GOOD_RESULT(storeEntryInNodeList(IMAGE_LIBRARY, getNodeID()));
             /* TID 1500 (Measurement Report) Row 6 */
             CHECK_RESULT(addContentItem(RT_contains, VT_Container, CODE_DCM_ImagingMeasurements));
             CHECK_RESULT(getCurrentContentItem().setAnnotationText("TID 1500 - Row 6"));
index e419ca6e4811654754dc56881ebe805db225ff4f..410e6af68e2971a828a69b34a3532d92b6b812c5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017-2019, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2017-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class TID1501_MeasurementGroup
@@ -80,8 +80,7 @@ OFBool TID1501_MeasurementGroup<T1, T2, T3, T4>::isValid() const
 {
     /* check whether base class is valid and all required content items are present */
     return DSRSubTemplate::isValid() &&
-        hasMeasurementGroup() && hasTrackingIdentifier() && hasTrackingUniqueIdentifier() &&
-        hasMeasurements(OFTrue /*checkChildren*/);
+        hasMeasurementGroup() && hasMeasurements(OFTrue /*checkChildren*/);
 }
 
 
index 8436a7c947e3dbebc1323edd3300a563145a6d3c..e04107491b377849676d44eb184905916c81da55 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  Source file for class TID1600_ImageLibrary
@@ -96,7 +96,7 @@ OFBool TID1600_ImageLibrary::hasImageLibraryGroup() const
 OFCondition TID1600_ImageLibrary::createNewImageLibrary()
 {
     clear();
-    /* TID 1600 (Image Library) Row 1 */
+    /* TID 1600 (Image Library) Row 1 ff. */
     return createImageLibrary();
 }
 
index 2139fe3a04d7e284683588b449d496ca2edcc539..be7825d4ef108bfc012efd469947079e5cc7b898 100644 (file)
@@ -1,5 +1,81 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmsr dsrcitem dsrcodtn dsrcodvl dsrcomtn dsrcomvl dsrcontn dsrcsidl dsrdattn dsrdncsr dsrdnflt dsrdoc dsrdocst dsrdoctn dsrdoctr dsrdtitn dsrimgfr dsrimgse dsrimgtn dsrimgvl dsritcsr dsrnumtn dsrnumvl dsrpnmtn dsrposcn dsrrefin dsrreftn dsrscogr dsrsc3gr dsrscotn dsrsc3tn dsrscovl dsrsc3vl dsrsoprf dsrstrvl dsrtcodt dsrtcosp dsrtcotn dsrtcoto dsrtcovl dsrtextn dsrtimtn dsrtpltn dsrtree dsrtypes dsruidtn dsrwavch dsrwavtn dsrwavvl dsrxmlc dsrxmld dsriodcc dsrbascc dsrenhcc dsrcomcc dsrkeycc dsrmamcc dsrchecc dsrcolcc dsrprocc dsrxrdcc dsrspecc dsrmaccc dsrimpcc dsrc3dcc dsrrrdcc dsracqcc dsrsaecc dsrprdcc dsrpficc dsrplicc dsrrsdcc dsrctpl dsrrtpl dsrstpl dsrctxgr)
+DCMTK_ADD_LIBRARY(dcmsr
+  dsracqcc.cc
+  dsrbascc.cc
+  dsrc3dcc.cc
+  dsrchecc.cc
+  dsrcitem.cc
+  dsrcodtn.cc
+  dsrcodvl.cc
+  dsrcolcc.cc
+  dsrcomcc.cc
+  dsrcomtn.cc
+  dsrcomvl.cc
+  dsrcontn.cc
+  dsrcsidl.cc
+  dsrctpl.cc
+  dsrctxgr.cc
+  dsrdattn.cc
+  dsrdncsr.cc
+  dsrdnflt.cc
+  dsrdoc.cc
+  dsrdocst.cc
+  dsrdoctn.cc
+  dsrdoctr.cc
+  dsrdtitn.cc
+  dsrenhcc.cc
+  dsrimgfr.cc
+  dsrimgse.cc
+  dsrimgtn.cc
+  dsrimgvl.cc
+  dsrimpcc.cc
+  dsriodcc.cc
+  dsritcsr.cc
+  dsrkeycc.cc
+  dsrmaccc.cc
+  dsrmamcc.cc
+  dsrnumtn.cc
+  dsrnumvl.cc
+  dsrpficc.cc
+  dsrplicc.cc
+  dsrpnmtn.cc
+  dsrposcn.cc
+  dsrprdcc.cc
+  dsrprocc.cc
+  dsrrefin.cc
+  dsrreftn.cc
+  dsrrrdcc.cc
+  dsrrsdcc.cc
+  dsrrtpl.cc
+  dsrsaecc.cc
+  dsrsc3gr.cc
+  dsrsc3tn.cc
+  dsrsc3vl.cc
+  dsrscogr.cc
+  dsrscotn.cc
+  dsrscovl.cc
+  dsrsoprf.cc
+  dsrspecc.cc
+  dsrstpl.cc
+  dsrstrvl.cc
+  dsrtcodt.cc
+  dsrtcosp.cc
+  dsrtcotn.cc
+  dsrtcoto.cc
+  dsrtcovl.cc
+  dsrtextn.cc
+  dsrtimtn.cc
+  dsrtpltn.cc
+  dsrtree.cc
+  dsrtypes.cc
+  dsruidtn.cc
+  dsrwavch.cc
+  dsrwavtn.cc
+  dsrwavvl.cc
+  dsrxmlc.cc
+  dsrxmld.cc
+  dsrxrdcc.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmsr ofstd oflog dcmdata dcmimgle dcmimage)
 DCMTK_TARGET_LINK_LIBRARIES(dcmsr ${LIBXML_LIBS})
index a97cade6d32a2f481acd2169928c7efca7c87eb1..53da7901fb24b44b2d7be049024ca375c61ad06a 100644 (file)
@@ -4,12 +4,12 @@ dsracqcc.o: dsracqcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -62,12 +62,12 @@ dsrbascc.o: dsrbascc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -120,12 +120,12 @@ dsrc3dcc.o: dsrc3dcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -178,12 +178,12 @@ dsrchecc.o: dsrchecc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -236,12 +236,12 @@ dsrcitem.o: dsrcitem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -319,12 +319,12 @@ dsrcodtn.o: dsrcodtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -384,12 +384,12 @@ dsrcodvl.o: dsrcodvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -458,12 +458,12 @@ dsrcolcc.o: dsrcolcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -516,12 +516,12 @@ dsrcomcc.o: dsrcomcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -573,12 +573,12 @@ dsrcomtn.o: dsrcomtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -640,12 +640,12 @@ dsrcomvl.o: dsrcomvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -703,12 +703,12 @@ dsrcontn.o: dsrcontn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -769,12 +769,12 @@ dsrcsidl.o: dsrcsidl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -837,12 +837,12 @@ dsrctpl.o: dsrctpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -921,12 +921,12 @@ dsrctxgr.o: dsrctxgr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -979,12 +979,12 @@ dsrdattn.o: dsrdattn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1048,13 +1048,13 @@ dsrdncsr.o: dsrdncsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrtypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1114,13 +1114,13 @@ dsrdnflt.o: dsrdnflt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1184,12 +1184,12 @@ dsrdoc.o: dsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1263,6 +1263,7 @@ dsrdoc.o: dsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
@@ -1283,12 +1284,12 @@ dsrdocst.o: dsrdocst.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1368,12 +1369,12 @@ dsrdoctn.o: dsrdoctn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1446,12 +1447,12 @@ dsrdoctr.o: dsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1529,12 +1530,12 @@ dsrdtitn.o: dsrdtitn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1601,12 +1602,12 @@ dsrenhcc.o: dsrenhcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1659,12 +1660,12 @@ dsrimgfr.o: dsrimgfr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1721,12 +1722,12 @@ dsrimgse.o: dsrimgse.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1781,12 +1782,12 @@ dsrimgtn.o: dsrimgtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1850,12 +1851,12 @@ dsrimgvl.o: dsrimgvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1936,12 +1937,12 @@ dsrimpcc.o: dsrimpcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -1994,12 +1995,12 @@ dsriodcc.o: dsriodcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2051,13 +2052,13 @@ dsritcsr.o: dsritcsr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmsr/dsrtncsr.h ../include/dcmtk/dcmsr/dsrtypes.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2133,12 +2134,12 @@ dsrkeycc.o: dsrkeycc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2191,12 +2192,12 @@ dsrmaccc.o: dsrmaccc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2249,12 +2250,12 @@ dsrmamcc.o: dsrmamcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2306,12 +2307,12 @@ dsrnumtn.o: dsrnumtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2374,12 +2375,12 @@ dsrnumvl.o: dsrnumvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2441,12 +2442,12 @@ dsrpficc.o: dsrpficc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2499,12 +2500,12 @@ dsrplicc.o: dsrplicc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2556,12 +2557,12 @@ dsrpnmtn.o: dsrpnmtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2625,9 +2626,9 @@ dsrposcn.o: dsrposcn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -2684,12 +2685,12 @@ dsrprdcc.o: dsrprdcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2742,12 +2743,12 @@ dsrprocc.o: dsrprocc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2800,12 +2801,12 @@ dsrrefin.o: dsrrefin.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2864,12 +2865,12 @@ dsrreftn.o: dsrreftn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2931,12 +2932,70 @@ dsrrrdcc.o: dsrrrdcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
+ ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
+ ../../ofstd/include/dcmtk/ofstd/ofthread.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcxfer.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
+ ../../oflog/include/dcmtk/oflog/oflog.h \
+ ../../oflog/include/dcmtk/oflog/logger.h \
+ ../../oflog/include/dcmtk/oflog/config.h \
+ ../../oflog/include/dcmtk/oflog/config/defines.h \
+ ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
+ ../../oflog/include/dcmtk/oflog/loglevel.h \
+ ../../ofstd/include/dcmtk/ofstd/ofvector.h \
+ ../../oflog/include/dcmtk/oflog/tstring.h \
+ ../../oflog/include/dcmtk/oflog/tchar.h \
+ ../../oflog/include/dcmtk/oflog/spi/apndatch.h \
+ ../../oflog/include/dcmtk/oflog/appender.h \
+ ../../ofstd/include/dcmtk/ofstd/ofmem.h \
+ ../../ofstd/include/dcmtk/ofstd/ofutil.h \
+ ../../ofstd/include/dcmtk/ofstd/oftraits.h \
+ ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../../oflog/include/dcmtk/oflog/layout.h \
+ ../../oflog/include/dcmtk/oflog/streams.h \
+ ../../oflog/include/dcmtk/oflog/helpers/pointer.h \
+ ../../oflog/include/dcmtk/oflog/thread/syncprim.h \
+ ../../oflog/include/dcmtk/oflog/spi/filter.h \
+ ../../oflog/include/dcmtk/oflog/helpers/lockfile.h \
+ ../../oflog/include/dcmtk/oflog/spi/logfact.h \
+ ../../oflog/include/dcmtk/oflog/logmacro.h \
+ ../../oflog/include/dcmtk/oflog/helpers/snprintf.h \
+ ../../oflog/include/dcmtk/oflog/tracelog.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvr.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctag.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dctagkey.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcitem.h \
+ ../../ofstd/include/dcmtk/ofstd/offile.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstd.h \
+ ../../ofstd/include/dcmtk/ofstd/oflist.h \
+ ../../ofstd/include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../../ofstd/include/dcmtk/ofstd/oferror.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcsequen.h
+dsrrsdcc.o: dsrrsdcc.cc ../../config/include/dcmtk/config/osconfig.h \
+ ../include/dcmtk/dcmsr/dsrrsdcc.h ../include/dcmtk/dcmsr/dsriodcc.h \
+ ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcast.h \
+ ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -2990,12 +3049,12 @@ dsrrtpl.o: dsrrtpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3072,12 +3131,12 @@ dsrsaecc.o: dsrsaecc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3130,12 +3189,12 @@ dsrsc3gr.o: dsrsc3gr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3190,12 +3249,12 @@ dsrsc3tn.o: dsrsc3tn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3257,12 +3316,12 @@ dsrsc3vl.o: dsrsc3vl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3320,12 +3379,12 @@ dsrscogr.o: dsrscogr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3380,12 +3439,12 @@ dsrscotn.o: dsrscotn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3447,12 +3506,12 @@ dsrscovl.o: dsrscovl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3510,12 +3569,12 @@ dsrsoprf.o: dsrsoprf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3579,12 +3638,12 @@ dsrspecc.o: dsrspecc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3638,12 +3697,12 @@ dsrstpl.o: dsrstpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3718,12 +3777,12 @@ dsrstrvl.o: dsrstrvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3777,12 +3836,12 @@ dsrtcodt.o: dsrtcodt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3842,12 +3901,12 @@ dsrtcosp.o: dsrtcosp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3902,12 +3961,12 @@ dsrtcotn.o: dsrtcotn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -3970,12 +4029,12 @@ dsrtcoto.o: dsrtcoto.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4032,12 +4091,12 @@ dsrtcovl.o: dsrtcovl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4093,12 +4152,12 @@ dsrtextn.o: dsrtextn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4162,12 +4221,12 @@ dsrtimtn.o: dsrtimtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4231,12 +4290,12 @@ dsrtpltn.o: dsrtpltn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4315,12 +4374,12 @@ dsrtree.o: dsrtree.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4375,12 +4434,12 @@ dsrtypes.o: dsrtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4462,6 +4521,7 @@ dsrtypes.o: dsrtypes.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrrrdcc.h ../include/dcmtk/dcmsr/dsracqcc.h \
  ../include/dcmtk/dcmsr/dsrsaecc.h ../include/dcmtk/dcmsr/dsrprdcc.h \
  ../include/dcmtk/dcmsr/dsrpficc.h ../include/dcmtk/dcmsr/dsrplicc.h \
+ ../include/dcmtk/dcmsr/dsrrsdcc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcuid.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
@@ -4477,12 +4537,12 @@ dsruidtn.o: dsruidtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4546,12 +4606,12 @@ dsrwavch.o: dsrwavch.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4607,12 +4667,12 @@ dsrwavtn.o: dsrwavtn.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4675,12 +4735,12 @@ dsrwavvl.o: dsrwavvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4736,8 +4796,8 @@ dsrxmlc.o: dsrxmlc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h
 dsrxmld.o: dsrxmld.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmsr/dsrxmld.h ../include/dcmtk/dcmsr/dsrtypes.h \
@@ -4745,12 +4805,12 @@ dsrxmld.o: dsrxmld.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
@@ -4804,12 +4864,12 @@ dsrxrdcc.o: dsrxrdcc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcobject.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
index 09fa9014450028c238932450f52ad3f732dfd242..3ec5f58e9a93b35ab8a5b454696f87b6af72aad8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2019, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -84,9 +84,9 @@ OFBool DSRAcquisitionContextSRConstraintChecker::checkContentRelationship(const
         /* row 2 of the table */
         else if ((relationshipType == RT_hasObsContext) && ((sourceValueType == VT_Container)))
         {
-            result = (targetValueType == VT_Code) || (targetValueType == VT_Date)  || (targetValueType == VT_DateTime) ||
-                     (targetValueType == VT_Num)  || (targetValueType == VT_PName) || (targetValueType == VT_Text)     ||
-                     (targetValueType == VT_Time) || (targetValueType == VT_UIDRef);
+            result = (targetValueType == VT_Code) || (targetValueType == VT_Date)   || (targetValueType == VT_DateTime) ||
+                     (targetValueType == VT_Num)  || (targetValueType == VT_PName)  || (targetValueType == VT_Text)     ||
+                     (targetValueType == VT_Time) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Container) /* see CP-2084 */;
         }
         /* row 3 of the table */
         else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Code))
index cc2db99c70cf2d9fcc52b82462dc2e212d437113..b95df1e0bff579521b5feaddd951bbb2952d6964 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2016, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -85,9 +85,9 @@ OFBool DSRBasicTextSRConstraintChecker::checkContentRelationship(const E_ValueTy
         /* row 2 of the table */
         else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Text)  || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) ||
-                     (targetValueType == VT_Date)  || (targetValueType == VT_Time) || (targetValueType == VT_UIDRef)   ||
-                     (targetValueType == VT_PName) || (targetValueType == VT_Composite);
+            result = (targetValueType == VT_Text)  || (targetValueType == VT_Code)      || (targetValueType == VT_DateTime) ||
+                     (targetValueType == VT_Date)  || (targetValueType == VT_Time)      || (targetValueType == VT_UIDRef)   ||
+                     (targetValueType == VT_PName) || (targetValueType == VT_Composite) || (targetValueType == VT_Container) /* see CP-2084 */;
         }
         /* row 3 of the table */
         else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) ||
@@ -110,7 +110,7 @@ OFBool DSRBasicTextSRConstraintChecker::checkContentRelationship(const E_ValueTy
                      (targetValueType == VT_PName) || (targetValueType == VT_Image) || (targetValueType == VT_Waveform) ||
                      (targetValueType == VT_Composite);
         }
-        /* row 6 of the table - introduced with CP-1076 */
+        /* row 6 of the table */
         else if ((relationshipType == RT_hasProperties) && (sourceValueType == VT_PName))
         {
             result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) ||
index a48709e91e2d2495b9533a5be4bd9d216d60d077..6478f36688ff85746df33b52add7ce731b3e06e3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2013-2015, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -74,11 +74,11 @@ OFBool DSRComprehensive3DSRConstraintChecker::checkContentRelationship(const E_V
     /* row 1 of the table */
     if ((relationshipType == RT_contains) && (sourceValueType == VT_Container))
     {
-        result = (targetValueType == VT_Text)     || (targetValueType == VT_Code)      || (targetValueType == VT_Num)       ||
-                 (targetValueType == VT_DateTime) || (targetValueType == VT_Date)      || (targetValueType == VT_Time)      ||
-                 (targetValueType == VT_UIDRef)   || (targetValueType == VT_PName)     || (targetValueType == VT_SCoord)    ||
-                 (targetValueType == VT_SCoord3D) || (targetValueType == VT_TCoord)    || (targetValueType == VT_Composite) ||
-                 (targetValueType == VT_Image)    || (targetValueType == VT_Waveform)  ||
+        result = (targetValueType == VT_Text)     || (targetValueType == VT_Code)     || (targetValueType == VT_Num)       ||
+                 (targetValueType == VT_DateTime) || (targetValueType == VT_Date)     || (targetValueType == VT_Time)      ||
+                 (targetValueType == VT_UIDRef)   || (targetValueType == VT_PName)    || (targetValueType == VT_SCoord)    ||
+                 (targetValueType == VT_SCoord3D) || (targetValueType == VT_TCoord)   || (targetValueType == VT_Composite) ||
+                 (targetValueType == VT_Image)    || (targetValueType == VT_Waveform) ||
                  ((targetValueType == VT_Container) && !byReference /* only by-value */);
     }
     /* row 2 of the table */
@@ -89,6 +89,11 @@ OFBool DSRComprehensive3DSRConstraintChecker::checkContentRelationship(const E_V
                  (targetValueType == VT_DateTime) || (targetValueType == VT_Date)  || (targetValueType == VT_Time) ||
                  (targetValueType == VT_UIDRef)   || (targetValueType == VT_PName) || (targetValueType == VT_Composite);
     }
+    /* new row introduced with CP-2084 */
+    else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
+    {
+        result = (targetValueType == VT_Container);
+    }
     /* row 3 of the table */
     else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) || (sourceValueType == VT_Image) ||
         (sourceValueType == VT_Waveform) || (sourceValueType == VT_Composite) || (sourceValueType == VT_Num)))
index 5a095cb3647eb547c4985a609987ce5e88ed7e6e..54032bda53356dda881a574f8af6675f614e3546 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2015, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -81,10 +81,15 @@ OFBool DSRChestCadSRConstraintChecker::checkContentRelationship(const E_ValueTyp
     else if ((relationshipType == RT_hasObsContext) && !byReference && ((sourceValueType == VT_Container) ||
         (sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num)))
     {
-        result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
-                 (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_PName) ||
+        result = (targetValueType == VT_Text)   || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
+                 (targetValueType == VT_Date)   || (targetValueType == VT_Time) || (targetValueType == VT_PName) ||
                  (targetValueType == VT_UIDRef) || (targetValueType == VT_Composite);
     }
+    /* new row introduced with CP-2084 */
+    else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
+    {
+        result = (targetValueType == VT_Container);
+    }
     /* row 3 of the table */
     else if ((relationshipType == RT_hasAcqContext) && !byReference &&
         ((sourceValueType == VT_Image) || (sourceValueType == VT_Waveform)))
@@ -103,17 +108,17 @@ OFBool DSRChestCadSRConstraintChecker::checkContentRelationship(const E_ValueTyp
         ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num)))
     {
         /* by-reference allowed */
-        result = (targetValueType == VT_Container) || (targetValueType == VT_Text) || (targetValueType == VT_Code) ||
-                 (targetValueType == VT_Num) || (targetValueType == VT_Date) || (targetValueType == VT_Image) ||
-                 (targetValueType == VT_Waveform) || (targetValueType == VT_SCoord) || (targetValueType == VT_TCoord) ||
+        result = (targetValueType == VT_Container) || (targetValueType == VT_Text)   || (targetValueType == VT_Code) ||
+                 (targetValueType == VT_Num)       || (targetValueType == VT_Date)   || (targetValueType == VT_Image) ||
+                 (targetValueType == VT_Waveform)  || (targetValueType == VT_SCoord) || (targetValueType == VT_TCoord) ||
                  (targetValueType == VT_UIDRef);
     }
     /* row 6 of the table */
     else if ((relationshipType == RT_inferredFrom) && ((sourceValueType == VT_Code) || (sourceValueType == VT_Num)))
     {
         /* by-reference allowed */
-        result = (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_Image) ||
-                 (targetValueType == VT_Waveform) || (targetValueType == VT_SCoord) || (targetValueType == VT_TCoord) ||
+        result = (targetValueType == VT_Code)      || (targetValueType == VT_Num)    || (targetValueType == VT_Image) ||
+                 (targetValueType == VT_Waveform)  || (targetValueType == VT_SCoord) || (targetValueType == VT_TCoord) ||
                  (targetValueType == VT_Container) || (targetValueType == VT_Text);
     }
     /* row 7 of the table */
index c45fbe67f3c5f982ad8aa3c7a09409e8a0383ccd..aac1fa3e77558a75680c17cff1395fdcc742cac3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2010-2015, OFFIS e.V.
+ *  Copyright (C) 2010-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -74,24 +74,29 @@ OFBool DSRColonCadSRConstraintChecker::checkContentRelationship(const E_ValueTyp
     /* row 1 of the table */
     if ((relationshipType == RT_contains) && !byReference && (sourceValueType == VT_Container))
     {
-        result = (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_Image) ||
-                 (targetValueType == VT_Container) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Date) ||
+        result = (targetValueType == VT_Code)      || (targetValueType == VT_Num)    || (targetValueType == VT_Image) ||
+                 (targetValueType == VT_Container) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Date)  ||
                  (targetValueType == VT_Time);
     }
     /* row 2 of the table */
     else if ((relationshipType == RT_hasObsContext) && !byReference && ((sourceValueType == VT_Container) ||
         (sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num)))
     {
-        result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
-                 (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_PName) ||
+        result = (targetValueType == VT_Text)   || (targetValueType == VT_Code) || (targetValueType == VT_Num)   ||
+                 (targetValueType == VT_Date)   || (targetValueType == VT_Time) || (targetValueType == VT_PName) ||
                  (targetValueType == VT_UIDRef) || (targetValueType == VT_Composite);
     }
+    /* new row introduced with CP-2084 */
+    else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
+    {
+        result = (targetValueType == VT_Container);
+    }
     /* row 3 of the table */
     else if ((relationshipType == RT_hasAcqContext) && (sourceValueType == VT_Image))
     {
         /* by-reference allowed */
         result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Date) ||
-                 (targetValueType == VT_Time) || (targetValueType == VT_Num) || (targetValueType == VT_Container);
+                 (targetValueType == VT_Time) || (targetValueType == VT_Num)  || (targetValueType == VT_Container);
     }
     /* row 4 of the table */
     else if ((relationshipType == RT_hasConceptMod) && !byReference && ((sourceValueType == VT_Container) ||
@@ -103,15 +108,15 @@ OFBool DSRColonCadSRConstraintChecker::checkContentRelationship(const E_ValueTyp
     else if ((relationshipType == RT_hasProperties) && !byReference &&
         ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num)))
     {
-        result = (targetValueType == VT_Container) || (targetValueType == VT_Text) || (targetValueType == VT_Code) ||
-                 (targetValueType == VT_Num) || (targetValueType == VT_Date) || (targetValueType == VT_Image) ||
-                 (targetValueType == VT_SCoord) || (targetValueType == VT_SCoord3D) || (targetValueType == VT_UIDRef);
+        result = (targetValueType == VT_Container) || (targetValueType == VT_Text)     || (targetValueType == VT_Code)  ||
+                 (targetValueType == VT_Num)       || (targetValueType == VT_Date)     || (targetValueType == VT_Image) ||
+                 (targetValueType == VT_SCoord)    || (targetValueType == VT_SCoord3D) || (targetValueType == VT_UIDRef);
     }
     /* row 6 of the table */
     else if ((relationshipType == RT_inferredFrom) && ((sourceValueType == VT_Code) || (sourceValueType == VT_Num)))
     {
         /* by-reference allowed */
-        result = (targetValueType == VT_Code) || (targetValueType == VT_Num) || (targetValueType == VT_Image) ||
+        result = (targetValueType == VT_Code)   || (targetValueType == VT_Num)      || (targetValueType == VT_Image)     ||
                  (targetValueType == VT_SCoord) || (targetValueType == VT_SCoord3D) || (targetValueType == VT_Container) ||
                  (targetValueType == VT_Text);
     }
index cd04e1d9b1e6ff8aeaf5381a158211c9a22752f3..26d20b21883bce31486c95a7634b6138352a005e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2016, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -88,6 +88,11 @@ OFBool DSRComprehensiveSRConstraintChecker::checkContentRelationship(const E_Val
                  (targetValueType == VT_DateTime) || (targetValueType == VT_Date)  || (targetValueType == VT_Time) ||
                  (targetValueType == VT_UIDRef)   || (targetValueType == VT_PName) || (targetValueType == VT_Composite);
     }
+    /* new row introduced with CP-2084 */
+    else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
+    {
+        result = (targetValueType == VT_Container);
+    }
     /* row 3 of the table */
     else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) || (sourceValueType == VT_Image) ||
         (sourceValueType == VT_Waveform) || (sourceValueType == VT_Composite) || (sourceValueType == VT_Num)))
@@ -111,7 +116,7 @@ OFBool DSRComprehensiveSRConstraintChecker::checkContentRelationship(const E_Val
                  (targetValueType == VT_Waveform) || (targetValueType == VT_Composite) || (targetValueType == VT_SCoord) ||
                  (targetValueType == VT_TCoord)   || (targetValueType == VT_Container);
     }
-    /* row 6 of the table - introduced with CP-1076 */
+    /* row 6 of the table */
     else if ((relationshipType == RT_hasProperties) && (sourceValueType == VT_PName))
     {
         result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) ||
index 3037082ecab47c796e973c05361fbef5bb987f55..dde69f318f8443f502277175c263105267ca8ba7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2017, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -413,7 +413,8 @@ OFCondition DSRCompositeReferenceValue::setSOPInstanceUID(DcmItem &dataset,
 }
 
 
-OFCondition DSRCompositeReferenceValue::checkSOPClassUID(const OFString &sopClassUID) const
+OFCondition DSRCompositeReferenceValue::checkSOPClassUID(const OFString &sopClassUID,
+                                                         const OFBool /*reportWarnings*/) const
 {
     OFCondition result = sopClassUID.empty() ? SR_EC_InvalidValue : EC_Normal;
     if (result.good())
@@ -422,7 +423,8 @@ OFCondition DSRCompositeReferenceValue::checkSOPClassUID(const OFString &sopClas
 }
 
 
-OFCondition DSRCompositeReferenceValue::checkSOPInstanceUID(const OFString &sopInstanceUID) const
+OFCondition DSRCompositeReferenceValue::checkSOPInstanceUID(const OFString &sopInstanceUID,
+                                                            const OFBool /*reportWarnings*/) const
 {
     OFCondition result = sopInstanceUID.empty() ? SR_EC_InvalidValue : EC_Normal;
     if (result.good())
@@ -431,10 +433,10 @@ OFCondition DSRCompositeReferenceValue::checkSOPInstanceUID(const OFString &sopI
 }
 
 
-OFCondition DSRCompositeReferenceValue::checkCurrentValue() const
+OFCondition DSRCompositeReferenceValue::checkCurrentValue(const OFBool reportWarnings) const
 {
-    OFCondition result = checkSOPClassUID(SOPClassUID);
+    OFCondition result = checkSOPClassUID(SOPClassUID, reportWarnings);
     if (result.good())
-        result = checkSOPInstanceUID(SOPInstanceUID);
+        result = checkSOPInstanceUID(SOPInstanceUID, reportWarnings);
     return result;
 }
index 6a70c63a1c8ffeb5b94a2db2c0f918fe3d2df32a..f6ce3376d5e3acfe662c8104bf70b1b234dc9ac1 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2020, OFFIS e.V.
+ *  Copyright (C) 2000-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -82,6 +82,8 @@ DSRDocument::DSRDocument(const E_DocumentType documentType)
     IssuerOfPatientID(DCM_IssuerOfPatientID),
     PatientBirthDate(DCM_PatientBirthDate),
     PatientSex(DCM_PatientSex),
+    PatientSize(DCM_PatientSize),
+    PatientWeight(DCM_PatientWeight),
     Manufacturer(DCM_Manufacturer),
     ManufacturerModelName(DCM_ManufacturerModelName),
     DeviceSerialNumber(DCM_DeviceSerialNumber),
@@ -154,6 +156,8 @@ void DSRDocument::clear()
     IssuerOfPatientID.clear();
     PatientBirthDate.clear();
     PatientSex.clear();
+    PatientSize.clear();
+    PatientWeight.clear();
     Manufacturer.clear();
     ManufacturerModelName.clear();
     DeviceSerialNumber.clear();
@@ -630,6 +634,9 @@ OFCondition DSRDocument::readStudyData(DcmItem &dataset,
     getAndCheckElementFromDataset(dataset, StudyID, "1", "2", "GeneralStudyModule");
     getAndCheckElementFromDataset(dataset, AccessionNumber, "1", "2", "GeneralStudyModule");
     getAndCheckElementFromDataset(dataset, StudyDescription, "1", "3", "GeneralStudyModule");
+    // --- Patient Study Module ---
+    getAndCheckElementFromDataset(dataset, PatientSize, "1", "3", "PatientStudyModule");
+    getAndCheckElementFromDataset(dataset, PatientWeight, "1", "3", "PatientStudyModule");
     /* also read data from Patient Module */
     return readPatientData(dataset, flags);
 }
@@ -687,6 +694,10 @@ OFCondition DSRDocument::write(DcmItem &dataset,
         addElementToDataset(result, dataset, new DcmDate(PatientBirthDate), "1", "2", "PatientModule");
         addElementToDataset(result, dataset, new DcmCodeString(PatientSex), "1", "2", "PatientModule");
 
+        // --- Patient Study Module ---
+        addElementToDataset(result, dataset, new DcmDecimalString(PatientSize), "1", "3", "PatientStudyModule");
+        addElementToDataset(result, dataset, new DcmDecimalString(PatientWeight), "1", "3", "PatientStudyModule");
+
         if (requiresEnhancedEquipmentModule(getDocumentType()))
         {
             // --- Enhanced General Equipment Module ---
@@ -805,8 +816,8 @@ OFCondition DSRDocument::readXML(const OFString &filename,
                 {
                     OFString sopClassUID;
                     getSOPClassUID(sopClassUID);
-                    /* create new document of specified type (also checks for support) */
-                    result = createNewDocument(sopClassUIDToDocumentType(sopClassUID));
+                    /* change document type (also checks for support) */
+                    result = changeDocumentType(sopClassUIDToDocumentType(sopClassUID));
                     if (result.good())
                     {
                         /* proceed with document header */
@@ -967,7 +978,10 @@ OFCondition DSRDocument::readXMLPatientData(const DSRXMLDocument &doc,
             }
             else if (doc.getElementFromNodeContent(cursor, PatientID, "id").bad() &&
                      doc.getElementFromNodeContent(cursor, IssuerOfPatientID, "issuer").bad() &&
-                     doc.getElementFromNodeContent(cursor, PatientSex, "sex").bad())
+                     doc.getElementFromNodeContent(cursor, PatientSex, "sex").bad() &&
+                     /* strictly speaking, Patient's Size and Weight belong to the Study IE */
+                     doc.getElementFromNodeContent(cursor, PatientSize, "size").bad() &&
+                     doc.getElementFromNodeContent(cursor, PatientWeight, "weight").bad())
             {
                 doc.printUnexpectedNodeWarning(cursor);
             }
@@ -1107,10 +1121,10 @@ OFCondition DSRDocument::readXMLInstanceData(const DSRXMLDocument &doc,
                 /* Instance Creator UID */
                 doc.getElementFromAttribute(cursor, InstanceCreatorUID, "uid", OFFalse /*encoding*/, OFFalse /*required*/);
                 /* Instance Creation Date */
-                DSRDateTreeNode::getValueFromXMLNodeContent(doc, doc.getNamedChildNode(cursor, "date"), tmpString);
+                DSRDateTreeNode::getValueFromXMLNodeContent(doc, doc.getNamedChildNode(cursor, "date", OFFalse /*required*/), tmpString);
                 InstanceCreationDate.putOFStringArray(tmpString);
                 /* Instance Creation Time */
-                DSRTimeTreeNode::getValueFromXMLNodeContent(doc, doc.getNamedChildNode(cursor, "time"), tmpString);
+                DSRTimeTreeNode::getValueFromXMLNodeContent(doc, doc.getNamedChildNode(cursor, "time", OFFalse /*required*/), tmpString);
                 InstanceCreationTime.putOFStringArray(tmpString);
             }
             else if (doc.getElementFromNodeContent(cursor, InstanceNumber, "number").bad())
@@ -1363,6 +1377,9 @@ OFCondition DSRDocument::writeXML(STD_NAMESPACE ostream &stream,
             stream << "</birthday>" << OFendl;
         }
         writeStringFromElementToXML(stream, PatientSex, "sex", (flags & XF_writeEmptyTags) > 0);
+        /* strictly speaking, Patient's Size and Weight belong to the Study IE */
+        writeStringFromElementToXML(stream, PatientSize, "size", (flags & XF_writeEmptyTags) > 0);
+        writeStringFromElementToXML(stream, PatientWeight, "weight", (flags & XF_writeEmptyTags) > 0);
         stream << "</patient>" << OFendl;
 
         stream << "<study uid=\"" << getMarkupStringFromElement(StudyInstanceUID, tmpString) << "\">" << OFendl;
@@ -2285,6 +2302,20 @@ OFCondition DSRDocument::getPatientSex(OFString &value,
 }
 
 
+OFCondition DSRDocument::getPatientSize(OFString &value,
+                                        const signed long pos) const
+{
+    return getStringValueFromElement(PatientSize, value, pos);
+}
+
+
+OFCondition DSRDocument::getPatientWeight(OFString &value,
+                                          const signed long pos) const
+{
+    return getStringValueFromElement(PatientWeight, value, pos);
+}
+
+
 OFCondition DSRDocument::getReferringPhysicianName(OFString &value,
                                                    const signed long pos) const
 {
@@ -2535,6 +2566,26 @@ OFCondition DSRDocument::setPatientSex(const OFString &value,
 }
 
 
+OFCondition DSRDocument::setPatientSize(const OFString &value,
+                                        const OFBool check)
+{
+    OFCondition result = (check) ? DcmDecimalString::checkStringValue(value, "1") : EC_Normal;
+    if (result.good())
+        result = PatientSize.putOFStringArray(value);
+    return result;
+}
+
+
+OFCondition DSRDocument::setPatientWeight(const OFString &value,
+                                          const OFBool check)
+{
+    OFCondition result = (check) ? DcmDecimalString::checkStringValue(value, "1") : EC_Normal;
+    if (result.good())
+        result = PatientWeight.putOFStringArray(value);
+    return result;
+}
+
+
 OFCondition DSRDocument::setReferringPhysicianName(const OFString &value,
                                                    const OFBool check)
 {
@@ -2777,7 +2828,10 @@ void DSRDocument::createNewStudy()
     StudyID.clear();
     AccessionNumber.clear();
     StudyDescription.clear();
-    /* also creates new study (since UID is empty) and SOP instance */
+    /* also need to clear the attributes from the Patient Study Module */
+    PatientSize.clear();
+    PatientWeight.clear();
+    /* the following method also creates new a study (since UID is empty) and SOP instance */
     createNewSeries();
 }
 
@@ -3069,8 +3123,6 @@ void DSRDocument::updateAttributes(const OFBool updateAll,
             InstanceCreationDate.putOFStringArray(currentDate(tmpString));
             /* set instance creation time to current time (HHMMSS) */
             InstanceCreationTime.putOFStringArray(currentTime(tmpString));
-            /* set instance creator UID to identify instances that have been created by this toolkit */
-            InstanceCreatorUID.putString(OFFIS_INSTANCE_CREATOR_UID);
         }
         /* create new study instance UID if required */
         if (StudyInstanceUID.isEmpty())
index ffa33eb13a5daa6c76e54d234fff095328693850..64339551a0ddfe0176c67c31753bc65b82be089b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2016, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -86,9 +86,10 @@ OFBool DSREnhancedSRConstraintChecker::checkContentRelationship(const E_ValueTyp
         /* row 2 of the table */
         else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Text)     || (targetValueType == VT_Code)  || (targetValueType == VT_Num)  ||
-                     (targetValueType == VT_DateTime) || (targetValueType == VT_Date)  || (targetValueType == VT_Time) ||
-                     (targetValueType == VT_UIDRef)   || (targetValueType == VT_PName) || (targetValueType == VT_Composite);
+            result = (targetValueType == VT_Text)     || (targetValueType == VT_Code)  || (targetValueType == VT_Num)       ||
+                     (targetValueType == VT_DateTime) || (targetValueType == VT_Date)  || (targetValueType == VT_Time)      ||
+                     (targetValueType == VT_UIDRef)   || (targetValueType == VT_PName) || (targetValueType == VT_Composite) ||
+                     (targetValueType == VT_Container) /* see CP-2084 */;
         }
         /* row 3 of the table */
         else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) || (sourceValueType == VT_Image) ||
@@ -113,7 +114,7 @@ OFBool DSREnhancedSRConstraintChecker::checkContentRelationship(const E_ValueTyp
                      (targetValueType == VT_Waveform) || (targetValueType == VT_Composite) || (targetValueType == VT_SCoord) ||
                      (targetValueType == VT_TCoord);
         }
-        /* row 6 of the table - introduced with CP-1076 */
+        /* row 6 of the table */
         else if ((relationshipType == RT_hasProperties) && (sourceValueType == VT_PName))
         {
             result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) ||
index 0622322c378a7edd8d63392ba25eccada84256cc..83e207170919d945e8533f755775d71e7155abfe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2018, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcdeftag.h"
 #include "dcmtk/dcmdata/dcvris.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CINTTYPES
-#include "dcmtk/ofstd/ofstdinc.h"
-
 
 template<>
 const Sint32& DSRgetEmptyItem<Sint32>()
index f03875859e93d61dfad06040fc1eb95f65eb187b..2a3263aef133b1795607a4aa6451f27906050eb4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2013-2017, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2013-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
 #include "dcmtk/dcmdata/dcdeftag.h"
 #include "dcmtk/dcmdata/dcvrus.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 template<>
 const Uint16& DSRgetEmptyItem<Uint16>()
 {
index 8e50acf5e062f2f33aca3abec9ee32f02ea887c7..99b7d24bed8808c9a19139abfdfc1ea4ac0820e2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2020, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -376,7 +376,7 @@ OFCondition DSRImageReferenceValue::readItem(DcmItem &dataset,
             }
         }
         /* check data and report warnings if any */
-        checkListData(SOPClassUID, FrameList, SegmentList, OFTrue /*reportWarnings*/);
+        checkCurrentValue(OFTrue /*reportWarnings*/);
     }
     return result;
 }
@@ -393,47 +393,47 @@ OFCondition DSRImageReferenceValue::writeItem(DcmItem &dataset) const
             result = FrameList.write(dataset);
         else if (!SegmentList.isEmpty())
             result = SegmentList.write(dataset);
-    }
-    /* write ReferencedSOPSequence (Presentation State, optional) */
-    if (result.good())
-    {
-        if (PresentationState.isValid())
-            result = PresentationState.writeSequence(dataset, DCM_ReferencedSOPSequence);
-    }
-    /* write ReferencedRealWorldValueMappingInstanceSequence (optional) */
-    if (result.good())
-    {
-        if (RealWorldValueMapping.isValid())
-            result = RealWorldValueMapping.writeSequence(dataset, DCM_ReferencedRealWorldValueMappingInstanceSequence);
-    }
-    /* write IconImageSequence (optional) */
-    if (result.good() && (IconImage != NULL))
-    {
-        DcmItem *ditem = NULL;
-        /* create sequence with a single item */
-        result = dataset.findOrCreateSequenceItem(DCM_IconImageSequence, ditem, 0 /*position*/);
+        /* write ReferencedSOPSequence (Presentation State, optional) */
+        if (result.good())
+        {
+            if (PresentationState.isValid())
+                result = PresentationState.writeSequence(dataset, DCM_ReferencedSOPSequence);
+        }
+        /* write ReferencedRealWorldValueMappingInstanceSequence (optional) */
         if (result.good())
         {
-            /* monochrome images can be written directly */
-            if (IconImage->isMonochrome())
+            if (RealWorldValueMapping.isValid())
+                result = RealWorldValueMapping.writeSequence(dataset, DCM_ReferencedRealWorldValueMappingInstanceSequence);
+        }
+        /* write IconImageSequence (optional) */
+        if (result.good() && (IconImage != NULL))
+        {
+            DcmItem *ditem = NULL;
+            /* create sequence with a single item */
+            result = dataset.findOrCreateSequenceItem(DCM_IconImageSequence, ditem, 0 /*position*/);
+            if (result.good())
             {
-                /* write icon image to dataset */
-                if (IconImage->writeFrameToDataset(*ditem))
+                /* monochrome images can be written directly */
+                if (IconImage->isMonochrome())
                 {
-                    /* delete unwanted element NumberOfFrames (0028,0008) */
-                    ditem->findAndDeleteElement(DCM_NumberOfFrames);
-                } else
-                    result = EC_CorruptedData;
-            } else {
-                OFString tmpString;
-                /* color images need to be converted to "PALETTE COLOR" */
-                result = DcmQuant::createPaletteColorImage(*IconImage, *ditem, OFTrue /*writeAsOW*/, OFFalse /*write16BitEntries*/,
-                    OFFalse /*floydSteinberg*/, 256 /*numberOfColors*/, tmpString /*description*/);
+                    /* write icon image to dataset */
+                    if (IconImage->writeFrameToDataset(*ditem))
+                    {
+                        /* delete unwanted element NumberOfFrames (0028,0008) */
+                        ditem->findAndDeleteElement(DCM_NumberOfFrames);
+                    } else
+                        result = EC_CorruptedData;
+                } else {
+                    OFString tmpString;
+                    /* color images need to be converted to "PALETTE COLOR" */
+                    result = DcmQuant::createPaletteColorImage(*IconImage, *ditem, OFTrue /*writeAsOW*/, OFFalse /*write16BitEntries*/,
+                        OFFalse /*floydSteinberg*/, 256 /*numberOfColors*/, tmpString /*description*/);
+                }
             }
         }
+        /* check data and report warnings if any */
+        checkCurrentValue(OFTrue /*reportWarnings*/);
     }
-    /* check data and report warnings if any */
-    checkListData(SOPClassUID, FrameList, SegmentList, OFTrue /*reportWarnings*/);
     return result;
 }
 
@@ -693,7 +693,11 @@ OFBool DSRImageReferenceValue::isSegmentationObject(const OFString &sopClassUID)
 }
 
 
-OFCondition DSRImageReferenceValue::checkSOPClassUID(const OFString &sopClassUID) const
+// helper macro to avoid annoying check of boolean flag
+#define REPORT_WARNING(msg) { if (reportWarnings) DCMSR_WARN(msg); }
+
+OFCondition DSRImageReferenceValue::checkSOPClassUID(const OFString &sopClassUID,
+                                                     const OFBool reportWarnings) const
 {
     OFCondition result = DSRCompositeReferenceValue::checkSOPClassUID(sopClassUID);
     if (result.good())
@@ -701,6 +705,7 @@ OFCondition DSRImageReferenceValue::checkSOPClassUID(const OFString &sopClassUID
         /* check for all valid/known SOP classes (according to DICOM PS 3.6) */
         if (!dcmIsImageStorageSOPClassUID(sopClassUID.c_str()) && !isSegmentationObject(sopClassUID))
         {
+            REPORT_WARNING("Invalid or unknown image SOP class referenced from IMAGE content item")
             result = SR_EC_InvalidValue;
         }
     }
@@ -708,35 +713,40 @@ OFCondition DSRImageReferenceValue::checkSOPClassUID(const OFString &sopClassUID
 }
 
 
-OFCondition DSRImageReferenceValue::checkPresentationState(const DSRCompositeReferenceValue &referenceValue) const
+OFCondition DSRImageReferenceValue::checkPresentationState(const DSRCompositeReferenceValue &referenceValue,
+                                                           const OFBool reportWarnings) const
 {
     OFCondition result = EC_Normal;
     /* the reference to a presentation state object is optional, so an empty value is also valid */
     if (!referenceValue.isEmpty())
     {
         if (DSRTypes::sopClassUIDToPresentationStateType(referenceValue.getSOPClassUID()) == DSRTypes::PT_invalid)
+        {
+            REPORT_WARNING("Invalid or unknown presentation state SOP class referenced from IMAGE content item")
             result = SR_EC_InvalidValue;
+        }
     }
     return result;
 }
 
 
-OFCondition DSRImageReferenceValue::checkRealWorldValueMapping(const DSRCompositeReferenceValue &referenceValue) const
+OFCondition DSRImageReferenceValue::checkRealWorldValueMapping(const DSRCompositeReferenceValue &referenceValue,
+                                                               const OFBool reportWarnings) const
 {
     OFCondition result = EC_Normal;
     /* the reference to a real world value mapping object is optional, so an empty value is also valid */
     if (!referenceValue.isEmpty())
     {
         if (referenceValue.getSOPClassUID() != UID_RealWorldValueMappingStorage)
+        {
+            REPORT_WARNING("Invalid or unknown real world value mapping SOP class referenced from IMAGE content item")
             result = SR_EC_InvalidValue;
+        }
     }
     return result;
 }
 
 
-// helper macro to avoid annoying check of boolean flag
-#define REPORT_WARNING(msg) { if (reportWarnings) DCMSR_WARN(msg); }
-
 OFCondition DSRImageReferenceValue::checkListData(const OFString &sopClassUID,
                                                   const DSRImageFrameList &frameList,
                                                   const DSRImageSegmentList &segmentList,
@@ -760,14 +770,14 @@ OFCondition DSRImageReferenceValue::checkListData(const OFString &sopClassUID,
 }
 
 
-OFCondition DSRImageReferenceValue::checkCurrentValue() const
+OFCondition DSRImageReferenceValue::checkCurrentValue(const OFBool reportWarnings) const
 {
-    OFCondition result = DSRCompositeReferenceValue::checkCurrentValue();
+    OFCondition result = DSRCompositeReferenceValue::checkCurrentValue(reportWarnings);
     if (result.good())
-        result = checkPresentationState(PresentationState);
+        result = checkPresentationState(PresentationState, reportWarnings);
     if (result.good())
-        result = checkRealWorldValueMapping(RealWorldValueMapping);
+        result = checkRealWorldValueMapping(RealWorldValueMapping, reportWarnings);
     if (result.good())
-        result = checkListData(SOPClassUID, FrameList, SegmentList);
+        result = checkListData(SOPClassUID, FrameList, SegmentList, reportWarnings);
     return result;
 }
index 92b944375ff279271b22157c4a33f9c659e0b0e4..b91607f0f97efd3c52d825681f55fa463518cbc6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2010-2015, OFFIS e.V.
+ *  Copyright (C) 2010-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -77,16 +77,16 @@ OFBool DSRImplantationPlanSRDocumentConstraintChecker::checkContentRelationship(
         /* row 1 of the table */
         if ((relationshipType == RT_contains) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
+            result = (targetValueType == VT_Text)   || (targetValueType == VT_Code)      || (targetValueType == VT_Num)   ||
                      (targetValueType == VT_UIDRef) || (targetValueType == VT_Composite) || (targetValueType == VT_Image) ||
                      (targetValueType == VT_Container);
         }
         /* row 2 of the table */
         else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
-                     (targetValueType == VT_Date) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) ||
-                     (targetValueType == VT_Composite);
+            result = (targetValueType == VT_Text)      || (targetValueType == VT_Code)   || (targetValueType == VT_Num)   ||
+                     (targetValueType == VT_Date)      || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) ||
+                     (targetValueType == VT_Composite) || (targetValueType == VT_Container) /* see CP-2084 */;
         }
         /* row 3 of the table */
         else if (relationshipType == RT_hasConceptMod)
@@ -95,7 +95,7 @@ OFBool DSRImplantationPlanSRDocumentConstraintChecker::checkContentRelationship(
         }
         /* row 4 of the table */
         else if ((relationshipType == RT_hasProperties) &&
-            ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num) ||
+            ((sourceValueType == VT_Text) || (sourceValueType == VT_Code)   || (sourceValueType == VT_Num) ||
             (sourceValueType == VT_Image) || (sourceValueType == VT_UIDRef) || (sourceValueType == VT_Composite)))
         {
             result = (targetValueType == VT_Composite);
index 59d5018e05eb4303ea4440ff27371eb31d7a1efc..525659a8ce746b8fe6e729a5187d947b4c2646f3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2015, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -77,14 +77,14 @@ OFBool DSRKeyObjectSelectionDocumentConstraintChecker::checkContentRelationship(
         /* row 1 of the table */
         if ((relationshipType == RT_contains) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Image) ||
-                     (targetValueType == VT_Waveform) || (targetValueType == VT_Composite);
+            result = (targetValueType == VT_Text) || (targetValueType == VT_Image) || (targetValueType == VT_Waveform) ||
+                     (targetValueType == VT_Composite);
         }
         /* row 2 of the table */
         else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) ||
-                     (targetValueType == VT_UIDRef) || (targetValueType == VT_PName);
+            result = (targetValueType == VT_Text)  || (targetValueType == VT_Code) || (targetValueType == VT_UIDRef) ||
+                     (targetValueType == VT_PName) || (targetValueType == VT_Container) /* see CP-2084 */;
         }
         /* row 3 of the table */
         else if ((relationshipType == RT_hasConceptMod) && (sourceValueType == VT_Container))
index aaca4f553ab9e4108f22936009bc739bebc00552..6fd87a4ed39491df24a096fe1fe7045a19e8e120 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2010-2015, OFFIS e.V.
+ *  Copyright (C) 2010-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -77,15 +77,15 @@ OFBool DSRMacularGridThicknessAndVolumeReportConstraintChecker::checkContentRela
         /* row 1 of the table */
         if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Code) || (targetValueType == VT_PName) ||
-                     (targetValueType == VT_Text) || (targetValueType == VT_UIDRef) ||
-                     (targetValueType == VT_Date) || (targetValueType == VT_Num);
+            result = (targetValueType == VT_Code)   || (targetValueType == VT_PName) || (targetValueType == VT_Text) ||
+                     (targetValueType == VT_UIDRef) || (targetValueType == VT_Date)  || (targetValueType == VT_Num)  ||
+                     (targetValueType == VT_Container) /* see CP-2084 */;
         }
         /* row 2 of the table */
         else if ((relationshipType == RT_contains) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Container) || (targetValueType == VT_Num) ||
-                     (targetValueType == VT_Text) || (targetValueType == VT_Code);
+            result = (targetValueType == VT_Container) || (targetValueType == VT_Num) || (targetValueType == VT_Text) ||
+                     (targetValueType == VT_Code);
         }
         /* row 3 of the table */
         else if (relationshipType == RT_hasConceptMod)
index 8cc55b1a17d0f5edce90b22321fb9026faf221dd..531adce84d073c2559497a5e9bacfa0dd471550b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2015, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -86,11 +86,16 @@ OFBool DSRMammographyCadSRConstraintChecker::checkContentRelationship(const E_Va
                  (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_PName) ||
                  (targetValueType == VT_UIDRef) || (targetValueType == VT_Composite);
     }
+    /* new row introduced with CP-2084 */
+    else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
+    {
+        result = (targetValueType == VT_Container);
+    }
     /* row 3 of the table */
     else if ((relationshipType == RT_hasAcqContext) && !byReference && (sourceValueType == VT_Image))
     {
         result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Date) ||
-                 (targetValueType == VT_Time) || (targetValueType == VT_Num);
+                 (targetValueType == VT_Time) || (targetValueType == VT_Num)  || (targetValueType == VT_UIDRef) /* see CP-2053 */;
     }
     /* row 4 of the table */
     else if ((relationshipType == RT_hasConceptMod) && !byReference &&
index 16ac030ce6ad2fb9a2206e040d122b5c323aa700..779de20c8b9e551f08d4a9c2ba312497d8cf7501 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2017, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -163,7 +163,7 @@ OFBool DSRNumericMeasurementValue::isEmpty() const
 
 OFBool DSRNumericMeasurementValue::isComplete() const
 {
-    /* officially, the NumericValueQualifierCodeSequence is optional (type 3) */
+    /* the NumericValueQualifierCodeSequence is conditional (type 1C) */
     return (!NumericValue.empty() && MeasurementUnit.isComplete()) || ValueQualifier.isComplete();
 }
 
@@ -215,7 +215,7 @@ OFCondition DSRNumericMeasurementValue::readXML(const DSRXMLDocument &doc,
             result = EC_Normal;
         if (result.good())
         {
-            /* get "qualifier" element (optional, do not report if absent or erroneous) */
+            /* get "qualifier" element (conditional, do not report if absent or erroneous) */
             ValueQualifier.readXML(doc, doc.getNamedNode(cursor, "qualifier", OFFalse /*required*/), flags);
         }
         if (!isValid())
@@ -340,8 +340,8 @@ OFCondition DSRNumericMeasurementValue::readSequence(DcmItem &dataset,
     }
     if (result.good())
     {
-        /* read NumericValueQualifierCodeSequence (optional) */
-        ValueQualifier.readSequence(dataset, DCM_NumericValueQualifierCodeSequence, "3" /*type*/, flags);
+        /* read NumericValueQualifierCodeSequence (conditional) */
+        ValueQualifier.readSequence(dataset, DCM_NumericValueQualifierCodeSequence, "1C" /*type*/, flags);
     }
     return result;
 }
@@ -379,7 +379,7 @@ OFCondition DSRNumericMeasurementValue::writeSequence(DcmItem &dataset) const
     }
     if (result.good())
     {
-        /* write NumericValueQualifierCodeSequence (optional) */
+        /* write NumericValueQualifierCodeSequence (conditional) */
         if (!ValueQualifier.isEmpty())
             ValueQualifier.writeSequence(dataset, DCM_NumericValueQualifierCodeSequence);
     }
@@ -553,6 +553,12 @@ OFCondition DSRNumericMeasurementValue::setValue(const OFString &numericValue,
             result = EC_IllegalParameter;
     }
     if (result.good())
+    {
+        /* make sure that at least one of the two values is non-empty */
+        if (numericValue.empty() && valueQualifier.isEmpty())
+            result = EC_IllegalParameter;
+    }
+    if (result.good())
     {
         NumericValue = numericValue;
         MeasurementUnit = measurementUnit;
@@ -730,20 +736,33 @@ OFCondition DSRNumericMeasurementValue::checkRationalRepresentation(const Sint32
 
 OFCondition DSRNumericMeasurementValue::checkCurrentValue() const
 {
-    OFCondition result = checkNumericValue(NumericValue);
-    if (result.good())
-        result = checkMeasurementUnit(MeasurementUnit);
-    if (result.good())
-        result = checkNumericValueQualifier(ValueQualifier);
-    if (result.good())
+    OFCondition result = EC_Normal;
+    /* numeric value is empty (i.e. unknown) */
+    if (NumericValue.empty())
     {
-        Sint32 numeratorValue;
-        Uint32 denominatorValue;
-        result = getRationalRepresentation(numeratorValue, denominatorValue);
+        /* numeric value qualifier should not be empty */
+        if (ValueQualifier.isEmpty())
+            result = SR_EC_InvalidValue;
+        else
+            result = checkNumericValueQualifier(ValueQualifier);
+        /* tbc: should additional representations be absent? */
+    } else {
+        /* numeric value is not empty */
+        result = checkNumericValue(NumericValue);
         if (result.good())
-            result = checkRationalRepresentation(numeratorValue, denominatorValue);
-        else if (result == SR_EC_RepresentationNotAvailable)
-            result = EC_Normal;
+            result = checkMeasurementUnit(MeasurementUnit);
+        if (result.good())
+            result = checkNumericValueQualifier(ValueQualifier);
+        if (result.good())
+        {
+            Sint32 numeratorValue;
+            Uint32 denominatorValue;
+            result = getRationalRepresentation(numeratorValue, denominatorValue);
+            if (result.good())
+                result = checkRationalRepresentation(numeratorValue, denominatorValue);
+            else if (result == SR_EC_RepresentationNotAvailable)
+                result = EC_Normal;
+        }
     }
     return result;
 }
index 468593918500cdb12047805c0c42acd82e98099d..342c95e10b1143aa882a8c868851e08ed7070c31 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2019-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -90,6 +90,11 @@ OFBool DSRPerformedImagingAgentAdministrationSRConstraintChecker::checkContentRe
                      (targetValueType == VT_DateTime) || (targetValueType == VT_Date) || (targetValueType == VT_UIDRef) ||
                      (targetValueType == VT_PName)    || (targetValueType == VT_Composite);
         }
+        /* new row introduced with CP-2084 */
+        else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
+        {
+            result = (targetValueType == VT_Container);
+        }
         /* row 3 of the table */
         else if ((relationshipType == RT_hasAcqContext) &&
             ((sourceValueType == VT_Container) || (sourceValueType == VT_Image) || (sourceValueType == VT_Waveform) ||
index ad1de2fc80484972283512e84faf1616e08b5246..5ee3e580d9373bfba1b9e5a8ded9c2ca53aa302b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2019-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -89,6 +89,11 @@ OFBool DSRPlannedImagingAgentAdministrationSRConstraintChecker::checkContentRela
                      (targetValueType == VT_DateTime) || (targetValueType == VT_Date) || (targetValueType == VT_UIDRef) ||
                      (targetValueType == VT_PName);
         }
+        /* new row introduced with CP-2084 */
+        else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
+        {
+            result = (targetValueType == VT_Container);
+        }
         /* row 3 of the table */
         else if ((relationshipType == RT_hasAcqContext) &&
             ((sourceValueType == VT_Container) || (sourceValueType == VT_Num)))
index e9cea18543a9063ad326697e2cf2689d0283fa4f..4a7200596a6c5efb8176c13e5f34d2c01d5b4401 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2017-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -78,31 +78,31 @@ OFBool DSRPatientRadiationDoseSRConstraintChecker::checkContentRelationship(cons
         /* row 1 of the table */
         if ((relationshipType == RT_contains) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
-                    (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) ||
-                    (targetValueType == VT_Image) || (targetValueType == VT_Composite) || (targetValueType == VT_Container);
+            result = (targetValueType == VT_Text)     || (targetValueType == VT_Code)      || (targetValueType == VT_Num)   ||
+                     (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef)    || (targetValueType == VT_PName) ||
+                     (targetValueType == VT_Image)    || (targetValueType == VT_Composite) || (targetValueType == VT_Container);
         }
         /* row 2 of the table */
         else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_DateTime) || (targetValueType == VT_Code) || (targetValueType == VT_Text) ||
-                    (targetValueType == VT_UIDRef) || (targetValueType == VT_PName);
+            result = (targetValueType == VT_DateTime) || (targetValueType == VT_Code)  || (targetValueType == VT_Text) ||
+                     (targetValueType == VT_UIDRef)   || (targetValueType == VT_PName) || (targetValueType == VT_Container) /* see CP-2084 */;
         }
         /* row 3 of the table */
         else if ((relationshipType == RT_hasObsContext) &&
             ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num) || (sourceValueType == VT_Composite)))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
-                    (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) ||
-                    (targetValueType == VT_Composite);
+            result = (targetValueType == VT_Text)     || (targetValueType == VT_Code)   || (targetValueType == VT_Num)   ||
+                     (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) ||
+                     (targetValueType == VT_Composite);
         }
         /* row 4 of the table */
         else if ((relationshipType == RT_hasAcqContext) &&
             ((sourceValueType == VT_Container) || (sourceValueType == VT_Image) || (sourceValueType == VT_Composite)))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
-                    (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) ||
-                    (targetValueType == VT_Container);
+            result = (targetValueType == VT_Text)     || (targetValueType == VT_Code)   || (targetValueType == VT_Num)   ||
+                     (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) ||
+                     (targetValueType == VT_Container);
         }
         /* row 5 of the table */
         else if (relationshipType == RT_hasConceptMod)
@@ -113,24 +113,24 @@ OFBool DSRPatientRadiationDoseSRConstraintChecker::checkContentRelationship(cons
         else if ((relationshipType == RT_hasProperties) &&
             ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num) || (sourceValueType == VT_Composite)))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
-                    (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) ||
-                    (targetValueType == VT_Image) || (targetValueType == VT_Composite) || (targetValueType == VT_Container);
+            result = (targetValueType == VT_Text)     || (targetValueType == VT_Code)      || (targetValueType == VT_Num) ||
+                     (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef)    || (targetValueType == VT_PName) ||
+                     (targetValueType == VT_Image)    || (targetValueType == VT_Composite) || (targetValueType == VT_Container);
         }
         /* row 7 of the table */
         else if ((relationshipType == RT_hasProperties) && (sourceValueType == VT_PName))
         {
             result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) ||
-                    (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_UIDRef) ||
-                    (targetValueType == VT_PName);
+                     (targetValueType == VT_Date) || (targetValueType == VT_Time) || (targetValueType == VT_UIDRef)   ||
+                     (targetValueType == VT_PName);
         }
         /* row 8 of the table */
         else if ((relationshipType == RT_inferredFrom) &&
             ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num)))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
-                    (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Image) ||
-                    (targetValueType == VT_Composite) || (targetValueType == VT_Container);
+            result = (targetValueType == VT_Text)      || (targetValueType == VT_Code)   || (targetValueType == VT_Num)   ||
+                     (targetValueType == VT_DateTime)  || (targetValueType == VT_UIDRef) || (targetValueType == VT_Image) ||
+                     (targetValueType == VT_Composite) || (targetValueType == VT_Container);
         }
     }
     return result;
index ae226349231b7e2d9ed6119df9b5191a0cf34405..bc82ef7b2a72b758d211c419924eec34fab7cf5c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2015, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -87,6 +87,11 @@ OFBool DSRProcedureLogConstraintChecker::checkContentRelationship(const E_ValueT
             result = (targetValueType == VT_Text)     || (targetValueType == VT_Code)   || (targetValueType == VT_Num)  ||
                      (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName);
         }
+        /* new row introduced with CP-2084 */
+        else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
+        {
+            result = (targetValueType == VT_Container);
+        }
         /* row 3 of the table */
         else if ((relationshipType == RT_hasAcqContext) && ((sourceValueType == VT_Container) ||
             (sourceValueType == VT_Image) || (sourceValueType == VT_Waveform) || (sourceValueType == VT_Composite)))
index be36285031817919e7ea07ec5ce23002263c785d..e6ee37a551d19b696f50b0a627926661796aa8df 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014-2019, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2014-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -88,6 +88,11 @@ OFBool DSRRadiopharmaceuticalRadiationDoseSRConstraintChecker::checkContentRelat
             result = (targetValueType == VT_Text)     || (targetValueType == VT_Code)   || (targetValueType == VT_Num) ||
                      (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName);
         }
+        /* new row introduced with CP-2084 */
+        else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
+        {
+            result = (targetValueType == VT_Container);
+        }
         /* row 3 of the table */
         else if ((relationshipType == RT_hasAcqContext) && (sourceValueType == VT_Container))
         {
index b0725620475a2a8ba7e8ed6518a2459a44f74813..53732412735e5a0efb1f8bfd30cc6bb25a31a51c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2020-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -77,14 +77,14 @@ OFBool DSRRenditionSelectionDocumentConstraintChecker::checkContentRelationship(
         /* row 1 of the table */
         if ((relationshipType == RT_contains) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Image) ||
-                     (targetValueType == VT_Waveform) || (targetValueType == VT_Composite);
+            result = (targetValueType == VT_Text) || (targetValueType == VT_Image) || (targetValueType == VT_Waveform) ||
+                     (targetValueType == VT_Composite);
         }
         /* row 2 of the table */
         else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) ||
-                     (targetValueType == VT_UIDRef) || (targetValueType == VT_PName);
+            result = (targetValueType == VT_Text)  || (targetValueType == VT_Code) || (targetValueType == VT_UIDRef) ||
+                     (targetValueType == VT_PName) || (targetValueType == VT_Container) /* see CP-2084 */;
         }
         /* row 3 of the table */
         else if ((relationshipType == RT_hasConceptMod) && (sourceValueType == VT_Container))
index fced6b493e07eaf92e3776bd26d0a124cb75aec6..7fbb153c3b82d907efc3b1196624dab1035e5981 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2016-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -77,22 +77,22 @@ OFBool DSRSimplifiedAdultEchoSRConstraintChecker::checkContentRelationship(const
         /* row 1 of the table */
         if ((relationshipType == RT_contains) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
+            result = (targetValueType == VT_Text)    || (targetValueType == VT_Code)   || (targetValueType == VT_Num)   ||
                     (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) ||
                     (targetValueType == VT_Container);
         }
         /* row 2 of the table */
-        else if ((relationshipType == RT_hasObsContext) &&
-            ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num)))
+        else if ((relationshipType == RT_hasObsContext) && ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) ||
+            (sourceValueType == VT_Num) || (sourceValueType == VT_Container) /* see CP-2084 */))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
+            result = (targetValueType == VT_Text)    || (targetValueType == VT_Code)   || (targetValueType == VT_Num)   ||
                     (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) ||
                     (targetValueType == VT_Composite);
         }
         /* row 3 of the table */
         else if ((relationshipType == RT_hasAcqContext) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
+            result = (targetValueType == VT_Text)    || (targetValueType == VT_Code)   || (targetValueType == VT_Num)   ||
                     (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) ||
                     (targetValueType == VT_Container);
         }
@@ -105,7 +105,7 @@ OFBool DSRSimplifiedAdultEchoSRConstraintChecker::checkContentRelationship(const
         else if ((relationshipType == RT_hasProperties) &&
             ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num)))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
+            result = (targetValueType == VT_Text)    || (targetValueType == VT_Code)   || (targetValueType == VT_Num)   ||
                     (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) ||
                     (targetValueType == VT_Container);
         }
@@ -113,9 +113,9 @@ OFBool DSRSimplifiedAdultEchoSRConstraintChecker::checkContentRelationship(const
         else if ((relationshipType == RT_inferredFrom) &&
             ((sourceValueType == VT_Text) || (sourceValueType == VT_Code) || (sourceValueType == VT_Num)))
         {
-            result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_Num) ||
+            result = (targetValueType == VT_Text)    || (targetValueType == VT_Code)   || (targetValueType == VT_Num)       ||
                     (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef) || (targetValueType == VT_Container) ||
-                    (targetValueType == VT_Image) || (targetValueType == VT_SCoord) || (targetValueType == VT_Waveform) ||
+                    (targetValueType == VT_Image)    || (targetValueType == VT_SCoord) || (targetValueType == VT_Waveform)  ||
                     (targetValueType == VT_TCoord);
         }
         /* row 7 of the table */
index 5908a897f64de4face9c70dfcdb0fae67c1cb3ef..c0b691e14fb33199d1378a19d506ccb66ee0b2d3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2010-2018, OFFIS e.V.
+ *  Copyright (C) 2010-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -76,11 +76,11 @@ OFCondition DSRGraphicData3DList::print(STD_NAMESPACE ostream &stream,
     while (iterator != endPos)
     {
         /* need to convert float to avoid problems with decimal point ('.' or ',') */
-        OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).XCoord, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */);
+        OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).XCoord, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */);
         stream << buffer << tripletSeparator;
-        OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).YCoord, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */);
+        OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).YCoord, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */);
         stream << buffer << tripletSeparator;
-        OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).ZCoord, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */);
+        OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).ZCoord, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */);
         stream << buffer;
         iterator++;
         if (iterator != endPos)
index 57d003731010bf9aa625b9c5ad03e5aa7e093c75..113a79a04599656464aec572a6aaa7331b151bb8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2018, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -76,9 +76,9 @@ OFCondition DSRGraphicDataList::print(STD_NAMESPACE ostream &stream,
     while (iterator != endPos)
     {
         /* need to convert float to avoid problems with decimal point ('.' or ',') */
-        OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).Column, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */);
+        OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).Column, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */);
         stream << buffer << pairSeparator;
-        OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).Row, 0, 0, 8 /* FLT_DIG + 2 for DICOM FL */);
+        OFStandard::ftoa(buffer, sizeof(buffer), (*iterator).Row, 0, 0, 9 /* FLT_DECIMAL_DIG for DICOM FL */);
         stream << buffer;
         iterator++;
         if (iterator != endPos)
index 5c5d771419c8e44d91505615a3dacfc2b073f2a3..e09174115542912bcc8a1567f97af0e78168f2a9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2010-2015, OFFIS e.V.
+ *  Copyright (C) 2010-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -78,7 +78,7 @@ OFBool DSRSpectaclePrescriptionReportConstraintChecker::checkContentRelationship
         if ((relationshipType == RT_contains) && (sourceValueType == VT_Container))
         {
             result = (targetValueType == VT_Container) || (targetValueType == VT_Code) ||
-                     (targetValueType == VT_Num) || (targetValueType == VT_Text);
+                     (targetValueType == VT_Num)       || (targetValueType == VT_Text);
         }
     }
     return result;
index cb6d26d0ff4e2534c90b87d9786c8d91d1c35228..168c7782330e9733603fcdc62b3c699d05e7e892 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2017, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcdeftag.h"
 #include "dcmtk/dcmdata/dcvrul.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CINTTYPES
-#include "dcmtk/ofstd/ofstdinc.h"
-
 
 template<>
 const Uint32& DSRgetEmptyItem<Uint32>()
index 4946a4c927fec8f6c5cdf4bd255e2541693c4796..406e3d353e84bb56eda5be07c0eb455563868e87 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2018, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -29,9 +29,6 @@
 #include "dcmtk/dcmdata/dcvrds.h"
 
 #include "dcmtk/ofstd/ofstd.h"
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 
 template<>
 const Float64& DSRgetEmptyItem<Float64>()
@@ -76,7 +73,7 @@ OFCondition DSRReferencedTimeOffsetList::print(STD_NAMESPACE ostream &stream,
     while (iterator != endPos)
     {
         /* need to convert float to avoid problems with decimal point ('.' or ',') */
-        OFStandard::ftoa(buffer, sizeof(buffer), *iterator, 0 ,0, 17 /* DBL_DIG + 2 for DICOM FD */);
+        OFStandard::ftoa(buffer, sizeof(buffer), *iterator, 0, 0, 17 /* DBL_DECIMAL_DIG for DICOM FD */);
         stream << buffer;
         iterator++;
         if (iterator != endPos)
index b0b8cd5e61df685988145076d2558e203b3c26ff..c5b38546d4504a6d2e0b841b593d3511371580bc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2020, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/ofstd/ofstd.h"
 
-#define INCLUDE_CSTDIO
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /*---------------------------------*
  *  constant definitions (part 1)  *
  *---------------------------------*/
@@ -335,6 +330,7 @@ static const S_DocumentTypeNameMap DocumentTypeNameMap[] =
     {DSRTypes::DT_ColonCadSR,                            UID_ColonCADSRStorage,                               EM_EnhancedEquipment,                                             "SR", "Colon CAD SR"},
     {DSRTypes::DT_ProcedureLog,                          UID_ProcedureLogStorage,                             EM_Synchronization,                                               "SR", "Procedure Log"},
     {DSRTypes::DT_XRayRadiationDoseSR,                   UID_XRayRadiationDoseSRStorage,                      EM_EnhancedEquipment,                                             "SR", "X-Ray Radiation Dose SR"},
+    {DSRTypes::DT_EnhancedXRayRadiationDoseSR,           UID_EnhancedXRayRadiationDoseSRStorage,              EM_EnhancedEquipment,                                             "SR", "Enhanced X-Ray Radiation Dose SR"},
     {DSRTypes::DT_SpectaclePrescriptionReport,           UID_SpectaclePrescriptionReportStorage,              EM_EnhancedEquipment,                                             "SR", "Spectacle Prescription Report"},
     {DSRTypes::DT_MacularGridThicknessAndVolumeReport,   UID_MacularGridThicknessAndVolumeReportStorage,      EM_EnhancedEquipment,                                             "SR", "Macular Grid Thickness and Volume Report"},
     {DSRTypes::DT_ImplantationPlanSRDocument,            UID_ImplantationPlanSRDocumentStorage,               EM_EnhancedEquipment,                                             "SR", "Implantation Plan SR Document"},
@@ -956,7 +952,7 @@ DSRTypes::E_CharacterSet DSRTypes::definedTermToCharacterSet(const OFString &def
 
 OFBool DSRTypes::isDocumentTypeSupported(const E_DocumentType documentType)
 {
-    return (documentType != DT_invalid) && (documentType != DT_ExtensibleSR);
+    return (documentType != DT_invalid) && (documentType != DT_ExtensibleSR) && (documentType != DT_EnhancedXRayRadiationDoseSR);
 }
 
 
@@ -1555,6 +1551,9 @@ DSRIODConstraintChecker *DSRTypes::createIODConstraintChecker(const E_DocumentTy
         case DT_RenditionSelectionDocument:
             checker = new DSRRenditionSelectionDocumentConstraintChecker();
             break;
+        case DT_EnhancedXRayRadiationDoseSR:
+            /* not yet supported */
+            break;
         case DT_invalid:
             /* nothing to do */
             break;
index 6e70549f52d89567768c2db9f49c975eae573c63..36528225b69d82a4ac5681601344862d9cb3bceb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2017, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcdeftag.h"
 #include "dcmtk/dcmdata/dcvrus.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 // global empty item object so it gets initialized and cleaned up by the linker
 const DSRWaveformChannelItem DSRWaveformChannelEmptyItem(0, 0);
 
index 3b0613a2e93d6c055b6759786d7eb06f65edaffe..c96e16815f8b797e1b3cc53facf35a0964253ce9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2020, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -167,7 +167,11 @@ OFCondition DSRWaveformReferenceValue::readItem(DcmItem &dataset,
     OFCondition result = DSRCompositeReferenceValue::readItem(dataset, flags);
     /* read ReferencedWaveformChannels (conditional) */
     if (result.good())
+    {
         ChannelList.read(dataset, flags);
+        /* check data and report warnings if any */
+        checkCurrentValue(OFTrue /*reportWarnings*/);
+    }
     return result;
 }
 
@@ -181,6 +185,8 @@ OFCondition DSRWaveformReferenceValue::writeItem(DcmItem &dataset) const
     {
         if (!ChannelList.isEmpty())
             result = ChannelList.write(dataset);
+        /* check data and report warnings if any */
+        checkCurrentValue(OFTrue /*reportWarnings*/);
     }
     return result;
 }
@@ -256,12 +262,16 @@ OFBool DSRWaveformReferenceValue::appliesToChannel(const Uint16 multiplexGroupNu
 }
 
 
-OFCondition DSRWaveformReferenceValue::checkSOPClassUID(const OFString &sopClassUID) const
+// helper macro to avoid annoying check of boolean flag
+#define REPORT_WARNING(msg) { if (reportWarnings) DCMSR_WARN(msg); }
+
+OFCondition DSRWaveformReferenceValue::checkSOPClassUID(const OFString &sopClassUID,
+                                                        const OFBool reportWarnings) const
 {
     OFCondition result = DSRCompositeReferenceValue::checkSOPClassUID(sopClassUID);
     if (result.good())
     {
-        /* check for all valid/known SOP classes (according to DICOM PS 3.6-2020c) */
+        /* check for all valid/known SOP classes (according to DICOM PS 3.6-2021c) */
         if ((sopClassUID != UID_TwelveLeadECGWaveformStorage) &&
             (sopClassUID != UID_GeneralECGWaveformStorage) &&
             (sopClassUID != UID_AmbulatoryECGWaveformStorage) &&
@@ -278,6 +288,7 @@ OFCondition DSRWaveformReferenceValue::checkSOPClassUID(const OFString &sopClass
             (sopClassUID != UID_SleepElectroencephalogramWaveformStorage) &&
             (sopClassUID != UID_BodyPositionWaveformStorage))
         {
+            REPORT_WARNING("Invalid or unknown waveform SOP class referenced from WAVEFORM content item")
             result = SR_EC_InvalidValue;
         }
     }
index ed52fbc023dc6c4da5eeb73ee300c679a944ee6c..c23f37314e3ee1397d99a77281d05fdd93d8c234 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2003-2019, OFFIS e.V.
+ *  Copyright (C) 2003-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,9 +25,6 @@
 
 #include "dcmtk/dcmsr/dsrxmld.h"
 
-#define INCLUDE_CSTDARG
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #ifdef WITH_LIBXML
 #include <libxml/xmlversion.h>
 
 #endif /* LIBXML_SCHEMAS_ENABLED */
 
 // This function is also used in xml2dcm, try to stay in sync!
+#if defined(HAVE_VSNPRINTF) && defined(HAVE_PROTOTYPE_VSNPRINTF)
 extern "C" void errorFunction(void * ctx, const char *msg, ...)
+#else
+extern "C" void errorFunction(void * /* ctx */, const char *msg, ...)
+#endif
 {
     OFLogger xmlLogger = OFLog::getLogger("dcmtk.dcmsr.libxml");
 
index e32945ae0d4aa2e9d4479964b6d562d4c9b1542d..77d7f3debbbcd97a54896fce60880ab3dd5b6948 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2005-2016, OFFIS e.V.
+ *  Copyright (C) 2005-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -84,8 +84,8 @@ OFBool DSRXRayRadiationDoseSRConstraintChecker::checkContentRelationship(const E
         /* row 2 of the table */
         else if ((relationshipType == RT_hasObsContext) && (sourceValueType == VT_Container))
         {
-            result = (targetValueType == VT_Text)   || (targetValueType == VT_Code)      || (targetValueType == VT_DateTime) ||
-                     (targetValueType == VT_UIDRef) || (targetValueType == VT_PName);
+            result = (targetValueType == VT_Text)   || (targetValueType == VT_Code)  || (targetValueType == VT_DateTime) ||
+                     (targetValueType == VT_UIDRef) || (targetValueType == VT_PName) || (targetValueType == VT_Container) /* see CP-2084 */;
         }
         /* row 3 of the table */
         else if ((relationshipType == RT_hasObsContext) &&
@@ -116,7 +116,7 @@ OFBool DSRXRayRadiationDoseSRConstraintChecker::checkContentRelationship(const E
                      (targetValueType == VT_DateTime) || (targetValueType == VT_UIDRef)    || (targetValueType == VT_PName) ||
                      (targetValueType == VT_Image)    || (targetValueType == VT_Composite) || (targetValueType == VT_Container);
         }
-        /* row 7 of the table - introduced with CP-1076 */
+        /* row 7 of the table */
         else if ((relationshipType == RT_hasProperties) && (sourceValueType == VT_PName))
         {
             result = (targetValueType == VT_Text) || (targetValueType == VT_Code) || (targetValueType == VT_DateTime) ||
index fcbf1f571012b8d82e19cf1719b55eda22659850..8fc0c8cbc2fb9e9eb5b19246d628a62555399f51 100644 (file)
@@ -1,6 +1,16 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(mkreport mkreport)
-DCMTK_ADD_EXECUTABLE(dcmsr_tests tests tsrtree tsrdoctr tsrdoc tsrcodvl tsrnumvl tsrtpl tsrcmr tsrlist)
+DCMTK_ADD_EXECUTABLE(mkreport mkreport.cc)
+DCMTK_ADD_EXECUTABLE(dcmsr_tests
+  tests.cc
+  tsrcmr.cc
+  tsrcodvl.cc
+  tsrdoc.cc
+  tsrdoctr.cc
+  tsrlist.cc
+  tsrnumvl.cc
+  tsrtpl.cc
+  tsrtree.cc
+)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(mkreport dcmsr dcmimage dcmimgle dcmdata oflog ofstd)
index 7238d0197848c1572a34a91a32a4f7a451c33cf7..83907511be260ea94ff028eac15a040399ef3e32 100644 (file)
@@ -1,12 +1,12 @@
 mkreport.o: mkreport.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/dcmsr/dsrdoc.h ../include/dcmtk/dcmsr/dsrdoctr.h \
  ../include/dcmtk/dcmsr/dsrdocst.h ../include/dcmtk/dcmsr/dsrtree.h \
@@ -85,6 +85,7 @@ mkreport.o: mkreport.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
@@ -113,7 +114,6 @@ mkreport.o: mkreport.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcofsetl.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrae.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvras.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrdt.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrur.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlt.h \
@@ -247,6 +247,8 @@ tsrcmr.o: tsrcmr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
  ../include/dcmtk/dcmsr/dsrdoc.h ../include/dcmtk/dcmsr/dsrdoctr.h \
  ../include/dcmtk/dcmsr/dsrdocst.h ../include/dcmtk/dcmsr/dsrtree.h \
  ../include/dcmtk/dcmsr/dsrtypes.h ../include/dcmtk/dcmsr/dsdefine.h \
@@ -278,6 +280,7 @@ tsrcmr.o: tsrcmr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
@@ -383,6 +386,8 @@ tsrcodvl.o: tsrcodvl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdict.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dchashdi.h \
  ../include/dcmtk/dcmsr/dsrcodvl.h ../include/dcmtk/dcmsr/dsrtypes.h \
  ../include/dcmtk/dcmsr/dsdefine.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcelem.h \
@@ -479,6 +484,7 @@ tsrdoc.o: tsrdoc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
@@ -578,6 +584,7 @@ tsrdoctr.o: tsrdoctr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
@@ -805,6 +812,7 @@ tsrtpl.o: tsrtpl.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrcs.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcbytstr.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrda.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcvrds.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvris.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcvrlo.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcchrstr.h \
index b95cfac4c11c1457ec70f2107dc8146bdb2d449c..780be7945518d561299964591fe416996ab4ed8d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2019, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -185,7 +185,8 @@ int main(int argc, char *argv[])
                             OFString filename = "report";
                             filename += array[i];
                             filename += ".dcm";
-                            fileformat->saveFile(filename.c_str(), EXS_LittleEndianExplicit);
+                            if (fileformat->saveFile(filename, EXS_LittleEndianExplicit).bad())
+                                CERR << "ERROR: could not save dataset to file '" << filename << "'" << OFendl;
                         } else
                             CERR << "ERROR: could not write SR document into dataset" << OFendl;
                     }
index eb90254aa3699c9111305bf6788d9e17f2a63348..bb416bb99b5b8c57a6725b3df419e3dc6f190c0e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012-2019, OFFIS e.V.
+ *  Copyright (C) 2012-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -65,6 +65,7 @@ OFTEST_REGISTER(dcmsr_extractDocSubTree_1);
 OFTEST_REGISTER(dcmsr_extractDocSubTree_2);
 OFTEST_REGISTER(dcmsr_extractAndInsertDocSubTree_1);
 OFTEST_REGISTER(dcmsr_extractAndInsertDocSubTree_2);
+OFTEST_REGISTER(dcmsr_setAndGetPatientData);
 OFTEST_REGISTER(dcmsr_setSpecificCharacterSet);
 OFTEST_REGISTER(dcmsr_changeDocumentType_1);
 OFTEST_REGISTER(dcmsr_changeDocumentType_2);
@@ -83,6 +84,9 @@ OFTEST_REGISTER(dcmsr_writeCodeSequence);
 OFTEST_REGISTER(dcmsr_compareCodedEntry);
 OFTEST_REGISTER(dcmsr_useBasicCodedEntry);
 OFTEST_REGISTER(dcmsr_setNumericMeasurementValue);
+OFTEST_REGISTER(dcmsr_emptyMeasurementValueSequence);
+OFTEST_REGISTER(dcmsr_setAndGetFloatingPointRepresentation);
+OFTEST_REGISTER(dcmsr_setAndGetRationalRepresentation);
 OFTEST_REGISTER(dcmsr_CID29e_AcquisitionModality);
 OFTEST_REGISTER(dcmsr_CID42_NumericValueQualifier);
 OFTEST_REGISTER(dcmsr_CID244e_Laterality);
@@ -94,6 +98,7 @@ OFTEST_REGISTER(dcmsr_TID1001_ObservationContext);
 OFTEST_REGISTER(dcmsr_TID1204_LanguageOfContentItemAndDescendants);
 OFTEST_REGISTER(dcmsr_TID1411_VolumetricROIMeasurements);
 OFTEST_REGISTER(dcmsr_TID1500_MeasurementReport);
+OFTEST_REGISTER(dcmsr_TID1500_MeasurementReport_minimal);
 OFTEST_REGISTER(dcmsr_TID1501_MeasurementGroup);
 OFTEST_REGISTER(dcmsr_TID1600_ImageLibrary);
 OFTEST_REGISTER(dcmsr_CMR_SRNumericMeasurementValue);
index 8fba9f5c2ce54ac8fd90b62d00d69450d9d5bf42..46d7e20e68cd33e902aa7e27d732722bc48d6721 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2020, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -297,9 +297,12 @@ OFTEST(dcmsr_TID1500_MeasurementReport)
     /* set details on the observation context */
     OFCHECK(report.getObservationContext().addPersonObserver("Doe^Jane", "Some Organization").good());
     /* create new image library (only needed after clear) */
+    OFCHECK(report.hasImageLibrary(OFFalse /*checkChildren*/));
+    OFCHECK(!report.hasImageLibrary(OFTrue /*checkChildren*/));
     OFCHECK(report.getImageLibrary().createNewImageLibrary().good());
+    OFCHECK(report.hasImageLibrary(OFFalse /*checkChildren*/));
+    OFCHECK(report.hasImageLibrary(OFTrue /*checkChildren*/));
     /* set two values for "procedure reported" */
-    OFCHECK(!report.isValid());
     OFCHECK(!report.hasProcedureReported());
     OFCHECK(report.addProcedureReported(CMR_CID100::PETWholeBody).good());
     OFCHECK(report.addProcedureReported(DSRCodedEntryValue("4711", "99TEST", "Some other test code")).good());
@@ -358,7 +361,7 @@ OFTEST(dcmsr_TID1500_MeasurementReport)
     OFCHECK(volMeasurements.setRealWorldValueMap(dataset).good());
     OFCHECK(volMeasurements.addFindingSite(CODE_SCT_AorticArch).good());
     OFCHECK(volMeasurements.setMeasurementMethod(DSRCodedEntryValue(CODE_DCM_SUVBodyWeightCalculationMethod)).good());
-    OFCHECK(!volMeasurements.isValid());
+    OFCHECK(volMeasurements.isValid());
     /* add two measurement values */
     const CMR_TID1411_in_TID1500::MeasurementValue numVal1("99", CMR_CID7181::StandardizedUptakeValueBodyWeight);
     const CMR_TID1411_in_TID1500::MeasurementValue numVal2(CMR_CID42::MeasurementFailure);
@@ -411,7 +414,7 @@ OFTEST(dcmsr_TID1500_MeasurementReport)
     } else
         OFCHECK_FAIL("could create expanded tree");
 
-    /* try to insert the root template into a document */
+    /* try to insert the root template into an SR document */
     DSRDocument doc;
     OFCHECK(!doc.isValid());
     OFCHECK_EQUAL(doc.getDocumentType(), DSRTypes::DT_BasicTextSR);
@@ -432,6 +435,56 @@ OFTEST(dcmsr_TID1500_MeasurementReport)
 }
 
 
+OFTEST(dcmsr_TID1500_MeasurementReport_minimal)
+{
+    /* make sure data dictionary is loaded */
+    if (!dcmDataDict.isDictionaryLoaded())
+    {
+        OFCHECK_FAIL("no data dictionary loaded, check environment variable: " DCM_DICT_ENVIRONMENT_VARIABLE);
+        return;
+    }
+
+    /* create a minimal TID 1500 report (to test changes introduced by CP-1998) */
+    TID1500_MeasurementReport report(CMR_CID7021::ImagingMeasurementReport);
+    /* set details on the observation context */
+    OFCHECK(report.getObservationContext().addPersonObserver("Doe^Jane", "Some Organization").good());
+    /* and add a single qualitative evaluation */
+    OFCHECK(report.addQualitativeEvaluation(DSRBasicCodedEntry("4711", "99TEST", "Some other test code"), "very good").good());
+
+    /* perform some checks */
+    OFCHECK(report.isValid());
+    OFCHECK(!report.hasProcedureReported());
+    OFCHECK(report.hasImageLibrary(OFFalse /*checkChildren*/));
+    OFCHECK(!report.hasImageLibrary(OFTrue/*checkChildren*/));
+    OFCHECK(report.hasImagingMeasurements(OFFalse /*checkChildren*/));
+    OFCHECK(!report.hasImagingMeasurements(OFTrue /*checkChildren*/));
+    OFCHECK(!report.hasVolumetricROIMeasurements(OFTrue /*checkChildren*/));
+    OFCHECK(!report.hasIndividualMeasurements(OFTrue /*checkChildren*/));
+    OFCHECK(report.hasQualitativeEvaluations(OFTrue /*checkChildren*/));
+
+    /* try to insert the root template into an SR document */
+    DSRDocument doc;
+    OFCHECK(doc.setTreeFromRootTemplate(report, OFTrue /*expandTree*/).good());
+    OFCHECK(doc.isValid());
+
+    /* remove empty "Imaging Measurements" (TID 1500 - Row 6) CONTAINER */
+    OFCHECK_EQUAL(doc.getTree().countNodes(), 7);
+    OFCHECK(doc.getTree().gotoNamedChildNode(CODE_DCM_ImagingMeasurements) > 0);
+    OFCHECK(doc.getTree().removeCurrentContentItem() > 0);
+    OFCHECK_EQUAL(doc.getTree().countNodes(), 6);
+
+    /* output content of both the tree and the SR document (in debug mode only) */
+    if (DCM_dcmsrCmrLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
+    {
+        report.print(COUT, DSRTypes::PF_printTemplateIdentification | DSRTypes::PF_printAllCodes | DSRTypes::PF_printSOPInstanceUID |
+                           DSRTypes::PF_printNodeID | DSRTypes::PF_printAnnotation | DSRTypes::PF_printLongSOPClassName);
+        COUT << "---" << OFendl;
+        doc.print(COUT, DSRTypes::PF_printTemplateIdentification | DSRTypes::PF_printAllCodes | DSRTypes::PF_printSOPInstanceUID |
+                        DSRTypes::PF_printNodeID | DSRTypes::PF_printAnnotation | DSRTypes::PF_printLongSOPClassName);
+    }
+}
+
+
 OFTEST(dcmsr_TID1501_MeasurementGroup)
 {
     CMR_TID1501_in_TID1500 group;
index 86cdcf2765ba3717f5ea9ef93a05bd7aa10a1b97..f8c76bc894c393bb74a158f280866311e32098f7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2014-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
 #include "dcmtk/dcmsr/dsrdoc.h"
 
 
+OFTEST(dcmsr_setAndGetPatientData)
+{
+    DSRDocument doc;
+    OFString value;
+    /* check whether the values are set correctly */
+    OFCHECK(doc.setPatientName("Dow^John").good());
+    OFCHECK(doc.getPatientName(value).good());
+    OFCHECK_EQUAL(value, "Dow^John");
+    OFCHECK(doc.setPatientBirthDate("19600707").good());
+    OFCHECK(doc.getPatientBirthDate(value).good());
+    OFCHECK_EQUAL(value, "19600707");
+    OFCHECK(doc.setPatientID("0815").good());
+    OFCHECK(doc.getPatientID(value).good());
+    OFCHECK_EQUAL(value, "0815");
+    OFCHECK(doc.setIssuerOfPatientID("The Assigning Authority").good());
+    OFCHECK(doc.getIssuerOfPatientID(value).good());
+    OFCHECK_EQUAL(value, "The Assigning Authority");
+    OFCHECK(doc.setPatientSex("M").good());
+    OFCHECK(doc.getPatientSex(value).good());
+    OFCHECK_EQUAL(value, "M");
+    /* also check some recently introduced attributes */
+    OFCHECK(doc.setPatientSize("1.88").good());
+    OFCHECK(doc.getPatientSize(value).good());
+    OFCHECK_EQUAL(value, "1.88");
+    OFCHECK(doc.setPatientWeight("80").good());
+    OFCHECK(doc.getPatientWeight(value).good());
+    OFCHECK_EQUAL(value, "80");
+}
+
+
 OFTEST(dcmsr_setSpecificCharacterSet)
 {
     /* first, create an SR document and set the character set */
index 08f642fe25f83f35fee00609c0fcf44bdab34cfd..f587ace51332b5ca018fdcf3c9f48e8d271323fb 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2015-2016, J. Riesmeier, Oldenburg, Germany
+ *  Copyright (C) 2015-2021, J. Riesmeier, Oldenburg, Germany
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation are maintained by
@@ -36,19 +36,19 @@ OFTEST(dcmsr_setNumericMeasurementValue)
     OFCHECK(numValue.isValid());
     OFCHECK(!numValue.isComplete());
     /* set valid coded entry */
-    OFCHECK(numValue.setValue("", DSRCodedEntryValue(), OFTrue /*check*/).good());
+    OFCHECK(numValue.setValue("", DSRCodedEntryValue(), CODE_DCM_ValueIndeterminate, OFTrue /*check*/).good());
     OFCHECK(numValue.isEmpty());
     OFCHECK(numValue.isValid());
-    OFCHECK(!numValue.isComplete());
+    OFCHECK(numValue.isComplete());
     OFCHECK(numValue.setValue(CODE_DCM_NotANumber, OFTrue /*check*/).good());
     OFCHECK(numValue.isEmpty());
     OFCHECK(numValue.isValid());
     OFCHECK(numValue.isComplete());
-    OFCHECK(numValue.setValue("1.5", DSRBasicCodedEntry("cm", "UCUM", "1.4", "centimeter"), OFTrue /*check*/).good());
+    OFCHECK(numValue.setValue("1.5", DSRBasicCodedEntry("cm", "UCUM", "centimeter"), OFTrue /*check*/).good());
     OFCHECK(!numValue.isEmpty());
     OFCHECK(numValue.isValid());
     OFCHECK(numValue.isComplete());
-    OFCHECK(numValue.setValue("99999", DSRBasicCodedEntry("cm", "UCUM", "1.4", "centimeter"), CODE_DCM_ValueOutOfRange, OFTrue /*check*/).good());
+    OFCHECK(numValue.setValue("99999", DSRBasicCodedEntry("cm", "UCUM", "centimeter"), CODE_DCM_ValueOutOfRange, OFTrue /*check*/).good());
     OFCHECK(!numValue.isEmpty());
     OFCHECK(numValue.isValid());
     OFCHECK(numValue.isComplete());
@@ -61,3 +61,43 @@ OFTEST(dcmsr_setNumericMeasurementValue)
     OFCHECK(numValue.isValid());
     OFCHECK(!numValue.isComplete());
 }
+
+
+OFTEST(dcmsr_emptyMeasurementValueSequence)
+{
+    DSRNumericMeasurementValue numValue(CODE_DCM_ValueUnknown);
+    OFCHECK(numValue.isEmpty());
+    OFCHECK(numValue.isValid());
+    OFCHECK(numValue.isComplete());
+    /* clear the value qualifier */
+    OFCHECK(numValue.setNumericValueQualifier(DSRCodedEntryValue()).good());
+    OFCHECK(numValue.isEmpty());
+    OFCHECK(numValue.isValid());
+    OFCHECK(!numValue.isComplete());
+}
+
+
+OFTEST(dcmsr_setAndGetFloatingPointRepresentation)
+{
+    Float64 value;
+    /* set numeric value with additional representation */
+    DSRNumericMeasurementValue numValue("1.5", DSRBasicCodedEntry("cm", "UCUM", "centimeter"));
+    OFCHECK(numValue.setFloatingPointRepresentation(1.5).good());
+    /* get and check the value */
+    OFCHECK(numValue.getFloatingPointRepresentation(value).good());
+    OFCHECK_EQUAL(value, 1.5);
+}
+
+
+OFTEST(dcmsr_setAndGetRationalRepresentation)
+{
+    Sint32 value1;
+    Uint32 value2;
+    /* set numeric value with additional representation */
+    DSRNumericMeasurementValue numValue("1.5", DSRBasicCodedEntry("cm", "UCUM", "centimeter"));
+    OFCHECK(numValue.setRationalRepresentation(3, 2).good());
+    /* get and check the value */
+    OFCHECK(numValue.getRationalRepresentation(value1, value2).good());
+    OFCHECK_EQUAL(value1, 3);
+    OFCHECK_EQUAL(value2, 2);
+}
index 102e17fb9040576fa4cf0e2eecbb76d6f747ddaf..a9da39d8359ba63a95a90bafadfde8ba2bbb8e26 100644 (file)
@@ -1,2 +1,2 @@
 # declare installation files
-install(FILES ciphers.txt randseed.txt certstor.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc)
+install(FILES ciphers.txt randseed.txt DESTINATION "${CMAKE_INSTALL_DOCDIR}" COMPONENT doc)
index a7d28ed918151f759d3ba62428d7b96c0cd9e684..a33d1cfb367f72849c1649b7432fd2b59c331999 100644 (file)
@@ -11,7 +11,7 @@ configdir = @top_srcdir@/@configdir@
 
 include $(configdir)/@common_makefile@
 
-files = ciphers.txt randseed.txt certstor.txt
+files = ciphers.txt randseed.txt
 
 
 all:
diff --git a/dcmtls/docs/certstor.dox b/dcmtls/docs/certstor.dox
new file mode 100644 (file)
index 0000000..6533028
--- /dev/null
@@ -0,0 +1,304 @@
+/*!
+
+\page dcmtls_certstore certificate and certification authority management in dcmtls
+
+\section dcmtls_certstore_system_cert System certificate and private key
+
+The TLS protocol requires that a server (that is, an application that accepts
+incoming TLS network connections) \b must identify itself cryptographically
+using a certificate and a private key, whereas a client (an application that
+initiates outgoing TLS network connections) \b may identify itself using a
+certificate and a private key, or may remain anonymous.
+
+All DCMTK tools that support TLS encrypted network connections offer command
+line options for selecting unencrypted network communication, TLS with
+certificates, or (in the case of client applications) TLS in anonymous mode:
+
+\verbatim
+  -tls  --disable-tls
+          use normal TCP/IP connection (default)
+
+  +tls  --enable-tls  [p]rivate key file, [c]ertificate file: string
+          use authenticated secure TLS connection
+
+  +tla  --anonymous-tls
+          use secure TLS connection without certificate
+\endverbatim
+
+Two different file formats are supported for certificates, private keys and
+other cryptographic material: The text-based PEM ("Privacy Enhanced Mail")
+format, which is the default, and binary ASN.1 files in DER encoding
+("Distinguished Encoding Rules"). The file format can be selected through the
+following options:
+
+\verbatim
+  -pem  --pem-keys
+          read keys and certificates as PEM file (default)
+
+  -der  --der-keys
+          read keys and certificates as DER file
+\endverbatim
+
+Note that the PEM format supports multiple certificates in a single file, which
+is an important feature when certificates issued by an intermediate CA are used
+with TLS. The DER format only supports a single certificate per file.
+
+In many cases, the private key is stored in encrypted form and a password is
+needed to decrypt the private key file. In this case the following options are
+provided:
+
+\verbatim
+  +ps   --std-passwd
+          prompt user to type password on stdin (default)
+
+  +pw   --use-passwd  [p]assword: string
+          use password specified on the command line
+
+  -pw   --null-passwd
+          use empty string as password
+\endverbatim
+
+\section dcmtls_certstore_security_profiles Security profiles
+
+The DICOM standard defines a number of security profiles for the use of the
+DICOM network protocol over TLS. DCMTK supports the following profiles:
+
+\verbatim
+  +py   --profile-bcp195-nd
+          Non-downgrading BCP 195 TLS Profile (default)
+
+  +px   --profile-bcp195
+          BCP 195 TLS Profile
+
+  +pz   --profile-bcp195-ex
+          Extended BCP 195 TLS Profile
+
+  +pa   --profile-aes
+          AES TLS Secure Transport Connection Profile (retired)
+
+  +pb   --profile-basic
+          Basic TLS Secure Transport Connection Profile (retired)
+
+  +pn   --profile-null
+          Authenticated unencrypted communication
+          (retired, was used in IHE ATNA)
+\endverbatim
+
+The Non-downgrading BCP 195 TLS Profile, which is selected by default, is
+currently the most secure choice, as older protocol versions and cipher suites
+are explicitly disabled. It does not support backward compatibility with the
+older profiles. It uses either TLS version 1.2 or 1.3 and will default to TLS
+1.3 when possible.
+
+The BCP 195 TLS Profile, which was the default up to DCMTK 3.6.6, will try to
+negotiate cryptographic algorithms that are currently considered secure, but
+provides backward compatibility to older applications implementing the retired
+AES or Basic TLS profile. This profile is no longer compliant with BCP 195 as
+amended by RFC 8996 (2021).
+
+The Extended BCP 195 TLS Profile is similar to the Non-downgrading BCP 195 TLS
+Profile, but uses a more restricted selection of cipher suites and is restricted
+to TLS version 1.2.
+
+The AES TLS Secure Transport Connection Profile uses AES encryption and TLS
+version 1.0 and newer and has been retired from the DICOM standard. It should
+only be used where backward compatibility with devices implementing this profile
+is required.
+
+The Basic TLS Secure Transport Connection Profile uses Triple DES encryption
+and TLS version 1.0 and newer and has also been retired from the DICOM standard.
+It should only be used where backward compatibility with devices implementing
+this profile is required, in particular since the effective key length of 112
+bits is not sufficiently secure against brute force attacks anymore.
+
+Authenticated unencrypted communication finally is a retired profile that was
+defined in older versions of the IHE Audit Trail and Node Authentication
+profile. It uses an unencrypted communication with cryptographic checksums.
+This profile should be avoided.
+
+It should be noted that support for the Basic TLS profile will only be available
+when the OpenSSL library has been compiled such that support for Triple DES is
+enabled, which is not the default anymore.
+
+The list of TLS ciphersuites offered during the TLS handshake can be extended
+using the following option:
+
+\verbatim
+  +cs   --cipher  [c]iphersuite name: string
+          add ciphersuite to list of negotiated suites
+\endverbatim
+
+The list of supported ciphersuites can be printed using the following option:
+
+\verbatim
+  +cc   --list-ciphers
+          show list of supported TLS ciphersuites and exit
+\endverbatim
+
+\section dcmtls_certstore_peer_authentication Peer authentication
+
+By default, the TLS implementation in dcmtls will require both client and server
+to provide a certificate as proof of identity, and will verify the validity and
+trustworthiness of the certificate. This process has several steps:
+
+\li The TLS handshake will require a proof that the application has access to
+    the private key belonging to the public key encoded in the certificate.
+\li The digital signature in the certificate will be verified.
+\li The validity period of the certificate will be checked.
+\li It will be checked whether the certificate was issued by a trusted
+    Certification Authority (CA) (see \ref dcmtls_certstore_certification_authority).
+\li Depending on the command line options, the Certificate Revocation Lists
+    (CRLs) of all CAs up to the root CA may be checked to see if any certificate
+    in the certificate chain has been revoked (see \ref dcmtls_certstore_crl).
+
+This behavior can be modified with the following command line options:
+
+\verbatim
+  -rc   --require-peer-cert
+          verify peer certificate, fail if absent (default)
+
+  -vc   --verify-peer-cert
+          verify peer certificate if present
+
+  -ic   --ignore-peer-cert
+          don't verify peer certificate
+\endverbatim
+
+The first option will cause the connection to fail if the peer does not present
+a certificate (i.e. is working in anonymous mode) or if the certificate cannot
+be fully verified. The second option will perform a certificate verification if
+a certificate is present, but will also accept anonymous connections. The third
+option does not perform any certificate verification and also accepts anonymous
+connections.
+
+It should be noted that the latter two modes are susceptible to
+man-in-the-middle attacks and should thus be avoided.
+
+The \c \--verify-peer-cert option is not available in client applications,
+since TLS servers will always present a certificate.
+
+\section dcmtls_certstore_certification_authority Certification authority
+
+All tools in DCMTK that support TLS encrypted network connections need to have
+a list of trusted root certificates (i.e. self-signed certificates) that are
+used in the verification of the peer certificate when establishing the TLS
+connection.
+
+There are two ways of managing this list of trusted certificates: file-based and
+directory-based. The command line tools in DCMTK offer the following command
+line options for this purpose:
+
+\verbatim
+  certification authority:
+    +cf   --add-cert-file  [f]ilename: string
+            add certificate file to list of certificates
+
+    +cd   --add-cert-dir  [d]irectory: string
+            add certificates in d to list of certificates
+\endverbatim
+
+\subsection dcmtls_certstore_certification_authority_file File-based management of trusted root certificates
+
+The file-based option loads a file and adds all the certificates or CRLs present
+in that file into the pool of trusted certificates. File format is ASCII text
+containing concatenated PEM certificates and CRLs, unless ASN.1 DER format has
+been selected.
+
+\subsection dcmtls_certstore_certification_authority_dir Directory-based management of trusted root certificates
+
+The directory-based option specifies a directory containing certificates and
+CRLs. These certificates and CRLs are loaded on demand, and cached in memory
+once they are loaded.
+
+The directory should contain one certificate or CRL per file in PEM format, with
+a file name of the form hash.N for a certificate, or hash.rN for a CRL. The hash
+is computed from the subject name (for certificates) or the issuer name (for
+CRLs). The hash value can be obtained by calling the openssl command line tool:
+
+\verbatim
+  openssl x509 -hash -noout -in <infile.pem>
+\endverbatim
+
+where <infile.pem> should be replaced by the filename of the certificate or CRL.
+
+The .N or .rN suffix is a sequence number that starts at zero, and is
+incremented consecutively for each certificate or CRL with the same hash value.
+Gaps in the sequence numbers are not supported, it is assumed that there are no
+more objects with the same hash beyond the first missing number in the sequence.
+
+Sequence numbers make it possible for the directory to contain multiple
+certificates with same subject name hash value. For example, it is possible to
+have in the store several certificates with same subject or several CRLs with
+same issuer (and, for example, different validity period).
+
+\subsection dcmtls_certstore_certification_authority_intermed Intermediate CAs
+
+In many cases, the system certificates are not directly signed by a root CA
+(that is, a CA using a self-signed certificate), but by an intermediate CA. The
+certificate of the intermediate CA will be signed by the root CA (or another
+level of intermediate CA).
+
+In the TLS handshake, an application can provide more than one certificate: it
+can provide its certificate, followed by the certificates of any intermediate
+CAs up to and optionally including the root CA certificate.
+
+DCMTK tools will provide such intermediate certificates during the TLS handshake
+if they are present in the same file as the system certificate, which is
+provided as the second parameter of the \c \--enable-tls option. This requires
+the use of the PEM format, since DER does not support multiple certificates in
+one file.
+
+The PEM format allows the certificates to simply be concatenated in a text file,
+starting with the system certificate, followed by intermediate CA certificates
+and optionally the root CA certificate. On Linux/Posix systems, such a file may
+be created as follows:
+
+\verbatim
+  cat system_cert.pem intermediate_ca.pem root_ca.pem > fullchain.pem
+\endverbatim
+
+Users using LetsEncrypt certificates will notice that LetsEncrypt automatically
+provides a "fullchain.pem" file containing such a certificate chain.
+
+The certificates defined as trustworthy using \c \--add-cert-file or
+\c \--add-cert-dir can only be root CA certificates. It is not possible to add
+intermediate CA certificates to the "trust store".
+
+\section dcmtls_certstore_crl Certificate revocation lists
+
+The last, optional step in certificate verification is the look-up of the
+certificate revocation lists (CRLs) to check whether any certificate in the
+certificate chain has been revoked. CRLs cannot be transmitted in the TLS
+handshake, they must be pre-configured, and it should be noted that CRLs also
+have a limited validity period, defined in the file.
+
+The following CRL options are available starting with DCMTK 3.6.7:
+
+\verbatim
+  +crl  --add-crl-file  [f]ilename: string
+          add certificate revocation list file
+          (implies --enable-crl-vfy)
+
+  +crv  --enable-crl-vfy
+          enable leaf CRL verification
+
+  +cra  --enable-crl-all
+          enable full chain CRL verification
+\endverbatim
+
+The \c \--add-crl-file option will load a CRL file that can be used for CRL
+look-up. This option can be specified more than once. Alternatively, CRL files
+can be located in the CA directory specified with \c \--add-cert-dir. See
+\ref dcmtls_certstore_certification_authority_dir for a discussion of how CRL
+files must be named in this case.
+
+The \c \--enable-crl-vfy option will enable a look-up of the CRL of the leaf CA,
+i.e. only a single CRL will be checked in order to determine whether or not the
+peer's system certificate is revoked. The \c \--enable-crl-all option will
+enable a look-up of all CRLs up to the root CA, which will also cover the case
+where an intermediate CA certificate has been revoked.
+
+Once CRL verification has been enabled, certificate verification will fail if
+one of the required CRLs is absent.
+
+*/
diff --git a/dcmtls/docs/certstor.txt b/dcmtls/docs/certstor.txt
deleted file mode 100644 (file)
index e20de23..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-============================================================
-CERTIFICATION AUTHORITY (CA) CERTIFICATE MANAGEMENT IN DCMTK
-============================================================
-
-All tools in DCMTK that support TLS encrypted network connections
-need to have a list of trusted certificates (typically CA certificates)
-that are used in the verification of the peer certificate when
-establishing the TLS connection.
-
-There are two ways of managing this list of trusted certificates:
-file-based and directory-based. The command line tools in DCMTK
-offer the following command line options for this purpose:
-
-  certification authority:
-    +cf   --add-cert-file  [f]ilename: string
-            add certificate file to list of certificates
-
-    +cd   --add-cert-dir  [d]irectory: string
-            add certificates in d to list of certificates
-
-When using DCMTK at library level, the methods corresponding to these
-command line options are DcmTransportLayer::addTrustedCertificateFile()
-and DcmTransportLayer::addTrustedCertificateDir().
-
-
-FILE BASED MANAGEMENT OF TRUSTED CERTIFICATES
-
-The file-based option loads a file and adds all the certificates or CRLs
-present in that file into the pool of trusted certificates. File format
-is ASCII text containing concatenated PEM certificates and CRLs.
-
-
-DIRECTORY BASED MANAGEMENT OF TRUSTED CERTIFICATES
-
-The directory-based option specifies a directory containing certificates
-and CRLs. These certificates and CRLs are loaded on demand, and cached
-in memory once they are loaded.
-
-The directory should contain one certificate or CRL per file in PEM
-format, with a file name of the form hash.N for a certificate, or
-hash.rN for a CRL. The hash is computed from the subject name (for
-certificates) or the issuer name (for CRLs). The hash value can be
-obtained by calling the openssl command line tool:
-
-  openssl x509 -hash -noout -in <infile.pem>
-
-where <infile.pem> should be replaced by the filename of the certificate
-or CRL.
-
-The .N or .rN suffix is a sequence number that starts at zero, and is
-incremented consecutively for each certificate or CRL with the same hash
-value. Gaps in the sequence numbers are not supported, it is assumed
-that there are no more objects with the same hash beyond the first
-missing number in the sequence.
-
-Sequence numbers make it possible for the directory to contain multiple
-certificates with same subject name hash value. For example, it is
-possible to have in the store several certificates with same subject or
-several CRLs with same issuer (and, for example, different validity
-period).
-
-Note that the hash algorithm used for subject name hashing changed in
-OpenSSL 1.0.0, and all certificate stores have to be rehashed when
-moving from OpenSSL 0.9.x to 1.0.0.
-
-Note: This file contains text adapted from the OpenSSL API
-documentation, which is available under the OpenSSL license.
-The OpenSSL license is reproduced in DCMTK's COPYRIGHT file.
index ee6dffdd511ca198955be4a76605094d49b033b3..c235aceaffc79ce585ec155ba56e352f47f3b131 100644 (file)
@@ -14,7 +14,7 @@ The main interface classes are:
 \section Files
 
 The following files provide further documentation:
-\li \ref file_certstor
+\li \ref dcmtls_certstore
 \li \ref file_ciphers
 \li \ref file_randseed
 
@@ -35,12 +35,12 @@ DcmTLSTransportLayer::initializeOpenSSL(); // initialize OpenSSL library
 DcmTLSTransportLayer *tLayer = new DcmTLSTransportLayer(
   NET_REQUESTOR, "random.dat");
 
-if (TCS_ok != tLayer->setPrivateKeyFile("privkey.pem", SSL_FILETYPE_PEM))
+if (tLayer->setPrivateKeyFile("privkey.pem", SSL_FILETYPE_PEM).bad())
 {
   cerr << "unable to load private key" << endl;
   return;
 }
-if (TCS_ok != tLayer->setCertificateFile("certificate.pem", SSL_FILETYPE_PEM))
+if (tLayer->setCertificateFile("certificate.pem", SSL_FILETYPE_PEM).bad())
 {
   cerr << "unable to load certificate" << endl;
   return;
@@ -60,11 +60,6 @@ ASC_setTransportLayerType(params, 1);
 
 */
 
-/*!
-    \page file_certstor certstor.txt file
-    \verbinclude certstor.txt
-*/
-
 /*!
     \page file_ciphers ciphers.txt file
     \verbinclude ciphers.txt
index dd5ab025caf1a45f2d6a4ea881fb48777e85ceac..eb55d22e9b9a656c2df740e34617be079da37d86 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2018-2019, OFFIS e.V.
+ *  Copyright (C) 2018-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #ifdef WITH_OPENSSL
 
+#include "dcmtk/ofstd/ofcond.h"       /* for class OFCondition */
 #include "dcmtk/ofstd/ofstring.h"     /* for class OFString */
 #include "dcmtk/ofstd/ofstream.h"     /* for class ostream */
 #include "dcmtk/ofstd/ofvector.h"     /* for class OFVector */
 #include "dcmtk/dcmtls/tlsdefin.h"    /* for DCMTK_DCMTLS_EXPORT */
-#include "dcmtk/dcmnet/dcmlayer.h"    /* for DcmTransportLayerStatus */
 
 // include this file in doxygen documentation
 
@@ -132,7 +132,7 @@ enum DcmTLSCipherKeyExchange
   /// Static RSA key exchange
   TKE_RSA,
 
-  /// Elliptic Curve DiffieHellman
+  /// Elliptic Curve Diffie-Hellman
   TKE_ECDH,
 
   /// Fixed ECDH with ECDSA-signed certificates
@@ -141,7 +141,7 @@ enum DcmTLSCipherKeyExchange
   /// Fixed ECDH with RSA signatures
   TKE_ECDH_RSA,
 
-  /// DiffieHellman key exchange
+  /// Diffie-Hellman key exchange
   TKE_DH
 
 };
@@ -157,7 +157,7 @@ enum DcmTLSCipherAuthentication
   /// Digital Signature Standard
   TCA_DSS,
 
-  /// Elliptic Curve DiffieHellman
+  /// Elliptic Curve Diffie-Hellman
   TCA_ECDH,
 
   /// Elliptic Curve Digital Signature Algorithm
@@ -217,6 +217,27 @@ enum DcmTLSCipherMAC
 };
 
 
+/** This enum describes the verification approach
+ *  for certificate revocation lists (CRL)
+ *  @remark this enum is only available if DCMTK is compiled with
+ *  OpenSSL support enabled.
+ */
+enum DcmTLSCRLVerification
+{
+  /// Certificates are not checked against a CRL
+  TCR_noCRL,
+
+  /// Check chain leaf certificate against its CRL.
+  /// An error occurs if a suitable CRL cannot be found.
+  TCR_checkLeafCRL,
+
+  /// Check the entire certificate chain against their CRLs.
+  /// An error occurs if any required CRL cannot be found.
+  TCR_checkAllCRL
+
+};
+
+
 /** This helper class manages the list of TLS ciphersuites supported by DCMTK,
  *  translates DcmTLSSecurityProfile enums into the corresponding sets of
  *  ciphersuites, and permits translation between the official TLS ciphersuite
@@ -241,9 +262,9 @@ public:
   /** replace the current list of ciphersuites by the list of ciphersuites
    *  for the given profile.
    *  @param profile TLS Security Profile
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  DcmTransportLayerStatus setTLSProfile(DcmTLSSecurityProfile profile);
+  OFCondition setTLSProfile(DcmTLSSecurityProfile profile);
 
   /** return the currently selected TLS profile
    *  @return currently selected TLS profile
@@ -262,9 +283,9 @@ public:
    *  It is the responsibility of the user to ensure that the added ciphersuite
    *  does not break the rules of the selected profile. Use with care!
    *  @param suite TLS ciphersuite name, in the official TLS name form.
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  DcmTransportLayerStatus addCipherSuite(const char *suite);
+  OFCondition addCipherSuite(const char *suite);
 
   /** returns a string in OpenSSL syntax that contains the currently defined
    *  list of TLS ciphersuites.
@@ -319,7 +340,7 @@ public:
   static size_t lookupCiphersuite(const char *tlsCipherSuiteName);
 
   /** looks up the index of the given ciphersuite by OpenSSL name
-   *  @param tlsCipherSuiteName ciphersuite name in the form used by OpenSSL
+   *  @param opensslCipherSuiteName ciphersuite name in the form used by OpenSSL
    *  @returns index into list of ciphersuites, DcmTLSCiphersuiteHandler::unknownCipherSuiteIndex if ciphersuite unknown
    */
   static size_t lookupCiphersuiteByOpenSSLName(const char *opensslCipherSuiteName);
@@ -380,6 +401,7 @@ public:
   static size_t getCipherSuiteEffectiveKeySize(size_t idx);
 
   /** look up the name of the given security profile
+   *  @param profile the given security profile
    *  @return name of security profile, never NULL.
    */
   static const char *lookupProfileName(DcmTLSSecurityProfile profile);
@@ -402,9 +424,9 @@ private:
 
   /** add ciphersuite by name, print error if unsupported
    *  @param name ciphersuite name in RFC 2246 form
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  DcmTransportLayerStatus addRequiredCipherSuite(const char *name);
+  OFCondition addRequiredCipherSuite(const char *name);
 
   /** add 3DES ciphersuite, print warning if unsupported
    */
@@ -417,7 +439,7 @@ private:
   DcmTLSSecurityProfile currentProfile;
 
   /// indicator whether TLS 1.3 is enabled or disabled for the current profile
-   OFBool tls13_enabled;
+  OFBool tls13_enabled;
 
   /** an array of booleans indicating which ciphersuites known to DCMTK are
    *  actually supported by the OpenSSL library we are using.
index f62ea7fe6d2e5e25d1245a8f55419646fb04d5b6..8a23d3a9675da7ee6999ef6e1710563c307c02bd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017, OFFIS e.V.
+ *  Copyright (C) 2017-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/dcmdata/dcerror.h"
 #include "dcmtk/dcmtls/tlsdefin.h"
 
+// offset added to error codes returned by OpenSSL's X509_STORE_CTX_get_error()
+// function to convert them into OFCondition codes.
+#define DCMTLS_EC_X509Verify_Offset 1024
+
+// highest OpenSSL X.509 verification error code for which a mapping to
+// DCMTK OFCondition constants has been defined.
+#define DCMTLS_EC_X509Verify_Max 94
+
+// offset added to ERR_LIB_SSL error codes returned by OpenSSL's ERR_GET_REASON()
+// macro to convert them into OFCondition codes.
+#define DCMTLS_EC_SSL_Offset 2048
+
 // These classes allow creating error conditions that may either give a general
 // description of the error or may also contain some specific information,
 // e.g. a file name, while both a specialized object and a generic one would
@@ -130,14 +142,1332 @@ struct DCMTK_DCMTLS_EXPORT DcmTLSECFailedToWriteRandomSeedFileConst : OFConditio
     OFCondition operator()( const char* seedFile ) const;
 };
 
+/** A struct for creating an error condition related to a generic OpenSSL error
+ */
+struct DCMTK_DCMTLS_EXPORT DcmTLSECGenericOpenSSLError : OFConditionConst
+{
+    /** Constructor, initializes the OFConditionConst base.
+     *  Don't use this if you don't have a very good reason.
+     */
+    DcmTLSECGenericOpenSSLError();
+
+    /** Create a specialized OpenSSL error condition
+     *  that refers to the OpenSSL error code.
+     *  @param errorCode OpenSSL error code
+     *  @return an OFCondition that compares equal to
+     *    DCMTLS_EC_GenericOpenSSLError but also refers to
+     *    the OpenSSL error code, library and reason in its descriptive text.
+     */
+    OFCondition operator()(unsigned long errorCode) const;
+
+};
+
 // Declaration of generic error code instances
 
+/// condition constant: TLS ciphersuite not supported
 extern DCMTK_DCMTLS_EXPORT const DcmTLSECUnknownCiphersuiteConst DCMTLS_EC_UnknownCiphersuite;
+
+/// condition constant: creation of the TLS transport layer failed
 extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_FailedToCreateTLSTransportLayer;
+
+/// condition constant: loading of the private key failed
 extern DCMTK_DCMTLS_EXPORT const DcmTLSECFailedToLoadPrivateKeyConst DCMTLS_EC_FailedToLoadPrivateKey;
+
+/// condition constant: loading of the certificate failed
 extern DCMTK_DCMTLS_EXPORT const DcmTLSECFailedToLoadCertificateConst DCMTLS_EC_FailedToLoadCertificate;
+
+/// condition constant: mismatch between private key and certificate
 extern DCMTK_DCMTLS_EXPORT const DcmTLSECMismatchedPrivateKeyAndCertificateConst DCMTLS_EC_MismatchedPrivateKeyAndCertificate;
+
+/// condition constant: activation of ciphersuites failed
 extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_FailedToSetCiphersuites;
+
+/// condition constant: failed to write file with PRNG seed
 extern DCMTK_DCMTLS_EXPORT const DcmTLSECFailedToWriteRandomSeedFileConst DCMTLS_EC_FailedToWriteRandomSeedFile;
 
+/// condition constant: TLS function called but no TLS transport connection present
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_NoTLSTransportConnectionPresent;
+
+/// condition constant: ciphersuite not allowed in current DICOM security profile
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_CiphersuiteNotAllowed;
+
+/// condition constant: TLS read operation did not complete (SSL_ERROR_WANT_READ)
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSReadOperationDidNotComplete;
+
+/// condition constant: TLS write operation did not complete (SSL_ERROR_WANT_WRITE)
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWriteOperationDidNotComplete;
+
+/// condition constant: TLS X.509 lookup operation did not complete (SSL_ERROR_WANT_X509_LOOKUP)
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSX509LookupOperationDidNotComplete;
+
+/// condition constant: TLS connection closed by peer (SSL_ERROR_ZERO_RETURN)
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSConnectionClosedByPeer;
+
+/// condition constant: TLS connect operation did not complete (SSL_ERROR_WANT_CONNECT)
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSConnectOperationDidNotComplete;
+
+/// condition constant: TLS accept operation did not complete (SSL_ERROR_WANT_ACCEPT)
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAcceptOperationDidNotComplete;
+
+/// condition constant: TLS operation did not complete because an asynchronous engine is still processing data (SSL_ERROR_WANT_ASYNC)
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAsyncOperationDidNotComplete;
+
+/// condition constant: TLS asynchronous job could not be started (SSL_ERROR_WANT_ASYNC_JOB)
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAsyncJobCouldNotBeStarted;
+
+/// condition constant: TLS client hello callback needed (SSL_ERROR_WANT_CLIENT_HELLO_CB)
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSClientHelloCallbackNeeded;
+
+/// condition constant: other TLS error (unknown SSL_ERROR code)
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_OtherSSLError;
+
+/// condition constant: setting of the X.509 verification mode failed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_FailedToSetVerificationMode;
+
+/// condition constant: certificate store context initialization failed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_CertStoreCtxInitFailed;
+
+/// condition constant: OpenSSL error
+extern DCMTK_DCMTLS_EXPORT const DcmTLSECGenericOpenSSLError DCMTLS_EC_GenericOpenSSLError;
+
+/// condition constant: OpenSSL I/O error, not further specified (SSL_ERROR_SYSCALL)
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_OpenSSLIOError;
+
+// X.509 Verification Errors. These use condition codes > DCMTLS_EC_X509Verify_Offset.
+
+/// condition constant: X.509 certificate verification error - unspecified
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnspecified;
+
+/// condition constant: X.509 certificate verification error - unable to get issuer certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToGetIssuerCert;
+
+/// condition constant: X.509 certificate verification error - unable to get certificate CRL
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToGetCRL;
+
+/// condition constant: X.509 certificate verification error - unable to decrypt certificate's signature
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToDecryptCertSignature;
+
+/// condition constant: X.509 certificate verification error - unable to decrypt CRL's signature
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToDecryptCRLSignature;
+
+/// condition constant: X.509 certificate verification error - unable to decode issuer public key
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToDecodeIssuerPublicKey;
+
+/// condition constant: X.509 certificate verification error - certificate signature failure
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertSignatureFailure;
+
+/// condition constant: X.509 certificate verification error - CRL signature failure
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCRLSignatureFailure;
+
+/// condition constant: X.509 certificate verification error - certificate is not yet valid
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertNotYetValid;
+
+/// condition constant: X.509 certificate verification error - certificate has expired
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertHasExpired;
+
+/// condition constant: X.509 certificate verification error - CRL is not yet valid
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCRLNotYetValid;
+
+/// condition constant: X.509 certificate verification error - CRL has expired
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCRLHasExpired;
+
+/// condition constant: X.509 certificate verification error - format error in certificate's notBefore field
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyErrorInCertNotBeforeField;
+
+/// condition constant: X.509 certificate verification error - format error in certificate's notAfter field
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyErrorInCertNotAfterField;
+
+/// condition constant: X.509 certificate verification error - format error in CRL's lastUpdate field
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyErrorInCRLLastUpdateField;
+
+/// condition constant: X.509 certificate verification error - format error in CRL's nextUpdate field
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyErrorInCRLNextUpdateField;
+
+/// condition constant: X.509 certificate verification error - out of memory
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyOutOfMem;
+
+/// condition constant: X.509 certificate verification error - self signed certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyDepthZeroSelfSignedCert;
+
+/// condition constant: X.509 certificate verification error - self signed certificate in certificate chain
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySelfSignedCertInChain;
+
+/// condition constant: X.509 certificate verification error - unable to get local issuer certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToGetIssuerCertLocally;
+
+/// condition constant: X.509 certificate verification error - unable to verify the first certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToVerifyLeafSignature;
+
+/// condition constant: X.509 certificate verification error - certificate chain too long
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertChainTooLong;
+
+/// condition constant: X.509 certificate verification error - certificate revoked
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertRevoked;
+
+/// condition constant: X.509 certificate verification error - issuer certificate doesn't have a public key
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyNoIssuerPublicKey;
+
+/// condition constant: X.509 certificate verification error - path length constraint exceeded
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyPathLengthExceeded;
+
+/// condition constant: X.509 certificate verification error - unsupported certificate purpose
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyInvalidPurpose;
+
+/// condition constant: X.509 certificate verification error - certificate not trusted
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertUntrusted;
+
+/// condition constant: X.509 certificate verification error - certificate rejected
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCertRejected;
+
+/// condition constant: X.509 certificate verification error - subject issuer mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySubjectIssuerMismatch;
+
+/// condition constant: X.509 certificate verification error - authority and subject key identifier mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyAkidSkidMismatch;
+
+/// condition constant: X.509 certificate verification error - authority and issuer serial number mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyAkidIssuerSerialMismatch;
+
+/// condition constant: X.509 certificate verification error - key usage does not include certificate signing
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyKeyusageNoCertsign;
+
+/// condition constant: X.509 certificate verification error - unable to get CRL issuer certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnableToGetCRLIssuer;
+
+/// condition constant: X.509 certificate verification error - unhandled critical extension
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnhandledCriticalExtension;
+
+/// condition constant: X.509 certificate verification error - key usage does not include CRL signing
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyKeyusageNoCRLSign;
+
+/// condition constant: X.509 certificate verification error - unhandled critical CRL extension
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnhandledCriticalCRLExtension;
+
+/// condition constant: X.509 certificate verification error - invalid non-CA certificate (has CA markings)
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyInvalidNonCA;
+
+/// condition constant: X.509 certificate verification error - proxy path length constraint exceeded
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyProxyPathLengthExceeded;
+
+/// condition constant: X.509 certificate verification error - key usage does not include digital signature
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyKeyusageNoDigitalSignature;
+
+/// condition constant: X.509 certificate verification error - proxy certificates not allowed, please set the appropriate flag
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyProxyCertificatesNotAllowed;
+
+/// condition constant: X.509 certificate verification error - invalid or inconsistent certificate extension
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyInvalidExtension;
+
+/// condition constant: X.509 certificate verification error - invalid or inconsistent certificate policy extension
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyInvalidPolicyExtension;
+
+/// condition constant: X.509 certificate verification error - no explicit policy
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyNoExplicitPolicy;
+
+/// condition constant: X.509 certificate verification error - Different CRL scope
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyDifferentCRLScope;
+
+/// condition constant: X.509 certificate verification error - Unsupported extension feature
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnsupportedExtensionFeature;
+
+/// condition constant: X.509 certificate verification error - RFC 3779 resource not subset of parent's resources
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnnestedResource;
+
+/// condition constant: X.509 certificate verification error - permitted subtree violation
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyPermittedViolation;
+
+/// condition constant: X.509 certificate verification error - excluded subtree violation
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyExcludedViolation;
+
+/// condition constant: X.509 certificate verification error - name constraints minimum and maximum not supported
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySubtreeMinmax;
+
+/// condition constant: X.509 certificate verification error - application verification failure
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyApplicationVerification;
+
+/// condition constant: X.509 certificate verification error - unsupported name constraint type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnsupportedConstraintType;
+
+/// condition constant: X.509 certificate verification error - unsupported or invalid name constraint syntax
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnsupportedConstraintSyntax;
+
+/// condition constant: X.509 certificate verification error - unsupported or invalid name syntax
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnsupportedNameSyntax;
+
+/// condition constant: X.509 certificate verification error - CRL path validation error
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCRLPathValidationError;
+
+/// condition constant: X.509 certificate verification error - Path Loop
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyPathLoop;
+
+/// condition constant: X.509 certificate verification error - Suite B: certificate version invalid
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySuiteBInvalidVersion;
+
+/// condition constant: X.509 certificate verification error - Suite B: invalid public key algorithm
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySuiteBInvalidAlgorithm;
+
+/// condition constant: X.509 certificate verification error - Suite B: invalid ECC curve
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySuiteBInvalidCurve;
+
+/// condition constant: X.509 certificate verification error - Suite B: invalid signature algorithm
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySuiteBInvalidSignatureAlgorithm;
+
+/// condition constant: X.509 certificate verification error - Suite B: curve not allowed for this LOS
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySuiteBLosNotAllowed;
+
+/// condition constant: X.509 certificate verification error - Suite B: cannot sign P-384 with P-256
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySuiteBCannotSignP384WithP256;
+
+/// condition constant: X.509 certificate verification error - Hostname mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyHostnameMismatch;
+
+/// condition constant: X.509 certificate verification error - Email address mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyEmailMismatch;
+
+/// condition constant: X.509 certificate verification error - IP address mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyIPAddressMismatch;
+
+/// condition constant: X.509 certificate verification error - No matching DANE TLSA records
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyDANENoMatch;
+
+/// condition constant: X.509 certificate verification error - EE certificate key too weak
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyEEKeyTooSmall;
+
+/// condition constant: X.509 certificate verification error - CA certificate key too weak
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCAKeyTooSmall;
+
+/// condition constant: X.509 certificate verification error - CA signature digest algorithm too weak
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCAMDTooWeak;
+
+/// condition constant: X.509 certificate verification error - Invalid certificate verification context
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyInvalidCall;
+
+/// condition constant: X.509 certificate verification error - Issuer certificate lookup error
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyStoreLookup;
+
+/// condition constant: X.509 certificate verification error - Certificate Transparency required, but no valid SCTs found
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyNoValidSCTs;
+
+/// condition constant: X.509 certificate verification error - proxy subject name violation
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyProxySubjectNameViolation;
+
+/// condition constant: X.509 certificate verification error - OCSP verification needed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyOCSPVerifyNeeded;
+
+/// condition constant: X.509 certificate verification error - OCSP verification failed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyOCSPVerifyFailed;
+
+/// condition constant: X.509 certificate verification error - OCSP unknown cert
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyOCSPCertUnknown;
+
+/// condition constant: X.509 certificate verification error - Cannot find certificate signature algorithm
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyUnsupportedSignatureAlgorithm;
+
+/// condition constant: X.509 certificate verification error - subject signature algorithm and issuer public key algorithm mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySignatureAlgorithmMismatch;
+
+/// condition constant: X.509 certificate verification error - cert info siganature and signature algorithm mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySignatureAlgorithmInconsistency;
+
+/// condition constant: X.509 certificate verification error - invalid CA certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyInvalidCA;
+
+/// condition constant: X.509 certificate verification error - Path length invalid for non-CA cert
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyPathlenInvalidForNonCA;
+
+/// condition constant: X.509 certificate verification error - Path length given without key usage keyCertSign
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyPathlenWithoutKUKeyCertSign;
+
+/// condition constant: X.509 certificate verification error - Key usage keyCertSign invalid for non-CA cert
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyKUKeyCertSignInvalidForNonCA;
+
+/// condition constant: X.509 certificate verification error - Issuer name empty
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyIssuerNameEmpty;
+
+/// condition constant: X.509 certificate verification error - Subject name empty
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySubjectNameEmpty;
+
+/// condition constant: X.509 certificate verification error - Missing Authority Key Identifier
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyMissingAuthorityKeyIdentifier;
+
+/// condition constant: X.509 certificate verification error - Missing Subject Key Identifier
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyMissingSubjectKeyIdentifier;
+
+/// condition constant: X.509 certificate verification error - Empty Subject Alternative Name extension
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyEmptySubjectAltName;
+
+/// condition constant: X.509 certificate verification error - Basic Constraints of CA cert not marked critical
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyEmptySubjectSanNotCritical;
+
+/// condition constant: X.509 certificate verification error - Subject empty and Subject Alt Name extension not critical
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCABconsNotCritical;
+
+/// condition constant: X.509 certificate verification error - Authority Key Identifier marked critical
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyAuthorityKeyIdentifierCritical;
+
+/// condition constant: X.509 certificate verification error - Subject Key Identifier marked critical
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifySubjectKeyIdentifierCritical;
+
+/// condition constant: X.509 certificate verification error - CA cert does not include key usage extension
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyCACertMissingKeyUsage;
+
+/// condition constant: X.509 certificate verification error - Using cert extension requires at least X509v3
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyExtensionsRequireVersion3;
+
+/// condition constant: X.509 certificate verification error - Certificate public key has explicit ECC parameters
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_X509VerifyECKeyExplicitParams;
+
+// TLS errors and alerts. These use condition codes > DCMTLS_EC_SSL_Offset.
+
+/// condition constant: TLS error: app data in handshake
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAppDataInHandshake;
+
+/// condition constant: TLS error: no suitable key share
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSuitableKeyShare;
+
+/// condition constant: TLS error: bad dh value
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadDHValue;
+
+/// condition constant: TLS error: bad change cipher spec
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadChangeCipherSpec;
+
+/// condition constant: TLS error: inconsistent extms
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInconsistentExtms;
+
+/// condition constant: TLS error: bad hello request
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadHelloRequest;
+
+/// condition constant: TLS error: bad data returned by callback
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadDataReturnedByCallback;
+
+/// condition constant: TLS error: bad decompression
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadDecompression;
+
+/// condition constant: TLS error: bad key share
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadKeyShare;
+
+/// condition constant: TLS error: cannot change cipher
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCannotChangeCipher;
+
+/// condition constant: TLS error: bad extension
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadExtension;
+
+/// condition constant: TLS error: bad digest length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadDigestLength;
+
+/// condition constant: TLS error: missing sigalgs extension
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingSigalgsExtension;
+
+/// condition constant: TLS error: invalid configuration name
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidConfigurationName;
+
+/// condition constant: TLS error: bad psk identity
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadPSKIdentity;
+
+/// condition constant: TLS error: bad packet length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadPacketLength;
+
+/// condition constant: TLS error: bad protocol version number
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadProtocolVersionNumber;
+
+/// condition constant: TLS error: ssl command section empty
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLCommandSectionEmpty;
+
+/// condition constant: TLS error: no suitable signature algorithm
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSuitableSignatureAlgorithm;
+
+/// condition constant: TLS error: bad rsa encrypt
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadRSAEncrypt;
+
+/// condition constant: TLS error: invalid key update type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidKeyUpdateType;
+
+/// condition constant: TLS error: still in init
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSStillInInit;
+
+/// condition constant: TLS error: bad key update
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadKeyUpdate;
+
+/// condition constant: TLS error: bad signature
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadSignature;
+
+/// condition constant: TLS error: bad ssl filetype
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadSSLFiletype;
+
+/// condition constant: TLS error: ssl command section not found
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLCommandSectionNotFound;
+
+/// condition constant: TLS error: ssl section empty
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSectionEmpty;
+
+/// condition constant: TLS error: bad write retry
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadWriteRetry;
+
+/// condition constant: TLS error: bio not set
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBioNotSet;
+
+/// condition constant: TLS error: block cipher pad is wrong
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBlockCipherPadIsWrong;
+
+/// condition constant: TLS error: bn lib
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBNLib;
+
+/// condition constant: TLS error: ca dn length mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCADNLengthMismatch;
+
+/// condition constant: TLS error: too many key updates
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTooManyKeyUpdates;
+
+/// condition constant: TLS error: ccs received early
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCCSReceivedEarly;
+
+/// condition constant: TLS error: certificate verify failed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCertificateVerifyFailed;
+
+/// condition constant: TLS error: cert length mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCertLengthMismatch;
+
+/// condition constant: TLS error: ssl section not found
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSectionNotFound;
+
+/// condition constant: TLS error: cipher code wrong length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCipherCodeWrongLength;
+
+/// condition constant: TLS error: unknown command
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownCommand;
+
+/// condition constant: TLS error: compressed length too long
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCompressedLengthTooLong;
+
+/// condition constant: TLS error: compression failure
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCompressionFailure;
+
+/// condition constant: TLS error: compression library error
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCompressionLibraryError;
+
+/// condition constant: TLS error: at least TLS 1.0 needed in FIPS mode
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAtLeastTLS10NeededInFIPSMode;
+
+/// condition constant: TLS error: connection type not set
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSConnectionTypeNotSet;
+
+/// condition constant: TLS error: data between ccs and finished
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDataBetweenCCSAndFinished;
+
+/// condition constant: TLS error: data length too long
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDataLengthTooLong;
+
+/// condition constant: TLS error: decryption failed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDecryptionFailed;
+
+/// condition constant: TLS error: dh public value length is wrong
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDHPublicValueLengthIsWrong;
+
+/// condition constant: TLS error: digest check failed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDigestCheckFailed;
+
+/// condition constant: TLS error: encrypted length too long
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSEncryptedLengthTooLong;
+
+/// condition constant: TLS error: error in received cipher list
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSErrorInReceivedCipherList;
+
+/// condition constant: TLS error: excessive message size
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSExcessiveMessageSize;
+
+/// condition constant: TLS error: extra data in message
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSExtraDataInMessage;
+
+/// condition constant: TLS error: got a fin before a ccs
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSGotAFinBeforeACCS;
+
+/// condition constant: TLS error: https proxy request
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSHTTPSProxyRequest;
+
+/// condition constant: TLS error: http request
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSHTTPRequest;
+
+/// condition constant: TLS error: tls invalid ecpointformat list
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSInvalidECPointformatList;
+
+/// condition constant: TLS error: at least (D)TLS 1.2 needed in Suite B mode
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAtLeastTLS12NeededInSuiteBMode;
+
+/// condition constant: TLS error: length mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSLengthMismatch;
+
+/// condition constant: TLS error: length too short
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSLengthTooShort;
+
+/// condition constant: TLS error: library has no ciphers
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSLibraryHasNoCiphers;
+
+/// condition constant: TLS error: illegal point compression
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSIllegalPointCompression;
+
+/// condition constant: TLS error: ext length mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSExtLengthMismatch;
+
+/// condition constant: TLS error: too much early data
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTooMuchEarlyData;
+
+/// condition constant: TLS error: missing dsa signing cert
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingDSASigningCert;
+
+/// condition constant: TLS error: version too high
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSVersionTooHigh;
+
+/// condition constant: TLS error: context not dane enabled
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSContextNotDANEEnabled;
+
+/// condition constant: TLS error: missing rsa certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingRSACertificate;
+
+/// condition constant: TLS error: missing rsa encrypting cert
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingRSAEncryptingCert;
+
+/// condition constant: TLS error: missing rsa signing cert
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingRSASigningCert;
+
+/// condition constant: TLS error: missing tmp dh key
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingTmpDHKey;
+
+/// condition constant: TLS error: dane already enabled
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANEAlreadyEnabled;
+
+/// condition constant: TLS error: dane cannot override mtype full
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANECannotOverrideMtypeFull;
+
+/// condition constant: TLS error: invalid max early data
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidMaxEarlyData;
+
+/// condition constant: TLS error: dane not enabled
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANENotEnabled;
+
+/// condition constant: TLS error: no certificates returned
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCertificatesReturned;
+
+/// condition constant: TLS error: no certificate assigned
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCertificateAssigned;
+
+/// condition constant: TLS error: unexpected end of early data
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnexpectedEndOfEarlyData;
+
+/// condition constant: TLS error: no certificate set
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCertificateSet;
+
+/// condition constant: TLS error: dane tlsa bad certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadCertificate;
+
+/// condition constant: TLS error: no ciphers available
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCiphersAvailable;
+
+/// condition constant: TLS error: not on record boundary
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNotOnRecordBoundary;
+
+/// condition constant: TLS error: no ciphers specified
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCiphersSpecified;
+
+/// condition constant: TLS error: dane tlsa bad certificate usage
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadCertificateUsage;
+
+/// condition constant: TLS error: no cipher match
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCipherMatch;
+
+/// condition constant: TLS error: bad cipher
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadCipher;
+
+/// condition constant: TLS error: no compression specified
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCompressionSpecified;
+
+/// condition constant: TLS error: no method specified
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoMethodSpecified;
+
+/// condition constant: TLS error: dane tlsa bad data length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadDataLength;
+
+/// condition constant: TLS error: no private key assigned
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoPrivateKeyAssigned;
+
+/// condition constant: TLS error: no protocols available
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoProtocolsAvailable;
+
+/// condition constant: TLS error: dane tlsa bad digest length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadDigestLength;
+
+/// condition constant: TLS error: no shared cipher
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSharedCipher;
+
+/// condition constant: TLS error: exceeds max fragment size
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSExceedsMaxFragmentSize;
+
+/// condition constant: TLS error: null ssl ctx
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNullSSLCtx;
+
+/// condition constant: TLS error: null ssl method passed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNullSSLMethodPassed;
+
+/// condition constant: TLS error: old session cipher not returned
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSOldSessionCipherNotReturned;
+
+/// condition constant: TLS error: packet length too long
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPacketLengthTooLong;
+
+/// condition constant: TLS error: peer did not return a certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPeerDidNotReturnACertificate;
+
+/// condition constant: TLS error: dane tlsa bad matching type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadMatchingType;
+
+/// condition constant: TLS error: dane tlsa bad public key
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadPublicKey;
+
+/// condition constant: TLS error: dane tlsa bad selector
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSABadSelector;
+
+/// condition constant: TLS error: dane tlsa null data
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDANETLSANullData;
+
+/// condition constant: TLS error: error setting tlsa base domain
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSErrorSettingTLSABaseDomain;
+
+/// condition constant: TLS error: invalid alert
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidAlert;
+
+/// condition constant: TLS error: custom ext handler already installed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCustomExtHandlerAlreadyInstalled;
+
+/// condition constant: TLS error: protocol is shutdown
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSProtocolIsShutdown;
+
+/// condition constant: TLS error: sct verification failed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSCTVerificationFailed;
+
+/// condition constant: TLS error: missing supported groups extension
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingSupportedGroupsExtension;
+
+/// condition constant: TLS error: ssl session version mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSessionVersionMismatch;
+
+/// condition constant: TLS error: read bio not set
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSReadBioNotSet;
+
+/// condition constant: TLS error: invalid ct validation type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidCTValidationType;
+
+/// condition constant: TLS error: record length mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRecordLengthMismatch;
+
+/// condition constant: TLS error: no change following hrr
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoChangeFollowingHRR;
+
+/// condition constant: TLS error: required cipher missing
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRequiredCipherMissing;
+
+/// condition constant: TLS error: no valid scts
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoValidSCTs;
+
+/// condition constant: TLS error: unsolicited extension
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsolicitedExtension;
+
+/// condition constant: TLS error: ciphersuite digest has changed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCiphersuiteDigestHasChanged;
+
+/// condition constant: TLS error: bad psk
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadPSK;
+
+/// condition constant: TLS error: signature for non signing certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSignatureForNonSigningCertificate;
+
+/// condition constant: TLS error: missing signing cert
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingSigningCert;
+
+/// condition constant: TLS error: inconsistent early data alpn
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInconsistentEarlyDataAlpn;
+
+/// condition constant: TLS error: psk identity not found
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPSKIdentityNotFound;
+
+/// condition constant: TLS error: psk no client cb
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPSKNoClientCb;
+
+/// condition constant: TLS error: psk no server cb
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPSKNoServerCb;
+
+/// condition constant: TLS error: clienthello tlsext
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSClienthelloTlsext;
+
+/// condition constant: TLS error: parse tlsext
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSParseTlsext;
+
+/// condition constant: TLS error: ssl ctx has no default ssl version
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLCtxHasNoDefaultSSLVersion;
+
+/// condition constant: TLS error: ssl handshake failure
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLHandshakeFailure;
+
+/// condition constant: TLS error: ssl library has no ciphers
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLLibraryHasNoCiphers;
+
+/// condition constant: TLS error: inconsistent early data sni
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInconsistentEarlyDataSNI;
+
+/// condition constant: TLS error: ssl3 ext invalid max fragment length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSL3ExtInvalidMaxFragmentLength;
+
+/// condition constant: TLS error: bad early data
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadEarlyData;
+
+/// condition constant: TLS error: callback failed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCallbackFailed;
+
+/// condition constant: TLS error: no application protocol
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoApplicationProtocol;
+
+/// condition constant: TLS error: bad handshake state
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadHandshakeState;
+
+/// condition constant: TLS error: overflow error
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSOverflowError;
+
+/// condition constant: TLS error: invalid certificate or alg
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidCertificateOrAlg;
+
+/// condition constant: TLS error: unable to find public key parameters
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnableToFindPublicKeyParameters;
+
+/// condition constant: TLS error: bad packet
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadPacket;
+
+/// condition constant: TLS error: insufficient security
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInsufficientSecurity;
+
+/// condition constant: TLS error: unable to load ssl3 md5 routines
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnableToLoadSSL3MD5Routines;
+
+/// condition constant: TLS error: unable to load ssl3 sha1 routines
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnableToLoadSSL3SHA1Routines;
+
+/// condition constant: TLS error: unexpected message
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnexpectedMessage;
+
+/// condition constant: TLS error: unexpected record
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnexpectedRecord;
+
+/// condition constant: TLS error: unknown alert type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownAlertType;
+
+/// condition constant: TLS error: unknown certificate type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownCertificateType;
+
+/// condition constant: TLS error: unknown cipher returned
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownCipherReturned;
+
+/// condition constant: TLS error: unknown cipher type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownCipherType;
+
+/// condition constant: TLS error: unknown key exchange type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownKeyExchangeType;
+
+/// condition constant: TLS error: unknown pkey type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownPkeyType;
+
+/// condition constant: TLS error: unknown protocol
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownProtocol;
+
+/// condition constant: TLS error: binder does not verify
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBinderDoesNotVerify;
+
+/// condition constant: TLS error: unknown ssl version
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownSSLVersion;
+
+/// condition constant: TLS error: unknown state
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownState;
+
+/// condition constant: TLS error: missing fatal
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingFatal;
+
+/// condition constant: TLS error: unsupported compression algorithm
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsupportedCompressionAlgorithm;
+
+/// condition constant: TLS error: unsupported protocol
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsupportedProtocol;
+
+/// condition constant: TLS error: unsupported ssl version
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsupportedSSLVersion;
+
+/// condition constant: TLS error: invalid ccs message
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidCCSMessage;
+
+/// condition constant: TLS error: wrong cipher returned
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongCipherReturned;
+
+/// condition constant: TLS error: unexpected ccs message
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnexpectedCCSMessage;
+
+/// condition constant: TLS error: bad hrr version
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadHrrVersion;
+
+/// condition constant: TLS error: wrong signature length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongSignatureLength;
+
+/// condition constant: TLS error: wrong signature size
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongSignatureSize;
+
+/// condition constant: TLS error: wrong ssl version
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongSSLVersion;
+
+/// condition constant: TLS error: wrong version number
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongVersionNumber;
+
+/// condition constant: TLS error: x509 lib
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSX509Lib;
+
+/// condition constant: TLS error: x509 verification setup problems
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSX509VerificationSetupProblems;
+
+/// condition constant: TLS error: path too long
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPathTooLong;
+
+/// condition constant: TLS error: bad length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadLength;
+
+/// condition constant: TLS error: attempt to reuse session in different context
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSAttemptToReuseSessionInDifferentContext;
+
+/// condition constant: TLS error: ssl session id context too long
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSessionIDContextTooLong;
+
+/// condition constant: TLS error: library bug
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSLibraryBug;
+
+/// condition constant: TLS error: serverhello tlsext
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSServerhelloTlsext;
+
+/// condition constant: TLS error: uninitialized
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUninitialized;
+
+/// condition constant: TLS error: session id context uninitialized
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSessionIDContextUninitialized;
+
+/// condition constant: TLS error: post handshake auth encoding err
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPostHandshakeAuthEncodingErr;
+
+/// condition constant: TLS error: extension not received
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSExtensionNotReceived;
+
+/// condition constant: TLS error: invalid command
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidCommand;
+
+/// condition constant: TLS error: decryption failed or bad record mac
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDecryptionFailedOrBadRecordMac;
+
+/// condition constant: TLS error: invalid context
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidContext;
+
+/// condition constant: TLS error: invalid config
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidConfig;
+
+/// condition constant: TLS error: not server
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNotServer;
+
+/// condition constant: TLS error: request pending
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRequestPending;
+
+/// condition constant: TLS error: request sent
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRequestSent;
+
+/// condition constant: TLS error: no cookie callback set
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoCookieCallbackSet;
+
+/// condition constant: TLS error: private key mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPrivateKeyMismatch;
+
+/// condition constant: TLS error: not replacing certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNotReplacingCertificate;
+
+/// condition constant: TLS error: missing parameters
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingParameters;
+
+/// condition constant: TLS error: application data after close notify
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSApplicationDataAfterCloseNotify;
+
+/// condition constant: TLS error: bad legacy version
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadLegacyVersion;
+
+/// condition constant: TLS error: mixed handshake and non handshake data
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMixedHandshakeAndNonHandshakeData;
+
+/// condition constant: TLS error: unexpected eof while reading
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnexpectedEofWhileReading;
+
+/// condition constant: TLS error: no suitable groups
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSuitableGroups;
+
+/// condition constant: TLS error: copy parameters failed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCopyParametersFailed;
+
+/// condition constant: TLS error: no suitable digest algorithm
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSuitableDigestAlgorithm;
+
+/// condition constant: TLS error: record too small
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRecordTooSmall;
+
+/// condition constant: TLS error: cannot get group name
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCannotGetGroupName;
+
+/// condition constant: TLS error: ssl3 session id too long
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSL3SessionIDTooLong;
+
+/// condition constant: TLS error: ssl session id callback failed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSessionIDCallbackFailed;
+
+/// condition constant: TLS error: ssl session id conflict
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSessionIDConflict;
+
+/// condition constant: TLS error: ssl session id has bad length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSessionIDHasBadLength;
+
+/// condition constant: TLS error: bad ecc cert
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadECCCert;
+
+/// condition constant: TLS error: bad ecpoint
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadEcpoint;
+
+/// condition constant: TLS error: compression id not within private range
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCompressionIDNotWithinPrivateRange;
+
+/// condition constant: TLS error: cookie mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCookieMismatch;
+
+/// condition constant: TLS error: duplicate compression id
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDuplicateCompressionId;
+
+/// condition constant: TLS error: missing tmp ecdh key
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingTmpECDHKey;
+
+/// condition constant: TLS error: read timeout expired
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSReadTimeoutExpired;
+
+/// condition constant: TLS error: unable to find ecdh parameters
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnableToFindECDHParameters;
+
+/// condition constant: TLS error: unsupported elliptic curve
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsupportedEllipticCurve;
+
+/// condition constant: TLS error: ecc cert not for signing
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSECCCertNotForSigning;
+
+/// condition constant: TLS error: ssl3 ext invalid servername
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSL3ExtInvalidServername;
+
+/// condition constant: TLS error: ssl3 ext invalid servername type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSL3ExtInvalidServernameType;
+
+/// condition constant: TLS error: no required digest
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoRequiredDigest;
+
+/// condition constant: TLS error: invalid ticket keys length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidTicketKeysLength;
+
+/// condition constant: TLS error: invalid status response
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidStatusResponse;
+
+/// condition constant: TLS error: unsupported status type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsupportedStatusType;
+
+/// condition constant: TLS error: Peer haven't sent GOST certificate, required for selected ciphersuite
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoGostCertificateSentByPeer;
+
+/// condition constant: TLS error: no client cert method
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoClientCertMethod;
+
+/// condition constant: TLS error: bad handshake length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadHandshakeLength;
+
+/// condition constant: TLS error: dtls message too big
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDTLSMessageTooBig;
+
+/// condition constant: TLS error: renegotiate ext too long
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRenegotiateExtTooLong;
+
+/// condition constant: TLS error: renegotiation encoding err
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRenegotiationEncodingErr;
+
+/// condition constant: TLS error: renegotiation mismatch
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRenegotiationMismatch;
+
+/// condition constant: TLS error: unsafe legacy renegotiation disabled
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnsafeLegacyRenegotiationDisabled;
+
+/// condition constant: TLS error: no renegotiation
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoRenegotiation;
+
+/// condition constant: TLS error: inconsistent compression
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInconsistentCompression;
+
+/// condition constant: TLS error: invalid compression algorithm
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidCompressionAlgorithm;
+
+/// condition constant: TLS error: required compression algorithm missing
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSRequiredCompressionAlgorithmMissing;
+
+/// condition constant: TLS error: compression disabled
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCompressionDisabled;
+
+/// condition constant: TLS error: old session compression algorithm not returned
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSOldSessionCompressionAlgorithmNotReturned;
+
+/// condition constant: TLS error: scsv received when renegotiating
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSCSVReceivedWhenRenegotiating;
+
+/// condition constant: TLS error: bad srp a length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadSRPALength;
+
+/// condition constant: TLS error: bad srtp mki value
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadSrtpMkiValue;
+
+/// condition constant: TLS error: bad srtp protection profile list
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadSrtpProtectionProfileList;
+
+/// condition constant: TLS error: empty srtp protection profile list
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSEmptySrtpProtectionProfileList;
+
+/// condition constant: TLS error: invalid srp username
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidSrpUsername;
+
+/// condition constant: TLS error: can't find SRP server param
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingSrpParam;
+
+/// condition constant: TLS error: no srtp profiles
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSrtpProfiles;
+
+/// condition constant: TLS error: signature algorithms error
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSignatureAlgorithmsError;
+
+/// condition constant: TLS error: error with the srp params
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSrpACalc;
+
+/// condition constant: TLS error: srtp could not allocate profiles
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSrtpCouldNotAllocateProfiles;
+
+/// condition constant: TLS error: srtp protection profile list too long
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSrtpProtectionProfileListTooLong;
+
+/// condition constant: TLS error: srtp unknown protection profile
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSrtpUnknownProtectionProfile;
+
+/// condition constant: TLS error: tls illegal exporter label
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSIllegalExporterLabel;
+
+/// condition constant: TLS error: unknown digest
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownDigest;
+
+/// condition constant: TLS error: use srtp not negotiated
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUseSrtpNotNegotiated;
+
+/// condition constant: TLS error: wrong signature type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongSignatureType;
+
+/// condition constant: TLS error: bad srp parameters
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadSrpParameters;
+
+/// condition constant: TLS error: ssl negative length
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLNegativeLength;
+
+/// condition constant: TLS error: inappropriate fallback
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInappropriateFallback;
+
+/// condition constant: TLS error: ecdh required for suiteb mode
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSECDHRequiredForSuiteBMode;
+
+/// condition constant: TLS error: no shared signature algorithms
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSharedSignatureAlgorithms;
+
+/// condition constant: TLS error: cert cb error
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCertCbError;
+
+/// condition constant: TLS error: wrong curve
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongCurve;
+
+/// condition constant: TLS error: illegal Suite B digest
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSIllegalSuiteBDigest;
+
+/// condition constant: TLS error: missing ecdsa signing cert
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSMissingECDSASigningCert;
+
+/// condition constant: TLS error: wrong certificate type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSWrongCertificateType;
+
+/// condition constant: TLS error: bad value
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadValue;
+
+/// condition constant: TLS error: invalid null cmd name
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidNullCmdName;
+
+/// condition constant: TLS error: unknown cmd name
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSUnknownCmdName;
+
+/// condition constant: TLS error: invalid serverinfo data
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidServerinfoData;
+
+/// condition constant: TLS error: no pem extensions
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoPEMExtensions;
+
+/// condition constant: TLS error: bad data
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadData;
+
+/// condition constant: TLS error: pem name bad prefix
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPEMNameBadPrefix;
+
+/// condition constant: TLS error: pem name too short
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPEMNameTooShort;
+
+/// condition constant: TLS error: dh key too small
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSDHKeyTooSmall;
+
+/// condition constant: TLS error: version too low
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSVersionTooLow;
+
+/// condition constant: TLS error: ca key too small
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCAKeyTooSmall;
+
+/// condition constant: TLS error: ca md too weak
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCAMDTooWeak;
+
+/// condition constant: TLS error: ee key too small
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSEeKeyTooSmall;
+
+/// condition constant: TLS error: cookie gen callback failure
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSCookieGenCallbackFailure;
+
+/// condition constant: TLS error: fragmented client hello
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSFragmentedClientHello;
+
+/// condition constant: TLS error: invalid sequence number
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidSequenceNumber;
+
+/// condition constant: TLS error: no verify cookie callback
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoVerifyCookieCallback;
+
+/// condition constant: TLS error: length too long
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSLengthTooLong;
+
+/// condition constant: TLS error: failed to init async
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSFailedToInitAsync;
+
+/// condition constant: TLS error: pipeline failure
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSPipelineFailure;
+
+/// condition constant: TLS error: shutdown while in init
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSShutdownWhileInInit;
+
+/// condition constant: TLS error: ssl session id too long
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLSessionIDTooLong;
+
+/// condition constant: TLS error: too many warn alerts
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTooManyWarnAlerts;
+
+/// condition constant: TLS error: no shared groups
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSNoSharedGroups;
+
+/// condition constant: TLS error: bad record type
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSBadRecordType;
+
+/// condition constant: TLS error: invalid session id
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSInvalidSessionId;
+
+/// condition constant: TLS alert: unexpected message
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertUnexpectedMessage;
+
+/// condition constant: TLS alert: bad record mac
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertBadRecordMac;
+
+/// condition constant: TLS alert: decryption failed
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertDecryptionFailed;
+
+/// condition constant: TLS alert: record overflow
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertRecordOverflow;
+
+/// condition constant: TLS alert: decompression failure
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertDecompressionFailure;
+
+/// condition constant: TLS alert: handshake failure
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertHandshakeFailure;
+
+/// condition constant: TLS alert: no certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertNoCertificate;
+
+/// condition constant: TLS alert: bad certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertBadCertificate;
+
+/// condition constant: TLS alert: unsupported certificate
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertUnsupportedCertificate;
+
+/// condition constant: TLS alert: certificate revoked
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertCertificateRevoked;
+
+/// condition constant: TLS alert: certificate expired
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertCertificateExpired;
+
+/// condition constant: TLS alert: certificate unknown
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertCertificateUnknown;
+
+/// condition constant: TLS alert: illegal parameter
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSSSLv3AlertIllegalParameter;
+
+/// condition constant: TLS alert: unknown ca,
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertUnknownCa;
+
+/// condition constant: TLS alert: access denied
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertAccessDenied;
+
+/// condition constant: TLS alert: decode error,
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertDecodeError;
+
+/// condition constant: TLS alert: decrypt error
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertDecryptError;
+
+/// condition constant: TLS alert: export restriction
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertExportRestriction;
+
+/// condition constant: TLS alert: protocol version
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertProtocolVersion;
+
+/// condition constant: TLS alert: insufficient security
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertInsufficientSecurity;
+
+/// condition constant: TLS alert: internal error
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertInternalError;
+
+/// condition constant: TLS alert: inappropriate fallback
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertInappropriateFallback;
+
+/// condition constant: TLS alert: user cancelled
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertUserCancelled;
+
+/// condition constant: TLS alert: no renegotiation
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1AlertNoRenegotiation;
+
+/// condition constant: TLS alert: missing extension
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv13AlertMissingExtension;
+
+/// condition constant: TLS error: unsupported extension
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1UnsupportedExtension;
+
+/// condition constant: TLS error: certificate unobtainable
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1CertificateUnobtainable;
+
+/// condition constant: TLS error: unrecognized name
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1UnrecognizedName;
+
+/// condition constant: TLS error: bad certificate status response
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1BadCertificateStatusResponse;
+
+/// condition constant: TLS error: bad certificate hash value
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv1BadCertificateHashValue;
+
+/// condition constant: TLS alert: certificate required
+extern DCMTK_DCMTLS_EXPORT const OFConditionConst DCMTLS_EC_TLSTLSv13AlertCertificateRequired;
+
 #endif // TLSCOND_H
index 8984ae2b44e14adf5f2be61c3c758630c1e63862..6781575df93181ef393df910dbf2850d79428e42 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2019, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -190,16 +190,16 @@ public:
   /** loads the private key used for authentication of this application from a file.
    *  @param fileName path to the private key file
    *  @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  DcmTransportLayerStatus setPrivateKeyFile(const char *fileName, DcmKeyFileFormat fileType);
+  OFCondition setPrivateKeyFile(const char *fileName, DcmKeyFileFormat fileType);
 
   /** loads the certificate (public key) used for authentication of this application from a file.
    *  @param fileName path to the certificate file
    *  @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  DcmTransportLayerStatus setCertificateFile(const char *fileName, DcmKeyFileFormat fileType);
+  OFCondition setCertificateFile(const char *fileName, DcmKeyFileFormat fileType);
 
   /** checks if the private key and the certificate set using setPrivateKeyFile()
    *  and setCertificateFile() match, i.e. if they establish a private/public key pair.
@@ -210,24 +210,40 @@ public:
   /** loads a certificate from a file and adds it to the pool of trusted certificates.
    *  @param fileName path to the certificate file
    *  @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  DcmTransportLayerStatus addTrustedCertificateFile(const char *fileName, DcmKeyFileFormat fileType);
+  OFCondition addTrustedCertificateFile(const char *fileName, DcmKeyFileFormat fileType);
 
   /** loads all files as certificates from the specified directory and adds them
    *  to the pool of trusted certificates.
    *  @param fileName path to the directory containing certificate files
    *  @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  DcmTransportLayerStatus addTrustedCertificateDir(const char *pathName, DcmKeyFileFormat fileType);
+  OFCondition addTrustedCertificateDir(const char *pathName, DcmKeyFileFormat fileType);
+
+  /** loads a certificate revocation list (CRL) in X.509 format from a file and
+   *  adds it to the pool of trusted certificates and CRLs.
+   *  @param fileName path to the CRL file
+   *  @param filetype file format: X509_FILETYPE_PEM or X509_FILETYPE_ASN1
+   *  @return EC_Normal if successful, an error code otherwise
+   */
+  OFCondition addCertificateRevocationList(const char *fileName, DcmKeyFileFormat fileType);
+
+  /** set the verification mode for certificate revocation lists.
+   *  When enabled, a CRL is expected to be present either for the leaf
+   *  certificate, or for the entire certificate chain,
+   *  and certificate verification will fail if no CRL is found.
+   *  @param crlmode CRL verification mode
+   */
+  OFCondition setCRLverification(DcmTLSCRLVerification crlmode);
 
   /** loads certificates from a file and adds them to the pool of trusted client
    *  certificates.
    *  @param fileName path to the certificate file
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  DcmTransportLayerStatus addTrustedClientCertificateFile(const char *fileName);
+  OFCondition addTrustedClientCertificateFile(const char *fileName);
 
   /** appends the given verification flags to the existing ones in this OpenSSL context
    *  (using binary or).
@@ -235,17 +251,33 @@ public:
    *    therefore, these semantics were guessed based on looking at the OpenSSL source
    *    code!
    *  @param flags the verification flags to append, e. g. X509_V_FLAG_CRL_CHECK.
-   *  @return TCS_ok if the flags were appended to the existing ones, TCS_unspecifiedError
-   *    if OpenSSL returns an (unspecified, since the documentation is missing) error.
+   *  @return EC_Normal if the flags were appended to the existing ones, an error code otherwise.
    */
-  DcmTransportLayerStatus addVerificationFlags(unsigned long flags);
+  OFCondition addVerificationFlags(unsigned long flags);
+
+  /** loads a certificate or certificate chain from a file and checks whether
+   *  it can be verified against the current settings of the trust store.
+   *  @param fileName path to the certificate file
+   *  @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1
+   *  @return EC_Normal if verification succeeded, an error code otherwise
+   */
+  OFCondition verifyClientCertificate(const char *fileName, DcmKeyFileFormat fileType);
+
+  /** loads a certificate file and checks whether it is a
+   *  valid (e.g. non-expired), self-signed root certificate that
+   *  can be verified against itself
+   *  @param fileName path to the certificate file
+   *  @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1
+   *  @return EC_Normal if certificate is a root certificate, an error code otherwise
+   */
+  static OFCondition isRootCertificate(const char *fileName, DcmKeyFileFormat fileType);
 
   /** replace the current list of ciphersuites by the list of ciphersuites
    *  for the given profile.
    *  @param profile TLS Security Profile
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  DcmTransportLayerStatus setTLSProfile(DcmTLSSecurityProfile profile);
+  OFCondition setTLSProfile(DcmTLSSecurityProfile profile);
 
   /** clear the current list of ciphersuites. Equivalent to
    *  calling setTLSProfile(TSP_Profile_None).
@@ -256,16 +288,16 @@ public:
    *  It is the responsibility of the user to ensure that the added ciphersuite
    *  does not break the rules of the selected profile. Use with care!
    *  @param suite TLS ciphersuite name, in the official TLS name form.
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  DcmTransportLayerStatus addCipherSuite(const char *suite);
+  OFCondition addCipherSuite(const char *suite);
 
   /** activate the current list of ciphersuites by transferring to the OpenSSL layer
    *  This method needs to be called once after the list of ciphersuites has been
    *  defined used setTLSProfile() and addCipherSuite().
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  DcmTransportLayerStatus activateCipherSuites();
+  OFCondition activateCipherSuites();
 
   /** sets the list of ciphersuites to negotiate, in OpenSSL syntax.
    *  @note This method is deprecated because it breaks the encapsulation of the
@@ -278,9 +310,9 @@ public:
    *    The list must be in OpenSSL syntax (use findOpenSSLCipherSuiteName to convert
    *    from RFC 2246 ciphersuite names to OpenSSL names), with ciphersuites separated
    *    by ':' characters.
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  DcmTransportLayerStatus setCipherSuites(const char *suites);
+  OFCondition setCipherSuites(const char *suites);
 
   /** checks if enough entropy data is available to write back a modified
    *  random seed file.
@@ -307,7 +339,7 @@ public:
   /** modifies the PRNG by adding random data from the given buffer
    *  to the PRNG state.
    *  @param buf pointer to buffer containing random data
-   *  @bufSize number of bytes in buffer
+   *  @param bufSize number of bytes in buffer
    */
   void addPRNGseed(void *buf, size_t bufSize);
 
@@ -330,6 +362,12 @@ public:
    */
   void setPrivateKeyPasswdFromConsole();
 
+  /** loads the hard-coded set of Diffie-Hellman parameters from memory.
+   *  These parameters are required for DH, DHE or DSS ciphersuites.
+   *  @return OFTrue if successful, OFFalse otherwise.
+   */
+  OFBool setBuiltInDHParameters();
+
   /** loads a set of Diffie-Hellman parameters from file.
    *  These parameters are required for DH, DHE or DSS ciphersuites.
    *  @param filename path to the DH parameter file
@@ -376,12 +414,28 @@ public:
 
   /** load an X.509 certificate from file.
    *  @param fileName path to the certificate file
-   *  @param fileType, must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1
+   *  @param fileType must be SSL_FILETYPE_PEM or SSL_FILETYPE_ASN1
    *  @return pointer to X509 object if successful, NULL otherwise.
    *    The X509 object must be freed by the caller.
    */
   static X509 *loadCertificateFile(const char *fileName, DcmKeyFileFormat fileType);
 
+  /** convert an error code as returned by the OpenSSL functions ERR_get_error(),
+   *  ERR_peek_error() and ERR_peek_last_error() into an OFCondition error code.
+   *  @param errorCode OpenSSL error code
+   *  @param logAsError if true, write the error description to the logger with severity ERROR
+   *  @return OFCondition object
+   */
+  static OFCondition convertOpenSSLError(unsigned long errorCode, OFBool logAsError);
+
+  /** convert an error code as returned by the OpenSSL function X509_STORE_CTX_get_error()
+   *  into an OFCondition error code.
+   *  @param errorCode OpenSSL error code
+   *  @param logAsError if true, write the error description to the logger with severity ERROR
+   *  @return OFCondition object
+   */
+  static OFCondition convertOpenSSLX509VerificationError(int errorCode, OFBool logAsError);
+
   /** returns a string in OpenSSL syntax that contains the currently defined
    *  list of TLS ciphersuites.
    *  @param cslist The list of ciphersuites in OpenSSL syntax is written to this string.
index 4a9403af661724a69488c65459edea4442dcf625..ee97113c16eb8a192e1c40d4cad409074af0a638 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017-2019, OFFIS e.V.
+ *  Copyright (C) 2017-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -110,9 +110,25 @@ public:
      */
     DcmTransportLayer *getTransportLayer();
 
+    /** loads a certificate or certificate chain from a file and checks whether
+     *  it can be verified against the current settings of the trust store.
+     *  @param fileName path to the certificate file
+     *  @return EC_Normal if verification succeeded, an error code otherwise
+     */
+    OFCondition verifyClientCertificate(const char *fileName);
+
+    /** loads a certificate file and checks whether it is a
+     *  valid (e.g. non-expired), self-signed root certificate that
+     *  can be verified against itself
+     *  @param fileName path to the certificate file
+     *  @return EC_Normal if certificate is a root certificate, an error code otherwise
+     */
+    OFCondition isRootCertificate(const char *fileName);
+
     /** checks if the command line option --list-ciphers was given.
      *  In this case the list of supported TLS ciphersuites should be
      *  printed to stdout and the application should terminate.
+     *  @param cmd the command line that was used
      *  @return true if --list-ciphers option was found, false otherwise.
      */
     static OFBool listOfCiphersRequested(OFCommandLine& cmd);
index bb482e7cd52f14501d214c049c8c6435a2607bf1..1098f980316ea163743d5a5e24438a7a3efc71f2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2010-2019, OFFIS e.V.
+ *  Copyright (C) 2010-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -114,18 +114,18 @@ public:
   /** replace the current list of ciphersuites by the list of ciphersuites
    *  for the given profile. Caller must ensure that initNetwork() is executed before this call.
    *  @param profile TLS Security Profile
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  virtual DcmTransportLayerStatus setTLSProfile(DcmTLSSecurityProfile profile);
+  virtual OFCondition setTLSProfile(DcmTLSSecurityProfile profile);
 
   /** adds a ciphersuite to the list of ciphersuites for TLS negotiation.
    *  Caller must ensure that initNetwork() is executed before this call.
    *  It is the responsibility of the user to ensure that the added ciphersuite
    *  does not break the rules of the selected profile. Use with care!
    *  @param suite TLS ciphersuite name, in the official TLS name form.
-   *  @return TCS_ok if successful, an error code otherwise
+   *  @return EC_Normal if successful, an error code otherwise
    */
-  virtual DcmTransportLayerStatus addCipherSuite(const OFString& suite);
+  virtual OFCondition addCipherSuite(const OFString& suite);
 
   /** Set file to be used as random seed for initializing the Pseudo Random
    *  Number Generator (PRNG)
index f8182a8d68ec078640eb61fe5f64836b947619a1..42f31200193d8afd0dbaced8bd987bf2db537ce8 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -59,24 +59,24 @@ public:
   /** performs server side handshake on established socket.
    *  This function is used to establish a secure transport connection
    *  over the established TCP connection.
-   *  @return TCS_ok if successful, an error code otherwise.
+   *  @return EC_Normal if successful, an error code otherwise.
    */
-  virtual DcmTransportLayerStatus serverSideHandshake();
+  virtual OFCondition serverSideHandshake();
 
   /** performs client side handshake on established socket.
    *  This function is used to establish a secure transport connection
    *  over the established TCP connection.
-   *  @return TCS_ok if successful, an error code otherwise.
+   *  @return EC_Normal if successful, an error code otherwise.
    */
-  virtual DcmTransportLayerStatus clientSideHandshake();
+  virtual OFCondition clientSideHandshake();
 
   /** performs a re-negotiation of the connection with different
    *  connection parameters. Used to change the parameters of the
    *  secure transport connection.
    *  @param newSuite string identifying the ciphersuite to be negotiated.
-   *  @return TCS_ok if successful, an error code otherwise.
+   *  @return EC_Normal if successful, an error code otherwise.
    */
-  virtual DcmTransportLayerStatus renegotiate(const char *newSuite);
+  virtual OFCondition renegotiate(const char *newSuite);
 
   /** attempts to read nbyte bytes from the transport connection and
    *  writes them into the given buffer.
@@ -100,6 +100,12 @@ public:
    */
   virtual void close();
 
+  /** Closes the transport connection directly. If a secure connection
+   *  is used, a closure alert is NOT sent before the connection
+   *  is closed.
+   */
+  virtual void closeTransportConnection();
+
   /** returns the size in bytes of the peer certificate of a secure connection.
    *  @return peer certificate length in bytes
    */
@@ -132,12 +138,6 @@ public:
    */
   virtual OFString& dumpConnectionParameters(OFString& str);
 
-  /** returns an error string for a given error code.
-   *  @param code error code
-   *  @return description for error code
-   */
-  virtual const char *errorString(DcmTransportLayerStatus code);
-
 private:
 
   /// private undefined copy constructor
@@ -152,8 +152,6 @@ private:
   /// pointer to the TLS connection structure used by the OpenSSL library
   SSL *tlsConnection;
 
-  /// last error code returned by the OpenSSL library
-  unsigned long lastError;
 };
 
 #endif /* WITH_OPENSSL */
index 3e824abc60996a414b0fa937df393ccfeed13dc1..704e1991b2fe1dd2a7b41810765d9c234a1a3879 100644 (file)
@@ -1,5 +1,13 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmtls tlscond tlslayer tlsopt tlstrans tlsscu tlsciphr)
+DCMTK_ADD_LIBRARY(dcmtls
+  tlscond.cc
+  tlslayer.cc
+  tlsopt.cc
+  tlstrans.cc
+  tlsscu.cc
+  tlsciphr.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmtls ofstd dcmdata dcmnet)
 DCMTK_TARGET_LINK_LIBRARIES(dcmtls ${OPENSSL_LIBS})
+set_property(TARGET dcmtls PROPERTY OUTPUT_NAME "dcmtls${DCMTK_TLS_LIBRARY_POSTFIX}")
index 3788d465bb0419b32ab5b60032ae5b3b7e78fd44..f70587791a17df46851868a7f89288995171b203 100644 (file)
@@ -1,31 +1,30 @@
 tlsciphr.o: tlsciphr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmtls/tlsciphr.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
  ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofvector.h \
- ../include/dcmtk/dcmtls/tlsdefin.h \
+ ../include/dcmtk/dcmtls/tlsdefin.h ../include/dcmtk/dcmtls/tlscond.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
+ ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
+ ../include/dcmtk/dcmtls/tlslayer.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
- ../include/dcmtk/dcmtls/tlslayer.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
- ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -57,13 +56,13 @@ tlsciphr.o: tlsciphr.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h
 tlscond.o: tlscond.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmtls/tlscond.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
@@ -92,7 +91,6 @@ tlslayer.o: tlslayer.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -124,18 +122,22 @@ tlslayer.o: tlslayer.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcuserid.h \
  ../include/dcmtk/dcmtls/tlsdefin.h ../include/dcmtk/dcmtls/tlsciphr.h \
+ ../include/dcmtk/dcmtls/tlscond.h \
+ ../../ofstd/include/dcmtk/ofstd/ofdiag.h \
  ../include/dcmtk/dcmtls/tlstrans.h \
- ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h
+ ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \
+ ../../ofstd/include/dcmtk/ofstd/ofrand.h \
+ ../../ofstd/include/dcmtk/ofstd/diag/constexp.def
 tlsopt.o: tlsopt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/dcmtls/tlsopt.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmtls/tlslayer.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
@@ -151,7 +153,6 @@ tlsopt.o: tlsopt.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -198,13 +199,13 @@ tlsscu.o: tlsscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../include/dcmtk/dcmtls/tlsscu.h ../../dcmnet/include/dcmtk/dcmnet/scu.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctk.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
  ../../oflog/include/dcmtk/oflog/config.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../oflog/include/dcmtk/oflog/config/defines.h \
  ../../oflog/include/dcmtk/oflog/helpers/threadcf.h \
  ../../oflog/include/dcmtk/oflog/loglevel.h \
@@ -317,7 +318,6 @@ tlsscu.o: tlsscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmnet/include/dcmtk/dcmnet/lst.h \
  ../../dcmnet/include/dcmtk/dcmnet/dul.h \
  ../../dcmnet/include/dcmtk/dcmnet/extneg.h \
@@ -332,35 +332,37 @@ tlsscu.o: tlsscu.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
  ../include/dcmtk/dcmtls/tlstrans.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \
+ ../include/dcmtk/dcmtls/tlslayer.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
- ../include/dcmtk/dcmtls/tlslayer.h ../include/dcmtk/dcmtls/tlsciphr.h \
- ../../dcmnet/include/dcmtk/dcmnet/diutil.h
+ ../include/dcmtk/dcmtls/tlsciphr.h \
+ ../../dcmnet/include/dcmtk/dcmnet/diutil.h \
+ ../include/dcmtk/dcmtls/tlscond.h
 tlstrans.o: tlstrans.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../ofstd/include/dcmtk/ofstd/ofcast.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
  ../../ofstd/include/dcmtk/ofstd/ofexport.h \
+ ../../ofstd/include/dcmtk/ofstd/oftypes.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/dcmtls/tlstrans.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmtrans.h \
+ ../../ofstd/include/dcmtk/ofstd/ofcond.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstring.h \
  ../../ofstd/include/dcmtk/ofstd/ofglobal.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
- ../../ofstd/include/dcmtk/ofstd/oftypes.h \
- ../../ofstd/include/dcmtk/ofstd/ofstream.h \
- ../../ofstd/include/dcmtk/ofstd/ofstring.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
+ ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
+ ../include/dcmtk/dcmtls/tlsdefin.h ../include/dcmtk/dcmtls/tlslayer.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcmlayer.h \
  ../../ofstd/include/dcmtk/ofstd/ofutil.h \
  ../../ofstd/include/dcmtk/ofstd/oftraits.h \
  ../../ofstd/include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
- ../../dcmnet/include/dcmtk/dcmnet/dntypes.h \
- ../include/dcmtk/dcmtls/tlsdefin.h ../include/dcmtk/dcmtls/tlslayer.h \
  ../../dcmnet/include/dcmtk/dcmnet/assoc.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcerror.h \
- ../../ofstd/include/dcmtk/ofstd/ofcond.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
@@ -409,4 +411,5 @@ tlstrans.o: tlstrans.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcstack.h \
  ../../dcmdata/include/dcmtk/dcmdata/dclist.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcpcache.h \
- ../../dcmnet/include/dcmtk/dcmnet/dimse.h
+ ../../dcmnet/include/dcmtk/dcmnet/dimse.h \
+ ../include/dcmtk/dcmtls/tlscond.h
index 0d5238f3c9a2c5b9ff3b9431601ac8738b7f12cc..4729fd5178ea01763dc45fb0fef54afc54e31ffc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2018-2019, OFFIS e.V.
+ *  Copyright (C) 2018-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -23,6 +23,7 @@
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 #include "dcmtk/dcmtls/tlsciphr.h"
 #include "dcmtk/dcmtls/tlsdefin.h"
+#include "dcmtk/dcmtls/tlscond.h"
 #include "dcmtk/dcmtls/tlslayer.h"    /* for TLS_ERROR macro */
 
 #ifdef WITH_OPENSSL
@@ -32,7 +33,7 @@ BEGIN_EXTERN_C
 #include <openssl/tls1.h>
 END_EXTERN_C
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#ifndef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CIPHERS
 #define SSL_CTX_get_ciphers(ctx) (ctx)->cipher_list
 #endif
 
@@ -125,7 +126,8 @@ static const DcmCipherSuiteList globalCipherSuiteList[] =
     {"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA",            TLS1_TXT_ECDHE_RSA_WITH_AES_256_CBC_SHA,         TPV_SSLv3,  TKE_ECDH,       TCA_RSA,    TCE_AES,      TCM_SHA1,   256, 256},
     {"TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384",       TLS1_TXT_ECDHE_ECDSA_WITH_AES_256_SHA384,        TPV_TLSv12, TKE_ECDH,       TCA_ECDSA,  TCE_AES,      TCM_SHA384, 256, 256},
     {"TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384",         TLS1_TXT_ECDHE_RSA_WITH_AES_256_SHA384,          TPV_TLSv12, TKE_ECDH,       TCA_RSA,    TCE_AES,      TCM_SHA384, 256, 256},
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+
+#ifdef HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305
     /* OpenSSL 1.1.0 supports the ChaCha20-Poly1305 ciphersuites defined in RFC 7905 */
     {"TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256", TLS1_TXT_ECDHE_ECDSA_WITH_CHACHA20_POLY1305,     TPV_TLSv12, TKE_ECDH,       TCA_ECDSA,  TCE_ChaCha20, TCM_AEAD,   256, 256},
     {"TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256",   TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305,       TPV_TLSv12, TKE_ECDH,       TCA_RSA,    TCE_ChaCha20, TCM_AEAD,   256, 256},
@@ -140,7 +142,7 @@ static const DcmCipherSuiteList globalCipherSuiteList[] =
     {"TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA",         TLS1_TXT_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA,      TPV_SSLv3,  TKE_DH,         TCA_RSA,    TCE_Camellia, TCM_SHA1,   256, 256},
     {"TLS_DHE_DSS_WITH_AES_256_CBC_SHA256",           TLS1_TXT_DHE_DSS_WITH_AES_256_SHA256,            TPV_TLSv12, TKE_DH,         TCA_DSS,    TCE_AES,      TCM_SHA256, 256, 256},
     {"TLS_DHE_RSA_WITH_AES_256_CBC_SHA256",           TLS1_TXT_DHE_RSA_WITH_AES_256_SHA256,            TPV_TLSv12, TKE_DH,         TCA_RSA,    TCE_AES,      TCM_SHA256, 256, 256},
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
+#ifdef HAVE_OPENSSL_PROTOTYPE_TLS1_TXT_ECDHE_RSA_WITH_CHACHA20_POLY1305
     /* OpenSSL 1.1.0 supports the ChaCha20-Poly1305 ciphersuites defined in RFC 7905 */
     {"TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256",     TLS1_TXT_DHE_RSA_WITH_CHACHA20_POLY1305,         TPV_TLSv12, TKE_DH,         TCA_RSA,    TCE_ChaCha20, TCM_AEAD,   256, 256},
 #endif
@@ -173,7 +175,7 @@ void DcmTLSCiphersuiteHandler::determineSupportedCiphers()
   size_t numEntries = GLOBAL_NUM_CIPHERSUITES;
   for (size_t i = 0; i < numEntries; i++) ciphersuiteSupported[i] = OFFalse;
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#ifndef HAVE_OPENSSL_PROTOTYPE_TLS_METHOD
   SSL_CTX *ctx = SSL_CTX_new(SSLv23_method());
 #else
   SSL_CTX *ctx = SSL_CTX_new(TLS_method());
@@ -211,17 +213,17 @@ void DcmTLSCiphersuiteHandler::determineSupportedCiphers()
 }
 
 
-DcmTransportLayerStatus DcmTLSCiphersuiteHandler::addRequiredCipherSuite(const char *name)
+OFCondition DcmTLSCiphersuiteHandler::addRequiredCipherSuite(const char *name)
 {
-  if (NULL == name) return TCS_illegalCall;
+  if (NULL == name) return EC_IllegalCall;
   size_t idx = lookupCiphersuite(name);
   if (idx < GLOBAL_NUM_CIPHERSUITES) ciphersuiteList.push_back(idx);
   else
   {
      DCMTLS_FATAL("Ciphersuite '" << name << "' not supported by the OpenSSL library used to compile this application.");
-     return TCS_tlsError;
+     return DCMTLS_EC_UnknownCiphersuite(name);
   }
-  return TCS_ok;
+  return EC_Normal;
 }
 
 
@@ -238,10 +240,10 @@ void DcmTLSCiphersuiteHandler::addOptional3DESCipherSuite()
 }
 
 
-DcmTransportLayerStatus DcmTLSCiphersuiteHandler::setTLSProfile(DcmTLSSecurityProfile profile)
+OFCondition DcmTLSCiphersuiteHandler::setTLSProfile(DcmTLSSecurityProfile profile)
 {
   currentProfile = profile;
-  DcmTransportLayerStatus result = TCS_ok;
+  OFCondition result = EC_Normal;
 
   switch (profile)
   {
@@ -252,66 +254,66 @@ DcmTransportLayerStatus DcmTLSCiphersuiteHandler::setTLSProfile(DcmTLSSecurityPr
     case TSP_Profile_Basic:
       tls13_enabled = OFFalse;
       result = addRequiredCipherSuite("TLS_RSA_WITH_3DES_EDE_CBC_SHA");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       break;
     case TSP_Profile_AES:
       tls13_enabled = OFFalse;
       result = addRequiredCipherSuite("TLS_RSA_WITH_AES_128_CBC_SHA");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       addOptional3DESCipherSuite();
       break;
     case TSP_Profile_BCP195:
       tls13_enabled = OFTrue;
       // recommended ciphersuites as defined in the DICOM profile, plus backwards compatibility
       result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       result = addRequiredCipherSuite("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       result = addRequiredCipherSuite("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       result = addRequiredCipherSuite("TLS_RSA_WITH_AES_128_CBC_SHA");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       addOptional3DESCipherSuite();
       break;
     case TSP_Profile_BCP195_ND:
       tls13_enabled = OFTrue;
       // required ciphersuites as defined in the DICOM profile
       result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       result = addRequiredCipherSuite("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       result = addRequiredCipherSuite("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       break;
     case TSP_Profile_BCP195_Extended:
       tls13_enabled = OFFalse;
       // required ciphersuites as defined in the DICOM profile
       result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       result = addRequiredCipherSuite("TLS_DHE_RSA_WITH_AES_128_GCM_SHA256");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       result = addRequiredCipherSuite("TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       result = addRequiredCipherSuite("TLS_DHE_RSA_WITH_AES_256_GCM_SHA384");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       result = addRequiredCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       result = addRequiredCipherSuite("TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       break;
     case TSP_Profile_IHE_ATNA_Unencrypted:
       tls13_enabled = OFFalse;
       result = addRequiredCipherSuite("TLS_RSA_WITH_NULL_SHA");
-      if (TCS_ok != result) return result;
+      if (result.bad()) return result;
       break;
     // we don't want a default case here
   }
 
-  return TCS_ok;
+  return EC_Normal;
 }
 
 void DcmTLSCiphersuiteHandler::clearTLSProfile()
@@ -321,7 +323,7 @@ void DcmTLSCiphersuiteHandler::clearTLSProfile()
   ciphersuiteList.clear();
 }
 
-DcmTransportLayerStatus DcmTLSCiphersuiteHandler::addCipherSuite(const char *suite)
+OFCondition DcmTLSCiphersuiteHandler::addCipherSuite(const char *suite)
 {
   // first look up the index for the TLS ciphersuite name,
   // then look up the OpenSSL ciphersuite name based on this index.
@@ -332,7 +334,7 @@ DcmTransportLayerStatus DcmTLSCiphersuiteHandler::addCipherSuite(const char *sui
        {
       // user has selected a ciphersuite not supported by the OpenSSL version we are using
       DCMTLS_FATAL("Ciphersuite '" << suite << "' not supported by the OpenSSL library used to compile this application.");
-      return TCS_tlsError;
+      return DCMTLS_EC_UnknownCiphersuite(suite);
     }
 
     size_t keySize = 0;
@@ -350,7 +352,7 @@ DcmTransportLayerStatus DcmTLSCiphersuiteHandler::addCipherSuite(const char *sui
         if (keySize == 0)
         {
           DCMTLS_FATAL("Unencrypted ciphersuite '" << suite << "' not permitted with security profile '" << lookupProfileName(currentProfile) << "'");
-          return TCS_tlsError;
+          return DCMTLS_EC_CiphersuiteNotAllowed;
         }
         if (TKE_RSA == getCipherSuiteKeyExchange(idx))
         {
@@ -364,7 +366,7 @@ DcmTransportLayerStatus DcmTLSCiphersuiteHandler::addCipherSuite(const char *sui
 
       case TSP_Profile_BCP195_Extended:
         DCMTLS_FATAL("Additional ciphersuites not permitted with security profile '" << lookupProfileName(currentProfile) << "'");
-        return TCS_tlsError;
+        return DCMTLS_EC_CiphersuiteNotAllowed;
         break;
 
       case TSP_Profile_None:
@@ -374,10 +376,10 @@ DcmTransportLayerStatus DcmTLSCiphersuiteHandler::addCipherSuite(const char *sui
     }
 
     ciphersuiteList.push_back(idx);
-    return TCS_ok;
+    return EC_Normal;
   }
   // invalid/unknown cipher suite name
-  return TCS_illegalCall;
+  return EC_IllegalCall;
 }
 
 // Static helper function for the qsort() call in
@@ -575,7 +577,7 @@ OFBool DcmTLSCiphersuiteHandler::isTLS13Enabled() const
 long DcmTLSCiphersuiteHandler::getTLSOptions() const
 {
   long result = 0;
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
+#ifndef HAVE_OPENSSL_PROTOTYPE_TLS_METHOD
   // When compiling with OpenSSL 1.1.0, SSL support is disabled in DcmTLSTransportLayer anyway.
   // For older OpenSSL versions we explicitly disable them here.
   result |= SSL_OP_NO_SSLv2;
index c404393f8ef2c509b8d88264b4378f1cae661081..df68b949e88c03d48d40c33fb7694569aa4bbf56 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017, OFFIS e.V.
+ *  Copyright (C) 2017-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -13,7 +13,7 @@
  *
  *  Module:  dcmtls
  *
- *  Author:  Jan Schlamelcher
+ *  Author:  Jan Schlamelcher, Marco Eichelberg
  *
  *  Purpose: error conditions for DcmTLS
  *
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/dcmtls/tlscond.h"
 
+#ifdef WITH_OPENSSL
+BEGIN_EXTERN_C
+#include <openssl/x509_vfy.h>
+#include <openssl/err.h>
+#include <openssl/ssl.h>
+END_EXTERN_C
+#endif
+
 // instantiation of pure generic error codes
 
-makeOFConditionConst( DCMTLS_EC_FailedToCreateTLSTransportLayer,    OFM_dcmtls, 1, OF_error, "Unable to create TLS transport layer" );
-makeOFConditionConst( DCMTLS_EC_FailedToSetCiphersuites,            OFM_dcmtls, 2, OF_error, "Unable to set selected cipher suites" );
+makeOFConditionConst( DCMTLS_EC_FailedToCreateTLSTransportLayer,      OFM_dcmtls,  1, OF_error, "Unable to create TLS transport layer" );
+makeOFConditionConst( DCMTLS_EC_FailedToSetCiphersuites,              OFM_dcmtls,  2, OF_error, "Unable to set selected cipher suites" );
+// error codes 3..8 are used by the specializable error codes defined below
+makeOFConditionConst( DCMTLS_EC_NoTLSTransportConnectionPresent,      OFM_dcmtls,  9, OF_error, "TLS function called but no TLS transport connection present" );
+makeOFConditionConst( DCMTLS_EC_CiphersuiteNotAllowed,                OFM_dcmtls, 10, OF_error, "Ciphersuite not allowed in current DICOM security profile" );
+makeOFConditionConst( DCMTLS_EC_TLSReadOperationDidNotComplete,       OFM_dcmtls, 11, OF_error, "TLS read operation did not complete (SSL_ERROR_WANT_READ)" );
+makeOFConditionConst( DCMTLS_EC_TLSWriteOperationDidNotComplete,      OFM_dcmtls, 12, OF_error, "TLS write operation did not complete (SSL_ERROR_WANT_WRITE)" );
+makeOFConditionConst( DCMTLS_EC_TLSX509LookupOperationDidNotComplete, OFM_dcmtls, 13, OF_error, "TLS X.509 lookup operation did not complete (SSL_ERROR_WANT_X509_LOOKUP)" );
+makeOFConditionConst( DCMTLS_EC_TLSConnectionClosedByPeer,            OFM_dcmtls, 14, OF_error, "TLS connection closed by peer (SSL_ERROR_ZERO_RETURN)" );
+makeOFConditionConst( DCMTLS_EC_TLSConnectOperationDidNotComplete,    OFM_dcmtls, 15, OF_error, "TLS connect operation did not complete (SSL_ERROR_WANT_CONNECT)" );
+makeOFConditionConst( DCMTLS_EC_TLSAcceptOperationDidNotComplete,     OFM_dcmtls, 16, OF_error, "TLS accept operation did not complete (SSL_ERROR_WANT_ACCEPT)" );
+makeOFConditionConst( DCMTLS_EC_TLSAsyncOperationDidNotComplete,      OFM_dcmtls, 17, OF_error, "TLS operation did not complete because an asynchronous engine is still processing data (SSL_ERROR_WANT_ASYNC)" );
+makeOFConditionConst( DCMTLS_EC_TLSAsyncJobCouldNotBeStarted,         OFM_dcmtls, 18, OF_error, "TLS asynchronous job could not be started (SSL_ERROR_WANT_ASYNC_JOB)" );
+makeOFConditionConst( DCMTLS_EC_TLSClientHelloCallbackNeeded,         OFM_dcmtls, 19, OF_error, "TLS client hello callback needed (SSL_ERROR_WANT_CLIENT_HELLO_CB)" );
+makeOFConditionConst( DCMTLS_EC_OtherSSLError,                        OFM_dcmtls, 20, OF_error, "Other TLS error (unknown SSL_ERROR code)" );
+makeOFConditionConst( DCMTLS_EC_FailedToSetVerificationMode,          OFM_dcmtls, 21, OF_error, "Setting of the X.509 verification mode failed" );
+makeOFConditionConst( DCMTLS_EC_CertStoreCtxInitFailed,               OFM_dcmtls, 22, OF_error, "Certificate store context initialization failed" );
+makeOFConditionConst( DCMTLS_EC_OpenSSLIOError,                       OFM_dcmtls, 23, OF_error, "OpenSSL I/O error (SSL_ERROR_SYSCALL)" );
 
 // implementation of specializable error codes
 
@@ -137,6 +161,39 @@ OFCondition DcmTLSECFailedToWriteRandomSeedFileConst::operator()( const char* se
     return cond;
 }
 
+DcmTLSECGenericOpenSSLError::DcmTLSECGenericOpenSSLError()
+{
+    theModule = OFM_dcmtls;
+    theCode = 8;
+    theStatus = OF_error;
+    theText = "OpenSSL error";
+}
+
+OFCondition DcmTLSECGenericOpenSSLError::operator()(unsigned long errorCode) const
+{
+#ifdef WITH_OPENSSL
+    const char *ls = ERR_lib_error_string(errorCode);
+    if (ls == NULL) ls = "unknown library";
+
+    const char *rs = ERR_reason_error_string(errorCode);
+    if (rs == NULL) rs = "unknown error";
+#else
+    const char *ls = "unknown library";
+    const char *rs = "unknown error";
+#endif
+
+    OFOStringStream os;
+    os << theText << " "
+       << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(8) << errorCode
+       << ": " << ls << ": " << rs;
+
+    OFCondition cond;
+    OFSTRINGSTREAM_GETSTR( os, c )
+    cond = makeOFCondition( theModule, theCode, theStatus, c );
+    OFSTRINGSTREAM_FREESTR( c )
+    return cond;
+}
+
 // instantiation of specializable error codes
 
 const DcmTLSECUnknownCiphersuiteConst DCMTLS_EC_UnknownCiphersuite;
@@ -144,3 +201,2087 @@ const DcmTLSECFailedToLoadPrivateKeyConst DCMTLS_EC_FailedToLoadPrivateKey;
 const DcmTLSECFailedToLoadCertificateConst DCMTLS_EC_FailedToLoadCertificate;
 const DcmTLSECMismatchedPrivateKeyAndCertificateConst DCMTLS_EC_MismatchedPrivateKeyAndCertificate;
 const DcmTLSECFailedToWriteRandomSeedFileConst DCMTLS_EC_FailedToWriteRandomSeedFile;
+const DcmTLSECGenericOpenSSLError DCMTLS_EC_GenericOpenSSLError;
+
+// define all constants that may be missing.
+
+// the following defines are present in OpenSSL 1.0.1
+
+#ifndef X509_V_ERR_UNSPECIFIED
+#define X509_V_ERR_UNSPECIFIED                          1
+#endif
+#ifndef X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT
+#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT            2
+#endif
+#ifndef X509_V_ERR_UNABLE_TO_GET_CRL
+#define X509_V_ERR_UNABLE_TO_GET_CRL                    3
+#endif
+#ifndef X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE
+#define X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE     4
+#endif
+#ifndef X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE
+#define X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE      5
+#endif
+#ifndef X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY
+#define X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY   6
+#endif
+#ifndef X509_V_ERR_CERT_SIGNATURE_FAILURE
+#define X509_V_ERR_CERT_SIGNATURE_FAILURE               7
+#endif
+#ifndef X509_V_ERR_CRL_SIGNATURE_FAILURE
+#define X509_V_ERR_CRL_SIGNATURE_FAILURE                8
+#endif
+#ifndef X509_V_ERR_CERT_NOT_YET_VALID
+#define X509_V_ERR_CERT_NOT_YET_VALID                   9
+#endif
+#ifndef X509_V_ERR_CERT_HAS_EXPIRED
+#define X509_V_ERR_CERT_HAS_EXPIRED                     10
+#endif
+#ifndef X509_V_ERR_CRL_NOT_YET_VALID
+#define X509_V_ERR_CRL_NOT_YET_VALID                    11
+#endif
+#ifndef X509_V_ERR_CRL_HAS_EXPIRED
+#define X509_V_ERR_CRL_HAS_EXPIRED                      12
+#endif
+#ifndef X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD
+#define X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD       13
+#endif
+#ifndef X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD
+#define X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD        14
+#endif
+#ifndef X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD
+#define X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD       15
+#endif
+#ifndef X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD
+#define X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD       16
+#endif
+#ifndef X509_V_ERR_OUT_OF_MEM
+#define X509_V_ERR_OUT_OF_MEM                           17
+#endif
+#ifndef X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT
+#define X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT          18
+#endif
+#ifndef X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN
+#define X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN            19
+#endif
+#ifndef X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY
+#define X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY    20
+#endif
+#ifndef X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE
+#define X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE      21
+#endif
+#ifndef X509_V_ERR_CERT_CHAIN_TOO_LONG
+#define X509_V_ERR_CERT_CHAIN_TOO_LONG                  22
+#endif
+#ifndef X509_V_ERR_CERT_REVOKED
+#define X509_V_ERR_CERT_REVOKED                         23
+#endif
+#ifndef X509_V_ERR_INVALID_CA
+#define X509_V_ERR_INVALID_CA                           24
+#endif
+#ifndef X509_V_ERR_PATH_LENGTH_EXCEEDED
+#define X509_V_ERR_PATH_LENGTH_EXCEEDED                 25
+#endif
+#ifndef X509_V_ERR_INVALID_PURPOSE
+#define X509_V_ERR_INVALID_PURPOSE                      26
+#endif
+#ifndef X509_V_ERR_CERT_UNTRUSTED
+#define X509_V_ERR_CERT_UNTRUSTED                       27
+#endif
+#ifndef X509_V_ERR_CERT_REJECTED
+#define X509_V_ERR_CERT_REJECTED                        28
+#endif
+#ifndef X509_V_ERR_SUBJECT_ISSUER_MISMATCH
+#define X509_V_ERR_SUBJECT_ISSUER_MISMATCH              29
+#endif
+#ifndef X509_V_ERR_AKID_SKID_MISMATCH
+#define X509_V_ERR_AKID_SKID_MISMATCH                   30
+#endif
+#ifndef X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH
+#define X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH          31
+#endif
+#ifndef X509_V_ERR_KEYUSAGE_NO_CERTSIGN
+#define X509_V_ERR_KEYUSAGE_NO_CERTSIGN                 32
+#endif
+#ifndef X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER
+#define X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER             33
+#endif
+#ifndef X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION
+#define X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION         34
+#endif
+#ifndef X509_V_ERR_KEYUSAGE_NO_CRL_SIGN
+#define X509_V_ERR_KEYUSAGE_NO_CRL_SIGN                 35
+#endif
+#ifndef X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION
+#define X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION     36
+#endif
+#ifndef X509_V_ERR_INVALID_NON_CA
+#define X509_V_ERR_INVALID_NON_CA                       37
+#endif
+#ifndef X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED
+#define X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED           38
+#endif
+#ifndef X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE
+#define X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE        39
+#endif
+#ifndef X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED
+#define X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED       40
+#endif
+#ifndef X509_V_ERR_INVALID_EXTENSION
+#define X509_V_ERR_INVALID_EXTENSION                    41
+#endif
+#ifndef X509_V_ERR_INVALID_POLICY_EXTENSION
+#define X509_V_ERR_INVALID_POLICY_EXTENSION             42
+#endif
+#ifndef X509_V_ERR_NO_EXPLICIT_POLICY
+#define X509_V_ERR_NO_EXPLICIT_POLICY                   43
+#endif
+#ifndef X509_V_ERR_DIFFERENT_CRL_SCOPE
+#define X509_V_ERR_DIFFERENT_CRL_SCOPE                  44
+#endif
+#ifndef X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE
+#define X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE        45
+#endif
+#ifndef X509_V_ERR_UNNESTED_RESOURCE
+#define X509_V_ERR_UNNESTED_RESOURCE                    46
+#endif
+#ifndef X509_V_ERR_PERMITTED_VIOLATION
+#define X509_V_ERR_PERMITTED_VIOLATION                  47
+#endif
+#ifndef X509_V_ERR_EXCLUDED_VIOLATION
+#define X509_V_ERR_EXCLUDED_VIOLATION                   48
+#endif
+#ifndef X509_V_ERR_SUBTREE_MINMAX
+#define X509_V_ERR_SUBTREE_MINMAX                       49
+#endif
+#ifndef X509_V_ERR_APPLICATION_VERIFICATION
+#define X509_V_ERR_APPLICATION_VERIFICATION             50
+#endif
+#ifndef X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE
+#define X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE          51
+#endif
+#ifndef X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX
+#define X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX        52
+#endif
+#ifndef X509_V_ERR_UNSUPPORTED_NAME_SYNTAX
+#define X509_V_ERR_UNSUPPORTED_NAME_SYNTAX              53
+#endif
+#ifndef X509_V_ERR_CRL_PATH_VALIDATION_ERROR
+#define X509_V_ERR_CRL_PATH_VALIDATION_ERROR            54
+#endif
+#ifndef X509_V_ERR_SUITE_B_INVALID_VERSION
+#define X509_V_ERR_SUITE_B_INVALID_VERSION              56
+#endif
+#ifndef X509_V_ERR_SUITE_B_INVALID_ALGORITHM
+#define X509_V_ERR_SUITE_B_INVALID_ALGORITHM            57
+#endif
+#ifndef X509_V_ERR_SUITE_B_INVALID_CURVE
+#define X509_V_ERR_SUITE_B_INVALID_CURVE                58
+#endif
+#ifndef X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM
+#define X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM  59
+#endif
+#ifndef X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED
+#define X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED              60
+#endif
+#ifndef X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256
+#define X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 61
+#endif
+#ifndef X509_V_ERR_HOSTNAME_MISMATCH
+#define X509_V_ERR_HOSTNAME_MISMATCH                    62
+#endif
+#ifndef X509_V_ERR_EMAIL_MISMATCH
+#define X509_V_ERR_EMAIL_MISMATCH                       63
+#endif
+#ifndef X509_V_ERR_IP_ADDRESS_MISMATCH
+#define X509_V_ERR_IP_ADDRESS_MISMATCH                  64
+#endif
+#ifndef X509_V_ERR_INVALID_CALL
+#define X509_V_ERR_INVALID_CALL                         65
+#endif
+#ifndef X509_V_ERR_STORE_LOOKUP
+#define X509_V_ERR_STORE_LOOKUP                         66
+#endif
+#ifndef X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION
+#define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION         67
+#endif
+
+// the following defines were added in OpenSSL 1.0.2
+
+#ifndef X509_V_ERR_PATH_LOOP
+#define X509_V_ERR_PATH_LOOP                            55
+#endif
+#ifndef X509_V_ERR_SUITE_B_INVALID_VERSION
+#define X509_V_ERR_SUITE_B_INVALID_VERSION              56
+#endif
+#ifndef X509_V_ERR_SUITE_B_INVALID_ALGORITHM
+#define X509_V_ERR_SUITE_B_INVALID_ALGORITHM            57
+#endif
+#ifndef X509_V_ERR_SUITE_B_INVALID_CURVE
+#define X509_V_ERR_SUITE_B_INVALID_CURVE                58
+#endif
+#ifndef X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM
+#define X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM  59
+#endif
+#ifndef X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED
+#define X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED              60
+#endif
+#ifndef X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256
+#define X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256 61
+#endif
+#ifndef X509_V_ERR_HOSTNAME_MISMATCH
+#define X509_V_ERR_HOSTNAME_MISMATCH                    62
+#endif
+#ifndef X509_V_ERR_EMAIL_MISMATCH
+#define X509_V_ERR_EMAIL_MISMATCH                       63
+#endif
+#ifndef X509_V_ERR_IP_ADDRESS_MISMATCH
+#define X509_V_ERR_IP_ADDRESS_MISMATCH                  64
+#endif
+#ifndef X509_V_ERR_DANE_NO_MATCH
+#define X509_V_ERR_DANE_NO_MATCH                        65
+#endif
+#ifndef X509_V_ERR_EE_KEY_TOO_SMALL
+#define X509_V_ERR_EE_KEY_TOO_SMALL                     66
+#endif
+#ifndef X509_V_ERR_CA_KEY_TOO_SMALL
+#define X509_V_ERR_CA_KEY_TOO_SMALL                     67
+#endif
+
+// the following defines were added in OpenSSL 1.1.0
+
+#ifndef X509_V_ERR_PATH_LOOP
+#define X509_V_ERR_PATH_LOOP                            55
+#endif
+#ifndef X509_V_ERR_DANE_NO_MATCH
+#define X509_V_ERR_DANE_NO_MATCH                        65
+#endif
+#ifndef X509_V_ERR_EE_KEY_TOO_SMALL
+#define X509_V_ERR_EE_KEY_TOO_SMALL                     66
+#endif
+#ifndef X509_V_ERR_CA_KEY_TOO_SMALL
+#define X509_V_ERR_CA_KEY_TOO_SMALL                     67
+#endif
+
+// the following defines were added in OpenSSL 1.1.1
+
+#ifndef X509_V_ERR_CA_MD_TOO_WEAK
+#define X509_V_ERR_CA_MD_TOO_WEAK                       68
+#endif
+#ifndef X509_V_ERR_INVALID_CALL
+#define X509_V_ERR_INVALID_CALL                         69
+#endif
+#ifndef X509_V_ERR_STORE_LOOKUP
+#define X509_V_ERR_STORE_LOOKUP                         70
+#endif
+#ifndef X509_V_ERR_NO_VALID_SCTS
+#define X509_V_ERR_NO_VALID_SCTS                        71
+#endif
+#ifndef X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION
+#define X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION         72
+#endif
+#ifndef X509_V_ERR_OCSP_VERIFY_NEEDED
+#define X509_V_ERR_OCSP_VERIFY_NEEDED                   73
+#endif
+#ifndef X509_V_ERR_OCSP_VERIFY_FAILED
+#define X509_V_ERR_OCSP_VERIFY_FAILED                   74
+#endif
+#ifndef X509_V_ERR_OCSP_CERT_UNKNOWN
+#define X509_V_ERR_OCSP_CERT_UNKNOWN                    75
+#endif
+#ifndef X509_V_ERR_INVALID_CA
+#define X509_V_ERR_INVALID_CA                           79
+#endif
+
+// the following defines were added in OpenSSL 3.0.0
+
+#ifndef X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM
+#define X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM      76
+#endif
+#ifndef X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH
+#define X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH         77
+#endif
+#ifndef X509_V_ERR_SIGNATURE_ALGORITHM_INCONSISTENCY
+#define X509_V_ERR_SIGNATURE_ALGORITHM_INCONSISTENCY    78
+#endif
+#ifndef X509_V_ERR_PATHLEN_INVALID_FOR_NON_CA
+#define X509_V_ERR_PATHLEN_INVALID_FOR_NON_CA           80
+#endif
+#ifndef X509_V_ERR_PATHLEN_WITHOUT_KU_KEY_CERT_SIGN
+#define X509_V_ERR_PATHLEN_WITHOUT_KU_KEY_CERT_SIGN     81
+#endif
+#ifndef X509_V_ERR_KU_KEY_CERT_SIGN_INVALID_FOR_NON_CA
+#define X509_V_ERR_KU_KEY_CERT_SIGN_INVALID_FOR_NON_CA  82
+#endif
+#ifndef X509_V_ERR_ISSUER_NAME_EMPTY
+#define X509_V_ERR_ISSUER_NAME_EMPTY                    83
+#endif
+#ifndef X509_V_ERR_SUBJECT_NAME_EMPTY
+#define X509_V_ERR_SUBJECT_NAME_EMPTY                   84
+#endif
+#ifndef X509_V_ERR_MISSING_AUTHORITY_KEY_IDENTIFIER
+#define X509_V_ERR_MISSING_AUTHORITY_KEY_IDENTIFIER     85
+#endif
+#ifndef X509_V_ERR_MISSING_SUBJECT_KEY_IDENTIFIER
+#define X509_V_ERR_MISSING_SUBJECT_KEY_IDENTIFIER       86
+#endif
+#ifndef X509_V_ERR_EMPTY_SUBJECT_ALT_NAME
+#define X509_V_ERR_EMPTY_SUBJECT_ALT_NAME               87
+#endif
+#ifndef X509_V_ERR_EMPTY_SUBJECT_SAN_NOT_CRITICAL
+#define X509_V_ERR_EMPTY_SUBJECT_SAN_NOT_CRITICAL       88
+#endif
+#ifndef X509_V_ERR_CA_BCONS_NOT_CRITICAL
+#define X509_V_ERR_CA_BCONS_NOT_CRITICAL                89
+#endif
+#ifndef X509_V_ERR_AUTHORITY_KEY_IDENTIFIER_CRITICAL
+#define X509_V_ERR_AUTHORITY_KEY_IDENTIFIER_CRITICAL    90
+#endif
+#ifndef X509_V_ERR_SUBJECT_KEY_IDENTIFIER_CRITICAL
+#define X509_V_ERR_SUBJECT_KEY_IDENTIFIER_CRITICAL      91
+#endif
+#ifndef X509_V_ERR_CA_CERT_MISSING_KEY_USAGE
+#define X509_V_ERR_CA_CERT_MISSING_KEY_USAGE            92
+#endif
+#ifndef X509_V_ERR_EXTENSIONS_REQUIRE_VERSION_3
+#define X509_V_ERR_EXTENSIONS_REQUIRE_VERSION_3         93
+#endif
+#ifndef X509_V_ERR_EC_KEY_EXPLICIT_PARAMS
+#define X509_V_ERR_EC_KEY_EXPLICIT_PARAMS               94
+#endif
+
+// OpenSSL 1.x defines X509_V_ERR_INVALID_CA as 24 and does not define X509_V_ERR_NO_ISSUER_PUBLIC_KEY.
+// OpenSSL 3.x defines X509_V_ERR_INVALID_CA as 79 and X509_V_ERR_NO_ISSUER_PUBLIC_KEY as 24.
+// Since we're using the values defined in OpenSSL's header files when possible, this should work
+// in both cases.
+#ifndef X509_V_ERR_NO_ISSUER_PUBLIC_KEY
+#define X509_V_ERR_NO_ISSUER_PUBLIC_KEY                 24
+#endif
+
+// X.509 certificate verification errors use condition codes > DCMTLS_EC_X509Verify_Offset.
+
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnspecified,                     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNSPECIFIED,                          OF_error, "X.509 certificate verification error - unspecified" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToGetIssuerCert,           OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT,            OF_error, "X.509 certificate verification error - unable to get issuer certificate" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToGetCRL,                  OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_GET_CRL,                    OF_error, "X.509 certificate verification error - unable to get certificate CRL" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToDecryptCertSignature,    OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_DECRYPT_CERT_SIGNATURE,     OF_error, "X.509 certificate verification error - unable to decrypt certificate's signature" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToDecryptCRLSignature,     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_DECRYPT_CRL_SIGNATURE,      OF_error, "X.509 certificate verification error - unable to decrypt CRL's signature" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToDecodeIssuerPublicKey,   OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY,   OF_error, "X.509 certificate verification error - unable to decode issuer public key" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCertSignatureFailure,            OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_SIGNATURE_FAILURE,               OF_error, "X.509 certificate verification error - certificate signature failure" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCRLSignatureFailure,             OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CRL_SIGNATURE_FAILURE,                OF_error, "X.509 certificate verification error - CRL signature failure" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCertNotYetValid,                 OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_NOT_YET_VALID,                   OF_error, "X.509 certificate verification error - certificate is not yet valid" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCertHasExpired,                  OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_HAS_EXPIRED,                     OF_error, "X.509 certificate verification error - certificate has expired" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCRLNotYetValid,                  OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CRL_NOT_YET_VALID,                    OF_error, "X.509 certificate verification error - CRL is not yet valid" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCRLHasExpired,                   OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CRL_HAS_EXPIRED,                      OF_error, "X.509 certificate verification error - CRL has expired" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyErrorInCertNotBeforeField,       OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD,       OF_error, "X.509 certificate verification error - format error in certificate's notBefore field" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyErrorInCertNotAfterField,        OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD,        OF_error, "X.509 certificate verification error - format error in certificate's notAfter field" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyErrorInCRLLastUpdateField,       OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_ERROR_IN_CRL_LAST_UPDATE_FIELD,       OF_error, "X.509 certificate verification error - format error in CRL's lastUpdate field" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyErrorInCRLNextUpdateField,       OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_ERROR_IN_CRL_NEXT_UPDATE_FIELD,       OF_error, "X.509 certificate verification error - format error in CRL's nextUpdate field" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyOutOfMem,                        OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_OUT_OF_MEM,                           OF_error, "X.509 certificate verification error - out of memory" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyDepthZeroSelfSignedCert,         OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT,          OF_error, "X.509 certificate verification error - self signed certificate" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySelfSignedCertInChain,           OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN,            OF_error, "X.509 certificate verification error - self signed certificate in certificate chain" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToGetIssuerCertLocally,    OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY,    OF_error, "X.509 certificate verification error - unable to get local issuer certificate" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToVerifyLeafSignature,     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_VERIFY_LEAF_SIGNATURE,      OF_error, "X.509 certificate verification error - unable to verify the first certificate" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCertChainTooLong,                OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_CHAIN_TOO_LONG,                  OF_error, "X.509 certificate verification error - certificate chain too long" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCertRevoked,                     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_REVOKED,                         OF_error, "X.509 certificate verification error - certificate revoked" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyNoIssuerPublicKey,               OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_NO_ISSUER_PUBLIC_KEY,                 OF_error, "X.509 certificate verification error - issuer certificate doesn't have a public key" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyPathLengthExceeded,              OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PATH_LENGTH_EXCEEDED,                 OF_error, "X.509 certificate verification error - path length constraint exceeded" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyInvalidPurpose,                  OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_INVALID_PURPOSE,                      OF_error, "X.509 certificate verification error - unsupported certificate purpose" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCertUntrusted,                   OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_UNTRUSTED,                       OF_error, "X.509 certificate verification error - certificate not trusted" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCertRejected,                    OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CERT_REJECTED,                        OF_error, "X.509 certificate verification error - certificate rejected" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySubjectIssuerMismatch,           OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUBJECT_ISSUER_MISMATCH,              OF_error, "X.509 certificate verification error - subject issuer mismatch" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyAkidSkidMismatch,                OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_AKID_SKID_MISMATCH,                   OF_error, "X.509 certificate verification error - authority and subject key identifier mismatch" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyAkidIssuerSerialMismatch,        OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_AKID_ISSUER_SERIAL_MISMATCH,          OF_error, "X.509 certificate verification error - authority and issuer serial number mismatch" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyKeyusageNoCertsign,              OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_KEYUSAGE_NO_CERTSIGN,                 OF_error, "X.509 certificate verification error - key usage does not include certificate signing" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnableToGetCRLIssuer,            OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNABLE_TO_GET_CRL_ISSUER,             OF_error, "X.509 certificate verification error - unable to get CRL issuer certificate" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnhandledCriticalExtension,      OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNHANDLED_CRITICAL_EXTENSION,         OF_error, "X.509 certificate verification error - unhandled critical extension" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyKeyusageNoCRLSign,               OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_KEYUSAGE_NO_CRL_SIGN,                 OF_error, "X.509 certificate verification error - key usage does not include CRL signing" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnhandledCriticalCRLExtension,   OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNHANDLED_CRITICAL_CRL_EXTENSION,     OF_error, "X.509 certificate verification error - unhandled critical CRL extension" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyInvalidNonCA,                    OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_INVALID_NON_CA,                       OF_error, "X.509 certificate verification error - invalid non-CA certificate (has CA markings)" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyProxyPathLengthExceeded,         OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PROXY_PATH_LENGTH_EXCEEDED,           OF_error, "X.509 certificate verification error - proxy path length constraint exceeded" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyKeyusageNoDigitalSignature,      OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_KEYUSAGE_NO_DIGITAL_SIGNATURE,        OF_error, "X.509 certificate verification error - key usage does not include digital signature" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyProxyCertificatesNotAllowed,     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PROXY_CERTIFICATES_NOT_ALLOWED,       OF_error, "X.509 certificate verification error - proxy certificates not allowed, please set the appropriate flag" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyInvalidExtension,                OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_INVALID_EXTENSION,                    OF_error, "X.509 certificate verification error - invalid or inconsistent certificate extension" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyInvalidPolicyExtension,          OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_INVALID_POLICY_EXTENSION,             OF_error, "X.509 certificate verification error - invalid or inconsistent certificate policy extension" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyNoExplicitPolicy,                OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_NO_EXPLICIT_POLICY,                   OF_error, "X.509 certificate verification error - no explicit policy" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyDifferentCRLScope,               OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_DIFFERENT_CRL_SCOPE,                  OF_error, "X.509 certificate verification error - Different CRL scope" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnsupportedExtensionFeature,     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNSUPPORTED_EXTENSION_FEATURE,        OF_error, "X.509 certificate verification error - Unsupported extension feature" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnnestedResource,                OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNNESTED_RESOURCE,                    OF_error, "X.509 certificate verification error - RFC 3779 resource not subset of parent's resources" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyPermittedViolation,              OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PERMITTED_VIOLATION,                  OF_error, "X.509 certificate verification error - permitted subtree violation" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyExcludedViolation,               OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EXCLUDED_VIOLATION,                   OF_error, "X.509 certificate verification error - excluded subtree violation" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySubtreeMinmax,                   OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUBTREE_MINMAX,                       OF_error, "X.509 certificate verification error - name constraints minimum and maximum not supported" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyApplicationVerification,         OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_APPLICATION_VERIFICATION,             OF_error, "X.509 certificate verification error - application verification failure" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnsupportedConstraintType,       OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNSUPPORTED_CONSTRAINT_TYPE,          OF_error, "X.509 certificate verification error - unsupported name constraint type" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnsupportedConstraintSyntax,     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNSUPPORTED_CONSTRAINT_SYNTAX,        OF_error, "X.509 certificate verification error - unsupported or invalid name constraint syntax" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnsupportedNameSyntax,           OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNSUPPORTED_NAME_SYNTAX,              OF_error, "X.509 certificate verification error - unsupported or invalid name syntax" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCRLPathValidationError,          OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CRL_PATH_VALIDATION_ERROR,            OF_error, "X.509 certificate verification error - CRL path validation error" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyPathLoop,                        OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PATH_LOOP,                            OF_error, "X.509 certificate verification error - Path Loop" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySuiteBInvalidVersion,            OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUITE_B_INVALID_VERSION,              OF_error, "X.509 certificate verification error - Suite B: certificate version invalid" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySuiteBInvalidAlgorithm,          OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUITE_B_INVALID_ALGORITHM,            OF_error, "X.509 certificate verification error - Suite B: invalid public key algorithm" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySuiteBInvalidCurve,              OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUITE_B_INVALID_CURVE,                OF_error, "X.509 certificate verification error - Suite B: invalid ECC curve" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySuiteBInvalidSignatureAlgorithm, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUITE_B_INVALID_SIGNATURE_ALGORITHM,  OF_error, "X.509 certificate verification error - Suite B: invalid signature algorithm" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySuiteBLosNotAllowed,             OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUITE_B_LOS_NOT_ALLOWED,              OF_error, "X.509 certificate verification error - Suite B: curve not allowed for this LOS" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySuiteBCannotSignP384WithP256,    OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUITE_B_CANNOT_SIGN_P_384_WITH_P_256, OF_error, "X.509 certificate verification error - Suite B: cannot sign P-384 with P-256" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyHostnameMismatch,                OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_HOSTNAME_MISMATCH,                    OF_error, "X.509 certificate verification error - Hostname mismatch" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyEmailMismatch,                   OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EMAIL_MISMATCH,                       OF_error, "X.509 certificate verification error - Email address mismatch" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyIPAddressMismatch,               OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_IP_ADDRESS_MISMATCH,                  OF_error, "X.509 certificate verification error - IP address mismatch" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyDANENoMatch,                     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_DANE_NO_MATCH,                        OF_error, "X.509 certificate verification error - No matching DANE TLSA records" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyEEKeyTooSmall,                   OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EE_KEY_TOO_SMALL,                     OF_error, "X.509 certificate verification error - EE certificate key too weak" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCAKeyTooSmall,                   OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CA_KEY_TOO_SMALL,                     OF_error, "X.509 certificate verification error - CA certificate key too weak" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCAMDTooWeak,                     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CA_MD_TOO_WEAK,                       OF_error, "X.509 certificate verification error - CA signature digest algorithm too weak" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyInvalidCall,                     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_INVALID_CALL,                         OF_error, "X.509 certificate verification error - Invalid certificate verification context" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyStoreLookup,                     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_STORE_LOOKUP,                         OF_error, "X.509 certificate verification error - Issuer certificate lookup error" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyNoValidSCTs,                     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_NO_VALID_SCTS,                        OF_error, "X.509 certificate verification error - Certificate Transparency required, but no valid SCTs found" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyProxySubjectNameViolation,       OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PROXY_SUBJECT_NAME_VIOLATION,         OF_error, "X.509 certificate verification error - proxy subject name violation" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyOCSPVerifyNeeded,                OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_OCSP_VERIFY_NEEDED,                   OF_error, "X.509 certificate verification error - OCSP verification needed" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyOCSPVerifyFailed,                OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_OCSP_VERIFY_FAILED,                   OF_error, "X.509 certificate verification error - OCSP verification failed" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyOCSPCertUnknown,                 OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_OCSP_CERT_UNKNOWN,                    OF_error, "X.509 certificate verification error - OCSP unknown cert" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyUnsupportedSignatureAlgorithm,   OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_UNSUPPORTED_SIGNATURE_ALGORITHM,      OF_error, "X.509 certificate verification error - Cannot find certificate signature algorithm" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySignatureAlgorithmMismatch,      OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SIGNATURE_ALGORITHM_MISMATCH,         OF_error, "X.509 certificate verification error - subject signature algorithm and issuer public key algorithm mismatch" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySignatureAlgorithmInconsistency, OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SIGNATURE_ALGORITHM_INCONSISTENCY,    OF_error, "X.509 certificate verification error - cert info siganature and signature algorithm mismatch" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyInvalidCA,                       OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_INVALID_CA,                           OF_error, "X.509 certificate verification error - invalid CA certificate" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyPathlenInvalidForNonCA,          OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PATHLEN_INVALID_FOR_NON_CA,           OF_error, "X.509 certificate verification error - Path length invalid for non-CA cert" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyPathlenWithoutKUKeyCertSign,     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_PATHLEN_WITHOUT_KU_KEY_CERT_SIGN,     OF_error, "X.509 certificate verification error - Path length given without key usage keyCertSign" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyKUKeyCertSignInvalidForNonCA,    OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_KU_KEY_CERT_SIGN_INVALID_FOR_NON_CA,  OF_error, "X.509 certificate verification error - Key usage keyCertSign invalid for non-CA cert" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyIssuerNameEmpty,                 OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_ISSUER_NAME_EMPTY,                    OF_error, "X.509 certificate verification error - Issuer name empty" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySubjectNameEmpty,                OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUBJECT_NAME_EMPTY,                   OF_error, "X.509 certificate verification error - Subject name empty" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyMissingAuthorityKeyIdentifier,   OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_MISSING_AUTHORITY_KEY_IDENTIFIER,     OF_error, "X.509 certificate verification error - Missing Authority Key Identifier" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyMissingSubjectKeyIdentifier,     OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_MISSING_SUBJECT_KEY_IDENTIFIER,       OF_error, "X.509 certificate verification error - Missing Subject Key Identifier" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyEmptySubjectAltName,             OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EMPTY_SUBJECT_ALT_NAME,               OF_error, "X.509 certificate verification error - Empty Subject Alternative Name extension" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyEmptySubjectSanNotCritical,      OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EMPTY_SUBJECT_SAN_NOT_CRITICAL,       OF_error, "X.509 certificate verification error - Basic Constraints of CA cert not marked critical" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCABconsNotCritical,              OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CA_BCONS_NOT_CRITICAL,                OF_error, "X.509 certificate verification error - Subject empty and Subject Alt Name extension not critical" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyAuthorityKeyIdentifierCritical,  OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_AUTHORITY_KEY_IDENTIFIER_CRITICAL,    OF_error, "X.509 certificate verification error - Authority Key Identifier marked critical" );
+makeOFConditionConst( DCMTLS_EC_X509VerifySubjectKeyIdentifierCritical,    OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_SUBJECT_KEY_IDENTIFIER_CRITICAL,      OF_error, "X.509 certificate verification error - Subject Key Identifier marked critical" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyCACertMissingKeyUsage,           OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_CA_CERT_MISSING_KEY_USAGE,            OF_error, "X.509 certificate verification error - CA cert does not include key usage extension" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyExtensionsRequireVersion3,       OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EXTENSIONS_REQUIRE_VERSION_3,         OF_error, "X.509 certificate verification error - Using cert extension requires at least X509v3" );
+makeOFConditionConst( DCMTLS_EC_X509VerifyECKeyExplicitParams,             OFM_dcmtls, DCMTLS_EC_X509Verify_Offset + X509_V_ERR_EC_KEY_EXPLICIT_PARAMS,               OF_error, "X.509 certificate verification error - Certificate public key has explicit ECC parameters" );
+
+// the following defines are present in OpenSSL 1.0.1
+
+#ifndef SSL_R_APP_DATA_IN_HANDSHAKE
+#define SSL_R_APP_DATA_IN_HANDSHAKE                      100
+#endif
+#ifndef SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT
+#define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272
+#endif
+#ifndef SSL_R_BAD_ALERT_RECORD
+#define SSL_R_BAD_ALERT_RECORD                           101
+#endif
+#ifndef SSL_R_BAD_AUTHENTICATION_TYPE
+#define SSL_R_BAD_AUTHENTICATION_TYPE                    102
+#endif
+#ifndef SSL_R_BAD_CHANGE_CIPHER_SPEC
+#define SSL_R_BAD_CHANGE_CIPHER_SPEC                     103
+#endif
+#ifndef SSL_R_BAD_CHECKSUM
+#define SSL_R_BAD_CHECKSUM                               104
+#endif
+#ifndef SSL_R_BAD_DATA_RETURNED_BY_CALLBACK
+#define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK              106
+#endif
+#ifndef SSL_R_BAD_DECOMPRESSION
+#define SSL_R_BAD_DECOMPRESSION                          107
+#endif
+#ifndef SSL_R_BAD_DH_G_LENGTH
+#define SSL_R_BAD_DH_G_LENGTH                            108
+#endif
+#ifndef SSL_R_BAD_DH_G_VALUE
+#define SSL_R_BAD_DH_G_VALUE                             375
+#endif
+#ifndef SSL_R_BAD_DH_PUB_KEY_LENGTH
+#define SSL_R_BAD_DH_PUB_KEY_LENGTH                      109
+#endif
+#ifndef SSL_R_BAD_DH_PUB_KEY_VALUE
+#define SSL_R_BAD_DH_PUB_KEY_VALUE                       393
+#endif
+#ifndef SSL_R_BAD_DH_P_LENGTH
+#define SSL_R_BAD_DH_P_LENGTH                            110
+#endif
+#ifndef SSL_R_BAD_DH_P_VALUE
+#define SSL_R_BAD_DH_P_VALUE                             395
+#endif
+#ifndef SSL_R_BAD_DIGEST_LENGTH
+#define SSL_R_BAD_DIGEST_LENGTH                          111
+#endif
+#ifndef SSL_R_BAD_DSA_SIGNATURE
+#define SSL_R_BAD_DSA_SIGNATURE                          112
+#endif
+#ifndef SSL_R_BAD_ECC_CERT
+#define SSL_R_BAD_ECC_CERT                               304
+#endif
+#ifndef SSL_R_BAD_ECDSA_SIGNATURE
+#define SSL_R_BAD_ECDSA_SIGNATURE                        305
+#endif
+#ifndef SSL_R_BAD_ECPOINT
+#define SSL_R_BAD_ECPOINT                                306
+#endif
+#ifndef SSL_R_BAD_HANDSHAKE_LENGTH
+#define SSL_R_BAD_HANDSHAKE_LENGTH                       332
+#endif
+#ifndef SSL_R_BAD_HELLO_REQUEST
+#define SSL_R_BAD_HELLO_REQUEST                          105
+#endif
+#ifndef SSL_R_BAD_LENGTH
+#define SSL_R_BAD_LENGTH                                 271
+#endif
+#ifndef SSL_R_BAD_MAC_DECODE
+#define SSL_R_BAD_MAC_DECODE                             113
+#endif
+#ifndef SSL_R_BAD_MAC_LENGTH
+#define SSL_R_BAD_MAC_LENGTH                             333
+#endif
+#ifndef SSL_R_BAD_MESSAGE_TYPE
+#define SSL_R_BAD_MESSAGE_TYPE                           114
+#endif
+#ifndef SSL_R_BAD_PACKET_LENGTH
+#define SSL_R_BAD_PACKET_LENGTH                          115
+#endif
+#ifndef SSL_R_BAD_PROTOCOL_VERSION_NUMBER
+#define SSL_R_BAD_PROTOCOL_VERSION_NUMBER                116
+#endif
+#ifndef SSL_R_BAD_PSK_IDENTITY_HINT_LENGTH
+#define SSL_R_BAD_PSK_IDENTITY_HINT_LENGTH               316
+#endif
+#ifndef SSL_R_BAD_RESPONSE_ARGUMENT
+#define SSL_R_BAD_RESPONSE_ARGUMENT                      117
+#endif
+#ifndef SSL_R_BAD_RSA_DECRYPT
+#define SSL_R_BAD_RSA_DECRYPT                            118
+#endif
+#ifndef SSL_R_BAD_RSA_ENCRYPT
+#define SSL_R_BAD_RSA_ENCRYPT                            119
+#endif
+#ifndef SSL_R_BAD_RSA_E_LENGTH
+#define SSL_R_BAD_RSA_E_LENGTH                           120
+#endif
+#ifndef SSL_R_BAD_RSA_MODULUS_LENGTH
+#define SSL_R_BAD_RSA_MODULUS_LENGTH                     121
+#endif
+#ifndef SSL_R_BAD_RSA_SIGNATURE
+#define SSL_R_BAD_RSA_SIGNATURE                          122
+#endif
+#ifndef SSL_R_BAD_SIGNATURE
+#define SSL_R_BAD_SIGNATURE                              123
+#endif
+#ifndef SSL_R_BAD_SRP_A_LENGTH
+#define SSL_R_BAD_SRP_A_LENGTH                           347
+#endif
+#ifndef SSL_R_BAD_SRP_B_LENGTH
+#define SSL_R_BAD_SRP_B_LENGTH                           348
+#endif
+#ifndef SSL_R_BAD_SRP_G_LENGTH
+#define SSL_R_BAD_SRP_G_LENGTH                           349
+#endif
+#ifndef SSL_R_BAD_SRP_N_LENGTH
+#define SSL_R_BAD_SRP_N_LENGTH                           350
+#endif
+#ifndef SSL_R_BAD_SRP_PARAMETERS
+#define SSL_R_BAD_SRP_PARAMETERS                         371
+#endif
+#ifndef SSL_R_BAD_SRP_S_LENGTH
+#define SSL_R_BAD_SRP_S_LENGTH                           351
+#endif
+#ifndef SSL_R_BAD_SRTP_MKI_VALUE
+#define SSL_R_BAD_SRTP_MKI_VALUE                         352
+#endif
+#ifndef SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST
+#define SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST           353
+#endif
+#ifndef SSL_R_BAD_SSL_FILETYPE
+#define SSL_R_BAD_SSL_FILETYPE                           124
+#endif
+#ifndef SSL_R_BAD_SSL_SESSION_ID_LENGTH
+#define SSL_R_BAD_SSL_SESSION_ID_LENGTH                  125
+#endif
+#ifndef SSL_R_BAD_STATE
+#define SSL_R_BAD_STATE                                  126
+#endif
+#ifndef SSL_R_BAD_WRITE_RETRY
+#define SSL_R_BAD_WRITE_RETRY                            127
+#endif
+#ifndef SSL_R_BIO_NOT_SET
+#define SSL_R_BIO_NOT_SET                                128
+#endif
+#ifndef SSL_R_BLOCK_CIPHER_PAD_IS_WRONG
+#define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG                  129
+#endif
+#ifndef SSL_R_BN_LIB
+#define SSL_R_BN_LIB                                     130
+#endif
+#ifndef SSL_R_CA_DN_LENGTH_MISMATCH
+#define SSL_R_CA_DN_LENGTH_MISMATCH                      131
+#endif
+#ifndef SSL_R_CA_DN_TOO_LONG
+#define SSL_R_CA_DN_TOO_LONG                             132
+#endif
+#ifndef SSL_R_CCS_RECEIVED_EARLY
+#define SSL_R_CCS_RECEIVED_EARLY                         133
+#endif
+#ifndef SSL_R_CERTIFICATE_VERIFY_FAILED
+#define SSL_R_CERTIFICATE_VERIFY_FAILED                  134
+#endif
+#ifndef SSL_R_CERT_LENGTH_MISMATCH
+#define SSL_R_CERT_LENGTH_MISMATCH                       135
+#endif
+#ifndef SSL_R_CHALLENGE_IS_DIFFERENT
+#define SSL_R_CHALLENGE_IS_DIFFERENT                     136
+#endif
+#ifndef SSL_R_CIPHER_CODE_WRONG_LENGTH
+#define SSL_R_CIPHER_CODE_WRONG_LENGTH                   137
+#endif
+#ifndef SSL_R_CIPHER_OR_HASH_UNAVAILABLE
+#define SSL_R_CIPHER_OR_HASH_UNAVAILABLE                 138
+#endif
+#ifndef SSL_R_CIPHER_TABLE_SRC_ERROR
+#define SSL_R_CIPHER_TABLE_SRC_ERROR                     139
+#endif
+#ifndef SSL_R_CLIENTHELLO_TLSEXT
+#define SSL_R_CLIENTHELLO_TLSEXT                         226
+#endif
+#ifndef SSL_R_COMPRESSED_LENGTH_TOO_LONG
+#define SSL_R_COMPRESSED_LENGTH_TOO_LONG                 140
+#endif
+#ifndef SSL_R_COMPRESSION_DISABLED
+#define SSL_R_COMPRESSION_DISABLED                       343
+#endif
+#ifndef SSL_R_COMPRESSION_FAILURE
+#define SSL_R_COMPRESSION_FAILURE                        141
+#endif
+#ifndef SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE
+#define SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE    307
+#endif
+#ifndef SSL_R_COMPRESSION_LIBRARY_ERROR
+#define SSL_R_COMPRESSION_LIBRARY_ERROR                  142
+#endif
+#ifndef SSL_R_CONNECTION_ID_IS_DIFFERENT
+#define SSL_R_CONNECTION_ID_IS_DIFFERENT                 143
+#endif
+#ifndef SSL_R_CONNECTION_TYPE_NOT_SET
+#define SSL_R_CONNECTION_TYPE_NOT_SET                    144
+#endif
+#ifndef SSL_R_COOKIE_MISMATCH
+#define SSL_R_COOKIE_MISMATCH                            308
+#endif
+#ifndef SSL_R_DATA_BETWEEN_CCS_AND_FINISHED
+#define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED              145
+#endif
+#ifndef SSL_R_DATA_LENGTH_TOO_LONG
+#define SSL_R_DATA_LENGTH_TOO_LONG                       146
+#endif
+#ifndef SSL_R_DECRYPTION_FAILED
+#define SSL_R_DECRYPTION_FAILED                          147
+#endif
+#ifndef SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC
+#define SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC        281
+#endif
+#ifndef SSL_R_DH_KEY_TOO_SMALL
+#define SSL_R_DH_KEY_TOO_SMALL                           372
+#endif
+#ifndef SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG
+#define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG            148
+#endif
+#ifndef SSL_R_DIGEST_CHECK_FAILED
+#define SSL_R_DIGEST_CHECK_FAILED                        149
+#endif
+#ifndef SSL_R_DTLS_MESSAGE_TOO_BIG
+#define SSL_R_DTLS_MESSAGE_TOO_BIG                       334
+#endif
+#ifndef SSL_R_DUPLICATE_COMPRESSION_ID
+#define SSL_R_DUPLICATE_COMPRESSION_ID                   309
+#endif
+#ifndef SSL_R_ECC_CERT_NOT_FOR_KEY_AGREEMENT
+#define SSL_R_ECC_CERT_NOT_FOR_KEY_AGREEMENT             317
+#endif
+#ifndef SSL_R_ECC_CERT_NOT_FOR_SIGNING
+#define SSL_R_ECC_CERT_NOT_FOR_SIGNING                   318
+#endif
+#ifndef SSL_R_ECC_CERT_SHOULD_HAVE_RSA_SIGNATURE
+#define SSL_R_ECC_CERT_SHOULD_HAVE_RSA_SIGNATURE         322
+#endif
+#ifndef SSL_R_ECC_CERT_SHOULD_HAVE_SHA1_SIGNATURE
+#define SSL_R_ECC_CERT_SHOULD_HAVE_SHA1_SIGNATURE        323
+#endif
+#ifndef SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER
+#define SSL_R_ECGROUP_TOO_LARGE_FOR_CIPHER               310
+#endif
+#ifndef SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST
+#define SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST         354
+#endif
+#ifndef SSL_R_ENCRYPTED_LENGTH_TOO_LONG
+#define SSL_R_ENCRYPTED_LENGTH_TOO_LONG                  150
+#endif
+#ifndef SSL_R_ERROR_GENERATING_TMP_RSA_KEY
+#define SSL_R_ERROR_GENERATING_TMP_RSA_KEY               282
+#endif
+#ifndef SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST
+#define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST              151
+#endif
+#ifndef SSL_R_EXCESSIVE_MESSAGE_SIZE
+#define SSL_R_EXCESSIVE_MESSAGE_SIZE                     152
+#endif
+#ifndef SSL_R_EXTRA_DATA_IN_MESSAGE
+#define SSL_R_EXTRA_DATA_IN_MESSAGE                      153
+#endif
+#ifndef SSL_R_GOT_A_FIN_BEFORE_A_CCS
+#define SSL_R_GOT_A_FIN_BEFORE_A_CCS                     154
+#endif
+#ifndef SSL_R_GOT_NEXT_PROTO_BEFORE_A_CCS
+#define SSL_R_GOT_NEXT_PROTO_BEFORE_A_CCS                355
+#endif
+#ifndef SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION
+#define SSL_R_GOT_NEXT_PROTO_WITHOUT_EXTENSION           356
+#endif
+#ifndef SSL_R_HTTPS_PROXY_REQUEST
+#define SSL_R_HTTPS_PROXY_REQUEST                        155
+#endif
+#ifndef SSL_R_HTTP_REQUEST
+#define SSL_R_HTTP_REQUEST                               156
+#endif
+#ifndef SSL_R_ILLEGAL_PADDING
+#define SSL_R_ILLEGAL_PADDING                            283
+#endif
+#ifndef SSL_R_INAPPROPRIATE_FALLBACK
+#define SSL_R_INAPPROPRIATE_FALLBACK                     373
+#endif
+#ifndef SSL_R_INCONSISTENT_COMPRESSION
+#define SSL_R_INCONSISTENT_COMPRESSION                   340
+#endif
+#ifndef SSL_R_INVALID_CHALLENGE_LENGTH
+#define SSL_R_INVALID_CHALLENGE_LENGTH                   158
+#endif
+#ifndef SSL_R_INVALID_COMMAND
+#define SSL_R_INVALID_COMMAND                            280
+#endif
+#ifndef SSL_R_INVALID_COMPRESSION_ALGORITHM
+#define SSL_R_INVALID_COMPRESSION_ALGORITHM              341
+#endif
+#ifndef SSL_R_INVALID_PURPOSE
+#define SSL_R_INVALID_PURPOSE                            278
+#endif
+#ifndef SSL_R_INVALID_SRP_USERNAME
+#define SSL_R_INVALID_SRP_USERNAME                       357
+#endif
+#ifndef SSL_R_INVALID_STATUS_RESPONSE
+#define SSL_R_INVALID_STATUS_RESPONSE                    328
+#endif
+#ifndef SSL_R_INVALID_TICKET_KEYS_LENGTH
+#define SSL_R_INVALID_TICKET_KEYS_LENGTH                 325
+#endif
+#ifndef SSL_R_INVALID_TRUST
+#define SSL_R_INVALID_TRUST                              279
+#endif
+#ifndef SSL_R_KEY_ARG_TOO_LONG
+#define SSL_R_KEY_ARG_TOO_LONG                           284
+#endif
+#ifndef SSL_R_KRB5
+#define SSL_R_KRB5                                       285
+#endif
+#ifndef SSL_R_KRB5_C_CC_PRINC
+#define SSL_R_KRB5_C_CC_PRINC                            286
+#endif
+#ifndef SSL_R_KRB5_C_GET_CRED
+#define SSL_R_KRB5_C_GET_CRED                            287
+#endif
+#ifndef SSL_R_KRB5_C_INIT
+#define SSL_R_KRB5_C_INIT                                288
+#endif
+#ifndef SSL_R_KRB5_C_MK_REQ
+#define SSL_R_KRB5_C_MK_REQ                              289
+#endif
+#ifndef SSL_R_KRB5_S_BAD_TICKET
+#define SSL_R_KRB5_S_BAD_TICKET                          290
+#endif
+#ifndef SSL_R_KRB5_S_INIT
+#define SSL_R_KRB5_S_INIT                                291
+#endif
+#ifndef SSL_R_KRB5_S_RD_REQ
+#define SSL_R_KRB5_S_RD_REQ                              292
+#endif
+#ifndef SSL_R_KRB5_S_TKT_EXPIRED
+#define SSL_R_KRB5_S_TKT_EXPIRED                         293
+#endif
+#ifndef SSL_R_KRB5_S_TKT_NYV
+#define SSL_R_KRB5_S_TKT_NYV                             294
+#endif
+#ifndef SSL_R_KRB5_S_TKT_SKEW
+#define SSL_R_KRB5_S_TKT_SKEW                            295
+#endif
+#ifndef SSL_R_LENGTH_MISMATCH
+#define SSL_R_LENGTH_MISMATCH                            159
+#endif
+#ifndef SSL_R_LENGTH_TOO_SHORT
+#define SSL_R_LENGTH_TOO_SHORT                           160
+#endif
+#ifndef SSL_R_LIBRARY_BUG
+#define SSL_R_LIBRARY_BUG                                274
+#endif
+#ifndef SSL_R_LIBRARY_HAS_NO_CIPHERS
+#define SSL_R_LIBRARY_HAS_NO_CIPHERS                     161
+#endif
+#ifndef SSL_R_MESSAGE_TOO_LONG
+#define SSL_R_MESSAGE_TOO_LONG                           296
+#endif
+#ifndef SSL_R_MISSING_DH_DSA_CERT
+#define SSL_R_MISSING_DH_DSA_CERT                        162
+#endif
+#ifndef SSL_R_MISSING_DH_KEY
+#define SSL_R_MISSING_DH_KEY                             163
+#endif
+#ifndef SSL_R_MISSING_DH_RSA_CERT
+#define SSL_R_MISSING_DH_RSA_CERT                        164
+#endif
+#ifndef SSL_R_MISSING_DSA_SIGNING_CERT
+#define SSL_R_MISSING_DSA_SIGNING_CERT                   165
+#endif
+#ifndef SSL_R_MISSING_EXPORT_TMP_DH_KEY
+#define SSL_R_MISSING_EXPORT_TMP_DH_KEY                  166
+#endif
+#ifndef SSL_R_MISSING_EXPORT_TMP_RSA_KEY
+#define SSL_R_MISSING_EXPORT_TMP_RSA_KEY                 167
+#endif
+#ifndef SSL_R_MISSING_RSA_CERTIFICATE
+#define SSL_R_MISSING_RSA_CERTIFICATE                    168
+#endif
+#ifndef SSL_R_MISSING_RSA_ENCRYPTING_CERT
+#define SSL_R_MISSING_RSA_ENCRYPTING_CERT                169
+#endif
+#ifndef SSL_R_MISSING_RSA_SIGNING_CERT
+#define SSL_R_MISSING_RSA_SIGNING_CERT                   170
+#endif
+#ifndef SSL_R_MISSING_SRP_PARAM
+#define SSL_R_MISSING_SRP_PARAM                          358
+#endif
+#ifndef SSL_R_MISSING_TMP_DH_KEY
+#define SSL_R_MISSING_TMP_DH_KEY                         171
+#endif
+#ifndef SSL_R_MISSING_TMP_ECDH_KEY
+#define SSL_R_MISSING_TMP_ECDH_KEY                       311
+#endif
+#ifndef SSL_R_MISSING_TMP_RSA_KEY
+#define SSL_R_MISSING_TMP_RSA_KEY                        172
+#endif
+#ifndef SSL_R_MISSING_TMP_RSA_PKEY
+#define SSL_R_MISSING_TMP_RSA_PKEY                       173
+#endif
+#ifndef SSL_R_MISSING_VERIFY_MESSAGE
+#define SSL_R_MISSING_VERIFY_MESSAGE                     174
+#endif
+#ifndef SSL_R_MULTIPLE_SGC_RESTARTS
+#define SSL_R_MULTIPLE_SGC_RESTARTS                      346
+#endif
+#ifndef SSL_R_NON_SSLV2_INITIAL_PACKET
+#define SSL_R_NON_SSLV2_INITIAL_PACKET                   175
+#endif
+#ifndef SSL_R_NO_CERTIFICATES_RETURNED
+#define SSL_R_NO_CERTIFICATES_RETURNED                   176
+#endif
+#ifndef SSL_R_NO_CERTIFICATE_ASSIGNED
+#define SSL_R_NO_CERTIFICATE_ASSIGNED                    177
+#endif
+#ifndef SSL_R_NO_CERTIFICATE_RETURNED
+#define SSL_R_NO_CERTIFICATE_RETURNED                    178
+#endif
+#ifndef SSL_R_NO_CERTIFICATE_SET
+#define SSL_R_NO_CERTIFICATE_SET                         179
+#endif
+#ifndef SSL_R_NO_CERTIFICATE_SPECIFIED
+#define SSL_R_NO_CERTIFICATE_SPECIFIED                   180
+#endif
+#ifndef SSL_R_NO_CIPHERS_AVAILABLE
+#define SSL_R_NO_CIPHERS_AVAILABLE                       181
+#endif
+#ifndef SSL_R_NO_CIPHERS_PASSED
+#define SSL_R_NO_CIPHERS_PASSED                          182
+#endif
+#ifndef SSL_R_NO_CIPHERS_SPECIFIED
+#define SSL_R_NO_CIPHERS_SPECIFIED                       183
+#endif
+#ifndef SSL_R_NO_CIPHER_LIST
+#define SSL_R_NO_CIPHER_LIST                             184
+#endif
+#ifndef SSL_R_NO_CIPHER_MATCH
+#define SSL_R_NO_CIPHER_MATCH                            185
+#endif
+#ifndef SSL_R_NO_CLIENT_CERT_METHOD
+#define SSL_R_NO_CLIENT_CERT_METHOD                      331
+#endif
+#ifndef SSL_R_NO_CLIENT_CERT_RECEIVED
+#define SSL_R_NO_CLIENT_CERT_RECEIVED                    186
+#endif
+#ifndef SSL_R_NO_COMPRESSION_SPECIFIED
+#define SSL_R_NO_COMPRESSION_SPECIFIED                   187
+#endif
+#ifndef SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER
+#define SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER           330
+#endif
+#ifndef SSL_R_NO_METHOD_SPECIFIED
+#define SSL_R_NO_METHOD_SPECIFIED                        188
+#endif
+#ifndef SSL_R_NO_PRIVATEKEY
+#define SSL_R_NO_PRIVATEKEY                              189
+#endif
+#ifndef SSL_R_NO_PRIVATE_KEY_ASSIGNED
+#define SSL_R_NO_PRIVATE_KEY_ASSIGNED                    190
+#endif
+#ifndef SSL_R_NO_PROTOCOLS_AVAILABLE
+#define SSL_R_NO_PROTOCOLS_AVAILABLE                     191
+#endif
+#ifndef SSL_R_NO_PUBLICKEY
+#define SSL_R_NO_PUBLICKEY                               192
+#endif
+#ifndef SSL_R_NO_RENEGOTIATION
+#define SSL_R_NO_RENEGOTIATION                           339
+#endif
+#ifndef SSL_R_NO_REQUIRED_DIGEST
+#define SSL_R_NO_REQUIRED_DIGEST                         324
+#endif
+#ifndef SSL_R_NO_SHARED_CIPHER
+#define SSL_R_NO_SHARED_CIPHER                           193
+#endif
+#ifndef SSL_R_NO_SRTP_PROFILES
+#define SSL_R_NO_SRTP_PROFILES                           359
+#endif
+#ifndef SSL_R_NO_VERIFY_CALLBACK
+#define SSL_R_NO_VERIFY_CALLBACK                         194
+#endif
+#ifndef SSL_R_NULL_SSL_CTX
+#define SSL_R_NULL_SSL_CTX                               195
+#endif
+#ifndef SSL_R_NULL_SSL_METHOD_PASSED
+#define SSL_R_NULL_SSL_METHOD_PASSED                     196
+#endif
+#ifndef SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED
+#define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED            197
+#endif
+#ifndef SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED
+#define SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED 344
+#endif
+#ifndef SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE
+#define SSL_R_ONLY_TLS_ALLOWED_IN_FIPS_MODE              297
+#endif
+#ifndef SSL_R_OPAQUE_PRF_INPUT_TOO_LONG
+#define SSL_R_OPAQUE_PRF_INPUT_TOO_LONG                  327
+#endif
+#ifndef SSL_R_PACKET_LENGTH_TOO_LONG
+#define SSL_R_PACKET_LENGTH_TOO_LONG                     198
+#endif
+#ifndef SSL_R_PARSE_TLSEXT
+#define SSL_R_PARSE_TLSEXT                               227
+#endif
+#ifndef SSL_R_PATH_TOO_LONG
+#define SSL_R_PATH_TOO_LONG                              270
+#endif
+#ifndef SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE
+#define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE          199
+#endif
+#ifndef SSL_R_PEER_ERROR
+#define SSL_R_PEER_ERROR                                 200
+#endif
+#ifndef SSL_R_PEER_ERROR_CERTIFICATE
+#define SSL_R_PEER_ERROR_CERTIFICATE                     201
+#endif
+#ifndef SSL_R_PEER_ERROR_NO_CERTIFICATE
+#define SSL_R_PEER_ERROR_NO_CERTIFICATE                  202
+#endif
+#ifndef SSL_R_PEER_ERROR_NO_CIPHER
+#define SSL_R_PEER_ERROR_NO_CIPHER                       203
+#endif
+#ifndef SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE
+#define SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE    204
+#endif
+#ifndef SSL_R_PRE_MAC_LENGTH_TOO_LONG
+#define SSL_R_PRE_MAC_LENGTH_TOO_LONG                    205
+#endif
+#ifndef SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS
+#define SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS          206
+#endif
+#ifndef SSL_R_PROTOCOL_IS_SHUTDOWN
+#define SSL_R_PROTOCOL_IS_SHUTDOWN                       207
+#endif
+#ifndef SSL_R_PSK_IDENTITY_NOT_FOUND
+#define SSL_R_PSK_IDENTITY_NOT_FOUND                     223
+#endif
+#ifndef SSL_R_PSK_NO_CLIENT_CB
+#define SSL_R_PSK_NO_CLIENT_CB                           224
+#endif
+#ifndef SSL_R_PSK_NO_SERVER_CB
+#define SSL_R_PSK_NO_SERVER_CB                           225
+#endif
+#ifndef SSL_R_PUBLIC_KEY_ENCRYPT_ERROR
+#define SSL_R_PUBLIC_KEY_ENCRYPT_ERROR                   208
+#endif
+#ifndef SSL_R_PUBLIC_KEY_IS_NOT_RSA
+#define SSL_R_PUBLIC_KEY_IS_NOT_RSA                      209
+#endif
+#ifndef SSL_R_PUBLIC_KEY_NOT_RSA
+#define SSL_R_PUBLIC_KEY_NOT_RSA                         210
+#endif
+#ifndef SSL_R_READ_BIO_NOT_SET
+#define SSL_R_READ_BIO_NOT_SET                           211
+#endif
+#ifndef SSL_R_READ_TIMEOUT_EXPIRED
+#define SSL_R_READ_TIMEOUT_EXPIRED                       312
+#endif
+#ifndef SSL_R_READ_WRONG_PACKET_TYPE
+#define SSL_R_READ_WRONG_PACKET_TYPE                     212
+#endif
+#ifndef SSL_R_RECORD_LENGTH_MISMATCH
+#define SSL_R_RECORD_LENGTH_MISMATCH                     213
+#endif
+#ifndef SSL_R_RECORD_TOO_LARGE
+#define SSL_R_RECORD_TOO_LARGE                           214
+#endif
+#ifndef SSL_R_RECORD_TOO_SMALL
+#define SSL_R_RECORD_TOO_SMALL                           298
+#endif
+#ifndef SSL_R_RENEGOTIATE_EXT_TOO_LONG
+#define SSL_R_RENEGOTIATE_EXT_TOO_LONG                   335
+#endif
+#ifndef SSL_R_RENEGOTIATION_ENCODING_ERR
+#define SSL_R_RENEGOTIATION_ENCODING_ERR                 336
+#endif
+#ifndef SSL_R_RENEGOTIATION_MISMATCH
+#define SSL_R_RENEGOTIATION_MISMATCH                     337
+#endif
+#ifndef SSL_R_REQUIRED_CIPHER_MISSING
+#define SSL_R_REQUIRED_CIPHER_MISSING                    215
+#endif
+#ifndef SSL_R_REQUIRED_COMPRESSSION_ALGORITHM_MISSING
+#define SSL_R_REQUIRED_COMPRESSSION_ALGORITHM_MISSING    342
+#endif
+#ifndef SSL_R_REUSE_CERT_LENGTH_NOT_ZERO
+#define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO                 216
+#endif
+#ifndef SSL_R_REUSE_CERT_TYPE_NOT_ZERO
+#define SSL_R_REUSE_CERT_TYPE_NOT_ZERO                   217
+#endif
+#ifndef SSL_R_REUSE_CIPHER_LIST_NOT_ZERO
+#define SSL_R_REUSE_CIPHER_LIST_NOT_ZERO                 218
+#endif
+#ifndef SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING
+#define SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING           345
+#endif
+#ifndef SSL_R_SERVERHELLO_TLSEXT
+#define SSL_R_SERVERHELLO_TLSEXT                         275
+#endif
+#ifndef SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED
+#define SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED           277
+#endif
+#ifndef SSL_R_SHORT_READ
+#define SSL_R_SHORT_READ                                 219
+#endif
+#ifndef SSL_R_SIGNATURE_ALGORITHMS_ERROR
+#define SSL_R_SIGNATURE_ALGORITHMS_ERROR                 360
+#endif
+#ifndef SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE
+#define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE      220
+#endif
+#ifndef SSL_R_SRP_A_CALC
+#define SSL_R_SRP_A_CALC                                 361
+#endif
+#ifndef SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES
+#define SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES           362
+#endif
+#ifndef SSL_R_SRTP_PROTECTION_PROFILE_LIST_TOO_LONG
+#define SSL_R_SRTP_PROTECTION_PROFILE_LIST_TOO_LONG      363
+#endif
+#ifndef SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE
+#define SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE            364
+#endif
+#ifndef SSL_R_SSL23_DOING_SESSION_ID_REUSE
+#define SSL_R_SSL23_DOING_SESSION_ID_REUSE               221
+#endif
+#ifndef SSL_R_SSL2_CONNECTION_ID_TOO_LONG
+#define SSL_R_SSL2_CONNECTION_ID_TOO_LONG                299
+#endif
+#ifndef SSL_R_SSL3_EXT_INVALID_ECPOINTFORMAT
+#define SSL_R_SSL3_EXT_INVALID_ECPOINTFORMAT             321
+#endif
+#ifndef SSL_R_SSL3_EXT_INVALID_SERVERNAME
+#define SSL_R_SSL3_EXT_INVALID_SERVERNAME                319
+#endif
+#ifndef SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE
+#define SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE           320
+#endif
+#ifndef SSL_R_SSL3_SESSION_ID_TOO_LONG
+#define SSL_R_SSL3_SESSION_ID_TOO_LONG                   300
+#endif
+#ifndef SSL_R_SSL3_SESSION_ID_TOO_SHORT
+#define SSL_R_SSL3_SESSION_ID_TOO_SHORT                  222
+#endif
+#ifndef SSL_R_SSLV3_ALERT_BAD_CERTIFICATE
+#define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE                1042
+#endif
+#ifndef SSL_R_SSLV3_ALERT_BAD_RECORD_MAC
+#define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC                 1020
+#endif
+#ifndef SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED
+#define SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED            1045
+#endif
+#ifndef SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED
+#define SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED            1044
+#endif
+#ifndef SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN
+#define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN            1046
+#endif
+#ifndef SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE
+#define SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE          1030
+#endif
+#ifndef SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE
+#define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE              1040
+#endif
+#ifndef SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER
+#define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER              1047
+#endif
+#ifndef SSL_R_SSLV3_ALERT_NO_CERTIFICATE
+#define SSL_R_SSLV3_ALERT_NO_CERTIFICATE                 1041
+#endif
+#ifndef SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE
+#define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE             1010
+#endif
+#ifndef SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE
+#define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE        1043
+#endif
+#ifndef SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION
+#define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION         228
+#endif
+#ifndef SSL_R_SSL_HANDSHAKE_FAILURE
+#define SSL_R_SSL_HANDSHAKE_FAILURE                      229
+#endif
+#ifndef SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS
+#define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS                 230
+#endif
+#ifndef SSL_R_SSL_SESSION_ID_CALLBACK_FAILED
+#define SSL_R_SSL_SESSION_ID_CALLBACK_FAILED             301
+#endif
+#ifndef SSL_R_SSL_SESSION_ID_CONFLICT
+#define SSL_R_SSL_SESSION_ID_CONFLICT                    302
+#endif
+#ifndef SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG
+#define SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG            273
+#endif
+#ifndef SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH
+#define SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH              303
+#endif
+#ifndef SSL_R_SSL_SESSION_ID_IS_DIFFERENT
+#define SSL_R_SSL_SESSION_ID_IS_DIFFERENT                231
+#endif
+#ifndef SSL_R_TLSV1_ALERT_ACCESS_DENIED
+#define SSL_R_TLSV1_ALERT_ACCESS_DENIED                  1049
+#endif
+#ifndef SSL_R_TLSV1_ALERT_DECODE_ERROR
+#define SSL_R_TLSV1_ALERT_DECODE_ERROR                   1050
+#endif
+#ifndef SSL_R_TLSV1_ALERT_DECRYPTION_FAILED
+#define SSL_R_TLSV1_ALERT_DECRYPTION_FAILED              1021
+#endif
+#ifndef SSL_R_TLSV1_ALERT_DECRYPT_ERROR
+#define SSL_R_TLSV1_ALERT_DECRYPT_ERROR                  1051
+#endif
+#ifndef SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION
+#define SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION             1060
+#endif
+#ifndef SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK
+#define SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK         1086
+#endif
+#ifndef SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY
+#define SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY          1071
+#endif
+#ifndef SSL_R_TLSV1_ALERT_INTERNAL_ERROR
+#define SSL_R_TLSV1_ALERT_INTERNAL_ERROR                 1080
+#endif
+#ifndef SSL_R_TLSV1_ALERT_NO_RENEGOTIATION
+#define SSL_R_TLSV1_ALERT_NO_RENEGOTIATION               1100
+#endif
+#ifndef SSL_R_TLSV1_ALERT_PROTOCOL_VERSION
+#define SSL_R_TLSV1_ALERT_PROTOCOL_VERSION               1070
+#endif
+#ifndef SSL_R_TLSV1_ALERT_RECORD_OVERFLOW
+#define SSL_R_TLSV1_ALERT_RECORD_OVERFLOW                1022
+#endif
+#ifndef SSL_R_TLSV1_ALERT_UNKNOWN_CA
+#define SSL_R_TLSV1_ALERT_UNKNOWN_CA                     1048
+#endif
+#ifndef SSL_R_TLSV1_ALERT_USER_CANCELLED
+#define SSL_R_TLSV1_ALERT_USER_CANCELLED                 1090
+#endif
+#ifndef SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE
+#define SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE           1114
+#endif
+#ifndef SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE
+#define SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE      1113
+#endif
+#ifndef SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE
+#define SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE             1111
+#endif
+#ifndef SSL_R_TLSV1_UNRECOGNIZED_NAME
+#define SSL_R_TLSV1_UNRECOGNIZED_NAME                    1112
+#endif
+#ifndef SSL_R_TLSV1_UNSUPPORTED_EXTENSION
+#define SSL_R_TLSV1_UNSUPPORTED_EXTENSION                1110
+#endif
+#ifndef SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER
+#define SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER       232
+#endif
+#ifndef SSL_R_TLS_HEARTBEAT_PEER_DOESNT_ACCEPT
+#define SSL_R_TLS_HEARTBEAT_PEER_DOESNT_ACCEPT           365
+#endif
+#ifndef SSL_R_TLS_HEARTBEAT_PENDING
+#define SSL_R_TLS_HEARTBEAT_PENDING                      366
+#endif
+#ifndef SSL_R_TLS_ILLEGAL_EXPORTER_LABEL
+#define SSL_R_TLS_ILLEGAL_EXPORTER_LABEL                 367
+#endif
+#ifndef SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST
+#define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST             157
+#endif
+#ifndef SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST
+#define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 233
+#endif
+#ifndef SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG
+#define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG    234
+#endif
+#ifndef SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER
+#define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER            235
+#endif
+#ifndef SSL_R_UNABLE_TO_DECODE_DH_CERTS
+#define SSL_R_UNABLE_TO_DECODE_DH_CERTS                  236
+#endif
+#ifndef SSL_R_UNABLE_TO_DECODE_ECDH_CERTS
+#define SSL_R_UNABLE_TO_DECODE_ECDH_CERTS                313
+#endif
+#ifndef SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY
+#define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY               237
+#endif
+#ifndef SSL_R_UNABLE_TO_FIND_DH_PARAMETERS
+#define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS               238
+#endif
+#ifndef SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS
+#define SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS             314
+#endif
+#ifndef SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS
+#define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS       239
+#endif
+#ifndef SSL_R_UNABLE_TO_FIND_SSL_METHOD
+#define SSL_R_UNABLE_TO_FIND_SSL_METHOD                  240
+#endif
+#ifndef SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES
+#define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES           241
+#endif
+#ifndef SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES
+#define SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES           242
+#endif
+#ifndef SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES
+#define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES          243
+#endif
+#ifndef SSL_R_UNEXPECTED_MESSAGE
+#define SSL_R_UNEXPECTED_MESSAGE                         244
+#endif
+#ifndef SSL_R_UNEXPECTED_RECORD
+#define SSL_R_UNEXPECTED_RECORD                          245
+#endif
+#ifndef SSL_R_UNINITIALIZED
+#define SSL_R_UNINITIALIZED                              276
+#endif
+#ifndef SSL_R_UNKNOWN_ALERT_TYPE
+#define SSL_R_UNKNOWN_ALERT_TYPE                         246
+#endif
+#ifndef SSL_R_UNKNOWN_CERTIFICATE_TYPE
+#define SSL_R_UNKNOWN_CERTIFICATE_TYPE                   247
+#endif
+#ifndef SSL_R_UNKNOWN_CIPHER_RETURNED
+#define SSL_R_UNKNOWN_CIPHER_RETURNED                    248
+#endif
+#ifndef SSL_R_UNKNOWN_CIPHER_TYPE
+#define SSL_R_UNKNOWN_CIPHER_TYPE                        249
+#endif
+#ifndef SSL_R_UNKNOWN_DIGEST
+#define SSL_R_UNKNOWN_DIGEST                             368
+#endif
+#ifndef SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE
+#define SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE                  250
+#endif
+#ifndef SSL_R_UNKNOWN_PKEY_TYPE
+#define SSL_R_UNKNOWN_PKEY_TYPE                          251
+#endif
+#ifndef SSL_R_UNKNOWN_PROTOCOL
+#define SSL_R_UNKNOWN_PROTOCOL                           252
+#endif
+#ifndef SSL_R_UNKNOWN_REMOTE_ERROR_TYPE
+#define SSL_R_UNKNOWN_REMOTE_ERROR_TYPE                  253
+#endif
+#ifndef SSL_R_UNKNOWN_SSL_VERSION
+#define SSL_R_UNKNOWN_SSL_VERSION                        254
+#endif
+#ifndef SSL_R_UNKNOWN_STATE
+#define SSL_R_UNKNOWN_STATE                              255
+#endif
+#ifndef SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED
+#define SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED       338
+#endif
+#ifndef SSL_R_UNSUPPORTED_CIPHER
+#define SSL_R_UNSUPPORTED_CIPHER                         256
+#endif
+#ifndef SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM
+#define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM          257
+#endif
+#ifndef SSL_R_UNSUPPORTED_DIGEST_TYPE
+#define SSL_R_UNSUPPORTED_DIGEST_TYPE                    326
+#endif
+#ifndef SSL_R_UNSUPPORTED_ELLIPTIC_CURVE
+#define SSL_R_UNSUPPORTED_ELLIPTIC_CURVE                 315
+#endif
+#ifndef SSL_R_UNSUPPORTED_PROTOCOL
+#define SSL_R_UNSUPPORTED_PROTOCOL                       258
+#endif
+#ifndef SSL_R_UNSUPPORTED_SSL_VERSION
+#define SSL_R_UNSUPPORTED_SSL_VERSION                    259
+#endif
+#ifndef SSL_R_UNSUPPORTED_STATUS_TYPE
+#define SSL_R_UNSUPPORTED_STATUS_TYPE                    329
+#endif
+#ifndef SSL_R_USE_SRTP_NOT_NEGOTIATED
+#define SSL_R_USE_SRTP_NOT_NEGOTIATED                    369
+#endif
+#ifndef SSL_R_WRITE_BIO_NOT_SET
+#define SSL_R_WRITE_BIO_NOT_SET                          260
+#endif
+#ifndef SSL_R_WRONG_CIPHER_RETURNED
+#define SSL_R_WRONG_CIPHER_RETURNED                      261
+#endif
+#ifndef SSL_R_WRONG_MESSAGE_TYPE
+#define SSL_R_WRONG_MESSAGE_TYPE                         262
+#endif
+#ifndef SSL_R_WRONG_NUMBER_OF_KEY_BITS
+#define SSL_R_WRONG_NUMBER_OF_KEY_BITS                   263
+#endif
+#ifndef SSL_R_WRONG_SIGNATURE_LENGTH
+#define SSL_R_WRONG_SIGNATURE_LENGTH                     264
+#endif
+#ifndef SSL_R_WRONG_SIGNATURE_SIZE
+#define SSL_R_WRONG_SIGNATURE_SIZE                       265
+#endif
+#ifndef SSL_R_WRONG_SIGNATURE_TYPE
+#define SSL_R_WRONG_SIGNATURE_TYPE                       370
+#endif
+#ifndef SSL_R_WRONG_SSL_VERSION
+#define SSL_R_WRONG_SSL_VERSION                          266
+#endif
+#ifndef SSL_R_WRONG_VERSION_NUMBER
+#define SSL_R_WRONG_VERSION_NUMBER                       267
+#endif
+#ifndef SSL_R_X509_LIB
+#define SSL_R_X509_LIB                                   268
+#endif
+#ifndef SSL_R_X509_VERIFICATION_SETUP_PROBLEMS
+#define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS           269
+#endif
+
+// the following defines were added in OpenSSL 1.0.2
+
+#ifndef SSL_R_ECDH_REQUIRED_FOR_SUITEB_MODE
+#define SSL_R_ECDH_REQUIRED_FOR_SUITEB_MODE  374
+#endif
+#ifndef SSL_R_CERT_CB_ERROR
+#define SSL_R_CERT_CB_ERROR  377
+#endif
+#ifndef SSL_R_WRONG_CURVE
+#define SSL_R_WRONG_CURVE  378
+#endif
+#ifndef SSL_R_ILLEGAL_SUITEB_DIGEST
+#define SSL_R_ILLEGAL_SUITEB_DIGEST  380
+#endif
+#ifndef SSL_R_MISSING_ECDSA_SIGNING_CERT
+#define SSL_R_MISSING_ECDSA_SIGNING_CERT  381
+#endif
+#ifndef SSL_R_WRONG_CERTIFICATE_TYPE
+#define SSL_R_WRONG_CERTIFICATE_TYPE  383
+#endif
+#ifndef SSL_R_BAD_VALUE
+#define SSL_R_BAD_VALUE  384
+#endif
+#ifndef SSL_R_INVALID_NULL_CMD_NAME
+#define SSL_R_INVALID_NULL_CMD_NAME  385
+#endif
+#ifndef SSL_R_UNKNOWN_CMD_NAME
+#define SSL_R_UNKNOWN_CMD_NAME  386
+#endif
+#ifndef SSL_R_INVALID_SERVERINFO_DATA
+#define SSL_R_INVALID_SERVERINFO_DATA  388
+#endif
+#ifndef SSL_R_NO_PEM_EXTENSIONS
+#define SSL_R_NO_PEM_EXTENSIONS  389
+#endif
+#ifndef SSL_R_BAD_DATA
+#define SSL_R_BAD_DATA  390
+#endif
+#ifndef SSL_R_PEM_NAME_BAD_PREFIX
+#define SSL_R_PEM_NAME_BAD_PREFIX  391
+#endif
+#ifndef SSL_R_PEM_NAME_TOO_SHORT
+#define SSL_R_PEM_NAME_TOO_SHORT  392
+#endif
+#ifndef SSL_R_LENGTH_TOO_LONG
+#define SSL_R_LENGTH_TOO_LONG  404
+#endif
+#ifndef SSL_R_SHUTDOWN_WHILE_IN_INIT
+#define SSL_R_SHUTDOWN_WHILE_IN_INIT  407
+#endif
+#ifndef SSL_R_TOO_MANY_WARN_ALERTS
+#define SSL_R_TOO_MANY_WARN_ALERTS  409
+#endif
+
+// the following defines were added in OpenSSL 1.1.0
+
+#ifndef SSL_R_BAD_DH_VALUE
+#define SSL_R_BAD_DH_VALUE  102
+#endif
+#ifndef SSL_R_INCONSISTENT_EXTMS
+#define SSL_R_INCONSISTENT_EXTMS  104
+#endif
+#ifndef SSL_R_INVALID_CONFIGURATION_NAME
+#define SSL_R_INVALID_CONFIGURATION_NAME  113
+#endif
+#ifndef SSL_R_SSL_COMMAND_SECTION_EMPTY
+#define SSL_R_SSL_COMMAND_SECTION_EMPTY  117
+#endif
+#ifndef SSL_R_SSL_COMMAND_SECTION_NOT_FOUND
+#define SSL_R_SSL_COMMAND_SECTION_NOT_FOUND  125
+#endif
+#ifndef SSL_R_SSL_SECTION_EMPTY
+#define SSL_R_SSL_SECTION_EMPTY  126
+#endif
+#ifndef SSL_R_SSL_SECTION_NOT_FOUND
+#define SSL_R_SSL_SECTION_NOT_FOUND  136
+#endif
+#ifndef SSL_R_UNKNOWN_COMMAND
+#define SSL_R_UNKNOWN_COMMAND  139
+#endif
+#ifndef SSL_R_AT_LEAST_TLS_1_0_NEEDED_IN_FIPS_MODE
+#define SSL_R_AT_LEAST_TLS_1_0_NEEDED_IN_FIPS_MODE  143
+#endif
+#ifndef SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE
+#define SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE  158
+#endif
+#ifndef SSL_R_VERSION_TOO_HIGH
+#define SSL_R_VERSION_TOO_HIGH  166
+#endif
+#ifndef SSL_R_CONTEXT_NOT_DANE_ENABLED
+#define SSL_R_CONTEXT_NOT_DANE_ENABLED  167
+#endif
+#ifndef SSL_R_DANE_ALREADY_ENABLED
+#define SSL_R_DANE_ALREADY_ENABLED  172
+#endif
+#ifndef SSL_R_DANE_CANNOT_OVERRIDE_MTYPE_FULL
+#define SSL_R_DANE_CANNOT_OVERRIDE_MTYPE_FULL  173
+#endif
+#ifndef SSL_R_DANE_NOT_ENABLED
+#define SSL_R_DANE_NOT_ENABLED  175
+#endif
+#ifndef SSL_R_DANE_TLSA_BAD_CERTIFICATE
+#define SSL_R_DANE_TLSA_BAD_CERTIFICATE  180
+#endif
+#ifndef SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE
+#define SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE  184
+#endif
+#ifndef SSL_R_DANE_TLSA_BAD_DATA_LENGTH
+#define SSL_R_DANE_TLSA_BAD_DATA_LENGTH  189
+#endif
+#ifndef SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH
+#define SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH  192
+#endif
+#ifndef SSL_R_EXCEEDS_MAX_FRAGMENT_SIZE
+#define SSL_R_EXCEEDS_MAX_FRAGMENT_SIZE  194
+#endif
+#ifndef SSL_R_DANE_TLSA_BAD_MATCHING_TYPE
+#define SSL_R_DANE_TLSA_BAD_MATCHING_TYPE  200
+#endif
+#ifndef SSL_R_DANE_TLSA_BAD_PUBLIC_KEY
+#define SSL_R_DANE_TLSA_BAD_PUBLIC_KEY  201
+#endif
+#ifndef SSL_R_DANE_TLSA_BAD_SELECTOR
+#define SSL_R_DANE_TLSA_BAD_SELECTOR  202
+#endif
+#ifndef SSL_R_DANE_TLSA_NULL_DATA
+#define SSL_R_DANE_TLSA_NULL_DATA  203
+#endif
+#ifndef SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN
+#define SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN  204
+#endif
+#ifndef SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED
+#define SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED  206
+#endif
+#ifndef SSL_R_SCT_VERIFICATION_FAILED
+#define SSL_R_SCT_VERIFICATION_FAILED  208
+#endif
+#ifndef SSL_R_SSL_SESSION_VERSION_MISMATCH
+#define SSL_R_SSL_SESSION_VERSION_MISMATCH  210
+#endif
+#ifndef SSL_R_INVALID_CT_VALIDATION_TYPE
+#define SSL_R_INVALID_CT_VALIDATION_TYPE  212
+#endif
+#ifndef SSL_R_NO_VALID_SCTS
+#define SSL_R_NO_VALID_SCTS  216
+#endif
+#ifndef SSL_R_REQUIRED_COMPRESSION_ALGORITHM_MISSING
+#define SSL_R_REQUIRED_COMPRESSION_ALGORITHM_MISSING  342
+#endif
+#ifndef SSL_R_SSL_NEGATIVE_LENGTH
+#define SSL_R_SSL_NEGATIVE_LENGTH  372
+#endif
+#ifndef SSL_R_NO_SHARED_SIGNATURE_ALGORITHMS
+#define SSL_R_NO_SHARED_SIGNATURE_ALGORITHMS  376
+#endif
+#ifndef SSL_R_VERSION_TOO_LOW
+#define SSL_R_VERSION_TOO_LOW  396
+#endif
+#ifndef SSL_R_CA_KEY_TOO_SMALL
+#define SSL_R_CA_KEY_TOO_SMALL  397
+#endif
+#ifndef SSL_R_CA_MD_TOO_WEAK
+#define SSL_R_CA_MD_TOO_WEAK  398
+#endif
+#ifndef SSL_R_EE_KEY_TOO_SMALL
+#define SSL_R_EE_KEY_TOO_SMALL  399
+#endif
+#ifndef SSL_R_COOKIE_GEN_CALLBACK_FAILURE
+#define SSL_R_COOKIE_GEN_CALLBACK_FAILURE  400
+#endif
+#ifndef SSL_R_FRAGMENTED_CLIENT_HELLO
+#define SSL_R_FRAGMENTED_CLIENT_HELLO  401
+#endif
+#ifndef SSL_R_INVALID_SEQUENCE_NUMBER
+#define SSL_R_INVALID_SEQUENCE_NUMBER  402
+#endif
+#ifndef SSL_R_NO_VERIFY_COOKIE_CALLBACK
+#define SSL_R_NO_VERIFY_COOKIE_CALLBACK  403
+#endif
+#ifndef SSL_R_FAILED_TO_INIT_ASYNC
+#define SSL_R_FAILED_TO_INIT_ASYNC  405
+#endif
+#ifndef SSL_R_PIPELINE_FAILURE
+#define SSL_R_PIPELINE_FAILURE  406
+#endif
+#ifndef SSL_R_SSL_SESSION_ID_TOO_LONG
+#define SSL_R_SSL_SESSION_ID_TOO_LONG  408
+#endif
+
+// the following defines were added in OpenSSL 1.1.1
+
+#ifndef SSL_R_NO_SUITABLE_KEY_SHARE
+#define SSL_R_NO_SUITABLE_KEY_SHARE                         101
+#endif
+#ifndef SSL_R_BAD_KEY_SHARE
+#define SSL_R_BAD_KEY_SHARE                                 108
+#endif
+#ifndef SSL_R_CANNOT_CHANGE_CIPHER
+#define SSL_R_CANNOT_CHANGE_CIPHER                          109
+#endif
+#ifndef SSL_R_BAD_EXTENSION
+#define SSL_R_BAD_EXTENSION                                 110
+#endif
+#ifndef SSL_R_MISSING_SIGALGS_EXTENSION
+#define SSL_R_MISSING_SIGALGS_EXTENSION                     112
+#endif
+#ifndef SSL_R_BAD_PSK_IDENTITY
+#define SSL_R_BAD_PSK_IDENTITY                              114
+#endif
+#ifndef SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM
+#define SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM               118
+#endif
+#ifndef SSL_R_INVALID_KEY_UPDATE_TYPE
+#define SSL_R_INVALID_KEY_UPDATE_TYPE                       120
+#endif
+#ifndef SSL_R_STILL_IN_INIT
+#define SSL_R_STILL_IN_INIT                                 121
+#endif
+#ifndef SSL_R_BAD_KEY_UPDATE
+#define SSL_R_BAD_KEY_UPDATE                                122
+#endif
+#ifndef SSL_R_TOO_MANY_KEY_UPDATES
+#define SSL_R_TOO_MANY_KEY_UPDATES                          132
+#endif
+#ifndef SSL_R_ILLEGAL_POINT_COMPRESSION
+#define SSL_R_ILLEGAL_POINT_COMPRESSION                     162
+#endif
+#ifndef SSL_R_EXT_LENGTH_MISMATCH
+#define SSL_R_EXT_LENGTH_MISMATCH                           163
+#endif
+#ifndef SSL_R_TOO_MUCH_EARLY_DATA
+#define SSL_R_TOO_MUCH_EARLY_DATA                           164
+#endif
+#ifndef SSL_R_INVALID_MAX_EARLY_DATA
+#define SSL_R_INVALID_MAX_EARLY_DATA                        174
+#endif
+#ifndef SSL_R_UNEXPECTED_END_OF_EARLY_DATA
+#define SSL_R_UNEXPECTED_END_OF_EARLY_DATA                  178
+#endif
+#ifndef SSL_R_NOT_ON_RECORD_BOUNDARY
+#define SSL_R_NOT_ON_RECORD_BOUNDARY                        182
+#endif
+#ifndef SSL_R_BAD_CIPHER
+#define SSL_R_BAD_CIPHER                                    186
+#endif
+#ifndef SSL_R_INVALID_ALERT
+#define SSL_R_INVALID_ALERT                                 205
+#endif
+#ifndef SSL_R_MISSING_SUPPORTED_GROUPS_EXTENSION
+#define SSL_R_MISSING_SUPPORTED_GROUPS_EXTENSION            209
+#endif
+#ifndef SSL_R_NO_CHANGE_FOLLOWING_HRR
+#define SSL_R_NO_CHANGE_FOLLOWING_HRR                       214
+#endif
+#ifndef SSL_R_UNSOLICITED_EXTENSION
+#define SSL_R_UNSOLICITED_EXTENSION                         217
+#endif
+#ifndef SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED
+#define SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED                218
+#endif
+#ifndef SSL_R_BAD_PSK
+#define SSL_R_BAD_PSK                                       219
+#endif
+#ifndef SSL_R_MISSING_SIGNING_CERT
+#define SSL_R_MISSING_SIGNING_CERT                          221
+#endif
+#ifndef SSL_R_INCONSISTENT_EARLY_DATA_ALPN
+#define SSL_R_INCONSISTENT_EARLY_DATA_ALPN                  222
+#endif
+#ifndef SSL_R_INCONSISTENT_EARLY_DATA_SNI
+#define SSL_R_INCONSISTENT_EARLY_DATA_SNI                   231
+#endif
+#ifndef SSL_R_SSL3_EXT_INVALID_MAX_FRAGMENT_LENGTH
+#define SSL_R_SSL3_EXT_INVALID_MAX_FRAGMENT_LENGTH          232
+#endif
+#ifndef SSL_R_BAD_EARLY_DATA
+#define SSL_R_BAD_EARLY_DATA                                233
+#endif
+#ifndef SSL_R_CALLBACK_FAILED
+#define SSL_R_CALLBACK_FAILED                               234
+#endif
+#ifndef SSL_R_NO_APPLICATION_PROTOCOL
+#define SSL_R_NO_APPLICATION_PROTOCOL                       235
+#endif
+#ifndef SSL_R_BAD_HANDSHAKE_STATE
+#define SSL_R_BAD_HANDSHAKE_STATE                           236
+#endif
+#ifndef SSL_R_OVERFLOW_ERROR
+#define SSL_R_OVERFLOW_ERROR                                237
+#endif
+#ifndef SSL_R_INVALID_CERTIFICATE_OR_ALG
+#define SSL_R_INVALID_CERTIFICATE_OR_ALG                    238
+#endif
+#ifndef SSL_R_BAD_PACKET
+#define SSL_R_BAD_PACKET                                    240
+#endif
+#ifndef SSL_R_INSUFFICIENT_SECURITY
+#define SSL_R_INSUFFICIENT_SECURITY                         241
+#endif
+#ifndef SSL_R_BINDER_DOES_NOT_VERIFY
+#define SSL_R_BINDER_DOES_NOT_VERIFY                        253
+#endif
+#ifndef SSL_R_MISSING_FATAL
+#define SSL_R_MISSING_FATAL                                 256
+#endif
+#ifndef SSL_R_INVALID_CCS_MESSAGE
+#define SSL_R_INVALID_CCS_MESSAGE                           260
+#endif
+#ifndef SSL_R_UNEXPECTED_CCS_MESSAGE
+#define SSL_R_UNEXPECTED_CCS_MESSAGE                        262
+#endif
+#ifndef SSL_R_BAD_HRR_VERSION
+#define SSL_R_BAD_HRR_VERSION                               263
+#endif
+#ifndef SSL_R_POST_HANDSHAKE_AUTH_ENCODING_ERR
+#define SSL_R_POST_HANDSHAKE_AUTH_ENCODING_ERR              278
+#endif
+#ifndef SSL_R_EXTENSION_NOT_RECEIVED
+#define SSL_R_EXTENSION_NOT_RECEIVED                        279
+#endif
+#ifndef SSL_R_INVALID_CONTEXT
+#define SSL_R_INVALID_CONTEXT                               282
+#endif
+#ifndef SSL_R_INVALID_CONFIG
+#define SSL_R_INVALID_CONFIG                                283
+#endif
+#ifndef SSL_R_NOT_SERVER
+#define SSL_R_NOT_SERVER                                    284
+#endif
+#ifndef SSL_R_REQUEST_PENDING
+#define SSL_R_REQUEST_PENDING                               285
+#endif
+#ifndef SSL_R_REQUEST_SENT
+#define SSL_R_REQUEST_SENT                                  286
+#endif
+#ifndef SSL_R_NO_COOKIE_CALLBACK_SET
+#define SSL_R_NO_COOKIE_CALLBACK_SET                        287
+#endif
+#ifndef SSL_R_PRIVATE_KEY_MISMATCH
+#define SSL_R_PRIVATE_KEY_MISMATCH                          288
+#endif
+#ifndef SSL_R_NOT_REPLACING_CERTIFICATE
+#define SSL_R_NOT_REPLACING_CERTIFICATE                     289
+#endif
+#ifndef SSL_R_MISSING_PARAMETERS
+#define SSL_R_MISSING_PARAMETERS                            290
+#endif
+#ifndef SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY
+#define SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY           291
+#endif
+#ifndef SSL_R_BAD_LEGACY_VERSION
+#define SSL_R_BAD_LEGACY_VERSION                            292
+#endif
+#ifndef SSL_R_NO_SHARED_GROUPS
+#define SSL_R_NO_SHARED_GROUPS                              410
+#endif
+#ifndef SSL_R_BAD_RECORD_TYPE
+#define SSL_R_BAD_RECORD_TYPE                               443
+#endif
+#ifndef SSL_R_INVALID_SESSION_ID
+#define SSL_R_INVALID_SESSION_ID                            999
+#endif
+#ifndef SSL_R_TLSV13_ALERT_MISSING_EXTENSION
+#define SSL_R_TLSV13_ALERT_MISSING_EXTENSION               1109
+#endif
+#ifndef SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED
+#define SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED            1116
+#endif
+
+// the following defines were added in OpenSSL 3.0
+
+#ifndef SSL_R_MIXED_HANDSHAKE_AND_NON_HANDSHAKE_DATA
+#define SSL_R_MIXED_HANDSHAKE_AND_NON_HANDSHAKE_DATA        293
+#endif
+#ifndef SSL_R_UNEXPECTED_EOF_WHILE_READING
+#define SSL_R_UNEXPECTED_EOF_WHILE_READING                  294
+#endif
+#ifndef SSL_R_NO_SUITABLE_GROUPS
+#define SSL_R_NO_SUITABLE_GROUPS                            295
+#endif
+#ifndef SSL_R_COPY_PARAMETERS_FAILED
+#define SSL_R_COPY_PARAMETERS_FAILED                        296
+#endif
+#ifndef SSL_R_NO_SUITABLE_DIGEST_ALGORITHM
+#define SSL_R_NO_SUITABLE_DIGEST_ALGORITHM                  297
+#endif
+#ifndef SSL_R_CANNOT_GET_GROUP_NAME
+#define SSL_R_CANNOT_GET_GROUP_NAME                         299
+#endif
+
+// X.509 certificate verification errors use condition codes > DCMTLS_EC_SSL_Offset.
+
+makeOFConditionConst( DCMTLS_EC_TLSAppDataInHandshake,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_APP_DATA_IN_HANDSHAKE,                            OF_error, "TLS error: app data in handshake" );
+makeOFConditionConst( DCMTLS_EC_TLSNoSuitableKeyShare,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SUITABLE_KEY_SHARE,                            OF_error, "TLS error: no suitable key share" );
+makeOFConditionConst( DCMTLS_EC_TLSBadDHValue,                             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_DH_VALUE,                                     OF_error, "TLS error: bad dh value" );
+makeOFConditionConst( DCMTLS_EC_TLSBadChangeCipherSpec,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_CHANGE_CIPHER_SPEC,                           OF_error, "TLS error: bad change cipher spec" );
+makeOFConditionConst( DCMTLS_EC_TLSInconsistentExtms,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INCONSISTENT_EXTMS,                               OF_error, "TLS error: inconsistent extms" );
+makeOFConditionConst( DCMTLS_EC_TLSBadHelloRequest,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_HELLO_REQUEST,                                OF_error, "TLS error: bad hello request" );
+makeOFConditionConst( DCMTLS_EC_TLSBadDataReturnedByCallback,              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_DATA_RETURNED_BY_CALLBACK,                    OF_error, "TLS error: bad data returned by callback" );
+makeOFConditionConst( DCMTLS_EC_TLSBadDecompression,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_DECOMPRESSION,                                OF_error, "TLS error: bad decompression" );
+makeOFConditionConst( DCMTLS_EC_TLSBadKeyShare,                            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_KEY_SHARE,                                    OF_error, "TLS error: bad key share" );
+makeOFConditionConst( DCMTLS_EC_TLSCannotChangeCipher,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CANNOT_CHANGE_CIPHER,                             OF_error, "TLS error: cannot change cipher" );
+makeOFConditionConst( DCMTLS_EC_TLSBadExtension,                           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_EXTENSION,                                    OF_error, "TLS error: bad extension" );
+makeOFConditionConst( DCMTLS_EC_TLSBadDigestLength,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_DIGEST_LENGTH,                                OF_error, "TLS error: bad digest length" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingSigalgsExtension,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_SIGALGS_EXTENSION,                        OF_error, "TLS error: missing sigalgs extension" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidConfigurationName,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_CONFIGURATION_NAME,                       OF_error, "TLS error: invalid configuration name" );
+makeOFConditionConst( DCMTLS_EC_TLSBadPSKIdentity,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_PSK_IDENTITY,                                 OF_error, "TLS error: bad psk identity" );
+makeOFConditionConst( DCMTLS_EC_TLSBadPacketLength,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_PACKET_LENGTH,                                OF_error, "TLS error: bad packet length" );
+makeOFConditionConst( DCMTLS_EC_TLSBadProtocolVersionNumber,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_PROTOCOL_VERSION_NUMBER,                      OF_error, "TLS error: bad protocol version number" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLCommandSectionEmpty,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_COMMAND_SECTION_EMPTY,                        OF_error, "TLS error: ssl command section empty" );
+makeOFConditionConst( DCMTLS_EC_TLSNoSuitableSignatureAlgorithm,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM,                  OF_error, "TLS error: no suitable signature algorithm" );
+makeOFConditionConst( DCMTLS_EC_TLSBadRSAEncrypt,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_RSA_ENCRYPT,                                  OF_error, "TLS error: bad rsa encrypt" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidKeyUpdateType,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_KEY_UPDATE_TYPE,                          OF_error, "TLS error: invalid key update type" );
+makeOFConditionConst( DCMTLS_EC_TLSStillInInit,                            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_STILL_IN_INIT,                                    OF_error, "TLS error: still in init" );
+makeOFConditionConst( DCMTLS_EC_TLSBadKeyUpdate,                           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_KEY_UPDATE,                                   OF_error, "TLS error: bad key update" );
+makeOFConditionConst( DCMTLS_EC_TLSBadSignature,                           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_SIGNATURE,                                    OF_error, "TLS error: bad signature" );
+makeOFConditionConst( DCMTLS_EC_TLSBadSSLFiletype,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_SSL_FILETYPE,                                 OF_error, "TLS error: bad ssl filetype" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLCommandSectionNotFound,              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_COMMAND_SECTION_NOT_FOUND,                    OF_error, "TLS error: ssl command section not found" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLSectionEmpty,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SECTION_EMPTY,                                OF_error, "TLS error: ssl section empty" );
+makeOFConditionConst( DCMTLS_EC_TLSBadWriteRetry,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_WRITE_RETRY,                                  OF_error, "TLS error: bad write retry" );
+makeOFConditionConst( DCMTLS_EC_TLSBioNotSet,                              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BIO_NOT_SET,                                      OF_error, "TLS error: bio not set" );
+makeOFConditionConst( DCMTLS_EC_TLSBlockCipherPadIsWrong,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BLOCK_CIPHER_PAD_IS_WRONG,                        OF_error, "TLS error: block cipher pad is wrong" );
+makeOFConditionConst( DCMTLS_EC_TLSBNLib,                                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BN_LIB,                                           OF_error, "TLS error: bn lib" );
+makeOFConditionConst( DCMTLS_EC_TLSCADNLengthMismatch,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CA_DN_LENGTH_MISMATCH,                            OF_error, "TLS error: ca dn length mismatch" );
+makeOFConditionConst( DCMTLS_EC_TLSTooManyKeyUpdates,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TOO_MANY_KEY_UPDATES,                             OF_error, "TLS error: too many key updates" );
+makeOFConditionConst( DCMTLS_EC_TLSCCSReceivedEarly,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CCS_RECEIVED_EARLY,                               OF_error, "TLS error: ccs received early" );
+makeOFConditionConst( DCMTLS_EC_TLSCertificateVerifyFailed,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CERTIFICATE_VERIFY_FAILED,                        OF_error, "TLS error: certificate verify failed" );
+makeOFConditionConst( DCMTLS_EC_TLSCertLengthMismatch,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CERT_LENGTH_MISMATCH,                             OF_error, "TLS error: cert length mismatch" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLSectionNotFound,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SECTION_NOT_FOUND,                            OF_error, "TLS error: ssl section not found" );
+makeOFConditionConst( DCMTLS_EC_TLSCipherCodeWrongLength,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CIPHER_CODE_WRONG_LENGTH,                         OF_error, "TLS error: cipher code wrong length" );
+makeOFConditionConst( DCMTLS_EC_TLSUnknownCommand,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_COMMAND,                                  OF_error, "TLS error: unknown command" );
+makeOFConditionConst( DCMTLS_EC_TLSCompressedLengthTooLong,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COMPRESSED_LENGTH_TOO_LONG,                       OF_error, "TLS error: compressed length too long" );
+makeOFConditionConst( DCMTLS_EC_TLSCompressionFailure,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COMPRESSION_FAILURE,                              OF_error, "TLS error: compression failure" );
+makeOFConditionConst( DCMTLS_EC_TLSCompressionLibraryError,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COMPRESSION_LIBRARY_ERROR,                        OF_error, "TLS error: compression library error" );
+makeOFConditionConst( DCMTLS_EC_TLSAtLeastTLS10NeededInFIPSMode,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_AT_LEAST_TLS_1_0_NEEDED_IN_FIPS_MODE,             OF_error, "TLS error: at least TLS 1.0 needed in FIPS mode" );
+makeOFConditionConst( DCMTLS_EC_TLSConnectionTypeNotSet,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CONNECTION_TYPE_NOT_SET,                          OF_error, "TLS error: connection type not set" );
+makeOFConditionConst( DCMTLS_EC_TLSDataBetweenCCSAndFinished,              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DATA_BETWEEN_CCS_AND_FINISHED,                    OF_error, "TLS error: data between ccs and finished" );
+makeOFConditionConst( DCMTLS_EC_TLSDataLengthTooLong,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DATA_LENGTH_TOO_LONG,                             OF_error, "TLS error: data length too long" );
+makeOFConditionConst( DCMTLS_EC_TLSDecryptionFailed,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DECRYPTION_FAILED,                                OF_error, "TLS error: decryption failed" );
+makeOFConditionConst( DCMTLS_EC_TLSDHPublicValueLengthIsWrong,             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG,                  OF_error, "TLS error: dh public value length is wrong" );
+makeOFConditionConst( DCMTLS_EC_TLSDigestCheckFailed,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DIGEST_CHECK_FAILED,                              OF_error, "TLS error: digest check failed" );
+makeOFConditionConst( DCMTLS_EC_TLSEncryptedLengthTooLong,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ENCRYPTED_LENGTH_TOO_LONG,                        OF_error, "TLS error: encrypted length too long" );
+makeOFConditionConst( DCMTLS_EC_TLSErrorInReceivedCipherList,              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST,                    OF_error, "TLS error: error in received cipher list" );
+makeOFConditionConst( DCMTLS_EC_TLSExcessiveMessageSize,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EXCESSIVE_MESSAGE_SIZE,                           OF_error, "TLS error: excessive message size" );
+makeOFConditionConst( DCMTLS_EC_TLSExtraDataInMessage,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EXTRA_DATA_IN_MESSAGE,                            OF_error, "TLS error: extra data in message" );
+makeOFConditionConst( DCMTLS_EC_TLSGotAFinBeforeACCS,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_GOT_A_FIN_BEFORE_A_CCS,                           OF_error, "TLS error: got a fin before a ccs" );
+makeOFConditionConst( DCMTLS_EC_TLSHTTPSProxyRequest,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_HTTPS_PROXY_REQUEST,                              OF_error, "TLS error: https proxy request" );
+makeOFConditionConst( DCMTLS_EC_TLSHTTPRequest,                            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_HTTP_REQUEST,                                     OF_error, "TLS error: http request" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSInvalidECPointformatList,            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST,                   OF_error, "TLS error: tls invalid ecpointformat list" );
+makeOFConditionConst( DCMTLS_EC_TLSAtLeastTLS12NeededInSuiteBMode,         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE,           OF_error, "TLS error: at least (D)TLS 1.2 needed in Suite B mode" );
+makeOFConditionConst( DCMTLS_EC_TLSLengthMismatch,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_LENGTH_MISMATCH,                                  OF_error, "TLS error: length mismatch" );
+makeOFConditionConst( DCMTLS_EC_TLSLengthTooShort,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_LENGTH_TOO_SHORT,                                 OF_error, "TLS error: length too short" );
+makeOFConditionConst( DCMTLS_EC_TLSLibraryHasNoCiphers,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_LIBRARY_HAS_NO_CIPHERS,                           OF_error, "TLS error: library has no ciphers" );
+makeOFConditionConst( DCMTLS_EC_TLSIllegalPointCompression,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ILLEGAL_POINT_COMPRESSION,                        OF_error, "TLS error: illegal point compression" );
+makeOFConditionConst( DCMTLS_EC_TLSExtLengthMismatch,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EXT_LENGTH_MISMATCH,                              OF_error, "TLS error: ext length mismatch" );
+makeOFConditionConst( DCMTLS_EC_TLSTooMuchEarlyData,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TOO_MUCH_EARLY_DATA,                              OF_error, "TLS error: too much early data" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingDSASigningCert,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_DSA_SIGNING_CERT,                         OF_error, "TLS error: missing dsa signing cert" );
+makeOFConditionConst( DCMTLS_EC_TLSVersionTooHigh,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_VERSION_TOO_HIGH,                                 OF_error, "TLS error: version too high" );
+makeOFConditionConst( DCMTLS_EC_TLSContextNotDANEEnabled,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CONTEXT_NOT_DANE_ENABLED,                         OF_error, "TLS error: context not dane enabled" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingRSACertificate,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_RSA_CERTIFICATE,                          OF_error, "TLS error: missing rsa certificate" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingRSAEncryptingCert,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_RSA_ENCRYPTING_CERT,                      OF_error, "TLS error: missing rsa encrypting cert" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingRSASigningCert,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_RSA_SIGNING_CERT,                         OF_error, "TLS error: missing rsa signing cert" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingTmpDHKey,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_TMP_DH_KEY,                               OF_error, "TLS error: missing tmp dh key" );
+makeOFConditionConst( DCMTLS_EC_TLSDANEAlreadyEnabled,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_ALREADY_ENABLED,                             OF_error, "TLS error: dane already enabled" );
+makeOFConditionConst( DCMTLS_EC_TLSDANECannotOverrideMtypeFull,            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_CANNOT_OVERRIDE_MTYPE_FULL,                  OF_error, "TLS error: dane cannot override mtype full" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidMaxEarlyData,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_MAX_EARLY_DATA,                           OF_error, "TLS error: invalid max early data" );
+makeOFConditionConst( DCMTLS_EC_TLSDANENotEnabled,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_NOT_ENABLED,                                 OF_error, "TLS error: dane not enabled" );
+makeOFConditionConst( DCMTLS_EC_TLSNoCertificatesReturned,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CERTIFICATES_RETURNED,                         OF_error, "TLS error: no certificates returned" );
+makeOFConditionConst( DCMTLS_EC_TLSNoCertificateAssigned,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CERTIFICATE_ASSIGNED,                          OF_error, "TLS error: no certificate assigned" );
+makeOFConditionConst( DCMTLS_EC_TLSUnexpectedEndOfEarlyData,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNEXPECTED_END_OF_EARLY_DATA,                     OF_error, "TLS error: unexpected end of early data" );
+makeOFConditionConst( DCMTLS_EC_TLSNoCertificateSet,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CERTIFICATE_SET,                               OF_error, "TLS error: no certificate set" );
+makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadCertificate,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_CERTIFICATE,                        OF_error, "TLS error: dane tlsa bad certificate" );
+makeOFConditionConst( DCMTLS_EC_TLSNoCiphersAvailable,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CIPHERS_AVAILABLE,                             OF_error, "TLS error: no ciphers available" );
+makeOFConditionConst( DCMTLS_EC_TLSNotOnRecordBoundary,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NOT_ON_RECORD_BOUNDARY,                           OF_error, "TLS error: not on record boundary" );
+makeOFConditionConst( DCMTLS_EC_TLSNoCiphersSpecified,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CIPHERS_SPECIFIED,                             OF_error, "TLS error: no ciphers specified" );
+makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadCertificateUsage,            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_CERTIFICATE_USAGE,                  OF_error, "TLS error: dane tlsa bad certificate usage" );
+makeOFConditionConst( DCMTLS_EC_TLSNoCipherMatch,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CIPHER_MATCH,                                  OF_error, "TLS error: no cipher match" );
+makeOFConditionConst( DCMTLS_EC_TLSBadCipher,                              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_CIPHER,                                       OF_error, "TLS error: bad cipher" );
+makeOFConditionConst( DCMTLS_EC_TLSNoCompressionSpecified,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_COMPRESSION_SPECIFIED,                         OF_error, "TLS error: no compression specified" );
+makeOFConditionConst( DCMTLS_EC_TLSNoMethodSpecified,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_METHOD_SPECIFIED,                              OF_error, "TLS error: no method specified" );
+makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadDataLength,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_DATA_LENGTH,                        OF_error, "TLS error: dane tlsa bad data length" );
+makeOFConditionConst( DCMTLS_EC_TLSNoPrivateKeyAssigned,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_PRIVATE_KEY_ASSIGNED,                          OF_error, "TLS error: no private key assigned" );
+makeOFConditionConst( DCMTLS_EC_TLSNoProtocolsAvailable,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_PROTOCOLS_AVAILABLE,                           OF_error, "TLS error: no protocols available" );
+makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadDigestLength,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_DIGEST_LENGTH,                      OF_error, "TLS error: dane tlsa bad digest length" );
+makeOFConditionConst( DCMTLS_EC_TLSNoSharedCipher,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SHARED_CIPHER,                                 OF_error, "TLS error: no shared cipher" );
+makeOFConditionConst( DCMTLS_EC_TLSExceedsMaxFragmentSize,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EXCEEDS_MAX_FRAGMENT_SIZE,                        OF_error, "TLS error: exceeds max fragment size" );
+makeOFConditionConst( DCMTLS_EC_TLSNullSSLCtx,                             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NULL_SSL_CTX,                                     OF_error, "TLS error: null ssl ctx" );
+makeOFConditionConst( DCMTLS_EC_TLSNullSSLMethodPassed,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NULL_SSL_METHOD_PASSED,                           OF_error, "TLS error: null ssl method passed" );
+makeOFConditionConst( DCMTLS_EC_TLSOldSessionCipherNotReturned,            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED,                  OF_error, "TLS error: old session cipher not returned" );
+makeOFConditionConst( DCMTLS_EC_TLSPacketLengthTooLong,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PACKET_LENGTH_TOO_LONG,                           OF_error, "TLS error: packet length too long" );
+makeOFConditionConst( DCMTLS_EC_TLSPeerDidNotReturnACertificate,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE,                OF_error, "TLS error: peer did not return a certificate" );
+makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadMatchingType,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_MATCHING_TYPE,                      OF_error, "TLS error: dane tlsa bad matching type" );
+makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadPublicKey,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_PUBLIC_KEY,                         OF_error, "TLS error: dane tlsa bad public key" );
+makeOFConditionConst( DCMTLS_EC_TLSDANETLSABadSelector,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_BAD_SELECTOR,                           OF_error, "TLS error: dane tlsa bad selector" );
+makeOFConditionConst( DCMTLS_EC_TLSDANETLSANullData,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DANE_TLSA_NULL_DATA,                              OF_error, "TLS error: dane tlsa null data" );
+makeOFConditionConst( DCMTLS_EC_TLSErrorSettingTLSABaseDomain,             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ERROR_SETTING_TLSA_BASE_DOMAIN,                   OF_error, "TLS error: error setting tlsa base domain" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidAlert,                           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_ALERT,                                    OF_error, "TLS error: invalid alert" );
+makeOFConditionConst( DCMTLS_EC_TLSCustomExtHandlerAlreadyInstalled,       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED,             OF_error, "TLS error: custom ext handler already installed" );
+makeOFConditionConst( DCMTLS_EC_TLSProtocolIsShutdown,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PROTOCOL_IS_SHUTDOWN,                             OF_error, "TLS error: protocol is shutdown" );
+makeOFConditionConst( DCMTLS_EC_TLSSCTVerificationFailed,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SCT_VERIFICATION_FAILED,                          OF_error, "TLS error: sct verification failed" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingSupportedGroupsExtension,        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_SUPPORTED_GROUPS_EXTENSION,               OF_error, "TLS error: missing supported groups extension" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLSessionVersionMismatch,              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SESSION_VERSION_MISMATCH,                     OF_error, "TLS error: ssl session version mismatch" );
+makeOFConditionConst( DCMTLS_EC_TLSReadBioNotSet,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_READ_BIO_NOT_SET,                                 OF_error, "TLS error: read bio not set" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidCTValidationType,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_CT_VALIDATION_TYPE,                       OF_error, "TLS error: invalid ct validation type" );
+makeOFConditionConst( DCMTLS_EC_TLSRecordLengthMismatch,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_RECORD_LENGTH_MISMATCH,                           OF_error, "TLS error: record length mismatch" );
+makeOFConditionConst( DCMTLS_EC_TLSNoChangeFollowingHRR,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CHANGE_FOLLOWING_HRR,                          OF_error, "TLS error: no change following hrr" );
+makeOFConditionConst( DCMTLS_EC_TLSRequiredCipherMissing,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_REQUIRED_CIPHER_MISSING,                          OF_error, "TLS error: required cipher missing" );
+makeOFConditionConst( DCMTLS_EC_TLSNoValidSCTs,                            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_VALID_SCTS,                                    OF_error, "TLS error: no valid scts" );
+makeOFConditionConst( DCMTLS_EC_TLSUnsolicitedExtension,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSOLICITED_EXTENSION,                            OF_error, "TLS error: unsolicited extension" );
+makeOFConditionConst( DCMTLS_EC_TLSCiphersuiteDigestHasChanged,            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED,                   OF_error, "TLS error: ciphersuite digest has changed" );
+makeOFConditionConst( DCMTLS_EC_TLSBadPSK,                                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_PSK,                                          OF_error, "TLS error: bad psk" );
+makeOFConditionConst( DCMTLS_EC_TLSSignatureForNonSigningCertificate,      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE,            OF_error, "TLS error: signature for non signing certificate" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingSigningCert,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_SIGNING_CERT,                             OF_error, "TLS error: missing signing cert" );
+makeOFConditionConst( DCMTLS_EC_TLSInconsistentEarlyDataAlpn,              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INCONSISTENT_EARLY_DATA_ALPN,                     OF_error, "TLS error: inconsistent early data alpn" );
+makeOFConditionConst( DCMTLS_EC_TLSPSKIdentityNotFound,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PSK_IDENTITY_NOT_FOUND,                           OF_error, "TLS error: psk identity not found" );
+makeOFConditionConst( DCMTLS_EC_TLSPSKNoClientCb,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PSK_NO_CLIENT_CB,                                 OF_error, "TLS error: psk no client cb" );
+makeOFConditionConst( DCMTLS_EC_TLSPSKNoServerCb,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PSK_NO_SERVER_CB,                                 OF_error, "TLS error: psk no server cb" );
+makeOFConditionConst( DCMTLS_EC_TLSClienthelloTlsext,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CLIENTHELLO_TLSEXT,                               OF_error, "TLS error: clienthello tlsext" );
+makeOFConditionConst( DCMTLS_EC_TLSParseTlsext,                            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PARSE_TLSEXT,                                     OF_error, "TLS error: parse tlsext" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLCtxHasNoDefaultSSLVersion,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION,               OF_error, "TLS error: ssl ctx has no default ssl version" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLHandshakeFailure,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_HANDSHAKE_FAILURE,                            OF_error, "TLS error: ssl handshake failure" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLLibraryHasNoCiphers,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS,                       OF_error, "TLS error: ssl library has no ciphers" );
+makeOFConditionConst( DCMTLS_EC_TLSInconsistentEarlyDataSNI,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INCONSISTENT_EARLY_DATA_SNI,                      OF_error, "TLS error: inconsistent early data sni" );
+makeOFConditionConst( DCMTLS_EC_TLSSSL3ExtInvalidMaxFragmentLength,        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL3_EXT_INVALID_MAX_FRAGMENT_LENGTH,             OF_error, "TLS error: ssl3 ext invalid max fragment length" );
+makeOFConditionConst( DCMTLS_EC_TLSBadEarlyData,                           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_EARLY_DATA,                                   OF_error, "TLS error: bad early data" );
+makeOFConditionConst( DCMTLS_EC_TLSCallbackFailed,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CALLBACK_FAILED,                                  OF_error, "TLS error: callback failed" );
+makeOFConditionConst( DCMTLS_EC_TLSNoApplicationProtocol,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_APPLICATION_PROTOCOL,                          OF_error, "TLS error: no application protocol" );
+makeOFConditionConst( DCMTLS_EC_TLSBadHandshakeState,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_HANDSHAKE_STATE,                              OF_error, "TLS error: bad handshake state" );
+makeOFConditionConst( DCMTLS_EC_TLSOverflowError,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_OVERFLOW_ERROR,                                   OF_error, "TLS error: overflow error" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidCertificateOrAlg,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_CERTIFICATE_OR_ALG,                       OF_error, "TLS error: invalid certificate or alg" );
+makeOFConditionConst( DCMTLS_EC_TLSUnableToFindPublicKeyParameters,        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS,             OF_error, "TLS error: unable to find public key parameters" );
+makeOFConditionConst( DCMTLS_EC_TLSBadPacket,                              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_PACKET,                                       OF_error, "TLS error: bad packet" );
+makeOFConditionConst( DCMTLS_EC_TLSInsufficientSecurity,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INSUFFICIENT_SECURITY,                            OF_error, "TLS error: insufficient security" );
+makeOFConditionConst( DCMTLS_EC_TLSUnableToLoadSSL3MD5Routines,            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES,                 OF_error, "TLS error: unable to load ssl3 md5 routines" );
+makeOFConditionConst( DCMTLS_EC_TLSUnableToLoadSSL3SHA1Routines,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES,                OF_error, "TLS error: unable to load ssl3 sha1 routines" );
+makeOFConditionConst( DCMTLS_EC_TLSUnexpectedMessage,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNEXPECTED_MESSAGE,                               OF_error, "TLS error: unexpected message" );
+makeOFConditionConst( DCMTLS_EC_TLSUnexpectedRecord,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNEXPECTED_RECORD,                                OF_error, "TLS error: unexpected record" );
+makeOFConditionConst( DCMTLS_EC_TLSUnknownAlertType,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_ALERT_TYPE,                               OF_error, "TLS error: unknown alert type" );
+makeOFConditionConst( DCMTLS_EC_TLSUnknownCertificateType,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_CERTIFICATE_TYPE,                         OF_error, "TLS error: unknown certificate type" );
+makeOFConditionConst( DCMTLS_EC_TLSUnknownCipherReturned,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_CIPHER_RETURNED,                          OF_error, "TLS error: unknown cipher returned" );
+makeOFConditionConst( DCMTLS_EC_TLSUnknownCipherType,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_CIPHER_TYPE,                              OF_error, "TLS error: unknown cipher type" );
+makeOFConditionConst( DCMTLS_EC_TLSUnknownKeyExchangeType,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE,                        OF_error, "TLS error: unknown key exchange type" );
+makeOFConditionConst( DCMTLS_EC_TLSUnknownPkeyType,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_PKEY_TYPE,                                OF_error, "TLS error: unknown pkey type" );
+makeOFConditionConst( DCMTLS_EC_TLSUnknownProtocol,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_PROTOCOL,                                 OF_error, "TLS error: unknown protocol" );
+makeOFConditionConst( DCMTLS_EC_TLSBinderDoesNotVerify,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BINDER_DOES_NOT_VERIFY,                           OF_error, "TLS error: binder does not verify" );
+makeOFConditionConst( DCMTLS_EC_TLSUnknownSSLVersion,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_SSL_VERSION,                              OF_error, "TLS error: unknown ssl version" );
+makeOFConditionConst( DCMTLS_EC_TLSUnknownState,                           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_STATE,                                    OF_error, "TLS error: unknown state" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingFatal,                           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_FATAL,                                    OF_error, "TLS error: missing fatal" );
+makeOFConditionConst( DCMTLS_EC_TLSUnsupportedCompressionAlgorithm,        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM,                OF_error, "TLS error: unsupported compression algorithm" );
+makeOFConditionConst( DCMTLS_EC_TLSUnsupportedProtocol,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSUPPORTED_PROTOCOL,                             OF_error, "TLS error: unsupported protocol" );
+makeOFConditionConst( DCMTLS_EC_TLSUnsupportedSSLVersion,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSUPPORTED_SSL_VERSION,                          OF_error, "TLS error: unsupported ssl version" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidCCSMessage,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_CCS_MESSAGE,                              OF_error, "TLS error: invalid ccs message" );
+makeOFConditionConst( DCMTLS_EC_TLSWrongCipherReturned,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_CIPHER_RETURNED,                            OF_error, "TLS error: wrong cipher returned" );
+makeOFConditionConst( DCMTLS_EC_TLSUnexpectedCCSMessage,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNEXPECTED_CCS_MESSAGE,                           OF_error, "TLS error: unexpected ccs message" );
+makeOFConditionConst( DCMTLS_EC_TLSBadHrrVersion,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_HRR_VERSION,                                  OF_error, "TLS error: bad hrr version" );
+makeOFConditionConst( DCMTLS_EC_TLSWrongSignatureLength,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_SIGNATURE_LENGTH,                           OF_error, "TLS error: wrong signature length" );
+makeOFConditionConst( DCMTLS_EC_TLSWrongSignatureSize,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_SIGNATURE_SIZE,                             OF_error, "TLS error: wrong signature size" );
+makeOFConditionConst( DCMTLS_EC_TLSWrongSSLVersion,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_SSL_VERSION,                                OF_error, "TLS error: wrong ssl version" );
+makeOFConditionConst( DCMTLS_EC_TLSWrongVersionNumber,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_VERSION_NUMBER,                             OF_error, "TLS error: wrong version number" );
+makeOFConditionConst( DCMTLS_EC_TLSX509Lib,                                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_X509_LIB,                                         OF_error, "TLS error: x509 lib" );
+makeOFConditionConst( DCMTLS_EC_TLSX509VerificationSetupProblems,          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_X509_VERIFICATION_SETUP_PROBLEMS,                 OF_error, "TLS error: x509 verification setup problems" );
+makeOFConditionConst( DCMTLS_EC_TLSPathTooLong,                            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PATH_TOO_LONG,                                    OF_error, "TLS error: path too long" );
+makeOFConditionConst( DCMTLS_EC_TLSBadLength,                              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_LENGTH,                                       OF_error, "TLS error: bad length" );
+makeOFConditionConst( DCMTLS_EC_TLSAttemptToReuseSessionInDifferentContext, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT,   OF_error, "TLS error: attempt to reuse session in different context" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLSessionIDContextTooLong,             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SESSION_ID_CONTEXT_TOO_LONG,                  OF_error, "TLS error: ssl session id context too long" );
+makeOFConditionConst( DCMTLS_EC_TLSLibraryBug,                             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_LIBRARY_BUG,                                      OF_error, "TLS error: library bug" );
+makeOFConditionConst( DCMTLS_EC_TLSServerhelloTlsext,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SERVERHELLO_TLSEXT,                               OF_error, "TLS error: serverhello tlsext" );
+makeOFConditionConst( DCMTLS_EC_TLSUninitialized,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNINITIALIZED,                                    OF_error, "TLS error: uninitialized" );
+makeOFConditionConst( DCMTLS_EC_TLSSessionIDContextUninitialized,          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SESSION_ID_CONTEXT_UNINITIALIZED,                 OF_error, "TLS error: session id context uninitialized" );
+makeOFConditionConst( DCMTLS_EC_TLSPostHandshakeAuthEncodingErr,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_POST_HANDSHAKE_AUTH_ENCODING_ERR,                 OF_error, "TLS error: post handshake auth encoding err" );
+makeOFConditionConst( DCMTLS_EC_TLSExtensionNotReceived,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EXTENSION_NOT_RECEIVED,                           OF_error, "TLS error: extension not received" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidCommand,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_COMMAND,                                  OF_error, "TLS error: invalid command" );
+makeOFConditionConst( DCMTLS_EC_TLSDecryptionFailedOrBadRecordMac,         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DECRYPTION_FAILED_OR_BAD_RECORD_MAC,              OF_error, "TLS error: decryption failed or bad record mac" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidContext,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_CONTEXT,                                  OF_error, "TLS error: invalid context" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidConfig,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_CONFIG,                                   OF_error, "TLS error: invalid config" );
+makeOFConditionConst( DCMTLS_EC_TLSNotServer,                              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NOT_SERVER,                                       OF_error, "TLS error: not server" );
+makeOFConditionConst( DCMTLS_EC_TLSRequestPending,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_REQUEST_PENDING,                                  OF_error, "TLS error: request pending" );
+makeOFConditionConst( DCMTLS_EC_TLSRequestSent,                            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_REQUEST_SENT,                                     OF_error, "TLS error: request sent" );
+makeOFConditionConst( DCMTLS_EC_TLSNoCookieCallbackSet,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_COOKIE_CALLBACK_SET,                           OF_error, "TLS error: no cookie callback set" );
+makeOFConditionConst( DCMTLS_EC_TLSPrivateKeyMismatch,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PRIVATE_KEY_MISMATCH,                             OF_error, "TLS error: private key mismatch" );
+makeOFConditionConst( DCMTLS_EC_TLSNotReplacingCertificate,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NOT_REPLACING_CERTIFICATE,                        OF_error, "TLS error: not replacing certificate" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingParameters,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_PARAMETERS,                               OF_error, "TLS error: missing parameters" );
+makeOFConditionConst( DCMTLS_EC_TLSApplicationDataAfterCloseNotify,        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY,              OF_error, "TLS error: application data after close notify" );
+makeOFConditionConst( DCMTLS_EC_TLSBadLegacyVersion,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_LEGACY_VERSION,                               OF_error, "TLS error: bad legacy version" );
+makeOFConditionConst( DCMTLS_EC_TLSMixedHandshakeAndNonHandshakeData,      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MIXED_HANDSHAKE_AND_NON_HANDSHAKE_DATA,           OF_error, "TLS error: mixed handshake and non handshake data" );
+makeOFConditionConst( DCMTLS_EC_TLSUnexpectedEofWhileReading,              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNEXPECTED_EOF_WHILE_READING,                     OF_error, "TLS error: unexpected eof while reading" );
+makeOFConditionConst( DCMTLS_EC_TLSNoSuitableGroups,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SUITABLE_GROUPS,                               OF_error, "TLS error: no suitable groups" );
+makeOFConditionConst( DCMTLS_EC_TLSCopyParametersFailed,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COPY_PARAMETERS_FAILED,                           OF_error, "TLS error: copy parameters failed" );
+makeOFConditionConst( DCMTLS_EC_TLSNoSuitableDigestAlgorithm,              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SUITABLE_DIGEST_ALGORITHM,                     OF_error, "TLS error: no suitable digest algorithm" );
+makeOFConditionConst( DCMTLS_EC_TLSRecordTooSmall,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_RECORD_TOO_SMALL,                                 OF_error, "TLS error: record too small" );
+makeOFConditionConst( DCMTLS_EC_TLSCannotGetGroupName,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CANNOT_GET_GROUP_NAME,                            OF_error, "TLS error: cannot get group name" );
+makeOFConditionConst( DCMTLS_EC_TLSSSL3SessionIDTooLong,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL3_SESSION_ID_TOO_LONG,                         OF_error, "TLS error: ssl3 session id too long" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLSessionIDCallbackFailed,             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SESSION_ID_CALLBACK_FAILED,                   OF_error, "TLS error: ssl session id callback failed" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLSessionIDConflict,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SESSION_ID_CONFLICT,                          OF_error, "TLS error: ssl session id conflict" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLSessionIDHasBadLength,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SESSION_ID_HAS_BAD_LENGTH,                    OF_error, "TLS error: ssl session id has bad length" );
+makeOFConditionConst( DCMTLS_EC_TLSBadECCCert,                             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_ECC_CERT,                                     OF_error, "TLS error: bad ecc cert" );
+makeOFConditionConst( DCMTLS_EC_TLSBadEcpoint,                             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_ECPOINT,                                      OF_error, "TLS error: bad ecpoint" );
+makeOFConditionConst( DCMTLS_EC_TLSCompressionIDNotWithinPrivateRange,     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COMPRESSION_ID_NOT_WITHIN_PRIVATE_RANGE,          OF_error, "TLS error: compression id not within private range" );
+makeOFConditionConst( DCMTLS_EC_TLSCookieMismatch,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COOKIE_MISMATCH,                                  OF_error, "TLS error: cookie mismatch" );
+makeOFConditionConst( DCMTLS_EC_TLSDuplicateCompressionId,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DUPLICATE_COMPRESSION_ID,                         OF_error, "TLS error: duplicate compression id" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingTmpECDHKey,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_TMP_ECDH_KEY,                             OF_error, "TLS error: missing tmp ecdh key" );
+makeOFConditionConst( DCMTLS_EC_TLSReadTimeoutExpired,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_READ_TIMEOUT_EXPIRED,                             OF_error, "TLS error: read timeout expired" );
+makeOFConditionConst( DCMTLS_EC_TLSUnableToFindECDHParameters,             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNABLE_TO_FIND_ECDH_PARAMETERS,                   OF_error, "TLS error: unable to find ecdh parameters" );
+makeOFConditionConst( DCMTLS_EC_TLSUnsupportedEllipticCurve,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSUPPORTED_ELLIPTIC_CURVE,                       OF_error, "TLS error: unsupported elliptic curve" );
+makeOFConditionConst( DCMTLS_EC_TLSECCCertNotForSigning,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ECC_CERT_NOT_FOR_SIGNING,                         OF_error, "TLS error: ecc cert not for signing" );
+makeOFConditionConst( DCMTLS_EC_TLSSSL3ExtInvalidServername,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL3_EXT_INVALID_SERVERNAME,                      OF_error, "TLS error: ssl3 ext invalid servername" );
+makeOFConditionConst( DCMTLS_EC_TLSSSL3ExtInvalidServernameType,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL3_EXT_INVALID_SERVERNAME_TYPE,                 OF_error, "TLS error: ssl3 ext invalid servername type" );
+makeOFConditionConst( DCMTLS_EC_TLSNoRequiredDigest,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_REQUIRED_DIGEST,                               OF_error, "TLS error: no required digest" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidTicketKeysLength,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_TICKET_KEYS_LENGTH,                       OF_error, "TLS error: invalid ticket keys length" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidStatusResponse,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_STATUS_RESPONSE,                          OF_error, "TLS error: invalid status response" );
+makeOFConditionConst( DCMTLS_EC_TLSUnsupportedStatusType,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSUPPORTED_STATUS_TYPE,                          OF_error, "TLS error: unsupported status type" );
+makeOFConditionConst( DCMTLS_EC_TLSNoGostCertificateSentByPeer,            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_GOST_CERTIFICATE_SENT_BY_PEER,                 OF_error, "TLS error: Peer haven't sent GOST certificate, required for selected ciphersuite" );
+makeOFConditionConst( DCMTLS_EC_TLSNoClientCertMethod,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_CLIENT_CERT_METHOD,                            OF_error, "TLS error: no client cert method" );
+makeOFConditionConst( DCMTLS_EC_TLSBadHandshakeLength,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_HANDSHAKE_LENGTH,                             OF_error, "TLS error: bad handshake length" );
+makeOFConditionConst( DCMTLS_EC_TLSDTLSMessageTooBig,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DTLS_MESSAGE_TOO_BIG,                             OF_error, "TLS error: dtls message too big" );
+makeOFConditionConst( DCMTLS_EC_TLSRenegotiateExtTooLong,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_RENEGOTIATE_EXT_TOO_LONG,                         OF_error, "TLS error: renegotiate ext too long" );
+makeOFConditionConst( DCMTLS_EC_TLSRenegotiationEncodingErr,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_RENEGOTIATION_ENCODING_ERR,                       OF_error, "TLS error: renegotiation encoding err" );
+makeOFConditionConst( DCMTLS_EC_TLSRenegotiationMismatch,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_RENEGOTIATION_MISMATCH,                           OF_error, "TLS error: renegotiation mismatch" );
+makeOFConditionConst( DCMTLS_EC_TLSUnsafeLegacyRenegotiationDisabled,      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNSAFE_LEGACY_RENEGOTIATION_DISABLED,             OF_error, "TLS error: unsafe legacy renegotiation disabled" );
+makeOFConditionConst( DCMTLS_EC_TLSNoRenegotiation,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_RENEGOTIATION,                                 OF_error, "TLS error: no renegotiation" );
+makeOFConditionConst( DCMTLS_EC_TLSInconsistentCompression,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INCONSISTENT_COMPRESSION,                         OF_error, "TLS error: inconsistent compression" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidCompressionAlgorithm,            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_COMPRESSION_ALGORITHM,                    OF_error, "TLS error: invalid compression algorithm" );
+makeOFConditionConst( DCMTLS_EC_TLSRequiredCompressionAlgorithmMissing,    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_REQUIRED_COMPRESSION_ALGORITHM_MISSING,           OF_error, "TLS error: required compression algorithm missing" );
+makeOFConditionConst( DCMTLS_EC_TLSCompressionDisabled,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COMPRESSION_DISABLED,                             OF_error, "TLS error: compression disabled" );
+makeOFConditionConst( DCMTLS_EC_TLSOldSessionCompressionAlgorithmNotReturned, OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED,OF_error, "TLS error: old session compression algorithm not returned" );
+makeOFConditionConst( DCMTLS_EC_TLSSCSVReceivedWhenRenegotiating,          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SCSV_RECEIVED_WHEN_RENEGOTIATING,                 OF_error, "TLS error: scsv received when renegotiating" );
+makeOFConditionConst( DCMTLS_EC_TLSBadSRPALength,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_SRP_A_LENGTH,                                 OF_error, "TLS error: bad srp a length" );
+makeOFConditionConst( DCMTLS_EC_TLSBadSrtpMkiValue,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_SRTP_MKI_VALUE,                               OF_error, "TLS error: bad srtp mki value" );
+makeOFConditionConst( DCMTLS_EC_TLSBadSrtpProtectionProfileList,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_SRTP_PROTECTION_PROFILE_LIST,                 OF_error, "TLS error: bad srtp protection profile list" );
+makeOFConditionConst( DCMTLS_EC_TLSEmptySrtpProtectionProfileList,         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EMPTY_SRTP_PROTECTION_PROFILE_LIST,               OF_error, "TLS error: empty srtp protection profile list" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidSrpUsername,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_SRP_USERNAME,                             OF_error, "TLS error: invalid srp username" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingSrpParam,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_SRP_PARAM,                                OF_error, "TLS error: can't find SRP server param" );
+makeOFConditionConst( DCMTLS_EC_TLSNoSrtpProfiles,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SRTP_PROFILES,                                 OF_error, "TLS error: no srtp profiles" );
+makeOFConditionConst( DCMTLS_EC_TLSSignatureAlgorithmsError,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SIGNATURE_ALGORITHMS_ERROR,                       OF_error, "TLS error: signature algorithms error" );
+makeOFConditionConst( DCMTLS_EC_TLSSrpACalc,                               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SRP_A_CALC,                                       OF_error, "TLS error: error with the srp params" );
+makeOFConditionConst( DCMTLS_EC_TLSSrtpCouldNotAllocateProfiles,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SRTP_COULD_NOT_ALLOCATE_PROFILES,                 OF_error, "TLS error: srtp could not allocate profiles" );
+makeOFConditionConst( DCMTLS_EC_TLSSrtpProtectionProfileListTooLong,       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SRTP_PROTECTION_PROFILE_LIST_TOO_LONG,            OF_error, "TLS error: srtp protection profile list too long" );
+makeOFConditionConst( DCMTLS_EC_TLSSrtpUnknownProtectionProfile,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SRTP_UNKNOWN_PROTECTION_PROFILE,                  OF_error, "TLS error: srtp unknown protection profile" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSIllegalExporterLabel,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLS_ILLEGAL_EXPORTER_LABEL,                       OF_error, "TLS error: tls illegal exporter label" );
+makeOFConditionConst( DCMTLS_EC_TLSUnknownDigest,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_DIGEST,                                   OF_error, "TLS error: unknown digest" );
+makeOFConditionConst( DCMTLS_EC_TLSUseSrtpNotNegotiated,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_USE_SRTP_NOT_NEGOTIATED,                          OF_error, "TLS error: use srtp not negotiated" );
+makeOFConditionConst( DCMTLS_EC_TLSWrongSignatureType,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_SIGNATURE_TYPE,                             OF_error, "TLS error: wrong signature type" );
+makeOFConditionConst( DCMTLS_EC_TLSBadSrpParameters,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_SRP_PARAMETERS,                               OF_error, "TLS error: bad srp parameters" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLNegativeLength,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_NEGATIVE_LENGTH,                              OF_error, "TLS error: ssl negative length" );
+makeOFConditionConst( DCMTLS_EC_TLSInappropriateFallback,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INAPPROPRIATE_FALLBACK,                           OF_error, "TLS error: inappropriate fallback" );
+makeOFConditionConst( DCMTLS_EC_TLSECDHRequiredForSuiteBMode,              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ECDH_REQUIRED_FOR_SUITEB_MODE,                    OF_error, "TLS error: ecdh required for suiteb mode" );
+makeOFConditionConst( DCMTLS_EC_TLSNoSharedSignatureAlgorithms,            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SHARED_SIGNATURE_ALGORITHMS,                   OF_error, "TLS error: no shared signature algorithms" );
+makeOFConditionConst( DCMTLS_EC_TLSCertCbError,                            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CERT_CB_ERROR,                                    OF_error, "TLS error: cert cb error" );
+makeOFConditionConst( DCMTLS_EC_TLSWrongCurve,                             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_CURVE,                                      OF_error, "TLS error: wrong curve" );
+makeOFConditionConst( DCMTLS_EC_TLSIllegalSuiteBDigest,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_ILLEGAL_SUITEB_DIGEST,                            OF_error, "TLS error: illegal Suite B digest" );
+makeOFConditionConst( DCMTLS_EC_TLSMissingECDSASigningCert,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_MISSING_ECDSA_SIGNING_CERT,                       OF_error, "TLS error: missing ecdsa signing cert" );
+makeOFConditionConst( DCMTLS_EC_TLSWrongCertificateType,                   OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_WRONG_CERTIFICATE_TYPE,                           OF_error, "TLS error: wrong certificate type" );
+makeOFConditionConst( DCMTLS_EC_TLSBadValue,                               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_VALUE,                                        OF_error, "TLS error: bad value" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidNullCmdName,                     OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_NULL_CMD_NAME,                            OF_error, "TLS error: invalid null cmd name" );
+makeOFConditionConst( DCMTLS_EC_TLSUnknownCmdName,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_UNKNOWN_CMD_NAME,                                 OF_error, "TLS error: unknown cmd name" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidServerinfoData,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_SERVERINFO_DATA,                          OF_error, "TLS error: invalid serverinfo data" );
+makeOFConditionConst( DCMTLS_EC_TLSNoPEMExtensions,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_PEM_EXTENSIONS,                                OF_error, "TLS error: no pem extensions" );
+makeOFConditionConst( DCMTLS_EC_TLSBadData,                                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_DATA,                                         OF_error, "TLS error: bad data" );
+makeOFConditionConst( DCMTLS_EC_TLSPEMNameBadPrefix,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PEM_NAME_BAD_PREFIX,                              OF_error, "TLS error: pem name bad prefix" );
+makeOFConditionConst( DCMTLS_EC_TLSPEMNameTooShort,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PEM_NAME_TOO_SHORT,                               OF_error, "TLS error: pem name too short" );
+makeOFConditionConst( DCMTLS_EC_TLSDHKeyTooSmall,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_DH_KEY_TOO_SMALL,                                 OF_error, "TLS error: dh key too small" );
+makeOFConditionConst( DCMTLS_EC_TLSVersionTooLow,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_VERSION_TOO_LOW,                                  OF_error, "TLS error: version too low" );
+makeOFConditionConst( DCMTLS_EC_TLSCAKeyTooSmall,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CA_KEY_TOO_SMALL,                                 OF_error, "TLS error: ca key too small" );
+makeOFConditionConst( DCMTLS_EC_TLSCAMDTooWeak,                            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_CA_MD_TOO_WEAK,                                   OF_error, "TLS error: ca md too weak" );
+makeOFConditionConst( DCMTLS_EC_TLSEeKeyTooSmall,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_EE_KEY_TOO_SMALL,                                 OF_error, "TLS error: ee key too small" );
+makeOFConditionConst( DCMTLS_EC_TLSCookieGenCallbackFailure,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_COOKIE_GEN_CALLBACK_FAILURE,                      OF_error, "TLS error: cookie gen callback failure" );
+makeOFConditionConst( DCMTLS_EC_TLSFragmentedClientHello,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_FRAGMENTED_CLIENT_HELLO,                          OF_error, "TLS error: fragmented client hello" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidSequenceNumber,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_SEQUENCE_NUMBER,                          OF_error, "TLS error: invalid sequence number" );
+makeOFConditionConst( DCMTLS_EC_TLSNoVerifyCookieCallback,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_VERIFY_COOKIE_CALLBACK,                        OF_error, "TLS error: no verify cookie callback" );
+makeOFConditionConst( DCMTLS_EC_TLSLengthTooLong,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_LENGTH_TOO_LONG,                                  OF_error, "TLS error: length too long" );
+makeOFConditionConst( DCMTLS_EC_TLSFailedToInitAsync,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_FAILED_TO_INIT_ASYNC,                             OF_error, "TLS error: failed to init async" );
+makeOFConditionConst( DCMTLS_EC_TLSPipelineFailure,                        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_PIPELINE_FAILURE,                                 OF_error, "TLS error: pipeline failure" );
+makeOFConditionConst( DCMTLS_EC_TLSShutdownWhileInInit,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SHUTDOWN_WHILE_IN_INIT,                           OF_error, "TLS error: shutdown while in init" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLSessionIDTooLong,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSL_SESSION_ID_TOO_LONG,                          OF_error, "TLS error: ssl session id too long" );
+makeOFConditionConst( DCMTLS_EC_TLSTooManyWarnAlerts,                      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TOO_MANY_WARN_ALERTS,                             OF_error, "TLS error: too many warn alerts" );
+makeOFConditionConst( DCMTLS_EC_TLSNoSharedGroups,                         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_NO_SHARED_GROUPS,                                 OF_error, "TLS error: no shared groups" );
+makeOFConditionConst( DCMTLS_EC_TLSBadRecordType,                          OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_BAD_RECORD_TYPE,                                  OF_error, "TLS error: bad record type" );
+makeOFConditionConst( DCMTLS_EC_TLSInvalidSessionId,                       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_INVALID_SESSION_ID,                               OF_error, "TLS error: invalid session id" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertUnexpectedMessage,            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE,                   OF_error, "TLS alert: unexpected message" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertBadRecordMac,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_BAD_RECORD_MAC,                       OF_error, "TLS alert: bad record mac" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertDecryptionFailed,             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_DECRYPTION_FAILED,                    OF_error, "TLS alert: decryption failed" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertRecordOverflow,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_RECORD_OVERFLOW,                      OF_error, "TLS alert: record overflow" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertDecompressionFailure,         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE,                OF_error, "TLS alert: decompression failure" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertHandshakeFailure,             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE,                    OF_error, "TLS alert: handshake failure" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertNoCertificate,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_NO_CERTIFICATE,                       OF_error, "TLS alert: no certificate" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertBadCertificate,               OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_BAD_CERTIFICATE,                      OF_error, "TLS alert: bad certificate" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertUnsupportedCertificate,       OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE,              OF_error, "TLS alert: unsupported certificate" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertCertificateRevoked,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED,                  OF_error, "TLS alert: certificate revoked" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertCertificateExpired,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED,                  OF_error, "TLS alert: certificate expired" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertCertificateUnknown,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN,                  OF_error, "TLS alert: certificate unknown" );
+makeOFConditionConst( DCMTLS_EC_TLSSSLv3AlertIllegalParameter,             OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER,                    OF_error, "TLS alert: illegal parameter" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertUnknownCa,                    OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_UNKNOWN_CA,                           OF_error, "TLS alert: unknown ca," );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertAccessDenied,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_ACCESS_DENIED,                        OF_error, "TLS alert: access denied" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertDecodeError,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_DECODE_ERROR,                         OF_error, "TLS alert: decode error," );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertDecryptError,                 OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_DECRYPT_ERROR,                        OF_error, "TLS alert: decrypt error" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertExportRestriction,            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_EXPORT_RESTRICTION,                   OF_error, "TLS alert: export restriction" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertProtocolVersion,              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_PROTOCOL_VERSION,                     OF_error, "TLS alert: protocol version" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertInsufficientSecurity,         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_INSUFFICIENT_SECURITY,                OF_error, "TLS alert: insufficient security" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertInternalError,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_INTERNAL_ERROR,                       OF_error, "TLS alert: internal error" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertInappropriateFallback,        OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_INAPPROPRIATE_FALLBACK,               OF_error, "TLS alert: inappropriate fallback" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertUserCancelled,                OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_USER_CANCELLED,                       OF_error, "TLS alert: user cancelled" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1AlertNoRenegotiation,              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_ALERT_NO_RENEGOTIATION,                     OF_error, "TLS alert: no renegotiation" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv13AlertMissingExtension,            OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV13_ALERT_MISSING_EXTENSION,                   OF_error, "TLS alert: missing extension" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1UnsupportedExtension,              OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_UNSUPPORTED_EXTENSION,                      OF_error, "TLS error: unsupported extension" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1CertificateUnobtainable,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_CERTIFICATE_UNOBTAINABLE,                   OF_error, "TLS error: certificate unobtainable" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1UnrecognizedName,                  OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_UNRECOGNIZED_NAME,                          OF_error, "TLS error: unrecognized name" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1BadCertificateStatusResponse,      OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_BAD_CERTIFICATE_STATUS_RESPONSE,            OF_error, "TLS error: bad certificate status response" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv1BadCertificateHashValue,           OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV1_BAD_CERTIFICATE_HASH_VALUE,                 OF_error, "TLS error: bad certificate hash value" );
+makeOFConditionConst( DCMTLS_EC_TLSTLSv13AlertCertificateRequired,         OFM_dcmtls, DCMTLS_EC_SSL_Offset + SSL_R_TLSV13_ALERT_CERTIFICATE_REQUIRED,                OF_error, "TLS alert: certificate required" );
index 6f06c5b7f3425f0c17a0f23559c2dfc7ec43b263..134aae60b74ee0e471918932b0d67a6e176d1c9b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2019, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 #include "dcmtk/dcmtls/tlslayer.h"
 #include "dcmtk/dcmtls/tlsdefin.h"
+#include "dcmtk/dcmtls/tlscond.h"
+#include "dcmtk/ofstd/ofdiag.h"      /* for DCMTK_DIAGNOSTIC macros */
 
 #ifdef WITH_OPENSSL
 
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_WINDOWS_H
 #define WIN32_LEAN_AND_MEAN
@@ -39,35 +38,49 @@ BEGIN_EXTERN_C
 #include <openssl/rand.h>
 #include <openssl/err.h>
 #include <openssl/dh.h>
+#include <openssl/x509_vfy.h>
 END_EXTERN_C
 
+#ifndef X509_V_ERR_UNSPECIFIED
+#define X509_V_ERR_UNSPECIFIED 1
+#endif
+
 #include "dcmtk/dcmtls/tlslayer.h"
 #include "dcmtk/dcmtls/tlstrans.h"
 #include "dcmtk/dcmnet/dicom.h"
+#include "dcmtk/ofstd/ofrand.h"
 
-#ifdef HAVE_SSL_CTX_GET0_PARAM
+#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET0_PARAM
 #define DCMTK_SSL_CTX_get0_param SSL_CTX_get0_param
 #else
-#define DCMTK_SSL_CTX_get0_param(A) A->param;
+#define DCMTK_SSL_CTX_get0_param(A) (A)->param;
 #endif
 
-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
+#ifndef HAVE_OPENSSL_PROTOTYPE_X509_GET_SIGNATURE_NID
 #define X509_get_signature_nid(x509) OBJ_obj2nid((x509)->sig_alg->algorithm)
 #endif
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#ifndef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_GET_CERT_STORE
 #define SSL_CTX_get_cert_store(ctx) (ctx)->cert_store
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_BASE_ID
 #define EVP_PKEY_base_id(key) EVP_PKEY_type((key)->type)
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_DH_BITS
 #define DH_bits(dh) BN_num_bits((dh)->p)
-#define SSL_CTX_get_ciphers(ctx) (ctx)->cipher_list
+#endif
+
+#ifndef HAVE_OPENSSL_PROTOTYPE_X509_STORE_GET0_PARAM
+#define X509_STORE_get0_param(A) (A)->param;
 #endif
 
 extern "C" int DcmTLSTransportLayer_certificateValidationCallback(int ok, X509_STORE_CTX *storeContext);
 
 OFLogger DCM_dcmtlsLogger = OFLog::getLogger("dcmtk.dcmtls");
 
-
-/*  This static function creates a hard-coded set of Diffie-Hellman parameters
+/*  This static sets a hard-coded set of Diffie-Hellman parameters
  *  with 2048 bits key size that is used for ephemeral Diffie-Hellmane
  *  (DHE_) ciphersuites unless the user replaces the parameter set
  *  by calling DcmTLSTransportLayer::setTempDHParameters().
@@ -75,65 +88,45 @@ OFLogger DCM_dcmtlsLogger = OFLog::getLogger("dcmtk.dcmtls");
  *  does not require these parameters to be secret. It is, however, still
  *  preferable to use a user-generated set of parameters.
  *
- *  Generated by calling "openssl dhparam -C -noout 2048".
+ *  Generated by calling "openssl dhparam 2048".
  */
-static DH *get_dh2048()
-{
-    static unsigned char dh2048_p[] = {
-    0xC8, 0x04, 0xF6, 0xBF, 0x4B, 0xA6, 0xBA, 0x24, 0xD8, 0x79,
-    0xA9, 0x70, 0xFF, 0xA0, 0x6B, 0x9F, 0x9D, 0x56, 0x0F, 0x41,
-    0x75, 0x70, 0x69, 0x17, 0xBC, 0x89, 0xB5, 0x38, 0xEE, 0x8A,
-    0xA9, 0x2E, 0xFD, 0xC8, 0xD3, 0xBA, 0x43, 0x77, 0x51, 0x46,
-    0xBF, 0x59, 0xE0, 0x57, 0xFA, 0x55, 0x6A, 0xC2, 0x4B, 0x63,
-    0x24, 0xEE, 0x9E, 0x64, 0x96, 0xBE, 0x13, 0xF7, 0x0B, 0xEC,
-    0x0E, 0xEA, 0xC8, 0x8B, 0x3A, 0x59, 0xB5, 0x28, 0xF6, 0x49,
-    0x40, 0xC7, 0x89, 0x80, 0x39, 0x97, 0x66, 0x7A, 0xC5, 0x90,
-    0xB7, 0x98, 0x3F, 0x11, 0x45, 0xEA, 0xA2, 0xF1, 0x77, 0x7B,
-    0xBE, 0x3F, 0x5A, 0x5C, 0xD5, 0xA4, 0x5F, 0xBA, 0x96, 0x87,
-    0x77, 0x2D, 0x23, 0xA0, 0x56, 0x5B, 0x14, 0x2D, 0xD6, 0x6C,
-    0xF1, 0xCC, 0x0F, 0xD9, 0x7D, 0x42, 0x72, 0x9A, 0x8B, 0xBE,
-    0x3E, 0xCB, 0xB4, 0xE3, 0xB9, 0xA8, 0xC2, 0x8F, 0xBA, 0xEB,
-    0x12, 0xFE, 0x3E, 0x90, 0x4B, 0xDC, 0x8C, 0xA0, 0xD2, 0x26,
-    0x1F, 0x26, 0x78, 0x6E, 0x89, 0x15, 0x59, 0xED, 0x8B, 0x7E,
-    0x00, 0x5E, 0xFF, 0xDB, 0x55, 0x60, 0xE3, 0x52, 0x8A, 0x03,
-    0x9C, 0xE1, 0x33, 0xE6, 0x9F, 0x17, 0x39, 0x42, 0xE7, 0x26,
-    0xAE, 0x3D, 0xC0, 0x66, 0x9F, 0x3C, 0x97, 0xC6, 0x75, 0xAC,
-    0x5B, 0xD1, 0xB2, 0x51, 0xCA, 0xB6, 0x4F, 0xFD, 0xAF, 0x41,
-    0xF8, 0x8B, 0x5A, 0x8D, 0xC7, 0xCA, 0x3A, 0xB7, 0xE3, 0x00,
-    0x7D, 0x20, 0xFA, 0xF1, 0xDE, 0xDA, 0x10, 0xBD, 0x85, 0x09,
-    0xA0, 0xE1, 0x24, 0x18, 0x64, 0x38, 0xBA, 0x1C, 0x16, 0x15,
-    0x71, 0xA6, 0xC2, 0x02, 0xBA, 0x27, 0xF4, 0xE3, 0x3F, 0xA2,
-    0x2E, 0x89, 0xBA, 0xC9, 0xCD, 0x0B, 0x5A, 0x95, 0x26, 0x7D,
-    0x10, 0xBE, 0xE3, 0x96, 0x99, 0x4A, 0x2F, 0xAB, 0x9B, 0xBD,
-    0xD0, 0xB9, 0xDC, 0x43, 0xF9, 0xCB
-    };
-    static unsigned char dh2048_g[] = { 0x02 };
-
-    DH *dh;
-    if ((dh=DH_new()) == NULL) return(NULL);
-
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
-    dh->p=BN_bin2bn(dh2048_p,sizeof(dh2048_p),NULL);
-    dh->g=BN_bin2bn(dh2048_g,sizeof(dh2048_g),NULL);
-    if ((dh->p == NULL) || (dh->g == NULL))
-    {
-      DH_free(dh);
-      return(NULL);
+OFBool DcmTLSTransportLayer::setBuiltInDHParameters()
+{
+  static char dh2048_p[] =
+    "-----BEGIN DH PARAMETERS-----\n"
+    "MIIBCAKCAQEAzEaoIXpuyK2D+If94J2iSxYqi1Ot+HD7FKvszu7Bxlh8izm1nyzk\n"
+    "b0zUJfcXOaxnSsqmfGxLfPRm5+vD3aeD6mugrR1zZSemXUiq6CsONZZQ1MxStJvk\n"
+    "Ems+9qRrbj9tA+/b2dZvUCc1pZAQTkbf7+CcbZnh21jExmDhf5QFZye/y4Arvj+a\n"
+    "CZP/2Hd0veWUv2HzFRm52v0B69Y7I4BEWwGMDkvRREzc05fRAZiDftRLJGSkohLq\n"
+    "65jDLNz4ZgiCvNH5SnixzuUBlys+78XEfWYu6k0FclBEFq+9rVaqugodK/SN0BOA\n"
+    "pOEPHZJ77TwWvHEXA9ShsNjmBkqWK/tnKwIBAg==\n"
+    "-----END DH PARAMETERS-----\n";
+
+  if (transportLayerContext==NULL) return OFFalse;
+  BIO *bio = BIO_new_mem_buf(dh2048_p, sizeof(dh2048_p));
+  if (bio)
+  {
+#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY
+    EVP_PKEY *dhparams = PEM_read_bio_Parameters(bio,NULL);
+    BIO_free(bio);
+    if (dhparams)
+    {
+      SSL_CTX_set0_tmp_dh_pkey(transportLayerContext, dhparams); // transfers ownership of "dhparams" to transportLayerContext
+      return OFTrue;
     }
 #else
-    // API change in OpenSSL 1.1.0: DH is now an opaque type
-    BIGNUM *dhp_bn = BN_bin2bn(dh2048_p, sizeof (dh2048_p), NULL);
-    BIGNUM *dhg_bn = BN_bin2bn(dh2048_g, sizeof (dh2048_g), NULL);
-    if (dhp_bn == NULL || dhg_bn == NULL || !DH_set0_pqg(dh, dhp_bn, NULL, dhg_bn))
+    DH *dhparams = PEM_read_bio_DHparams(bio,NULL,NULL,NULL);
+    BIO_free(bio);
+    if (dhparams)
     {
-        DH_free(dh);
-        BN_free(dhp_bn);
-        BN_free(dhg_bn);
-        return NULL;
+      SSL_CTX_set_tmp_dh(transportLayerContext,dhparams);
+      DH_free(dhparams); /* Safe because of reference counts in OpenSSL */
+      return OFTrue;
     }
 #endif
+  }
 
-    return dh;
+  return OFFalse;
 }
 
 int DcmTLSTransportLayer_certificateValidationCallback(int ok, X509_STORE_CTX * /* storeContext */)
@@ -165,7 +158,7 @@ int DcmTLSTransportLayer_passwordCallback(char *buf, int size, int /* rwflag */,
 
 // The TLS Supported Elliptic Curves extension (RFC 4492) is only supported in OpenSSL 1.0.2 and newer.
 // When compiling with OpenSSL 1.0.1, we are not using computeEllipticCurveList().
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
+#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES
 
 /** determine the list of elliptic curves supported by the OpenSSL library
  *  for use with the TLS elliptic curve extension.
@@ -195,12 +188,14 @@ static void computeEllipticCurveList(OFVector<int>& ecvector)
   };
 
   // create  a SSL context object
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#ifndef HAVE_OPENSSL_PROTOTYPE_TLS_METHOD
    SSL_CTX *ctx = SSL_CTX_new(SSLv23_method());
    if (ctx) SSL_CTX_set_options(ctx, SSL_OP_NO_SSLv2|SSL_OP_NO_SSLv3);
 #else
    SSL_CTX *ctx = SSL_CTX_new(TLS_method());
+#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL
    if (ctx) SSL_CTX_set_security_level(ctx, 0);
+#endif
 #endif
   if (ctx)
   {
@@ -220,7 +215,7 @@ static void computeEllipticCurveList(OFVector<int>& ecvector)
   }
 }
 
-#endif
+#endif /* HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES */
 
 
 DcmTLSTransportLayer::DcmTLSTransportLayer()
@@ -232,6 +227,10 @@ DcmTLSTransportLayer::DcmTLSTransportLayer()
 {
 }
 
+// Depending on the OpenSSL version used, SSL_CTX_set_tmp_ecdh() will
+// cause this warning to be issued. In any case, this can safely be ignored.
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
+
 DcmTLSTransportLayer::DcmTLSTransportLayer(T_ASC_NetworkRole networkRole, const char *randFile, OFBool initOpenSSL)
 : DcmTransportLayer()
 , transportLayerContext(NULL)
@@ -242,7 +241,7 @@ DcmTLSTransportLayer::DcmTLSTransportLayer(T_ASC_NetworkRole networkRole, const
    if (initOpenSSL) initializeOpenSSL();
    if (randFile) seedPRNG(randFile);
 
-#if OPENSSL_VERSION_NUMBER < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
+#ifndef HAVE_OPENSSL_PROTOTYPE_TLS_METHOD
    // on versions of OpenSSL older than 1.1.0, we use the
    // SSLv23 methods and not the TLSv1 methods because the latter
    // only accept TLS 1.0 and prevent the negotiation of newer
@@ -280,33 +279,41 @@ DcmTLSTransportLayer::DcmTLSTransportLayer(T_ASC_NetworkRole networkRole, const
        break;
    }
 
+#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_SECURITY_LEVEL
    // starting with OpenSSL 1.1.0, we explicitly need to set the security level to 0
    // if we want to support any of the NULL ciphersuites. Since we manage the list
    // of supported ciphersuites ourselves and prevent a mix of NULL and non-NULL
    // ciphersuites, this is safe.
    if (transportLayerContext) SSL_CTX_set_security_level(transportLayerContext, 0);
- #endif
+#endif
+#endif /* HAVE_OPENSSL_PROTOTYPE_TLS_METHOD */
 
    if (transportLayerContext == NULL)
    {
-      const char *result = ERR_reason_error_string(ERR_peek_error());
+      const char *result = ERR_reason_error_string(ERR_get_error());
       if (result == NULL) result = "unknown error in SSL_CTX_new()";
       DCMTLS_ERROR("unable to create TLS transport layer: " << result);
    }
    else
    {
      // create default set of DH parameters
-     DH *dhparams = get_dh2048();
-     if (dhparams)
+     if (!setBuiltInDHParameters())
+       DCMTLS_ERROR("unable to create Diffie-Hellman parameters.");
+
+     // set a random 32-bit number as TLS session ID
+     OFRandom rnd;
+     Uint32 session_id = rnd.getRND32();
+     if (0 == SSL_CTX_set_session_id_context(transportLayerContext, OFreinterpret_cast(const unsigned char *, &session_id), sizeof(session_id)))
      {
-       SSL_CTX_set_tmp_dh(transportLayerContext,dhparams);
-       DH_free(dhparams); // safe because of reference counting
+       DCMTLS_ERROR("unable to set TLS session ID context.");
      }
-     else DCMTLS_ERROR("unable to create Diffie-Hellman parameters.");
+
+     // disable session caching (and, thus, session re-use)
+     SSL_CTX_set_session_cache_mode(transportLayerContext, SSL_SESS_CACHE_OFF);
 
      // create Elliptic Curve DH parameters
 #ifndef OPENSSL_NO_ECDH
-#if OPENSSL_VERSION_NUMBER < 0x10002000L || defined(LIBRESSL_VERSION_NUMBER)
+#ifndef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO
      // we create ECDH parameters for the NIST P-256 (secp256r1) curve
      // as recommended by BCP 195.
      EC_KEY  *ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
@@ -323,13 +330,13 @@ DcmTLSTransportLayer::DcmTLSTransportLayer(T_ASC_NetworkRole networkRole, const
     {
       DCMTLS_ERROR("unable to create Elliptic-Curve Diffie-Hellman parameters.");
     }
-#endif /* OPENSSL_VERSION_NUMBER < 0x10002000L */
+#endif /* HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_ECDH_AUTO */
 #endif /* OPENSSL_NO_ECDH */
 
     // set default certificate verification strategy
     setCertificateVerification(DCV_requireCertificate);
 
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
+#if HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS
     // The TLS 1.2 Signature Algorithms extension is only supported in OpenSSL 1.0.2 and newer.
 
     if (networkRole != NET_ACCEPTOR)
@@ -340,7 +347,7 @@ DcmTLSTransportLayer::DcmTLSTransportLayer(T_ASC_NetworkRole networkRole, const
       // support for SHA-384 and SHA-512.
 
       const int slist[] = {NID_sha256, EVP_PKEY_RSA,     NID_sha384, EVP_PKEY_RSA,     NID_sha512, EVP_PKEY_RSA,
-#if OPENSSL_VERSION_NUMBER >= 0x10101000L
+#ifdef HAVE_OPENSSL_PROTOTYPE_EVP_PKEY_RSA_PSS
                            // Connections between a client and a server that both use OpenSSL 1.1.1
                            // will fail unless RSA-PSS is also offered as a signature algorithm.
                            NID_sha256, EVP_PKEY_RSA_PSS, NID_sha384, EVP_PKEY_RSA_PSS, NID_sha512, EVP_PKEY_RSA_PSS,
@@ -354,6 +361,9 @@ DcmTLSTransportLayer::DcmTLSTransportLayer(T_ASC_NetworkRole networkRole, const
       }
     }
 
+#endif /* HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_SIGALGS */
+
+#if HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES
     // The TLS Supported Elliptic Curves extension (RFC 4492) is only supported in OpenSSL 1.0.2 and newer.
 
     // BCP 195: Both clients and servers SHOULD include the "Supported Elliptic Curves" extension.
@@ -369,7 +379,7 @@ DcmTLSTransportLayer::DcmTLSTransportLayer(T_ASC_NetworkRole networkRole, const
         DCMTLS_ERROR("unable to configure the TLS Supported Elliptic Curves extension.");
       }
     }
-#endif /* OPENSSL_VERSION_NUMBER >= 0x10002000L */
+#endif /* HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET1_CURVES */
 
     if (NET_REQUESTOR != networkRole)
     {
@@ -383,10 +393,10 @@ DcmTLSTransportLayer::DcmTLSTransportLayer(T_ASC_NetworkRole networkRole, const
         DCMTLS_ERROR("unable to configure the TLS layer to select ciphersuites by server preference.");
       }
     }
-
   } /* transportLayerContext != NULL */
 }
 
+// move constructor
 DcmTLSTransportLayer::DcmTLSTransportLayer(OFrvalue_ref(DcmTLSTransportLayer) rhs)
 : DcmTransportLayer(OFrvalue_ref_upcast(DcmTransportLayer, rhs))
 , transportLayerContext(rhs.transportLayerContext)
@@ -396,6 +406,7 @@ DcmTLSTransportLayer::DcmTLSTransportLayer(OFrvalue_ref(DcmTLSTransportLayer) rh
   OFrvalue_access(rhs).transportLayerContext = NULL;
 }
 
+// move assignment
 DcmTLSTransportLayer& DcmTLSTransportLayer::operator=(OFrvalue_ref(DcmTLSTransportLayer) rhs)
 {
   if (this != &rhs)
@@ -434,11 +445,35 @@ OFBool DcmTLSTransportLayer::operator!() const
 OFBool DcmTLSTransportLayer::setTempDHParameters(const char *filename)
 {
   if ((filename==NULL)||(transportLayerContext==NULL)) return OFFalse;
-  DH *dh = NULL;
   BIO *bio = BIO_new_file(filename,"r");
   if (bio)
   {
-    dh = PEM_read_bio_DHparams(bio,NULL,NULL,NULL);
+#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET0_TMP_DH_PKEY
+    EVP_PKEY *dh = PEM_read_bio_Parameters(bio,NULL);
+    BIO_free(bio);
+    if (dh)
+    {
+      // check BCP 195 recommendation: With a key exchange based on modular
+      // exponential (MODP) Diffie-Hellman groups ("DHE" cipher suites),
+      // DH key lengths of at least 2048 bits are RECOMMENDED.
+      if (EVP_PKEY_bits(dh) < 2048)
+      {
+          DCMTLS_WARN("Key length of Diffie-Hellman parameter file too short: RFC 7525 recommends at least 2048 bits, but the key in file '"
+          << filename << "' is only " << EVP_PKEY_bits(dh) << " bits.");
+          if (ciphersuites.getTLSProfile() == TSP_Profile_BCP195_Extended)
+          {
+              // Extended BCP 195 profile: Reject DH parameter set, because it has less than 2048 bits
+              // This will cause the default DH parameter set (which is large enough) to be used
+              EVP_PKEY_free(dh);
+              return OFFalse;
+          }
+      }
+
+      SSL_CTX_set0_tmp_dh_pkey(transportLayerContext, dh); // transfers ownership of "dh" to transportLayerContext
+      return OFTrue;
+    }
+#else
+    DH *dh = PEM_read_bio_DHparams(bio,NULL,NULL,NULL);
     BIO_free(bio);
     if (dh)
     {
@@ -461,6 +496,7 @@ OFBool DcmTLSTransportLayer::setTempDHParameters(const char *filename)
       DH_free(dh); /* Safe because of reference counts in OpenSSL */
       return OFTrue;
     }
+#endif
   }
   return OFFalse;
 }
@@ -511,7 +547,7 @@ void DcmTLSTransportLayer::setCertificateVerification(DcmCertificateVerification
   return;
 }
 
-DcmTransportLayerStatus DcmTLSTransportLayer::activateCipherSuites()
+OFCondition DcmTLSTransportLayer::activateCipherSuites()
 {
   OFString cslist;
   ciphersuites.getListOfCipherSuitesForOpenSSL(cslist, (role != NET_REQUESTOR));
@@ -519,14 +555,12 @@ DcmTransportLayerStatus DcmTLSTransportLayer::activateCipherSuites()
   {
     if (!SSL_CTX_set_cipher_list(transportLayerContext, cslist.c_str()))
     {
-      const char *err = ERR_reason_error_string(ERR_peek_error());
-      if (err) DCMTLS_ERROR("OpenSSL error: " << err);
-      return TCS_tlsError;
+      return convertOpenSSLError(ERR_get_error(), OFTrue);
     }
 
     SSL_CTX_set_options(transportLayerContext, ciphersuites.getTLSOptions());
 
-#if OPENSSL_VERSION_NUMBER >= 0x10101000L && !defined(LIBRESSL_VERSION_NUMBER)
+#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_CTX_SET_MAX_PROTO_VERSION
     // when compiling with OpenSSL 1.1.1 or newer, set the maximum supported
     // TLS protocol version to TLS 1.2 if required (i.e. for the historic
     // security profiles, which would otherwise show unexpected behaviour).
@@ -535,23 +569,21 @@ DcmTransportLayerStatus DcmTLSTransportLayer::activateCipherSuites()
       SSL_CTX_set_max_proto_version(transportLayerContext, TLS1_2_VERSION);
     }
 #endif
-  } else return TCS_illegalCall;
+  } else return EC_IllegalCall;
 
-  return TCS_ok;
+  return EC_Normal;
 }
 
-DcmTransportLayerStatus DcmTLSTransportLayer::setCipherSuites(const char *suites)
+OFCondition DcmTLSTransportLayer::setCipherSuites(const char *suites)
 {
   if (transportLayerContext && suites)
   {
     if (!SSL_CTX_set_cipher_list(transportLayerContext, suites))
     {
-      const char *err = ERR_reason_error_string(ERR_peek_error());
-      if (err) DCMTLS_ERROR("OpenSSL error: " << err);
-      return TCS_tlsError;
+      return convertOpenSSLError(ERR_get_error(), OFTrue);
     }
-  } else return TCS_illegalCall;
-  return TCS_ok;
+  } else return EC_IllegalCall;
+  return EC_Normal;
 }
 
 DcmTLSTransportLayer::~DcmTLSTransportLayer()
@@ -559,29 +591,29 @@ DcmTLSTransportLayer::~DcmTLSTransportLayer()
   clear();
 }
 
-DcmTransportLayerStatus DcmTLSTransportLayer::setPrivateKeyFile(const char *fileName, DcmKeyFileFormat fileType)
+OFCondition DcmTLSTransportLayer::setPrivateKeyFile(const char *fileName, DcmKeyFileFormat fileType)
 {
   if (transportLayerContext)
   {
     if (0 >= SSL_CTX_use_PrivateKey_file(transportLayerContext, fileName, lookupOpenSSLCertificateFormat(fileType)))
     {
-      const char *err = ERR_reason_error_string(ERR_peek_error());
-      if (err) DCMTLS_ERROR("OpenSSL error: " << err);
-      return TCS_tlsError;
+      return convertOpenSSLError(ERR_get_error(), OFTrue);
     }
-  } else return TCS_illegalCall;
-  return TCS_ok;
+  } else return EC_IllegalCall;
+  return EC_Normal;
 }
 
-DcmTransportLayerStatus DcmTLSTransportLayer::setCertificateFile(const char *fileName, DcmKeyFileFormat fileType)
+OFCondition DcmTLSTransportLayer::setCertificateFile(const char *fileName, DcmKeyFileFormat fileType)
 {
   if (transportLayerContext)
   {
+    // we load the first certificate from the file and check the key length
+    // and hash key against RFC 7525 recommendations.
     int result = 0;
     X509 *certificate = loadCertificateFile(fileName, fileType);
     if (certificate)
     {
-      // TODO: Check if the certificate is RSA, and if so, if the public key is >= 2048 bits
+      // Check if the certificate is RSA, and if so, if the public key is >= 2048 bits
       int bits = getRSAKeySize(certificate);
       if ((bits > 0) && (bits < 2048))
       {
@@ -594,18 +626,29 @@ DcmTransportLayerStatus DcmTLSTransportLayer::setCertificateFile(const char *fil
         DCMTLS_WARN("Certificate hash key not SHA-256: RFC 7525 recommends the use of SHA-256 for RSA certificates, but certificate file '"
           << fileName << "' uses '" << hash << "'.");
       }
-      result = SSL_CTX_use_certificate(transportLayerContext, certificate); // copies certificate into context
+
+      if (fileType == DCF_Filetype_PEM)
+      {
+        // This will load the file again, this time processing multiple certificates
+        // that might be present, establishing a full certificate chain.
+        // This function only works with PEM files.
+        result = SSL_CTX_use_certificate_chain_file(transportLayerContext, fileName);
+      }
+      else
+      {
+        // copy certificate into the SSL context
+        result = SSL_CTX_use_certificate(transportLayerContext, certificate);
+      }
       X509_free(certificate);
+
     } else result = -1;
 
     if (result <= 0)
     {
-      const char *err = ERR_reason_error_string(ERR_peek_error());
-      if (err) DCMTLS_ERROR("OpenSSL error: " << err);
-      return TCS_tlsError;
+      return convertOpenSSLError(ERR_get_error(), OFTrue);
     }
-  } else return TCS_illegalCall;
-  return TCS_ok;
+  } else return EC_IllegalCall;
+  return EC_Normal;
 }
 
 OFBool DcmTLSTransportLayer::checkPrivateKeyMatchesCertificate()
@@ -617,55 +660,79 @@ OFBool DcmTLSTransportLayer::checkPrivateKeyMatchesCertificate()
   return OFFalse;
 }
 
-DcmTransportLayerStatus DcmTLSTransportLayer::addVerificationFlags(unsigned long flags)
+OFCondition DcmTLSTransportLayer::addVerificationFlags(unsigned long flags)
 {
   X509_VERIFY_PARAM* const parameter = DCMTK_SSL_CTX_get0_param(transportLayerContext);
-  return parameter && X509_VERIFY_PARAM_set_flags(parameter,flags) ? TCS_ok : TCS_unspecifiedError;
+  return parameter && X509_VERIFY_PARAM_set_flags(parameter,flags) ? EC_Normal : DCMTLS_EC_FailedToSetVerificationMode;
 }
 
-DcmTransportLayerStatus DcmTLSTransportLayer::addTrustedCertificateFile(const char *fileName, DcmKeyFileFormat fileType)
+OFCondition DcmTLSTransportLayer::setCRLverification(DcmTLSCRLVerification crlmode)
+{
+  X509_VERIFY_PARAM* const parameter = DCMTK_SSL_CTX_get0_param(transportLayerContext);
+  if (parameter)
+  {
+    unsigned long flags = X509_VERIFY_PARAM_get_flags(parameter);
+    switch (crlmode)
+    {
+      case TCR_noCRL:
+        flags &= ~X509_V_FLAG_CRL_CHECK;
+        flags &= ~X509_V_FLAG_CRL_CHECK_ALL;
+        break;
+      case TCR_checkLeafCRL:
+        flags |= X509_V_FLAG_CRL_CHECK;
+        flags &= ~X509_V_FLAG_CRL_CHECK_ALL;
+        break;
+      case TCR_checkAllCRL:
+        flags |= X509_V_FLAG_CRL_CHECK;
+        flags |= X509_V_FLAG_CRL_CHECK_ALL;
+        break;
+    }
+    return X509_VERIFY_PARAM_set_flags(parameter,flags) ? EC_Normal : DCMTLS_EC_FailedToSetVerificationMode;
+  }
+  return EC_IllegalCall;
+}
+
+OFCondition DcmTLSTransportLayer::addTrustedCertificateFile(const char *fileName, DcmKeyFileFormat fileType)
 {
   if (transportLayerContext)
   {
     X509_LOOKUP *x509_lookup = X509_STORE_add_lookup(SSL_CTX_get_cert_store(transportLayerContext), X509_LOOKUP_file());
     if (x509_lookup == NULL)
     {
-      const char *err = ERR_reason_error_string(ERR_peek_error());
-      if (err) DCMTLS_ERROR("OpenSSL error: " << err);
-      return TCS_tlsError;
+      return convertOpenSSLError(ERR_get_error(), OFTrue);
     }
     if (! X509_LOOKUP_load_file(x509_lookup, fileName, lookupOpenSSLCertificateFormat(fileType)))
     {
-      const char *err = ERR_reason_error_string(ERR_peek_error());
-      if (err) DCMTLS_ERROR("OpenSSL error: " << err);
-      return TCS_tlsError;
+      return convertOpenSSLError(ERR_get_error(), OFTrue);
     }
-  } else return TCS_illegalCall;
-  return TCS_ok;
+  } else return EC_IllegalCall;
+  return EC_Normal;
 }
 
-DcmTransportLayerStatus DcmTLSTransportLayer::addTrustedCertificateDir(const char *pathName, DcmKeyFileFormat fileType)
+OFCondition DcmTLSTransportLayer::addCertificateRevocationList(const char *fileName, DcmKeyFileFormat fileType)
+{
+  // OpenSSL uses the same X509_LOOKUP_load_file() function for both certificates and CRLs
+  return addTrustedCertificateFile(fileName, fileType);
+}
+
+OFCondition DcmTLSTransportLayer::addTrustedCertificateDir(const char *pathName, DcmKeyFileFormat fileType)
 {
   if (transportLayerContext)
   {
     X509_LOOKUP *x509_lookup = X509_STORE_add_lookup(SSL_CTX_get_cert_store(transportLayerContext), X509_LOOKUP_hash_dir());
     if (x509_lookup == NULL)
     {
-      const char *err = ERR_reason_error_string(ERR_peek_error());
-      if (err) DCMTLS_ERROR("OpenSSL error: " << err);
-      return TCS_tlsError;
+      return convertOpenSSLError(ERR_get_error(), OFTrue);
     }
     if (! X509_LOOKUP_add_dir(x509_lookup, pathName, lookupOpenSSLCertificateFormat(fileType)))
     {
-      const char *err = ERR_reason_error_string(ERR_peek_error());
-      if (err) DCMTLS_ERROR("OpenSSL error: " << err);
-      return TCS_tlsError;
+      return convertOpenSSLError(ERR_get_error(), OFTrue);
     }
-  } else return TCS_illegalCall;
-  return TCS_ok;
+  } else return EC_IllegalCall;
+  return EC_Normal;
 }
 
-DcmTransportLayerStatus DcmTLSTransportLayer::addTrustedClientCertificateFile(const char *fileName)
+OFCondition DcmTLSTransportLayer::addTrustedClientCertificateFile(const char *fileName)
 {
   if (transportLayerContext)
   {
@@ -682,8 +749,8 @@ DcmTransportLayerStatus DcmTLSTransportLayer::addTrustedClientCertificateFile(co
     }
     sk_X509_NAME_pop_free(newCaNames,X509_NAME_free);
     SSL_CTX_set_client_CA_list(transportLayerContext,caNames);
-  } else return TCS_illegalCall;
-  return TCS_ok;
+  } else return EC_IllegalCall;
+  return EC_Normal;
 }
 
 DcmTransportConnection *DcmTLSTransportLayer::createConnection(DcmNativeSocketType openSocket, OFBool useSecureLayer)
@@ -721,7 +788,7 @@ void DcmTLSTransportLayer::seedPRNG(const char *randFile)
 #endif
   if (randFile)
   {
-#ifdef HAVE_RAND_EGD
+#ifdef HAVE_OPENSSL_PROTOTYPE_RAND_EGD
     if (RAND_egd(randFile) <= 0)
 #endif
     {
@@ -823,7 +890,7 @@ OFString DcmTLSTransportLayer::dumpX509Certificate(X509 *peerCertificate)
   }
 }
 
-DcmTransportLayerStatus DcmTLSTransportLayer::setTLSProfile(DcmTLSSecurityProfile profile)
+OFCondition DcmTLSTransportLayer::setTLSProfile(DcmTLSSecurityProfile profile)
 {
   return ciphersuites.setTLSProfile(profile);
 }
@@ -833,7 +900,7 @@ void DcmTLSTransportLayer::clearTLSProfile()
   ciphersuites.clearTLSProfile();
 }
 
-DcmTransportLayerStatus DcmTLSTransportLayer::addCipherSuite(const char *suite)
+OFCondition DcmTLSTransportLayer::addCipherSuite(const char *suite)
 {
   return ciphersuites.addCipherSuite(suite);
 }
@@ -926,6 +993,195 @@ X509 *DcmTLSTransportLayer::loadCertificateFile(const char *fileName, DcmKeyFile
   return result;
 }
 
+OFCondition DcmTLSTransportLayer::verifyClientCertificate(const char *fileName, DcmKeyFileFormat fileType)
+{
+  OFCondition result = EC_IllegalCall;
+  if (transportLayerContext && fileName)
+  {
+    X509_STORE *trustStore = SSL_CTX_get_cert_store(transportLayerContext);
+    if (trustStore)
+    {
+
+      // for some reason, the SSL context and the X509_STORE within that
+      // context have different X509_VERIFY_PARAM parameter sets, in particular
+      // they have different verification flags. We copy the flags from the
+      // SSL context to the X509_STORE and restore the original value
+      // after certificate verification.
+      X509_VERIFY_PARAM *vparam_ssl = DCMTK_SSL_CTX_get0_param(transportLayerContext);
+      X509_VERIFY_PARAM *vparam_store = X509_STORE_get0_param(trustStore);
+      unsigned long ssl_vparam_flags = 0;
+      unsigned long store_vparam_flags = 0;
+      if (vparam_ssl) ssl_vparam_flags = X509_VERIFY_PARAM_get_flags(vparam_ssl);
+      if (vparam_store)
+      {
+        store_vparam_flags = X509_VERIFY_PARAM_get_flags(vparam_store);
+        X509_VERIFY_PARAM_set_flags(vparam_store, ssl_vparam_flags);
+      }
+
+      X509_STORE_CTX *storeCtx = X509_STORE_CTX_new();
+      if (storeCtx)
+      {
+        // we have a trust store and a context object for certificate verification.
+        // Now let's load the client certificate chain
+        X509 *clientCert = NULL;
+        STACK_OF(X509) *chain = sk_X509_new(NULL);
+        BIO *in=BIO_new_file(fileName, "rb");
+        if (in)
+        {
+          if (fileType == DCF_Filetype_ASN1)
+          {
+            clientCert = d2i_X509_bio(in,NULL);
+            if (clientCert == NULL)
+            {
+              result = DCMTLS_EC_FailedToLoadCertificate(fileName);
+              DCMTLS_ERROR("Not a DER certificate file: '" << fileName << "'");
+            }
+          }
+          else if (fileType == DCF_Filetype_PEM)
+          {
+            clientCert = PEM_read_bio_X509(in, NULL, NULL, NULL);
+            if (clientCert == NULL)
+            {
+              result = DCMTLS_EC_FailedToLoadCertificate(fileName);
+              DCMTLS_ERROR("Not a PEM certificate file: '" << fileName << "'");
+            }
+            // in a PEM file, a certificate chain may follow after the client certificate.
+            X509 *chainCert = NULL;
+            while (NULL != (chainCert = PEM_read_bio_X509(in, NULL, NULL, NULL)))
+            {
+              sk_X509_push(chain, chainCert);
+            }
+          }
+          BIO_free(in);
+        }
+        else
+        {
+          result = DCMTLS_EC_FailedToLoadCertificate(fileName);
+          DCMTLS_ERROR("Cannot open certificate file '" << fileName << "'");
+        }
+        if (clientCert)
+        {
+          if (X509_STORE_CTX_init(storeCtx, trustStore, clientCert, chain))
+          {
+            if (X509_verify_cert(storeCtx))
+            {
+              result = EC_Normal;
+            }
+            else
+            {
+              result = convertOpenSSLX509VerificationError(X509_STORE_CTX_get_error(storeCtx), OFTrue);
+            }
+          }
+          else
+          {
+            result = DCMTLS_EC_CertStoreCtxInitFailed;
+            DCMTLS_ERROR("certificate store context initialization failed");
+          }
+          X509_free(clientCert);
+        }
+
+        X509_STORE_CTX_free(storeCtx);
+        sk_X509_pop_free(chain, X509_free);
+      }
+
+      // restore original value of X509 store flags
+      if (vparam_store)
+      {
+        X509_VERIFY_PARAM_set_flags(vparam_store, store_vparam_flags);
+      }
+
+    }
+  }
+  return result;
+}
+
+OFCondition DcmTLSTransportLayer::isRootCertificate(const char *fileName, DcmKeyFileFormat fileType)
+{
+  OFCondition result = EC_IllegalCall;
+  if (fileName)
+  {
+    X509_STORE *trustStore = X509_STORE_new();
+    X509_STORE_CTX *storeCtx = X509_STORE_CTX_new();
+    if (trustStore && storeCtx)
+    {
+      // we have a trust store and a context object for certificate verification.
+      // Now let's load the client certificate
+      X509 *clientCert = loadCertificateFile(fileName, fileType);
+      if (clientCert == NULL)
+      {
+        result = DCMTLS_EC_FailedToLoadCertificate(fileName);
+        DCMTLS_ERROR("Cannot read certificate file '" << fileName << "'");
+      }
+      else
+      {
+        if (X509_STORE_add_cert(trustStore, clientCert))
+        {
+          if (X509_STORE_CTX_init(storeCtx, trustStore, clientCert, NULL))
+          {
+            if (X509_verify_cert(storeCtx)) result = EC_Normal;
+              else result = convertOpenSSLX509VerificationError(X509_STORE_CTX_get_error(storeCtx), OFFalse);
+          } else result = DCMTLS_EC_CertStoreCtxInitFailed;
+        } else result = DCMTLS_EC_FailedToLoadCertificate(fileName);;
+      }
+      X509_free(clientCert);
+    }
+    if (storeCtx) X509_STORE_CTX_free(storeCtx);
+    if (trustStore) X509_STORE_free(trustStore);
+  }
+  return result;
+}
+
+OFCondition DcmTLSTransportLayer::convertOpenSSLError(unsigned long errorCode, OFBool logAsError)
+{
+    if (errorCode == 0) return EC_Normal;
+
+    const char *err = ERR_reason_error_string(errorCode);
+    if (err == NULL) err = "OpenSSL error";
+
+    // we generate special error codes for SSL errors
+    if (ERR_LIB_SSL == ERR_GET_LIB(errorCode))
+    {
+
+      OFOStringStream os;
+      os << "TLS error: " << err;
+
+      OFCondition cond;
+      OFSTRINGSTREAM_GETSTR( os, c )
+      if (logAsError) DCMTLS_ERROR(c);
+      cond = makeOFCondition(OFM_dcmtls, DCMTLS_EC_SSL_Offset + ERR_GET_REASON(errorCode), OF_error,  c);
+      OFSTRINGSTREAM_FREESTR( c )
+
+      return cond;
+    }
+    else
+    {
+      if (logAsError) DCMTLS_ERROR("OpenSSL error " << STD_NAMESPACE hex << STD_NAMESPACE setfill('0') << STD_NAMESPACE setw(8) << errorCode << ": " << err);
+
+      // we return a generic OpenSSL error for all other OpenSSL sublibraries
+      return DCMTLS_EC_GenericOpenSSLError(errorCode);
+    }
+}
+
+OFCondition DcmTLSTransportLayer::convertOpenSSLX509VerificationError(int errorCode, OFBool logAsError)
+{
+    if (errorCode == 0) return EC_Normal;
+
+    // check if this is a known error code, map to "unspecified error" otherwise and print a warning
+    if (errorCode > DCMTLS_EC_X509Verify_Max)
+    {
+      DCMTLS_WARN("Unsupported OpenSSL X.509 verification error code " << errorCode << "; mapped to DCMTLS_EC_X509VerifyUnspecified.");
+      errorCode = X509_V_ERR_UNSPECIFIED;
+    }
+
+    // retrieve error string
+    const char *err = X509_verify_cert_error_string(errorCode);
+    if (err == NULL) err = "unspecified error.";
+
+    if (logAsError) DCMTLS_ERROR("certificate verification failed: " << err);
+
+    return makeOFCondition(OFM_dcmtls, OFstatic_cast(Uint16, DCMTLS_EC_X509Verify_Offset + errorCode), OF_error,  err);
+}
+
 void DcmTLSTransportLayer::initializeOpenSSL()
 {
   // the call to SSL_library_init was not needed in OpenSSL versions prior to 0.9.8,
index b9fa2a8a7d0c34ebf4a8eb15108fe8bdb380583c..3d4965a3ab896c33cb658e6621a3fb0f89ea4ebc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017-2020, OFFIS e.V.
+ *  Copyright (C) 2017-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -33,14 +33,14 @@ void DcmTLSOptions::printLibraryVersion()
 #endif // WITH_OPENSSL
 }
 
-DcmTLSOptions::DcmTLSOptions(T_ASC_NetworkRole networkRole)
 #ifdef WITH_OPENSSL
+DcmTLSOptions::DcmTLSOptions(T_ASC_NetworkRole networkRole)
 : opt_keyFileFormat( DCF_Filetype_PEM )
 , opt_doAuthenticate( OFFalse )
 , opt_privateKeyFile( OFnullptr )
 , opt_certificateFile( OFnullptr )
 , opt_passwd( OFnullptr )
-, opt_tlsProfile( TSP_Profile_BCP195 ) // default: BCP 195 profile
+, opt_tlsProfile( TSP_Profile_BCP195_ND ) // default: BCP 195 ND profile
 , opt_readSeedFile( OFnullptr )
 , opt_writeSeedFile( OFnullptr )
 , opt_certVerification( DCV_requireCertificate )
@@ -48,6 +48,8 @@ DcmTLSOptions::DcmTLSOptions(T_ASC_NetworkRole networkRole)
 , opt_secureConnection( OFFalse ) // default: no secure connection
 , opt_networkRole( networkRole )
 , tLayer( OFnullptr )
+#else
+DcmTLSOptions::DcmTLSOptions(T_ASC_NetworkRole /* networkRole */)
 #endif
 {
 }
@@ -59,9 +61,9 @@ DcmTLSOptions::~DcmTLSOptions()
 #endif
 }
 
+#ifdef WITH_OPENSSL
 void DcmTLSOptions::addTLSCommandlineOptions(OFCommandLine& cmd)
 {
-#ifdef WITH_OPENSSL
   DcmTLSCiphersuiteHandler csh;
 
   cmd.addGroup("transport layer security (TLS) options:");
@@ -87,9 +89,13 @@ void DcmTLSOptions::addTLSCommandlineOptions(OFCommandLine& cmd)
                                                        "add certificate file to list of certificates");
       cmd.addOption("--add-cert-dir",       "+cd",  1, "[d]irectory: string",
                                                        "add certificates in d to list of certificates");
+      cmd.addOption("--add-crl-file",       "+crl", 1, "[f]ilename: string",
+                                                       "add certificate revocation list file\n(implies --enable-crl-vfy)");
+      cmd.addOption("--enable-crl-vfy",     "+crv",    "enable leaf CRL verification");
+      cmd.addOption("--enable-crl-all",     "+cra",    "enable full chain CRL verification");
     cmd.addSubGroup("security profile:");
-      cmd.addOption("--profile-bcp195",     "+px",     "BCP 195 TLS Profile (default)");
-      cmd.addOption("--profile-bcp195-nd",  "+py",     "Non-downgrading BCP 195 TLS Profile");
+      cmd.addOption("--profile-bcp195-nd",  "+py",     "Non-downgrading BCP 195 TLS Profile (default)");
+      cmd.addOption("--profile-bcp195",     "+px",     "BCP 195 TLS Profile");
       cmd.addOption("--profile-bcp195-ex",  "+pz",     "Extended BCP 195 TLS Profile");
       if (csh.cipher3DESsupported())
       {
@@ -127,13 +133,16 @@ void DcmTLSOptions::addTLSCommandlineOptions(OFCommandLine& cmd)
         cmd.addOption("--verify-peer-cert", "-vc",     "verify peer certificate if present");
       }
       cmd.addOption("--ignore-peer-cert",   "-ic",     "don't verify peer certificate");
-
-#endif // WITH_OPENSSL
 }
+#else
+void DcmTLSOptions::addTLSCommandlineOptions(OFCommandLine& /* cmd */)
+{
+}
+#endif // WITH_OPENSSL
 
+#ifdef WITH_OPENSSL
 void DcmTLSOptions::parseArguments(OFConsoleApplication& app, OFCommandLine& cmd)
 {
-#ifdef WITH_OPENSSL
     DcmTLSCiphersuiteHandler csh;
 
     const char *tlsopts = (opt_networkRole == NET_REQUESTOR ?
@@ -275,23 +284,40 @@ void DcmTLSOptions::parseArguments(OFConsoleApplication& app, OFCommandLine& cmd
       app.checkDependence("--add-cert-file", tlsopts, opt_secureConnection);
     if (cmd.findOption("--add-cert-dir", 0, OFCommandLine::FOM_First))
       app.checkDependence("--add-cert-dir", tlsopts, opt_secureConnection);
+    if (cmd.findOption("--add-crl-file", 0, OFCommandLine::FOM_First))
+      app.checkDependence("--add-crl-file", tlsopts, opt_secureConnection);
+
+    cmd.beginOptionBlock();
+    if (cmd.findOption("--enable-crl-vfy", 0, OFCommandLine::FOM_First))
+      app.checkDependence("--enable-crl-vfy", tlsopts, opt_secureConnection);
+    if (cmd.findOption("--enable-crl-all", 0, OFCommandLine::FOM_First))
+    {
+      app.checkDependence("--enable-crl-all", tlsopts, opt_secureConnection);
+      app.checkConflict("--enable-crl-all", "--enable-crl-vfy", cmd.findOption("--enable-crl-vfy", 0, OFCommandLine::FOM_First));
+    }
+    cmd.endOptionBlock();
+
     if (cmd.findOption("--cipher", 0, OFCommandLine::FOM_First))
     {
       app.checkDependence("--cipher", tlsopts, opt_secureConnection);
       app.checkConflict("--cipher", "--profile-bcp195-ex", (opt_tlsProfile == TSP_Profile_BCP195_Extended));
     }
-
-#endif
 }
+#else
+void DcmTLSOptions::parseArguments(OFConsoleApplication& /* app */, OFCommandLine& /* cmd */)
+{
+}
+#endif
 
+#ifdef WITH_OPENSSL
 OFCondition DcmTLSOptions::createTransportLayer(
       T_ASC_Network *net,
       T_ASC_Parameters *params,
       OFConsoleApplication& app,
       OFCommandLine& cmd)
 {
+    DcmTLSCRLVerification crlmode = TCR_noCRL;
 
-#ifdef WITH_OPENSSL
     if (opt_secureConnection)
     {
       delete tLayer;
@@ -304,7 +330,7 @@ OFCondition DcmTLSOptions::createTransportLayer(
         do
         {
           app.checkValue(cmd.getValue(current));
-          if (TCS_ok != tLayer->addTrustedCertificateFile(current, opt_keyFileFormat))
+          if (tLayer->addTrustedCertificateFile(current, opt_keyFileFormat).bad())
           {
               DCMTLS_WARN("unable to load certificate file '" << current << "', ignoring");
           }
@@ -317,30 +343,56 @@ OFCondition DcmTLSOptions::createTransportLayer(
         do
         {
           app.checkValue(cmd.getValue(current));
-          if (TCS_ok != tLayer->addTrustedCertificateDir(current, opt_keyFileFormat))
+          if (tLayer->addTrustedCertificateDir(current, opt_keyFileFormat).bad())
           {
             DCMTLS_WARN("unable to load certificates from directory '" << current << "', ignoring");
           }
         } while (cmd.findOption("--add-cert-dir", 0, OFCommandLine::FOM_Next));
       }
 
+      if (cmd.findOption("--add-crl-file", 0, OFCommandLine::FOM_First))
+      {
+        const char *current = NULL;
+        do
+        {
+          app.checkValue(cmd.getValue(current));
+          if (tLayer->addCertificateRevocationList(current, opt_keyFileFormat).bad())
+          {
+              DCMTLS_WARN("unable to load CRL file '" << current << "', ignoring");
+          }
+          crlmode = TCR_checkLeafCRL;
+        } while (cmd.findOption("--add-crl-file", 0, OFCommandLine::FOM_Next));
+      }
+
+      // set CRL verification mode
+      if (cmd.findOption( "--enable-crl-vfy" )) crlmode = TCR_checkLeafCRL;
+      if (cmd.findOption( "--enable-crl-all" )) crlmode = TCR_checkAllCRL;
+      tLayer->setCRLverification(crlmode);
+
+      OFCondition cond;
       if (opt_doAuthenticate)
       {
         if (opt_passwd)
            tLayer->setPrivateKeyPasswd(opt_passwd);
            else tLayer->setPrivateKeyPasswdFromConsole();
 
-        if (TCS_ok != tLayer->setPrivateKeyFile(opt_privateKeyFile, opt_keyFileFormat))
-           return DCMTLS_EC_FailedToLoadPrivateKey( opt_privateKeyFile );
-        if (TCS_ok != tLayer->setCertificateFile(opt_certificateFile, opt_keyFileFormat))
-           return DCMTLS_EC_FailedToLoadCertificate( opt_certificateFile );
+        cond = tLayer->setPrivateKeyFile(opt_privateKeyFile, opt_keyFileFormat);
+
+        // replace the low-level error message with an easier to understand one
+        if (cond.bad()) return DCMTLS_EC_FailedToLoadPrivateKey( opt_privateKeyFile );
+
+        cond = tLayer->setCertificateFile(opt_certificateFile, opt_keyFileFormat);
+
+        // replace the low-level error message with an easier to understand one
+        if (cond.bad()) DCMTLS_EC_FailedToLoadCertificate( opt_certificateFile );
+
         if (! tLayer->checkPrivateKeyMatchesCertificate())
            return DCMTLS_EC_MismatchedPrivateKeyAndCertificate( opt_privateKeyFile, opt_certificateFile );
       }
 
       // set TLS profile
-      if (TCS_ok != tLayer->setTLSProfile(opt_tlsProfile))
-         return DCMTLS_EC_FailedToSetCiphersuites;
+      cond =  tLayer->setTLSProfile(opt_tlsProfile);
+      if (cond.bad()) return cond;
 
       // add additional ciphersuites
       if (cmd.findOption("--cipher", 0, OFCommandLine::FOM_First))
@@ -349,13 +401,13 @@ OFCondition DcmTLSOptions::createTransportLayer(
         do
         {
           app.checkValue(cmd.getValue(current));
-          if (TCS_ok != tLayer->addCipherSuite(current))
-             return DCMTLS_EC_UnknownCiphersuite( current );
+          cond = tLayer->addCipherSuite(current);
+          if (cond.bad()) return cond;
         } while (cmd.findOption("--cipher", 0, OFCommandLine::FOM_Next));
       }
 
-      if (TCS_ok != tLayer->activateCipherSuites())
-         return DCMTLS_EC_FailedToSetCiphersuites;
+      cond = tLayer->activateCipherSuites();
+      if (cond.bad()) return cond;
 
       // Loading of DH parameters should happen after the call to setTLSProfile()
       // because otherwise we cannot check profile specific restrictions
@@ -366,38 +418,55 @@ OFCondition DcmTLSOptions::createTransportLayer(
 
       if (net)
       {
-        OFCondition cond = ASC_setTransportLayer(net, tLayer, 0);
+        cond = ASC_setTransportLayer(net, tLayer, 0);
         if (cond.bad()) return cond;
       }
 
       if (params)
       {
-        OFCondition cond2 = ASC_setTransportLayerType(params, opt_secureConnection);
-        if (cond2.bad()) return cond2;
+        cond = ASC_setTransportLayerType(params, opt_secureConnection);
+        if (cond.bad()) return cond;
       }
     }
-
-#endif // WITH_OPENSSL
     return EC_Normal;
 }
+#else
+OFCondition DcmTLSOptions::createTransportLayer(
+      T_ASC_Network * /* net */,
+      T_ASC_Parameters * /* params */,
+      OFConsoleApplication& /* app */,
+      OFCommandLine& /* cmd */)
+{
+    return EC_Normal;
+}
+#endif
 
+#ifdef WITH_OPENSSL
 OFBool DcmTLSOptions::listOfCiphersRequested(OFCommandLine& cmd)
 {
-#ifdef WITH_OPENSSL
   if (cmd.findOption("--list-ciphers")) return OFTrue;
-#endif
   return OFFalse;
 }
+#else
+OFBool DcmTLSOptions::listOfCiphersRequested(OFCommandLine& /* cmd */)
+{
+  return OFFalse;
+}
+#endif
 
+#ifdef WITH_OPENSSL
 void DcmTLSOptions::printSupportedCiphersuites(OFConsoleApplication& app, STD_NAMESPACE ostream& os)
 {
-#ifdef WITH_OPENSSL
   DcmTLSCiphersuiteHandler csh;
   app.printHeader(OFTrue /*print host identifier*/);
   os << OFendl << "Supported TLS ciphersuites are:" << OFendl;
   csh.printSupportedCiphersuites(os);
-#endif
 }
+#else
+void DcmTLSOptions::printSupportedCiphersuites(OFConsoleApplication& /* app */, STD_NAMESPACE ostream& /* os */)
+{
+}
+#endif
 
 OFBool DcmTLSOptions::secureConnectionRequested() const
 {
@@ -427,8 +496,33 @@ OFCondition DcmTLSOptions::writeRandomSeed()
             if( ! tLayer->writeRandomSeed( opt_writeSeedFile ) )
                 return DCMTLS_EC_FailedToWriteRandomSeedFile( opt_writeSeedFile );
         }
-        else return DCMTLS_EC_FailedToWriteRandomSeedFile;
+        else return DCMTLS_EC_FailedToWriteRandomSeedFile( opt_writeSeedFile );
     }
 #endif
     return EC_Normal;
 }
+
+#ifdef WITH_OPENSSL
+OFCondition DcmTLSOptions::verifyClientCertificate(const char *fileName)
+{
+  if (tLayer) return tLayer->verifyClientCertificate(fileName, opt_keyFileFormat);
+  return EC_IllegalCall;
+}
+#else
+OFCondition DcmTLSOptions::verifyClientCertificate(const char * /* fileName */)
+{
+  return EC_IllegalCall;
+}
+#endif
+
+#ifdef WITH_OPENSSL
+OFCondition DcmTLSOptions::isRootCertificate(const char *fileName)
+{
+  return DcmTLSTransportLayer::isRootCertificate(fileName, opt_keyFileFormat);
+}
+#else
+OFCondition DcmTLSOptions::isRootCertificate(const char * /* fileName */)
+{
+  return EC_IllegalCall;
+}
+#endif
index c4d833979cfc0d9726f05fd6a1b3aab75a9fba1e..ba7e913c00bc048634937018d232cfa1583c50c6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2010-2019, OFFIS e.V.
+ *  Copyright (C) 2010-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,6 +25,7 @@
 #ifdef WITH_OPENSSL
 #include "dcmtk/dcmtls/tlsscu.h"
 #include "dcmtk/dcmnet/diutil.h"    /* for dcmnet logger */
+#include "dcmtk/dcmtls/tlscond.h"   /* for error constants */
 
 BEGIN_EXTERN_C
 #include <openssl/ssl.h>
@@ -97,14 +98,14 @@ OFCondition DcmTLSSCU::initNetwork()
   OFListIterator(OFString) certFile = m_trustedCertFiles.begin();
   while (certFile != m_trustedCertFiles.end())
   {
-    if (TCS_ok != m_tLayer->addTrustedCertificateFile( (*certFile).c_str(), m_certKeyFileFormat))
+    if (m_tLayer->addTrustedCertificateFile( (*certFile).c_str(), m_certKeyFileFormat).bad())
       DCMNET_WARN("Unable to load certificate file '" << *certFile << "', ignoring");
     certFile++;
   }
   OFListIterator(OFString) certDir = m_trustedCertDirs.begin();
   while (certDir != m_trustedCertDirs.end())
   {
-    if (TCS_ok != m_tLayer->addTrustedCertificateDir( (*certDir).c_str(), m_certKeyFileFormat))
+    if (m_tLayer->addTrustedCertificateDir( (*certDir).c_str(), m_certKeyFileFormat).bad())
       DCMNET_WARN("Unable to load certificates from directory '" << *certDir<< "', ignoring");
   }
 
@@ -117,22 +118,22 @@ OFCondition DcmTLSSCU::initNetwork()
     if (m_passwd) m_tLayer->setPrivateKeyPasswd(m_passwd);
 
     // Set file that contains the private key
-    if ( cond.good() && (TCS_ok != m_tLayer->setPrivateKeyFile(m_privateKeyFile.c_str(), m_privateKeyFileFormat)) )
+    if (cond.good()) cond = m_tLayer->setPrivateKeyFile(m_privateKeyFile.c_str(), m_privateKeyFileFormat);
+    if (cond.bad())
     {
       DCMTLS_ERROR("Unable to create TLS transport layer for SCP: Unable to load private TLS key from file " << m_privateKeyFile);
-      cond = EC_IllegalCall; // TODO: need to find better error code
     }
     // Set file that contains host certificate
-    if ( cond.good() && (TCS_ok != m_tLayer->setCertificateFile(m_certificateFile.c_str(), m_certKeyFileFormat)) )
+    if (cond.good()) cond = m_tLayer->setCertificateFile(m_certificateFile.c_str(), m_certKeyFileFormat);
+    if (cond.bad())
     {
       DCMTLS_ERROR("Unable to load SCP certificate from file " << m_certificateFile);
-      cond = EC_IllegalCall; // TODO: need to find better error code
     }
     // Set whether private key fits with certificate
     if (! m_tLayer->checkPrivateKeyMatchesCertificate() && cond.good())
     {
       DCMTLS_ERROR("Private key from file " << m_privateKeyFile << " and certificate from file " << m_certificateFile << " do not match");
-      cond = EC_IllegalCall; // TODO: need to find better error code
+      cond = DCMTLS_EC_MismatchedPrivateKeyAndCertificate( m_privateKeyFile.c_str(), m_certificateFile.c_str() );
     }
   }
 
@@ -249,20 +250,20 @@ void DcmTLSSCU::disableAuthentication()
   m_doAuthenticate = OFFalse;
 }
 
-DcmTransportLayerStatus DcmTLSSCU::addCipherSuite(const OFString& suite)
+OFCondition DcmTLSSCU::addCipherSuite(const OFString& suite)
 {
   if (m_tLayer)
      return m_tLayer->addCipherSuite(suite.c_str());
-     else return TCS_illegalCall;
+     else return EC_IllegalCall;
 }
 
-DcmTransportLayerStatus DcmTLSSCU::setTLSProfile(DcmTLSSecurityProfile profile)
+OFCondition DcmTLSSCU::setTLSProfile(DcmTLSSecurityProfile profile)
 {
   if (m_tLayer)
   {
     m_tLayer->setTLSProfile(profile);
-    return TCS_ok;
-  } else return TCS_illegalCall;
+    return EC_Normal;
+  } else return EC_IllegalCall;
 }
 
 void DcmTLSSCU::setReadSeedFile(const OFString& seedFile)
index a97ee6d31bc48d485bf9462f6d4bc69b9ff5b237..c095b9c71f13f02f862263c1fcb7399f10d02a66 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2018, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include <winsock2.h>
 #endif
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CERRNO
-#define INCLUDE_CSIGNAL
-#define INCLUDE_CTIME
-#include "dcmtk/ofstd/ofstdinc.h"
 
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TIME_H
@@ -60,12 +53,74 @@ END_EXTERN_C
 #include "dcmtk/dcmtls/tlslayer.h"
 #include "dcmtk/dcmnet/dcompat.h"    /* to make sure we have a select prototype */
 #include "dcmtk/dcmnet/diutil.h"
+#include "dcmtk/dcmtls/tlscond.h"
+
+static OFCondition convertSSLError(int sslError)
+{
+  unsigned long e;
+  switch (sslError)
+  {
+    case SSL_ERROR_NONE:
+      return EC_Normal;
+      break;
+    case SSL_ERROR_SYSCALL:
+      // there may or may not be an error code in the error queue.
+      // If there is an error, report it; otherwise report a generic OpenSSL I/O error.
+      e = ERR_get_error();
+      if (e == 0)
+        return DCMTLS_EC_OpenSSLIOError;
+        else return DcmTLSTransportLayer::convertOpenSSLError(e, OFFalse);
+      break;
+    case SSL_ERROR_SSL:
+      return DcmTLSTransportLayer::convertOpenSSLError(ERR_get_error(), OFFalse);
+      break;
+    case SSL_ERROR_WANT_READ:
+      return DCMTLS_EC_TLSReadOperationDidNotComplete;
+      break;
+    case SSL_ERROR_WANT_WRITE:
+      return DCMTLS_EC_TLSWriteOperationDidNotComplete;
+      break;
+    case SSL_ERROR_WANT_X509_LOOKUP:
+      return DCMTLS_EC_TLSX509LookupOperationDidNotComplete;
+      break;
+    case SSL_ERROR_ZERO_RETURN:
+      return DCMTLS_EC_TLSConnectionClosedByPeer;
+      break;
+    case SSL_ERROR_WANT_CONNECT:
+      return DCMTLS_EC_TLSConnectOperationDidNotComplete;
+      break;
+    case SSL_ERROR_WANT_ACCEPT:
+      return DCMTLS_EC_TLSAcceptOperationDidNotComplete;
+      break;
+
+#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC
+    // SSL_ERROR_WANT_ASYNC is defined starting with OpenSSL 1.1.0
+    case SSL_ERROR_WANT_ASYNC:
+      return DCMTLS_EC_TLSAsyncOperationDidNotComplete;
+      break;
+#endif
+
+#ifdef HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_ASYNC_JOB
+    // SSL_ERROR_WANT_ASYNC_JOB is defined starting with OpenSSL 1.1.0
+    case SSL_ERROR_WANT_ASYNC_JOB:
+      return DCMTLS_EC_TLSAsyncJobCouldNotBeStarted;
+      break;
+#endif
+
+#if HAVE_OPENSSL_PROTOTYPE_SSL_ERROR_WANT_CLIENT_HELLO_CB
+    // SSL_ERROR_WANT_CLIENT_HELLO_CB is defined starting with OpenSSL 1.1.1
+    case SSL_ERROR_WANT_CLIENT_HELLO_CB:
+      return DCMTLS_EC_TLSClientHelloCallbackNeeded;
+      break;
+#endif
+  }
+  return DCMTLS_EC_OtherSSLError;
+}
 
 
 DcmTLSConnection::DcmTLSConnection(DcmNativeSocketType openSocket, SSL *newTLSConnection)
 : DcmTransportConnection(openSocket)
 , tlsConnection(newTLSConnection)
-, lastError(0)
 {
 }
 
@@ -74,116 +129,39 @@ DcmTLSConnection::~DcmTLSConnection()
   close();
 }
 
-DcmTransportLayerStatus DcmTLSConnection::serverSideHandshake()
+OFCondition DcmTLSConnection::serverSideHandshake()
 {
-  if (tlsConnection == NULL) return TCS_noConnection;
-  DcmTransportLayerStatus result = TCS_ok;
-  lastError = 0;
-  switch (SSL_get_error(tlsConnection, SSL_accept(tlsConnection)))
-  {
-    case SSL_ERROR_NONE:
-      /* success */
-      logTLSConnection();
-      break;
-    case SSL_ERROR_SYSCALL:
-    case SSL_ERROR_SSL:
-      lastError = ERR_peek_error();
-      result = TCS_tlsError;
-      break;
-    default:
-      // case SSL_ERROR_WANT_READ:
-      // case SSL_ERROR_WANT_WRITE:
-      // case SSL_ERROR_WANT_X509_LOOKUP:
-      // case SSL_ERROR_WANT_CONNECT:
-      // case SSL_ERROR_ZERO_RETURN:
-      result = TCS_tlsError;
-      break;
-  }
+  if (tlsConnection == NULL) return DCMTLS_EC_NoTLSTransportConnectionPresent;
+  int result = SSL_get_error(tlsConnection, SSL_accept(tlsConnection));
 
   // if the certificate verification has failed, the certificate is already
   // unavailable at this point. We know that something has gone wrong, but
   // OpenSSL does not tell us who tried to connect.
+  if (result == SSL_ERROR_NONE) logTLSConnection();
 
-  return result;
+  return convertSSLError(result);
 }
 
-DcmTransportLayerStatus DcmTLSConnection::clientSideHandshake()
+OFCondition DcmTLSConnection::clientSideHandshake()
 {
   DCMTLS_TRACE("Starting TLS client handshake");
-  if (tlsConnection == NULL) return TCS_noConnection;
-  lastError = 0;
-  DcmTransportLayerStatus result = TCS_ok;
-  switch (SSL_get_error(tlsConnection, SSL_connect(tlsConnection)))
-  {
-    case SSL_ERROR_NONE:
-      logTLSConnection();
-      /* success */
-      break;
-    case SSL_ERROR_SYSCALL:
-    case SSL_ERROR_SSL:
-      lastError = ERR_peek_error();
-      result = TCS_tlsError;
-      break;
-    default:
-      // case SSL_ERROR_WANT_READ:
-      // case SSL_ERROR_WANT_WRITE:
-      // case SSL_ERROR_WANT_X509_LOOKUP:
-      // case SSL_ERROR_WANT_CONNECT:
-      // case SSL_ERROR_ZERO_RETURN:
-      result = TCS_tlsError;
-      break;
-  }
-  return result;
+  if (tlsConnection == NULL) return DCMTLS_EC_NoTLSTransportConnectionPresent;
+  int result = SSL_get_error(tlsConnection, SSL_connect(tlsConnection));
+  if (result == SSL_ERROR_NONE) logTLSConnection();
+
+  return convertSSLError(result);
 }
 
-DcmTransportLayerStatus DcmTLSConnection::renegotiate(const char *newSuite)
+OFCondition DcmTLSConnection::renegotiate(const char *newSuite)
 {
-  if (tlsConnection == NULL) return TCS_noConnection;
-  if (newSuite == NULL) return TCS_illegalCall;
-  DcmTransportLayerStatus result = TCS_ok;
-
-  switch (SSL_get_error(tlsConnection, SSL_set_cipher_list(tlsConnection, newSuite)))
-  {
-    case SSL_ERROR_NONE:
-      /* success */
-      break;
-    case SSL_ERROR_SYSCALL:
-    case SSL_ERROR_SSL:
-      lastError = ERR_peek_error();
-      result = TCS_tlsError;
-      break;
-    default:
-      // case SSL_ERROR_WANT_READ:
-      // case SSL_ERROR_WANT_WRITE:
-      // case SSL_ERROR_WANT_X509_LOOKUP:
-      // case SSL_ERROR_WANT_CONNECT:
-      // case SSL_ERROR_ZERO_RETURN:
-      result = TCS_tlsError;
-      break;
-  }
-  if (result != TCS_ok) return result;
+  if (tlsConnection == NULL) return DCMTLS_EC_NoTLSTransportConnectionPresent;
+  if (newSuite == NULL) return EC_IllegalCall;
 
-  switch (SSL_get_error(tlsConnection, SSL_renegotiate(tlsConnection)))
-  {
-    case SSL_ERROR_NONE:
-      /* success */
-      break;
-    case SSL_ERROR_SYSCALL:
-    case SSL_ERROR_SSL:
-      lastError = ERR_peek_error();
-      result = TCS_tlsError;
-      break;
-    default:
-      // case SSL_ERROR_WANT_READ:
-      // case SSL_ERROR_WANT_WRITE:
-      // case SSL_ERROR_WANT_X509_LOOKUP:
-      // case SSL_ERROR_WANT_CONNECT:
-      // case SSL_ERROR_ZERO_RETURN:
-      result = TCS_tlsError;
-      break;
-  }
+  int result = SSL_get_error(tlsConnection, SSL_set_cipher_list(tlsConnection, newSuite));
+  if (result != SSL_ERROR_NONE) return convertSSLError(result);
 
-  return result;
+  result = SSL_get_error(tlsConnection, SSL_renegotiate(tlsConnection));
+  return convertSSLError(result);
 }
 
 ssize_t DcmTLSConnection::read(void *buf, size_t nbyte)
@@ -208,15 +186,21 @@ void DcmTLSConnection::close()
     SSL_free(tlsConnection);
     tlsConnection = NULL;
   }
-  if (getSocket()!=-1)
+  closeTransportConnection();
+}
+
+void DcmTLSConnection::closeTransportConnection()
+{
+  if (getSocket() != -1)
   {
 #ifdef HAVE_WINSOCK_H
-    (void) shutdown(getSocket(),  1 /* SD_SEND */);
+    (void) shutdown(getSocket(), 1 /* SD_SEND */);
     (void) closesocket(getSocket());
 #else
     (void) ::close(getSocket());
 #endif
-    setSocket(-1);
+  /* forget about this socket (now closed) */
+    setSocket(OFstatic_cast(DcmNativeSocketType, (-1)));
   }
 }
 
@@ -337,34 +321,6 @@ OFString& DcmTLSConnection::dumpConnectionParameters(OFString& str)
   return str;
 }
 
-const char *DcmTLSConnection::errorString(DcmTransportLayerStatus code)
-{
-  switch (code)
-  {
-    case TCS_ok:
-      return "no error";
-      /* break; */
-    case TCS_noConnection:
-      return "no secure connection in place";
-      /* break; */
-    case TCS_tlsError:
-      if (lastError)
-      {
-        const char *result = ERR_reason_error_string(lastError);
-        if (result) return result;
-      }
-      return "unspecified TLS error";
-      /* break; */
-    case TCS_illegalCall:
-      return "illegal call";
-      /* break; */
-    case TCS_unspecifiedError:
-      return "unspecified error";
-      /* break; */
-  }
-  return "unknown error code";
-}
-
 void DcmTLSConnection::logTLSConnection()
 {
   OFString s;
index 0d8c7d2b29b3c813eb3da8293c981e47f2e8d8aa..84c48fc5afc9ad642c6cddd4b28caeced96cedf3 100644 (file)
@@ -1,5 +1,5 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(dcmtls_tests tests tscuscptls)
+DCMTK_ADD_EXECUTABLE(dcmtls_tests tests.cc tscuscptls.cc)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(dcmtls_tests dcmnet dcmtls)
index ef0cb223254b3a3a35ba44c851975253da932b3f..d895da7af77418b8dc53add845a4b69fe5af9d55 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2019-2020, OFFIS e.V.
+ *  Copyright (C) 2019-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
  *
  *  Purpose: TLS test for classes DcmSCP and DcmSCPPool
  *
- *  Note: This test will fail after 2029-02-25 due to certificate expiry. 
+ *  Note: This test will fail after 2029-02-25 due to certificate expiry.
  *        The keys embedded in this file should be replaced then (see below).
  *
  */
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CMATH
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/ofstd/oftest.h"
 #include "dcmtk/ofstd/oftimer.h"
+#include "dcmtk/ofstd/ofrand.h"
 #include "dcmtk/oflog/consap.h"
 #include "dcmtk/dcmnet/scp.h"
 #include "dcmtk/dcmnet/scu.h"
 #include "dcmtk/dcmnet/scppool.h"
 #include "dcmtk/dcmnet/dcmlayer.h"
 #include "dcmtk/dcmtls/tlsscu.h"
+#include <cmath>
 
 #ifdef WITH_THREADS
+#ifdef WITH_OPENSSL
+
+#define BAILOUT(msg) do { \
+    OFCHECK_FAIL(msg); \
+    return; \
+} while (0)
 
 /** Method that ensures that the current thread is actually sleeping for the
  *  defined number of seconds (at least).
@@ -72,7 +78,8 @@ struct TestSCP: DcmSCP, OFThread
         DcmSCP(),
         m_listen_result(EC_NotYetImplemented), // value indicating "not set"
         m_set_stop_after_assoc(OFFalse),
-        m_set_stop_after_timeout(OFFalse)
+        m_set_stop_after_timeout(OFFalse),
+        m_is_running(OFFalse)
     {
     }
 
@@ -83,6 +90,7 @@ struct TestSCP: DcmSCP, OFThread
         m_listen_result = EC_NotYetImplemented;
         m_set_stop_after_assoc = OFFalse;
         m_set_stop_after_timeout = OFFalse;
+        m_is_running = OFFalse;
     }
 
     /** Overwrite method from DcmSCP in order to test feature to stop after current
@@ -109,12 +117,16 @@ struct TestSCP: DcmSCP, OFThread
     OFBool m_set_stop_after_assoc;
     /// If set, the SCP should stop after TCP timeout occurred in non-blocking mode
     OFBool m_set_stop_after_timeout;
+    /// indicates whether the thread is currently running
+    volatile OFBool m_is_running;
 
     /** Method called by OFThread to start SCP operation. Starts listen() loop of DcmSCP.
     */
     virtual void run()
     {
+        m_is_running = OFTrue;
         m_listen_result = listen();
+        m_is_running = OFFalse;
     }
 
 };
@@ -123,18 +135,27 @@ struct TestSCP: DcmSCP, OFThread
 
 struct TestPool : DcmSCPPool<>, OFThread
 {
-    OFCondition result;
+    OFCondition m_listen_result;
+    volatile OFBool m_is_running;
+
+    TestPool()
+    : DcmSCPPool<>()
+    , OFThread()
+    , m_listen_result(EC_NotYetImplemented)
+    , m_is_running(OFFalse)
+    { }
+
 protected:
     void run()
     {
-        result = listen();
+        m_is_running = OFTrue;
+        m_listen_result = listen();
+        m_is_running = OFFalse;
     }
 };
 
 // -------------- End of class TestPool -------------------------
 
-#ifdef WITH_OPENSSL
-
 struct TestTLSSCU : DcmTLSSCU, OFThread
 {
     OFCondition result;
@@ -289,20 +310,20 @@ OFTEST_FLAGS(dcmtls_scp_tls, EF_None)
     initLogs();
 
     /// Init scp tls layer
-    DcmTransportLayerStatus result;
+    OFCondition result;
     DcmTLSTransportLayer scpTlsLayer(NET_ACCEPTOR, NULL, OFTrue);
     scpTlsLayer.setPrivateKeyPasswd(PRIVATE_KEY_PWD);
     result = scpTlsLayer.setPrivateKeyFile(PRIVATE_KEY_FILENAME, DCF_Filetype_PEM);
-    OFCHECK(result == TCS_ok);
+    OFCHECK(result.good());
     result = scpTlsLayer.setCertificateFile(PUBLIC_SELFSIGNED_CERT_FILENAME, DCF_Filetype_PEM);
-    OFCHECK(result == TCS_ok);
+    OFCHECK(result.good());
     OFCHECK(scpTlsLayer.checkPrivateKeyMatchesCertificate());
     scpTlsLayer.setCertificateVerification(DCV_ignoreCertificate);
 
     /// Init and run Scp server with tls
+    OFRandom rnd;
     TestSCP scp;
     DcmSCPConfig& config = scp.getConfig();
-    config.setPort(11112);
     config.setAETitle("ACCEPTOR");
     config.setACSETimeout(30);
     config.setConnectionTimeout(1);
@@ -315,10 +336,24 @@ OFTEST_FLAGS(dcmtls_scp_tls, EF_None)
     OFCHECK(config.addPresentationContext(UID_VerificationSOPClass, xfers, ASC_SC_ROLE_SCP).good());
 
     config.setTransportLayer(&scpTlsLayer);
-    scp.start();
 
     // Ensure server is up and listening
-    force_sleep(1);
+    int i = 0;
+    Uint16 port_number = 0;
+    OFMutex memory_barrier;
+    do
+    {
+      // generate a random port number between 61440 (0xF000) and 65535
+      port_number = 0xF000 + (rnd.getRND16() & 0xFFF);
+      config.setPort(port_number);
+      scp.start();
+      force_sleep(2); // wait 2 seconds for the SCP process to start
+      memory_barrier.lock();
+      memory_barrier.unlock();
+    }
+    while ((i++ < 5) && (! scp.m_is_running)); // try up to 5 port numbers before giving up
+
+    if (! scp.m_is_running) BAILOUT("Start of the SCP thread failed: " << scp.m_listen_result.text());
 
     // Configure SCU and run it against SCP
     DcmTLSSCU scu;
@@ -329,7 +364,7 @@ OFTEST_FLAGS(dcmtls_scp_tls, EF_None)
     scu.setPeerAETitle("ACCEPTOR");
     scu.setAETitle("REQUESTOR");
     scu.setPeerHostName("localhost");
-    scu.setPeerPort(11112);
+    scu.setPeerPort(port_number);
 
     scu.enableAuthentication(PRIVATE_KEY_FILENAME, PUBLIC_SELFSIGNED_CERT_FILENAME, PRIVATE_KEY_PWD, DCF_Filetype_PEM, DCF_Filetype_PEM);
     scu.setPeerCertVerification(DCV_ignoreCertificate);
@@ -357,20 +392,20 @@ OFTEST_FLAGS(dcmtls_scp_pool_tls, EF_None)
     initLogs();
 
     /// Init scp tls layer
-    DcmTransportLayerStatus result;
+    OFCondition result;
     DcmTLSTransportLayer scpTlsLayer(NET_ACCEPTOR, NULL, OFTrue);
     scpTlsLayer.setPrivateKeyPasswd(PRIVATE_KEY_PWD);
     result = scpTlsLayer.setPrivateKeyFile(PRIVATE_KEY_FILENAME, DCF_Filetype_PEM);
-    OFCHECK(result == TCS_ok);
+    OFCHECK(result.good());
     result = scpTlsLayer.setCertificateFile(PUBLIC_SELFSIGNED_CERT_FILENAME, DCF_Filetype_PEM);
-    OFCHECK(result == TCS_ok);
+    OFCHECK(result.good());
     OFCHECK(scpTlsLayer.checkPrivateKeyMatchesCertificate());
     scpTlsLayer.setCertificateVerification(DCV_ignoreCertificate);
 
     /// Init and run Scp server with tls
+    OFRandom rnd;
     TestPool pool;
     DcmSCPConfig& config = pool.getConfig();
-    config.setPort(11112);
     config.setAETitle("ACCEPTOR");
     config.setACSETimeout(30);
     config.setConnectionTimeout(1);
@@ -383,10 +418,23 @@ OFTEST_FLAGS(dcmtls_scp_pool_tls, EF_None)
     OFCHECK(config.addPresentationContext(UID_VerificationSOPClass, xfers, ASC_SC_ROLE_DEFAULT).good());
     config.setTransportLayer(&scpTlsLayer);
     pool.setMaxThreads(20);
-    pool.start();
 
     // Ensure server is up and listening
-    force_sleep(1);
+    int i = 0;
+    Uint16 port_number = 0;
+    OFMutex memory_barrier;
+    do
+    {
+      // generate a random port number between 61440 (0xF000) and 65535
+      port_number = 0xF000 + (rnd.getRND16() & 0xFFF);
+      config.setPort(port_number);
+      pool.start();
+      force_sleep(2); // wait 2 seconds for the SCP process to start
+      memory_barrier.lock();
+      memory_barrier.unlock();
+    }
+    while ((i++ < 5) && (! pool.m_is_running)); // try up to 5 port numbers before giving up
+    if (! pool.m_is_running) BAILOUT("Start of the SCP thread ppol failed: " << pool.m_listen_result.text());
 
     OFVector<TestTLSSCU*> scus(20);
     OFVector<DcmTLSTransportLayer*> scuTlsLayers;
@@ -400,7 +448,7 @@ OFTEST_FLAGS(dcmtls_scp_pool_tls, EF_None)
         (*it1)->setPeerAETitle("ACCEPTOR");
         (*it1)->setAETitle("REQUESTOR");
         (*it1)->setPeerHostName("localhost");
-        (*it1)->setPeerPort(11112);
+        (*it1)->setPeerPort(port_number);
         (*it1)->enableAuthentication(PRIVATE_KEY_FILENAME, PUBLIC_SELFSIGNED_CERT_FILENAME, PRIVATE_KEY_PWD, DCF_Filetype_PEM, DCF_Filetype_PEM);
         (*it1)->setPeerCertVerification(DCV_ignoreCertificate);
 
index 1b35c3bd46a4f44b1e05f35dd82b875b66ba3cc3..1b3dabf6b0fc6a19573616d048d6081a18460a03 100644 (file)
@@ -1,4 +1,12 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmtract trctypes trctrackset trctrack trcmeasurement trcstatistic trcmodtractresults trctractographyresults)
+DCMTK_ADD_LIBRARY(dcmtract
+  trctypes.cc
+  trctrackset.cc
+  trctrack.cc
+  trcmeasurement.cc
+  trcstatistic.cc
+  trcmodtractresults.cc
+  trctractographyresults.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmtract dcmiod dcmdata ofstd oflog)
index b91efd8900d39b09f42b12bdbea24f935d072e32..45f0fdd3f4be869f5a315651ca0f5d2afda9c4db 100644 (file)
@@ -2,7 +2,7 @@
 include_directories("${dcmtls_SOURCE_DIR}/include")
 
 # declare executables
-DCMTK_ADD_EXECUTABLE(wlmscpfs wlmscpfs wlcefs)
+DCMTK_ADD_EXECUTABLE(wlmscpfs wlmscpfs.cc wlcefs.cc)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(wlmscpfs dcmwlm dcmnet dcmtls dcmdata oflog ofstd)
index 8be69ed2c50547fa11a647c089f84987c90cdd76..80fe16023b7e89cf169dffec846ad8c9b7c8aa8c 100644 (file)
@@ -1,9 +1,9 @@
 wlcefs.o: wlcefs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -15,7 +15,6 @@ wlcefs.o: wlcefs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -87,10 +86,10 @@ wlcefs.o: wlcefs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcostrma.h wlcefs.h
 wlmscpfs.o: wlmscpfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -102,7 +101,6 @@ wlmscpfs.o: wlmscpfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
index 652b214e0705343479ae0eabfcaf53b6b3a5a9be..393d57e798f3b18e7a92ca0d1ef9f3be1c43f5ac 100644 (file)
@@ -263,7 +263,7 @@ within the given directory.  By default, the format is \<timestamp\>.dump where
 This should work as a default for most applications that would like to use
 request files and want to ensure unique file names.  If it is desired to change
 this naming scheme, the option \e --request-file-format can be used.  It
-permits to specify the file naming pattern used by \e --request-file-path.
+permits one to specify the file naming pattern used by \e --request-file-path.
 
 For flexibility, the following placeholders can be used in the pattern provided
 for \e --request-file-format:
@@ -513,6 +513,6 @@ It is an error if no data dictionary can be loaded.
 
 \section wlmscpfs_copyright COPYRIGHT
 
-Copyright (C) 1996-2020 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
+Copyright (C) 1996-2022 by OFFIS e.V., Escherweg 2, 26121 Oldenburg, Germany.
 
 */
index 5e7fc369589ff09d8315ff4ea6fcf3b08e048da8..3ee85a23ab2c80706a1490ca485c5b7e12e215ff 100644 (file)
@@ -452,9 +452,13 @@ class DCMTK_DCMWLM_EXPORT WlmDataSource
     virtual void SetDatabaseType( WlmDatabaseType /*value*/ ) {}
 
       /** Set value in a member variable in a derived class.
-       *  @param int The value to set.
+       *  @param value The value to set.
        */
-    virtual void SetSerialNumber( const int /*value*/ ) {}
+#ifdef DOXYGEN
+    virtual void SetSerialNumber( const int value ) { }
+#else
+    virtual void SetSerialNumber( const int /* value */ ) { }
+#endif
 
       /** Set value in a member variable in a derived class.
        *  @param int The value to set.
index cf7747b8646c3282a70b95bd0eb183c057d70bdb..2e627c33851cea6f6a8b798f2b62a0ceb27fae26 100644 (file)
@@ -151,7 +151,7 @@ class DCMTK_DCMWLM_EXPORT WlmFileSystemInteractionManager
        *  @param normalize Normalize each attribute value before the check. Defaults to OFTrue, which
        *    means the value will be normalized as appropriate for the given VR, e.g. ignoring spaces
        *    used as padding.
-       *  @param normalizeWildCards. Whether to interpret a query only consisting of wild cards as
+       *  @param normalizeWildCards Whether to interpret a query only consisting of wild cards as
        *    an universal match. Defaults to OFTrue, which means wild cards will be normalized if an
        *    attribute's VR supports it and it is allowed for the attribute (as defined by the matchingKeys
        *    argument). Set to OFFalse to force strict interpretation instead.
@@ -192,7 +192,7 @@ class DCMTK_DCMWLM_EXPORT WlmFileSystemInteractionManager
        */
     OFCondition ConnectToFileSystem( const OFString& dfPathv );
 
-      /** Disconnects from the worklist file system database..
+      /** Disconnects from the worklist file system database.
        *  @return Indicates if the connection was disconnected successfully.
        */
     OFCondition DisconnectFromFileSystem();
index 8d3419a2720a733039395d06bf78685a6805908a..68e7917106683a7c665cc6c6e1d67354be5149e3 100644 (file)
@@ -193,7 +193,7 @@ class DCMTK_DCMWLM_EXPORT WlmActivityManager
        *  @param opt_blockModev                      Specifies the blocking mode for DIMSE operations
        *  @param opt_dimse_timeoutv                  Specifies the timeout for DIMSE operations
        *  @param opt_acse_timeoutv                   Specifies the timeout for ACSE operations
-       *  @param opt_forkedChildv                    Indicates, whether this process was "forked" from a parent process, default: false
+       *  @param opt_forkedChild                     Indicates, whether this process was "forked" from a parent process, default: false
        *  @param argcv                               Number of commandline arguments given
        *  @param argvv                               Complete command line
        */
index b60d9fd80f41f325edca0902c927840ae1468a32..b2bf912a47ede9fa2cd4f45d8933072124397948 100644 (file)
@@ -1,4 +1,9 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(dcmwlm wlds wldsfs wlfsim wlmactmg)
+DCMTK_ADD_LIBRARY(dcmwlm
+  wlds.cc
+  wldsfs.cc
+  wlfsim.cc
+  wlmactmg.cc
+)
 
 DCMTK_TARGET_LINK_MODULES(dcmwlm ofstd dcmdata dcmnet)
index f2d16848838573c2d6704dbf4a6ba1bbbfccc7f0..148ea45f6ab53dead502bd52cbbd3fa211e9a5ee 100644 (file)
@@ -1,9 +1,9 @@
 wlds.o: wlds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -15,7 +15,6 @@ wlds.o: wlds.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -115,7 +114,6 @@ wldsfs.o: wldsfs.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -170,10 +168,10 @@ wldsfs.o: wldsfs.cc ../../config/include/dcmtk/config/osconfig.h \
 wlfsim.o: wlfsim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmnet/include/dcmtk/dcmnet/diutil.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -185,7 +183,6 @@ wlfsim.o: wlfsim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
@@ -318,7 +315,6 @@ wlmactmg.o: wlmactmg.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
index 1efb34e69f67c8625365ec2953e67705aa933bc2..dd0639d9105cb3408bc755a3818e62998390e05c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2019, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -498,7 +498,7 @@ void WlmDataSourceFileSystem::HandleNonSequenceElementInResultDataset( DcmElemen
     // value into an unsigned integer and set it correspondingly in the element variable)
     if( tag == DCM_PregnancyStatus )
     {
-      Uint16 uintValue = atoi( value );
+      Uint16 uintValue = OFstatic_cast(Uint16, atoi( value ));
       cond = element->putUint16( uintValue );
     }
     else
index 6596cd8f1af33c6bc3b09069b5c7426c4831c804..668b23bd93a5c24758e0fa95e6e898290bd3baa0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2019, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -43,6 +43,9 @@
 #include "dcmtk/dcmdata/dcdicent.h"  // needed by MSVC5 with STL
 #include "dcmtk/oflog/internal/env.h"
 #include "dcmtk/dcmwlm/wlmactmg.h"
+#include "dcmtk/ofstd/ofstdinc.h"
+#include <ctime>
+
 
 
 // ----------------------------------------------------------------------------
@@ -857,7 +860,7 @@ OFCondition WlmActivityManager::HandleFindSCP( T_ASC_Association *assoc, T_DIMSE
   if( opt_sleepAfterFind > 0 )
   {
     DCMWLM_INFO("Sleeping (after find): " << opt_sleepAfterFind << " secs");
-    OFStandard::sleep( (unsigned int)opt_sleepAfterFind );
+    OFStandard::forceSleep( (unsigned int)opt_sleepAfterFind );
   }
 
   // return result
@@ -1131,7 +1134,7 @@ static void FindCallback( void *callbackData, OFBool cancelled, T_DIMSE_C_FindRQ
     if (opt_sleepBeforeFindReq > 0)
     {
       DCMWLM_INFO("SLEEPING (before evaluating find request): " << opt_sleepBeforeFindReq << " secs");
-      OFStandard::sleep((unsigned int)opt_sleepBeforeFindReq);
+      OFStandard::forceSleep((unsigned int)opt_sleepBeforeFindReq);
     }
 
     // Determine the records that match the search mask. After this call, the
@@ -1148,7 +1151,7 @@ static void FindCallback( void *callbackData, OFBool cancelled, T_DIMSE_C_FindRQ
   if( opt_sleepDuringFind > 0 )
   {
     DCMWLM_INFO("SLEEPING (during find): " << opt_sleepDuringFind << " secs");
-    OFStandard::sleep((unsigned int)opt_sleepDuringFind);
+    OFStandard::forceSleep((unsigned int)opt_sleepDuringFind);
   }
 
   // If we encountered a C-CANCEL-RQ and if we have pending
@@ -1174,7 +1177,7 @@ static void FindCallback( void *callbackData, OFBool cancelled, T_DIMSE_C_FindRQ
   }
 
   // Set response status
-  response->DimseStatus = dbstatus;
+  response->DimseStatus = OFstatic_cast(DIC_US, dbstatus);
 
   // Delete status detail information if there is some
   if( *statusDetail != NULL )
index 27ff6213c7db1786eaf719984b2bc589e69b8374..eb3c416799fe0c642ebeea2751309412ba76a3a9 100644 (file)
@@ -1,5 +1,5 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(wltest wltest)
+DCMTK_ADD_EXECUTABLE(wltest wltest.cc)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(wltest dcmwlm dcmnet dcmtls dcmdata oflog ofstd)
index b2dc2019302942c8813ff61904d7a144e4b4cafb..c740c6550f0b3e4424a2adfaf28100389b10a3cf 100644 (file)
@@ -1,9 +1,9 @@
 wltest.o: wltest.cc ../../config/include/dcmtk/config/osconfig.h \
- ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../dcmnet/include/dcmtk/dcmnet/dicom.h \
  ../../dcmnet/include/dcmtk/dcmnet/cond.h \
  ../../ofstd/include/dcmtk/ofstd/ofconsol.h \
  ../../ofstd/include/dcmtk/ofstd/ofstream.h \
+ ../../ofstd/include/dcmtk/ofstd/ofstdinc.h \
  ../../ofstd/include/dcmtk/ofstd/ofthread.h \
  ../../ofstd/include/dcmtk/ofstd/oftypes.h \
  ../../ofstd/include/dcmtk/ofstd/ofdefine.h \
@@ -15,7 +15,6 @@ wltest.o: wltest.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../dcmdata/include/dcmtk/dcmdata/dcdefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dndefine.h \
  ../../dcmnet/include/dcmtk/dcmnet/dcompat.h \
- ../../ofstd/include/dcmtk/ofstd/ofbmanip.h \
  ../../dcmdata/include/dcmtk/dcmdata/dctypes.h \
  ../../oflog/include/dcmtk/oflog/oflog.h \
  ../../oflog/include/dcmtk/oflog/logger.h \
index 866ed1977fc16860e8b454fc9d5b8fb16576a86e..7ffb20707d33f49acb3b02d669029004bbcfbc58 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1996-2017, OFFIS e.V.
+ *  Copyright (C) 1996-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
 
 #include "dcmtk/dcmnet/dicom.h"
 #include "dcmtk/dcmnet/dul.h"
diff --git a/docs/ANNOUNCE.366 b/docs/ANNOUNCE.366
new file mode 100644 (file)
index 0000000..9a4534b
--- /dev/null
@@ -0,0 +1,120 @@
+ANNOUNCEMENT
+
+Version 3.6.6 of the OFFIS DCMTK (DICOM ToolKit) software is now available for
+public release.  This release includes the following main changes over the
+previous version 3.6.5:
+
+- DCMTK 3.6.6 builds correctly on older and up-to-date versions of GNU gcc
+  (4.2.1 to 10.2.0) Clang (3.4.2 to 11.0.0), Apple Clang 11.0.0,
+  Microsoft Visual Studio (2008 to 2019) and SunPro CC (5.14 and 5.15).
+
+- Tested with the following operating systems/environments:
+  - Android on arm64
+  - Cygwin on x86_64
+  - FreeBSD on x86_64
+  - Linux on x86_64 and x86
+  - MacOS X on x86_64
+  - NetBSD on x86_64
+  - OpenBSD on x86_64
+  - OpenIndiana on x86
+  - Solaris on x86
+  - Windows (including MinGW and Cygwin) on x86_64 and x86
+
+  For a complete list of tested systems and compilers, see the INSTALL file.
+
+- Updated data dictionary, SOP classes, well-known frame of references,
+  transfer syntaxes, code definitions and supported context group classes for
+  DICOM standard release 2020e.
+
+- Added new DCMTK module dcmect, which facilitates creation, loading, (partly)
+  modification and storing Enhanced CT objects:
+
+  - Also included is a general Concatenation API that allows for creating and
+    re-assembling Concatenations from given DICOM datasets. Right now, only
+    uncompressed ("unencapsulated") pixel data is supported.
+
+  - The existing Segmentation API (dcmseg) as well as the new Enhanced CT API
+    (dcmect) both support writing and reading Concatenations via dedicated
+    methods.
+
+  - Thanks to GE Aviation for sponsoring this feature.
+
+- Major revision of JSON export tool (dcm2json), which should now be fully
+  standard compliant.
+
+- Major revision of the dcmsign module, which now supports Elliptic Curve
+  (ECDSA) signatures, the DICOM SR RSA Digital Signature Profile, and CRLs in
+  hashed certificate directories.  During signature verification the chain of
+  trust for the signer certificates are now fully checked and there is limited
+  support for the creation and verification of trusted timestamps.
+
+- Added support for the Rendition Selection Document IOD, which has been
+  introduced with Supplement 202 (Real-Time Video), to the dcmsr module.
+
+- Added support for the new Waveform Storage SOP Classes that have been
+  introduced with Supplement 217 (Neurophysiology Waveforms) to the DICOMDIR
+  generation code and to the dcmsr module.
+
+- Added support for the new 2nd generation RT Storage SOP Classes that have
+  been introduced with Supplement 175, 176 and 199, as well as for the new
+  Encapsulated OBJ and MTL Storage SOP Classes (Supplement 208) to the
+  DICOMDIR generation code.
+
+- Added TLS support to the DcmSCP and DcmSCPPool classes and to the dcmrecv
+  command line tool.
+
+- Updated and completely revised DIMSE Status Code definitions.  Now, the
+  definitions and also the log output are consistent with the current edition
+  of the DICOM standard.
+
+- Significant performance enhancements for code that gets an item from or
+  inserts an item into a sequence with a large number of items.
+
+- DCMTK now successfully compiles when UNICODE/_UNICODE is defined on Windows.
+
+- When compiling on Windows, new CMake options can now be used to control the
+  Win32 build model (multi-threaded or multi-threaded DLL).
+
+- Fixed various issues that occurred after the official 3.6.5 release.
+  See CHANGES file for details.
+
+Many people have contributed to this new release of DCMTK, appearing here in
+alphabetical order.  Thank you very much for your support!
+
+  Michel Amat (GitHub user "amatm")
+  Bartosz Bialoskorski <bartoszbialoskorski@gmail.com>
+  Jesper Bojesen <jbojesen@vitalimages.com>
+  Marcel Claus <Marcel.Claus@med.uni-jena.de>
+  Jake Cobb <Jake.Cobb@varian.com>
+  Martin Czarnowski <czarnowski@examion.com>
+  Matthias Gierlings <matthias.gierlings@ruhr-uni-bochum.de>
+  Niklas Johansson (GitHub user "Raphexion")
+  Andreas Keizers <an-kei@web.de>
+  Peter Klotz <Peter.Klotz@ith-icoserve.com>
+  Damien Lerat
+  Mathieu Malaterre <malat@debian.org>
+  Robert Mulcahey <rob@asteris.com>
+  Maria Nedyak <mashanedyak@gmail.com>
+  Steve Pieper <pieper@isomics.com>
+  Sergey Razuvaev <Sergey.Razuvaev@waveaccess.ru>
+  Markus Sabin <Markus.Sabin@soft-gate.de>
+  Maria Samoylova <mashanedyak@gmail.com>
+  Adrian Schmidt-Foehre <A.Schmidt-Foehre@mint-medical.de>
+  Waldo Valenzuela <waldo.valenzuela@artorg.unibe.ch>
+
+  DCMTK forum users "CStarkey", "JustSomeGuy", "Shaeto", and "ruben.cruz"
+  GitHub user "iboB"
+
+Members of the DCMTK Team who have worked on this release are:
+
+  Pedro Arizpe Gomez <arizpegomez@offis.de>
+  Marco Eichelberg <eichelberg@offis.de>
+  Michael Onken <onken@open-connections.de>
+  Joerg Riesmeier <dicom@jriesmeier.com>
+  Jan Schlamelcher <schlamelcher@offis.de>
+
+The DCMTK software can be downloaded via:
+
+  https://dicom.offis.de/dcmtk or https://www.dcmtk.org/
+
+OFFIS e.V., Oldenburg, Germany, 2021-01-14
diff --git a/docs/CHANGES.367 b/docs/CHANGES.367
new file mode 100644 (file)
index 0000000..ecb2b2c
--- /dev/null
@@ -0,0 +1,3597 @@
+
+Release 3.6.7 (Public Minor Release - 2022-04-22)
+
+**** Changes from 2022.04.22 (onken)
+
+- Created CHANGES.367 for DCMTK release 3.6.7:
+  CHANGES.367 contains the Git commit history since DCMTK release 3.6.6.
+  Added:   docs/CHANGES.367
+
+- Updated man pages for DCMTK release 3.6.7.
+  Affects: doxygen/manpages/man1/cda2dcm.1
+           doxygen/manpages/man1/dcm2json.1
+           doxygen/manpages/man1/dcm2pdf.1
+           doxygen/manpages/man1/dcm2pnm.1
+           doxygen/manpages/man1/dcm2xml.1
+           doxygen/manpages/man1/dcmcjpeg.1
+           doxygen/manpages/man1/dcmcjpls.1
+           doxygen/manpages/man1/dcmconv.1
+           doxygen/manpages/man1/dcmcrle.1
+           doxygen/manpages/man1/dcmdjpeg.1
+           doxygen/manpages/man1/dcmdjpls.1
+           doxygen/manpages/man1/dcmdrle.1
+           doxygen/manpages/man1/dcmdspfn.1
+           doxygen/manpages/man1/dcmdump.1
+           doxygen/manpages/man1/dcmftest.1
+           doxygen/manpages/man1/dcmgpdir.1
+           doxygen/manpages/man1/dcmicmp.1
+           doxygen/manpages/man1/dcmj2pnm.1
+           doxygen/manpages/man1/dcml2pnm.1
+           doxygen/manpages/man1/dcmmkcrv.1
+           doxygen/manpages/man1/dcmmkdir.1
+           doxygen/manpages/man1/dcmmklut.1
+           doxygen/manpages/man1/dcmodify.1
+           doxygen/manpages/man1/dcmp2pgm.1
+           doxygen/manpages/man1/dcmprscp.1
+           doxygen/manpages/man1/dcmprscu.1
+           doxygen/manpages/man1/dcmpschk.1
+           doxygen/manpages/man1/dcmpsmk.1
+           doxygen/manpages/man1/dcmpsprt.1
+           doxygen/manpages/man1/dcmpsrcv.1
+           doxygen/manpages/man1/dcmpssnd.1
+           doxygen/manpages/man1/dcmqridx.1
+           doxygen/manpages/man1/dcmqrscp.1
+           doxygen/manpages/man1/dcmqrti.1
+           doxygen/manpages/man1/dcmquant.1
+           doxygen/manpages/man1/dcmrecv.1
+           doxygen/manpages/man1/dcmscale.1
+           doxygen/manpages/man1/dcmsend.1
+           doxygen/manpages/man1/dcmsign.1
+           doxygen/manpages/man1/dcod2lum.1
+           doxygen/manpages/man1/dconvlum.1
+           doxygen/manpages/man1/drtdump.1
+           doxygen/manpages/man1/dsr2html.1
+           doxygen/manpages/man1/dsr2xml.1
+           doxygen/manpages/man1/dsrdump.1
+           doxygen/manpages/man1/dump2dcm.1
+           doxygen/manpages/man1/echoscu.1
+           doxygen/manpages/man1/findscu.1
+           doxygen/manpages/man1/getscu.1
+           doxygen/manpages/man1/img2dcm.1
+           doxygen/manpages/man1/movescu.1
+           doxygen/manpages/man1/pdf2dcm.1
+           doxygen/manpages/man1/stl2dcm.1
+           doxygen/manpages/man1/storescp.1
+           doxygen/manpages/man1/storescu.1
+           doxygen/manpages/man1/termscu.1
+           doxygen/manpages/man1/wlmscpfs.1
+           doxygen/manpages/man1/xml2dcm.1
+           doxygen/manpages/man1/xml2dsr.1
+
+- Updated version information for DCMTK release 3.6.7.
+  Affects: CMake/dcmtkPrepare.cmake
+           VERSION
+
+- Updated copyright date.
+  Affects: COPYRIGHT
+           dcmdata/docs/cda2dcm.man
+           dcmdata/docs/dcm2pdf.man
+           dcmdata/docs/dcm2xml.man
+           dcmdata/docs/dcmconv.man
+           dcmdata/docs/dcmcrle.man
+           dcmdata/docs/dcmdrle.man
+           dcmdata/docs/dcmdump.man
+           dcmdata/docs/dcmftest.man
+           dcmdata/docs/dcmgpdir.man
+           dcmdata/docs/dcmodify.man
+           dcmdata/docs/dump2dcm.man
+           dcmdata/docs/pdf2dcm.man
+           dcmdata/docs/stl2dcm.man
+           dcmdata/docs/xml2dcm.man
+           dcmimage/docs/dcm2pnm.man
+           dcmimage/docs/dcmicmp.man
+           dcmimage/docs/dcmquant.man
+           dcmimage/docs/dcmscale.man
+           dcmimgle/docs/dcmdspfn.man
+           dcmimgle/docs/dcod2lum.man
+           dcmimgle/docs/dconvlum.man
+           dcmjpeg/docs/dcmcjpeg.man
+           dcmjpeg/docs/dcmdjpeg.man
+           dcmjpeg/docs/dcmj2pnm.man
+           dcmjpeg/docs/dcmmkdir.man
+           dcmjpls/docs/dcmcjpls.man
+           dcmjpls/docs/dcmdjpls.man
+           dcmjpls/docs/dcml2pnm.man
+           dcmnet/docs/dcmrecv.man
+           dcmnet/docs/dcmsend.man
+           dcmnet/docs/echoscu.man
+           dcmnet/docs/findscu.man
+           dcmnet/docs/getscu.man
+           dcmnet/docs/movescu.man
+           dcmnet/docs/storescp.man
+           dcmnet/docs/storescu.man
+           dcmnet/docs/termscu.man
+           dcmpstat/docs/dcmmkcrv.man
+           dcmpstat/docs/dcmmklut.man
+           dcmpstat/docs/dcmp2pgm.man
+           dcmpstat/docs/dcmprscp.man
+           dcmpstat/docs/dcmprscu.man
+           dcmpstat/docs/dcmpschk.man
+           dcmpstat/docs/dcmpsmk.man
+           dcmpstat/docs/dcmpsprt.man
+           dcmpstat/docs/dcmpsrcv.man
+           dcmpstat/docs/dcmpssnd.man
+           dcmqrdb/docs/dcmqridx.man
+           dcmqrdb/docs/dcmqrscp.man
+           dcmqrdb/docs/dcmqrti.man
+           dcmrt/docs/drtdump.man
+           dcmsign/docs/dcmsign.man
+           dcmsr/docs/dsr2html.man
+           dcmsr/docs/dsr2xml.man
+           dcmsr/docs/dsrdump.man
+           dcmsr/docs/xml2dsr.man
+           dcmwlm/docs/wlmscpfs.man
+
+- Fix adaptations missing in RC2.
+  Affects: ANNOUNCE
+           CMake/dcmtkPrepare.cmake
+           INSTALL
+           config/configure
+           config/configure.in
+
+**** Changes from 2022.04.14 (onken)
+
+- Fixed test by removing retired attribute:
+  Fixed test that compares stored with actual dump that failed because an
+  attribute name changed due to retirment. The attribute has been removed
+  from the test (and thus the dump).
+  Reformatted dump string in test for better readability.
+  Affects: dcmect/tests/t_huge_concat.cc
+
+**** Changes from 2022.04.13 (onken)
+
+- Remove debugging output introduced in last commit.
+  Affects: dcmseg/tests/tbigdim.cc
+
+- Speed up dcmseg_bigdim and only run with std::map:
+  The dcmseg_bigdim test exercises creation of a segmentation with
+  1.000.000 frames and 65535 segments. Therefore it takes a lot of time
+  to run.
+  The current functional group implementation uses the OFMap class that
+  internally is still based on an OFList, making it extermely slow for
+  random access. Therefore, this test is only run if the STL map
+  implementation is being used (HAVE_STL_MAP is being defined) which
+  speeds up the test tremendously.
+  Also some segmentation checking has been disabled via API to further
+  speed up test execution.
+  Affects: dcmseg/tests/tbigdim.cc
+
+**** Changes from 2022.04.12 (riesmeier)
+
+- Updated Context Group classes for DICOM 2022b:
+  Updated automatically generated Context Group classes for the 2022b edition
+  of the DICOM standard. All supported classes were updated, even though there
+  were no changes to most of them.
+  Affects: dcmsr/include/dcmtk/dcmsr/cmr/cid100.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid10013.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid10033.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid11.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid244.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid247.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid29.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid4020.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid4021.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid42.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid6147.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7021.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7445.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7452.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7453.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7464.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h
+           dcmsr/libcmr/cid100.cc
+           dcmsr/libcmr/cid10013.cc
+           dcmsr/libcmr/cid10033.cc
+           dcmsr/libcmr/cid11.cc
+           dcmsr/libcmr/cid244.cc
+           dcmsr/libcmr/cid247.cc
+           dcmsr/libcmr/cid29.cc
+           dcmsr/libcmr/cid4020.cc
+           dcmsr/libcmr/cid4021.cc
+           dcmsr/libcmr/cid4031.cc
+           dcmsr/libcmr/cid42.cc
+           dcmsr/libcmr/cid6147.cc
+           dcmsr/libcmr/cid7021.cc
+           dcmsr/libcmr/cid7181.cc
+           dcmsr/libcmr/cid7445.cc
+           dcmsr/libcmr/cid7452.cc
+           dcmsr/libcmr/cid7453.cc
+           dcmsr/libcmr/cid7464.cc
+           dcmsr/libcmr/cid7469.cc
+
+- Updated code definitions for DICOM 2022b:
+  Updated automatically generated code definitions for coding scheme "DCM".
+  For the coding schemes "NCIt" and "UMLS", there were no changes.
+  Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h
+           dcmsr/include/dcmtk/dcmsr/codes/ncit.h
+           dcmsr/include/dcmtk/dcmsr/codes/umls.h
+
+- Updated data dictionary for DICOM 2022b:
+  Updated data dictionary for the latest edition of the DICOM standard, which
+  has been released only recently.
+  Affects: dcmdata/data/dicom.dic
+           dcmdata/include/dcmtk/dcmdata/dcdeftag.h
+           dcmdata/libsrc/dcdictbi.cc
+
+**** Changes from 2022.04.06 (riesmeier)
+
+- Updated copyright date.
+  Affects: COPYRIGHT
+
+- Replaced http:// by https:// in documentation.
+  Affects: README
+
+**** Changes from 2022.03.30 (riesmeier)
+
+- Fixed typo in comment.
+  Affects: dcmdata/libsrc/dcfilefo.cc
+
+**** Changes from 2022.03.30 (eichelberg)
+
+- Fixed possible NULL pointer dereference:
+  Fixed a possible NULL pointer dereference that could occur when reading an
+  invalid DICOM file from stdin. Loading a file from the file system
+  and receiving data over a network connection were not affected by this bug.
+  Thanks to Sharon Brizinov and Noam Moshe from Claroty Research for the
+  bug report and sample file.
+  Affects: dcmdata/libsrc/dcfilefo.cc
+           dcmdata/libsrc/dcitem.cc
+
+**** Changes from 2022.03.25 (riesmeier)
+
+- Fixed wrong VR in JSON example (see CP-2139).
+  Affects: dcmdata/docs/dcm2json.man
+
+**** Changes from 2022.03.24 (riesmeier)
+
+- Made log output in this module more consistent.
+  Affects: dcmjpls/apps/dcmcjpls.cc
+           dcmjpls/apps/dcmdjpls.cc
+           dcmjpls/libsrc/djcodecd.cc
+           dcmjpls/libsrc/djcodece.cc
+
+- Fixed incorrect warning in JPEG-LS decoder:
+  Fixed incorrect warning on value of Planar Configuration (0028,0006)
+  when decompressing a JPEG-LS compressed DICOM image. With CP-1843 it
+  was clarified that Planar Configuration should always be "0".
+  Thanks to Mathieu Malaterre <mathieu.malaterre@gmail.com> for the
+  original report and suggested fix.
+  Affects: dcmjpls/libsrc/djcodecd.cc
+
+**** Changes from 2022.03.23 (riesmeier)
+
+- Don't add Derivation Description to Icon Images:
+  When compressing a DICOM image with an embedded icon image with the JPEG
+  true lossless encoder, which is dcmcjpeg's default compression option, a
+  Derivation Description (0008,2111) was added to the Icon Image Sequence
+  (0088,0200), even though it should only be added to the top-level dataset.
+  This issue has been fixed now.
+  Thanks to Mathieu Malaterre <mathieu.malaterre@gmail.com> for the
+  original report.
+  Affects: dcmjpeg/libsrc/djcodece.cc
+
+**** Changes from 2022.03.22 (riesmeier)
+
+- Minor fixes to documentation:
+  Minor fixes to the documentation after recent commits.
+  Affects: config/docs/macros.txt
+           dcmdata/docs/img2dcm.man
+
+**** Changes from 2022.03.22 (eichelberg)
+
+- Fixed typo.
+  Affects: dcmjpeg/libijg12/jerror12.h
+           dcmjpeg/libijg16/jerror16.h
+           dcmjpeg/libijg8/jerror8.h
+
+**** Changes from 2022.03.18 (riesmeier)
+
+- Fixed documentation of default options:
+  Fixed documentation of command line options that are enabled by default.
+  Thanks to GitHub user "malaterre" for the original report and suggested fix.
+  Affects: dcmdata/apps/img2dcm.cc
+           dcmdata/docs/img2dcm.man
+
+**** Changes from 2022.03.16 (riesmeier)
+
+- Replaced use of deprecated DIMSE Status Codes:
+  Now, the DCMTK compiles without the deprecated DIMSE Status Code defines.
+  User code should do the same since the deprecated defines (see "dimse.h")
+  will be removed in a future release.
+  Affects: dcmpstat/libsrc/dvpspll.cc
+           dcmpstat/libsrc/dvpsprt.cc
+           dcmpstat/libsrc/dvpsspl.cc
+           dcmqrdb/libsrc/dcmqrcbm.cc
+           dcmqrdb/libsrc/dcmqrdbi.cc
+
+- Fixed some outdated DIMSE Status strings:
+  Updated the mapping of some DIMSE Status Codes to strings in the
+  DU_xxxStatusString() methods to reflect the changes introduced with
+  commit 5422b14947. This also avoids the use of deprecated defines.
+  Affects: dcmnet/libsrc/diutil.cc
+
+**** Changes from 2022.03.15 (riesmeier)
+
+- Various minor fixes to "macros.txt":
+  Fixed various minor issues in the text file, e.g. line breaks after 80
+  characters and two spaces after the period.
+  Affects: config/docs/macros.txt
+
+**** Changes from 2022.03.15 (eichelberg)
+
+- Removed overly strict check in the JPEG decoder:
+  Removed a check for the validity of the Huffman table in the JPEG
+  decoder that triggers certain valid JPEG images as being invalid.
+  This closes DCMTK issue #1018.
+  Thanks to Mathieu Malaterre for the bug report and suggested fix.
+  Affects: config/docs/macros.txt
+           dcmjpeg/libijg12/jdhuff.c
+           dcmjpeg/libijg16/jdhuff.c
+           dcmjpeg/libijg8/jdhuff.c
+
+**** Changes from 2022.03.15 (riesmeier)
+
+- Fixed "delimiter characters" for VR UC:
+  Fixed wrong definition of "delimiter characters" for the Value
+  Representation (VR) "Unlimited Characters" (UC). Now, the backslash
+  is treated as a delimiter (see DICOM PS3.5).
+  Also changed handling of getDelimiterChars() in dcmdata's VR classes.
+  Thanks to Par Lidberg <Par.Lidberg@elekta.com> for the original report
+  and suggested fix.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcvrlo.h
+           dcmdata/include/dcmtk/dcmdata/dcvrpn.h
+           dcmdata/include/dcmtk/dcmdata/dcvrsh.h
+           dcmdata/libsrc/dcchrstr.cc
+           dcmdata/libsrc/dcvr.cc
+           dcmdata/libsrc/dcvrlo.cc
+           dcmdata/libsrc/dcvrpn.cc
+           dcmdata/libsrc/dcvrsh.cc
+
+**** Changes from 2022.03.14 (riesmeier)
+
+- Removed misplaced comment character "//".
+  Affects: dcmseg/libsrc/segutils.cc
+
+- Specified "non-signficant characters" for VR UC:
+  The backslash and the space character are now specified as not significant
+  for the Value Representation "Unlimited Characters" (UC), since this is how
+  this VR is defined in DICOM PS3.5. With this change, a UC value consisting
+  of spaces and/or backslashes only is considered an empty value.
+  Affects: dcmdata/libsrc/dcvruc.cc
+
+- Added check on missing Unique Key (strict mode):
+  Report a more appropriate error, both to the logger and as a DIMSE Status
+  Code (A900 instead of C000), if the Unique Key is missing for the higher
+  level(s) of a C-FIND request.
+  This check is only performed in "strict mode", i.e. when dcmqrscp is called
+  with option --check-find (-XF).
+  Thanks to Abdallah Maouche <abdallahmaouche98@gmail.com> for the report and
+  suggested fix. See also PR #53 at https://github.com/DCMTK/dcmtk/pull/53.
+  Affects: dcmqrdb/libsrc/dcmqrdbi.cc
+
+**** Changes from 2022.03.14 (onken)
+
+- Fix for bug introduced in 1fd08a:
+  Fixed bug leading to doubled first frame in Per Frame Functional Group
+  Sequence. Also fixed related test case.
+  Affects: dcmfg/libsrc/concatenationloader.cc
+           dcmfg/tests/t_concatenation_loader.cc
+
+- Removed debug output.
+  Affects: dcmiod/libsrc/iodutil.cc
+
+- Fixed another issue with binary seg concatenations:
+  Related to commit 95335b now all bytes shifted to the right are casted
+  to unsigned before. Also a superfluous byte copying has been removed that
+  also lead to problems when using binary segmentatios of unusual dimensions.
+  Also made some minor improvements.
+  Affects: dcmfg/libsrc/concatenationloader.cc
+           dcmiod/libsrc/iodutil.cc
+           dcmseg/libsrc/segdoc.cc
+           dcmseg/libsrc/segutils.cc
+
+**** Changes from 2022.03.07 (onken)
+
+- Check return value for error.
+  Affects: dcmdata/apps/mdfdsman.cc
+
+**** Changes from 2022.03.04 (onken)
+
+- Forbid insertion of encapsulated Pixel Data:
+  dcmodify's options -mf and -if can be used to insert the content of a
+  file into an element's value. This also works for uncompressed data in
+  the Pixel Data element.
+  If a user tried to replace or insert encapsulated pixel data, the new
+  value was not inserted at all, however, dcmodify reported success.
+  Now, the insertion/modification of values for encapsulated Pixel Data is
+  rejected by dcmodify and a related error is reported to the user.
+  Also, trying to insert value directly from the command line into the
+  encapsulated Pixel Data element (via -m / -i options) now produces a
+  better error message.
+  Thanks to forum user "upnorth173" for the report.
+  Affects: dcmdata/apps/mdfdsman.cc
+           dcmdata/apps/mdfdsman.h
+
+- Reformatted source code.
+  Affects: dcmdata/apps/mdfdsman.cc
+
+**** Changes from 2022.03.04 (goldhammer)
+
+- Improved detection of additional depencencies for statically linking:
+  Improved detection of additional library depencencies for statically
+  linking the third-party libraries used in the DCMTK. The problem is caused by
+  third party libraries having depencencies themselves. For example libxml2
+  requires zlib among others. This gets even more complicated when on one
+  operating system for example libtiff is compiled with libdeflate an on
+  another system it is not. This means on one system there are linker errors
+  when libdeflate is not included and on another system there are errors when
+  it is included.
+  The best solution would possibly be to just compile all third-party libraries
+  ourself and use these versions for statically linking. In the meantime this
+  solution can somewhat handle these differences.
+  Affects: CMake/dcmtkPrepare.cmake
+
+- Added flag DCMTK_USE_OWN_FINDOPENJPEG_MODULE:
+  The DCMTK has its own FindOpenJPEG.cmake module. Sometimes it can be useful
+  to use this module instead of the one provided by the operating system. The
+  default is still to use the one provided by the operating system.
+  Affects: CMake/3rdparty.cmake
+
+- Fixed a warning in the FindOpenJPEG module:
+  The problem was OPENJPEG is not OpenJPEG and if you look for _FOUND
+  it could have caused issues.
+  Affects: CMake/FindOpenJPEG.cmake
+
+**** Changes from 2022.03.04 (eichelberg)
+
+- Fixed warning caused by previous commit.
+  Affects: dcmfg/libsrc/concatenationcreator.cc
+
+**** Changes from 2022.03.03 (onken)
+
+- Fix some binary segmentation concatenations:
+  When producing binary concatenations of segmentations objects using
+  a configuration where the number of bytes per concatenation instance is
+  not dividable by 8 (i.e. where in such an instance numFrames * rows *
+  cols % 8 != 0), not all bits (pixels) have been copied correctly from
+  the source image into the concatenation instance.
+  The problem has been fixed by adapting number of frames in the
+  concatenation instance so that numFrames * rows * cols % 8 = 0. If the
+  user configures numFrames (per instance) manually, the value is adapted
+  automatically as well (and an information is printed to the logger).
+  Also, when loading 1 bit / pixel segmentation concatenations, there was
+  a bug with clearing certain bits due to the fact that bit-shifting a
+  number to the right does not automatically introduce 0 but instead
+  introduceds 0 or 1 based on the signedness of the number's variable.
+  Affects: dcmfg/include/dcmtk/dcmfg/concatenationcreator.h
+           dcmfg/libsrc/concatenationcreator.cc
+           dcmiod/libsrc/iodutil.cc
+
+**** Changes from 2022.03.03 (eichelberg)
+
+- Fixed gcc -Wextrea warning caused by previous commit:
+  Fixed warning issued by gcc -Wextra caused by previous commit.
+  Affects: ofstd/include/dcmtk/ofstd/diag/ignrattr.def
+
+**** Changes from 2022.03.02 (eichelberg)
+
+- Suppress warnings about attribute redeclaration:
+  Suppress warnings about attribute redeclaration of inline methods,
+  which were issued when compiling DCMTK with Clang on Windows in
+  a DLL build.
+  Added:   ofstd/include/dcmtk/ofstd/diag/ignrattr.def
+  Affects: dcmdata/include/dcmtk/dcmdata/dctagkey.h
+           ofstd/include/dcmtk/ofstd/ofdiag.h
+
+**** Changes from 2022.03.01 (eichelberg)
+
+- Fixed various Doxygen warnings:
+  Fixed various Doxygen warnings about missing parameters, return values etc.
+  Thanks to Marcel Baumann <marcel.baumann@uni-oldenburg.de>
+  for the contribution.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcchrstr.h
+           dcmdata/include/dcmtk/dcmdata/dcdicdir.h
+           dcmdata/include/dcmtk/dcmdata/dcdicent.h
+           dcmdata/include/dcmtk/dcmdata/dcdict.h
+           dcmdata/include/dcmtk/dcmdata/dcelem.h
+           dcmdata/include/dcmtk/dcmdata/dcfcache.h
+           dcmdata/include/dcmtk/dcmdata/dchashdi.h
+           dcmdata/include/dcmtk/dcmdata/dcistrmf.h
+           dcmdata/include/dcmtk/dcmdata/dcjson.h
+           dcmdata/include/dcmtk/dcmdata/dclist.h
+           dcmdata/include/dcmtk/dcmdata/dcobject.h
+           dcmdata/include/dcmtk/dcmdata/dcpcache.h
+           dcmdata/include/dcmtk/dcmdata/dcpixel.h
+           dcmdata/include/dcmtk/dcmdata/dcstack.h
+           dcmdata/include/dcmtk/dcmdata/dctagkey.h
+           dcmdata/include/dcmtk/dcmdata/dcvrae.h
+           dcmdata/include/dcmtk/dcmdata/dcvrcs.h
+           dcmdata/include/dcmtk/dcmdata/dcvrda.h
+           dcmdata/include/dcmtk/dcmdata/dcvrdt.h
+           dcmdata/include/dcmtk/dcmdata/dcvrpobw.h
+           dcmdata/include/dcmtk/dcmdata/dcvrtm.h
+           dcmdata/include/dcmtk/dcmdata/dcvrur.h
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2dbmps.h
+           dcmimage/include/dcmtk/dcmimage/dihsvpxt.h
+           dcmimage/include/dcmtk/dcmimage/diqthash.h
+           dcmimage/include/dcmtk/dcmimage/diybrpxt.h
+           dcmimage/include/dcmtk/dcmimage/diyf2pxt.h
+           dcmimage/include/dcmtk/dcmimage/diyp2pxt.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djcodece.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djcparam.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djencbas.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djencext.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djenclol.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djencpro.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djencsps.h
+           dcmjpeg/include/dcmtk/dcmjpeg/djencsv1.h
+           dcmnet/docs/cptscp.dox
+           dcmnet/include/dcmtk/dcmnet/cond.h
+           dcmnet/include/dcmtk/dcmnet/dcasccff.h
+           dcmnet/include/dcmtk/dcmnet/dcasccfg.h
+           dcmnet/include/dcmtk/dcmnet/dccfenmp.h
+           dcmnet/include/dcmtk/dcmnet/dfindscu.h
+           dcmpstat/include/dcmtk/dcmpstat/dviface.h
+           dcmpstat/include/dcmtk/dcmpstat/dvpsfs.h
+           dcmpstat/include/dcmtk/dcmpstat/dvpsga.h
+           dcmpstat/include/dcmtk/dcmpstat/dvpsgr.h
+           dcmpstat/include/dcmtk/dcmpstat/dvpsgrl.h
+           dcmpstat/include/dcmtk/dcmpstat/dvpsibl.h
+           dcmpstat/include/dcmtk/dcmpstat/dvpsmsg.h
+           dcmpstat/include/dcmtk/dcmpstat/dvpsovl.h
+           dcmpstat/include/dcmtk/dcmpstat/dvpspr.h
+           dcmpstat/include/dcmtk/dcmpstat/dvpsrs.h
+           dcmpstat/include/dcmtk/dcmpstat/dvpssp.h
+           dcmpstat/include/dcmtk/dcmpstat/dvpsvl.h
+           dcmpstat/include/dcmtk/dcmpstat/dvsighdl.h
+           dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcbs.h
+           dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdbi.h
+           dcmqrdb/include/dcmtk/dcmqrdb/dcmqridx.h
+           dcmqrdb/include/dcmtk/dcmqrdb/dcmqrptb.h
+           dcmsign/include/dcmtk/dcmsign/sicertvf.h
+           dcmsign/include/dcmtk/dcmsign/sipkey.h
+           dcmsign/include/dcmtk/dcmsign/sisprof.h
+           dcmtls/include/dcmtk/dcmtls/tlsciphr.h
+           dcmtls/include/dcmtk/dcmtls/tlslayer.h
+           dcmtls/include/dcmtk/dcmtls/tlsopt.h
+           dcmwlm/include/dcmtk/dcmwlm/wlds.h
+           dcmwlm/include/dcmtk/dcmwlm/wlfsim.h
+           dcmwlm/include/dcmtk/dcmwlm/wlmactmg.h
+           oflog/include/dcmtk/oflog/helpers/strhelp.h
+           oflog/include/dcmtk/oflog/spi/filter.h
+           ofstd/include/dcmtk/ofstd/oflimits.h
+           ofstd/include/dcmtk/ofstd/ofstd.h
+           ofstd/include/dcmtk/ofstd/oftest.h
+           ofstd/include/dcmtk/ofstd/ofvriant.h
+
+**** Changes from 2022.02.21 (riesmeier)
+
+- Fixed typos and revised line breaks.
+  Affects: dcmtls/docs/certstor.dox
+
+**** Changes from 2022.02.18 (riesmeier)
+
+- Do not create new document in readXML():
+  Do not create a new document in readXML(), but change the document type.
+  This also avoids confusing messages to the logger.
+  Affects: dcmsr/libsrc/dsrdoc.cc
+
+- Made XML elements "date" and "time" optional:
+  The XML elements "instance/creation/date" and "instance/creation/time"
+  are optional according to the XML Schema. Therefore, the readXML() method
+  should not require them to be present if the surrounding XML element is
+  present.
+  Affects: dcmsr/libsrc/dsrdoc.cc
+
+- Do not set instance creator UID automatically:
+  Do not set instance creator UID automatically to identify instances that
+  have been created by this toolkit.
+  Affects: dcmsr/libsrc/dsrdoc.cc
+
+**** Changes from 2022.02.11 (riesmeier)
+
+- Extended comment on Type of Modality attribute.
+  Affects: dcmdata/libsrc/dcddirif.cc
+
+**** Changes from 2022.02.10 (riesmeier)
+
+- Added check on empty Unique Keys in "strict mode":
+  Report an error if a Unique Key value is empty for C-FIND (higher levels) or
+  C-MOVE (all levels down to the Q/R level) request. See DICOM PS3.4 Section
+  C.2.2.1.1, C.4.1.2.1 and C.4.2.2.1 for details.
+  This check is only performed in "strict mode", i.e. when dcmqrscp is called
+  with option --check-find (-XF) or --check-move (-XM), respectively.
+  This closes DCMTK Bug #1015.
+  Thanks to Abdallah Maouche <abdallahmaouche98@gmail.com> for the report and
+  suggested fix.
+  Affects: dcmqrdb/libsrc/dcmqrdbi.cc
+
+**** Changes from 2022.02.09 (riesmeier)
+
+- Updated Doxygen configuration files:
+  Updated Doxgen configuration files to version 1.8.17 of this tool.
+  The update has been performed by calling "doxygen -u <filename>".
+  Affects: doxygen/htmldocs.cfg
+           doxygen/manpages.cfg
+
+- Made use of DCM_PixelItemTag where appropriate.
+  Affects: dcmdata/tests/tsequen.cc
+
+**** Changes from 2022.02.08 (riesmeier)
+
+- Added missing well-known frame of reference:
+  Also removed Unicode characters from UID name of the Microscopy Bulk Simple
+  Annotations Storage SOP Class.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h
+           dcmdata/libsrc/dcuid.cc
+
+- Introduced plural form where appropriate:
+  Use plural form for Ophthalmic Photography Image SOP classes since there
+  is one for 8-bit and one for 16-bit images, i.e. there are two of them.
+  Also fixed other minor documentation issues.
+  Affects: dcmdata/apps/img2dcm.cc
+           dcmdata/docs/img2dcm.man
+
+- Fixed spelling of attribute name in log message.
+  Affects: dcmdata/libi2d/i2dplnsc.cc
+           dcmdata/libi2d/i2dplop.cc
+           dcmdata/libi2d/i2dplvlp.cc
+
+- Removed email addresses and trailing spaces.
+  Affects: CREDITS
+
+**** Changes from 2022.02.08 (eichelberg)
+
+- Updated credits to include Segmed, Inc.
+  Affects: CREDITS
+
+**** Changes from 2022.01.26 (riesmeier)
+
+- Updated code definitions for DICOM 2022a:
+  Updated automatically generated code definitions for coding scheme "DCM".
+  For the coding schemes "NCIt" and "UMLS", there were no changes.
+  Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h
+           dcmsr/include/dcmtk/dcmsr/codes/ncit.h
+           dcmsr/include/dcmtk/dcmsr/codes/umls.h
+
+- Updated data dictionary for DICOM 2022a:
+  Updated data dictionary for the latest edition of the DICOM standard, which
+  has been released only recently.
+  Since one of the DICOM attributes was "retired", the name of the associated
+  DcmTagKey constant also changed. This required minor changes to the source
+  code of the dcmrt module (automatically generated source files).
+  Affects: dcmdata/data/dicom.dic
+           dcmdata/include/dcmtk/dcmdata/dcdeftag.h
+           dcmdata/libsrc/dcdictbi.cc
+           dcmrt/libsrc/drtionpl.cc
+           dcmrt/libsrc/drtplan.cc
+
+**** Changes from 2022.01.11 (onken)
+
+- Fixed build warnings.
+  Affects: dcmfg/libsrc/fgbase.cc
+           dcmseg/libsrc/segdoc.cc
+           dcmseg/tests/tbigdim.cc
+
+**** Changes from 2022.01.09 (riesmeier)
+
+- Removed extra space.
+  Affects: CMake/3rdparty.cmake
+
+- Fixed typo.
+  Affects: dcmseg/include/dcmtk/dcmseg/segtypes.h
+
+**** Changes from 2022.01.08 (eichelberg)
+
+- Fixed further build error.
+  Affects: dcmseg/libsrc/segtypes.cc
+
+**** Changes from 2022.01.07 (onken)
+
+- Fixed build errors on some systems:
+  Fixed build errors on some systems introduced in commit 345223.
+  Affects: dcmseg/include/dcmtk/dcmseg/segdoc.h
+           dcmseg/libsrc/segdoc.cc
+           dcmseg/tests/tbigdim.cc
+
+**** Changes from 2022.01.06 (onken)
+
+- Allow up to 2^31-1 frames in segmentations:
+  At several occassions dcmseg and underlying modules limited the number
+  of frames, e.g. by (partly) restricting this value to 16 bit.
+  Now in theory 2^31-1 frames are possible, though the size for
+  non-concatenation instances is still limited to around 4 GB imposed by
+  the Pixel Data element's length field for uncompressed pixel data.
+  Added method on segmentations and underlying Multi-frame Dimension
+  module that prevents running dimension checking (especially Dimension
+  Index Pointer attributes) which can slow down writing a lot if many
+  frames are written.
+  Also made some simplifications and added documentation.
+  Added:   dcmseg/tests/tbigdim.cc
+  Affects: dcmfg/libsrc/fginterface.cc
+           dcmiod/include/dcmtk/dcmiod/modmultiframedimension.h
+           dcmiod/libsrc/iodutil.cc
+           dcmiod/libsrc/modmultiframedimension.cc
+           dcmseg/include/dcmtk/dcmseg/segdoc.h
+           dcmseg/include/dcmtk/dcmseg/segment.h
+           dcmseg/include/dcmtk/dcmseg/segtypes.h
+           dcmseg/libsrc/segdoc.cc
+           dcmseg/libsrc/segment.cc
+           dcmseg/libsrc/segtypes.cc
+           dcmseg/tests/CMakeLists.txt
+           dcmseg/tests/Makefile.dep
+           dcmseg/tests/Makefile.in
+           dcmseg/tests/tests.cc
+
+**** Changes from 2022.01.05 (eichelberg)
+
+- Replaced C_CHAR_UNSIGNED test by a compile-only one:
+  Replaced the test for the signedness of the char type, which so far
+  needed to execute a test program with TRY_RUN, with test code that only
+  needs to compile, but not run, which makes things easier in a cross-compilation
+  setting.
+  Thanks to Helmut Grohne <helmut@subdivi.de> for the suggestion and patch.
+  This closes Github pull request #44.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           INSTALL
+  Removed: CMake/dcmtkTestCharSignedness.cc
+
+- Added CMake option DCMTK_PORTABLE_LINUX_BINARIES:
+  Added CMake option DCMTK_PORTABLE_LINUX_BINARIES that is intended to help
+  with the generation of binary executables that run on different distributions.
+  When this option is enabled, only static versions of the third party libraries
+  are detected and used, and the linker is run with the options -static-libgcc
+  -static-libstdc++, which cause a static version of libgcc and libstdc++ to be
+  used. Note that glibc is still dynamically loaded, because a statically linked
+  glibc actually causes portability issues due to glibc components loaded from
+  shared objects at runtime.
+  The new option does not yet handle the link dependencies of the external
+  libraries (such as libxml2 requiring zlib) properly. In order to handle these,
+  one would have to identify the dependencies using pkg-config and then search
+  for static versions of all dependencies, possibly recursively.
+  Affects: CMake/3rdparty.cmake
+           CMake/dcmtkPrepare.cmake
+
+**** Changes from 2022.01.04 (eichelberg)
+
+- Fixed issue with defragmentTCP() in non-blocking mode on Windows, where the
+  WSAEWOULDBLOCK return code was not properly handled in the past.
+  Thanks to DCMTK forum user "wrenashe".
+  This closes DCMTK issue #1006.
+  Affects: dcmnet/libsrc/dulfsm.cc
+
+**** Changes from 2021.12.28 (eichelberg)
+
+- Fixed indentation.
+  Affects: dcmjpls/libsrc/djcodecd.cc
+
+- Updated warning message.
+  Affects: dcmjpls/libsrc/djcodecd.cc
+
+**** Changes from 2021.12.22 (eichelberg)
+
+- Corrected handling of character set for HG images:
+  The dcmpsprt tool reads an image (and optionally a presentation state)
+  and prepares a print job that is stored as a set of SP and HG files,
+  which can be spooled to a print server using dcmprscu. The HG image
+  contained some patient attributes (such as the PatientName) of the
+  original image, but did not proporly copy SpecificCharacterSet.
+  Thanks to Daniel Calvo <dcalvo@fitec.org.br> for the bug report and fix.
+  Affects: dcmpstat/libsrc/dcmpstat.cc
+           dcmpstat/libsrc/dviface.cc
+
+**** Changes from 2021.12.14 (eichelberg)
+
+- Initialize buffer to zero.
+  Affects: dcmqrdb/libsrc/dcmqrtis.cc
+
+- Removed dead code to avoid warning.
+  Affects: dcmnet/libsrc/dimse.cc
+
+**** Changes from 2021.12.11 (eichelberg)
+
+- Fixed undefined behavior in handling A-ASSOCIATE-RJ:
+  Function ASC_getRejectParameters() did not properly validate the parameters of
+  an incoming A-ASSOCIATE-RJ packet, causing undefined behavior in the case
+  of invalid data. Proper validation has now been added.
+  Thanks to Matthias Gierlings <matthias.gierlings@ruhr-uni-bochum.de>
+  of the MITSicherheit.NRW project for the bug report.
+  Affects: dcmnet/libsrc/assoc.cc
+
+**** Changes from 2021.12.06 (riesmeier)
+
+- Updated code definitions for DICOM 2021e:
+  Updated automatically generated code definitions for coding scheme "DCM".
+  For the coding schemes "NCIt" and "UMLS", there were no changes.
+  Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h
+           dcmsr/include/dcmtk/dcmsr/codes/ncit.h
+           dcmsr/include/dcmtk/dcmsr/codes/umls.h
+
+**** Changes from 2021.12.03 (onken)
+
+- Fixed bug when adding more than 65535 frames.
+  Affects: dcmiod/libsrc/iodutil.cc
+
+**** Changes from 2021.12.02 (eichelberg)
+
+- Added logger output for OpenSSL initialization:
+  Added logger output for the case that the dcmsign module is unable
+  to load the legacy provider (introduced in OpenSSL 3.0.0) during
+  initialization. In this case certain hash key algorithms, including
+  RIPEMD160, are unavailable.
+  Affects: dcmsign/libsrc/dcsignat.cc
+
+**** Changes from 2021.11.26 (riesmeier)
+
+- Fixed Media Storage SOP Class UID in DICOMDIR:
+  Fixed wrong value for Media Storage SOP Class UID (0002,0002) that was
+  added to the File Meta Information Header of a DICOMDIR file. Instead
+  of 1.2.840.10008.1.3.10 (Media Storage Directory Storage SOP Class) the
+  private DCMTK-specific SOP Class UID 1.2.276.0.7230010.3.1.0.1 was used.
+  This was a result of a change of the default parameter of the method
+  DcmFileFormat::validateMetaInfo() introduced with commit d31f92867e.
+  Thanks to Gilles Mevel <gilles.mevel@groupe-nehs.com> for the report and
+  suggested fix.
+  Affects: dcmdata/libsrc/dcdicdir.cc
+
+**** Changes from 2021.11.25 (riesmeier)
+
+- Updated data dictionary for DICOM 2021e:
+  Updated data dictionary for the latest edition of the DICOM standard,
+  which has been released only recently.
+  Affects: dcmdata/data/dicom.dic
+           dcmdata/include/dcmtk/dcmdata/dcdeftag.h
+           dcmdata/libsrc/dcdictbi.cc
+
+- Added missing spaces (removed by previous commit).
+  Affects: dcmfg/libsrc/concatenationloader.cc
+           dcmfg/tests/t_concatenation_loader.cc
+
+**** Changes from 2021.11.25 (onken)
+
+- Remove some typos in the codebase:
+  * Concatentation -> Concatenation
+      * intialized -> initialized
+      * "permits to" -> "permits one to"
+      * "allow to" -> "allow one to"
+      * "allows to" -> "allows one to"
+      * truely -> truly
+      * additonal -> additional
+  Thanks to GitHub user "malaterre" for the report and suggested fix.
+  Affects: dcmfg/libsrc/concatenationcreator.cc
+           dcmfg/libsrc/concatenationloader.cc
+           dcmfg/tests/t_concatenation_loader.cc
+           dcmjpeg/docs/dcmcjpeg.man
+           dcmpstat/apps/dcmpsmk.cc
+           dcmpstat/docs/dcmp2pgm.man
+           dcmpstat/docs/dcmprscp.man
+           dcmpstat/docs/dcmpsmk.man
+           dcmwlm/docs/wlmscpfs.man
+
+**** Changes from 2021.11.25 (eichelberg)
+
+- Fixed CMake OpenSSL feature tests:
+  On some platforms, the OpenSSL test cases need to be linked against the
+  pthread library, because otherwise linker errors lead to incorrect test
+  results, e.g. for the macro HAVE_OPENSSL_X509_ALGOR_GET0_CONST_PARAM.
+  The OpenSSL feature tests are now executed after the THREAD_LIBS variable
+  has been defined, and take into account its content.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/dcmtkPrepare.cmake
+
+**** Changes from 2021.11.22 (riesmeier)
+
+- Replaced OFListIterator by OFListConstIterator:
+  Replaced type of iterator variable to OFListConstIterator to avoid
+  compiler errors reported by gcc when compiling DICOMscope with STL
+  and C++14 support enabled.
+  Thanks to GitHub user "malaterre" for the report and suggested fix.
+  Affects: dcmsr/include/dcmtk/dcmsr/dsrtlist.h
+
+**** Changes from 2021.11.20 (eichelberg)
+
+- Improvements to pkg-config support.
+  Affects: CMakeLists.txt
+  Renamed: dcmtk.pc.in
+         -> CMake/dcmtk.pc.in
+
+**** Changes from 2021.11.17 (riesmeier)
+
+- Changed order of OpenSSL libraries (Autoconf):
+  Changed order of additional libraries for OpenSSL 1.0.1.
+  Affects: config/configure.in
+
+**** Changes from 2021.11.16 (riesmeier)
+
+- Fixed comment on Autoconf define HAVE_CXX.
+  Affects: config/configure
+           config/include/dcmtk/config/osconfig.h.in
+           config/stdcxx.m4
+
+- Fixed issue with findAndGetUint16Array() for OB:
+  Fixed issue with findAndGetUint16Array() when accessing pixel data that
+  is stored with a VR of "OB" (Other Byte). In this case, this method
+  returned an incorrect value for the optional "count" parameter. Of
+  course, the method findAndGetUint8Array() should be used for "OB" data,
+  but the returned number of elements in the array should be correct in
+  any case.
+  Now, all findAndGetXXXArray() methods again use the data element length
+  for determining the value of the "count" parameter, which requires no
+  handling of special cases.
+  Thanks to forum user "st80rules" for the report.
+  Affects: dcmdata/libsrc/dcitem.cc
+
+- Enhanced Autoconf build system for OpenSSL checks:
+  Enhanced GNU Autoconf build system (aka configure) for the recently
+  changed CMake approach to check support for certain OpenSSL features.
+  Also revised, i.e. simplified and harmonized, the use of the M4 macros
+  AH_TEMPLATE and AC_DEFINE.
+  Affects: config/aclocal.m4
+           config/configure
+           config/configure.in
+           config/include/dcmtk/config/osconfig.h.in
+
+**** Changes from 2021.11.16 (goldhammer)
+
+- Fixed confusing value of Host Type on Windows:
+  When compiling 32-bit binaries on Windows, the Host type was still shown as
+  "AMD64". This was confusing and misleading. Now 32-bit binaries should show
+  "Win32", whereas 64-bit binaries should show "x64".
+  This closes DCMTK issue #940.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+**** Changes from 2021.11.16 (eichelberg)
+
+- Documented cross-compiling support:
+  Documented the support for cross-compiling DCMTK using the CMake toolchain.
+  Thanks to Claus Stovgaard <clst@ambu.com> for the implementation!
+  Affects: INSTALL
+
+- Fixed previous commit:
+  One symbol was not renamed consistently in the previous commit,
+  this is now fixed.
+  Affects: dcmtls/libsrc/tlsciphr.cc
+
+**** Changes from 2021.11.15 (eichelberg)
+
+- Renamed OpenSSL related feature test symbols:
+  Renamed all OpenSSL related feature test preprocessor symbols to
+  include the term OPENSSL to make it clear that these features
+  are related to the OpenSSL library.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+           dcmsign/include/dcmtk/dcmsign/simdmac.h
+           dcmsign/libsrc/dcsignat.cc
+           dcmsign/libsrc/sicert.cc
+           dcmsign/libsrc/siprivat.cc
+           dcmsign/libsrc/sitstamp.cc
+           dcmtls/libsrc/tlsciphr.cc
+           dcmtls/libsrc/tlslayer.cc
+           dcmtls/libsrc/tlstrans.cc
+
+**** Changes from 2021.11.12 (eichelberg)
+
+- Fixed memory leak in DcmElement::getPartialValue():
+  Fixed a memory leak in DcmElement::getPartialValue() that occured when the
+  input stream created for reading the partial element from the DICOM file
+  had status "bad" after creation, e.g. because the DICOM file had been removed.
+  Thanks to DCMTK forum user Shaeto for the bug report.
+  This closes DCMTK issue #1010.
+  Affects: dcmdata/libsrc/dcelem.cc
+
+**** Changes from 2021.11.11 (riesmeier)
+
+- Added support for two new Storage SOP Classes:
+  Added definition of new Storage SOP Class UIDs introduced with Supplement
+  160 (Second Generation Radiotherapy - Patient Setup and Delivery Instruction).
+  This commit also adds support for the various networking tools and to the
+  DICOMDIR generation code.
+  This closes DCMTK Conformance #1009.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h
+           dcmdata/libsrc/dcddirif.cc
+           dcmdata/libsrc/dcuid.cc
+           dcmnet/docs/movescu.man
+           dcmnet/docs/storescp.man
+           dcmnet/etc/storescp.cfg
+           dcmnet/etc/storescu.cfg
+           dcmqrdb/docs/dcmqrscp.man
+           dcmqrdb/etc/dcmqrprf.cfg
+
+**** Changes from 2021.11.09 (riesmeier)
+
+- Removed useless typecasts from inline method:
+  Removed useless typecasts reported by gcc with -Wuseless-cast. There are
+  numerous other warnings like this in the DCMTK that are reported when the
+  additional warning option is set, but these two could leak into user code
+  since they are used in an inline method.
+  Thanks to GitHub user "malaterre" for the report and suggested fix.
+  Affects: dcmimgle/include/dcmtk/dcmimgle/diovpln.h
+
+**** Changes from 2021.11.05 (onken)
+
+- Print warning for old cmake dictionary options:
+  Thanks to GitHub user "malaterre" for the report and patch.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+**** Changes from 2021.10.30 (eichelberg)
+
+- Enable C-GET for write protected storage areas:
+  dcmqrscp now accepts storage presentation contexts for "read-only" storage
+  areas if SCP/SCU role negotiation is in place and the client has requested
+  the SCP role for the SOP class. This enables the use of C-GET on such
+  storage areas.
+  This closes DCMTK issue #967.
+  Affects: dcmqrdb/libsrc/dcmqrsrv.cc
+
+**** Changes from 2021.10.25 (eichelberg)
+
+- Removed duplicate test.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+**** Changes from 2021.10.20 (eichelberg)
+
+- Added two additional configure tests needed on OpenBSD:
+  Added two additional configure tests needed for LibreSSL on OpenBSD 7,
+  and renamed the macros defined by the configure tests to simplify
+  the porting of these tests to the autoconf toolchain.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+           dcmsign/libsrc/dcsignat.cc
+           dcmsign/libsrc/sicert.cc
+           dcmsign/libsrc/siprivat.cc
+           dcmsign/libsrc/sitstamp.cc
+           dcmtls/libsrc/tlsciphr.cc
+           dcmtls/libsrc/tlslayer.cc
+           dcmtls/libsrc/tlstrans.cc
+
+**** Changes from 2021.10.19 (eichelberg)
+
+- Introduced configure tests for OpenSSL features:
+  Introduced a set of new configure tests for the various functions, header
+  files and macros that have changed between different OpenSSL versions and
+  require special handling in DCMTK. This replaces the conditional
+  compilation based on the values of OPENSSL_VERSION_NUMBER and
+  LIBRESSL_VERSION_NUMBER, which was difficult to maintain as OpenSSL
+  and LibreSSL change over time.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+           dcmsign/include/dcmtk/dcmsign/simdmac.h
+           dcmsign/libsrc/dcsignat.cc
+           dcmsign/libsrc/sicert.cc
+           dcmsign/libsrc/siprivat.cc
+           dcmsign/libsrc/sitstamp.cc
+           dcmtls/libsrc/tlsciphr.cc
+           dcmtls/libsrc/tlslayer.cc
+           dcmtls/libsrc/tlstrans.cc
+
+**** Changes from 2021.10.18 (riesmeier)
+
+- Output more build options with --version:
+  Now, more details on how the DCMTK has been built are printed when
+  calling one of the DCMTK command line tools with --version option,
+  e.g. "Build options: debug threads lfs extern-dict dcmdictpath".
+  Affects: ofstd/libsrc/ofconapp.cc
+
+**** Changes from 2021.10.14 (riesmeier)
+
+- Fixed typo in comment.
+  Affects: dcmrt/include/dcmtk/dcmrt/drmdose.h
+           dcmrt/include/dcmtk/dcmrt/drmimage.h
+           dcmrt/include/dcmtk/dcmrt/drmplan.h
+           dcmrt/include/dcmtk/dcmrt/drmstrct.h
+
+**** Changes from 2021.10.11 (riesmeier)
+
+- Fixed further inconsistencies.
+  Affects: dcmnet/include/dcmtk/dcmnet/helpers.h
+           dcmnet/libsrc/helpers.cc
+
+**** Changes from 2021.10.11 (onken)
+
+- Fixed documentation.
+  Affects: dcmnet/include/dcmtk/dcmnet/helpers.h
+
+**** Changes from 2021.10.11 (eichelberg)
+
+- Fixed incorrect constructor call:
+  Fixed a call where NULL was passed to an OFString constructor, which
+  causes problems when DCMTK is compiled with STL enabled.
+  Affects: dcmpstat/libsrc/dvpsfs.cc
+
+**** Changes from 2021.10.09 (onken)
+
+- Fixed bug introduced in a9697d:
+  Fixed bug introduced in a9697d due to merging two methods which do
+  different things. Added some API documentation for clarification.
+  Affects: dcmnet/include/dcmtk/dcmnet/assoc.h
+           dcmnet/include/dcmtk/dcmnet/helpers.h
+           dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/dulfsm.cc
+           dcmnet/libsrc/dulparse.cc
+           dcmnet/libsrc/helpers.cc
+
+**** Changes from 2021.10.08 (schlamelcher)
+
+- Removed some dead code (CMake):
+  Removed some code that was intended as a fall-back mechanism to implement new
+  CMake versions policy setting behavior (used in the cmake_minimum_required
+  command). Turns out there is no way to implement this using the cmake_policy
+  command, as the command only supports setting the minimum policy version in
+  those older CMake versions (i.e. NOT the maximum policy version), effectively
+  having no effect for the intended purpose.
+  Affects: CMakeLists.txt
+
+**** Changes from 2021.10.02 (onken)
+
+- Fixed poss. NULL pointer dereference/double free:
+  Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and some patches.
+  Added:   dcmnet/include/dcmtk/dcmnet/helpers.h
+           dcmnet/libsrc/helpers.cc
+  Affects: dcmnet/libsrc/CMakeLists.txt
+           dcmnet/libsrc/Makefile.in
+           dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/dcuserid.cc
+           dcmnet/libsrc/dul.cc
+           dcmnet/libsrc/dulconst.cc
+           dcmnet/libsrc/dulextra.cc
+           dcmnet/libsrc/dulfsm.cc
+           dcmnet/libsrc/dulparse.cc
+           dcmnet/libsrc/dulpres.cc
+  Renamed: dcmnet/libsrc/dulstruc.h
+         -> dcmnet/include/dcmtk/dcmnet/dulstruc.h
+
+**** Changes from 2021.10.01 (eichelberg)
+
+- Check whether DICOM dataset contains extended chars:
+  dcm2json now checks whether extended characters are present in a DICOM
+  dataset that has no SpecificCharacterSet attribute or has the attribute
+  value set to 'ISO_IR 6'.
+  This fixes DCMTK issue #1004.
+  Thanks to Mathieu Malaterre <mathieu.malaterre@gmail.com> for the bug report.
+  Affects: dcmdata/apps/dcm2json.cc
+
+**** Changes from 2021.09.30 (riesmeier)
+
+- Removed trailing Unicode character in manpage:
+  Also removed trailing Unicode character U+200B from UID value in manpage.
+  Affects: dcmnet/docs/movescu.man
+           dcmnet/docs/storescp.man
+           dcmqrdb/docs/dcmqrscp.man
+
+- Converted non-ASCII characters to ASCII:
+  Thanks to GitHub user "malaterre" for the report and suggested fix.
+  Affects: dcmect/libsrc/enhanced_ct.cc
+           dcmfg/libsrc/concatenationloader.cc
+           dcmiod/include/dcmtk/dcmiod/modsopcommon.h
+           dcmseg/include/dcmtk/dcmseg/segment.h
+           dcmtls/include/dcmtk/dcmtls/tlsciphr.h
+
+- Removed trailing Unicode character from UID value:
+  Removed trailing Unicode character U+200B from UID value.
+  Thanks to GitHub user "malaterre" for the report.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h
+
+- Replaced German umlaut by its transliteration:
+  Replaced German umlaut in code meaning by its transliteration.
+  Thanks to GitHub user "malaterre" for the report.
+  Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h
+
+**** Changes from 2021.09.29 (eichelberg)
+
+- Fixed bug in SiCertificate::getCertCurveName():
+  Fixed bug in SiCertificate::getCertCurveName() introduced with
+  commit #af74de3c7 that affected dcmsign when compiled with STL enabled.
+  Affects: dcmsign/libsrc/sicert.cc
+
+**** Changes from 2021.09.28 (eichelberg)
+
+- Removed definition of NEED_DARRAY macro:
+  Removed definition of NEED_DARRAY macro and conditional compilation based
+  on this macro, as this may lead to conflicting declarations of jpeg_memory_mgr
+  depending on whether or not the macro is defined when used code includes
+  the corresponding dcmjpeg header files.
+  This closes DCMTK issue #815.
+  Affects: dcmjpeg/libijg12/jmemmgr.c
+           dcmjpeg/libijg12/jpeglib12.h
+           dcmjpeg/libijg16/jmemmgr.c
+           dcmjpeg/libijg16/jpeglib16.h
+           dcmjpeg/libijg8/jmemmgr.c
+           dcmjpeg/libijg8/jpeglib8.h
+
+- Fixed warnings when compiling with OpenSSL 3.0:
+  Fixed warnings about the use of deprecated functions when compiling
+  with OpenSSL 3.0.
+  Affects: dcmpstat/libsrc/dvsighdl.cc
+           dcmsign/include/dcmtk/dcmsign/sicert.h
+           dcmsign/libsrc/dcsighlp.cc
+           dcmsign/libsrc/sicert.cc
+           dcmsign/libsrc/sitstamp.cc
+
+**** Changes from 2021.09.27 (riesmeier)
+
+- Check for space character in File-set ID:
+  According to DICOM PS3.10 Section 8.5, a space character is not allowed
+  to be included in a File-set ID. Therefore, the checkFilesetID() has
+  been enhanced in this regard and now reports an error if needed.
+  This closes DCMTK Bug #986.
+  Affects: dcmdata/libsrc/dcddirif.cc
+
+**** Changes from 2021.09.24 (riesmeier)
+
+- Fixed issue with unknown UID name:
+  Fixed issue with unknown UID name that cannot be mapped by putString()
+  to the associated UID value, e.g. '=SecondaryCaptureImage" where the
+  name suffix "Storage" is missing. Now, dump2dcm will exit with an error
+  in such a case.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcerror.h
+           dcmdata/include/dcmtk/dcmdata/dcvrui.h
+           dcmdata/libsrc/dcerror.cc
+           dcmdata/libsrc/dcvrui.cc
+
+**** Changes from 2021.09.15 (onken)
+
+- Fixed possible NULL pointer dereference:
+  Thanks to Jinsheng Ba <bajinsheng@u.nus.edu> for the report and patch.
+  Affects: dcmnet/libsrc/diutil.cc
+
+**** Changes from 2021.09.14 (riesmeier)
+
+- Replaced old-style cast by OFstatic_cast():
+  Replaced old-style cast by OFstatic_cast() to avoid warning message
+  reported by gcc with extra warning flags (-Wold-style-cast).
+  Affects: ofstd/libsrc/ofstd.cc
+
+**** Changes from 2021.09.13 (riesmeier)
+
+- Updated Context Group classes for DICOM 2021d:
+  Updated automatically generated Context Group classes for the 2021d edition
+  of the DICOM standard. All supported classes were updated, even though there
+  were no changes to most of them.
+  Affects: dcmsr/include/dcmtk/dcmsr/cmr/cid100.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid10013.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid10033.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid11.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid244.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid247.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid29.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid4020.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid4021.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid42.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid6147.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7021.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7445.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7452.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7453.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7464.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h
+           dcmsr/libcmr/cid100.cc
+           dcmsr/libcmr/cid10013.cc
+           dcmsr/libcmr/cid10033.cc
+           dcmsr/libcmr/cid11.cc
+           dcmsr/libcmr/cid244.cc
+           dcmsr/libcmr/cid247.cc
+           dcmsr/libcmr/cid29.cc
+           dcmsr/libcmr/cid4020.cc
+           dcmsr/libcmr/cid4021.cc
+           dcmsr/libcmr/cid4031.cc
+           dcmsr/libcmr/cid42.cc
+           dcmsr/libcmr/cid6147.cc
+           dcmsr/libcmr/cid7021.cc
+           dcmsr/libcmr/cid7181.cc
+           dcmsr/libcmr/cid7445.cc
+           dcmsr/libcmr/cid7452.cc
+           dcmsr/libcmr/cid7453.cc
+           dcmsr/libcmr/cid7464.cc
+           dcmsr/libcmr/cid7469.cc
+
+- Updated code definitions for DICOM 2021d:
+  Updated automatically generated code definitions for coding scheme "DCM".
+  For the coding schemes "NCIt" and "UMLS", there were no changes.
+  Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h
+
+- Updated data dictionary for DICOM 2021d:
+  Updated data dictionary for the latest edition of the DICOM standard,
+  which has been released only recently.
+  Affects: dcmdata/data/dicom.dic
+           dcmdata/include/dcmtk/dcmdata/dcdeftag.h
+           dcmdata/libsrc/dcdictbi.cc
+
+**** Changes from 2021.09.07 (eichelberg)
+
+- Fixed Posix feature flags for Android build.
+  Affects: CMake/dcmtkPrepare.cmake
+
+- Removed const qualifier in static function:
+  Removed const qualifier in static function, required for gcc 4.8.5
+  on CentOS 7 (PPC).
+  Affects: dcmdata/libsrc/xml2dcm.cc
+
+**** Changes from 2021.09.01 (onken)
+
+- Harmonize dictionary options:
+  There are now two variables in CMake to control the default dictionary
+  chosen on DCMTK startup: DCMTK_DEFAULT_DICT and DCMTK_USE_DCMDICTPATH.
+  DCMTK_DEFAULTDICT has three settings:
+  - external: Will load dictionary on DCMTK startup from pre-defined
+    default path.
+  - builtin: Will compile and load built-in dictionary into DCMTK.
+  - none: Will not load any pre-configured dictionary at all.
+  On top, DCMTK can load one or more dictionaries from evaulating
+  the environment variable DCMDICTPATH at runtime. This behaviour is
+  controlled by the CMake setting DCMTK_USE_DCMDICTPATH. If it is turned
+  on, DCMTK will evaluate DCMDICTPATH, otherwise it doesn't.
+  More details can befound in dcmdata/docs/datadict.txt.
+  Also, an error message is printed if external default dictionary is
+  enabled but cannot be loaded (e.g. since file does not exist at
+  default path). In the past this has been silently ignored for the
+  default dictionary, only errors while loading dictionaries defined by
+  DCMDICTPATH environment variables have been reported.
+  Affects: CMake/DCMTKConfig.cmake.in
+           CMake/DCMTKConfig.old_cmake.in
+           CMake/GenerateDCMTKConfigure.cmake
+           CMake/dcmtkPrepare.cmake
+           CMake/osconfig.h.in
+           INSTALL
+           config/configure
+           config/configure.in
+           config/docs/macros.txt
+           config/include/dcmtk/config/osconfig.h.in
+           dcmdata/docs/datadict.txt
+           dcmdata/include/dcmtk/dcmdata/dcdict.h
+           dcmdata/libsrc/dcdict.cc
+           dcmdata/libsrc/dcdictbi.cc
+           dcmdata/libsrc/mkdictbi.cc
+
+**** Changes from 2021.08.31 (eichelberg)
+
+- Fixed minor warning issued by gcc 10.2.1.
+  Affects: dcmnet/libsrc/dulconst.cc
+
+**** Changes from 2021.08.30 (eichelberg)
+
+- Send Illumination and RefAL only when non-empty:
+  When sending a print request, only include Illumination and
+  Reflected Ambient Light in a Basic Film Session or Basic Film Box
+  N-CREATE-RQ when the attributes are non-empty.
+  Affects: dcmpstat/libsrc/dvpsfs.cc
+           dcmpstat/libsrc/dvpssp.cc
+
+**** Changes from 2021.08.27 (eichelberg)
+
+- Fixed compilation on Solaris after previous commit.
+  Affects: config/math.cc
+
+**** Changes from 2021.08.26 (eichelberg)
+
+- Enable compilation of DCMTK on DragonFly BSD:
+  Compilation of DCMTK on DragonFly BSD 6.0 is now supported.
+  Affects: CMake/3rdparty.cmake
+           CMake/GenerateDCMTKConfigure.cmake
+           CMake/dcmtkPrepare.cmake
+           CMake/osconfig.h.in
+           config/tests/arith.cc
+
+**** Changes from 2021.08.25 (eichelberg)
+
+- Made file extensions explicit for CMake CMP0115:
+  Converted the CMake files to explicit source file extensions,
+  as needed for CMake policy CMP0115, introduced with CMake 3.20,
+  which is not set to OLD anymore.
+  Thanks to Github user Kurt Sansom (kayarre) for the pull request.
+  This closes Github pull request #31.
+  Affects: CMakeLists.txt
+           dcmdata/apps/CMakeLists.txt
+           dcmdata/libi2d/CMakeLists.txt
+           dcmdata/libsrc/CMakeLists.txt
+           dcmdata/tests/CMakeLists.txt
+           dcmect/libsrc/CMakeLists.txt
+           dcmect/tests/CMakeLists.txt
+           dcmfg/libsrc/CMakeLists.txt
+           dcmfg/tests/CMakeLists.txt
+           dcmimage/apps/CMakeLists.txt
+           dcmimage/libsrc/CMakeLists.txt
+           dcmimgle/apps/CMakeLists.txt
+           dcmimgle/libsrc/CMakeLists.txt
+           dcmiod/libsrc/CMakeLists.txt
+           dcmiod/tests/CMakeLists.txt
+           dcmjpeg/apps/CMakeLists.txt
+           dcmjpeg/libijg12/CMakeLists.txt
+           dcmjpeg/libijg16/CMakeLists.txt
+           dcmjpeg/libijg8/CMakeLists.txt
+           dcmjpeg/libsrc/CMakeLists.txt
+           dcmjpls/apps/CMakeLists.txt
+           dcmjpls/libcharls/CMakeLists.txt
+           dcmjpls/libsrc/CMakeLists.txt
+           dcmnet/apps/CMakeLists.txt
+           dcmnet/libsrc/CMakeLists.txt
+           dcmnet/tests/CMakeLists.txt
+           dcmpmap/libsrc/CMakeLists.txt
+           dcmpstat/apps/CMakeLists.txt
+           dcmpstat/libsrc/CMakeLists.txt
+           dcmpstat/tests/CMakeLists.txt
+           dcmqrdb/apps/CMakeLists.txt
+           dcmqrdb/libsrc/CMakeLists.txt
+           dcmrt/apps/CMakeLists.txt
+           dcmrt/libsrc/CMakeLists.txt
+           dcmrt/tests/CMakeLists.txt
+           dcmseg/libsrc/CMakeLists.txt
+           dcmseg/tests/CMakeLists.txt
+           dcmsign/apps/CMakeLists.txt
+           dcmsign/libsrc/CMakeLists.txt
+           dcmsr/apps/CMakeLists.txt
+           dcmsr/libcmr/CMakeLists.txt
+           dcmsr/libsrc/CMakeLists.txt
+           dcmsr/tests/CMakeLists.txt
+           dcmtls/libsrc/CMakeLists.txt
+           dcmtls/tests/CMakeLists.txt
+           dcmtract/libsrc/CMakeLists.txt
+           dcmwlm/apps/CMakeLists.txt
+           dcmwlm/libsrc/CMakeLists.txt
+           dcmwlm/tests/CMakeLists.txt
+           oflog/libsrc/CMakeLists.txt
+           ofstd/libsrc/CMakeLists.txt
+           ofstd/tests/CMakeLists.txt
+
+**** Changes from 2021.08.24 (riesmeier)
+
+- Enhanced API documentation of putAndInsertXXX():
+  Enhanced API documentation of the methods putAndInsertString() and
+  putAndInsertOFStringArray() by referring to the string format expected by
+  the putString()/putOFStringArray() method of the corresponding VR class.
+  Thanks to GitHub user "malaterre" for the original report.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcitem.h
+
+**** Changes from 2021.08.22 (riesmeier)
+
+- Minor fixes to syntax usage and formatting.
+  Affects: dcmdata/apps/img2dcm.cc
+           dcmdata/docs/img2dcm.man
+
+**** Changes from 2021.08.22 (eichelberg)
+
+- Fixed bug in class Image2Dcm:
+  Fixed bug in Image2Dcm::readAndInsertPixelDataNextFrame that could cause
+  a std::logic_error exception to be thrown due to an incorrect string
+  declaration.
+  Affects: dcmdata/libi2d/i2d.cc
+
+**** Changes from 2021.08.21 (eichelberg)
+
+- Fixed minor warnings.
+  Affects: dcmdata/apps/img2dcm.cc
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2d.h
+           dcmdata/libi2d/i2d.cc
+
+**** Changes from 2021.08.20 (eichelberg)
+
+- Added multiframe support to img2dcm:
+  img2dcm now supports the creation of multiframe images for output formats
+  supporting multiple frames, such as the Multiframe Secondary Capture SOP
+  classes or Opthalmic Photography. Furthermore, the handling of character
+  sets that may be specified in a template file, study/series file, or
+  on the command line has been revised.
+  Affects: dcmdata/apps/img2dcm.cc
+           dcmdata/docs/img2dcm.man
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2d.h
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2dbmps.h
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2doutpl.h
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2dplnsc.h
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2dplop.h
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2dplsc.h
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2dplvlp.h
+           dcmdata/libi2d/i2d.cc
+           dcmdata/libi2d/i2djpgs.cc
+           dcmdata/libi2d/i2dplnsc.cc
+           dcmdata/libi2d/i2dplop.cc
+           dcmdata/libi2d/i2dplsc.cc
+           dcmdata/libi2d/i2dplvlp.cc
+
+- Updated XML templates for img2dcm:
+  Revised the Ophthalmic Photography XML templates for img2dcm.
+  These now contain a SpecificCharacterSet element matching the
+  XML encoding of the template file.
+  Added:   dcmdata/data/OP_template_latin_1.xml
+  Renamed: dcmdata/data/OP_template.xml
+         -> dcmdata/data/OP_template_utf_8.xml
+
+- Added error code EC_SOPClassMismatch.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcerror.h
+           dcmdata/libsrc/dcerror.cc
+
+- Convert monochrome BMP images to MONOCHROME2:
+  Class I2DBmpSource now recognizes monochrome BMP files and converts these
+  to MONOCHROME2 instead of RGB.
+  Affects: dcmdata/libi2d/i2dbmps.cc
+
+**** Changes from 2021.08.16 (eichelberg)
+
+- Send SpecificCharacterSet in BFS N-CREATE-RQ:
+  Send the SpecificCharacterSet attribute, when populated, as part of the
+  Basic Film Session N-CREATE-RQ message when spooling a print job from
+  Stored Print.
+  Affects: dcmpstat/libsrc/dvpssp.cc
+
+**** Changes from 2021.08.02 (riesmeier)
+
+- Added support for directory record "ANNOTATION":
+  Added support for new directory record type "ANNOTATION" introduced with
+  Supplement 222 (Microscopy Bulk Simple Annotations Storage SOP Class).
+  This closes DCMTK Conformance #1001.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcddirif.h
+           dcmdata/include/dcmtk/dcmdata/dcdirrec.h
+           dcmdata/libsrc/dcddirif.cc
+           dcmdata/libsrc/dcdirrec.cc
+
+- Added support for new Storage SOP Class:
+  Added definition of new Storage SOP Class UID introduced with Supplement
+  222 (Microscopy Bulk Simple Annotations Storage SOP Class). This commit
+  also adds support for the various networking tools.
+  This partly closes DCMTK Conformance #1001.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h
+           dcmdata/libsrc/dcuid.cc
+           dcmnet/docs/movescu.man
+           dcmnet/docs/storescp.man
+           dcmnet/etc/storescp.cfg
+           dcmnet/etc/storescu.cfg
+           dcmqrdb/docs/dcmqrscp.man
+           dcmqrdb/etc/dcmqrprf.cfg
+
+- Updated code definitions for DICOM 2021c:
+  Updated automatically generated code definitions for coding scheme "DCM"
+  and "NCIt". For the coding scheme "UMLS", there were no changes.
+  Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h
+           dcmsr/include/dcmtk/dcmsr/codes/ncit.h
+           dcmsr/include/dcmtk/dcmsr/codes/umls.h
+
+- Updated data dictionary for DICOM 2021c:
+  Updated data dictionary for the latest edition of the DICOM standard, which
+  has been released only recently.
+  Affects: dcmdata/data/dicom.dic
+           dcmdata/include/dcmtk/dcmdata/dcdeftag.h
+           dcmdata/libsrc/dcdictbi.cc
+
+**** Changes from 2021.08.02 (onken)
+
+- Added comment.
+  Affects: dcmect/tests/t_roundtrip.cc
+
+- Try fix dcmect_tests for Big Endian platform:
+  Thanks to forum user alciregi for the report.
+  Affects: dcmect/tests/t_roundtrip.cc
+
+**** Changes from 2021.07.25 (eichelberg)
+
+- Fixed minor warnings.
+  Affects: dcmdata/apps/img2dcm.cc
+
+- Fixed double inclusion of libxml2.
+  Affects: dcmdata/apps/CMakeLists.txt
+           dcmdata/tests/CMakeLists.txt
+
+**** Changes from 2021.07.23 (riesmeier)
+
+- Added missing newline at end of file.
+  Affects: dcmdata/include/dcmtk/dcmdata/xml2dcm.h
+
+**** Changes from 2021.07.23 (eichelberg)
+
+- Added explicit include for <cerrno>:
+  Explicitly include <cerrno>. This apparently solves a compile error due to
+  errno being undefined on certain platforms/configurations.
+  Thanks to Waldo Valenzuela <waldo.valenzuela@hotmail.com> for the report.
+  Affects: ofstd/libsrc/ofchrenc.cc
+
+- Fixed compilation with shared libraries.
+  Affects: dcmdata/include/dcmtk/dcmdata/xml2dcm.h
+           dcmdata/libsrc/CMakeLists.txt
+
+**** Changes from 2021.07.22 (riesmeier)
+
+- Fixed order of libraries to be linked:
+  Since dcmdata now depends on libxml2, the link order has to be changed.
+  Affects: dcmdata/apps/Makefile.in
+
+**** Changes from 2021.07.22 (eichelberg)
+
+- Fixed previous commit.
+  Affects: dcmdata/libi2d/i2djpgs.cc
+
+- Fixed test for maximum supported file size:
+  Fixed test for the maximum supported size of the imported JPEG file.
+  Thanks to Mathieu Malaterre <mathieu.malaterre@gmail.com> for the bug report.
+  Affects: dcmdata/libi2d/i2djpgs.cc
+
+- Fixed Makefiles.
+  Affects: dcmdata/libsrc/CMakeLists.txt
+
+- Fixed Makefiles.
+  Affects: dcmdata/libi2d/CMakeLists.txt
+           dcmdata/libsrc/CMakeLists.txt
+
+- Added missing linefeed.
+  Affects: dcmdata/docs/img2dcm.man
+
+- Added support for XML import and OP output:
+  Added support for reading template files in XML format, and for the creation
+  of Ophthalmic Photograpy Image SOP instances.
+  Added:   dcmdata/data/OP_template.xml
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2dplop.h
+           dcmdata/libi2d/i2doutpl.cc
+           dcmdata/libi2d/i2dplop.cc
+  Affects: dcmdata/apps/CMakeLists.txt
+           dcmdata/apps/Makefile.in
+           dcmdata/apps/img2dcm.cc
+           dcmdata/docs/img2dcm.man
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2d.h
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2doutpl.h
+           dcmdata/libi2d/CMakeLists.txt
+           dcmdata/libi2d/Makefile.in
+           dcmdata/libi2d/i2d.cc
+           dcmdata/libi2d/i2dplnsc.cc
+           dcmdata/libi2d/i2dplsc.cc
+           dcmdata/libi2d/i2dplvlp.cc
+           dcmdata/tests/CMakeLists.txt
+           dcmdata/tests/Makefile.in
+
+- Added support for XML comment tags.
+  Affects: dcmdata/libsrc/xml2dcm.cc
+
+- Moved xml2dcm functionality into a class:
+  The functionality of the xml2dcm tool has now been wrapped into a helper class
+  named DcmXMLParseHelper that exposes DcmXMLParseHelper::readXmlFile() as a
+  public method that can be used in other tools as well to read DICOM files
+  and datasets in the XML format produced by dcm2xml.
+  Added:   dcmdata/include/dcmtk/dcmdata/xml2dcm.h
+           dcmdata/libsrc/xml2dcm.cc
+  Affects: dcmdata/apps/xml2dcm.cc
+           dcmdata/include/dcmtk/dcmdata/dcerror.h
+           dcmdata/libsrc/CMakeLists.txt
+           dcmdata/libsrc/Makefile.in
+           dcmdata/libsrc/dcerror.cc
+
+- Support "-" as special output filename:
+  dcm2xml now supports "-" as special filename for the XML output file.
+  If this filename is given, the XML file is written to stdout.
+  Affects: dcmdata/apps/dcm2xml.cc
+
+**** Changes from 2021.07.21 (onken)
+
+- Removed unused function and applied formatting.
+  Affects: dcmdata/include/dcmtk/dcmdata/libi2d/i2djpgs.h
+           dcmdata/libi2d/i2djpgs.cc
+
+- Fix appn/comment combination of img2dcm options:
+  Fixed bug showing up if combination of img2dcm options --keep-appn and
+  -rc options is used (recently introduced in fbde44).
+  Affects: dcmdata/libi2d/i2djpgs.cc
+
+**** Changes from 2021.07.21 (riesmeier)
+
+- Removed empty line (added by previous commit).
+  Affects: dcmdata/docs/img2dcm.man
+
+**** Changes from 2021.07.21 (onken)
+
+- Updated copyright date and docs.
+  Affects: dcmdata/apps/img2dcm.cc
+           dcmdata/docs/img2dcm.man
+           dcmdata/include/dcmtk/dcmdata/libi2d/i2djpgs.h
+
+- Enforce wlmscpfs' sleeping options:
+  Make sure that wlmscpfs actually sleeps for the full amount of seconds
+  specified by the related command line options
+  (--sleep-[before|after|during).
+  Affects: dcmnet/tests/tscuscp.cc
+           dcmwlm/libsrc/wlmactmg.cc
+           ofstd/include/dcmtk/ofstd/ofstd.h
+           ofstd/libsrc/ofstd.cc
+
+**** Changes from 2021.07.19 (riesmeier)
+
+- Added support for CP-2084:
+  Added support for CP-2084 (Allow CONTAINER HAS OBS CONTEXT children of
+  CONTAINERS) to all "SR IOD Relationship Content Constraint Checker"
+  classes that are affected.
+  This closes DCMTK Conformance #998.
+  Affects: dcmsr/libsrc/dsracqcc.cc
+           dcmsr/libsrc/dsrbascc.cc
+           dcmsr/libsrc/dsrc3dcc.cc
+           dcmsr/libsrc/dsrchecc.cc
+           dcmsr/libsrc/dsrcolcc.cc
+           dcmsr/libsrc/dsrcomcc.cc
+           dcmsr/libsrc/dsrenhcc.cc
+           dcmsr/libsrc/dsrimpcc.cc
+           dcmsr/libsrc/dsrkeycc.cc
+           dcmsr/libsrc/dsrmaccc.cc
+           dcmsr/libsrc/dsrmamcc.cc
+           dcmsr/libsrc/dsrpficc.cc
+           dcmsr/libsrc/dsrplicc.cc
+           dcmsr/libsrc/dsrprdcc.cc
+           dcmsr/libsrc/dsrprocc.cc
+           dcmsr/libsrc/dsrrrdcc.cc
+           dcmsr/libsrc/dsrrsdcc.cc
+           dcmsr/libsrc/dsrsaecc.cc
+           dcmsr/libsrc/dsrspecc.cc
+           dcmsr/libsrc/dsrxrdcc.cc
+
+**** Changes from 2021.07.08 (riesmeier)
+
+- Output helpful warning messages to logger:
+  Output helpful warning messages to the logger when processing invalid
+  references to SOP Instances in IMAGE or WAVEFORM content items, e.g.
+  when reading an SR document from file.
+  Affects: dcmsr/include/dcmtk/dcmsr/dsrcomvl.h
+           dcmsr/include/dcmtk/dcmsr/dsrimgvl.h
+           dcmsr/include/dcmtk/dcmsr/dsrwavvl.h
+           dcmsr/libsrc/dsrcomvl.cc
+           dcmsr/libsrc/dsrimgvl.cc
+           dcmsr/libsrc/dsrwavvl.cc
+
+**** Changes from 2021.07.07 (riesmeier)
+
+- Added support for CP-1789 and CP-1998:
+  Added support for CP-1789 (Allow categorical observations without
+  measurements for ROIs in TID 1500) and CP-1998 (Relax unnecessary TID 1500
+  requirements to simplify for some AI/ML use cases) to the "dcmsr/cmr"
+  implementation. Both Correction Proposals (CP) relax requirements for the
+  presence of content items or included templates in TID 1500 "Measurement
+  Report".
+  Also added a new regression test for a "minimal TID 1500 report".
+  This closes DCMTK Conformance #852 and #948.
+  Affects: dcmsr/include/dcmtk/dcmsr/cmr/tid1411.h
+           dcmsr/include/dcmtk/dcmsr/cmr/tid1419m.h
+           dcmsr/include/dcmtk/dcmsr/cmr/tid1500.h
+           dcmsr/include/dcmtk/dcmsr/cmr/tid1501.h
+           dcmsr/include/dcmtk/dcmsr/cmr/tid1600.h
+           dcmsr/libcmr/tid1411.cc
+           dcmsr/libcmr/tid1500.cc
+           dcmsr/libcmr/tid1501.cc
+           dcmsr/libcmr/tid1600.cc
+           dcmsr/tests/tests.cc
+           dcmsr/tests/tsrcmr.cc
+
+- Removed check on CMAKE_BACKWARDS_COMPATIBILITY:
+  Removed deprecated check on CMAKE_BACKWARDS_COMPATIBILITY.
+  Affects: CMake/dcmtkPrepare.cmake
+
+**** Changes from 2021.07.06 (eichelberg)
+
+- Fixed issue that caused duplicate calls to the DicomImage constructor to fail
+  when a compressed image is loadad and the result of
+  DcmDataset::getCurrentXfer() is passed as the second parameter.
+  This closes DCMTK issue #984.
+  Thanks to Daniel Grieger <Daniel.Grieger@ith-icoserve.com> for the bug report.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcpixel.h
+           dcmimgle/libsrc/didocu.cc
+
+- Documented MSVC versions not supported anymore.
+  Affects: INSTALL
+
+**** Changes from 2021.07.05 (schlamelcher)
+
+- Various enhancements for DCMTK's CMake exports:
+  Removed the need for exploiting the old CMake policy CMP0103 behavior.
+  Removed DCMTK_BUILD_CMKDIR, which was just an alias for CMAKE_BINARY_DIR.
+  Added the DCMTK:: namespace for all exported targets.
+  Added include directory target properties for all exported targets.
+  Added config interface target for adding the include directory for the
+  generated osconfig.h etc. by linking it.
+  Added DCMTK interface target for linking all DCMTK libraries as DCMTK::DCMTK.
+  Thanks to Alex Reinking <alex_reinking@berkeley.edu> for all the helpful
+  suggestions.
+  Affects: CMake/GenerateCMakeExports.cmake
+           CMake/dcmtkAfterModules.cmake
+           CMake/dcmtkMacros.cmake
+           CMake/dcmtkPrepare.cmake
+           CMakeLists.txt
+           ofstd/libsrc/CMakeLists.txt
+
+**** Changes from 2021.07.02 (schlamelcher)
+
+- Changed minimum required CMake version to 3.0.0:
+  As a first step for removing various workarounds for CMake functionality that
+  is not available in versions prior 3.0.0, the minimum version was changed to
+  test whether that is supported on all our target platforms and compilers.
+  Affects: CMakeLists.txt
+
+**** Changes from 2021.06.21 (schlamelcher)
+
+- Fixed some warnings in dcmiod.
+  Affects: dcmiod/include/dcmtk/dcmiod/iodimage.h
+
+**** Changes from 2021.06.21 (eichelberg)
+
+- Fixed minor warnings.
+  Affects: ofstd/include/dcmtk/ofstd/ofsockad.h
+           ofstd/libsrc/ofsockad.cc
+           ofstd/libsrc/ofstd.cc
+
+- Fixed minor warnings.
+  Added:   ofstd/include/dcmtk/ofstd/diag/unreachb.def
+  Affects: oflog/include/dcmtk/oflog/thread/impl/syncwin.h
+           ofstd/include/dcmtk/ofstd/ofdiag.h
+
+**** Changes from 2021.06.15 (eichelberg)
+
+- Removed dead code that caused warnings on MSVC.
+  Affects: dcmimgle/libsrc/dimoimg.cc
+
+- Fixed minor warnings.
+  Affects: oflog/include/dcmtk/oflog/syslogap.h
+           oflog/include/dcmtk/oflog/thread/impl/syncwin.h
+           oflog/libsrc/syslogap.cc
+
+**** Changes from 2021.06.11 (eichelberg)
+
+- Fixed minor warnings.
+  Affects: dcmqrdb/libsrc/dcmqrdbi.cc
+           dcmtls/libsrc/tlsopt.cc
+           ofstd/include/dcmtk/ofstd/ofstd.h
+           ofstd/include/dcmtk/ofstd/ofvriant.h
+
+**** Changes from 2021.06.10 (eichelberg)
+
+- Fixed minor warnings.
+  Affects: CMake/dcmtkPrepare.cmake
+           dcmdata/include/dcmtk/dcmdata/dctagkey.h
+           dcmnet/include/dcmtk/dcmnet/scp.h
+           dcmseg/libsrc/segutils.cc
+           dcmtls/libsrc/tlsopt.cc
+           ofstd/libsrc/ofchrenc.cc
+
+**** Changes from 2021.06.09 (riesmeier)
+
+- Modified overlay rendering for multi-frame images:
+  Modified rendering of overlay planes for multi-frame images by implementing
+  support for CP-1974 (Overlay usage with Multi-frame Image unclear). Also
+  checked other aspects of this Correction Proposal and tested rendering of
+  single and multi-frame overlays for both single and multi-frame images.
+  Output useful messages to the logger (warning and trace) where approriate.
+  This closes DCMTK Conformance #949.
+  Affects: dcmimgle/include/dcmtk/dcmimgle/diovpln.h
+           dcmimgle/libsrc/diovpln.cc
+
+**** Changes from 2021.06.09 (eichelberg)
+
+- Fixed minor warnings.
+  Added:   ofstd/include/dcmtk/ofstd/diag/stralias.def
+           ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def
+           ofstd/include/dcmtk/ofstd/diag/vsobjdes.def
+  Affects: CMake/dcmtkPrepare.cmake
+           dcmdata/libsrc/vrscan.cc
+           dcmimage/libsrc/dipipng.cc
+           dcmjpeg/libsrc/dipijpeg.cc
+           dcmjpeg/libsrc/djdijg12.cc
+           dcmjpeg/libsrc/djdijg16.cc
+           dcmjpeg/libsrc/djdijg8.cc
+           dcmjpeg/libsrc/djeijg12.cc
+           dcmjpeg/libsrc/djeijg16.cc
+           dcmjpeg/libsrc/djeijg8.cc
+           dcmnet/libsrc/dccfrsmp.cc
+           oflog/include/dcmtk/oflog/helpers/strhelp.h
+           ofstd/include/dcmtk/ofstd/diag/pessmove.def
+           ofstd/include/dcmtk/ofstd/ofdiag.h
+           ofstd/libsrc/ofstd.cc
+
+**** Changes from 2021.06.08 (eichelberg)
+
+- Fixed minor warnings.
+  Affects: dcmfg/libsrc/fgfact.cc
+           dcmqrdb/libsrc/dcmqrdbi.cc
+           dcmtls/libsrc/tlslayer.cc
+           oflog/libsrc/hierlock.cc
+           ofstd/libsrc/ofchrenc.cc
+
+- Fixed minor warnings.
+  Added:   ofstd/include/dcmtk/ofstd/diag/pessmove.def
+  Affects: dcmdata/libi2d/i2dbmps.cc
+           dcmjpls/libcharls/lokuptbl.h
+           dcmnet/libsrc/dccfenmp.cc
+           ofstd/include/dcmtk/ofstd/diag/memacces.def
+           ofstd/include/dcmtk/ofstd/diag/slfassov.def
+           ofstd/include/dcmtk/ofstd/ofdiag.h
+           ofstd/tests/tmem.cc
+
+**** Changes from 2021.06.07 (eichelberg)
+
+- Fixed minor warnings.
+  Added:   ofstd/include/dcmtk/ofstd/diag/memacces.def
+  Affects: dcmdata/libsrc/dcvrdt.cc
+           dcmimgle/libsrc/didislut.cc
+           dcmimgle/libsrc/diovpln.cc
+           dcmjpeg/libijg12/jmemmgr.c
+           dcmjpeg/libijg16/jmemmgr.c
+           dcmnet/libsrc/dcmtrans.cc
+           dcmnet/libsrc/dimstore.cc
+           dcmpstat/libsrc/dvpscf.cc
+           dcmpstat/libsrc/dvpsmsg.cc
+           dcmqrdb/libsrc/dcmqrcbf.cc
+           dcmqrdb/libsrc/dcmqrptb.cc
+           dcmtls/libsrc/tlslayer.cc
+           ofstd/include/dcmtk/ofstd/ofdiag.h
+           ofstd/libsrc/ofxml.cc
+
+**** Changes from 2021.06.06 (eichelberg)
+
+- Fixed minor warnings.
+  Added:   ofstd/include/dcmtk/ofstd/diag/asincond.def
+           ofstd/include/dcmtk/ofstd/diag/constexp.def
+           ofstd/include/dcmtk/ofstd/diag/slfassov.def
+  Affects: dcmimage/libsrc/diqtctab.cc
+           dcmimgle/include/dcmtk/dcmimgle/diinpxt.h
+           dcmimgle/include/dcmtk/dcmimgle/dimoipxt.h
+           dcmimgle/include/dcmtk/dcmimgle/dimoopxt.h
+           dcmjpeg/libijg8/jmemmgr.c
+           dcmjpeg/libsrc/djcodece.cc
+           dcmjpls/libcharls/scan.h
+           dcmnet/apps/findscu.cc
+           dcmnet/apps/getscu.cc
+           dcmnet/apps/movescu.cc
+           dcmnet/libsrc/dimse.cc
+           dcmnet/libsrc/dimstore.cc
+           dcmnet/tests/tdimse.cc
+           dcmpstat/apps/dcmprscu.cc
+           dcmpstat/libsrc/dvpssvl.cc
+           dcmpstat/libsrc/dvpstat.cc
+           dcmqrdb/libsrc/dcmqrcbm.cc
+           dcmseg/libsrc/segdoc.cc
+           oflog/libsrc/globinit.cc
+           ofstd/include/dcmtk/ofstd/ofdiag.h
+           ofstd/tests/tfilsys.cc
+           ofstd/tests/toffile.cc
+           ofstd/tests/ttuple.cc
+
+- Fixed minor warnings.
+  Affects: dcmdata/libsrc/dcddirif.cc
+           dcmfg/libsrc/stackinterface.cc
+           dcmimage/libsrc/dicoimg.cc
+           dcmimage/libsrc/diqtctab.cc
+           dcmimgle/libsrc/dcmimage.cc
+           dcmimgle/libsrc/diimage.cc
+           dcmimgle/libsrc/diluptab.cc
+           dcmimgle/libsrc/dimoimg.cc
+           dcmimgle/libsrc/diovlay.cc
+           dcmiod/libsrc/modmultiframedimension.cc
+           dcmjpls/libsrc/djcodece.cc
+           dcmnet/apps/echoscu.cc
+           dcmnet/apps/movescu.cc
+           dcmnet/apps/storescu.cc
+           dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/dcmtrans.cc
+           dcmnet/libsrc/dimcmd.cc
+           dcmnet/libsrc/dul.cc
+           dcmnet/libsrc/dulfsm.cc
+           dcmnet/libsrc/dulparse.cc
+           dcmpstat/apps/dcmmklut.cc
+           dcmpstat/apps/dcmpssnd.cc
+           dcmpstat/libsrc/dvpstat.cc
+           dcmqrdb/apps/dcmqrscp.cc
+           dcmqrdb/libsrc/dcmqrcbm.cc
+           dcmqrdb/libsrc/dcmqrdbi.cc
+           dcmqrdb/libsrc/dcmqrtis.cc
+           dcmrt/apps/drtdump.cc
+           dcmrt/libsrc/drmdose.cc
+           dcmsign/libsrc/dcsighlp.cc
+           dcmtls/libsrc/tlstrans.cc
+           dcmwlm/libsrc/wldsfs.cc
+           dcmwlm/libsrc/wlmactmg.cc
+
+**** Changes from 2021.06.05 (eichelberg)
+
+- Fixed minor warnings.
+  Affects: dcmdata/apps/xml2dcm.cc
+           dcmdata/libsrc/dcostrms.cc
+           dcmfg/libsrc/concatenationcreator.cc
+           dcmfg/libsrc/fgctacquisitiontype.cc
+           dcmfg/libsrc/fgctadditionalxraysource.cc
+           dcmfg/libsrc/fgctposition.cc
+           dcmfg/libsrc/fgcttabledynamics.cc
+           dcmfg/libsrc/fgctxraydetails.cc
+           dcmiod/include/dcmtk/dcmiod/iodimage.h
+           dcmiod/libsrc/iodmacro.cc
+           dcmjpeg/libijg12/jccoefct.c
+           dcmjpeg/libijg12/jccolor.c
+           dcmjpeg/libijg12/jcdctmgr.c
+           dcmjpeg/libijg12/jcdiffct.c
+           dcmjpeg/libijg12/jclhuff.c
+           dcmjpeg/libijg12/jcmarker.c
+           dcmjpeg/libijg12/jcphuff.c
+           dcmjpeg/libijg12/jcpred.c
+           dcmjpeg/libijg12/jcsample.c
+           dcmjpeg/libijg12/jcscale.c
+           dcmjpeg/libijg12/jcshuff.c
+           dcmjpeg/libijg12/jctrans.c
+           dcmjpeg/libijg12/jdatasrc.c
+           dcmjpeg/libijg12/jdcoefct.c
+           dcmjpeg/libijg12/jdcolor.c
+           dcmjpeg/libijg12/jddiffct.c
+           dcmjpeg/libijg12/jdmerge.c
+           dcmjpeg/libijg12/jdpostct.c
+           dcmjpeg/libijg12/jdpred.c
+           dcmjpeg/libijg12/jdsample.c
+           dcmjpeg/libijg12/jdscale.c
+           dcmjpeg/libijg12/jmemnobs.c
+           dcmjpeg/libijg12/jquant1.c
+           dcmjpeg/libijg12/jquant2.c
+           dcmjpeg/libijg16/jccoefct.c
+           dcmjpeg/libijg16/jccolor.c
+           dcmjpeg/libijg16/jcdctmgr.c
+           dcmjpeg/libijg16/jcdiffct.c
+           dcmjpeg/libijg16/jclhuff.c
+           dcmjpeg/libijg16/jcmarker.c
+           dcmjpeg/libijg16/jcphuff.c
+           dcmjpeg/libijg16/jcpred.c
+           dcmjpeg/libijg16/jcsample.c
+           dcmjpeg/libijg16/jcscale.c
+           dcmjpeg/libijg16/jcshuff.c
+           dcmjpeg/libijg16/jctrans.c
+           dcmjpeg/libijg16/jdatasrc.c
+           dcmjpeg/libijg16/jdcoefct.c
+           dcmjpeg/libijg16/jdcolor.c
+           dcmjpeg/libijg16/jddiffct.c
+           dcmjpeg/libijg16/jdmerge.c
+           dcmjpeg/libijg16/jdpostct.c
+           dcmjpeg/libijg16/jdpred.c
+           dcmjpeg/libijg16/jdsample.c
+           dcmjpeg/libijg16/jdscale.c
+           dcmjpeg/libijg16/jmemnobs.c
+           dcmjpeg/libijg16/jquant1.c
+           dcmjpeg/libijg16/jquant2.c
+           dcmjpeg/libijg8/jccoefct.c
+           dcmjpeg/libijg8/jccolor.c
+           dcmjpeg/libijg8/jcdctmgr.c
+           dcmjpeg/libijg8/jcdiffct.c
+           dcmjpeg/libijg8/jclhuff.c
+           dcmjpeg/libijg8/jcmarker.c
+           dcmjpeg/libijg8/jcphuff.c
+           dcmjpeg/libijg8/jcpred.c
+           dcmjpeg/libijg8/jcsample.c
+           dcmjpeg/libijg8/jcscale.c
+           dcmjpeg/libijg8/jcshuff.c
+           dcmjpeg/libijg8/jctrans.c
+           dcmjpeg/libijg8/jdatasrc.c
+           dcmjpeg/libijg8/jdcoefct.c
+           dcmjpeg/libijg8/jdcolor.c
+           dcmjpeg/libijg8/jddiffct.c
+           dcmjpeg/libijg8/jdmerge.c
+           dcmjpeg/libijg8/jdpostct.c
+           dcmjpeg/libijg8/jdpred.c
+           dcmjpeg/libijg8/jdsample.c
+           dcmjpeg/libijg8/jdscale.c
+           dcmjpeg/libijg8/jmemnobs.c
+           dcmjpeg/libijg8/jquant1.c
+           dcmjpeg/libijg8/jquant2.c
+           dcmnet/apps/storescp.cc
+           dcmqrdb/libsrc/dcmqrtis.cc
+           dcmseg/libsrc/segdoc.cc
+           dcmsr/libsrc/dsrxmld.cc
+           oflog/include/dcmtk/oflog/thread/impl/syncwin.h
+           ofstd/include/dcmtk/ofstd/offile.h
+           ofstd/libsrc/ofchrenc.cc
+           ofstd/libsrc/ofcmdln.cc
+           ofstd/libsrc/ofxml.cc
+           ofstd/tests/tfilsys.cc
+
+**** Changes from 2021.05.31 (eichelberg)
+
+- Fixed minor warnings.
+  Affects: dcmnet/tests/tdimse.cc
+           oflog/libsrc/snprintf.cc
+           ofstd/include/dcmtk/ofstd/ofassert.h
+
+**** Changes from 2021.05.30 (eichelberg)
+
+- Fixed minor warnings.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcencdoc.h
+           dcmdata/libsrc/dcdict.cc
+
+**** Changes from 2021.05.29 (eichelberg)
+
+- Fixed minor warnings.
+  Affects: dcmdata/libsrc/vrscanl.c
+           dcmtls/tests/tscuscptls.cc
+           oflog/libsrc/lockfile.cc
+
+**** Changes from 2021.05.28 (schlamelcher)
+
+- Added a workaround for preventing MSVC warning D9025.
+  Affects: CMake/dcmtkPrepare.cmake
+
+**** Changes from 2021.05.28 (eichelberg)
+
+- Set TLS session ID and disable session caching:
+  The dcmtls module now explicitly sets a 32-bit random number as TLS session ID
+  and disables TLS session caching in OpenSSL. This fixes an interoperability issue
+  that occurs when a client requests TLS session reuse during the negotiation
+  of a second TLS network connection. One implementation known to
+  show this behaviour is DVTk, the DICOM Validation Toolkit.
+  Thanks to DCMTK forum user amal.jesudas for the report.
+  Affects: dcmtls/libsrc/tlslayer.cc
+
+**** Changes from 2021.05.27 (schlamelcher)
+
+- Fixed a stupid mistake in the previous commit.
+  Affects: CMake/dcmtkPrepare.cmake
+
+- Enabled various compiler warnings by default:
+  Our CMake configuration now enables '/W4' on Visual Studio and '-Wall' on
+  compilers that understand it by default.
+  Affects: CMake/dcmtkPrepare.cmake
+
+**** Changes from 2021.05.23 (eichelberg)
+
+- Accept forward slash as path separator on Windows:
+  On Windows, all routines in DCMTK that handle path names now properly
+  handle paths that use the forward slash or a mix of forward slash and
+  backslash characters as path separators.
+  Affects: dcmdata/libsrc/dcddirif.cc
+           dcmpstat/libsrc/dviface.cc
+           ofstd/libsrc/ofstd.cc
+           ofstd/tests/tofstd.cc
+
+**** Changes from 2021.05.19 (riesmeier)
+
+- Added "Enhanced X-Ray Radiation Dose SR" to list:
+  Added the Enhanced X-Ray Radiation Dose SR IOD / SOP Class, which was
+  introduced only recently with Supplement 214, to the list of known (but
+  not yet supported) document types. Full support for this IOD / SOP Class
+  will follow in a future commit.
+  This closes DCMTK Conformance #977.
+  Affects: dcmsr/data/dsr2xml.xsd
+           dcmsr/include/dcmtk/dcmsr/dsrtypes.h
+           dcmsr/libsrc/dsrtypes.cc
+
+- Added support for new Storage SOP Class:
+  Added definition of new Storage SOP Class UID introduced with Supplement
+  214 (Enhanced X-Ray Radiation Dose SR (including Cone-beam CT)).
+  Also extended the various network tools and the DICOMDIR generation code
+  accordingly.
+  This partly closes DCMTK Conformance #977.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h
+           dcmdata/libsrc/dcddirif.cc
+           dcmdata/libsrc/dcuid.cc
+           dcmnet/docs/movescu.man
+           dcmnet/docs/storescp.man
+           dcmnet/etc/storescp.cfg
+           dcmnet/etc/storescu.cfg
+           dcmqrdb/docs/dcmqrscp.man
+           dcmqrdb/etc/dcmqrprf.cfg
+           dcmqrdb/libsrc/dcmqrdbi.cc
+
+**** Changes from 2021.05.14 (onken)
+
+- Fixed HL7HierarchicDesignatorMacro:
+  Thanks to Igor Kostyukov <Igor.Kostyukov@waveaccess.ru> for the report
+  and fix.
+  Affects: dcmiod/libsrc/iodmacro.cc
+
+**** Changes from 2021.05.06 (schlamelcher)
+
+- Fixed typo in previous commit.
+  Affects: ofstd/libsrc/offilsys.cc
+
+- Introduced path separator conversion for OFpath:
+  The OFpath constructors now also have the second 'fmt' argument as they should
+  (based on how std::filesystem::path is specified) and perform automatic path
+  separator conversion as required.
+  This closes DCMTK issue #989.
+  Affects: ofstd/include/dcmtk/ofstd/offilsys.h
+           ofstd/libsrc/offilsys.cc
+           ofstd/tests/tfilsys.cc
+
+**** Changes from 2021.05.04 (onken)
+
+- Fix for Big Endian systems. Removed retired tag.
+  Affects: dcmect/tests/t_roundtrip.cc
+           dcmseg/tests/troundtrip.cc
+
+**** Changes from 2021.05.02 (eichelberg)
+
+- Fixed previous commit.
+  Affects: ofstd/libsrc/ofstd.cc
+
+- Accept forward slash as path separator on Windows:
+  OFStandard::getDirNameFromPath now silently also accepts the forward slash
+  character as a path separator when running on Windows, since Windows correctly
+  processes such paths.
+  Affects: ofstd/libsrc/ofstd.cc
+
+**** Changes from 2021.05.01 (eichelberg)
+
+- Switch stdin to binary mode on Windows:
+  Switch stdin to binary mode on Windows when reading a DICOM file from stdin.
+  This closes DCMTK issue #987.
+  Affects: dcmdata/libsrc/dcistrms.cc
+
+**** Changes from 2021.04.27 (riesmeier)
+
+- Check whether call of saveFile() was successful.
+  Affects: dcmsr/tests/mkreport.cc
+
+**** Changes from 2021.04.26 (riesmeier)
+
+- Added new test case for Contour Data:
+  Added new test case that shows how to add Contour Data to an RT
+  Structure Set instance.
+  Also made sure that the current data dictionary is loaded when the
+  dcmrt tests are run.
+  Added:   dcmrt/tests/tcontour.cc
+  Affects: dcmrt/tests/CMakeLists.txt
+           dcmrt/tests/Makefile.in
+           dcmrt/tests/tests.cc
+
+**** Changes from 2021.04.25 (eichelberg)
+
+- Use random port number for dcmtls unit tests:
+  The dcmtls unit tests dcmtls_scp_tls and dcmtls_scp_pool_tls now select a
+  random port number between 61440 and 65535 for the tests instead of using
+  a hard-coded port 11112, which caused the tests to fail when this port was
+  already occupied. Up to 5 random ports are now tried before the tests
+  give up and fail.
+  Affects: dcmtls/tests/tscuscptls.cc
+
+**** Changes from 2021.04.24 (schlamelcher)
+
+- Introduced OFdeprecated and OFdeprecated_msg:
+  Introduced two new macros for marking functions as deprecated, with and
+  without an optional custom message.
+  The underlying compiler features should in theory also work on various kinds
+  of type and variable definitions, however, this was not tested and is also not
+  reflected in the introduced configuration tests. Therefore, the documentation
+  describes this feature only in relation with functions for now, which may be
+  extended as required after more testing.
+  This closes DCMTK issue #887.
+  Added:   ofstd/include/dcmtk/ofstd/ofdeprec.h
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+
+**** Changes from 2021.04.24 (eichelberg)
+
+- Changed default TLS profile to BCP 195 ND:
+  Changed the default security profile in module dcmtls from the BCP 195 TLS
+  profile to the Non-downgrading BCP 195 TLS Profile, since the BCP 195 TLS
+  profile is not compliant anymore to BCP 195 as amended by RFC 8996 in
+  March 2021. TLS protocol versions 1.0 and 1.1 are now explicitly forbidden
+  in BCP 195.
+  This closes DCMTK issue #973.
+  Affects: dcmnet/docs/dcmrecv.man
+           dcmnet/docs/echoscu.man
+           dcmnet/docs/findscu.man
+           dcmnet/docs/storescp.man
+           dcmnet/docs/storescu.man
+           dcmtls/docs/certstor.dox
+           dcmtls/libsrc/tlsopt.cc
+
+**** Changes from 2021.04.22 (eichelberg)
+
+- Fixed storescu return code issues:
+  In some situations sturescu returned zero despite the association having
+  failed. Furthermore, changed the return code returned upon unsuccessful
+  store from 255 to 10 since 255 is reserved on some systems.
+  Affects: dcmnet/apps/storescu.cc
+
+- Fixed possible race condition of ofthread test.
+  Affects: ofstd/tests/tthread.cc
+
+**** Changes from 2021.04.18 (eichelberg)
+
+- Added checks to dcmtls test cases:
+  The dcmtls tests dcmtls_scp_tls and dcmtls_scp_pool_tls now check whether the
+  SCP thread has successfully opened the socket before continuing by starting
+  the SCUs.
+  Affects: dcmtls/tests/tscuscptls.cc
+
+**** Changes from 2021.04.17 (eichelberg)
+
+- Added additional check to dcmtls_scp_tls test.
+  Affects: dcmtls/tests/tscuscptls.cc
+
+- Added debug output to ofstd_thread semaphore test.
+  Affects: ofstd/tests/tthread.cc
+
+**** Changes from 2021.04.16 (eichelberg)
+
+- Fixed minor bug in ofthread unit test.
+  Affects: ofstd/tests/tthread.cc
+
+**** Changes from 2021.04.15 (eichelberg)
+
+- Attempt to make the ofthread unit test more robust:
+  The ofthread unit tests seems to fail occasionally depending on
+  platform and CPU load. This modification should make the test
+  a bit more robust.
+  Affects: ofstd/tests/tthread.cc
+
+**** Changes from 2021.04.12 (riesmeier)
+
+- Ignore missing binary value in meta header:
+  Don't treat missing binary value in file meta information, such as a
+  "hidden" value for File Meta Information Version (0002,0001), as an
+  error. This special handling makes sure that the default output of
+  dcm2xml does not result in an error when processing the output with
+  xml2dcm.
+  Affects: dcmdata/apps/xml2dcm.cc
+
+**** Changes from 2021.04.09 (riesmeier)
+
+- Fixed issue caused by changed attribute name.
+  Affects: dcmect/tests/t_roundtrip.cc
+
+- Added support for CID 247:
+  Added support for Context Group CID 247 (Laterality Left-Right Only).
+  As always, the source and header files were generated automatically.
+  Added:   dcmsr/include/dcmtk/dcmsr/cmr/cid247.h
+           dcmsr/libcmr/cid247.cc
+  Affects: dcmsr/libcmr/CMakeLists.txt
+           dcmsr/libcmr/Makefile.in
+
+- Updated code definitions for DICOM 2021b:
+  Updated automatically generated code definitions for coding scheme "DCM"
+  and "UMLS". For the coding scheme "NCIt", there were no changes.
+  Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h
+           dcmsr/include/dcmtk/dcmsr/codes/ncit.h
+           dcmsr/include/dcmtk/dcmsr/codes/umls.h
+
+- Updated data dictionary for DICOM 2021b:
+  Updated data dictionary for the latest edition of the DICOM standard, which
+  has been released only recently.
+  Since the DICOM attribute Estimated Dose Saving (0018,9324) has been retired,
+  the name of the associated DcmTagKey constant also changed. This required
+  minor changes to the source code of the dcmfg module.
+  Affects: dcmdata/data/dicom.dic
+           dcmdata/include/dcmtk/dcmdata/dcdeftag.h
+           dcmdata/libsrc/dcdictbi.cc
+           dcmfg/include/dcmtk/dcmfg/fgctexposure.h
+           dcmfg/libsrc/fgctexposure.cc
+
+**** Changes from 2021.04.07 (riesmeier)
+
+- Added typical error handling options to xml2dcm:
+  Added typical error handling options to xml2dcm, i.e. as known from
+  other tools such as dump2dcm.
+  Please note that xml2dcm is now a bit pickier about invalid input
+  documents but these violations can be ignored using the new option
+  --ignore-errors.
+  This closes DCMTK Feature #933.
+  Affects: dcmdata/apps/xml2dcm.cc
+           dcmdata/docs/xml2dcm.man
+
+**** Changes from 2021.04.07 (eichelberg)
+
+- Added default in switch statement.
+  Affects: dcmjpeg/libsrc/djcodece.cc
+
+**** Changes from 2021.04.06 (eichelberg)
+
+- Set CMake CMP0115 introduced with CMake 3.20 to OLD.
+  Affects: CMakeLists.txt
+
+**** Changes from 2021.04.05 (eichelberg)
+
+- Special handling of preprocessor warnings for MSVC:
+  MSVC does not support the #warning preprocessor directive.
+  On this platform we now use #pragma message() instead.
+  Affects: dcmdata/libsrc/dcencdoc.cc
+           dcmnet/libsrc/dcmtrans.cc
+           dcmnet/libsrc/dul.cc
+           dcmnet/libsrc/dulfsm.cc
+
+**** Changes from 2021.04.04 (eichelberg)
+
+- Added error messages for unsupported include macros:
+  Print an error message in case some user code still uses the now unsupported
+  include macros. A clear error message is better than follow-up errors due to
+  "suddenly" missing includes.
+  Affects: ofstd/include/dcmtk/ofstd/ofstdinc.h
+
+- Fixed warnings on Solaris with SunPro compiler.
+  Affects: dcmpmap/libsrc/dpmparametricmapbase.cc
+           dcmpmap/libsrc/dpmparametricmapiod.cc
+
+- Fixed comments.
+  Affects: ofstd/include/dcmtk/ofstd/ofstd.h
+
+**** Changes from 2021.03.31 (eichelberg)
+
+- Replaced DCMTK_DIAGNOSTIC_MIN_GCC_VERSION macro:
+  Replaced invocations of the DCMTK_DIAGNOSTIC_MIN_GCC_VERSION() macro by less
+  readable but portable code. This fixes some warnings reported by gcc -Wextra.
+  Affects: ofstd/include/dcmtk/ofstd/diag/cnvrsn.def
+           ofstd/include/dcmtk/ofstd/diag/overflow.def
+           ofstd/include/dcmtk/ofstd/diag/pop.def
+           ofstd/include/dcmtk/ofstd/diag/push.def
+           ofstd/include/dcmtk/ofstd/diag/shadow.def
+           ofstd/include/dcmtk/ofstd/diag/signcmp.def
+
+**** Changes from 2021.03.29 (riesmeier)
+
+- Fixed wrong class name in file header.
+  Affects: dcmimage/include/dcmtk/dcmimage/diquant.h
+
+**** Changes from 2021.03.29 (schlamelcher)
+
+- Documented DCMTK_TLS_LIBRARY_POSTFIX in INSTALL.
+  Affects: INSTALL
+
+**** Changes from 2021.03.26 (eichelberg)
+
+- Include <cinttypes> when compiling in C++11 mode.
+  Affects: ofstd/include/dcmtk/ofstd/oftypes.h
+
+**** Changes from 2021.03.25 (schlamelcher)
+
+- Introduced CMake variable DCMTK_TLS_LIBRARY_POSTFIX:
+  Introduced a new advanced CMake cache variable DCMTK_TLS_LIBRARY_POSTFIX that
+  allows adding a custom postfix to all file names of all libraries that change
+  their ABI when linking against OpenSSL.
+  Please note that this suffix is not enabled by default and must be set to an
+  appropriate string in addition to enabling DCMTK_WITH_OPENSSL if you plan to
+  mix TLS enabled with non TLS enabled DCMTK builds.
+  This closes DCMTK issue #879.
+  Affects: CMake/dcmtkPrepare.cmake
+           dcmnet/libsrc/CMakeLists.txt
+           dcmpstat/libsrc/CMakeLists.txt
+           dcmsign/libsrc/CMakeLists.txt
+           dcmtls/libsrc/CMakeLists.txt
+
+**** Changes from 2021.03.25 (eichelberg)
+
+- Define __STDC_FORMAT_MACROS in oftypes.h.
+  Affects: ofstd/include/dcmtk/ofstd/oftypes.h
+
+**** Changes from 2021.03.25 (onken)
+
+- Fixed building for Apple M1:
+  Thanks to github user "Staars" for the report and patch.
+  Affects: config/tests/arith.cc
+
+**** Changes from 2021.03.24 (eichelberg)
+
+- Check if policy CMP0103 exists before setting it.
+  Affects: CMake/GenerateCMakeExports.cmake
+
+- Fixed issue in CMake scripts:
+  Fixed issue with configuring the private modules caused by previous commit.
+  Affects: CMake/GenerateCMakeExports.cmake
+
+**** Changes from 2021.03.23 (eichelberg)
+
+- Fixed configure warnings reported by CMake 3.19.
+  Affects: CMake/3rdparty.cmake
+           CMake/GenerateCMakeExports.cmake
+           CMake/GenerateDCMTKConfigure.cmake
+  Renamed: CMake/FindCharset.cmake
+         -> CMake/FindLIBCHARSET.cmake
+           CMake/FindSndfile.cmake
+         -> CMake/FindSNDFILE.cmake
+           CMake/FindWrap.cmake
+         -> CMake/FindWRAP.cmake
+
+- Fixed warnings about possible null ptr dereference.
+  Affects: dcmseg/tests/troundtrip.cc
+
+**** Changes from 2021.03.22 (eichelberg)
+
+- Fixed TOC-TOU race in storescp directory creation:
+  When storescp was run with the options --sort-on-study-uid --fork,
+  there was a race condition that could cause subdirectory creation
+  (and thus the receive process) to fail. This is fixed now.
+  Thanks to Github user gsmethells for the bug report and pull request.
+  This closes Github pull request #28.
+  Affects: dcmnet/apps/storescp.cc
+
+- Removed "using namespace std" statements:
+  Removed most of the "using namespace std" statements in DCMTK implementation
+  files, since these are in general undesirable. This will probably break
+  builds on a few platforms (such as VS 2008) that will be fixed with a
+  follow-up commit.
+  Affects: dcmimage/libsrc/diqtfs.cc
+           dcmimage/libsrc/diqtpbox.cc
+           dcmjpeg/libsrc/dipijpeg.cc
+           dcmjpeg/libsrc/djdijg12.cc
+           dcmjpeg/libsrc/djdijg16.cc
+           dcmjpeg/libsrc/djdijg8.cc
+           dcmjpeg/libsrc/djeijg12.cc
+           dcmjpeg/libsrc/djeijg16.cc
+           dcmjpeg/libsrc/djeijg8.cc
+           dcmnet/apps/storescu.cc
+           dcmnet/libsrc/dstorscp.cc
+           dcmnet/libsrc/dstorscu.cc
+           dcmnet/libsrc/dulfsm.cc
+           dcmqrdb/libsrc/dcmqrdbi.cc
+           dcmqrdb/libsrc/dcmqrptb.cc
+           dcmqrdb/libsrc/dcmqrtis.cc
+           dcmwlm/libsrc/wlmactmg.cc
+           ofstd/libsrc/ofdate.cc
+           ofstd/libsrc/ofdatime.cc
+           ofstd/libsrc/offname.cc
+           ofstd/libsrc/ofrand.cc
+           ofstd/libsrc/oftempf.cc
+           ofstd/libsrc/oftime.cc
+           ofstd/libsrc/ofxml.cc
+
+**** Changes from 2021.03.19 (riesmeier)
+
+- Fixed issue with findAndGetUint16Array and VR=AT:
+  Fixed issue with wrong number of 16-bit values being returned for Attribute
+  Tag (AT) values in the "count" parameter of the findAndGetUint16Array()
+  method. The return value was half as large as expected.
+  Also added a new regression test for this purpose.
+  Thanks to Jason LAMBERT <lambert@dosisoft.fr> for the report.
+  Added:   dcmdata/tests/titem.cc
+  Affects: dcmdata/libsrc/dcitem.cc
+           dcmdata/tests/CMakeLists.txt
+           dcmdata/tests/Makefile.in
+           dcmdata/tests/tests.cc
+
+**** Changes from 2021.03.17 (riesmeier)
+
+- Minor changes to documentation.
+  Affects: dcmnet/docs/dcmsend.man
+           ofstd/libsrc/ofxml.cc
+
+**** Changes from 2021.03.15 (eichelberg)
+
+- Don't mask error code of association negotiation failure:
+  So far DCMTK always returned DUL_REQUESTASSOCIATIONFAILED when an attempt to
+  open a network connection by a client failed, independent of the reason.
+  This masked for example the specific error codes issued by the TLS module
+  which explain the reason for a TLS handshake failure. Changed the network
+  module to directly return this lower-level error code.
+  Affects: dcmnet/libsrc/dul.cc
+
+**** Changes from 2021.03.14 (eichelberg)
+
+- Added includes needed on Solaris.
+  Affects: dcmjpls/libcharls/util.h
+           ofstd/include/dcmtk/ofstd/ofbmanip.h
+
+- Fixed LFS and vsnprintf on Windows and Solaris:
+  Reverted some of the modifications in GenerateDCMTKConfigure.cmake that were
+  introduced with commit #744a94610. This fixes OFStandard::vsnprintf and
+  LFS support on Windows and Solaris.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+
+**** Changes from 2021.03.13 (eichelberg)
+
+- Defined cmake_minimum_required() as interval:
+  CMake allows the minimum CMake version required to be defined
+  as an interval (oldest version supported to newest version of
+  which the policies are known to work). This change silences warnings
+  in recent CMake versions about CMake support < 2.8.12 being deprecated.
+  Affects: CMakeLists.txt
+
+**** Changes from 2021.03.11 (riesmeier)
+
+- Fixed issue when compiling without MT support.
+  Affects: oflog/include/dcmtk/oflog/thread/syncpub.h
+
+**** Changes from 2021.03.11 (eichelberg)
+
+- Added include needed by VS2008.
+  Affects: dcmnet/include/dcmtk/dcmnet/dcompat.h
+
+- Minor changes needed on Solaris.
+  Affects: ofstd/libsrc/ofstd.cc
+           ofstd/libsrc/ofxml.cc
+
+- Added DCMTK_OFSTD_EXPORT to class OFFile.
+  Affects: ofstd/include/dcmtk/ofstd/offile.h
+
+**** Changes from 2021.03.10 (eichelberg)
+
+- Moved inline methods to implementation file:
+  Moved OFFile::popen() and OFFile::fclose(), which were formerly inline,
+  to implementation file. This somewhat simplifies a hack needed on Solaris.
+  Affects: ofstd/include/dcmtk/ofstd/offile.h
+           ofstd/libsrc/offile.cc
+
+- Added includes needed by VS2008.
+  Affects: dcmimage/libsrc/diqtfs.cc
+           dcmnet/apps/storescu.cc
+           dcmnet/libsrc/dstorscp.cc
+           dcmnet/libsrc/dstorscu.cc
+           dcmnet/libsrc/dulfsm.cc
+           dcmqrdb/libsrc/dcmqrdbi.cc
+           dcmqrdb/libsrc/dcmqrptb.cc
+           dcmqrdb/libsrc/dcmqrtis.cc
+           dcmwlm/libsrc/wlmactmg.cc
+           ofstd/libsrc/ofdate.cc
+           ofstd/libsrc/ofdatime.cc
+           ofstd/libsrc/offname.cc
+           ofstd/libsrc/ofrand.cc
+           ofstd/libsrc/oftempf.cc
+           ofstd/libsrc/oftime.cc
+
+- Modifications for LibreSSL on OpenBSD.
+  Affects: dcmtls/libsrc/tlstrans.cc
+
+**** Changes from 2021.03.09 (eichelberg)
+
+- Fix for compilation of dcmtls on Solaris.
+  Affects: dcmtls/libsrc/tlslayer.cc
+
+- Fixed warning reported by Visual Studio.
+  Affects: ofstd/tests/toffile.cc
+
+- Added include missing on Windows.
+  Affects: dcmnet/apps/storescp.cc
+
+- Fixed compilation without OpenSSL.
+  Affects: dcmtls/libsrc/tlscond.cc
+
+**** Changes from 2021.03.08 (onken)
+
+- Updated dependencies.
+  Affects: dcmiod/libsrc/Makefile.dep
+           dcmnet/apps/Makefile.dep
+           dcmnet/libsrc/Makefile.dep
+           dcmpstat/apps/Makefile.dep
+           dcmpstat/libsrc/Makefile.dep
+           dcmpstat/tests/Makefile.dep
+           dcmsr/apps/Makefile.dep
+           dcmsr/libsrc/Makefile.dep
+           dcmsr/tests/Makefile.dep
+           dcmtls/libsrc/Makefile.dep
+
+- Replaced bzero() with memset().
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+           config/configure
+           config/configure.in
+           config/include/dcmtk/config/osconfig.h.in
+           dcmdata/apps/Makefile.dep
+           dcmdata/include/dcmtk/dcmdata/dcelem.h
+           dcmdata/include/dcmtk/dcmdata/dcpixel.h
+           dcmdata/include/dcmtk/dcmdata/dcvrobow.h
+           dcmdata/include/dcmtk/dcmdata/dcvrod.h
+           dcmdata/include/dcmtk/dcmdata/dcvrof.h
+           dcmdata/include/dcmtk/dcmdata/dcvrol.h
+           dcmdata/include/dcmtk/dcmdata/dcvrov.h
+           dcmdata/include/dcmtk/dcmdata/dcvrpobw.h
+           dcmdata/libsrc/Makefile.dep
+           dcmdata/libsrc/dcelem.cc
+           dcmdata/libsrc/dcitem.cc
+           dcmdata/libsrc/dcmetinf.cc
+           dcmfg/libsrc/Makefile.dep
+           dcmimgle/apps/Makefile.dep
+           dcmimgle/libsrc/Makefile.dep
+           dcmiod/libsrc/Makefile.dep
+           dcmiod/tests/Makefile.dep
+           dcmnet/apps/Makefile.dep
+           dcmnet/apps/storescu.cc
+           dcmnet/include/dcmtk/dcmnet/dcompat.h
+           dcmnet/libsrc/Makefile.dep
+           dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/dcompat.cc
+           dcmnet/libsrc/dfindscu.cc
+           dcmnet/libsrc/dimcancl.cc
+           dcmnet/libsrc/dimcmd.cc
+           dcmnet/libsrc/dimecho.cc
+           dcmnet/libsrc/dimfind.cc
+           dcmnet/libsrc/dimget.cc
+           dcmnet/libsrc/dimmove.cc
+           dcmnet/libsrc/dimstore.cc
+           dcmnet/libsrc/scp.cc
+           dcmnet/libsrc/scu.cc
+           dcmnet/tests/Makefile.dep
+           dcmpmap/libsrc/Makefile.dep
+           dcmpstat/apps/Makefile.dep
+           dcmpstat/libsrc/Makefile.dep
+           dcmpstat/tests/Makefile.dep
+           dcmqrdb/apps/Makefile.dep
+           dcmqrdb/libsrc/Makefile.dep
+           dcmqrdb/libsrc/dcmqrcbg.cc
+           dcmqrdb/libsrc/dcmqrcbm.cc
+           dcmqrdb/libsrc/dcmqrdbi.cc
+           dcmqrdb/libsrc/dcmqrtis.cc
+           dcmsign/libsrc/Makefile.dep
+           dcmsr/tests/Makefile.dep
+           dcmtls/libsrc/Makefile.dep
+           dcmwlm/apps/Makefile.dep
+           dcmwlm/libsrc/Makefile.dep
+           dcmwlm/tests/Makefile.dep
+           ofstd/include/dcmtk/ofstd/ofbmanip.h
+           ofstd/include/dcmtk/ofstd/ofdefine.h
+           ofstd/include/dcmtk/ofstd/ofsockad.h
+           ofstd/libsrc/Makefile.dep
+           ofstd/libsrc/ofstd.cc
+
+**** Changes from 2021.03.08 (eichelberg)
+
+- Added missing include.
+  Affects: ofstd/include/dcmtk/ofstd/ofcond.h
+
+- Fixed minor inconsistencies.
+  Affects: dcmnet/apps/echoscu.cc
+           dcmnet/docs/echoscu.man
+           dcmtls/libsrc/tlsopt.cc
+
+**** Changes from 2021.03.08 (riesmeier)
+
+- Always begin condition text with a capital letter.
+  Affects: dcmtls/libsrc/tlscond.cc
+
+- Removed empty line from "verbatim" environment.
+  Affects: dcmnet/docs/echoscu.man
+
+**** Changes from 2021.03.08 (eichelberg)
+
+- Revised error handling in module dcmtls:
+  Revised the error handling in the TLS module. Replaced the
+  DcmTransportLayerStatus enumeration by proper OFCondition error codes
+  throughout the toolkit and defined condition constants for errors
+  occuring in OpenSSL. Individual condition constants are now defined for
+  the most important OpenSSL errors (related to TLS and certificate
+  verification), and a general condition code is used to represent errors
+  reported by other OpenSSL submodules.
+  The revised code has been tested with OpenSSL 1.0.1, 1.0.2, 1.1.0,
+  1.1.1 and 3.0.0 alpha 12.
+  Affects: dcmnet/apps/echoscu.cc
+           dcmnet/include/dcmtk/dcmnet/dcmlayer.h
+           dcmnet/include/dcmtk/dcmnet/dcmtrans.h
+           dcmnet/libsrc/dcmtrans.cc
+           dcmnet/libsrc/dul.cc
+           dcmnet/libsrc/dulfsm.cc
+           dcmpstat/apps/dcmprscp.cc
+           dcmpstat/apps/dcmprscu.cc
+           dcmpstat/apps/dcmpsrcv.cc
+           dcmpstat/apps/dcmpssnd.cc
+           dcmtls/docs/dcmtls.dox
+           dcmtls/include/dcmtk/dcmtls/tlsciphr.h
+           dcmtls/include/dcmtk/dcmtls/tlscond.h
+           dcmtls/include/dcmtk/dcmtls/tlslayer.h
+           dcmtls/include/dcmtk/dcmtls/tlsopt.h
+           dcmtls/include/dcmtk/dcmtls/tlsscu.h
+           dcmtls/include/dcmtk/dcmtls/tlstrans.h
+           dcmtls/libsrc/tlsciphr.cc
+           dcmtls/libsrc/tlscond.cc
+           dcmtls/libsrc/tlslayer.cc
+           dcmtls/libsrc/tlsopt.cc
+           dcmtls/libsrc/tlsscu.cc
+           dcmtls/libsrc/tlstrans.cc
+           dcmtls/tests/tscuscptls.cc
+
+- Added functions for offline certificate verification:
+  Added function DcmTLSTransportLayer::verifyClientCertificate() that allows
+  to check if a given client certificate file would be accepted during the TLS
+  handshake given the current TLS settings. Also added function
+  DcmTLSTransportLayer::isRootCertificate() that allows to check if a
+  certificate file contains a self-signed root certificate.
+  Added command line options --verify-cert and --is-root-cert to echoscu
+  that make these new functions accessible on the command line.
+  Affects: dcmnet/apps/echoscu.cc
+           dcmnet/docs/echoscu.man
+           dcmtls/include/dcmtk/dcmtls/tlslayer.h
+           dcmtls/include/dcmtk/dcmtls/tlsopt.h
+           dcmtls/libsrc/tlslayer.cc
+           dcmtls/libsrc/tlsopt.cc
+
+- Added support for intermediate CAs and CRLs:
+  Added new command line options --add-crl-file, --enable-crl-vfy and
+  --enable-crl-all that permit applications to check the peer certificate
+  chain during TLS handshakes. Furthermore added support for intermediate
+  CA certificates and improved documentation.
+  This closes DCMTK issue #952.
+  Added:   dcmtls/docs/certstor.dox
+  Affects: dcmnet/docs/dcmrecv.man
+           dcmnet/docs/echoscu.man
+           dcmnet/docs/findscu.man
+           dcmnet/docs/storescp.man
+           dcmnet/docs/storescu.man
+           dcmtls/docs/CMakeLists.txt
+           dcmtls/docs/Makefile.in
+           dcmtls/docs/dcmtls.dox
+           dcmtls/include/dcmtk/dcmtls/tlsciphr.h
+           dcmtls/include/dcmtk/dcmtls/tlslayer.h
+           dcmtls/libsrc/tlslayer.cc
+           dcmtls/libsrc/tlsopt.cc
+  Removed: dcmtls/docs/certstor.txt
+
+**** Changes from 2021.03.07 (eichelberg)
+
+- Fixed compilation of arith.cc with DCMTK_ENABLE_CXX11=ON.
+  Affects: config/math.cc
+
+- Fixed includes for VS 2008.
+  Affects: ofstd/include/dcmtk/ofstd/oftypes.h
+
+- Added includes needed on NetBSD.
+  Affects: ofstd/libsrc/offile.cc
+           ofstd/libsrc/offname.cc
+           ofstd/libsrc/ofthread.cc
+
+**** Changes from 2021.03.06 (eichelberg)
+
+- Added missing include.
+  Affects: config/math.cc
+
+- Added includes needed on Solaris.
+  Affects: dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/dfindscu.cc
+           dcmnet/libsrc/dimcancl.cc
+           dcmnet/libsrc/dimcmd.cc
+           dcmnet/libsrc/dimecho.cc
+           dcmnet/libsrc/dimfind.cc
+           dcmnet/libsrc/dimget.cc
+           dcmnet/libsrc/dimmove.cc
+           dcmnet/libsrc/dimstore.cc
+           dcmnet/libsrc/scu.cc
+
+- Added include needed on BSD.
+  Affects: ofstd/include/dcmtk/ofstd/offile.h
+
+- Fixed include of <inttypes.h>.
+  Affects: ofstd/include/dcmtk/ofstd/oftypes.h
+
+- Fixed minor warnings reported by Visual Studio.
+  Affects: dcmdata/libi2d/i2djpgs.cc
+           dcmdata/libsrc/dcelem.cc
+           dcmdata/libsrc/dcistrmf.cc
+           dcmdata/libsrc/dcistrms.cc
+           dcmdata/tests/dctmacro.h
+           ofstd/include/dcmtk/ofstd/offile.h
+           ofstd/tests/toffile.cc
+
+**** Changes from 2021.03.05 (riesmeier)
+
+- Updated latest tested CMake version:
+  Updated information on latest CMake version that has been tested to "3.19.6".
+  Affects: CMake/dcmtkPrepare.cmake
+
+**** Changes from 2021.03.05 (eichelberg)
+
+- Fixed commit e8161b1e4.
+  Affects: dcmjpeg/libijg12/jdmarker.c
+           dcmjpeg/libijg16/jdmarker.c
+           dcmjpeg/libijg8/jdmarker.c
+
+**** Changes from 2021.03.05 (riesmeier)
+
+- Added support for Patient's Size and Weight:
+  Added support for the optional attributes Patient's Size and Patient's
+  Weight from the Patient Study Module. These new attributes are written
+  to and read from DICOM dataset as well as to/from the dcmsr-specific
+  XML document format (see "dsr2xml.xsd"). There are also set and get
+  methods. However, they are neither printed to the console (see dsrdump)
+  nor rendered for the (X)HTML output (see dsr2html).
+  Also added new test case in order to check whether the get and set
+  methods work as expected.
+  Affects: dcmsr/data/dsr2xml.xsd
+           dcmsr/include/dcmtk/dcmsr/dsrdoc.h
+           dcmsr/libsrc/dsrdoc.cc
+           dcmsr/tests/tests.cc
+           dcmsr/tests/tsrdoc.cc
+
+**** Changes from 2021.03.05 (eichelberg)
+
+- Fixed incorrect handling of malformed JPEG bitstream:
+  Fixed incorrect handling of malformed JPEG bitstreams in color images
+  where the start of scan markers are inconsistent.
+  This closes DCMTK issue #970.
+  Thanks to Christian Wetzel <wetzel@phoenix-pacs.de> for the bug report.
+  Affects: dcmjpeg/libijg12/jdmarker.c
+           dcmjpeg/libijg16/jdmarker.c
+           dcmjpeg/libijg8/jdmarker.c
+
+**** Changes from 2021.03.04 (riesmeier)
+
+- Added support for CP-2023:
+  Added support for CP-2032 (Clarify missing numeric measurement value in SR).
+  Now, the Numeric Value Qualifier Code Sequence (0040,A301) is conditional
+  ("Required if Measured Value Sequence (0040,A300) is empty").
+  Also added new test cases for this purpose and for testing the alternative
+  representations.
+  This closes DCMTK Conformance #961.
+  Affects: dcmsr/include/dcmtk/dcmsr/cmr/srnumvl.h
+           dcmsr/include/dcmtk/dcmsr/cmr/srnumvlu.h
+           dcmsr/include/dcmtk/dcmsr/dsrnumvl.h
+           dcmsr/libsrc/dsrnumvl.cc
+           dcmsr/tests/tests.cc
+           dcmsr/tests/tsrnumvl.cc
+
+**** Changes from 2021.03.04 (onken)
+
+- Try fixing C includes for old compilers.
+  Affects: ofstd/include/dcmtk/ofstd/oftypes.h
+
+**** Changes from 2021.02.26 (onken)
+
+- Try to fix build for 744a94 on some platforms.
+  Affects: ofstd/libsrc/offilsys.cc
+           ofstd/libsrc/ofxml.cc
+
+**** Changes from 2021.02.25 (riesmeier)
+
+- Removed outdated configure options (Autoconf):
+  Removed configure options that are no longer available.
+  Affects: INSTALL
+
+- Removed empty line.
+  Affects: dcmjpls/docs/dcmcjpls.man
+
+- Fixed comment on lossy JPEG vs. lossy JPEG-LS:
+  Thanks to GitHub user "malaterre" for the patch.
+  Affects: dcmjpls/docs/dcmcjpls.man
+
+**** Changes from 2021.02.25 (onken)
+
+- Removed USE_STD_CXX_INLUDES:
+  Removed macro USE_STD_CXX_INCLUDES which allowed (if turned off) to
+  include old C headers instead of using their respective counterpart coming
+  with C++ (e.g. use time.h and string.h instead of <ctime> and
+  <cstring>).
+  Using only the C++ version has been the hardcoded behaviour for CMake builds
+  anyway (for automake it has been configurable up to now).
+  All related build configuration tests and related code header guards/includes
+  for the C-style headers have been removed.
+  Affects: CMake/GenerateDCMTKConfigure.cmake
+           CMake/osconfig.h.in
+           INSTALL
+           config/aclocal.m4
+           config/configure
+           config/configure.in
+           config/include/dcmtk/config/osconfig.h.in
+           config/math.cc
+           config/tests/arith.cc
+           dcmdata/apps/Makefile.dep
+           dcmdata/apps/dcm2pdf.cc
+           dcmdata/apps/dcmconv.cc
+           dcmdata/apps/dcmcrle.cc
+           dcmdata/apps/dcmdrle.cc
+           dcmdata/apps/dcmdump.cc
+           dcmdata/apps/dcmftest.cc
+           dcmdata/apps/dump2dcm.cc
+           dcmdata/apps/mdfdsman.cc
+           dcmdata/apps/xml2dcm.cc
+           dcmdata/include/dcmtk/dcmdata/dcdicent.h
+           dcmdata/include/dcmtk/dcmdata/dclist.h
+           dcmdata/include/dcmtk/dcmdata/dcostrmf.h
+           dcmdata/include/dcmtk/dcmdata/dcostrms.h
+           dcmdata/include/dcmtk/dcmdata/dcrleenc.h
+           dcmdata/include/dcmtk/dcmdata/dctypes.h
+           dcmdata/include/dcmtk/dcmdata/dcuid.h
+           dcmdata/libsrc/Makefile.dep
+           dcmdata/libsrc/cmdlnarg.cc
+           dcmdata/libsrc/dcbytstr.cc
+           dcmdata/libsrc/dcdatset.cc
+           dcmdata/libsrc/dcddirif.cc
+           dcmdata/libsrc/dcdicdir.cc
+           dcmdata/libsrc/dcdicent.cc
+           dcmdata/libsrc/dcdict.cc
+           dcmdata/libsrc/dcdirrec.cc
+           dcmdata/libsrc/dcelem.cc
+           dcmdata/libsrc/dcfilefo.cc
+           dcmdata/libsrc/dchashdi.cc
+           dcmdata/libsrc/dcistrmf.cc
+           dcmdata/libsrc/dcistrms.cc
+           dcmdata/libsrc/dcitem.cc
+           dcmdata/libsrc/dcjson.cc
+           dcmdata/libsrc/dcmetinf.cc
+           dcmdata/libsrc/dcobject.cc
+           dcmdata/libsrc/dcostrmf.cc
+           dcmdata/libsrc/dcostrms.cc
+           dcmdata/libsrc/dcpath.cc
+           dcmdata/libsrc/dcpixseq.cc
+           dcmdata/libsrc/dcpxitem.cc
+           dcmdata/libsrc/dcrlecce.cc
+           dcmdata/libsrc/dcsequen.cc
+           dcmdata/libsrc/dcstack.cc
+           dcmdata/libsrc/dctag.cc
+           dcmdata/libsrc/dctagkey.cc
+           dcmdata/libsrc/dcuid.cc
+           dcmdata/libsrc/dcvr.cc
+           dcmdata/libsrc/dcvrat.cc
+           dcmdata/libsrc/dcvrcs.cc
+           dcmdata/libsrc/dcvrda.cc
+           dcmdata/libsrc/dcvrdt.cc
+           dcmdata/libsrc/dcvrfd.cc
+           dcmdata/libsrc/dcvrfl.cc
+           dcmdata/libsrc/dcvris.cc
+           dcmdata/libsrc/dcvrobow.cc
+           dcmdata/libsrc/dcvrsl.cc
+           dcmdata/libsrc/dcvrss.cc
+           dcmdata/libsrc/dcvrsv.cc
+           dcmdata/libsrc/dcvrtm.cc
+           dcmdata/libsrc/dcvrui.cc
+           dcmdata/libsrc/dcvrul.cc
+           dcmdata/libsrc/dcvrulup.cc
+           dcmdata/libsrc/dcvrus.cc
+           dcmdata/libsrc/dcvruv.cc
+           dcmdata/libsrc/dcxfer.cc
+           dcmdata/tests/Makefile.dep
+           dcmdata/tests/tpread.cc
+           dcmect/libsrc/Makefile.dep
+           dcmect/tests/Makefile.dep
+           dcmfg/include/dcmtk/dcmfg/fgctexposure.h
+           dcmfg/libsrc/Makefile.dep
+           dcmfg/tests/Makefile.dep
+           dcmimage/apps/Makefile.dep
+           dcmimage/apps/dcm2pnm.cc
+           dcmimage/apps/dcmquant.cc
+           dcmimage/apps/dcmscale.cc
+           dcmimage/include/dcmtk/dcmimage/dcmicmph.h
+           dcmimage/include/dcmtk/dcmimage/dicoopx.h
+           dcmimage/include/dcmtk/dcmimage/diqtpbox.h
+           dcmimage/include/dcmtk/dcmimage/diqtstab.h
+           dcmimage/libsrc/Makefile.dep
+           dcmimage/libsrc/dcmicmph.cc
+           dcmimage/libsrc/dicoimg.cc
+           dcmimage/libsrc/diqtctab.cc
+           dcmimage/libsrc/diqtfs.cc
+           dcmimage/libsrc/diqtpbox.cc
+           dcmimgle/apps/Makefile.dep
+           dcmimgle/apps/dcod2lum.cc
+           dcmimgle/apps/dconvlum.cc
+           dcmimgle/include/dcmtk/dcmimgle/dicrvfit.h
+           dcmimgle/include/dcmtk/dcmimgle/didocu.h
+           dcmimgle/include/dcmtk/dcmimgle/digsdfn.h
+           dcmimgle/include/dcmtk/dcmimgle/diimage.h
+           dcmimgle/include/dcmtk/dcmimgle/dimoopxt.h
+           dcmimgle/include/dcmtk/dcmimgle/diovpln.h
+           dcmimgle/include/dcmtk/dcmimgle/diplugin.h
+           dcmimgle/include/dcmtk/dcmimgle/displint.h
+           dcmimgle/libsrc/Makefile.dep
+           dcmimgle/libsrc/dcmimage.cc
+           dcmimgle/libsrc/diciefn.cc
+           dcmimgle/libsrc/dicielut.cc
+           dcmimgle/libsrc/didispfn.cc
+           dcmimgle/libsrc/digsdfn.cc
+           dcmimgle/libsrc/digsdlut.cc
+           dcmimgle/libsrc/diimage.cc
+           dcmimgle/libsrc/dimoimg.cc
+           dcmimgle/libsrc/diutils.cc
+           dcmiod/include/dcmtk/dcmiod/cielabutil.h
+           dcmiod/include/dcmtk/dcmiod/iodrules.h
+           dcmiod/libsrc/Makefile.dep
+           dcmiod/libsrc/cielabutil.cc
+           dcmiod/tests/Makefile.dep
+           dcmjpeg/apps/Makefile.dep
+           dcmjpeg/apps/dcmcjpeg.cc
+           dcmjpeg/apps/dcmdjpeg.cc
+           dcmjpeg/libsrc/dipijpeg.cc
+           dcmjpeg/libsrc/djcodece.cc
+           dcmjpeg/libsrc/djdijg12.cc
+           dcmjpeg/libsrc/djdijg16.cc
+           dcmjpeg/libsrc/djdijg8.cc
+           dcmjpeg/libsrc/djeijg12.cc
+           dcmjpeg/libsrc/djeijg16.cc
+           dcmjpeg/libsrc/djeijg8.cc
+           dcmjpeg/libsrc/djutils.cc
+           dcmjpls/apps/Makefile.dep
+           dcmjpls/apps/dcmcjpls.cc
+           dcmjpls/apps/dcmdjpls.cc
+           dcmjpls/libcharls/Makefile.dep
+           dcmjpls/libcharls/config.h
+           dcmjpls/libcharls/encodstr.h
+           dcmjpls/libcharls/streams.h
+           dcmjpls/libcharls/util.h
+           dcmjpls/libsrc/djcodece.cc
+           dcmnet/apps/Makefile.dep
+           dcmnet/apps/echoscu.cc
+           dcmnet/apps/movescu.cc
+           dcmnet/apps/storescp.cc
+           dcmnet/apps/storescu.cc
+           dcmnet/apps/termscu.cc
+           dcmnet/include/dcmtk/dcmnet/dcmlayer.h
+           dcmnet/include/dcmtk/dcmnet/dcmtrans.h
+           dcmnet/include/dcmtk/dcmnet/dcompat.h
+           dcmnet/include/dcmtk/dcmnet/dicom.h
+           dcmnet/libsrc/Makefile.dep
+           dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/cond.cc
+           dcmnet/libsrc/dcasccff.cc
+           dcmnet/libsrc/dccfuidh.cc
+           dcmnet/libsrc/dcmtrans.cc
+           dcmnet/libsrc/dcompat.cc
+           dcmnet/libsrc/dfindscu.cc
+           dcmnet/libsrc/dimcancl.cc
+           dcmnet/libsrc/dimcmd.cc
+           dcmnet/libsrc/dimdump.cc
+           dcmnet/libsrc/dimecho.cc
+           dcmnet/libsrc/dimfind.cc
+           dcmnet/libsrc/dimget.cc
+           dcmnet/libsrc/dimmove.cc
+           dcmnet/libsrc/dimse.cc
+           dcmnet/libsrc/dimstore.cc
+           dcmnet/libsrc/diutil.cc
+           dcmnet/libsrc/dul.cc
+           dcmnet/libsrc/dulconst.cc
+           dcmnet/libsrc/dulextra.cc
+           dcmnet/libsrc/dulfsm.cc
+           dcmnet/libsrc/dulparse.cc
+           dcmnet/libsrc/dulpres.cc
+           dcmnet/tests/Makefile.dep
+           dcmnet/tests/tscuscp.cc
+           dcmnet/tests/tscusession.cc
+           dcmpstat/apps/Makefile.dep
+           dcmpstat/apps/dcmmklut.cc
+           dcmpstat/apps/dcmprscu.cc
+           dcmpstat/apps/dcmpschk.cc
+           dcmpstat/apps/dcmpsmk.cc
+           dcmpstat/apps/dcmpsprt.cc
+           dcmpstat/include/dcmtk/dcmpstat/dvpstxl.h
+           dcmpstat/include/dcmtk/dcmpstat/dvpstyp.h
+           dcmpstat/libsrc/Makefile.dep
+           dcmpstat/libsrc/dcmpstat.cc
+           dcmpstat/libsrc/dviface.cc
+           dcmpstat/libsrc/dvpscf.cc
+           dcmpstat/libsrc/dvpsda.cc
+           dcmpstat/libsrc/dvpsfs.cc
+           dcmpstat/libsrc/dvpsgl.cc
+           dcmpstat/libsrc/dvpshlp.cc
+           dcmpstat/libsrc/dvpsri.cc
+           dcmpstat/libsrc/dvpssp.cc
+           dcmpstat/libsrc/dvpstat.cc
+           dcmpstat/libsrc/dvpstx.cc
+           dcmpstat/libsrc/dvpsvw.cc
+           dcmpstat/tests/Makefile.dep
+           dcmpstat/tests/msgserv.cc
+           dcmqrdb/apps/Makefile.dep
+           dcmqrdb/apps/dcmqridx.cc
+           dcmqrdb/apps/dcmqrscp.cc
+           dcmqrdb/apps/dcmqrti.cc
+           dcmqrdb/include/dcmtk/dcmqrdb/dcmqrcnf.h
+           dcmqrdb/include/dcmtk/dcmqrdb/dcmqrdba.h
+           dcmqrdb/include/dcmtk/dcmqrdb/dcmqrptb.h
+           dcmqrdb/libsrc/Makefile.dep
+           dcmqrdb/libsrc/dcmqrcnf.cc
+           dcmqrdb/libsrc/dcmqrdbi.cc
+           dcmqrdb/libsrc/dcmqrdbs.cc
+           dcmqrdb/libsrc/dcmqropt.cc
+           dcmrt/include/dcmtk/dcmrt/drtimage.h
+           dcmrt/libsrc/drtajcs.cc
+           dcmrt/libsrc/drttypes.cc
+           dcmseg/libsrc/Makefile.dep
+           dcmseg/tests/Makefile.dep
+           dcmsign/apps/Makefile.dep
+           dcmsign/apps/dcmsign.cc
+           dcmsign/include/dcmtk/dcmsign/dcsignat.h
+           dcmsign/include/dcmtk/dcmsign/simaccon.h
+           dcmsign/libsrc/Makefile.dep
+           dcmsign/libsrc/simdmac.cc
+           dcmsign/libsrc/siprivat.cc
+           dcmsr/apps/Makefile.dep
+           dcmsr/include/dcmtk/dcmsr/dsrxmlc.h
+           dcmsr/libcmr/Makefile.dep
+           dcmsr/libsrc/Makefile.dep
+           dcmsr/libsrc/dsrimgfr.cc
+           dcmsr/libsrc/dsrimgse.cc
+           dcmsr/libsrc/dsrtcosp.cc
+           dcmsr/libsrc/dsrtcoto.cc
+           dcmsr/libsrc/dsrtypes.cc
+           dcmsr/libsrc/dsrwavch.cc
+           dcmsr/libsrc/dsrxmld.cc
+           dcmsr/tests/Makefile.dep
+           dcmtls/libsrc/Makefile.dep
+           dcmtls/libsrc/tlslayer.cc
+           dcmtls/libsrc/tlstrans.cc
+           dcmtls/tests/tscuscptls.cc
+           dcmwlm/apps/Makefile.dep
+           dcmwlm/libsrc/Makefile.dep
+           dcmwlm/tests/Makefile.dep
+           dcmwlm/tests/wltest.cc
+           oflog/include/dcmtk/oflog/config.h
+           ofstd/include/dcmtk/ofstd/ofassert.h
+           ofstd/include/dcmtk/ofstd/ofbmanip.h
+           ofstd/include/dcmtk/ofstd/ofcmdln.h
+           ofstd/include/dcmtk/ofstd/ofcond.h
+           ofstd/include/dcmtk/ofstd/ofconfig.h
+           ofstd/include/dcmtk/ofstd/ofconsol.h
+           ofstd/include/dcmtk/ofstd/ofdefine.h
+           ofstd/include/dcmtk/ofstd/oferror.h
+           ofstd/include/dcmtk/ofstd/offile.h
+           ofstd/include/dcmtk/ofstd/oflimits.h
+           ofstd/include/dcmtk/ofstd/oflist.h
+           ofstd/include/dcmtk/ofstd/ofset.h
+           ofstd/include/dcmtk/ofstd/ofstack.h
+           ofstd/include/dcmtk/ofstd/ofstd.h
+           ofstd/include/dcmtk/ofstd/ofstdinc.h
+           ofstd/include/dcmtk/ofstd/ofstream.h
+           ofstd/include/dcmtk/ofstd/ofstring.h
+           ofstd/include/dcmtk/ofstd/oftime.h
+           ofstd/include/dcmtk/ofstd/oftypes.h
+           ofstd/include/dcmtk/ofstd/ofvector.h
+           ofstd/include/dcmtk/ofstd/ofxml.h
+           ofstd/libsrc/Makefile.dep
+           ofstd/libsrc/ofchrenc.cc
+           ofstd/libsrc/ofconapp.cc
+           ofstd/libsrc/ofconfig.cc
+           ofstd/libsrc/ofconsol.cc
+           ofstd/libsrc/ofdate.cc
+           ofstd/libsrc/ofdatime.cc
+           ofstd/libsrc/oferror.cc
+           ofstd/libsrc/offilsys.cc
+           ofstd/libsrc/offname.cc
+           ofstd/libsrc/ofrand.cc
+           ofstd/libsrc/ofstd.cc
+           ofstd/libsrc/ofstring.cc
+           ofstd/libsrc/oftempf.cc
+           ofstd/libsrc/ofthread.cc
+           ofstd/libsrc/oftime.cc
+           ofstd/libsrc/ofuuid.cc
+           ofstd/libsrc/ofxml.cc
+           ofstd/tests/Makefile.dep
+           ofstd/tests/tatof.cc
+           ofstd/tests/toffile.cc
+           ofstd/tests/tuuid.cc
+
+**** Changes from 2021.02.23 (riesmeier)
+
+- No need to convert ASCII or UTF-8 characters:
+  There is no need to convert ASCII or UTF-8 characters when using option
+  --extract-xml-single since the encoding of the XML output file is UTF-8.
+  Affects: dcmnet/libsrc/dfindscu.cc
+
+**** Changes from 2021.02.17 (onken)
+
+- Fixed extra padding created for some segmentations:
+  The problem showed up if the number of pixels per frame is not divisable by 8
+  and the the number of pixels per object (i.e. all frames) is. In that
+  case, one byte extra padding is added at the end, which (if Pixel Data
+  length is odd then), leads to another extra byte since element length
+  must always be even in DICOM.
+  Affects: dcmseg/libsrc/segdoc.cc
+
+**** Changes from 2021.02.17 (schlamelcher)
+
+- Introduced a CMake option for static linking:
+  Introduced DCMTK_LINK_STATIC as an option for controlling how DCMTK's tools
+  and libraries are linked, affecting linker options and third party libraries.
+  These changes originate from our (so far not publicly available) release build
+  scripts. I noticed the way this is implemented is not that elegant while
+  creating this commit, but this way has the advantage that it has been verified
+  to work by the last couple of DCMTK releases. Most notably, the feature
+  removes flags from the CMake variables for dynamic linking to produce
+  statically linked binaries. We should better find a way to tell CMake it
+  should use the respective CMake variables for static linking instead in the
+  first place.
+  For now, the main goal of this commit is to make this feature publicly
+  available while keeping the build scripts consistent with it. Enhancing the
+  way the feature is implemented should (and hopefully will) come later.
+  Affects: CMake/3rdparty.cmake
+           CMake/dcmtkPrepare.cmake
+
+**** Changes from 2021.02.10 (riesmeier)
+
+- Fixed typo and corrected line breaks in manpage.
+  Affects: dcmdata/docs/dcm2json.man
+
+**** Changes from 2021.02.09 (riesmeier)
+
+- Added support for two new Storage SOP Classes:
+  Added definition of two new Storage SOP Class UIDs introduced with
+  Supplement 212 (XA Protocol Storage). Also extended the various network
+  tools accordingly.
+  This closes DCMTK Conformance #962.
+  Affects: dcmdata/include/dcmtk/dcmdata/dcuid.h
+           dcmdata/libsrc/dcuid.cc
+           dcmnet/docs/movescu.man
+           dcmnet/docs/storescp.man
+           dcmnet/etc/storescp.cfg
+           dcmnet/etc/storescu.cfg
+           dcmqrdb/docs/dcmqrscp.man
+           dcmqrdb/etc/dcmqrprf.cfg
+
+- Increased number of digits printed for FL values:
+  Increased the number of digits printed for FL element values to
+  FLT_DECIMAL_DIG (9) instead of 8. Also fixed comment for FD values.
+  The dcmsr module now works in the same manner as dcmdata (see recent
+  commit 1c8cca4bf).
+  Affects: dcmsr/libsrc/dsrsc3gr.cc
+           dcmsr/libsrc/dsrscogr.cc
+           dcmsr/libsrc/dsrtcoto.cc
+
+**** Changes from 2021.02.05 (eichelberg)
+
+- Adjusted the number of digits printed for FL and FD:
+  Adjusted the number of digits printed for FL elements to FLT_DECIMAL_DIG
+  (9) instead of 8, to make sure that the printed values can be converted
+  back to FL without loss. Fixed comment for FD, where the values was
+  already correct.
+  Thanks to Mathieu Malaterre <mathieu.malaterre@gmail.com> for pointing
+  out the issue.
+  Affects: dcmdata/libsrc/dcvrfd.cc
+           dcmdata/libsrc/dcvrfl.cc
+
+- Expanded dcm2json manpage:
+  Added section to dcm2json manpage that explains in which cases dcm2json
+  will convert DS, IS, SV and UV values to JSON strings.
+  Thanks to Mathieu Malaterre <mathieu.malaterre@gmail.com> for the suggestion.
+  Affects: dcmdata/docs/dcm2json.man
+
+- Added missing comma to dcm2json --write-meta:
+  When dcm2json was called with the --write-meta option, a comma was missing
+  between the metaheader attributes and the dataset attributes in
+  dcm2json 3.6.6. This is fixed now.
+  Thanks to forum user Shaeto for the bug report and suggested fix.
+  Affects: dcmdata/libsrc/dcfilefo.cc
+
+**** Changes from 2021.02.03 (riesmeier)
+
+- Updated Context Group classes for DICOM 2021a:
+  Updated automatically generated Context Group classes for the 2021a edition
+  of the DICOM standard. All supported classes were updated, even though there
+  were no changes to most of them.
+  Affects: dcmsr/include/dcmtk/dcmsr/cmr/cid100.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid10013.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid10033.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid11.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid244.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid29.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid4020.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid4021.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid4031.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid42.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid6147.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7021.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7181.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7445.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7452.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7453.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7464.h
+           dcmsr/include/dcmtk/dcmsr/cmr/cid7469.h
+           dcmsr/libcmr/cid100.cc
+           dcmsr/libcmr/cid10013.cc
+           dcmsr/libcmr/cid10033.cc
+           dcmsr/libcmr/cid11.cc
+           dcmsr/libcmr/cid244.cc
+           dcmsr/libcmr/cid29.cc
+           dcmsr/libcmr/cid4020.cc
+           dcmsr/libcmr/cid4021.cc
+           dcmsr/libcmr/cid4031.cc
+           dcmsr/libcmr/cid42.cc
+           dcmsr/libcmr/cid6147.cc
+           dcmsr/libcmr/cid7021.cc
+           dcmsr/libcmr/cid7181.cc
+           dcmsr/libcmr/cid7445.cc
+           dcmsr/libcmr/cid7452.cc
+           dcmsr/libcmr/cid7453.cc
+           dcmsr/libcmr/cid7464.cc
+           dcmsr/libcmr/cid7469.cc
+
+- Updated code definitions for DICOM 2021a:
+  Updated automatically generated code definitions for coding scheme "DCM".
+  For the coding scheme "NCIt" and "UMLS", there were no changes.
+  Affects: dcmsr/include/dcmtk/dcmsr/codes/dcm.h
+           dcmsr/include/dcmtk/dcmsr/codes/ncit.h
+           dcmsr/include/dcmtk/dcmsr/codes/umls.h
+
+**** Changes from 2021.02.01 (riesmeier)
+
+- Updated data dictionary for DICOM 2021a:
+  Updated data dictionary for the latest edition of the DICOM standard, which
+  has been released only recently.
+  Since three DICOM attributes were "retired", the name of the associated
+  DcmTagKey constants also changed. This required minor changes to the source
+  code of the dcmrt module (automatically generated source files).
+  Affects: dcmdata/data/dicom.dic
+           dcmdata/include/dcmtk/dcmdata/dcdeftag.h
+           dcmdata/libsrc/dcdictbi.cc
+           dcmrt/libsrc/drtcs.cc
+
+**** Changes from 2021.01.29 (eichelberg)
+
+- Added hints for a better detection of OpenJPEG:
+  Added hints for a better detection of OpenJPEG, which uses somewhat
+  non-standard paths, using find_package().
+  Affects: CMake/3rdparty.cmake
+
+- New function ASC_closeTransportConnection():
+  Added new function  ASC_closeTransportConnection() that allows a process
+  to directly close the underlying transport connection of a DICOM network
+  association. This is needed in the parent process of applications
+  that fork() for each incoming network connection and do not use the fork
+  mechanism built into dcmnet.
+  Affects: dcmnet/include/dcmtk/dcmnet/assoc.h
+           dcmnet/include/dcmtk/dcmnet/dcmtrans.h
+           dcmnet/include/dcmtk/dcmnet/dul.h
+           dcmnet/libsrc/assoc.cc
+           dcmnet/libsrc/dcmtrans.cc
+           dcmnet/libsrc/dul.cc
+           dcmtls/include/dcmtk/dcmtls/tlstrans.h
+           dcmtls/libsrc/tlstrans.cc
+
+- Fixed minor warnings related to type conversions.
+  Affects: dcmsign/libsrc/dcsignat.cc
+           dcmsign/libsrc/sipkey.cc
+
+**** Changes from 2021.01.28 (riesmeier)
+
+- Rebuilt Makefile dependencies.
+  Affects: dcmpstat/libsrc/Makefile.dep
+           dcmsign/apps/Makefile.dep
+           dcmsign/libsrc/Makefile.dep
+
+- Removed unused variable (reported by gcc).
+  Affects: dcmtls/libsrc/tlslayer.cc
+
+**** Changes from 2021.01.28 (eichelberg)
+
+- Restored compatibility with OpenSSL 1.0.1:
+  Minor code modifications that restore compatibility with older OpenSSL
+  versions, in particular 1.0.1 and newer.
+  Affects: dcmsign/include/dcmtk/dcmsign/simdmac.h
+           dcmsign/libsrc/simdmac.cc
+           dcmtls/libsrc/tlslayer.cc
+
+- Updated code handling Diffie-Hellman parameters:
+  Updated the code for handling Diffie-Hellman parameters to avoid
+  the use of functions that are deprecated in OpenSSL 3.0.
+  Affects: dcmtls/include/dcmtk/dcmtls/tlslayer.h
+           dcmtls/libsrc/tlslayer.cc
+
+- Adapted dcmpstat to commit d588139e2.
+  Affects: dcmpstat/libsrc/dvsighdl.cc
+
+- Migrated dcmsign to OpenSSL high-level APIs:
+  Migrated the dcmsign module from the historic low-level OpenSSL APIs
+  such as RSA_sign() and RIPEMD160_Init(), which will be deprecated in
+  OpenSSL 3.0.0, to the high-level APIs introduced with OpenSSL 1.1.0 such
+  as EVP_PKEY_sign() and EVP_DigestInit_ex() that use the same functions
+  for all public key algorithms and message authentication codes.
+  Added:   dcmsign/libsrc/simdmac.cc
+           dcmsign/libsrc/sipkey.cc
+  Affects: dcmsign/apps/dcmsign.cc
+           dcmsign/include/dcmtk/dcmsign/dcsignat.h
+           dcmsign/libsrc/CMakeLists.txt
+           dcmsign/libsrc/Makefile.in
+           dcmsign/libsrc/dcsignat.cc
+           dcmsign/libsrc/sicert.cc
+           dcmsign/libsrc/siprivat.cc
+           dcmsign/libsrc/sitstamp.cc
+  Removed: dcmsign/include/dcmtk/dcmsign/sidsa.h
+           dcmsign/include/dcmtk/dcmsign/siecdsa.h
+           dcmsign/include/dcmtk/dcmsign/simd5.h
+           dcmsign/include/dcmtk/dcmsign/siripemd.h
+           dcmsign/include/dcmtk/dcmsign/sisha256.h
+           dcmsign/include/dcmtk/dcmsign/sisha384.h
+           dcmsign/include/dcmtk/dcmsign/sisha512.h
+           dcmsign/libsrc/sidsa.cc
+           dcmsign/libsrc/siecdsa.cc
+           dcmsign/libsrc/simd5.cc
+           dcmsign/libsrc/siripemd.cc
+           dcmsign/libsrc/sirsa.cc
+           dcmsign/libsrc/sisha1.cc
+           dcmsign/libsrc/sisha256.cc
+           dcmsign/libsrc/sisha384.cc
+           dcmsign/libsrc/sisha512.cc
+  Renamed: dcmsign/include/dcmtk/dcmsign/sisha1.h
+         -> dcmsign/include/dcmtk/dcmsign/simdmac.h
+           dcmsign/include/dcmtk/dcmsign/sirsa.h
+         -> dcmsign/include/dcmtk/dcmsign/sipkey.h
+
+- Fixed parentheses.
+  Affects: dcmpstat/apps/dcmpsprt.cc
+
+- Fixed minor warnings reported by gcc -Wextra.
+  Affects: dcmpstat/apps/dcmpsprt.cc
+
+**** Changes from 2021.01.28 (riesmeier)
+
+- Made API documentation more consistent.
+  Affects: ofstd/include/dcmtk/ofstd/offile.h
+
+**** Changes from 2021.01.27 (riesmeier)
+
+- Removed unused variable (reported by gcc).
+  Affects: dcmpstat/apps/dcmpsprt.cc
+
+- Added missing "unistd" header include:
+  This system header file is at least needed when compiling with STL
+  support enabled, otherwise dup() and dup2() and reported as being
+  undeclared.
+  Affects: ofstd/libsrc/ofconsol.cc
+
+- Removed unused variable (reported by gcc).
+  Affects: dcmdata/libsrc/dcfilefo.cc
+
+- Fixed wrong indentation.
+  Affects: dcmdata/libsrc/cmdlnarg.cc
+
+- Added missing object files to Makefile.
+  Affects: dcmdata/libsrc/Makefile.in
+
+- Fixed typo and added space characters.
+  Affects: config/docs/macros.txt
+
+**** Changes from 2021.01.27 (eichelberg)
+
+- Improved performance of DcmStdinStream:
+  DcmStdinStream now acts as a buffered stream that reads from stdin in 32kByte
+  blocks and passes each block to the DICOM parser, instead of first buffering
+  the complete stdin stream in main memory. Furthermore, the stream now reads
+  block-wise and not character-wise, which improves the performance of the
+  implementation by one order of magnitude. Also cleaned up code by moving the
+  stdin/stdout stream code into separate files.
+  Added:   dcmdata/include/dcmtk/dcmdata/dcistrms.h
+           dcmdata/include/dcmtk/dcmdata/dcostrms.h
+           dcmdata/libsrc/dcistrms.cc
+           dcmdata/libsrc/dcostrms.cc
+  Affects: dcmdata/include/dcmtk/dcmdata/dcistrmf.h
+           dcmdata/include/dcmtk/dcmdata/dcostrmf.h
+           dcmdata/libsrc/CMakeLists.txt
+           dcmdata/libsrc/dcdatset.cc
+           dcmdata/libsrc/dcfilefo.cc
+           dcmdata/libsrc/dcistrmf.cc
+           dcmdata/libsrc/dcostrmf.cc
+
+- Fixed stdin/stdout DICOM file I/O on Win32:
+  The support for reading DICOM files or datasets from stdin and
+  writing DICOM files or datasets to stdout now also works on Windows,
+  where the streams are by default in text mode and must be switched
+  to binary.
+  Affects: dcmdata/libsrc/dcistrmf.cc
+           dcmdata/libsrc/dcostrmf.cc
+
+- Do not redirect stderr to stdout on Windows anymore:
+  Moved functionality to merge and unmerge the stdout and stderr output streams
+  to class OFConsole to make it publicly available. By default, DCMTK does not
+  redirect the stderr anymore on Windows since this interferes with the ability to
+  write DICOM files to stdout. The old behaviour can be restored by compiling with
+  DCMTK_MERGE_STDERR_TO_STDOUT. Otherwise, users can redirect stderr on the
+  command line by specifying "2>&1", just like on Posix systems.
+  Affects: config/docs/macros.txt
+           dcmdata/libsrc/cmdlnarg.cc
+           ofstd/include/dcmtk/ofstd/ofconsol.h
+           ofstd/libsrc/ofconsol.cc
+
+- Added support for stdin/stdout DICOM file I/O:
+  Added support for reading DICOM files or datasets from stdin and
+  writing DICOM files or datasets to stdout. Following Unix conventions,
+  this behaviour is triggered by using '-' as the filename.
+  This feature was sponsored by Segmed Inc., https://www.segmed.ai/
+  Thanks to Jasper den Otter <jasper@segmed.ai> and
+  W. Adam Koszek <wkoszek@segmed.ai>.
+  Affects: dcmdata/apps/mdfconen.cc
+           dcmdata/apps/mdfdsman.cc
+           dcmdata/include/dcmtk/dcmdata/dcistrmf.h
+           dcmdata/include/dcmtk/dcmdata/dcostrmf.h
+           dcmdata/libsrc/dcdatset.cc
+           dcmdata/libsrc/dcfilefo.cc
+           dcmdata/libsrc/dcistrmf.cc
+           dcmdata/libsrc/dcostrmf.cc
+           ofstd/include/dcmtk/ofstd/offile.h
+
+**** Changes from 2021.01.27 (riesmeier)
+
+- Added support for another Value Type (CP-2053):
+  Added support for another Value Type introduced with CP-2053 (Mammography
+  CAD SR Value Types): the relationship "IMAGE has acq context UIDREF" is now
+  also allowed for the Mammography CAD SR IOD, as needed for TID 4020 (CAD
+  Image Library Entry).
+  This closes DCMTK Conformance #960.
+  Affects: dcmsr/libsrc/dsrmamcc.cc
+
+**** Changes from 2021.01.25 (riesmeier)
+
+- Also updated GNU Autoconf files:
+  Also updated GNU Autoconf files for DCMTK 3.6.6+.
+  Affects: config/configure
+           config/configure.in
+
+**** Changes from 2021.01.25 (onken)
+
+- Updated version information for 3.6.6+ development:
+  Updated version information marking the start of DCMTK development post minor
+  release 3.6.6.
+  Moved official ANNOUNCE file of the DCMTK release 3.6.6 to the "docs"
+  subfolder and replaced the main ANNOUNCE file with a "dummy".
+  Added:   docs/ANNOUNCE.366
+  Affects: ANNOUNCE
+           CMake/dcmtkPrepare.cmake
+           VERSION
index 3c7361cc025bd44b9ef31ffa168f1bc96c045b31..0454a2bd4173f81ff3cea5ef2872ab3d0abf7bd5 100644 (file)
@@ -1,4 +1,4 @@
-# Doxyfile 1.8.8
+# Doxyfile 1.8.17
 
 # This file describes the settings to be used by the documentation system
 # doxygen (www.doxygen.org) for a project.
 # Project related configuration options
 #---------------------------------------------------------------------------
 
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all text
-# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
-# for the list of possible encodings.
+# This tag specifies the encoding used for all characters in the configuration
+# file that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
 # The default value is: UTF-8.
 
 DOXYFILE_ENCODING      = ISO-8859-1
@@ -46,10 +46,10 @@ PROJECT_NUMBER         = "Version @DCMTK_VERSION@"
 
 PROJECT_BRIEF          = "OFFIS DICOM Toolkit"
 
-# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
-# the documentation. The maximum height of the logo should not exceed 55 pixels
-# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
-# to the output directory.
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
 
 PROJECT_LOGO           =
 
@@ -60,7 +60,7 @@ PROJECT_LOGO           =
 
 OUTPUT_DIRECTORY       =
 
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
 # directories (in 2 levels) under the output directory of each output format and
 # will distribute the generated files over these directories. Enabling this
 # option can be useful when feeding doxygen a huge amount of source files, where
@@ -93,14 +93,22 @@ ALLOW_UNICODE_NAMES    = NO
 
 OUTPUT_LANGUAGE        = English
 
-# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all generated output in the proper direction.
+# Possible values are: None, LTR, RTL and Context.
+# The default value is: None.
+
+OUTPUT_TEXT_DIRECTION  = None
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
 # descriptions after the members that are listed in the file and class
 # documentation (similar to Javadoc). Set to NO to disable this.
 # The default value is: YES.
 
 BRIEF_MEMBER_DESC      = YES
 
-# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
 # description of a member or function before the detailed description
 #
 # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
@@ -135,7 +143,7 @@ ALWAYS_DETAILED_SEC    = NO
 
 INLINE_INHERITED_MEMB  = NO
 
-# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
 # before files name in the file list and in the header files. If set to NO the
 # shortest path that makes the file name unique will be used
 # The default value is: YES.
@@ -179,6 +187,16 @@ SHORT_NAMES            = NO
 
 JAVADOC_AUTOBRIEF      = YES
 
+# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
+# such as
+# /***************
+# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
+# Javadoc-style will behave just like regular comments and it will not be
+# interpreted by doxygen.
+# The default value is: NO.
+
+JAVADOC_BANNER         = NO
+
 # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
 # line (until the first dot) of a Qt-style comment as the brief description. If
 # set to NO, the Qt-style will behave just like regular Qt-style comments (thus
@@ -205,9 +223,9 @@ MULTILINE_CPP_IS_BRIEF = NO
 
 INHERIT_DOCS           = NO
 
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
-# new page for each member. If set to NO, the documentation of a member will be
-# part of the file/class/namespace that contains it.
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
 # The default value is: NO.
 
 SEPARATE_MEMBER_PAGES  = NO
@@ -226,7 +244,12 @@ TAB_SIZE               = 4
 # will allow you to put the command \sideeffect (or @sideeffect) in the
 # documentation, which will result in a user-defined paragraph with heading
 # "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines.
+# newlines (in the resulting output). You can put ^^ in the value part of an
+# alias to insert a newline as if a physical newline was in the original file.
+# When you need a literal { or } or , in the value part of an alias you have to
+# escape them by means of a backslash (\), this can lead to conflicts with the
+# commands \{ and \} for these it is advised to use the version @{ and @} or use
+# a double escape (\\{ and \\})
 
 ALIASES                =
 
@@ -264,19 +287,28 @@ OPTIMIZE_FOR_FORTRAN   = NO
 
 OPTIMIZE_OUTPUT_VHDL   = NO
 
+# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
+# sources only. Doxygen will then generate output that is more tailored for that
+# language. For instance, namespaces will be presented as modules, types will be
+# separated into more groups, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_SLICE  = NO
+
 # Doxygen selects the parser to use depending on the extension of the files it
 # parses. With this tag you can assign which parser to use for a given
 # extension. Doxygen has a built-in mapping, but you can override or extend it
 # using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
-# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
-# Fortran. In the later case the parser tries to guess whether the code is fixed
-# or free formatted code, this is the default for Fortran type files), VHDL. For
-# instance to make doxygen treat .inc files as Fortran files (default is PHP),
-# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
+# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice,
+# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
+# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
+# tries to guess whether the code is fixed or free formatted code, this is the
+# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat
+# .inc files as Fortran files (default is PHP), and .f files as C (default is
+# Fortran), use: inc=Fortran f=C.
 #
-# Note For files without extension you can use no_extension as a placeholder.
+# Note: For files without extension you can use no_extension as a placeholder.
 #
 # Note that for custom extensions you also need to set FILE_PATTERNS otherwise
 # the files are not read by doxygen.
@@ -285,7 +317,7 @@ EXTENSION_MAPPING      = man=C
 
 # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
 # according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# documentation. See https://daringfireball.net/projects/markdown/ for details.
 # The output of markdown processing is further processed by doxygen, so you can
 # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
 # case of backward compatibilities issues.
@@ -293,10 +325,19 @@ EXTENSION_MAPPING      = man=C
 
 MARKDOWN_SUPPORT       = YES
 
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 5.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS   = 5
+
 # When enabled doxygen tries to link words that correspond to documented
 # classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by by putting a % sign in front of the word
-# or globally by setting AUTOLINK_SUPPORT to NO.
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
 # The default value is: YES.
 
 AUTOLINK_SUPPORT       = YES
@@ -318,7 +359,7 @@ BUILTIN_STL_SUPPORT    = NO
 CPP_CLI_SUPPORT        = NO
 
 # Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
 # will parse them like normal C++ but will assume all classes use public instead
 # of private inheritance when no explicit protection keyword is present.
 # The default value is: NO.
@@ -336,13 +377,20 @@ SIP_SUPPORT            = NO
 IDL_PROPERTY_SUPPORT   = YES
 
 # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
+# tag is set to YES then doxygen will reuse the documentation of the first
 # member in the group (if any) for the other members of the group. By default
 # all members of a group must be documented explicitly.
 # The default value is: NO.
 
 DISTRIBUTE_GROUP_DOC   = NO
 
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
 # Set the SUBGROUPING tag to YES to allow class member groups of the same type
 # (for instance a group of public functions) to be put as a subgroup of that
 # type (e.g. under the Public Functions section). Set it to NO to prevent
@@ -401,7 +449,7 @@ LOOKUP_CACHE_SIZE      = 0
 # Build related configuration options
 #---------------------------------------------------------------------------
 
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
 # documentation are documented, even if no documentation was available. Private
 # class members and static file members will be hidden unless the
 # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
@@ -411,35 +459,41 @@ LOOKUP_CACHE_SIZE      = 0
 
 EXTRACT_ALL            = NO
 
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
 # be included in the documentation.
 # The default value is: NO.
 
 EXTRACT_PRIVATE        = YES
 
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
+# methods of a class will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIV_VIRTUAL   = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
 # scope will be included in the documentation.
 # The default value is: NO.
 
 EXTRACT_PACKAGE        = NO
 
-# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
 # included in the documentation.
 # The default value is: NO.
 
 EXTRACT_STATIC         = YES
 
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
 # only classes defined in header files are included. Does not have any effect
 # for Java sources.
 # The default value is: YES.
 
 EXTRACT_LOCAL_CLASSES  = YES
 
-# This flag is only useful for Objective-C code. When set to YES local methods,
+# This flag is only useful for Objective-C code. If set to YES, local methods,
 # which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO only methods in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
 # included.
 # The default value is: NO.
 
@@ -464,21 +518,21 @@ HIDE_UNDOC_MEMBERS     = YES
 
 # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
 # undocumented classes that are normally visible in the class hierarchy. If set
-# to NO these classes will be included in the various overviews. This option has
-# no effect if EXTRACT_ALL is enabled.
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
 # The default value is: NO.
 
 HIDE_UNDOC_CLASSES     = NO
 
 # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO these declarations will be
-# included in the documentation.
+# declarations. If set to NO, these declarations will be included in the
+# documentation.
 # The default value is: NO.
 
 HIDE_FRIEND_COMPOUNDS  = NO
 
 # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO these
+# documentation blocks found inside the body of a function. If set to NO, these
 # blocks will be appended to the function's detailed documentation block.
 # The default value is: NO.
 
@@ -492,21 +546,28 @@ HIDE_IN_BODY_DOCS      = NO
 INTERNAL_DOCS          = NO
 
 # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES upper-case letters are also
+# names in lower-case letters. If set to YES, upper-case letters are also
 # allowed. This is useful if you have classes or files whose names only differ
 # in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
+# (including Cygwin) ands Mac users are advised to set this option to NO.
 # The default value is: system dependent.
 
 CASE_SENSE_NAMES       = YES
 
 # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES the
+# their full class and namespace scopes in the documentation. If set to YES, the
 # scope will be hidden.
 # The default value is: NO.
 
 HIDE_SCOPE_NAMES       = NO
 
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
 # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
 # the files that are included by a file in the documentation of that file.
 # The default value is: YES.
@@ -534,14 +595,14 @@ INLINE_INFO            = YES
 
 # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
 # (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order.
+# name. If set to NO, the members will appear in declaration order.
 # The default value is: YES.
 
 SORT_MEMBER_DOCS       = YES
 
 # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
 # descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order. Note that
+# name. If set to NO, the members will appear in declaration order. Note that
 # this will also influence the order of the classes in the class list.
 # The default value is: NO.
 
@@ -586,27 +647,25 @@ SORT_BY_SCOPE_NAME     = YES
 
 STRICT_PROTO_MATCHING  = NO
 
-# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
-# todo list. This list is created by putting \todo commands in the
-# documentation.
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
 # The default value is: YES.
 
 GENERATE_TODOLIST      = YES
 
-# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
-# test list. This list is created by putting \test commands in the
-# documentation.
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
 # The default value is: YES.
 
 GENERATE_TESTLIST      = YES
 
-# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
 # list. This list is created by putting \bug commands in the documentation.
 # The default value is: YES.
 
 GENERATE_BUGLIST       = YES
 
-# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
 # the deprecated list. This list is created by putting \deprecated commands in
 # the documentation.
 # The default value is: YES.
@@ -631,8 +690,8 @@ ENABLED_SECTIONS       =
 MAX_INITIALIZER_LINES  = 30
 
 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES the list
-# will mention the files that were used to generate the documentation.
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
 # The default value is: YES.
 
 SHOW_USED_FILES        = YES
@@ -677,7 +736,7 @@ LAYOUT_FILE            = "@DOXYGEN_INPUT_DIR@/doxygen/layout.xml"
 # The CITE_BIB_FILES tag can be used to specify one or more bib files containing
 # the reference definitions. This must be a list of .bib files. The .bib
 # extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
 # For LaTeX the style of the bibliography can be controlled using
 # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
 # search path. See also \cite for info how to create references.
@@ -696,7 +755,7 @@ CITE_BIB_FILES         =
 QUIET                  = NO
 
 # The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
 # this implies that the warnings are on.
 #
 # Tip: Turn warnings on while writing the documentation.
@@ -704,7 +763,7 @@ QUIET                  = NO
 
 WARNINGS               = YES
 
-# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
 # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
 # will automatically be disabled.
 # The default value is: YES.
@@ -721,12 +780,19 @@ WARN_IF_DOC_ERROR      = YES
 
 # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
 # are documented, but have no documentation for their parameters or return
-# value. If set to NO doxygen will only warn about wrong or incomplete parameter
-# documentation, but not about the absence of documentation.
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation. If
+# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
 # The default value is: NO.
 
 WARN_NO_PARAMDOC       = YES
 
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered.
+# The default value is: NO.
+
+WARN_AS_ERROR          = NO
+
 # The WARN_FORMAT tag determines the format of the warning messages that doxygen
 # can produce. The string should contain the $file, $line, and $text tags, which
 # will be replaced by the file and line number from which the warning originated
@@ -750,7 +816,7 @@ WARN_LOGFILE           = htmldocs.log
 # The INPUT tag is used to specify the files and/or directories that contain
 # documented source files. You may enter file names like myfile.cpp or
 # directories like /usr/src/myproject. Separate the files or directories with
-# spaces.
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
 # Note: If this tag is empty the current directory is searched.
 
 INPUT                  = "@DOXYGEN_INPUT_DIR@"
@@ -758,7 +824,7 @@ INPUT                  = "@DOXYGEN_INPUT_DIR@"
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
 # libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# documentation (see: https://www.gnu.org/software/libiconv/) for the list of
 # possible encodings.
 # The default value is: UTF-8.
 
@@ -766,12 +832,19 @@ INPUT_ENCODING         = ISO-8859-1
 
 # If the value of the INPUT tag contains directories, you can use the
 # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank the
-# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
-# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
-# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
-# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
-# *.qsf, *.as and *.js.
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
+# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment),
+# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen
+# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd,
+# *.vhdl, *.ucf, *.qsf and *.ice.
 
 FILE_PATTERNS          = *.h \
                          *.man \
@@ -861,6 +934,10 @@ IMAGE_PATH             =
 # Note that the filter must not add or remove lines; it is applied before the
 # code is scanned, but not when the output code is generated. If lines are added
 # or removed, the anchors will not be placed correctly.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
 
 INPUT_FILTER           =
 
@@ -870,11 +947,15 @@ INPUT_FILTER           =
 # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
 # filters are used. If the FILTER_PATTERNS tag is empty or if none of the
 # patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
 
 FILTER_PATTERNS        =
 
 # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER ) will also be used to filter the input files that are used for
+# INPUT_FILTER) will also be used to filter the input files that are used for
 # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
 # The default value is: NO.
 
@@ -922,7 +1003,7 @@ INLINE_SOURCES         = NO
 STRIP_CODE_COMMENTS    = YES
 
 # If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# function all documented functions referencing it will be listed.
+# entity all documented functions referencing it will be listed.
 # The default value is: NO.
 
 REFERENCED_BY_RELATION = YES
@@ -934,7 +1015,7 @@ REFERENCED_BY_RELATION = YES
 REFERENCES_RELATION    = YES
 
 # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
 # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
 # link to the documentation.
 # The default value is: YES.
@@ -954,12 +1035,12 @@ SOURCE_TOOLTIPS        = YES
 # If the USE_HTAGS tag is set to YES then the references to source code will
 # point to the HTML generated by the htags(1) tool instead of doxygen built-in
 # source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
+# (see https://www.gnu.org/software/global/global.html). You will need version
 # 4.8.6 or higher.
 #
 # To use it do the following:
 # - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
 # - Make sure the INPUT points to the root of the source tree
 # - Run doxygen as normal
 #
@@ -981,13 +1062,13 @@ USE_HTAGS              = NO
 
 VERBATIM_HEADERS       = NO
 
-# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
+# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
 # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
 # cost of reduced performance. This can be particularly helpful with template
 # rich C++ code for which doxygen's built-in parser lacks the necessary type
 # information.
 # Note: The availability of this option depends on whether or not doxygen was
-# compiled with the --with-libclang option.
+# generated with the -Duse_libclang=ON option for CMake.
 # The default value is: NO.
 
 CLANG_ASSISTED_PARSING = NO
@@ -1000,6 +1081,16 @@ CLANG_ASSISTED_PARSING = NO
 
 CLANG_OPTIONS          =
 
+# If clang assisted parsing is enabled you can provide the clang parser with the
+# path to the compilation database (see:
+# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files
+# were built. This is equivalent to specifying the "-p" option to a clang tool,
+# such as clang-check. These options will then be passed to the parser.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse_libclang=ON option for CMake.
+
+CLANG_DATABASE_PATH    =
+
 #---------------------------------------------------------------------------
 # Configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
@@ -1030,7 +1121,7 @@ IGNORE_PREFIX          =
 # Configuration options related to the HTML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
 # The default value is: YES.
 
 GENERATE_HTML          = YES
@@ -1096,10 +1187,10 @@ HTML_STYLESHEET        =
 # cascading style sheets that are included after the standard style sheets
 # created by doxygen. Using this option one can overrule certain style aspects.
 # This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefor more robust against future updates.
+# standard style sheet and is therefore more robust against future updates.
 # Doxygen will copy the style sheet files to the output directory.
-# Note: The order of the extra stylesheet files is of importance (e.g. the last
-# stylesheet in the list overrules the setting of the previous ones in the
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
 # list). For an example see the documentation.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
@@ -1116,9 +1207,9 @@ HTML_EXTRA_STYLESHEET  =
 HTML_EXTRA_FILES       =
 
 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the stylesheet and background images according to
+# will adjust the colors in the style sheet and background images according to
 # this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
 # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
 # purple, and 360 is red again.
 # Minimum value: 0, maximum value: 359, default value: 220.
@@ -1147,12 +1238,24 @@ HTML_COLORSTYLE_GAMMA  = 80
 
 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
 # page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: YES.
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
 HTML_TIMESTAMP         = YES
 
+# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
+# documentation will contain a main index with vertical navigation menus that
+# are dynamically created via JavaScript. If disabled, the navigation index will
+# consists of multiple levels of tabs that are statically embedded in every HTML
+# page. Disable this option to support browsers that do not have JavaScript,
+# like the Qt help browser.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_MENUS     = YES
+
 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
 # documentation will contain sections that can be hidden and shown after the
 # page has loaded.
@@ -1176,13 +1279,13 @@ HTML_INDEX_NUM_ENTRIES = 100
 
 # If the GENERATE_DOCSET tag is set to YES, additional index files will be
 # generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: http://developer.apple.com/tools/xcode/), introduced with
-# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# environment (see: https://developer.apple.com/xcode/), introduced with OSX
+# 10.5 (Leopard). To create a documentation set, doxygen will generate a
 # Makefile in the HTML output directory. Running make will produce the docset in
 # that directory and running make install will install the docset in
 # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
+# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
+# genXcode/_index.html for more information.
 # The default value is: NO.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
@@ -1221,7 +1324,7 @@ DOCSET_PUBLISHER_NAME  = "OFFIS DICOM Team"
 # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
 # additional HTML index files: index.hhp, index.hhc, and index.hhk. The
 # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on
 # Windows.
 #
 # The HTML Help Workshop contains a compiler that can convert all HTML output
@@ -1244,28 +1347,28 @@ GENERATE_HTMLHELP      = NO
 CHM_FILE               = dcmtk-help.chm
 
 # The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
 # doxygen will try to run the HTML help compiler on the generated index.hhp.
 # The file has to be specified with full path.
 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
 
 HHC_LOCATION           =
 
-# The GENERATE_CHI flag controls if a separate .chi index file is generated (
-# YES) or that it should be included in the master .chm file ( NO).
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
 # The default value is: NO.
 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
 
 GENERATE_CHI           = NO
 
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
 # and project file content.
 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
 
 CHM_INDEX_ENCODING     =
 
-# The BINARY_TOC flag controls whether a binary table of contents is generated (
-# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
 # enables the Previous and Next buttons.
 # The default value is: NO.
 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
@@ -1297,7 +1400,7 @@ QCH_FILE               =
 
 # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
 # Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
 # The default value is: org.doxygen.Project.
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
@@ -1305,7 +1408,7 @@ QHP_NAMESPACE          = org.dcmtk
 
 # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
 # Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-
 # folders).
 # The default value is: doc.
 # This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1314,7 +1417,7 @@ QHP_VIRTUAL_FOLDER     = doc
 
 # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
 # filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
 # filters).
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
@@ -1322,7 +1425,7 @@ QHP_CUST_FILTER_NAME   =
 
 # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
 # custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
 # filters).
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
@@ -1330,7 +1433,7 @@ QHP_CUST_FILTER_ATTRS  =
 
 # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
 # project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
 QHP_SECT_FILTER_ATTRS  =
@@ -1379,7 +1482,7 @@ DISABLE_INDEX          = NO
 # index structure (just like the one that is generated for HTML Help). For this
 # to work a browser that supports JavaScript, DHTML, CSS and frames is required
 # (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
 # further fine-tune the look of the index. As an example, the default style
 # sheet generated by doxygen has an example that shows how to put an image at
 # the root of the tree instead of the PROJECT_NAME. Since the tree basically has
@@ -1407,7 +1510,7 @@ ENUM_VALUES_PER_LINE   = 4
 
 TREEVIEW_WIDTH         = 250
 
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
 # external symbols imported via tag files in a separate window.
 # The default value is: NO.
 # This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1423,7 +1526,7 @@ EXT_LINKS_IN_WINDOW    = NO
 
 FORMULA_FONTSIZE       = 10
 
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
 # generated for formulas are transparent PNGs. Transparent PNGs are not
 # supported properly for IE 6.0, but are supported on all modern browsers.
 #
@@ -1434,9 +1537,15 @@ FORMULA_FONTSIZE       = 10
 
 FORMULA_TRANSPARENT    = YES
 
+# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
+# to create new LaTeX commands to be used in formulas as building blocks. See
+# the section "Including formulas" for details.
+
+FORMULA_MACROFILE      =
+
 # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# https://www.mathjax.org) which uses client side JavaScript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
 # installed or if you want to formulas look prettier in the HTML output. When
 # enabled you may also need to install MathJax separately and configure the path
 # to it using the MATHJAX_RELPATH option.
@@ -1462,8 +1571,8 @@ MATHJAX_FORMAT         = HTML-CSS
 # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
 # Content Delivery Network so you can quickly see the result without installing
 # MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
-# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# MathJax from https://www.mathjax.org before deployment.
+# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/.
 # This tag requires that the tag USE_MATHJAX is set to YES.
 
 MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
@@ -1505,7 +1614,7 @@ MATHJAX_CODEFILE       =
 SEARCHENGINE           = YES
 
 # When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
+# implemented using a web server instead of a web client using JavaScript. There
 # are two flavors of web server based searching depending on the EXTERNAL_SEARCH
 # setting. When disabled, doxygen will generate a PHP script for searching and
 # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
@@ -1522,9 +1631,9 @@ SERVER_BASED_SEARCH    = NO
 # external search engine pointed to by the SEARCHENGINE_URL option to obtain the
 # search results.
 #
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# Doxygen ships with an example indexer (doxyindexer) and search engine
 # (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/).
+# Xapian (see: https://xapian.org/).
 #
 # See the section "External Indexing and Searching" for details.
 # The default value is: NO.
@@ -1535,9 +1644,9 @@ EXTERNAL_SEARCH        = NO
 # The SEARCHENGINE_URL should point to a search engine hosted by a web server
 # which will return the search results when EXTERNAL_SEARCH is enabled.
 #
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# Doxygen ships with an example indexer (doxyindexer) and search engine
 # (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Xapian (see: https://xapian.org/). See the section "External Indexing and
 # Searching" for details.
 # This tag requires that the tag SEARCHENGINE is set to YES.
 
@@ -1573,7 +1682,7 @@ EXTRA_SEARCH_MAPPINGS  =
 # Configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
 # The default value is: YES.
 
 GENERATE_LATEX         = NO
@@ -1589,22 +1698,36 @@ LATEX_OUTPUT           = latex
 # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
 # invoked.
 #
-# Note that when enabling USE_PDFLATEX this option is only used for generating
-# bitmaps for formulas in the HTML output, but not in the Makefile that is
-# written to the output directory.
-# The default file is: latex.
+# Note that when not enabling USE_PDFLATEX the default is latex when enabling
+# USE_PDFLATEX the default is pdflatex and when in the later case latex is
+# chosen this is overwritten by pdflatex. For specific output languages the
+# default can have been set differently, this depends on the implementation of
+# the output language.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
 LATEX_CMD_NAME         = latex
 
 # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
 # index for LaTeX.
+# Note: This tag is used in the Makefile / make.bat.
+# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
+# (.tex).
 # The default file is: makeindex.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
 MAKEINDEX_CMD_NAME     = makeindex
 
-# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
+# generate index for LaTeX. In case there is no backslash (\) as first character
+# it will be automatically added in the LaTeX code.
+# Note: This tag is used in the generated output file (.tex).
+# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
+# The default value is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_MAKEINDEX_CMD    = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
 # documents. This may be useful for small projects and may help to save some
 # trees in general.
 # The default value is: NO.
@@ -1622,9 +1745,12 @@ COMPACT_LATEX          = NO
 PAPER_TYPE             = a4wide
 
 # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
-# that should be included in the LaTeX output. To get the times font for
-# instance you can specify
-# EXTRA_PACKAGES=times
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
 # If left blank no extra packages will be included.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
@@ -1639,9 +1765,9 @@ EXTRA_PACKAGES         =
 # Note: Only use a user-defined header if you know what you are doing! The
 # following commands have a special meaning inside the header: $title,
 # $datetime, $date, $doxygenversion, $projectname, $projectnumber,
-# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string,
-# for the replacement values of the other commands the user is refered to
-# HTML_HEADER.
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
 LATEX_HEADER           =
@@ -1657,6 +1783,17 @@ LATEX_HEADER           =
 
 LATEX_FOOTER           =
 
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
 # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
 # other source files which should be copied to the LATEX_OUTPUT output
 # directory. Note that the files will be copied as-is; there are no commands or
@@ -1675,7 +1812,7 @@ LATEX_EXTRA_FILES      =
 PDF_HYPERLINKS         = YES
 
 # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
-# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
 # higher quality PDF documentation.
 # The default value is: YES.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
@@ -1710,17 +1847,33 @@ LATEX_SOURCE_CODE      = NO
 
 # The LATEX_BIB_STYLE tag can be used to specify the style to use for the
 # bibliography, e.g. plainnat, or ieeetr. See
-# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
 # The default value is: plain.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
 LATEX_BIB_STYLE        = plain
 
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_TIMESTAMP        = NO
+
+# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
+# path from which the emoji images will be read. If a relative path is entered,
+# it will be relative to the LATEX_OUTPUT directory. If left blank the
+# LATEX_OUTPUT directory will be used.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EMOJI_DIRECTORY  =
+
 #---------------------------------------------------------------------------
 # Configuration options related to the RTF output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
 # RTF output is optimized for Word 97 and may not look too pretty with other RTF
 # readers/editors.
 # The default value is: NO.
@@ -1735,7 +1888,7 @@ GENERATE_RTF           = NO
 
 RTF_OUTPUT             = rtf
 
-# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
 # documents. This may be useful for small projects and may help to save some
 # trees in general.
 # The default value is: NO.
@@ -1755,9 +1908,9 @@ COMPACT_RTF            = NO
 
 RTF_HYPERLINKS         = NO
 
-# Load stylesheet definitions from file. Syntax is similar to doxygen's config
-# file, i.e. a series of assignments. You only have to provide replacements,
-# missing definitions are set to their default value.
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# configuration file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
 #
 # See also section "Doxygen usage" for information on how to generate the
 # default style sheet that doxygen normally uses.
@@ -1766,17 +1919,27 @@ RTF_HYPERLINKS         = NO
 RTF_STYLESHEET_FILE    =
 
 # Set optional variables used in the generation of an RTF document. Syntax is
-# similar to doxygen's config file. A template extensions file can be generated
-# using doxygen -e rtf extensionFile.
+# similar to doxygen's configuration file. A template extensions file can be
+# generated using doxygen -e rtf extensionFile.
 # This tag requires that the tag GENERATE_RTF is set to YES.
 
 RTF_EXTENSIONS_FILE    =
 
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE        = NO
+
 #---------------------------------------------------------------------------
 # Configuration options related to the man page output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
 # classes and files.
 # The default value is: NO.
 
@@ -1820,7 +1983,7 @@ MAN_LINKS              = NO
 # Configuration options related to the XML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
 # captures the structure of the code including all documentation.
 # The default value is: NO.
 
@@ -1834,7 +1997,7 @@ GENERATE_XML           = NO
 
 XML_OUTPUT             = xml
 
-# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
 # listings (including syntax highlighting and cross-referencing information) to
 # the XML output. Note that enabling this will significantly increase the size
 # of the XML output.
@@ -1843,11 +2006,18 @@ XML_OUTPUT             = xml
 
 XML_PROGRAMLISTING     = YES
 
+# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
+# namespace members in file scope as well, matching the HTML output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_NS_MEMB_FILE_SCOPE = NO
+
 #---------------------------------------------------------------------------
 # Configuration options related to the DOCBOOK output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
 # that can be used to generate PDF.
 # The default value is: NO.
 
@@ -1861,7 +2031,7 @@ GENERATE_DOCBOOK       = NO
 
 DOCBOOK_OUTPUT         = docbook
 
-# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
 # program listings (including syntax highlighting and cross-referencing
 # information) to the DOCBOOK output. Note that enabling this will significantly
 # increase the size of the DOCBOOK output.
@@ -1874,10 +2044,10 @@ DOCBOOK_PROGRAMLISTING = NO
 # Configuration options for the AutoGen Definitions output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
-# Definitions (see http://autogen.sf.net) file that captures the structure of
-# the code including all documentation. Note that this feature is still
-# experimental and incomplete at the moment.
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
+# the structure of the code including all documentation. Note that this feature
+# is still experimental and incomplete at the moment.
 # The default value is: NO.
 
 GENERATE_AUTOGEN_DEF   = NO
@@ -1886,7 +2056,7 @@ GENERATE_AUTOGEN_DEF   = NO
 # Configuration options related to the Perl module output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
 # file that captures the structure of the code including all documentation.
 #
 # Note that this feature is still experimental and incomplete at the moment.
@@ -1894,7 +2064,7 @@ GENERATE_AUTOGEN_DEF   = NO
 
 GENERATE_PERLMOD       = NO
 
-# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
 # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
 # output from the Perl module output.
 # The default value is: NO.
@@ -1902,9 +2072,9 @@ GENERATE_PERLMOD       = NO
 
 PERLMOD_LATEX          = NO
 
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
 # formatted so it can be parsed by a human reader. This is useful if you want to
-# understand what is going on. On the other hand, if this tag is set to NO the
+# understand what is going on. On the other hand, if this tag is set to NO, the
 # size of the Perl module output will be much smaller and Perl will parse it
 # just the same.
 # The default value is: YES.
@@ -1924,14 +2094,14 @@ PERLMOD_MAKEVAR_PREFIX =
 # Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 
-# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
 # C-preprocessor directives found in the sources and include files.
 # The default value is: YES.
 
 ENABLE_PREPROCESSING   = YES
 
-# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
-# in the source code. If set to NO only conditional compilation will be
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
 # performed. Macro expansion can be done in a controlled way by setting
 # EXPAND_ONLY_PREDEF to YES.
 # The default value is: NO.
@@ -1947,7 +2117,7 @@ MACRO_EXPANSION        = YES
 
 EXPAND_ONLY_PREDEF     = YES
 
-# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
 # INCLUDE_PATH will be searched if a #include is found.
 # The default value is: YES.
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
@@ -1991,7 +2161,7 @@ PREDEFINED             = DOXYGEN \
                          WITH_LIBXML \
                          WITH_OPENSSL \
                          WITH_THREADS \
-                         WITH_ZLIB \
+                         WITH_ZLIB
 
 # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
 # tag can be used to specify a list of macro names that should be expanded. The
@@ -2037,37 +2207,32 @@ TAGFILES               =
 
 GENERATE_TAGFILE       = @DOXYGEN_TAGFILE@
 
-# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
-# class index. If set to NO only the inherited external classes will be listed.
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
 # The default value is: NO.
 
 ALLEXTERNALS           = NO
 
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
-# the modules index. If set to NO, only the current project's groups will be
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
 # listed.
 # The default value is: YES.
 
 EXTERNAL_GROUPS        = YES
 
-# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
 # the related pages index. If set to NO, only the current project's pages will
 # be listed.
 # The default value is: YES.
 
 EXTERNAL_PAGES         = YES
 
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH              = /usr/bin/perl
-
 #---------------------------------------------------------------------------
 # Configuration options related to the dot tool
 #---------------------------------------------------------------------------
 
-# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
 # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
 # NO turns the diagrams off. Note that this option also works with HAVE_DOT
 # disabled, but it is recommended to install and use dot, since it yields more
@@ -2076,15 +2241,6 @@ PERL_PATH              = /usr/bin/perl
 
 CLASS_DIAGRAMS         = YES
 
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH            =
-
 # You can include diagrams made with dia in doxygen documentation. Doxygen will
 # then run dia to produce the diagram and insert it in the documentation. The
 # DIA_PATH tag allows you to specify the directory where the dia binary resides.
@@ -2092,7 +2248,7 @@ MSCGEN_PATH            =
 
 DIA_PATH               =
 
-# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# If set to YES the inheritance and collaboration graphs will hide inheritance
 # and usage relations if the target is undocumented or is not a class.
 # The default value is: YES.
 
@@ -2165,7 +2321,7 @@ COLLABORATION_GRAPH    = YES
 
 GROUP_GRAPHS           = YES
 
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
 # collaboration diagrams in a style similar to the OMG's Unified Modeling
 # Language.
 # The default value is: NO.
@@ -2217,7 +2373,8 @@ INCLUDED_BY_GRAPH      = YES
 #
 # Note that enabling this option will significantly increase the time of a run.
 # So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
 # The default value is: NO.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
@@ -2228,7 +2385,8 @@ CALL_GRAPH             = NO
 #
 # Note that enabling this option will significantly increase the time of a run.
 # So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command.
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
 # The default value is: NO.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
@@ -2251,13 +2409,17 @@ GRAPHICAL_HIERARCHY    = YES
 DIRECTORY_GRAPH        = YES
 
 # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot.
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
 # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
 # to make the SVG files visible in IE 9+ (other browsers do not have this
 # requirement).
 # Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
 # png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
-# gif:cairo:gd, gif:gd, gif:gd:gd and svg.
+# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
 # The default value is: png.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
@@ -2305,10 +2467,19 @@ DIAFILE_DIRS           =
 # PlantUML is not used or called during a preprocessing step. Doxygen will
 # generate a warning when it encounters a \startuml command in this case and
 # will not generate output for the diagram.
-# This tag requires that the tag HAVE_DOT is set to YES.
 
 PLANTUML_JAR_PATH      =
 
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
+# configuration file for plantuml.
+
+PLANTUML_CFG_FILE      =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH  =
+
 # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
 # that will be shown in the graph. If the number of nodes in a graph becomes
 # larger than this value, doxygen will truncate the graph, which is visualized
@@ -2345,7 +2516,7 @@ MAX_DOT_GRAPH_DEPTH    = 0
 
 DOT_TRANSPARENT        = NO
 
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
 # files in one run (i.e. multiple -o and -T options on the command line). This
 # makes dot run faster, but since only newer versions of dot (>1.8.10) support
 # this, this feature is disabled by default.
@@ -2362,7 +2533,7 @@ DOT_MULTI_TARGETS      = NO
 
 GENERATE_LEGEND        = YES
 
-# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
 # files that are used to generate the various graphs.
 # The default value is: YES.
 # This tag requires that the tag HAVE_DOT is set to YES.
index d1c69c00f0b6369164aa045d7043d28074f07240..b1136a1a994bc5b5014d25e3442e6a8b5af9c812 100644 (file)
@@ -1,4 +1,4 @@
-# Doxyfile 1.8.8
+# Doxyfile 1.8.17
 
 # This file describes the settings to be used by the documentation system
 # doxygen (www.doxygen.org) for a project.
 # Project related configuration options
 #---------------------------------------------------------------------------
 
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all text
-# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
-# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
-# for the list of possible encodings.
+# This tag specifies the encoding used for all characters in the configuration
+# file that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
 # The default value is: UTF-8.
 
 DOXYFILE_ENCODING      = ISO-8859-1
@@ -46,10 +46,10 @@ PROJECT_NUMBER         = "@DCMTK_VERSION@"
 
 PROJECT_BRIEF          =
 
-# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
-# the documentation. The maximum height of the logo should not exceed 55 pixels
-# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
-# to the output directory.
+# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
+# in the documentation. The maximum height of the logo should not exceed 55
+# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
+# the logo to the output directory.
 
 PROJECT_LOGO           =
 
@@ -60,7 +60,7 @@ PROJECT_LOGO           =
 
 OUTPUT_DIRECTORY       =
 
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
 # directories (in 2 levels) under the output directory of each output format and
 # will distribute the generated files over these directories. Enabling this
 # option can be useful when feeding doxygen a huge amount of source files, where
@@ -93,14 +93,22 @@ ALLOW_UNICODE_NAMES    = NO
 
 OUTPUT_LANGUAGE        = English
 
-# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all generated output in the proper direction.
+# Possible values are: None, LTR, RTL and Context.
+# The default value is: None.
+
+OUTPUT_TEXT_DIRECTION  = None
+
+# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
 # descriptions after the members that are listed in the file and class
 # documentation (similar to Javadoc). Set to NO to disable this.
 # The default value is: YES.
 
 BRIEF_MEMBER_DESC      = YES
 
-# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
 # description of a member or function before the detailed description
 #
 # Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
@@ -135,7 +143,7 @@ ALWAYS_DETAILED_SEC    = NO
 
 INLINE_INHERITED_MEMB  = NO
 
-# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
 # before files name in the file list and in the header files. If set to NO the
 # shortest path that makes the file name unique will be used
 # The default value is: YES.
@@ -179,6 +187,16 @@ SHORT_NAMES            = NO
 
 JAVADOC_AUTOBRIEF      = YES
 
+# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
+# such as
+# /***************
+# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
+# Javadoc-style will behave just like regular comments and it will not be
+# interpreted by doxygen.
+# The default value is: NO.
+
+JAVADOC_BANNER         = NO
+
 # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
 # line (until the first dot) of a Qt-style comment as the brief description. If
 # set to NO, the Qt-style will behave just like regular Qt-style comments (thus
@@ -205,9 +223,9 @@ MULTILINE_CPP_IS_BRIEF = NO
 
 INHERIT_DOCS           = NO
 
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
-# new page for each member. If set to NO, the documentation of a member will be
-# part of the file/class/namespace that contains it.
+# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
+# page for each member. If set to NO, the documentation of a member will be part
+# of the file/class/namespace that contains it.
 # The default value is: NO.
 
 SEPARATE_MEMBER_PAGES  = NO
@@ -226,7 +244,12 @@ TAB_SIZE               = 4
 # will allow you to put the command \sideeffect (or @sideeffect) in the
 # documentation, which will result in a user-defined paragraph with heading
 # "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines.
+# newlines (in the resulting output). You can put ^^ in the value part of an
+# alias to insert a newline as if a physical newline was in the original file.
+# When you need a literal { or } or , in the value part of an alias you have to
+# escape them by means of a backslash (\), this can lead to conflicts with the
+# commands \{ and \} for these it is advised to use the version @{ and @} or use
+# a double escape (\\{ and \\})
 
 ALIASES                =
 
@@ -264,19 +287,28 @@ OPTIMIZE_FOR_FORTRAN   = NO
 
 OPTIMIZE_OUTPUT_VHDL   = NO
 
+# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
+# sources only. Doxygen will then generate output that is more tailored for that
+# language. For instance, namespaces will be presented as modules, types will be
+# separated into more groups, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_SLICE  = NO
+
 # Doxygen selects the parser to use depending on the extension of the files it
 # parses. With this tag you can assign which parser to use for a given
 # extension. Doxygen has a built-in mapping, but you can override or extend it
 # using this tag. The format is ext=language, where ext is a file extension, and
-# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
-# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
-# Fortran. In the later case the parser tries to guess whether the code is fixed
-# or free formatted code, this is the default for Fortran type files), VHDL. For
-# instance to make doxygen treat .inc files as Fortran files (default is PHP),
-# and .f files as C (default is Fortran), use: inc=Fortran f=C.
+# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
+# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice,
+# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
+# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
+# tries to guess whether the code is fixed or free formatted code, this is the
+# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat
+# .inc files as Fortran files (default is PHP), and .f files as C (default is
+# Fortran), use: inc=Fortran f=C.
 #
-# Note For files without extension you can use no_extension as a placeholder.
+# Note: For files without extension you can use no_extension as a placeholder.
 #
 # Note that for custom extensions you also need to set FILE_PATTERNS otherwise
 # the files are not read by doxygen.
@@ -285,7 +317,7 @@ EXTENSION_MAPPING      = man=C
 
 # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
 # according to the Markdown format, which allows for more readable
-# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# documentation. See https://daringfireball.net/projects/markdown/ for details.
 # The output of markdown processing is further processed by doxygen, so you can
 # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
 # case of backward compatibilities issues.
@@ -293,10 +325,19 @@ EXTENSION_MAPPING      = man=C
 
 MARKDOWN_SUPPORT       = YES
 
+# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
+# to that level are automatically included in the table of contents, even if
+# they do not have an id attribute.
+# Note: This feature currently applies only to Markdown headings.
+# Minimum value: 0, maximum value: 99, default value: 5.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+TOC_INCLUDE_HEADINGS   = 5
+
 # When enabled doxygen tries to link words that correspond to documented
 # classes, or namespaces to their corresponding documentation. Such a link can
-# be prevented in individual cases by by putting a % sign in front of the word
-# or globally by setting AUTOLINK_SUPPORT to NO.
+# be prevented in individual cases by putting a % sign in front of the word or
+# globally by setting AUTOLINK_SUPPORT to NO.
 # The default value is: YES.
 
 AUTOLINK_SUPPORT       = YES
@@ -318,7 +359,7 @@ BUILTIN_STL_SUPPORT    = NO
 CPP_CLI_SUPPORT        = NO
 
 # Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
 # will parse them like normal C++ but will assume all classes use public instead
 # of private inheritance when no explicit protection keyword is present.
 # The default value is: NO.
@@ -336,13 +377,20 @@ SIP_SUPPORT            = NO
 IDL_PROPERTY_SUPPORT   = YES
 
 # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
+# tag is set to YES then doxygen will reuse the documentation of the first
 # member in the group (if any) for the other members of the group. By default
 # all members of a group must be documented explicitly.
 # The default value is: NO.
 
 DISTRIBUTE_GROUP_DOC   = NO
 
+# If one adds a struct or class to a group and this option is enabled, then also
+# any nested class or struct is added to the same group. By default this option
+# is disabled and one has to add nested compounds explicitly via \ingroup.
+# The default value is: NO.
+
+GROUP_NESTED_COMPOUNDS = NO
+
 # Set the SUBGROUPING tag to YES to allow class member groups of the same type
 # (for instance a group of public functions) to be put as a subgroup of that
 # type (e.g. under the Public Functions section). Set it to NO to prevent
@@ -401,7 +449,7 @@ LOOKUP_CACHE_SIZE      = 0
 # Build related configuration options
 #---------------------------------------------------------------------------
 
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
 # documentation are documented, even if no documentation was available. Private
 # class members and static file members will be hidden unless the
 # EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
@@ -411,35 +459,41 @@ LOOKUP_CACHE_SIZE      = 0
 
 EXTRACT_ALL            = YES
 
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
 # be included in the documentation.
 # The default value is: NO.
 
 EXTRACT_PRIVATE        = YES
 
-# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
+# methods of a class will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIV_VIRTUAL   = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
 # scope will be included in the documentation.
 # The default value is: NO.
 
 EXTRACT_PACKAGE        = NO
 
-# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
 # included in the documentation.
 # The default value is: NO.
 
 EXTRACT_STATIC         = YES
 
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
-# locally in source files will be included in the documentation. If set to NO
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO,
 # only classes defined in header files are included. Does not have any effect
 # for Java sources.
 # The default value is: YES.
 
 EXTRACT_LOCAL_CLASSES  = YES
 
-# This flag is only useful for Objective-C code. When set to YES local methods,
+# This flag is only useful for Objective-C code. If set to YES, local methods,
 # which are defined in the implementation section but not in the interface are
-# included in the documentation. If set to NO only methods in the interface are
+# included in the documentation. If set to NO, only methods in the interface are
 # included.
 # The default value is: NO.
 
@@ -464,21 +518,21 @@ HIDE_UNDOC_MEMBERS     = NO
 
 # If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
 # undocumented classes that are normally visible in the class hierarchy. If set
-# to NO these classes will be included in the various overviews. This option has
-# no effect if EXTRACT_ALL is enabled.
+# to NO, these classes will be included in the various overviews. This option
+# has no effect if EXTRACT_ALL is enabled.
 # The default value is: NO.
 
 HIDE_UNDOC_CLASSES     = NO
 
 # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
-# (class|struct|union) declarations. If set to NO these declarations will be
-# included in the documentation.
+# declarations. If set to NO, these declarations will be included in the
+# documentation.
 # The default value is: NO.
 
 HIDE_FRIEND_COMPOUNDS  = NO
 
 # If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
-# documentation blocks found inside the body of a function. If set to NO these
+# documentation blocks found inside the body of a function. If set to NO, these
 # blocks will be appended to the function's detailed documentation block.
 # The default value is: NO.
 
@@ -492,21 +546,28 @@ HIDE_IN_BODY_DOCS      = NO
 INTERNAL_DOCS          = NO
 
 # If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
-# names in lower-case letters. If set to YES upper-case letters are also
+# names in lower-case letters. If set to YES, upper-case letters are also
 # allowed. This is useful if you have classes or files whose names only differ
 # in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
+# (including Cygwin) ands Mac users are advised to set this option to NO.
 # The default value is: system dependent.
 
 CASE_SENSE_NAMES       = YES
 
 # If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
-# their full class and namespace scopes in the documentation. If set to YES the
+# their full class and namespace scopes in the documentation. If set to YES, the
 # scope will be hidden.
 # The default value is: NO.
 
 HIDE_SCOPE_NAMES       = NO
 
+# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
+# append additional text to a page's title, such as Class Reference. If set to
+# YES the compound reference will be hidden.
+# The default value is: NO.
+
+HIDE_COMPOUND_REFERENCE= NO
+
 # If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
 # the files that are included by a file in the documentation of that file.
 # The default value is: YES.
@@ -534,14 +595,14 @@ INLINE_INFO            = YES
 
 # If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
 # (detailed) documentation of file and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order.
+# name. If set to NO, the members will appear in declaration order.
 # The default value is: YES.
 
 SORT_MEMBER_DOCS       = YES
 
 # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
 # descriptions of file, namespace and class members alphabetically by member
-# name. If set to NO the members will appear in declaration order. Note that
+# name. If set to NO, the members will appear in declaration order. Note that
 # this will also influence the order of the classes in the class list.
 # The default value is: NO.
 
@@ -586,27 +647,25 @@ SORT_BY_SCOPE_NAME     = NO
 
 STRICT_PROTO_MATCHING  = NO
 
-# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
-# todo list. This list is created by putting \todo commands in the
-# documentation.
+# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
+# list. This list is created by putting \todo commands in the documentation.
 # The default value is: YES.
 
 GENERATE_TODOLIST      = NO
 
-# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
-# test list. This list is created by putting \test commands in the
-# documentation.
+# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
+# list. This list is created by putting \test commands in the documentation.
 # The default value is: YES.
 
 GENERATE_TESTLIST      = NO
 
-# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug
 # list. This list is created by putting \bug commands in the documentation.
 # The default value is: YES.
 
 GENERATE_BUGLIST       = NO
 
-# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO)
 # the deprecated list. This list is created by putting \deprecated commands in
 # the documentation.
 # The default value is: YES.
@@ -631,8 +690,8 @@ ENABLED_SECTIONS       = MANPAGES
 MAX_INITIALIZER_LINES  = 30
 
 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
-# the bottom of the documentation of classes and structs. If set to YES the list
-# will mention the files that were used to generate the documentation.
+# the bottom of the documentation of classes and structs. If set to YES, the
+# list will mention the files that were used to generate the documentation.
 # The default value is: YES.
 
 SHOW_USED_FILES        = YES
@@ -677,7 +736,7 @@ LAYOUT_FILE            =
 # The CITE_BIB_FILES tag can be used to specify one or more bib files containing
 # the reference definitions. This must be a list of .bib files. The .bib
 # extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
 # For LaTeX the style of the bibliography can be controlled using
 # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
 # search path. See also \cite for info how to create references.
@@ -696,7 +755,7 @@ CITE_BIB_FILES         =
 QUIET                  = NO
 
 # The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES
 # this implies that the warnings are on.
 #
 # Tip: Turn warnings on while writing the documentation.
@@ -704,7 +763,7 @@ QUIET                  = NO
 
 WARNINGS               = YES
 
-# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
 # warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
 # will automatically be disabled.
 # The default value is: YES.
@@ -721,12 +780,19 @@ WARN_IF_DOC_ERROR      = YES
 
 # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
 # are documented, but have no documentation for their parameters or return
-# value. If set to NO doxygen will only warn about wrong or incomplete parameter
-# documentation, but not about the absence of documentation.
+# value. If set to NO, doxygen will only warn about wrong or incomplete
+# parameter documentation, but not about the absence of documentation. If
+# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
 # The default value is: NO.
 
 WARN_NO_PARAMDOC       = NO
 
+# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
+# a warning is encountered.
+# The default value is: NO.
+
+WARN_AS_ERROR          = NO
+
 # The WARN_FORMAT tag determines the format of the warning messages that doxygen
 # can produce. The string should contain the $file, $line, and $text tags, which
 # will be replaced by the file and line number from which the warning originated
@@ -750,7 +816,7 @@ WARN_LOGFILE           = manpages.log
 # The INPUT tag is used to specify the files and/or directories that contain
 # documented source files. You may enter file names like myfile.cpp or
 # directories like /usr/src/myproject. Separate the files or directories with
-# spaces.
+# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
 # Note: If this tag is empty the current directory is searched.
 
 INPUT                  = "@DOXYGEN_INPUT_DIR@"
@@ -758,7 +824,7 @@ INPUT                  = "@DOXYGEN_INPUT_DIR@"
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
 # libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# documentation (see: https://www.gnu.org/software/libiconv/) for the list of
 # possible encodings.
 # The default value is: UTF-8.
 
@@ -766,12 +832,19 @@ INPUT_ENCODING         = ISO-8859-1
 
 # If the value of the INPUT tag contains directories, you can use the
 # FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
-# *.h) to filter out the source-files in the directories. If left blank the
-# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
-# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
-# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
-# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
-# *.qsf, *.as and *.js.
+# *.h) to filter out the source-files in the directories.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# read by doxygen.
+#
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
+# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
+# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
+# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment),
+# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen
+# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd,
+# *.vhdl, *.ucf, *.qsf and *.ice.
 
 FILE_PATTERNS          = *.man
 
@@ -859,6 +932,10 @@ IMAGE_PATH             =
 # Note that the filter must not add or remove lines; it is applied before the
 # code is scanned, but not when the output code is generated. If lines are added
 # or removed, the anchors will not be placed correctly.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
 
 INPUT_FILTER           =
 
@@ -868,11 +945,15 @@ INPUT_FILTER           =
 # (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
 # filters are used. If the FILTER_PATTERNS tag is empty or if none of the
 # patterns match the file name, INPUT_FILTER is applied.
+#
+# Note that for custom extensions or not directly supported extensions you also
+# need to set EXTENSION_MAPPING for the extension otherwise the files are not
+# properly processed by doxygen.
 
 FILTER_PATTERNS        =
 
 # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER ) will also be used to filter the input files that are used for
+# INPUT_FILTER) will also be used to filter the input files that are used for
 # producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
 # The default value is: NO.
 
@@ -920,7 +1001,7 @@ INLINE_SOURCES         = NO
 STRIP_CODE_COMMENTS    = YES
 
 # If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# function all documented functions referencing it will be listed.
+# entity all documented functions referencing it will be listed.
 # The default value is: NO.
 
 REFERENCED_BY_RELATION = YES
@@ -932,7 +1013,7 @@ REFERENCED_BY_RELATION = YES
 REFERENCES_RELATION    = YES
 
 # If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
-# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# to YES then the hyperlinks from functions in REFERENCES_RELATION and
 # REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
 # link to the documentation.
 # The default value is: YES.
@@ -952,12 +1033,12 @@ SOURCE_TOOLTIPS        = YES
 # If the USE_HTAGS tag is set to YES then the references to source code will
 # point to the HTML generated by the htags(1) tool instead of doxygen built-in
 # source browser. The htags tool is part of GNU's global source tagging system
-# (see http://www.gnu.org/software/global/global.html). You will need version
+# (see https://www.gnu.org/software/global/global.html). You will need version
 # 4.8.6 or higher.
 #
 # To use it do the following:
 # - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
 # - Make sure the INPUT points to the root of the source tree
 # - Run doxygen as normal
 #
@@ -979,13 +1060,13 @@ USE_HTAGS              = NO
 
 VERBATIM_HEADERS       = YES
 
-# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
+# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
 # clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
 # cost of reduced performance. This can be particularly helpful with template
 # rich C++ code for which doxygen's built-in parser lacks the necessary type
 # information.
 # Note: The availability of this option depends on whether or not doxygen was
-# compiled with the --with-libclang option.
+# generated with the -Duse_libclang=ON option for CMake.
 # The default value is: NO.
 
 CLANG_ASSISTED_PARSING = NO
@@ -998,6 +1079,16 @@ CLANG_ASSISTED_PARSING = NO
 
 CLANG_OPTIONS          =
 
+# If clang assisted parsing is enabled you can provide the clang parser with the
+# path to the compilation database (see:
+# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files
+# were built. This is equivalent to specifying the "-p" option to a clang tool,
+# such as clang-check. These options will then be passed to the parser.
+# Note: The availability of this option depends on whether or not doxygen was
+# generated with the -Duse_libclang=ON option for CMake.
+
+CLANG_DATABASE_PATH    =
+
 #---------------------------------------------------------------------------
 # Configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
@@ -1028,7 +1119,7 @@ IGNORE_PREFIX          =
 # Configuration options related to the HTML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
 # The default value is: YES.
 
 GENERATE_HTML          = NO
@@ -1094,10 +1185,10 @@ HTML_STYLESHEET        =
 # cascading style sheets that are included after the standard style sheets
 # created by doxygen. Using this option one can overrule certain style aspects.
 # This is preferred over using HTML_STYLESHEET since it does not replace the
-# standard style sheet and is therefor more robust against future updates.
+# standard style sheet and is therefore more robust against future updates.
 # Doxygen will copy the style sheet files to the output directory.
-# Note: The order of the extra stylesheet files is of importance (e.g. the last
-# stylesheet in the list overrules the setting of the previous ones in the
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
 # list). For an example see the documentation.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
@@ -1114,9 +1205,9 @@ HTML_EXTRA_STYLESHEET  =
 HTML_EXTRA_FILES       =
 
 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
-# will adjust the colors in the stylesheet and background images according to
+# will adjust the colors in the style sheet and background images according to
 # this color. Hue is specified as an angle on a colorwheel, see
-# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
 # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
 # purple, and 360 is red again.
 # Minimum value: 0, maximum value: 359, default value: 220.
@@ -1145,12 +1236,24 @@ HTML_COLORSTYLE_GAMMA  = 80
 
 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
 # page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: YES.
+# to YES can help to show when doxygen was last run and thus if the
+# documentation is up to date.
+# The default value is: NO.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
 HTML_TIMESTAMP         = YES
 
+# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
+# documentation will contain a main index with vertical navigation menus that
+# are dynamically created via JavaScript. If disabled, the navigation index will
+# consists of multiple levels of tabs that are statically embedded in every HTML
+# page. Disable this option to support browsers that do not have JavaScript,
+# like the Qt help browser.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_MENUS     = YES
+
 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
 # documentation will contain sections that can be hidden and shown after the
 # page has loaded.
@@ -1174,13 +1277,13 @@ HTML_INDEX_NUM_ENTRIES = 100
 
 # If the GENERATE_DOCSET tag is set to YES, additional index files will be
 # generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: http://developer.apple.com/tools/xcode/), introduced with
-# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# environment (see: https://developer.apple.com/xcode/), introduced with OSX
+# 10.5 (Leopard). To create a documentation set, doxygen will generate a
 # Makefile in the HTML output directory. Running make will produce the docset in
 # that directory and running make install will install the docset in
 # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
-# for more information.
+# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
+# genXcode/_index.html for more information.
 # The default value is: NO.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
@@ -1219,7 +1322,7 @@ DOCSET_PUBLISHER_NAME  = "OFFIS DICOM Team"
 # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
 # additional HTML index files: index.hhp, index.hhc, and index.hhk. The
 # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on
 # Windows.
 #
 # The HTML Help Workshop contains a compiler that can convert all HTML output
@@ -1242,28 +1345,28 @@ GENERATE_HTMLHELP      = NO
 CHM_FILE               =
 
 # The HHC_LOCATION tag can be used to specify the location (absolute path
-# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# including file name) of the HTML help compiler (hhc.exe). If non-empty,
 # doxygen will try to run the HTML help compiler on the generated index.hhp.
 # The file has to be specified with full path.
 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
 
 HHC_LOCATION           =
 
-# The GENERATE_CHI flag controls if a separate .chi index file is generated (
-# YES) or that it should be included in the master .chm file ( NO).
+# The GENERATE_CHI flag controls if a separate .chi index file is generated
+# (YES) or that it should be included in the master .chm file (NO).
 # The default value is: NO.
 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
 
 GENERATE_CHI           = NO
 
-# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc)
 # and project file content.
 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
 
 CHM_INDEX_ENCODING     =
 
-# The BINARY_TOC flag controls whether a binary table of contents is generated (
-# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it
+# The BINARY_TOC flag controls whether a binary table of contents is generated
+# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
 # enables the Previous and Next buttons.
 # The default value is: NO.
 # This tag requires that the tag GENERATE_HTMLHELP is set to YES.
@@ -1295,7 +1398,7 @@ QCH_FILE               =
 
 # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
 # Project output. For more information please see Qt Help Project / Namespace
-# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
 # The default value is: org.doxygen.Project.
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
@@ -1303,7 +1406,7 @@ QHP_NAMESPACE          = org.dcmtk
 
 # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
 # Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-
 # folders).
 # The default value is: doc.
 # This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1312,7 +1415,7 @@ QHP_VIRTUAL_FOLDER     = doc
 
 # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
 # filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
 # filters).
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
@@ -1320,7 +1423,7 @@ QHP_CUST_FILTER_NAME   =
 
 # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
 # custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
 # filters).
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
@@ -1328,7 +1431,7 @@ QHP_CUST_FILTER_ATTRS  =
 
 # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
 # project's filter section matches. Qt Help Project / Filter Attributes (see:
-# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
 QHP_SECT_FILTER_ATTRS  =
@@ -1377,7 +1480,7 @@ DISABLE_INDEX          = NO
 # index structure (just like the one that is generated for HTML Help). For this
 # to work a browser that supports JavaScript, DHTML, CSS and frames is required
 # (i.e. any modern browser). Windows users are probably better off using the
-# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can
 # further fine-tune the look of the index. As an example, the default style
 # sheet generated by doxygen has an example that shows how to put an image at
 # the root of the tree instead of the PROJECT_NAME. Since the tree basically has
@@ -1405,7 +1508,7 @@ ENUM_VALUES_PER_LINE   = 4
 
 TREEVIEW_WIDTH         = 250
 
-# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
 # external symbols imported via tag files in a separate window.
 # The default value is: NO.
 # This tag requires that the tag GENERATE_HTML is set to YES.
@@ -1421,7 +1524,7 @@ EXT_LINKS_IN_WINDOW    = NO
 
 FORMULA_FONTSIZE       = 10
 
-# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
 # generated for formulas are transparent PNGs. Transparent PNGs are not
 # supported properly for IE 6.0, but are supported on all modern browsers.
 #
@@ -1432,9 +1535,15 @@ FORMULA_FONTSIZE       = 10
 
 FORMULA_TRANSPARENT    = YES
 
+# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
+# to create new LaTeX commands to be used in formulas as building blocks. See
+# the section "Including formulas" for details.
+
+FORMULA_MACROFILE      =
+
 # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# http://www.mathjax.org) which uses client side Javascript for the rendering
-# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# https://www.mathjax.org) which uses client side JavaScript for the rendering
+# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
 # installed or if you want to formulas look prettier in the HTML output. When
 # enabled you may also need to install MathJax separately and configure the path
 # to it using the MATHJAX_RELPATH option.
@@ -1460,8 +1569,8 @@ MATHJAX_FORMAT         = HTML-CSS
 # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
 # Content Delivery Network so you can quickly see the result without installing
 # MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from http://www.mathjax.org before deployment.
-# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# MathJax from https://www.mathjax.org before deployment.
+# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/.
 # This tag requires that the tag USE_MATHJAX is set to YES.
 
 MATHJAX_RELPATH        = http://www.mathjax.org/mathjax
@@ -1503,7 +1612,7 @@ MATHJAX_CODEFILE       =
 SEARCHENGINE           = NO
 
 # When the SERVER_BASED_SEARCH tag is enabled the search engine will be
-# implemented using a web server instead of a web client using Javascript. There
+# implemented using a web server instead of a web client using JavaScript. There
 # are two flavors of web server based searching depending on the EXTERNAL_SEARCH
 # setting. When disabled, doxygen will generate a PHP script for searching and
 # an index file used by the script. When EXTERNAL_SEARCH is enabled the indexing
@@ -1520,9 +1629,9 @@ SERVER_BASED_SEARCH    = NO
 # external search engine pointed to by the SEARCHENGINE_URL option to obtain the
 # search results.
 #
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# Doxygen ships with an example indexer (doxyindexer) and search engine
 # (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/).
+# Xapian (see: https://xapian.org/).
 #
 # See the section "External Indexing and Searching" for details.
 # The default value is: NO.
@@ -1533,9 +1642,9 @@ EXTERNAL_SEARCH        = NO
 # The SEARCHENGINE_URL should point to a search engine hosted by a web server
 # which will return the search results when EXTERNAL_SEARCH is enabled.
 #
-# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# Doxygen ships with an example indexer (doxyindexer) and search engine
 # (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Xapian (see: https://xapian.org/). See the section "External Indexing and
 # Searching" for details.
 # This tag requires that the tag SEARCHENGINE is set to YES.
 
@@ -1571,7 +1680,7 @@ EXTRA_SEARCH_MAPPINGS  =
 # Configuration options related to the LaTeX output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
 # The default value is: YES.
 
 GENERATE_LATEX         = NO
@@ -1587,22 +1696,36 @@ LATEX_OUTPUT           = latex
 # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
 # invoked.
 #
-# Note that when enabling USE_PDFLATEX this option is only used for generating
-# bitmaps for formulas in the HTML output, but not in the Makefile that is
-# written to the output directory.
-# The default file is: latex.
+# Note that when not enabling USE_PDFLATEX the default is latex when enabling
+# USE_PDFLATEX the default is pdflatex and when in the later case latex is
+# chosen this is overwritten by pdflatex. For specific output languages the
+# default can have been set differently, this depends on the implementation of
+# the output language.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
 LATEX_CMD_NAME         = latex
 
 # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
 # index for LaTeX.
+# Note: This tag is used in the Makefile / make.bat.
+# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
+# (.tex).
 # The default file is: makeindex.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
 MAKEINDEX_CMD_NAME     = makeindex
 
-# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
+# generate index for LaTeX. In case there is no backslash (\) as first character
+# it will be automatically added in the LaTeX code.
+# Note: This tag is used in the generated output file (.tex).
+# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
+# The default value is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_MAKEINDEX_CMD    = makeindex
+
+# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
 # documents. This may be useful for small projects and may help to save some
 # trees in general.
 # The default value is: NO.
@@ -1620,9 +1743,12 @@ COMPACT_LATEX          = NO
 PAPER_TYPE             = a4wide
 
 # The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
-# that should be included in the LaTeX output. To get the times font for
-# instance you can specify
-# EXTRA_PACKAGES=times
+# that should be included in the LaTeX output. The package can be specified just
+# by its name or with the correct syntax as to be used with the LaTeX
+# \usepackage command. To get the times font for instance you can specify :
+# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
+# To use the option intlimits with the amsmath package you can specify:
+# EXTRA_PACKAGES=[intlimits]{amsmath}
 # If left blank no extra packages will be included.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
@@ -1637,9 +1763,9 @@ EXTRA_PACKAGES         =
 # Note: Only use a user-defined header if you know what you are doing! The
 # following commands have a special meaning inside the header: $title,
 # $datetime, $date, $doxygenversion, $projectname, $projectnumber,
-# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string,
-# for the replacement values of the other commands the user is refered to
-# HTML_HEADER.
+# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
+# string, for the replacement values of the other commands the user is referred
+# to HTML_HEADER.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
 LATEX_HEADER           =
@@ -1655,6 +1781,17 @@ LATEX_HEADER           =
 
 LATEX_FOOTER           =
 
+# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
+# LaTeX style sheets that are included after the standard style sheets created
+# by doxygen. Using this option one can overrule certain style aspects. Doxygen
+# will copy the style sheet files to the output directory.
+# Note: The order of the extra style sheet files is of importance (e.g. the last
+# style sheet in the list overrules the setting of the previous ones in the
+# list).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_STYLESHEET =
+
 # The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
 # other source files which should be copied to the LATEX_OUTPUT output
 # directory. Note that the files will be copied as-is; there are no commands or
@@ -1673,7 +1810,7 @@ LATEX_EXTRA_FILES      =
 PDF_HYPERLINKS         = NO
 
 # If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
-# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# the PDF file directly from the LaTeX files. Set this option to YES, to get a
 # higher quality PDF documentation.
 # The default value is: YES.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
@@ -1708,17 +1845,33 @@ LATEX_SOURCE_CODE      = NO
 
 # The LATEX_BIB_STYLE tag can be used to specify the style to use for the
 # bibliography, e.g. plainnat, or ieeetr. See
-# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
 # The default value is: plain.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
 LATEX_BIB_STYLE        = plain
 
+# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_TIMESTAMP        = NO
+
+# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
+# path from which the emoji images will be read. If a relative path is entered,
+# it will be relative to the LATEX_OUTPUT directory. If left blank the
+# LATEX_OUTPUT directory will be used.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EMOJI_DIRECTORY  =
+
 #---------------------------------------------------------------------------
 # Configuration options related to the RTF output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
 # RTF output is optimized for Word 97 and may not look too pretty with other RTF
 # readers/editors.
 # The default value is: NO.
@@ -1733,7 +1886,7 @@ GENERATE_RTF           = NO
 
 RTF_OUTPUT             = rtf
 
-# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
 # documents. This may be useful for small projects and may help to save some
 # trees in general.
 # The default value is: NO.
@@ -1753,9 +1906,9 @@ COMPACT_RTF            = NO
 
 RTF_HYPERLINKS         = NO
 
-# Load stylesheet definitions from file. Syntax is similar to doxygen's config
-# file, i.e. a series of assignments. You only have to provide replacements,
-# missing definitions are set to their default value.
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# configuration file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
 #
 # See also section "Doxygen usage" for information on how to generate the
 # default style sheet that doxygen normally uses.
@@ -1764,17 +1917,27 @@ RTF_HYPERLINKS         = NO
 RTF_STYLESHEET_FILE    =
 
 # Set optional variables used in the generation of an RTF document. Syntax is
-# similar to doxygen's config file. A template extensions file can be generated
-# using doxygen -e rtf extensionFile.
+# similar to doxygen's configuration file. A template extensions file can be
+# generated using doxygen -e rtf extensionFile.
 # This tag requires that the tag GENERATE_RTF is set to YES.
 
 RTF_EXTENSIONS_FILE    =
 
+# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
+# with syntax highlighting in the RTF output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_SOURCE_CODE        = NO
+
 #---------------------------------------------------------------------------
 # Configuration options related to the man page output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
 # classes and files.
 # The default value is: NO.
 
@@ -1818,7 +1981,7 @@ MAN_LINKS              = NO
 # Configuration options related to the XML output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
 # captures the structure of the code including all documentation.
 # The default value is: NO.
 
@@ -1832,7 +1995,7 @@ GENERATE_XML           = NO
 
 XML_OUTPUT             = xml
 
-# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
 # listings (including syntax highlighting and cross-referencing information) to
 # the XML output. Note that enabling this will significantly increase the size
 # of the XML output.
@@ -1841,11 +2004,18 @@ XML_OUTPUT             = xml
 
 XML_PROGRAMLISTING     = YES
 
+# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
+# namespace members in file scope as well, matching the HTML output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_NS_MEMB_FILE_SCOPE = NO
+
 #---------------------------------------------------------------------------
 # Configuration options related to the DOCBOOK output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
 # that can be used to generate PDF.
 # The default value is: NO.
 
@@ -1859,7 +2029,7 @@ GENERATE_DOCBOOK       = NO
 
 DOCBOOK_OUTPUT         = docbook
 
-# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the
+# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
 # program listings (including syntax highlighting and cross-referencing
 # information) to the DOCBOOK output. Note that enabling this will significantly
 # increase the size of the DOCBOOK output.
@@ -1872,10 +2042,10 @@ DOCBOOK_PROGRAMLISTING = NO
 # Configuration options for the AutoGen Definitions output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
-# Definitions (see http://autogen.sf.net) file that captures the structure of
-# the code including all documentation. Note that this feature is still
-# experimental and incomplete at the moment.
+# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
+# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
+# the structure of the code including all documentation. Note that this feature
+# is still experimental and incomplete at the moment.
 # The default value is: NO.
 
 GENERATE_AUTOGEN_DEF   = NO
@@ -1884,7 +2054,7 @@ GENERATE_AUTOGEN_DEF   = NO
 # Configuration options related to the Perl module output
 #---------------------------------------------------------------------------
 
-# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
 # file that captures the structure of the code including all documentation.
 #
 # Note that this feature is still experimental and incomplete at the moment.
@@ -1892,7 +2062,7 @@ GENERATE_AUTOGEN_DEF   = NO
 
 GENERATE_PERLMOD       = NO
 
-# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
 # Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
 # output from the Perl module output.
 # The default value is: NO.
@@ -1900,9 +2070,9 @@ GENERATE_PERLMOD       = NO
 
 PERLMOD_LATEX          = NO
 
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
 # formatted so it can be parsed by a human reader. This is useful if you want to
-# understand what is going on. On the other hand, if this tag is set to NO the
+# understand what is going on. On the other hand, if this tag is set to NO, the
 # size of the Perl module output will be much smaller and Perl will parse it
 # just the same.
 # The default value is: YES.
@@ -1922,14 +2092,14 @@ PERLMOD_MAKEVAR_PREFIX =
 # Configuration options related to the preprocessor
 #---------------------------------------------------------------------------
 
-# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
 # C-preprocessor directives found in the sources and include files.
 # The default value is: YES.
 
 ENABLE_PREPROCESSING   = YES
 
-# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
-# in the source code. If set to NO only conditional compilation will be
+# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
+# in the source code. If set to NO, only conditional compilation will be
 # performed. Macro expansion can be done in a controlled way by setting
 # EXPAND_ONLY_PREDEF to YES.
 # The default value is: NO.
@@ -1945,7 +2115,7 @@ MACRO_EXPANSION        = NO
 
 EXPAND_ONLY_PREDEF     = NO
 
-# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# If the SEARCH_INCLUDES tag is set to YES, the include files in the
 # INCLUDE_PATH will be searched if a #include is found.
 # The default value is: YES.
 # This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
@@ -2021,37 +2191,32 @@ TAGFILES               =
 
 GENERATE_TAGFILE       =
 
-# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
-# class index. If set to NO only the inherited external classes will be listed.
+# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
+# the class index. If set to NO, only the inherited external classes will be
+# listed.
 # The default value is: NO.
 
 ALLEXTERNALS           = NO
 
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
-# the modules index. If set to NO, only the current project's groups will be
+# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will be
 # listed.
 # The default value is: YES.
 
 EXTERNAL_GROUPS        = YES
 
-# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
 # the related pages index. If set to NO, only the current project's pages will
 # be listed.
 # The default value is: YES.
 
 EXTERNAL_PAGES         = YES
 
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of 'which perl').
-# The default file (with absolute path) is: /usr/bin/perl.
-
-PERL_PATH              = /usr/bin/perl
-
 #---------------------------------------------------------------------------
 # Configuration options related to the dot tool
 #---------------------------------------------------------------------------
 
-# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
 # (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
 # NO turns the diagrams off. Note that this option also works with HAVE_DOT
 # disabled, but it is recommended to install and use dot, since it yields more
@@ -2060,15 +2225,6 @@ PERL_PATH              = /usr/bin/perl
 
 CLASS_DIAGRAMS         = YES
 
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see:
-# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH            =
-
 # You can include diagrams made with dia in doxygen documentation. Doxygen will
 # then run dia to produce the diagram and insert it in the documentation. The
 # DIA_PATH tag allows you to specify the directory where the dia binary resides.
@@ -2076,7 +2232,7 @@ MSCGEN_PATH            =
 
 DIA_PATH               =
 
-# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# If set to YES the inheritance and collaboration graphs will hide inheritance
 # and usage relations if the target is undocumented or is not a class.
 # The default value is: YES.
 
@@ -2149,7 +2305,7 @@ COLLABORATION_GRAPH    = YES
 
 GROUP_GRAPHS           = YES
 
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
 # collaboration diagrams in a style similar to the OMG's Unified Modeling
 # Language.
 # The default value is: NO.
@@ -2201,7 +2357,8 @@ INCLUDED_BY_GRAPH      = YES
 #
 # Note that enabling this option will significantly increase the time of a run.
 # So in most cases it will be better to enable call graphs for selected
-# functions only using the \callgraph command.
+# functions only using the \callgraph command. Disabling a call graph can be
+# accomplished by means of the command \hidecallgraph.
 # The default value is: NO.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
@@ -2212,7 +2369,8 @@ CALL_GRAPH             = NO
 #
 # Note that enabling this option will significantly increase the time of a run.
 # So in most cases it will be better to enable caller graphs for selected
-# functions only using the \callergraph command.
+# functions only using the \callergraph command. Disabling a caller graph can be
+# accomplished by means of the command \hidecallergraph.
 # The default value is: NO.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
@@ -2235,13 +2393,17 @@ GRAPHICAL_HIERARCHY    = YES
 DIRECTORY_GRAPH        = YES
 
 # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot.
+# generated by dot. For an explanation of the image formats see the section
+# output formats in the documentation of the dot tool (Graphviz (see:
+# http://www.graphviz.org/)).
 # Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
 # to make the SVG files visible in IE 9+ (other browsers do not have this
 # requirement).
 # Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
 # png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
-# gif:cairo:gd, gif:gd, gif:gd:gd and svg.
+# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
+# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
+# png:gdiplus:gdiplus.
 # The default value is: png.
 # This tag requires that the tag HAVE_DOT is set to YES.
 
@@ -2289,10 +2451,19 @@ DIAFILE_DIRS           =
 # PlantUML is not used or called during a preprocessing step. Doxygen will
 # generate a warning when it encounters a \startuml command in this case and
 # will not generate output for the diagram.
-# This tag requires that the tag HAVE_DOT is set to YES.
 
 PLANTUML_JAR_PATH      =
 
+# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
+# configuration file for plantuml.
+
+PLANTUML_CFG_FILE      =
+
+# When using plantuml, the specified paths are searched for files specified by
+# the !include statement in a plantuml block.
+
+PLANTUML_INCLUDE_PATH  =
+
 # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
 # that will be shown in the graph. If the number of nodes in a graph becomes
 # larger than this value, doxygen will truncate the graph, which is visualized
@@ -2329,7 +2500,7 @@ MAX_DOT_GRAPH_DEPTH    = 0
 
 DOT_TRANSPARENT        = NO
 
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
 # files in one run (i.e. multiple -o and -T options on the command line). This
 # makes dot run faster, but since only newer versions of dot (>1.8.10) support
 # this, this feature is disabled by default.
@@ -2346,7 +2517,7 @@ DOT_MULTI_TARGETS      = NO
 
 GENERATE_LEGEND        = YES
 
-# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
 # files that are used to generate the various graphs.
 # The default value is: YES.
 # This tag requires that the tag HAVE_DOT is set to YES.
index 92985e99d861ffa4d7db7d5e3bfdbccde92a4a57..c98b9aea7429282ee5104d35e3b9bb0aec75661e 100644 (file)
@@ -1,4 +1,4 @@
-.TH "cda2dcm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "cda2dcm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 cda2dcm \- Encapsulate CDA file into DICOM file format
@@ -238,4 +238,4 @@ The \fBcda2dcm\fP utility will attempt to load DICOM data dictionaries specified
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2018-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2018-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index e59f3447edbc29ec922276fbe212f89612f61070..41f003c142d6190c81d1c9a3672fb2218d8f3d33 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcm2json" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcm2json" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcm2json \- Convert DICOM file and data set to JSON
@@ -207,7 +207,7 @@ The basic structure of the JSON output created from a DICOM file looks like the
         ]
     },
     "00100030": {
-        "vr": "DT",
+        "vr": "DA",
         "Value": [
             "19670701"
         ]
@@ -282,6 +282,8 @@ The basic structure of the JSON output created from a DICOM file looks like the
 Binary data, i\&.e\&. DICOM element values with Value Representations (VR) of OB or OW, as well as OD, OF, OL, OV and UN values are always written as 'InlineBinary' (base64 encoding) to the JSON output\&. A future version of this tool might optionally use a 'BulkDataURI' instead, i\&.e\&. the WADO-RS URL of a bulk data item that contains the element value\&. This would be particularly useful for large amounts of data, such as pixel data\&.
 .SH "NOTES"
 .PP
+.SS "Numbers as Strings"
+The DICOM standard allows certain numeric DICOM value representations, DS, IS, SV and UV, to be converted either to a JSON number or a JSON string\&. \fBdcm2json\fP converts DS and IS values to JSON numbers if they are valid decimal strings or integer strings, and to strings if they contain any illegal character\&. \fBdcm2json\fP converts SV and UV values to numbers if they are not larger than 9007199254740991ll or smaller than -9007199254740991ll, and to strings otherwise\&. While the JSON specification permits larger numbers, these are the largest integers that JavaScript can handle\&. Therefore, many JSON parsers cannot process larger numbers\&.
 .SS "Character Encoding"
 As required by the DICOM JSON encoding, \fBdcm2json\fP always creates output in Unicode UTF-8 encoding and converts DICOM datasets accordingly\&. If this is not possible, for example because DCMTK has been compiled without either iconv or ICU library, an error is returned\&.
 .SH "LOGGING"
@@ -333,4 +335,4 @@ The \fBdcm2json\fP utility will attempt to load DICOM data dictionaries specifie
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2016-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2016-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 567d785059434163f8a9ef69b546383f81c9ba9d..7ff8fd873fc5e4debb2e8eed6eabaca5069a33f7 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcm2pdf" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcm2pdf" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcm2pdf \- Extract PDF file from DICOM encapsulated PDF
@@ -157,4 +157,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBpdf2dcm\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2007-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2007-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 6da251720ee6141f87d949f3dfe37a1bf0ac139f..5801ea8722f332cf13fedd8f2c544e1a8aa93fd6 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcm2pnm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcm2pnm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcm2pnm \- Convert DICOM images to PGM/PPM, PNG, TIFF or BMP
@@ -403,7 +403,7 @@ The following preferred interpolation algorithms can be selected using the \fI--
 .IP "\(bu" 2
 4 = magnification algorithm with bicubic interpolation from Eduard Stanescu
 .PP
-The \fI--write-tiff\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibtiff\fP TIFF library\&. The availability of the TIFF compression options depends on the \fBlibtiff\fP configuration\&. In particular, the patented LZW algorithm may not be available\&.
+The \fI--write-tiff\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibtiff\fP TIFF library\&. The availability of the TIFF compression options depends on the \fBlibtiff\fP configuration\&.
 .PP
 The \fI--write-png\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibpng\fP PNG library\&. Option \fI--interlace\fP enables progressive image view while loading the PNG file\&. Only a few applications take care of the meta info (TEXT) in a PNG file\&.
 .SH "TRANSFER SYNTAXES"
@@ -452,4 +452,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmj2pnm\fP(1), \fBimg2dcm\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1998-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index a47019298b057af8c2ef7784053625a8f6733286..df1bd6452123eca3eb07829b84c4c679eb0e2d24 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcm2xml" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcm2xml" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcm2xml \- Convert DICOM file and data set to XML
@@ -286,4 +286,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBxml2dcm\fP(1), \fBdcmconv\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2002-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2002-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 8b2295453dca987a243fabfa71c86392d23d92e1..8bdf74251578f5605c912ae7f4510cc505792b40 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmcjpeg" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmcjpeg" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmcjpeg \- Encode DICOM file to JPEG transfer syntax
@@ -147,7 +147,7 @@ lossless JPEG codec selection:
   +tl   --true-lossless
           true lossless codec (default)
 
-  # This option selects an encoder, that guarantees truely lossless
+  # This option selects an encoder, that guarantees truly lossless
   # image compression. See NOTES for further information.
 
   +pl   --pseudo-lossless
@@ -647,4 +647,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmdjpeg\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2001-2018 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2001-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 686582d6b9b7a9c499f5f54b43b7afa464471d2d..4cbead4dd902f200cb311cab811fb896a0af0295 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmcjpls" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmcjpls" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmcjpls \- Encode DICOM file to JPEG-LS transfer syntax
@@ -180,7 +180,8 @@ JPEG-LS padding of odd-length bitstreams:
   # Pad odd-length JPEG-LS bitstreams by writing a zero byte after the
   # end of image segment marker, i.e. FF D9 00. This is not DICOM conformant
   # but required for interoperability with the HP LOCO reference implementation,
-  # which does not support extended JPEG-LS bitstreams..fi
+  # which does not support extended JPEG-LS bitstreams.
+.fi
 .PP
 .SS "encapsulated pixel data encoding options"
 .PP
@@ -232,7 +233,7 @@ SOP Instance UID:
   +ud  --uid-default
          assign new UID if lossy compression (default)
 
-  # Assigns a new SOP instance UID if the compression is lossy JPEG.
+  # Assigns a new SOP instance UID if the compression is lossy JPEG-LS.
 
   +ua  --uid-always
          always assign new UID
@@ -338,4 +339,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmdjpls\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2009-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2009-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index bad701c76efbe2bc7081b55de7091d7d62ec5ac4..76a3d5ff8f2f7656964c89fb36ad0f858a3bdbd8 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmconv" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmconv" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmconv \- Convert DICOM file encoding
@@ -347,4 +347,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmdump\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1994-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1994-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index ded40cfadb3b97faf51fcd7c3b4f8cd0eec5bd3d..7636ef7e752210036fb47ea79343e1f139da6cd2 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmcrle" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmcrle" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmcrle \- Encode DICOM file to RLE transfer syntax
@@ -212,4 +212,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmdrle\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2002-2018 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2002-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 238485a1c42f508bfae085c327d38cc2c12eb8b9..5e1596802082cdd2997b3cbd91330f52265f218e 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmdjpeg" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmdjpeg" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmdjpeg \- Decode JPEG-compressed DICOM file
@@ -299,4 +299,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmcjpeg\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2001-2019 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2001-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index d2a75b3b6ccc857eecf199414b6d16c88947c5de..26edb4eab22750e3c36d7b194af7bf0e419c6fe7 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmdjpls" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmdjpls" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmdjpls \- Decode JPEG-LS compressed DICOM file
@@ -240,4 +240,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmcjpls\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2009-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2009-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 8c7fe207fa8a79de7fecadbb2c8e9182a5eaa420..666ca3f34eb374fdfe2db78747734b1cbc82239c 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmdrle" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmdrle" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmdrle \- Decode RLE-compressed DICOM file
@@ -206,4 +206,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmcrle\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2002-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany
+Copyright (C) 2002-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany
index 37d6dd4fb004cbbb3f0b67a7acd7e569fcf8e540..18ff7fc9671edc8639c05302c4ca3b313aaf6de0 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmdspfn" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmdspfn" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmdspfn \- Export standard display curves to a text file
@@ -143,4 +143,4 @@ In addition, one or more command files can be specified using an '@' sign as a p
 \fBdconvlum\fP(1), \fBdcod2lum\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1999-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1999-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index fd00a35e83e9de5b4e139a87bcc66a28ee182a5f..aa4d40a75d17c7eefbd068e64e40a8510b63f80e 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmdump" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmdump" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmdump \- Dump DICOM file and data set
@@ -364,4 +364,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdump2dcm\fP(1), \fBdcmconv\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1994-2017 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1994-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 8c35a96bba1a14d875fcc16a15be15826bab03c5..492566a88624c6b15fa937e9b0a9aa3aae81beff 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmftest" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmftest" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmftest \- Test if file uses DICOM part 10 format
@@ -28,4 +28,4 @@ All files specified on the command line are checked for the presence of the DICO
 \fBdcmgpdir\fP(1), \fBdcmmkdir\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1997-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1997-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 884079b74dc5788240b83c16d15e49187f07ce8f..b8a48254a19839db866627bbcd14f7ca7ee831d8 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmgpdir" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmgpdir" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmgpdir \- Create a general purpose DICOMDIR
@@ -228,4 +228,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmmkdir\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1996-2016 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1996-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 9426d936e8c5803981c778602eac946c6f7b4258..639589d583ccaf1ea61ddae55f83498424cf262f 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmicmp" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmicmp" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmicmp \- Compare DICOM images and compute difference metrics
@@ -300,4 +300,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcm2pnm\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2018 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2018-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 217851030800a91d135326ca517eb4e3fac99e26..597647f5dcbc3b30fa02dd5e3d61a7fca9390bee 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmj2pnm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmj2pnm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmj2pnm \- Convert DICOM images to PGM/PPM, PNG, TIFF, JPEG or BMP
@@ -475,7 +475,7 @@ The following preferred interpolation algorithms can be selected using the \fI--
 .IP "\(bu" 2
 4 = magnification algorithm with bicubic interpolation from Eduard Stanescu
 .PP
-The \fI--write-tiff\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibtiff\fP TIFF library\&. The availability of the TIFF compression options depends on the \fBlibtiff\fP configuration\&. In particular, the patented LZW algorithm may not be available\&.
+The \fI--write-tiff\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibtiff\fP TIFF library\&. The availability of the TIFF compression options depends on the \fBlibtiff\fP configuration\&.
 .PP
 The \fI--write-png\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibpng\fP PNG library\&. Option \fI--interlace\fP enables progressive image view while loading the PNG file\&. Only a few applications take care of the meta info (TEXT) in a PNG file\&.
 .SH "TRANSFER SYNTAXES"
@@ -530,4 +530,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcm2pnm\fP(1), \fBimg2dcm\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2001-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2001-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 6b30e479f65e59d72fd379af96f1bfb6714e2969..38fc7ff7cf5fe45ed8c0c45d7f0839c2687f9822 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcml2pnm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcml2pnm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcml2pnm \- Convert DICOM images to PGM/PPM, PNG, TIFF or BMP
@@ -403,7 +403,7 @@ The following preferred interpolation algorithms can be selected using the \fI--
 .IP "\(bu" 2
 4 = magnification algorithm with bicubic interpolation from Eduard Stanescu
 .PP
-The \fI--write-tiff\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibtiff\fP TIFF library\&. The availability of the TIFF compression options depends on the \fBlibtiff\fP configuration\&. In particular, the patented LZW algorithm may not be available\&.
+The \fI--write-tiff\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibtiff\fP TIFF library\&. The availability of the TIFF compression options depends on the \fBlibtiff\fP configuration\&.
 .PP
 The \fI--write-png\fP option is only available when DCMTK has been configured and compiled with support for the external \fBlibpng\fP PNG library\&. Option \fI--interlace\fP enables progressive image view while loading the PNG file\&. Only a few applications take care of the meta info (TEXT) in a PNG file\&.
 .SH "TRANSFER SYNTAXES"
@@ -454,4 +454,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcm2pnm\fP(1), \fBimg2dcm\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2001-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2001-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 7c840a1c7ceeaca958b2098c65bf6b11cc5f25b1..a69f999a6150e692e0c1e34917354107d1ea9ff0 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmmkcrv" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmmkcrv" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmmkcrv \- Add 2D curve data to image
@@ -125,4 +125,4 @@ The \fBdcmmkcrv\fP utility will attempt to load DICOM data dictionaries specifie
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1998-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 982ef18be49ef35315d6c450e05c2a2ecb584c27..d25fca60e4fe4a52c8fdd036af8823bedff49e96 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmmkdir" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmmkdir" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmmkdir \- Create a DICOMDIR file
@@ -427,4 +427,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmgpdir\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2001-2016 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2001-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 64a0627038fea5013231ba5e317773bf90d6104f..005e9b622256690aa03ed2bd4dacad04615a4565 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmmklut" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmmklut" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmmklut \- Create DICOM look-up tables
@@ -189,4 +189,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fI<datadir>/philips\&.lut\fP - sample LUT in text format
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1998-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 164f6394f2bc9592c2fb6f1459443b225936e7ca..373b2f556d92c06575cf9db5cf171249f8f1ac02 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmodify" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmodify" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmodify \- Modify DICOM files
@@ -441,4 +441,4 @@ The \fBdcmodify\fP utility will attempt to load DICOM data dictionaries specifie
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2003-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2003-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 15673c80fa00bb4edca13a7b1a0068d0b00ae311..35ff575de0778825f17101abc46a1fbf84cf8097 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmp2pgm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmp2pgm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmp2pgm \- Read DICOM image and presentation state and render bitmap
@@ -12,7 +12,7 @@ dcmp2pgm [options] dcmimage-in [bitmap-out]
 .PP
 .SH "DESCRIPTION"
 .PP
-The \fBdcmp2pgm\fP utility renders a monochrome DICOM image under the control of a grayscale softcopy presentation state object into a monochrome bitmap with 8 bits/pixel\&. The bitmap is stored either as 'Portable Gray Map' (PGM) or as a DICOM secondary capture image object\&. If no presentation state is read from file, a default presentation state is created\&. The utility allows to read a configuration file of the Softcopy Presentation State Viewer upon startup\&. In this case, the settings from the configuration file affecting the rendering of the presentation state are used, e\&.g\&. a correction of the gray scale range according to Barten's model (DICOM part 14) can be performed if the characteristic curve of the display system is available and defined in the configuration file\&.
+The \fBdcmp2pgm\fP utility renders a monochrome DICOM image under the control of a grayscale softcopy presentation state object into a monochrome bitmap with 8 bits/pixel\&. The bitmap is stored either as 'Portable Gray Map' (PGM) or as a DICOM secondary capture image object\&. If no presentation state is read from file, a default presentation state is created\&. The utility allows one to read a configuration file of the Softcopy Presentation State Viewer upon startup\&. In this case, the settings from the configuration file affecting the rendering of the presentation state are used, e\&.g\&. a correction of the gray scale range according to Barten's model (DICOM part 14) can be performed if the characteristic curve of the display system is available and defined in the configuration file\&.
 .SH "PARAMETERS"
 .PP
 .PP
@@ -111,4 +111,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fI<etcdir>/dcmpstat\&.cfg\fP - sample configuration file
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1998-2017 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 2bb8be7ba0ddefa7e78ec5461d15799d86176f37..448f29dc4a4bffa27693345b19b60b79643d8aa0 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmprscp" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmprscp" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmprscp \- DICOM basic grayscale print management SCP
@@ -14,7 +14,7 @@ dcmprscp [options]
 .PP
 The \fBdcmprscp\fP utility implements the DICOM Basic Grayscale Print Management Service Class as SCP\&. It also supports the optional Presentation LUT SOP Class\&. The utility is intended for use within the DICOMscope viewer\&.
 .PP
-The \fBdcmprscp\fP utility accepts print jobs from a remote Print SCU\&. It does not create real hardcopies but stores print jobs in the local DICOMscope database as a set of Stored Print objects (one per page) and Hardcopy Grayscale images (one per film box N-SET)\&. The DICOMscope application allows to load a Stored Print object created by \fBdcmprscp\fP and to render a screen preview of the hardcopy\&. The \fBdcmprscp\fP utility reads the characteristics of the printer to be emulated from the configuration file\&.
+The \fBdcmprscp\fP utility accepts print jobs from a remote Print SCU\&. It does not create real hardcopies but stores print jobs in the local DICOMscope database as a set of Stored Print objects (one per page) and Hardcopy Grayscale images (one per film box N-SET)\&. The DICOMscope application allows one to load a Stored Print object created by \fBdcmprscp\fP and to render a screen preview of the hardcopy\&. The \fBdcmprscp\fP utility reads the characteristics of the printer to be emulated from the configuration file\&.
 .SH "OPTIONS"
 .PP
 .SS "general options"
@@ -90,4 +90,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmprscu\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1999-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1999-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index a1394c1028dc1996c04e7e42ca01bb90ca800fce..eb4ff1c2f73ae73c6d0397030f0e57a87ebf56c0 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmprscu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmprscu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmprscu \- Print spooler for presentation state viewer
@@ -147,4 +147,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmprscp\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1999-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1999-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 50fe37c2e8c76e86d4680d74be0f0d4cc087ba5a..ef31bd9156e37f62c1b07d16a9ab906a49865592 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmpschk" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmpschk" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmpschk \- Checking tool for presentation states
@@ -83,4 +83,4 @@ The \fBdcmpschk\fP utility will attempt to load DICOM data dictionaries specifie
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2000-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2000-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index ee7b233fb42cc33f07d9da46aa1ef884338be9e2..6d7dc57626435d7ff8653fe498a864ee68b9193f 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmpsmk" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmpsmk" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmpsmk \- Create DICOM grayscale softcopy presentation state
@@ -12,7 +12,7 @@ dcmpsmk [options] dcmfile-in dcmfile-out
 .PP
 .SH "DESCRIPTION"
 .PP
-The \fBdcmpsmk\fP utility reads a DICOM image file and creates a grayscale softcopy presentation state object according to Supplement 33\&. The presentation state object is written back to file\&. A number of command line options allow to specify how certain constructs that might be present in the image file should be referenced or activated in the presentation state\&. The newly created presentation state references the source image and contains values that should allow for a 'reasonable' display of the image when rendered under control of the presentation state\&.
+The \fBdcmpsmk\fP utility reads a DICOM image file and creates a grayscale softcopy presentation state object according to Supplement 33\&. The presentation state object is written back to file\&. A number of command line options allow one to specify how certain constructs that might be present in the image file should be referenced or activated in the presentation state\&. The newly created presentation state references the source image and contains values that should allow for a 'reasonable' display of the image when rendered under control of the presentation state\&.
 .SH "PARAMETERS"
 .PP
 .PP
@@ -197,4 +197,4 @@ The \fBdcmpsmk\fP utility will attempt to load DICOM data dictionaries specified
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1998-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 7e4f05ff84ff75ce2653ad9c0265eab885b9cda2..20fb44d32396ec5dc3214ac64e92ca407e5c6d57 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmpsprt" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmpsprt" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmpsprt \- Read DICOM images and presentation states and render print job
@@ -274,4 +274,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmprscu\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1999-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1999-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 13941623aa39062a88cf67597728f0009a5da29d..921519dbd958c65960c69690742140010fc88656 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmpsrcv" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmpsrcv" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmpsrcv \- Network receive for presentation state viewer
@@ -79,4 +79,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmpssnd\fP(1), \fBstorescp\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1998-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index ee067c0f986af7f61c473c97c55f02a2b3cd589e..026535e28c9c008fa5048f66549ca9cf9903218f 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmpssnd" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmpssnd" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmpssnd \- Network send for presentation state viewer
@@ -84,4 +84,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmpsrcv\fP(1), \fBstorescu\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1998-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1998-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index b6112c5c6280a97c39c2f22800a7cb37599f1b93..614c30bc32361d25bf1c498f869a4e1d0464e9fd 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmqridx" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmqridx" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmqridx \- Register a DICOM image file in an image database index file
@@ -85,4 +85,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmqrscp\fP(1), \fBdcmqrti\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1993-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1993-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 47f9ba712a838f2eb0f103a2b45c3a4d4403ea45..c8f86ddbffc1148e7e84af98dde2d7b53f5309b6 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmqrscp" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmqrscp" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmqrscp \- DICOM image archive (central test node)
@@ -827,7 +827,9 @@ SimplifiedAdultEchoSRStorage                         1.2.840.10008.5.1.4.1.1.88.
 PatientRadiationDoseSRStorage                        1.2.840.10008.5.1.4.1.1.88.73
 PlannedImagingAgentAdministrationSRStorage           1.2.840.10008.5.1.4.1.1.88.74
 PerformedImagingAgentAdministrationSRStorage         1.2.840.10008.5.1.4.1.1.88.75
+EnhancedXRayRadiationDoseSRStorage                   1.2.840.10008.5.1.4.1.1.88.76
 ContentAssessmentResultsStorage                      1.2.840.10008.5.1.4.1.1.90.1
+MicroscopyBulkSimpleAnnotationsStorage               1.2.840.10008.5.1.4.1.1.91.1
 EncapsulatedPDFStorage                               1.2.840.10008.5.1.4.1.1.104.1
 EncapsulatedCDAStorage                               1.2.840.10008.5.1.4.1.1.104.2
 EncapsulatedSTLStorage                               1.2.840.10008.5.1.4.1.1.104.3
@@ -839,6 +841,7 @@ RETIRED_StandalonePETCurveStorage                    1.2.840.10008.5.1.4.1.1.129
 EnhancedPETImageStorage                              1.2.840.10008.5.1.4.1.1.130
 BasicStructuredDisplayStorage                        1.2.840.10008.5.1.4.1.1.131
 CTPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.2
+XAPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.8
 RTImageStorage                                       1.2.840.10008.5.1.4.1.1.481.1
 RTDoseStorage                                        1.2.840.10008.5.1.4.1.1.481.2
 RTStructureSetStorage                                1.2.840.10008.5.1.4.1.1.481.3
@@ -859,6 +862,8 @@ RTRadiationSalvageRecordStorage                      1.2.840.10008.5.1.4.1.1.481
 TomotherapeuticRadiationRecordStorage                1.2.840.10008.5.1.4.1.1.481.18
 CArmPhotonElectronRadiationRecordStorage             1.2.840.10008.5.1.4.1.1.481.19
 RoboticRadiationRecordStorage                        1.2.840.10008.5.1.4.1.1.481.20
+RTRadiationSetDeliveryInstructionStorage             1.2.840.10008.5.1.4.1.1.481.21
+RTTreatmentPreparationStorage                        1.2.840.10008.5.1.4.1.1.481.22
 DICOS_CTImageStorage                                 1.2.840.10008.5.1.4.1.1.501.1
 DICOS_DigitalXRayImageStorageForPresentation         1.2.840.10008.5.1.4.1.1.501.2.1
 DICOS_DigitalXRayImageStorageForProcessing           1.2.840.10008.5.1.4.1.1.501.2.2
@@ -1012,4 +1017,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmqridx\fP(1), \fBdcmqrti\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1993-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1993-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 057b77fb86b37133caf2df78c363d28ea58b78a0..75e1038e50359e8a06b449393cb0be84caf9e18b 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmqrti" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmqrti" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmqrti \- The Terminal Initiator Telnet Client Program
@@ -324,4 +324,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmqrscp\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1993-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1993-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 6fb32214195f143007b764b909b7a1baadb91b57..020ccb7a21c6409f618413932c2875bdc0329e37 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmquant" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmquant" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmquant \- Convert DICOM color images to palette color
@@ -243,4 +243,4 @@ The \fBdcmquant\fP utility will attempt to load DICOM data dictionaries specifie
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2001-2017 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2001-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 3702e0d8586e457407ad54ad4c2b616fa0e75d5a..8d8c07032a172bb0e43ff47f1e66d0a40f863077 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmrecv" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmrecv" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmrecv \- Simple DICOM storage SCP (receiver)
@@ -122,13 +122,23 @@ certification authority:
   +cd   --add-cert-dir  [d]irectory: string
           add certificates in d to list of certificates
 
-security profile:
+  +crl  --add-crl-file  [f]ilename: string
+          add certificate revocation list file
+          (implies --enable-crl-vfy)
 
-  +px   --profile-bcp195
-          BCP 195 TLS Profile (default)
+  +crv  --enable-crl-vfy
+          enable leaf CRL verification
+
+  +cra  --enable-crl-all
+          enable full chain CRL verification
+
+security profile:
 
   +py   --profile-bcp195-nd
-          Non-downgrading BCP 195 TLS Profile
+          Non-downgrading BCP 195 TLS Profile (default)
+
+  +px   --profile-bcp195
+          BCP 195 TLS Profile
 
   +pz   --profile-bcp195-ex
           Extended BCP 195 TLS Profile
@@ -377,4 +387,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmsend\fP(1), \fBstorescu\fP(1), \fBstorescp\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2013-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2013-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 1ce395f1e910a3f728e8dfcdef0adb0b60eb7035..783e735eed29221f9fd96d0cf050ec95c4b06c2f 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmscale" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmscale" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmscale \- Scale DICOM images
@@ -230,4 +230,4 @@ The \fBdcmscale\fP utility will attempt to load DICOM data dictionaries specifie
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2002-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2002-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 496049b703165c376d2c923086c04802c126af94..00851d8b542e6d3405cd390451d0055e041d31b9 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmsend" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmsend" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmsend \- Simple DICOM storage SCU (sender)
@@ -256,8 +256,8 @@ Transfer syntaxes supported by decoders:
 .PP
 Since \fBdcmsend\fP tries to be as simple as possible for the user, by default presentation contexts might be proposed to the SCP that are strictly speaking 'illegal'\&. This is because, according to the DICOM standard, the SCU always has to propose the default transfer syntax in at least one presentation context associated with each abstract syntax (i\&.e\&. SOP class)\&. This requirement is waived if the SCU only has access to the SOP instance in lossy compressed form or if the decompressed pixel data would be too large to be encoded\&. With option \fI--no-illegal-proposal\fP the strict DICOM-conformant behavior can be enforced, i\&.e\&. no possibly illegal presentation context will be proposed but the corresponding SOP instance will be rejected (if needed)\&. Please note, however, that the size of the decompressed pixel data is not checked\&.
 .PP
-Please note, however, that the default transfer syntax for 'Lossless JPEG
-Compression', 'Lossy JPEG Compression' and so on are not always proposed as also required by the DICOM standard\&. The same limitation applies to other compression schemes\&. See DICOM PS 3\&.5 section 10 for details\&.
+The default transfer syntax for 'Lossless JPEG Compression', 'Lossy JPEG
+Compression' and so on are not always proposed as also required by the DICOM standard\&. The same limitation applies to other compression schemes\&. See DICOM PS 3\&.5 section 10 for details\&.
 .SH "LOGGING"
 .PP
 The level of logging output of the various command line tools and underlying libraries can be specified by the user\&. By default, only errors and warnings are written to the standard error stream\&. Using option \fI--verbose\fP also informational messages like processing details are reported\&. Option \fI--debug\fP can be used to get more details on the internal activity, e\&.g\&. for debugging purposes\&. Other logging levels can be selected using option \fI--log-level\fP\&. In \fI--quiet\fP mode only fatal errors are reported\&. In such very severe error events, the application will usually terminate\&. For more details on the different logging levels, see documentation of module 'oflog'\&.
@@ -317,4 +317,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmrecv\fP(1), \fBstorescu\fP(1), \fBstorescp\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2011-2018 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2011-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 0e2e4cdfd934d7fd9188de2b874d18e55681c5eb..d25d9e8b66cc0ca25d255ef8b54ebe7520ccb4a5 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcmsign" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcmsign" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcmsign \- Sign and Verify DICOM Files
@@ -497,4 +497,4 @@ The \fBdcmsign\fP utility will attempt to load DICOM data dictionaries specified
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2000-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2000-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 90adaa2e070a52728727d7e9e616f4ef1ec92d25..c24997d495b3731b1346f37ff34632d6ca447246 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dcod2lum" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dcod2lum" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dcod2lum \- Convert hardcopy characteristic curve file to softcopy format
@@ -47,4 +47,4 @@ The format of both input and output file is described the documentation of the \
 \fBdcmdspfn\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2002-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2002-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 2f5f8752e9853fe2816512bc5cdd89b3c7ee88ed..7a0d539f51b9f3dc561cf04fa5482d2fd4bb123c 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dconvlum" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dconvlum" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dconvlum \- Convert VeriLUM files to DCMTK display files
@@ -34,4 +34,4 @@ See DICOM standard part 14 for more details on display calibration and Barten's
 \fBdcmdspfn\fP(1), \fBdcm2pnm\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1999-2014 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1999-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 952fc70340cb75cf02cb0e2a380c43b2487bc292..4b4b0303ad6afc79f1774ac3fb734fcd0ac8e8af 100644 (file)
@@ -1,4 +1,4 @@
-.TH "drtdump" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "drtdump" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 drtdump \- Dump DICOM RT file and data set
@@ -132,4 +132,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmconv\fP(1), \fBdcmdump\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2010-2014 by OFFIS e\&.V\&. and ICSMED AG, Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2010-2022 by OFFIS e\&.V\&. and ICSMED AG, Escherweg 2, 26121 Oldenburg, Germany\&.
index 7735cd91f776fa0cf99c62de7b260d9af23a2ff3..e346643fab9a0658adc04f6eb5bcc6497870b9bb 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dsr2html" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dsr2html" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dsr2html \- Render DICOM SR file and data set to HTML/XHTML
@@ -299,4 +299,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmconv\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2000-2019 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2000-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 7ca5f25b18c02bd8c2fae7ee10c6f3e578f2f494..32023c1ef320603ed9c1b869f2589811ce72830f 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dsr2xml" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dsr2xml" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dsr2xml \- Convert DICOM SR file and data set to XML
@@ -271,4 +271,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBxml2dsr\fP(1), \fBdcmconv\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2000-2019 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2000-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 7b8817d6870087c5783694674a94337d686098f1..2e9f5a7ff19a04ccd832e1ddee9808c0c9205e1d 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dsrdump" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dsrdump" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dsrdump \- Dump DICOM SR file and data set
@@ -246,4 +246,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmconv\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2000-2019 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2000-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index a2903e18b6e52ba43fd9c66a0e30b6acb4ab5815..6714363edc6450c535701ad79b1b816247a341ce 100644 (file)
@@ -1,4 +1,4 @@
-.TH "dump2dcm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "dump2dcm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 dump2dcm \- Convert ASCII dump to DICOM file
@@ -265,4 +265,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcmdump\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1996-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1996-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 2125ad970aeb132e6abcaa7523d99ffff3e3db31..f349c13f27e51056b30eaad777a996f72a94a817 100644 (file)
@@ -1,4 +1,4 @@
-.TH "echoscu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "echoscu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 echoscu \- DICOM verification (C-ECHO) SCU
@@ -137,13 +137,23 @@ certification authority:
   +cd   --add-cert-dir  [d]irectory: string
           add certificates in d to list of certificates
 
-security profile:
+  +crl  --add-crl-file  [f]ilename: string
+          add certificate revocation list file
+          (implies --enable-crl-vfy)
 
-  +px   --profile-bcp195
-          BCP 195 TLS Profile (default)
+  +crv  --enable-crl-vfy
+          enable leaf CRL verification
+
+  +cra  --enable-crl-all
+          enable full chain CRL verification
+
+security profile:
 
   +py   --profile-bcp195-nd
-          Non-downgrading BCP 195 TLS Profile
+          Non-downgrading BCP 195 TLS Profile (default)
+
+  +px   --profile-bcp195
+          BCP 195 TLS Profile
 
   +pz   --profile-bcp195-ex
           Extended BCP 195 TLS Profile
@@ -184,6 +194,20 @@ peer authentication:
 
   -ic   --ignore-peer-cert
           don't verify peer certificate
+
+offline certificate verification:
+
+  +vc   --verify-cert  [f]ilename: string
+          verify certificate against CA settings
+
+          # Load a client certificate and check whether it would be accepted
+          # when received during a TLS handshake. Print result and exit.
+
+  +rc   --is-root-cert  [f]ilename: string
+          check if certificate is self-signed root CA
+
+          # Load a client certificate and check whether it is a valid,
+          # self-signed root CA certificate. Print result and exit.
 .fi
 .PP
 .SH "NOTES"
@@ -230,6 +254,7 @@ EXITCODE_COMMANDLINE_SYNTAX_ERROR         1
 .PP
 .nf
 EXITCODE_CANNOT_READ_INPUT_FILE          20 (*)
+EXITCODE_INVALID_INPUT_FILE              22
 .fi
 .PP
 .SS "output file errors"
@@ -254,4 +279,4 @@ The \fBechoscu\fP utility will attempt to load DICOM data dictionaries specified
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1994-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1994-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 293165df2eda23f79f8cb677746ed54dcbb7e969..1e690dbb43b90b548ad4361538be996ffb64b634 100644 (file)
@@ -1,4 +1,4 @@
-.TH "findscu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "findscu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 findscu \- DICOM query (C-FIND) SCU
@@ -187,13 +187,23 @@ certification authority:
   +cd   --add-cert-dir  [d]irectory: string
           add certificates in d to list of certificates
 
-security profile:
+  +crl  --add-crl-file  [f]ilename: string
+          add certificate revocation list file
+          (implies --enable-crl-vfy)
 
-  +px   --profile-bcp195
-          BCP 195 TLS Profile (default)
+  +crv  --enable-crl-vfy
+          enable leaf CRL verification
+
+  +cra  --enable-crl-all
+          enable full chain CRL verification
+
+security profile:
 
   +py   --profile-bcp195-nd
-          Non-downgrading BCP 195 TLS Profile
+          Non-downgrading BCP 195 TLS Profile (default)
+
+  +px   --profile-bcp195
+          BCP 195 TLS Profile
 
   +pz   --profile-bcp195-ex
           Extended BCP 195 TLS Profile
@@ -378,4 +388,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBmovescu\fP(1), \fBdump2dcm\fP(1), \fBdcmodify\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1994-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1994-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index cad0d80c2b12b48380fe88305c35c6de57fdeec5..ec63dc951e1b2a8cdb1997e518644cdbd73198a3 100644 (file)
@@ -1,4 +1,4 @@
-.TH "getscu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "getscu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 getscu \- DICOM retrieve (C-GET) SCU
@@ -473,4 +473,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBfindscu\fP(1), \fBmovescu\fP(1), \fBdump2dcm\fP(1), \fBdcmodify\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2011-2018 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2011-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 8ffc2e0b8d595e7899567e79b06fcc3aa2a698e2..721c79b38d8ea4149319427280bb2dfbadadcd4f 100644 (file)
@@ -1,4 +1,4 @@
-.TH "img2dcm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "img2dcm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 img2dcm \- Convert standard image formats into DICOM format
@@ -7,21 +7,19 @@ img2dcm \- Convert standard image formats into DICOM format
 .PP
 .PP
 .nf
-img2dcm [options] imgfile-in dcmfile-out
+img2dcm [options] imgfile-in... dcmfile-out
 .fi
 .PP
 .SH "DESCRIPTION"
 .PP
 The \fBimg2dcm\fP tool serves as a conversion tool from a standard image format like JPEG or BMP to DICOM\&. Different output SOP Classes can be selected\&. The additional information (regarding patients, series, etc\&.) stored in the DICOM output file can be extracted from other DICOM files which serve as a 'template' for the resulting DICOM object\&. \fBimg2dcm\fP can also be configured to invent missing DICOM type 1 and type 2 attributes to work even without any template dataset\&.
-.PP
-\fBimg2dcm\fP only supports single-frame output so far, i\&.e\&. it is not possible to create multi-frame objects\&. Thus, also output SOP Classes that potentially allow multiple frames within one object (such as the new Secondary Capture SOP Classes) can only be created containing a single frame\&.
 .SH "PARAMETERS"
 .PP
 .PP
 .nf
-imgfile-in   image file to be imported
+imgfile-in   image input filename
 
-dcmfile-out  DICOM output file
+dcmfile-out  DICOM output filename
 .fi
 .PP
 .SH "OPTIONS"
@@ -66,6 +64,9 @@ general:
   -df   --dataset-from  [f]ilename: string
           use dataset from DICOM file f
 
+  -dx   --dataset-from-xml  [f]ilename: string
+          use dataset from XML file f
+
   -stf  --study-from  [f]ilename: string
           read patient/study from DICOM file f
 
@@ -88,6 +89,17 @@ JPEG format:
 
   -ka   --keep-appn
           keep APPn sections (except JFIF)
+
+  -rc   --remove-com
+          remove COM segment
+
+XML validation:
+
+  +Vd   --validate-document
+          validate XML document against DTD
+
+  +Vn   --check-namespace
+          check XML namespace in document root
 .fi
 .PP
 .SS "processing options"
@@ -110,20 +122,22 @@ attribute checking:
           (only with --do-checks)
 
   +i1   --invent-type1
-          invent missing type 1 attributes
+          invent missing type 1 attributes (default)
           (only with --do-checks)
 
   -i1   --no-type1-invent
           do not invent missing type 1 attributes
           (only with --do-checks)
 
-character set:
+character set conversion of study/series file:
 
-  +l1   --latin1
-          set latin-1 as standard character set (default)
+  -Ct   --transliterate
+          try to approximate characters that cannot be
+          represented through similar looking characters
 
-  -l1   --no-latin1
-          keep 7-bit ASCII as standard character set
+  -Cd   --discard-illegal
+          discard characters that cannot be represented
+          in destination character set
 
 other processing options:
 
@@ -137,13 +151,16 @@ other processing options:
 target SOP class:
 
   -sc   --sec-capture
-          write Secondary Capture SOP class
+          write Secondary Capture SOP class (default)
 
   -nsc  --new-sc
           write new Secondary Capture SOP classes
 
   -vlp  --vl-photo
-          write Visible Light Photographic SOP class (default)
+          write Visible Light Photographic SOP class
+
+  -oph  --oph-photo
+          write Ophthalmic Photography SOP classes
 
 output file format:
 
@@ -189,7 +206,11 @@ For converting a general image format into DICOM format, the \fBimg2dcm\fP appli
 .PP
 .PD 0
 .IP "\(bu" 2
-Using the \fI--dataset-from\fP option \fBimg2dcm\fP is forced to import attributes from an existing DICOM file\&. The given DICOM file is fully imported and serves as the basis for all further export operations\&. As an exception, the SOP Instance UID is not copied by this option\&. Also image related data like Rows, Columns etc\&. is exchanged during conversion\&. Note that \fBimg2dcm\fP does not check any other attribute values for validity, e\&. g\&. it does not look into sequences to adapt any attributes to the new object (referenced images etc\&.)\&. Therefore, it is recommended to use the templates in the data directory for (old) SC and VLP objects\&. See also section 'Input Templates'\&.
+Using the \fI--dataset-from\fP option \fBimg2dcm\fP is forced to import attributes from an existing DICOM file\&. The given DICOM file is fully imported and serves as the basis for all further export operations\&. As an exception, the SOP Instance UID is not copied by this option\&. Also image related data like Rows, Columns etc\&. is exchanged during conversion\&. Note that \fBimg2dcm\fP does not check any other attribute values for validity, e\&.g\&. it does not look into sequences to adapt any attributes to the new object (referenced images etc\&.)\&. Therefore, it is recommended to use the templates in the data directory for (old) SC and VLP objects\&. See also section 'Input Templates'\&.
+.PP
+.PD 0
+.IP "\(bu" 2
+Using the \fI--dataset-from-xml\fP option \fBimg2dcm\fP is also forced to import attributes from an existing file\&. In this case, however, the file must contain XML data in the format as produced by \fBdcm2xml\fP\&.
 .PP
 .PD 0
 .IP "\(bu" 2
@@ -238,11 +259,15 @@ For supporting the conversion into DICOM, \fBimg2dcm\fP comes with some pre-defi
 .fi
 .PP
 .PP
+For Ophthalmic Photography images, XML templates are provided (see sample file \fIOP_template_utf_8\&.xml\fP and \fIOP_template_latin_1\&.xml\fP)\&.
+.PP
 It is possible to use any DICOM file as a template\&. Please note that the complete DICOM dataset is imported; hence, it should be assured that only attributes are present which should be part of the constructed DICOM object\&. The SOP Class UID and the Pixel Data attributes (including attributes like Rows, Columns etc\&.) are not copied but replaced by \fBimg2dcm\fP during conversion\&.
+.SS "Character Sets"
+When an input template is loaded using \fI--dataset-from\fP or \fI--dataset-from-xml\fP, the specific character set of that template is used for the generated DICOM file\&. If the \fI--study-from\fP or \fI--series-from\fP options are used additionally, img2dcm will try to convert the character set of these attributes to that of the template, and will report an error if that is not possible\&. If the \fI--study-from\fP or \fI--series-from\fP options are used without a template, the specific character set of this source is used for the generated DICOM file\&. Any keys specified on the command line with the \fI--key\fP option are treated as raw bytes and override any attributes that may already be present due to a template or study/series file\&. Therefore, care should be taken to not specify a specific character set on the command line if one might be loaded from another file\&. It is also the user's responsibility to ensure that attribute values specified on the command line use the correct encoding, as no conversion will take place before the values are stored in the DICOM file\&.
 .SS "Input Plugins"
 The \fBimg2dcm\fP application currently supports the JPEG and the BMP image format as input\&.
 .SS "JPEG Input Plugin"
-For JPEG, the original JPEG from the source file is not decoded but extracted and slightly transformed (e\&. g\&. JFIF header is cut off) to allow fast conversion of even big JPEG files without the need of decoding and re-encoding\&. The JPEG plugin chooses the necessary output transfer syntax automatically depending on the actual encoding of the data inside the JPEG file\&. Therefore, the following Transfer Syntaxes (and their corresponding JPEG encodings) are used by the JPEG plugin:
+For JPEG, the original JPEG from the source file is not decoded but extracted and slightly transformed (e\&.g\&. JFIF header is cut off) to allow fast conversion of even big JPEG files without the need of decoding and re-encoding\&. The JPEG plugin chooses the necessary output transfer syntax automatically depending on the actual encoding of the data inside the JPEG file\&. Therefore, the following Transfer Syntaxes (and their corresponding JPEG encodings) are used by the JPEG plugin:
 .PP
 .PD 0
 .IP "\(bu" 2
@@ -264,11 +289,11 @@ JPEG lossless encoding as well as any arithmetic or hierarchical JPEG encoding m
 .PP
 JFIF (JPEG File Interchange Format) information facilitates optional APPn markers in a JPEG file\&. Many digital cameras do not integrate such JFIF information into the JPEG output they create\&. For example, JFIF contains information about the pixel aspect ratio of the compressed image\&. If you want the \fBimg2dcm\fP application to insist on a JFIF header in the JPEG stream, you can use the option \fI--insist-on-jfif\fP which will abort if no JFIF information can be found\&. By default, missing JFIF information is ignored\&.
 .PP
-For DICOM it is kind of a 'gray zone', whether the integration of JFIF (or any other APPn) data into the DICOM object's internal JPEG stream is allowed or not\&. However, the most reliable approach is to cut those markers and their information off the JPEG stream\&. This approach is also taken by the \fBimg2dcm\fP application\&. By default, all APPn markers are cut off from the original JPEG stream\&. However, if you want to keep other APPn markers than JFIF (e\&. g\&. EXIF information) inside the DICOM stream, the option \fI--keep-appn\fP does the trick\&. It should also be slightly faster than cutting off APPn information, because it is not necessary to scan the whole JPEG stream for such data\&. JFIF information is \fBalways\fP removed by \fBimg2dcm\fP\&.
+For DICOM it is kind of a 'gray zone', whether the integration of JFIF (or any other APPn) data into the DICOM object's internal JPEG stream is allowed or not\&. However, the most reliable approach is to cut those markers and their information off the JPEG stream\&. This approach is also taken by the \fBimg2dcm\fP application\&. By default, all APPn markers are cut off from the original JPEG stream\&. However, if you want to keep other APPn markers than JFIF (e\&.g\&. EXIF information) inside the DICOM stream, the option \fI--keep-appn\fP does the trick\&. It should also be slightly faster than cutting off APPn information, because it is not necessary to scan the whole JPEG stream for such data\&. As stated before, JFIF information is always removed by \fBimg2dcm\fP\&. However, when using this option, the APP2 marker is retained, but \fBimg2dcm\fP does not create an equivalent ICC Profile (0028,2000) attribute\&.
 .SS "BMP Input Plugin"
-\fBimg2dcm\fP supports BMP as input format\&. However, so far only the most common BMP images are supported\&. In particular, BMP images which use bit fields or run length encoding will be rejected\&. Such images are uncommon\&. All input images will be converted into a DICOM image with RGB color model and a bit depth of 24\&. There are no specific options for fine-tuning BMP format conversion\&.
+\fBimg2dcm\fP supports BMP as input format\&. However, so far only the most common BMP images are supported\&. In particular, BMP images which use bit fields or run length encoding will be rejected\&. Such images are uncommon\&. Input images will either be converted into a DICOM image with RGB color model and a bit depth of 24, or into an image with MONOCHROME2 color model an 8 bits per pixel\&. There are no specific options for fine-tuning BMP format conversion\&.
 .SS "Output Plugins"
-The desired output SOP Class can be selected on the command line\&. Currently, an export plugin for the Secondary Capture Image SOP class (default, option \fI-sc\fP), the new Secondary Capture Image SOP classes (option \fI-nsc\fP) and Visible Light Photographic Image SOP class (option \fI-vl\fP) are available\&. Please note that the first one is deprecated according to the DICOM standard but is selected as a default because it is widely supported\&. Future versions of \fBimg2dcm\fP might provide further output plugins for other SOP Classes\&.
+The desired output SOP Class can be selected on the command line\&. Currently, export plugins for the Secondary Capture Image SOP class (default, option \fI-sc\fP), the Multiframe Secondary Capture Image SOP classes (option \fI-nsc\fP), Visible Light Photographic Image SOP class (option \fI-vl\fP), and the Ophthalmic Photography Image SOP Classes (option \fI-oph\fP) are available\&. Please note that the first one is deprecated according to the DICOM standard but is selected as a default because it is widely supported\&. Future versions of \fBimg2dcm\fP might provide further output plugins for other SOP Classes\&.
 .PP
 For the new Secondary Capture SOP classes, it is not possible to specify which specific SOP class should be used for output\&. That is because these new SOP classes are differentiated from each other by color depth (1/8/16) and the fact whether the image is black/white or color\&. That is why \fBimg2dcm\fP decides during conversion, which output SOP class is suitable for a given source image\&.
 .SH "EXAMPLES"
@@ -303,7 +328,7 @@ Same as 1), but imports patient/study/series information from DICOM file 'templa
 .IP "5." 4
 img2dcm image\&.jpg out\&.dcm --no-checks
 .br
-Same as 1), but does not perform any attribute checking and no type 1 and type 2 attribute insertion! So in this case, an invalid DICOM object would be generated\&. This can be interesting if the output file is not meant to be completed but will undergo further transformations, e\&. g\&. adding attributes using \fBdcmodify\fP\&. Only use option \fI--no-checks\fP if you know what you are doing!
+Same as 1), but does not perform any attribute checking and no type 1 and type 2 attribute insertion! So in this case, an invalid DICOM object would be generated\&. This can be interesting if the output file is not meant to be completed but will undergo further transformations, e\&.g\&. adding attributes using \fBdcmodify\fP\&. Only use option \fI--no-checks\fP if you know what you are doing!
 .PP
 
 .IP "6." 4
@@ -341,9 +366,11 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fI<datadir>/SC\&.dump\fP - Sample dump file for Secondary Capture images
 .br
 \fI<datadir>/VLP\&.dump\fP - Sample dump file for Visible Light Photographic images
+.br
+\fI<datadir>/OP_template\&.xml\fP - Sample XML template for Ophthalmic Photography images
 .SH "SEE ALSO"
 .PP
-\fBdcm2pnm\fP(1), \fBdcmj2pnm\fP(1), \fBdump2dcm\fP(1), \fBdcmconv\fP(1), \fBdcmodify\fP(1)
+\fBdcm2pnm\fP(1), \fBdcmj2pnm\fP(1), \fBdump2dcm\fP(1), \fBdcmconv\fP(1), \fBdcmodify\fP(1), \fBdcm2xml\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2007-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2007-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 752ef9b80896c74287de3631ba4f94f22b77682c..e4abe79e4bfbc32ceaeb342c59ea60cd0f0cb550 100644 (file)
@@ -1,4 +1,4 @@
-.TH "movescu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "movescu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 movescu \- DICOM retrieve (C-MOVE) SCU
@@ -532,7 +532,9 @@ SimplifiedAdultEchoSRStorage                         1.2.840.10008.5.1.4.1.1.88.
 PatientRadiationDoseSRStorage                        1.2.840.10008.5.1.4.1.1.88.73
 PlannedImagingAgentAdministrationSRStorage           1.2.840.10008.5.1.4.1.1.88.74
 PerformedImagingAgentAdministrationSRStorage         1.2.840.10008.5.1.4.1.1.88.75
+EnhancedXRayRadiationDoseSRStorage                   1.2.840.10008.5.1.4.1.1.88.76
 ContentAssessmentResultsStorage                      1.2.840.10008.5.1.4.1.1.90.1
+MicroscopyBulkSimpleAnnotationsStorage               1.2.840.10008.5.1.4.1.1.91.1
 EncapsulatedPDFStorage                               1.2.840.10008.5.1.4.1.1.104.1
 EncapsulatedCDAStorage                               1.2.840.10008.5.1.4.1.1.104.2
 EncapsulatedSTLStorage                               1.2.840.10008.5.1.4.1.1.104.3
@@ -544,6 +546,7 @@ RETIRED_StandalonePETCurveStorage                    1.2.840.10008.5.1.4.1.1.129
 EnhancedPETImageStorage                              1.2.840.10008.5.1.4.1.1.130
 BasicStructuredDisplayStorage                        1.2.840.10008.5.1.4.1.1.131
 CTPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.2
+XAPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.8
 RTImageStorage                                       1.2.840.10008.5.1.4.1.1.481.1
 RTDoseStorage                                        1.2.840.10008.5.1.4.1.1.481.2
 RTStructureSetStorage                                1.2.840.10008.5.1.4.1.1.481.3
@@ -564,6 +567,8 @@ RTRadiationSalvageRecordStorage                      1.2.840.10008.5.1.4.1.1.481
 TomotherapeuticRadiationRecordStorage                1.2.840.10008.5.1.4.1.1.481.18
 CArmPhotonElectronRadiationRecordStorage             1.2.840.10008.5.1.4.1.1.481.19
 RoboticRadiationRecordStorage                        1.2.840.10008.5.1.4.1.1.481.20
+RTRadiationSetDeliveryInstructionStorage             1.2.840.10008.5.1.4.1.1.481.21
+RTTreatmentPreparationStorage                        1.2.840.10008.5.1.4.1.1.481.22
 DICOS_CTImageStorage                                 1.2.840.10008.5.1.4.1.1.501.1
 DICOS_DigitalXRayImageStorageForPresentation         1.2.840.10008.5.1.4.1.1.501.2.1
 DICOS_DigitalXRayImageStorageForProcessing           1.2.840.10008.5.1.4.1.1.501.2.2
@@ -686,4 +691,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBfindscu\fP(1), \fBstorescp\fP(1), \fBdump2dcm\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1994-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1994-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index cd3bd5002e2662398c0e29530de6259b9e908d33..7d3c759a3730c3e3d97dafe04a6c4829624f748e 100644 (file)
@@ -1,4 +1,4 @@
-.TH "pdf2dcm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "pdf2dcm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 pdf2dcm \- Encapsulate PDF file into DICOM file format
@@ -231,4 +231,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcm2pdf\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2005-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2005-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 5e00f4b5419ff23ff13844c46b360a5907263fd2..c72c9201544b2140199c6402007f082925050a53 100644 (file)
@@ -1,4 +1,4 @@
-.TH "stl2dcm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "stl2dcm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 stl2dcm \- Encapsulate STL file into DICOM file format
@@ -248,4 +248,4 @@ The \fBstl2dcm\fP utility will attempt to load DICOM data dictionaries specified
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2018-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2018-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index b73b59c7e351c22e252a209c287f684639822faa..49716d021dd3bb08d05f8327e4c6b13662861394 100644 (file)
@@ -1,4 +1,4 @@
-.TH "storescp" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "storescp" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 storescp \- DICOM storage (C-STORE) SCP
@@ -245,13 +245,23 @@ certification authority:
   +cd   --add-cert-dir  [d]irectory: string
           add certificates in d to list of certificates
 
-security profile:
+  +crl  --add-crl-file  [f]ilename: string
+          add certificate revocation list file
+          (implies --enable-crl-vfy)
 
-  +px   --profile-bcp195
-          BCP 195 TLS Profile (default)
+  +crv  --enable-crl-vfy
+          enable leaf CRL verification
+
+  +cra  --enable-crl-all
+          enable full chain CRL verification
+
+security profile:
 
   +py   --profile-bcp195-nd
-          Non-downgrading BCP 195 TLS Profile
+          Non-downgrading BCP 195 TLS Profile (default)
+
+  +px   --profile-bcp195
+          BCP 195 TLS Profile
 
   +pz   --profile-bcp195-ex
           Extended BCP 195 TLS Profile
@@ -663,7 +673,9 @@ SimplifiedAdultEchoSRStorage                         1.2.840.10008.5.1.4.1.1.88.
 PatientRadiationDoseSRStorage                        1.2.840.10008.5.1.4.1.1.88.73
 PlannedImagingAgentAdministrationSRStorage           1.2.840.10008.5.1.4.1.1.88.74
 PerformedImagingAgentAdministrationSRStorage         1.2.840.10008.5.1.4.1.1.88.75
+EnhancedXRayRadiationDoseSRStorage                   1.2.840.10008.5.1.4.1.1.88.76
 ContentAssessmentResultsStorage                      1.2.840.10008.5.1.4.1.1.90.1
+MicroscopyBulkSimpleAnnotationsStorage               1.2.840.10008.5.1.4.1.1.91.1
 EncapsulatedPDFStorage                               1.2.840.10008.5.1.4.1.1.104.1
 EncapsulatedCDAStorage                               1.2.840.10008.5.1.4.1.1.104.2
 EncapsulatedSTLStorage                               1.2.840.10008.5.1.4.1.1.104.3
@@ -675,6 +687,7 @@ RETIRED_StandalonePETCurveStorage                    1.2.840.10008.5.1.4.1.1.129
 EnhancedPETImageStorage                              1.2.840.10008.5.1.4.1.1.130
 BasicStructuredDisplayStorage                        1.2.840.10008.5.1.4.1.1.131
 CTPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.2
+XAPerformedProcedureProtocolStorage                  1.2.840.10008.5.1.4.1.1.200.8
 RTImageStorage                                       1.2.840.10008.5.1.4.1.1.481.1
 RTDoseStorage                                        1.2.840.10008.5.1.4.1.1.481.2
 RTStructureSetStorage                                1.2.840.10008.5.1.4.1.1.481.3
@@ -695,6 +708,8 @@ RTRadiationSalvageRecordStorage                      1.2.840.10008.5.1.4.1.1.481
 TomotherapeuticRadiationRecordStorage                1.2.840.10008.5.1.4.1.1.481.18
 CArmPhotonElectronRadiationRecordStorage             1.2.840.10008.5.1.4.1.1.481.19
 RoboticRadiationRecordStorage                        1.2.840.10008.5.1.4.1.1.481.20
+RTRadiationSetDeliveryInstructionStorage             1.2.840.10008.5.1.4.1.1.481.21
+RTTreatmentPreparationStorage                        1.2.840.10008.5.1.4.1.1.481.22
 DICOS_CTImageStorage                                 1.2.840.10008.5.1.4.1.1.501.1
 DICOS_DigitalXRayImageStorageForPresentation         1.2.840.10008.5.1.4.1.1.501.2.1
 DICOS_DigitalXRayImageStorageForProcessing           1.2.840.10008.5.1.4.1.1.501.2.2
@@ -795,4 +810,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBstorescu\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1996-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1996-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index ea845f84661e886a555d4a4bcd7fb1070dc70d2d..7aeb2570fdaa7dc5d578ab8c64b331d2c4dc034b 100644 (file)
@@ -1,4 +1,4 @@
-.TH "storescu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "storescu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 storescu \- DICOM storage (C-STORE) SCU
@@ -327,13 +327,23 @@ certification authority:
   +cd   --add-cert-dir  [d]irectory: string
           add certificates in d to list of certificates
 
-security profile:
+  +crl  --add-crl-file  [f]ilename: string
+          add certificate revocation list file
+          (implies --enable-crl-vfy)
 
-  +px   --profile-bcp195
-          BCP 195 TLS Profile (default)
+  +crv  --enable-crl-vfy
+          enable leaf CRL verification
+
+  +cra  --enable-crl-all
+          enable full chain CRL verification
+
+security profile:
 
   +py   --profile-bcp195-nd
-          Non-downgrading BCP 195 TLS Profile
+          Non-downgrading BCP 195 TLS Profile (default)
+
+  +px   --profile-bcp195
+          BCP 195 TLS Profile
 
   +pz   --profile-bcp195-ex
           Extended BCP 195 TLS Profile
@@ -513,4 +523,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBstorescp\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1996-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1996-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 99cf267f11997a83d99eb6a4d2d4a0cce3e8ac26..cdb855da2ffc60a99b0d7e1c7ed08e800b887905 100644 (file)
@@ -1,4 +1,4 @@
-.TH "termscu" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "termscu" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 termscu \- DICOM termination SCU
@@ -99,4 +99,4 @@ The \fBtermscu\fP utility will attempt to load DICOM data dictionaries specified
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2005-2017 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2005-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 3ae084988975b5c1de8d5dbfff485cca452cd376..fef63eb5a8ba0465ef9a56fcb2d70bf7b811f663 100644 (file)
@@ -1,4 +1,4 @@
-.TH "wlmscpfs" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "wlmscpfs" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 wlmscpfs \- DICOM Basic Worklist Management SCP (based on data files)
@@ -221,7 +221,7 @@ ss are the current seconds and
 ffffff is the fraction of the current second
 .PP
 .PP
-This should work as a default for most applications that would like to use request files and want to ensure unique file names\&. If it is desired to change this naming scheme, the option \fI--request-file-format\fP can be used\&. It permits to specify the file naming pattern used by \fI--request-file-path\fP\&.
+This should work as a default for most applications that would like to use request files and want to ensure unique file names\&. If it is desired to change this naming scheme, the option \fI--request-file-format\fP can be used\&. It permits one to specify the file naming pattern used by \fI--request-file-path\fP\&.
 .PP
 For flexibility, the following placeholders can be used in the pattern provided for \fI--request-file-format\fP:
 .PP
@@ -419,4 +419,4 @@ The \fBwlmscpfs\fP utility will attempt to load DICOM data dictionaries specifie
 The default behavior should be preferred and the \fIDCMDICTPATH\fP environment variable only used when alternative data dictionaries are required\&. The \fIDCMDICTPATH\fP environment variable has the same format as the Unix shell \fIPATH\fP variable in that a colon (':') separates entries\&. On Windows systems, a semicolon (';') is used as a separator\&. The data dictionary code will attempt to load each file specified in the \fIDCMDICTPATH\fP environment variable\&. It is an error if no data dictionary can be loaded\&.
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 1996-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 1996-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index a1c2974c8c89130564c498d5c4b80e4b13698c74..d399f253699445dc378e5fdcac7691edd9a54217 100644 (file)
@@ -1,4 +1,4 @@
-.TH "xml2dcm" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "xml2dcm" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 xml2dcm \- Convert XML document to DICOM file or data set
@@ -119,6 +119,14 @@ output transfer syntax:
   +td  --write-xfer-deflated
          write with deflated explicit VR little endian TS
 
+error handling:
+
+  -E   --stop-on-error
+         do not write if document is invalid (default)
+
+  +E   --ignore-errors
+         attempt to write even if document is invalid
+
 post-1993 value representations:
 
   +u   --enable-new-vr
@@ -275,4 +283,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdcm2xml\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2003-2021 e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2003-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 79d5a61458bbe6285d5e57682cb7861a2aa3bf3c..d91e005de20920c891cba442e28931401253f765 100644 (file)
@@ -1,4 +1,4 @@
-.TH "xml2dsr" 1 "Thu Jan 14 2021" "Version 3.6.6" "OFFIS DCMTK" \" -*- nroff -*-
+.TH "xml2dsr" 1 "Fri Apr 22 2022" "Version 3.6.7" "OFFIS DCMTK" \" -*- nroff -*-
 .nh
 .SH NAME
 xml2dsr \- Convert XML document to DICOM SR file
@@ -248,4 +248,4 @@ The default behavior should be preferred and the \fIDCMDICTPATH\fP environment v
 \fBdsr2xml\fP(1)
 .SH "COPYRIGHT"
 .PP
-Copyright (C) 2003-2019 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
+Copyright (C) 2003-2022 by OFFIS e\&.V\&., Escherweg 2, 26121 Oldenburg, Germany\&.
index 8e21275c23d412d129cf967725ded8fcbdea5edc..31ef961b5d243f2931b9d7ba969b2ac5c486023b 100644 (file)
@@ -28,6 +28,8 @@
 
 #include "dcmtk/ofstd/ofdefine.h"     /* We need DCMTK_DECL_EXPORT/_IMPORT */
 
+#include "dcmtk/ofstd/ofstdinc.h"
+
 #ifdef oflog_EXPORTS
 #  define DCMTK_INSIDE_LOG4CPLUS
 #endif
index 8cb5760aa247ad717ac5358de868c9447527344e..e0944d1cae2d7d0588f4c7e452205a63705ca341 100644 (file)
@@ -42,13 +42,15 @@ namespace log4cplus {
     namespace helpers {
 
         /**
-         * Returns <code>s</code> in upper case.
+         * @param s the value to be converted into uppercase
+         * @returns <code>s</code> in upper case.
          */
         DCMTK_LOG4CPLUS_EXPORT log4cplus::tstring toUpper(const log4cplus::tstring& s);
 
 
         /**
-         * Returns <code>s</code> in lower case.
+         * @param s the value to be converted into lowercase
+         * @returns <code>s</code> in upper case.
          */
         DCMTK_LOG4CPLUS_EXPORT log4cplus::tstring toLower(const log4cplus::tstring& s);
 
@@ -65,6 +67,11 @@ namespace log4cplus {
          *   list<tstring> tokens;
          *   tokenize(s, '.', back_insert_iterator<list<string> >(tokens));
          * </pre>
+         * @param s the string to be tokenized
+         * @param c the delimiter to be used to tokenized
+         * @param result the resulting tokens
+         * @param collapseTokens when false, multiple adjacent delimiters
+         * will result in zero length tokens.
          */
         template <class StringType>
         inline
@@ -103,9 +110,6 @@ namespace log4cplus {
                 // integer overflow of an signed type is undefined behavior :(
                 // This code is based upon http://www.fefe.de/intof.html
 
-                // True if intType is unsigned
-                const OFBool isUnsigned = (OFstatic_cast(intType, -1) < 0) ? OFFalse : OFTrue;
-
                 // If intType is a signed type, halfMaxSigned is intType_MAX / 2
                 const intType halfMaxSigned = OFstatic_cast(intType, 1) << (sizeof(intType) * 8 - 2);
 
@@ -116,7 +120,7 @@ namespace log4cplus {
                 const intType minSigned = OFstatic_cast(intType, -1) - maxSigned;
 
                 // This is the minimum value that intType can represent;
-                const intType minVal = isUnsigned ? 0 : minSigned;
+                const intType minVal = (OFstatic_cast(intType, -1) < 0) ? minSigned : 0;
 
                 //if (value == (STD_NAMESPACE numeric_limits<intType>::min) ())
                 if (value == minVal)
index 4a9405eccadc50becc2b12a0cab15be8c76c1e17..fbcc41f68b619b8c82907af2166b8d5edf62fd7e 100644 (file)
@@ -19,7 +19,7 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-/** @file 
+/** @file
  * This header defines Filter and all of it's subclasses. */
 
 #ifndef DCMTK_LOG4CPLUS_SPI_FILTER_HEADER_
@@ -48,15 +48,16 @@ namespace log4cplus {
     namespace spi {
 
 
-        enum FilterResult { DENY, /**< The log event must be dropped immediately 
-                                   *  without consulting with the remaining 
+        /*! The possible results a filter can give */
+        enum FilterResult { DENY, /*!< The log event must be dropped immediately
+                                   *  without consulting with the remaining
                                    *  filters, if any, in the chain. */
-                            NEUTRAL, /**< This filter is neutral with respect to
-                                      *  the log event; the remaining filters, if 
-                                      *  if any, should be consulted for a final 
+                            NEUTRAL, /*!< This filter is neutral with respect to
+                                      *  the log event; the remaining filters, if
+                                      *  if any, should be consulted for a final
                                       *  decision. */
-                            ACCEPT /**< The log event must be logged immediately 
-                                    *  without consulting with the remaining 
+                            ACCEPT /*!< The log event must be logged immediately
+                                    *  without consulting with the remaining
                                     *  filters, if any, in the chain. */
                           };
 
@@ -65,12 +66,12 @@ namespace log4cplus {
         class InternalLoggingEvent;
 
 
-        /**
-         * This method is used to filter an InternalLoggingEvent.
-         *
-         * Note: <code>filter</code> can be NULL.
+        /** This method is used to filter an InternalLoggingEvent.
+         * @param filter the filter to be applied to the event
+         * @param event the event where the filter is applied on
+         * @remark <code>filter</code> can be NULL.
          */
-        DCMTK_LOG4CPLUS_EXPORT FilterResult checkFilter(const Filter* filter, 
+        DCMTK_LOG4CPLUS_EXPORT FilterResult checkFilter(const Filter* filter,
                                                   const InternalLoggingEvent& event);
 
         typedef helpers::SharedObjectPtr<Filter> FilterPtr;
@@ -79,7 +80,7 @@ namespace log4cplus {
         /**
          * Users should extend this class to implement customized logging
          * event filtering. Note that the {@link Logger} and {@link
-         * Appender} classes have built-in filtering rules. It is suggested 
+         * Appender} classes have built-in filtering rules. It is suggested
          * that you first use and understand the built-in rules before rushing
          * to write your own custom filters.
          *
@@ -90,7 +91,7 @@ namespace log4cplus {
          *
          * If the value {@link #DENY} is returned, then the log event is
          * dropped immediately without consulting with the remaining
-         * filters. 
+         * filters.
          *
          * If the value {@link #NEUTRAL} is returned, then the next filter
          * in the chain is consulted. If there are no more filters in the
@@ -98,13 +99,13 @@ namespace log4cplus {
          * filters, the default behaviour is to log all logging events.
          *
          * If the value {@link #ACCEPT} is returned, then the log
-         * event is logged without consulting the remaining filters. 
+         * event is logged without consulting the remaining filters.
          *
          * The philosophy of log4cplus filters is largely inspired from the
-         * Linux ipchains. 
+         * Linux ipchains.
          */
-        class DCMTK_LOG4CPLUS_EXPORT Filter 
-            : public virtual log4cplus::helpers::SharedObject 
+        class DCMTK_LOG4CPLUS_EXPORT Filter
+            : public virtual log4cplus::helpers::SharedObject
         {
         public:
           // ctor and dtor
@@ -117,7 +118,7 @@ namespace log4cplus {
              */
             void appendFilter(FilterPtr filter);
 
-            /**     
+            /**
              * If the decision is <code>DENY</code>, then the event will be
              * dropped. If the decision is <code>NEUTRAL</code>, then the next
              * filter, if any, will be invoked. If the decision is ACCEPT then
@@ -125,7 +126,7 @@ namespace log4cplus {
              * the chain.
              *
              * @param event The LoggingEvent to decide upon.
-             * @return The decision of the filter.  
+             * @return The decision of the filter.
              */
             virtual FilterResult decide(const InternalLoggingEvent& event) const = 0;
 
@@ -135,7 +136,7 @@ namespace log4cplus {
              */
             FilterPtr next;
         };
-  
+
 
 
         /**
@@ -152,7 +153,7 @@ namespace log4cplus {
             DenyAllFilter (const log4cplus::helpers::Properties&);
 
             /**
-             * Always returns the {@link #DENY} regardless of the 
+             * Always returns the {@link #DENY} regardless of the
              * {@link InternalLoggingEvent} parameter.
              */
             virtual FilterResult decide(const InternalLoggingEvent& event) const;
@@ -165,7 +166,7 @@ namespace log4cplus {
          * The filter admits two options <b>LogLevelToMatch</b> and
          * <b>AcceptOnMatch</b>. If there is an exact match between the value
          * of the LogLevelToMatch option and the LogLevel of the {@link
-         * spi::InternalLoggingEvent}, then the {@link #decide} method returns 
+         * spi::InternalLoggingEvent}, then the {@link #decide} method returns
          * {@link #ACCEPT} in case the <b>AcceptOnMatch</b> option value is set
          * to <code>true</code>, if it is <code>false</code> then {@link #DENY}
          * is returned. If there is no match, {@link #NEUTRAL} is returned.
@@ -181,7 +182,7 @@ namespace log4cplus {
              * Returns {@link #NEUTRAL} if the <b>LogLevelToMatch</b>
              * option is not set or if there is no match.  Otherwise, if
              * there is a match, then the returned decision is {@link #ACCEPT}
-             * if the <b>AcceptOnMatch</b> property is set to <code>true</code>. 
+             * if the <b>AcceptOnMatch</b> property is set to <code>true</code>.
              * The returned decision is {@link #DENY} if the <b>AcceptOnMatch</b>
              * property is set to <code>false</code>.
              */
@@ -256,7 +257,7 @@ namespace log4cplus {
          * StringToMatch option and the message of the Logging event,
          * then the {@link #decide} method returns {@link #ACCEPT} if
          * the <b>AcceptOnMatch</b> option value is true, if it is false then
-         * {@link #DENY} is returned. If there is no match, {@link #NEUTRAL} 
+         * {@link #DENY} is returned. If there is no match, {@link #NEUTRAL}
          * is returned.
          */
         class DCMTK_LOG4CPLUS_EXPORT StringMatchFilter : public Filter {
index 847abc0ce6bdc4a6c419c1eff134da33c6c945bf..7f646fd3c2fb47466b4a6a851a3399a152dd9aad 100644 (file)
@@ -67,6 +67,7 @@ namespace log4cplus
      * \note Messages sent to remote syslog using UDP are conforming
      * to RFC5424.
      */
+
     class DCMTK_LOG4CPLUS_EXPORT SysLogAppender : public Appender {
     public:
       // Ctors
@@ -93,12 +94,13 @@ namespace log4cplus
 
       // Data
         tstring ident;
-        int facility;
 
         typedef void (SysLogAppender:: * AppendFuncType) (
             const spi::InternalLoggingEvent&);
         AppendFuncType appendFunc;
 
+        int facility;
+
         tstring host;
         int port;
         helpers::Socket syslogSocket;
index 1ca75e938f5a80077f73f4cdaac3e23035294aac..a72d4685836ddc8fdfacd14ec06da3fce10574b9 100644 (file)
@@ -30,6 +30,7 @@
 
 #include <stdexcept>
 
+#include "dcmtk/ofstd/ofdiag.h"
 
 namespace dcmtk {
 namespace log4cplus { namespace thread { namespace impl {
@@ -240,6 +241,8 @@ ManualResetEvent::wait () const
         DCMTK_LOG4CPLUS_THROW_RTE ("ManualResetEvent::wait");
 }
 
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_UNREACHABLE_CODE_WARNING
 
 inline
 bool
@@ -256,12 +259,16 @@ ManualResetEvent::timed_wait (unsigned long msec) const
 
     default:
         DCMTK_LOG4CPLUS_THROW_RTE ("ManualResetEvent::timed_wait");
-        // Silence warnings about not returning any value from function
-        // returning bool.
+        /* Without the following line, MSVC warns that not all code paths return a value.
+         * With the following line, MSVC warns about unreachable code. Great.
+         * We keep the line in the code and suppress the unreachable code warning using a pragma.
+         */
         return false;
     }
 }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 
 inline
 void
index 41dcafc09ee0f981611c84023ed4612cffc2156b..8cae9259bc3a1b371762993d9f46707d4637de55 100644 (file)
@@ -1,16 +1,16 @@
 // -*- C++ -*-
 //  Copyright (C) 2010, Vaclav Haisman. All rights reserved.
-//  
+//
 //  Redistribution and use in source and binary forms, with or without modifica-
 //  tion, are permitted provided that the following conditions are met:
-//  
+//
 //  1. Redistributions of  source code must  retain the above copyright  notice,
 //     this list of conditions and the following disclaimer.
-//  
+//
 //  2. Redistributions in binary form must reproduce the above copyright notice,
 //     this list of conditions and the following disclaimer in the documentation
 //     and/or other materials provided with the distribution.
-//  
+//
 //  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
 //  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
 //  FITNESS  FOR A PARTICULAR  PURPOSE ARE  DISCLAIMED.  IN NO  EVENT SHALL  THE
@@ -63,7 +63,7 @@ MutexImplBase::~MutexImplBase ()
 
 DCMTK_LOG4CPLUS_INLINE_EXPORT
 Mutex::Mutex (Mutex::Type t)
-    : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::Mutex (t)) + 0)
+    : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::Mutex (t) + 0))
 { }
 
 
@@ -106,7 +106,7 @@ SemaphoreImplBase::~SemaphoreImplBase ()
 DCMTK_LOG4CPLUS_INLINE_EXPORT
 Semaphore::Semaphore (unsigned DCMTK_LOG4CPLUS_THREADED (max),
     unsigned DCMTK_LOG4CPLUS_THREADED (initial))
-    : sem (DCMTK_LOG4CPLUS_THREADED (new impl::Semaphore (max, initial)) + 0)
+    : sem (DCMTK_LOG4CPLUS_THREADED (new impl::Semaphore (max, initial) + 0))
 { }
 
 
@@ -148,7 +148,7 @@ FairMutexImplBase::~FairMutexImplBase ()
 
 DCMTK_LOG4CPLUS_INLINE_EXPORT
 FairMutex::FairMutex ()
-    : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::FairMutex) + 0)
+    : mtx (DCMTK_LOG4CPLUS_THREADED (new impl::FairMutex+ 0 ))
 { }
 
 
@@ -190,7 +190,7 @@ ManualResetEventImplBase::~ManualResetEventImplBase ()
 
 DCMTK_LOG4CPLUS_INLINE_EXPORT
 ManualResetEvent::ManualResetEvent (bool DCMTK_LOG4CPLUS_THREADED (sig))
-    : ev (DCMTK_LOG4CPLUS_THREADED (new impl::ManualResetEvent (sig)) + 0)
+    : ev (DCMTK_LOG4CPLUS_THREADED (new impl::ManualResetEvent (sig) + 0))
 { }
 
 
@@ -252,7 +252,7 @@ SharedMutexImplBase::~SharedMutexImplBase ()
 
 DCMTK_LOG4CPLUS_INLINE_EXPORT
 SharedMutex::SharedMutex ()
-    : sm (DCMTK_LOG4CPLUS_THREADED (new impl::SharedMutex) + 0)
+    : sm (DCMTK_LOG4CPLUS_THREADED (new impl::SharedMutex + 0))
 { }
 
 
@@ -293,7 +293,7 @@ SharedMutex::wrunlock () const
 }
 
 
-} } // namespace log4cplus { namespace thread { 
+} } // namespace log4cplus { namespace thread {
 } // end namespace dcmtk
 
 #endif // DCMTK_LOG4CPLUS_ENABLE_SYNCPRIMS_PUB_IMPL
index af13e5eafa9d935b92e39e16db1eb5e047136484..c7d5e43984084a80b5c19594bdba781a163af69f 100644 (file)
@@ -2,11 +2,63 @@
 
 if(WIN32 AND NOT CYGWIN)
   # clfs needs extra libraries and thus is ignored here
-  set(OFLOG_PLATFORM_LIBRARIES winsock windebap winconap)
+  set(OFLOG_PLATFORM_LIBRARIES winsock.cc windebap.cc winconap.cc)
 else()
-  set(OFLOG_PLATFORM_LIBRARIES unixsock)
+  set(OFLOG_PLATFORM_LIBRARIES unixsock.cc)
 endif()
 
-DCMTK_ADD_LIBRARY(oflog oflog apndimpl appender config consap factory fileap filter globinit hierarchy hierlock layout logger logimpl logevent loglevel loglog lloguser ndc ntelogap nullap objreg patlay pointer property rootlog sleep socketap sockbuff socket strhelp syncprims syslogap threads timehelp clogger env fileinfo lockfile mdc queue snprintf tls version log4judp logmacro asyncap cygwin32 striconv strcloc strccloc ${OFLOG_PLATFORM_LIBRARIES})
+DCMTK_ADD_LIBRARY(oflog
+  apndimpl.cc
+  appender.cc
+  asyncap.cc
+  clogger.cc
+  config.cc
+  consap.cc
+  cygwin32.cc
+  env.cc
+  factory.cc
+  fileap.cc
+  fileinfo.cc
+  filter.cc
+  globinit.cc
+  hierarchy.cc
+  hierlock.cc
+  layout.cc
+  lloguser.cc
+  lockfile.cc
+  log4judp.cc
+  logevent.cc
+  logger.cc
+  logimpl.cc
+  loglevel.cc
+  loglog.cc
+  logmacro.cc
+  mdc.cc
+  ndc.cc
+  ntelogap.cc
+  nullap.cc
+  objreg.cc
+  oflog.cc
+  patlay.cc
+  pointer.cc
+  property.cc
+  queue.cc
+  rootlog.cc
+  sleep.cc
+  snprintf.cc
+  sockbuff.cc
+  socket.cc
+  socketap.cc
+  strccloc.cc
+  strcloc.cc
+  strhelp.cc
+  striconv.cc
+  syncprims.cc
+  syslogap.cc
+  threads.cc
+  timehelp.cc
+  tls.cc
+  version.cc
+  ${OFLOG_PLATFORM_LIBRARIES})
 
 DCMTK_TARGET_LINK_MODULES(oflog ofstd)
index 6da22c8001c23903078019434f43d497e7feee8b..26f3a48e610adedf245b53159dfcfda964449271 100644 (file)
@@ -352,8 +352,7 @@ ptd_cleanup_func_win32(void * /* arg */ )
     threadCleanup();
 }
 
-#endif
-
+#else
 
 //! Thread local storage clean up function for POSIX threads.
 static
@@ -401,6 +400,8 @@ ptd_cleanup_func (void * arg)
     threadCleanup ();
 }
 
+#endif
+
 
 static
 void
index 909e99a871e535f104702b437a1225a6b6b92352..ab7136ba6299753aa5f138dc77573ba85e3fa7d0 100644 (file)
@@ -44,7 +44,7 @@ HierarchyLocker::HierarchyLocker(Hierarchy& _h)
     h.initializeLoggerList(loggerList);
 
     // Lock all of the Hierarchy's Loggers' mutexs
-    LoggerList::iterator it;
+    LoggerList::iterator it = loggerList.begin();;
     try
     {
         for (it = loggerList.begin(); it != loggerList.end(); ++it)
index 94e1eb5d4c75e937bc205ebc9190337e3dad49b0..6920ad8af01f900602db5855d131fc31ded21591 100644 (file)
@@ -284,20 +284,19 @@ LockFile::lock () const
 
 void LockFile::unlock () const
 {
-    LogLog & loglog = getLogLog ();
-    int ret = 0;
-
 #if defined (DCMTK_LOG4CPLUS_USE_WIN32_LOCKFILEEX)
+    LogLog & loglog = getLogLog ();
     HANDLE fh = get_os_HANDLE (data->fd, loglog);
 
-    ret = UnlockFile(fh, 0, 0, (STD_NAMESPACE numeric_limits<DWORD>::max) (),
+    int ret = UnlockFile(fh, 0, 0, (STD_NAMESPACE numeric_limits<DWORD>::max) (),
         (STD_NAMESPACE numeric_limits<DWORD>::max) ());
     if (! ret)
         loglog.error (tstring (DCMTK_LOG4CPLUS_TEXT ("UnlockFile() failed: "))
             + convertIntegerToString (GetLastError ()), true);
 
 #elif defined (DCMTK_LOG4CPLUS_USE_WIN32_LOCKING)
-    ret = _locking (data->fd, _LK_UNLCK, (STD_NAMESPACE numeric_limits<long>::max) ());
+    LogLog & loglog = getLogLog ();
+    int ret = _locking (data->fd, _LK_UNLCK, (STD_NAMESPACE numeric_limits<long>::max) ());
     if (ret != 0)
         loglog.error (tstring (DCMTK_LOG4CPLUS_TEXT ("_locking() failed: "))
             + convertIntegerToString (errno), true);
@@ -306,24 +305,27 @@ void LockFile::unlock () const
     close ();
 
 #elif defined (DCMTK_LOG4CPLUS_USE_SETLKW)
+    LogLog & loglog = getLogLog ();
     struct flock fl;
     fl.l_type = F_UNLCK;
     fl.l_whence = SEEK_SET;
     fl.l_start = 0;
     fl.l_len = 0;
-    ret = fcntl (data->fd, F_SETLKW, &fl);
+    int ret = fcntl (data->fd, F_SETLKW, &fl);
     if (ret != 0)
         loglog.error (tstring (DCMTK_LOG4CPLUS_TEXT("fcntl(F_SETLKW) failed: "))
             + convertIntegerToString (errno), true);
 
 #elif defined (DCMTK_LOG4CPLUS_USE_LOCKF)
-    ret = lockf (data->fd, F_ULOCK, 0);
+    LogLog & loglog = getLogLog ();
+    int ret = lockf (data->fd, F_ULOCK, 0);
     if (ret != 0)
         loglog.error (tstring (DCMTK_LOG4CPLUS_TEXT("lockf() failed: "))
             + convertIntegerToString (errno), true);
 
 #elif defined (DCMTK_LOG4CPLUS_USE_FLOCK)
-    ret = flock (data->fd, LOCK_UN);
+    LogLog & loglog = getLogLog ();
+    int ret = flock (data->fd, LOCK_UN);
     if (ret != 0)
         loglog.error (tstring (DCMTK_LOG4CPLUS_TEXT("flock() failed: "))
             + convertIntegerToString (errno), true);
index 7602942a1c59352a18018c297b45aacd372d60ce..6b1f48ecf62edbca089d8db7ed7708ab0992905f 100644 (file)
@@ -46,12 +46,15 @@ namespace log4cplus { namespace helpers {
 
 size_t const START_BUF_SIZE = 512;
 
+#if defined (DCMTK_LOG4CPLUS_USE_POOR_MANS_SNPRINTF)
+
 #if defined (_WIN32)
 char const NULL_FILE[] = "NUL";
 #else
 char const NULL_FILE[] = "/dev/null";
 #endif
 
+#endif
 
 namespace
 {
index e505999e55034b5c96a25d4bfdf3a4b73c161158..973d659027d39807023055d21e4b3d8d0ada839f 100644 (file)
@@ -219,8 +219,8 @@ useIdent (const tstring& string)
 
 SysLogAppender::SysLogAppender(const tstring& id)
     : ident(id)
-    , facility (0)
     , appendFunc (&SysLogAppender::appendLocal)
+    , facility (0)
     , host ()
     , port (0)
     , syslogSocket ()
@@ -239,8 +239,8 @@ SysLogAppender::SysLogAppender(const tstring& id)
 SysLogAppender::SysLogAppender(const helpers::Properties & properties)
     : Appender(properties)
     , ident ()
-    , facility (0)
     , appendFunc (0)
+    , facility (0)
     , host ()
     , port (0)
     , syslogSocket ()
@@ -281,8 +281,8 @@ SysLogAppender::SysLogAppender(const helpers::Properties & properties)
 SysLogAppender::SysLogAppender(const tstring& id, const tstring & h,
     int p, const tstring & f)
     : ident (id)
-    , facility (parseFacility (helpers::toLower (f)))
     , appendFunc (&SysLogAppender::appendRemote)
+    , facility (parseFacility (helpers::toLower (f)))
     , host (h)
     , port (p)
     , syslogSocket (host, OFstatic_cast(unsigned short, port), true)
diff --git a/ofstd/include/dcmtk/ofstd/diag/asincond.def b/ofstd/include/dcmtk/ofstd/diag/asincond.def
new file mode 100644 (file)
index 0000000..1bab794
--- /dev/null
@@ -0,0 +1,4 @@
+// Clang and GCC don't seem to have such a warning
+#ifdef _MSC_VER
+#pragma warning(disable: 4706)
+#endif
index 69a035f94964d5f503defbf52306540dcc2bc391..85752d058e3ee510da52155c683e2507fba6136b 100644 (file)
@@ -1,6 +1,7 @@
 #if defined(__clang__)
 #pragma clang diagnostic ignored "-Wconversion"
-#elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0)
+/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */
+#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) )
 #pragma GCC diagnostic ignored "-Wconversion"
 #elif defined(_MSC_VER)
 #pragma warning(disable: 4244)
diff --git a/ofstd/include/dcmtk/ofstd/diag/constexp.def b/ofstd/include/dcmtk/ofstd/diag/constexp.def
new file mode 100644 (file)
index 0000000..3fe061a
--- /dev/null
@@ -0,0 +1,4 @@
+// Clang and GCC don't seem to have such a warning
+#ifdef _MSC_VER
+#pragma warning(disable: 4127)
+#endif
diff --git a/ofstd/include/dcmtk/ofstd/diag/ignrattr.def b/ofstd/include/dcmtk/ofstd/diag/ignrattr.def
new file mode 100644 (file)
index 0000000..7270bc8
--- /dev/null
@@ -0,0 +1,12 @@
+#if defined(__clang__)
+#pragma clang diagnostic ignored "-Wignored-attributes"
+
+/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(6,0,0) */
+#elif ( defined(__GNUC__) && (__GNUC__ >= 6 ) )
+#pragma GCC diagnostic ignored "-Wignored-attributes"
+
+// Visual Studio does not seem to have such a warning yet,
+// uncomment and replace ? when it does:
+//#elif DCMTK_DIAGNOSTIC_MIN_MSC_VER(????)
+//#pragma warning(disable: ????)
+#endif
diff --git a/ofstd/include/dcmtk/ofstd/diag/memacces.def b/ofstd/include/dcmtk/ofstd/diag/memacces.def
new file mode 100644 (file)
index 0000000..67876ee
--- /dev/null
@@ -0,0 +1,8 @@
+#if defined(__clang__)
+/* no such warning in Clang */
+/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(8,0,0) */
+#elif ( defined(__GNUC__) && (__GNUC__ >= 8 ) )
+#pragma GCC diagnostic ignored "-Wclass-memaccess"
+#elif defined(_MSC_VER)
+/* no such warning in MSVC */
+#endif
index 181cdb18f32f9b66d94199ad4ab1bfb0a91e4ce0..6cf2b4fec8cbf536148d7122b27399b79d52bc09 100644 (file)
@@ -1,6 +1,7 @@
 #if defined(__clang__)
 #pragma clang diagnostic ignored "-Winteger-overflow"
-#elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0)
+/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */
+#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) )
 #pragma GCC diagnostic ignored "-Woverflow"
 #elif defined(_MSC_VER)
 #pragma warning(disable: 4307)
diff --git a/ofstd/include/dcmtk/ofstd/diag/pessmove.def b/ofstd/include/dcmtk/ofstd/diag/pessmove.def
new file mode 100644 (file)
index 0000000..36a1a38
--- /dev/null
@@ -0,0 +1,8 @@
+#if ( defined(__clang__) && (__clang_major__ >= 4) )
+#pragma clang diagnostic ignored "-Wpessimizing-move"
+/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(9,0,0) */
+#elif ( defined(__GNUC__) && (__GNUC__ >= 9 ) )
+#pragma GCC diagnostic ignored "-Wpessimizing-move"
+#elif defined(_MSC_VER)
+/* no such warning in MSVC */
+#endif
index e3aa71976a2ca6926f2838a2e3368be91ea1628b..3aeb34452857f43bf35ffc5888f2b60624045c89 100644 (file)
@@ -1,6 +1,7 @@
 #if defined(__clang__)
 #pragma clang diagnostic pop
-#elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0)
+/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */
+#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) )
 #pragma GCC diagnostic pop
 #elif defined(_MSC_VER)
 #pragma warning(pop)
index 2283e0e4500c0ea8cba3f8ab6b7f0f79406ce93e..f2ea32ff9c8d9a672a9e2c9903efc0822ba5c169 100644 (file)
@@ -1,6 +1,7 @@
 #if defined(__clang__)
 #pragma clang diagnostic push
-#elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0)
+/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */
+#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) )
 #pragma GCC diagnostic push
 #elif defined(_MSC_VER)
 #pragma warning(push)
index 31a8673e2c9ff91edea0ec6231c1e23da49c525e..c4c64645019ea1e770969a39b3145c85872e6996 100644 (file)
@@ -1,6 +1,7 @@
 #if defined(__clang__)
 #pragma clang diagnostic ignored "-Wshadow"
-#elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0)
+/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */
+#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) )
 #pragma GCC diagnostic ignored "-Wshadow"
 // Visual Studio doesn't seem to have such a warning yet, uncomment
 // and replace ???? when it does
index 95d5e378f1b9fc510384e179b07d5f4720657848..06f79829490e7eef430fdc797ff6aadf98df6d54 100644 (file)
@@ -1,6 +1,7 @@
 #if defined(__clang__)
 #pragma clang diagnostic ignored "-Wsign-compare"
-#elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0)
+/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */
+#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) )
 #pragma GCC diagnostic ignored "-Wsign-compare"
 #elif defined(_MSC_VER)
 #pragma warning(disable: 4018)
diff --git a/ofstd/include/dcmtk/ofstd/diag/slfassov.def b/ofstd/include/dcmtk/ofstd/diag/slfassov.def
new file mode 100644 (file)
index 0000000..7506a95
--- /dev/null
@@ -0,0 +1,4 @@
+// GCC and MSVC don't seem to have such a warning
+#if ( defined(__clang__) && (__clang_major__ >= 6) )
+#pragma clang diagnostic ignored "-Wself-assign-overloaded"
+#endif
diff --git a/ofstd/include/dcmtk/ofstd/diag/stralias.def b/ofstd/include/dcmtk/ofstd/diag/stralias.def
new file mode 100644 (file)
index 0000000..ce717d4
--- /dev/null
@@ -0,0 +1,8 @@
+#if defined(__clang__)
+#pragma clang diagnostic ignored "-Wstrict-aliasing"
+/* The next line is equivalent to #elif DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(4,6,0) */
+#elif ( defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6 ) ) )
+#pragma GCC diagnostic ignored "-Wstrict-aliasing"
+#elif defined(_MSC_VER)
+/* no such warning on MSVC */
+#endif
diff --git a/ofstd/include/dcmtk/ofstd/diag/unreachb.def b/ofstd/include/dcmtk/ofstd/diag/unreachb.def
new file mode 100644 (file)
index 0000000..0ce6825
--- /dev/null
@@ -0,0 +1,4 @@
+// For now we only define a MSVC pragma
+#ifdef _MSC_VER
+#pragma warning(disable: 4702)
+#endif
diff --git a/ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def b/ofstd/include/dcmtk/ofstd/diag/vsdeclpd.def
new file mode 100644 (file)
index 0000000..4e5bbfb
--- /dev/null
@@ -0,0 +1,4 @@
+// Clang and GCC don't seem to have such a warning
+#ifdef _MSC_VER
+#pragma warning(disable: 4324)
+#endif
diff --git a/ofstd/include/dcmtk/ofstd/diag/vsobjdes.def b/ofstd/include/dcmtk/ofstd/diag/vsobjdes.def
new file mode 100644 (file)
index 0000000..3291e53
--- /dev/null
@@ -0,0 +1,4 @@
+// Clang and GCC don't seem to have such a warning
+#ifdef _MSC_VER
+#pragma warning(disable: 4611)
+#endif
index 6969a54b2f4b4cafd0ba6946d15a4ccafd677f14..bbfd53ff70fcc7d6106b7e4210505891f9b87555 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2018, OFFIS e.V.
+ *  Copyright (C) 2018-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,9 +26,6 @@
 
 #include "dcmtk/config/osconfig.h"
 
-#define INCLUDE_CASSERT
-#include "dcmtk/ofstd/ofstdinc.h"
-
 /** @file ofassert.h
  *  Including run time and compile time assertion features and implementing
  *  fallback implementations for the ones that are not available.
@@ -39,7 +36,7 @@
 #define OFstatic_assert static_assert
 #else // HAVE_STATIC_ASSERT
 template<OFBool>
-class OFstatic_assert_t;
+struct OFstatic_assert_t;
 template<>
 struct OFstatic_assert_t<OFTrue> { OFstatic_assert_t( const char* = OFnullptr ) {} };
 #define OFstatic_assert( E, M ) OFstatic_assert_t<E>(M);
index b1eb5d03f82f90ddcfcc0f719afaa8058cfc041e..3598110097e734f8942a27430d2f38278072a2a4 100755 (executable)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2019, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/ofstd/ofcast.h"
 #include "dcmtk/ofstd/ofdefine.h"
+#include "dcmtk/ofstd/oftypes.h"
 
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDINT
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cstring>
 
 /*---------------------*
  *  class declaration  *
@@ -155,14 +154,7 @@ class OFBitmanipTemplate
     static void zeroMem(T *dest,
                         const size_t count)
     {
-#ifdef HAVE_MEMZERO
-        memzero(dest, count * sizeof(T));
-#else
-        size_t i;
-        T *q = dest;
-        for (i = count; i != 0; --i)
-            *q++ = 0;
-#endif
+        memset(dest, 0, count * sizeof(T));
     }
 };
 
index 53fcc107ee9a6cbb090f3faa60d0ad10a14debaa..0b99f7b1e0ac4d6b50fa02bd7ea2ade751ab2553 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2019, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofconsol.h"
 #include "dcmtk/ofstd/offile.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /*--------------------*
  *  macro definition  *
  *--------------------*/
index f711392853c9b6c60cacb720159cacc2f4d4c7f4..dcfd5190edbd23107390970e5b46dad112c9bd4c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2018, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/oftypes.h"    /* for class OFBool */
 #include "dcmtk/ofstd/ofstring.h"   /* for class OFString */
 #include "dcmtk/ofstd/ofcast.h"
-
-#define INCLUDE_CSTRING             /* for strdup() */
-#define INCLUDE_CSTDLIB             /* for free() */
-#include "dcmtk/ofstd/ofstdinc.h"
-
+#include <cstring>
+#include <cstdlib>                  /* for free() */
 
 // include this file in doxygen documentation
 
index edc83704f05da90316f297257d578b85312c0c4b..52d4750175227a0dfcfea0295495954c2397a16c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2011, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,9 +28,6 @@
 #include "dcmtk/ofstd/ofstack.h"
 #include "dcmtk/ofstd/ofstream.h"
 
-#define INCLUDE_CSTDIO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 /*
  *  Short description of configuration file structure:
  *    - The data in a configuration file have a tree structure.
index 03d0ab46c2c5c9ca4946a00da94418a5fea57991..294934d66553955222aba6f35a2fb397fb4927de 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2018, OFFIS e.V.
+ *  Copyright (C) 1999-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/ofthread.h"
 
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
-
-
 /** Singleton class which provides thread-safe access to the standard console
  *  output and error streams. Allows multiple threads to concurrently create
  *  output even if that output is redirected to file or memory.
@@ -202,6 +198,14 @@ public:
    */
   static OFConsole& instance();
 
+  /** redirect stderr to stdout on file descriptor level
+   */
+  static void mergeStderrStdout();
+
+  /** remove a redirection of stderr to stdout on file descriptor level
+   */
+  static void unmergeStderrStdout();
+
 private:
 
   /** default constructor. After construction, the cout methods refer to the
@@ -226,6 +230,9 @@ private:
   /** true if streams are combined, false otherwise */
   int joined;
 
+  /** file descriptor for stderr, if redirected on FILE I/O level */
+  static int old_stderr;
+
 #ifdef WITH_THREADS
   /** mutex protecting access to cout
    *  @remark This member is only available if DCMTK is compiled with thread
index 3ce721f1a8a66b7e0c441c1b59156866c4a2d85b..8e55129188db644420a8c98636fd6b35c5154490 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1994-2017, OFFIS e.V.
+ *  Copyright (C) 1994-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,9 +26,7 @@
 #include "dcmtk/ofstd/ofcast.h"
 #include "dcmtk/ofstd/ofexport.h"
 
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
+#include <cstring>
 
 #ifdef ofstd_EXPORTS
 #define DCMTK_OFSTD_EXPORT DCMTK_DECL_EXPORT
 #define DCMTK_OFSTD_EXPORT DCMTK_DECL_IMPORT
 #endif
 
-
-#ifdef HAVE_BZERO
-#ifndef HAVE_PROTOTYPE_BZERO
-BEGIN_EXTERN_C
-extern void bzero(char* s, int len);
-END_EXTERN_C
-#endif
-#endif
-
-
-/* memzero */
-#ifdef HAVE_MEMSET
-#  undef memzero
-#  define memzero(d, n) memset((d), 0, (n))
-#  define HAVE_MEMZERO /* This makes using this easier */
-#else
-#  ifdef HAVE_BZERO
-#    undef memzero
-// some platforms, e.g. OSF1, require the first parameter to be char *.
-#    define memzero(d, n) bzero(OFstatic_cast(char *, d), (n))
-#    define HAVE_MEMZERO /* This makes using this easier */
-#  endif
-#endif
-
 /* memcpy */
 #ifndef HAVE_MEMCPY
 #  ifdef HAVE_BCOPY
diff --git a/ofstd/include/dcmtk/ofstd/ofdeprec.h b/ofstd/include/dcmtk/ofstd/ofdeprec.h
new file mode 100644 (file)
index 0000000..fef0057
--- /dev/null
@@ -0,0 +1,86 @@
+/*
+ *
+ *  Copyright (C) 2021, OFFIS e.V.
+ *  All rights reserved.  See COPYRIGHT file for details.
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    OFFIS e.V.
+ *    R&D Division Health
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *
+ *  Module:  ofstd
+ *
+ *  Author:  Jan Schlamelcher
+ *
+ *  Purpose: Marking functions as deprecated that shall no longer be used
+ *
+ */
+
+#ifndef OFDEPREC_H
+#define OFDEPREC_H
+
+#ifdef DOXYGEN
+
+/*! @file ofdeprec.h
+ *  @brief Defines macros for marking functions as deprecated
+ *  @details #include "dcmtk/ofstd/ofdeprec.h"
+ */
+
+/*! @brief A macro for marking a function as deprecated.
+ *  @details
+ *  <h3>Example</h3>
+ *  @code{.cpp}
+ *  OFdeprecated void myFunction() {...}
+ *  @endcode
+ *  @details
+ *  If the compiler supports function deprecation, using this macro will lead
+ *  to a diagnostic message being emitted whenever the marked function is
+ *  used.
+ */
+#define OFdeprecated <unspecified>
+
+/*! @brief A macro for marking a function as deprecated with a custom message.
+ *  @param MESSAGE the message to print as part of the diagnostic output.
+ *  @details
+ *  <h3>Example</h3>
+ *  @code{.cpp}
+ *  OFdeprecated_msg("use myNewFunction() instead") void myFunction() {...}
+ *  void myNewFunction() {...}
+ *  @endcode
+ *  @details
+ *  If the compiler supports function deprecation with a custom message, using
+ *  this macro will lead to a diagnostic message including the custom message
+ *  being emitted whenever the marked function is used.
+ *  If the compiler does not support custom messages, it will fall back to
+ *  OFdeprecated.
+ */
+#define OFdeprecated_msg(MESSAGE) <unspecified>
+
+#else // DOXYGEN
+
+#ifdef HAVE_CXX14_DEPRECATED_ATTRIBUTE
+#define OFdeprecated [[deprecated]]
+#elif defined(HAVE_ATTRIBUTE_DEPRECATED)
+#define OFdeprecated __attribute__((deprecated))
+#elif defined(HAVE_DECLSPEC_DEPRECATED)
+#define OFdeprecated __declspec(deprecated)
+#else
+#define OFdeprecated
+#endif
+
+#ifdef HAVE_CXX14_DEPRECATED_ATTRIBUTE_MSG
+#define OFdeprecated_msg(MESSAGE) [[deprecated(#MESSAGE)]]
+#elif defined(HAVE_ATTRIBUTE_DEPRECATED_MSG)
+#define OFdeprecated_msg(MESSAGE) __attribute__((deprecated(#MESSAGE)))
+#elif defined(HAVE_DECLSPEC_DEPRECATED_MSG)
+#define OFdeprecated_msg(MESSAGE) __declspec(deprecated(#MESSAGE))
+#else
+#define OFdeprecated_msg(MESSAGE) OFdeprecated
+#endif
+
+#endif // NOT DOXYGEN
+
+#endif // OFDEPREC_H
index 247f0505bc455a33d8ba96c29247e6f3fd73ab4a..31247e1e014afae2aaa1e6c1601f3974128fde3a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016, OFFIS e.V.
+ *  Copyright (C) 2016-2022, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
  */
 #define DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_PERFORMANCE_WARNING <unspecified>
 
+/*! @brief A macro to disable warnings about a conditional expression being constant
+ *  @note The macro may only be used in conjunction with <i>#include</i>!
+ *  @remarks The warning indicates that a conditional expression will always yield
+ *    the same result. In C++17, the "if constexpr" statement should be used in this case,
+ *    but DCMTK does not (yet) expect a fully C++17 compliant compiler.
+ *  @see DCMTK_DIAGNOSTIC_PUSH for an example.
+ */
+#define DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING <unspecified>
+
+/*! @brief A macro to disable warnings about a self-assignment of a variable
+ *  using an overloaded operator.
+ *  @note The macro may only be used in conjunction with <i>#include</i>!
+ *  @see DCMTK_DIAGNOSTIC_PUSH for an example.
+ */
+#define DCMTK_DIAGNOSTIC_IGNORE_SELF_ASSIGN_OVERLOADED_WARNING <unspecified>
+
+/*! @brief A macro to disable warnings about an assignment within a conditional expression
+ *  @note The macro may only be used in conjunction with <i>#include</i>!
+ *  @remarks The warning indicates that an assignment takes place within a
+ *    conditional expression, which might indicate that "=" was used erroneously instead of "==".
+ *  @see DCMTK_DIAGNOSTIC_PUSH for an example.
+ */
+#define DCMTK_DIAGNOSTIC_IGNORE_ASSIGNMENT_IN_COND_EXPRESSION_WARNING <unspecified>
+
+/*! @brief A macro to disable warnings about raw memory access to class structures
+ *  @note The macro may only be used in conjunction with <i>#include</i>!
+ *  @remarks The warning indicates that the destination of a call to a raw memory
+ *    function such as memset or memcpy is an object of class type, and when writing
+ *    into such an object might bypass the class non-trivial or deleted constructor
+ *    or copy assignment, violate const-correctness or encapsulation, or corrupt
+ *    virtual table pointers.
+ *  @see DCMTK_DIAGNOSTIC_PUSH for an example.
+ */
+#define DCMTK_DIAGNOSTIC_IGNORE_CLASS_MEMACCESS_WARNING <unspecified>
+
+/*! @brief A macro to disable warnings about pessimizing use of std::move().
+ *  @note The macro may only be used in conjunction with <i>#include</i>!
+ *  @remarks The warning indicates that moving a local object in a return
+ *    statement prevents copy elision and thus causes less efficient code
+ *    to be generated.
+ *  @see DCMTK_DIAGNOSTIC_PUSH for an example.
+ */
+#define DCMTK_DIAGNOSTIC_IGNORE_PESSIMIZING_MOVE_WARNING <unspecified>
+
+/*! @brief A macro to disable warnings about code that breaks strict
+ *  aliasing rules
+ *  @note The macro may only be used in conjunction with <i>#include</i>!
+ *  @remarks The warning indicates that certain code constructs will
+ *    break strict aliasing rules, such as dereferencing a type-punned pointer.
+ *  @see DCMTK_DIAGNOSTIC_PUSH for an example.
+ */
+#define DCMTK_DIAGNOSTIC_IGNORE_STRICT_ALIASING_WARNING <unspecified>
+
+/*! @brief A macro to disable Visual Studio warnings about structure
+ *    padding due to __declspec(align).
+ *  @note The macro may only be used in conjunction with <i>#include</i>!
+ *  @remarks The warning indicates that a certain structure has been
+ *    padded at the end because of a __declspec(align) declaration.
+ *  @see DCMTK_DIAGNOSTIC_PUSH for an example.
+ */
+#define DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING <unspecified>
+
+/*! @brief A macro to disable Visual Studio warnings about non-portability
+ *    of the interaction between a function like setjmp and C++ object destruction
+ *  @note The macro may only be used in conjunction with <i>#include</i>!
+ *  @remarks The warning indicates that on some platforms, functions
+ *    that include 'catch' may not support C++ object semantics of
+ *    destruction when out of scope.
+ *  @see DCMTK_DIAGNOSTIC_PUSH for an example.
+ */
+#define DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING <unspecified>
+
+/*! @brief A macro to disable warnings about unreachable code
+ *  @note The macro may only be used in conjunction with <i>#include</i>!
+ *  @see DCMTK_DIAGNOSTIC_PUSH for an example.
+ */
+#define DCMTK_DIAGNOSTIC_IGNORE_UNREACHABLE_CODE_WARNING <unspecified>
+
+/*! @brief A macro to disable warnings about ignored attributes due to attribute redeclaration
+ *  @note The macro may only be used in conjunction with <i>#include</i>!
+ *  @see DCMTK_DIAGNOSTIC_PUSH for an example.
+ */
+#define DCMTK_DIAGNOSTIC_IGNORE_ATTRIBUTE_REDECLARATION <unspecified>
+
 #else // DOXYGEN
 
 #define DCMTK_DIAGNOSTIC_PUSH "dcmtk/ofstd/diag/push.def"
 #define DCMTK_DIAGNOSTIC_IGNORE_SHADOW "dcmtk/ofstd/diag/shadow.def"
 #define DCMTK_DIAGNOSTIC_IGNORE_NO_SUITABLE_DEFINITION_FOR_TEMPLATE_INSTANTIATION "dcmtk/ofstd/diag/nsdfti.def"
 #define DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_PERFORMANCE_WARNING "dcmtk/ofstd/diag/vsprfw.def"
+#define DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING "dcmtk/ofstd/diag/constexp.def"
+#define DCMTK_DIAGNOSTIC_IGNORE_SELF_ASSIGN_OVERLOADED_WARNING "dcmtk/ofstd/diag/slfassov.def"
+#define DCMTK_DIAGNOSTIC_IGNORE_ASSIGNMENT_IN_COND_EXPRESSION_WARNING "dcmtk/ofstd/diag/asincond.def"
+#define DCMTK_DIAGNOSTIC_IGNORE_CLASS_MEMACCESS_WARNING "dcmtk/ofstd/diag/memacces.def"
+#define DCMTK_DIAGNOSTIC_IGNORE_PESSIMIZING_MOVE_WARNING "dcmtk/ofstd/diag/pessmove.def"
+#define DCMTK_DIAGNOSTIC_IGNORE_STRICT_ALIASING_WARNING "dcmtk/ofstd/diag/stralias.def"
+#define DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_DECLSPEC_PADDING_WARNING "dcmtk/ofstd/diag/vsdeclpd.def"
+#define DCMTK_DIAGNOSTIC_IGNORE_VISUAL_STUDIO_OBJECT_DESTRUCTION_WARNING "dcmtk/ofstd/diag/vsobjdes.def"
+#define DCMTK_DIAGNOSTIC_IGNORE_UNREACHABLE_CODE_WARNING "dcmtk/ofstd/diag/unreachb.def"
+#define DCMTK_DIAGNOSTIC_IGNORE_ATTRIBUTE_REDECLARATION "dcmtk/ofstd/diag/ignrattr.def"
 
 // readable shorthands for compiler version checks
 #define DCMTK_DIAGNOSTIC_MIN_GCC_VERSION(MAJOR, MINOR, PATCH)\
index 6898aaa2500c8ce7e64cf6b034ee1b6774e2ffc8..f385b82e62f3be417df468861d6a699676dc66d4 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017-2018, OFFIS e.V.
+ *  Copyright (C) 2017-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -37,8 +37,6 @@ inline const OFerror_category& OFgeneric_category() { return STD_NAMESPACE gener
 
 #else // fallback implementations
 
-#define INCLUDE_CERRNO
-#include "dcmtk/ofstd/ofstdinc.h"
 
 #include "dcmtk/ofstd/ofstring.h"
 
index 6446e0af7ceb455da57d7028685d2da3d31d0983..18f72af7565f8dd88b63daeb225a75e377be2e3c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2006-2020, OFFIS e.V.
+ *  Copyright (C) 2006-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofstring.h"   /* for class OFString */
 #include "dcmtk/ofstd/ofstd.h"      /* for class OFStandard */
 
-#define INCLUDE_UNISTD
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#define INCLUDE_CERRNO
-//#define INCLUDE_CWCHAR    /* not yet implemented in "ofstdinc.h" */
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cstdio>
+#include <cstdlib>
+#include <cerrno>
 
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_STAT_H
@@ -191,12 +187,12 @@ public:
    */
   void swap(OFFilename &arg);
 
-  /** checks whether this object stores an empty filename
+  /** check whether this object stores an empty filename
    *  @return OFTrue if the filename is empty, OFFalse otherwise
    */
   OFBool isEmpty() const;
 
-  /** checks whether this object stores a wide character filename
+  /** check whether this object stores a wide character filename
    *  @return OFTrue if the filename uses wide characters, OFFalse otherwise
    */
   inline OFBool usesWideChars() const
@@ -229,6 +225,26 @@ public:
   }
 #endif
 
+  /** check whether the standard input or output streams should be used by
+   *  comparing the filename with "-"
+   *  @return OFTrue if stdin or stdout should be used, OFFalse otherwise
+   */
+  OFBool isStandardStream() const
+  {
+    OFBool result = OFFalse;
+#if defined(WIDE_CHAR_FILE_IO_FUNCTONS) && defined(_WIN32)
+    if (usesWideChars())
+    {
+        result = (wcscmp(getWideCharPointer(), L"-") == 0);
+    } else
+#endif
+    if (getCharPointer() != NULL)
+    {
+        result = (strcmp(getCharPointer(), "-") == 0);
+    }
+    return result;
+  }
+
   /** replace currently stored filename by given value
    *  @param filename filename to be stored (8-bit characters, e.g. UTF-8)
    *  @param convert  convert given filename to wide character encoding as an
@@ -312,7 +328,7 @@ DCMTK_OFSTD_EXPORT STD_NAMESPACE ostream &operator<<(STD_NAMESPACE ostream &stre
  *  on Unix platforms are based on errno and strerror/strerror_r, but may be based
  *  on other mechanisms on platforms where errno does not exist.
  */
-class OFFile
+class DCMTK_OFSTD_EXPORT OFFile
 {
 public:
   /// default constructor, creates an object that is not associated with any file.
@@ -431,17 +447,7 @@ public:
    *  @param modes "r" or "w"
    *  @return true if pipe was successfully created, false otherwise
    */
-  OFBool popen(const char *command, const char *modes)
-  {
-    if (file_) fclose();
-#ifdef HAVE_POPEN
-    file_ = :: popen(command, modes);
-#else
-    file_ = _popen(command, modes);
-#endif
-    if (file_) popened_ = OFTrue; else storeLastError();
-    return (file_ != NULL);
-  }
+  OFBool popen(const char *command, const char *modes);
 
   /** opens the file whose name is the string pointed to by path and associates
    *  the stream pointed maintained by this object with it. The original stream
@@ -491,29 +497,7 @@ public:
    *  maintained by this object results in undefined behaviour.
    *  @return 0 upon success, EOF otherwise, in which case the error code is set.
    */
-  int fclose()
-  {
-    int result = 0;
-    if (file_)
-    {
-      if (popened_)
-      {
-#ifdef HAVE_PCLOSE
-        result = :: pclose(file_);
-#else
-        result = _pclose(file_);
-#endif
-      }
-      else
-      {
-        result = STDIO_NAMESPACE fclose(file_);
-      }
-      // After calling fclose() once, the FILE* is gone even if fclose() failed.
-      file_ = NULL;
-    }
-    if (result) storeLastError();
-    return result;
-  }
+  int fclose();
 
   /** waits for the associated process (created with popen) to terminate and
    *  returns the exit status of the command as returned by wait4.
@@ -839,7 +823,6 @@ public:
    */
   offile_off_t ftell()
   {
-    offile_off_t result;
 #ifdef _WIN32
     // Windows does not have a 64-bit ftell, and _telli64 cannot be used
     // because it operates on file descriptors and ignores FILE buffers.
@@ -851,8 +834,9 @@ public:
       storeLastError();
       return -1;
     }
-    return pos;
+    return OFstatic_cast(offile_off_t, pos);
 #else
+    offile_off_t result;
 #ifdef HAVE_FSEEKO
 #ifdef EXPLICIT_LFS_64
     result = :: ftello64(file_);
@@ -861,10 +845,10 @@ public:
 #endif
 #else
     result = STDIO_NAMESPACE ftell(file_);
-#endif
 #endif
     if (result < 0) storeLastError();
     return result;
+#endif
   }
 
   /** alternate interface equivalent to ftell, storing the current value of the
index 01bf4e9b6ac3ade9e4fab260cfb4982ba557548d..321fca1c6ba3745fe6c66ced19706f05bdc4e509 100644 (file)
@@ -52,6 +52,28 @@ class OFdirectory_iterator;
 class DCMTK_OFSTD_EXPORT OFpath
 {
 public:
+    /** Determines how string representations of pathnames are interpreted by
+     *  the constructors of OFpath.
+     *  @note Since native_format and generic_format are the same on Unix like
+     *    systems, using auto_format will have no effect on them, i.e. the path
+     *    is expected to use slash ('/') as the separator on Unix like systems.
+     */
+    enum format
+    {
+        /** Native pathname format.
+         */
+        native_format,
+
+        /** Generic pathname format.
+         */
+        generic_format,
+
+        /** Implementation-defined pathname format, auto-detected where
+         *  possible.
+         */
+        auto_format
+    };
+
     /** The path separator used in the native path syntax, i.e.\ '\' on Windows
      *  and '/' everywhere else.
      */
@@ -79,25 +101,21 @@ public:
 
     /** Construct an OFpath from a const char*.
      *  @param cstr a plain old C character string.
+     *  @param fmt specifies how cstr is to be interpreted, e.g. what character
+     *    to expect as the separator or whether to auto detect it.
      *  @warning This constructor does not exists in the real
      *    std::filesystem::path, where various character strings (e.g. char*
      *    and wchar_t*) are handled uniformly by one of the template
      *    constructors.
-     *  @note Automatic path conversion (e.g. replacing all '/' with '\' on
-     *    Windows) is currently not available, which is why this constructor
-     *    lacks the second parameter "format" and instead always expects
-     *    the argument to be given in the native format.
      */
-    OFpath( const char* const cstr );
+    OFpath( const char* const cstr, format fmt = auto_format );
 
     /** Constructs an OFpath from an OFString.
      *  @param string an OFString.
-     *  @note Automatic path conversion (e.g. replacing all '/' with '\' on
-     *    Windows) is currently not available, which is why this constructor
-     *    lacks the second parameter "format" and instead always expects
-     *    the argument to be given in the native format.
+     *  @param fmt specifies how the string is to be interpreted, e.g. what
+     *    character to expect as the separator or whether to auto detect it.
      */
-    OFpath( const OFString& string );
+    OFpath( const OFString& string, format fmt = auto_format );
 
     /** Copy-assign another OFpath to this one.
      *  Effectively: this->native() = rhs.native().
@@ -211,6 +229,10 @@ private:
     size_t findRootName() const;
     size_t findFilename() const;
     size_t findExtension() const;
+#ifdef _WIN32
+    // helper function to convert the separator to the native one
+    void convertSeparator(format fmt);
+#endif
     // the actual native string, who would have guessed
     OFString m_NativeString;
 #endif
index 13f731b5e79de6880caaf3712c2f8f9520a099db..a14b524225e25f9179b66de37dda1c6ca8016268 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014-2019, OFFIS e.V.
+ *  Copyright (C) 2014-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -82,10 +82,9 @@ struct OFnumeric_limits<double> : std::numeric_limits<double>
 
 #else // fallback implementations entirely without using the native STL
 
-#define INCLUDE_CLIMITS
-#define INCLUDE_CFLOAT
-#define INCLUDE_CMATH
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <climits>
+#include <cfloat>
+#include <cmath>
 
 /** Enumeration constants of type OFfloat_round_style indicate the rounding style
  *  used by floating-point arithmetics whenever a result of an expression is stored
@@ -153,7 +152,7 @@ struct OFnumeric_limits
      */
     static const OFBool is_specialized;
 
-    /** <kbd>OFTrue for all signed arithmetic types <i>T</i> and
+    /** <kbd>OFTrue</kbd> for all signed arithmetic types <i>T</i> and
      *  <kbd>OFFalse</kbd> for the unsigned types.
      *  <h3>C++11 standard definitions used:</h3>
      *  T                       | %is_signed
index e5bba2b6bb16bcfe34a7123bcf279fd36b53455f..73c17e0fd0a6e11c29e71c5cf29a150726da23c0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2019, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include <iterator>
 #endif
 
-#define INCLUDE_CASSERT
-#define INCLUDE_CSTDDEF
-#include "dcmtk/ofstd/ofstdinc.h"
+// #define INCLUDE_CASSERT
+// #define INCLUDE_CSTDDEF
+// #include "dcmtk/ofstd/ofstdinc.h"
+#include <cassert>
 
 #define OFLIST_TYPENAME
 
index 528a2d45f19a9bf68eec8800ee9d7bfd29ee0b58..35dd3f4e2290af60d4b9bc96ec93f6a6eb3f27c2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2010, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,9 +26,6 @@
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/ofstd/oftypes.h"
 
-#define INCLUDE_CSTDDEF               /* For NULL */
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #define STARTING_SIZE 8
 
 /** This abstract template class provides a data structure and operations for administrating a
index d27262245141120ce9f3ad83712e429622499bc3..7451067bdc8806f21261e316eef655363dedfddf 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017-2018, OFFIS e.V.
+ *  Copyright (C) 2017-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #define OFSOCKAD_H
 
 #include "dcmtk/config/osconfig.h" // make sure OS specific configuration is included first
-#include "dcmtk/ofstd/ofdefine.h"  // for memzero()
+#include "dcmtk/ofstd/ofdefine.h"
 #include "dcmtk/ofstd/ofstream.h"
 
+BEGIN_EXTERN_C
+END_EXTERN_C
+
+#ifdef HAVE_WINDOWS_H
+#include <winsock2.h>
+#include <ws2tcpip.h>    /* for struct sockaddr_in6 */
+#endif
+
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TYPES_H
 #include <sys/types.h>
 #endif
 #ifdef HAVE_SYS_SOCKET_H
+/* some systems (such as DEC Ultrix) don't protect <sys/socket.h> from double inclusion */
 #ifndef DCOMPAT_SYS_SOCKET_H_
 #define DCOMPAT_SYS_SOCKET_H_
-/* some systems don't protect sys/socket.h (e.g. DEC Ultrix) */
 #include <sys/socket.h>
 #endif
 #endif
+#ifdef HAVE_NETINET_IN_H
+#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
+#include <arpa/inet.h>
+#endif
 END_EXTERN_C
 
 #ifdef HAVE_WINDOWS_H
@@ -44,6 +58,8 @@ END_EXTERN_C
 #include <ws2tcpip.h> /* for socklen_t */
 #endif
 
+#include <cstring> // for memset()
+
 /* forward declarations */
 struct sockaddr;
 struct sockaddr_in;
@@ -56,6 +72,14 @@ struct sockaddr_in6;
 class DCMTK_OFSTD_EXPORT OFSockAddr
 {
 public:
+  union socket_address
+  {
+
+    struct sockaddr         sa;
+    struct sockaddr_in      s4;
+    struct sockaddr_in6     s6;
+    struct sockaddr_storage ss;
+  };
 
   /// Default constructor
   OFSockAddr() { clear(); }
@@ -63,33 +87,33 @@ public:
   /// Destructor
   ~OFSockAddr() { }
 
-  /// initialize address storage object with memzero
-  void clear() { memzero(&sa, sizeof(sa)); }
+  /// initialize address storage object with memset
+  void clear() { memset(&sa, 0, sizeof(sa)); }
 
   /** access socket address storage object as struct sockaddr (opaque address)
    *  @return address storage object as struct sockaddr *.
    */
-  struct sockaddr *getSockaddr() { return OFreinterpret_cast(struct sockaddr *, &sa); }
+  struct sockaddr *getSockaddr() { return &sa.sa; }
 
   /** access socket address storage object as struct sockaddr_in (IPv4 address)
    *  @return address storage object as struct sockaddr_in *.
    */
-  struct sockaddr_in *getSockaddr_in() { return OFreinterpret_cast(struct sockaddr_in *, &sa); }
+  struct sockaddr_in *getSockaddr_in() { return &sa.s4; }
 
   /** access socket address storage object as struct sockaddr_in6 (IPv6 address)
    *  @return address storage object as struct sockaddr_in6 *.
    */
-  struct sockaddr_in6 *getSockaddr_in6() { return OFreinterpret_cast(struct sockaddr_in6 *, &sa); }
+  struct sockaddr_in6 *getSockaddr_in6() { return &sa.s6; }
 
   /** access socket address storage object as const struct sockaddr_in (IPv4 address)
    *  @return address storage object as const struct sockaddr_in *.
    */
-  const struct sockaddr_in *getSockaddr_in_const() const { return OFreinterpret_cast(const struct sockaddr_in *, &sa); }
+  const struct sockaddr_in *getSockaddr_in_const() const { return &sa.s4; }
 
   /** access socket address storage object as const struct sockaddr_in6 (IPv6 address)
    *  @return address storage object as const struct sockaddr_in6 *.
    */
-  const struct sockaddr_in6 *getSockaddr_in6_const() const { return OFreinterpret_cast(const struct sockaddr_in6 *, &sa); }
+  const struct sockaddr_in6 *getSockaddr_in6_const() const { return &sa.s6; }
 
   /** return size of sockaddr struct depending on current protocol family
    *  @return size of sockaddr struct depending on current protocol family
@@ -99,12 +123,12 @@ public:
   /** get current protocol family. Returns 0 if uninitialized, AF_INET or AF_INET6 otherwise.
    *  @return current protocol family of the socket address.
    */
-  short getFamily() const { return sa.ss_family; }
+  short getFamily() const { return sa.ss.ss_family; }
 
   /** set current protocol family.
    *  @param family protocol family, should be AF_INET or AF_INET6.
    */
-  void setFamily(short family) { sa.ss_family = family; }
+  void setFamily(short family) { sa.ss.ss_family = family; }
 
   /** set port number for current protocol family.
    *  Only works if the family has been set to AF_INET or AF_INET6 prior to calling this method.
@@ -117,7 +141,7 @@ private:
   /** container for the socket address structure.
    *  Guaranteed to be large enough for all supported protocol types.
    */
-  struct sockaddr_storage sa;
+  socket_address sa;
 
 };
 
index e0f3bf05cbceb695cc35d82c9d14c4e35ee9a878..bb22aa153e2dc5ce573365a886b0ecfc84e1287a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2017, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -38,9 +38,7 @@
 #define OFStack std::stack
 #else
 
-#define INCLUDE_CASSERT
-#define INCLUDE_CSTDDEF
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cassert>
 
 #ifndef HAVE_CLASS_TEMPLATE
 #error Your C++ compiler cannot handle class templates:
index f2437b9c3e3dfadabaa15b59022d960fccf5e76c..1548e26d04b88bedde6cbab8018735e53cf6267f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2019, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/oflimits.h"   /* for OFnumeric_limits<T>::max() */
 #include "dcmtk/ofstd/oferror.h"
 
-#define INCLUDE_CASSERT
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDARG
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cassert>
+#include <cstdlib>
+#include <cstdio>
+#include <cstring>
+#include <cstdarg>
+#ifdef HAVE_UNISTD_H
+BEGIN_EXTERN_C
+#include <unistd.h>
+END_EXTERN_C
+#endif
 
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TYPES_H
@@ -144,39 +147,39 @@ class DCMTK_OFSTD_EXPORT OFStandard
 #endif
     }
 
-    /* Standard C99 formatted string output function.
-     * This is an implementation of the snprintf(3) function as defined in the
-     * C99 standard. Like all functions of the  printf() family, it produces
-     * output according to a format string. Output is written to the character
-     * array passed as parameter str. The function never writes more than size
-     * bytes and guarantees that the result will be NUL terminated, although
-     * it may be truncated if the buffer provided is too small.
-     * @param str string buffer to write to
-     * @param size size of string buffer, in bytes
-     * @param format printf() format string
-     * @param ... parameters to be formatted
-     * @return number of characters that have been written (if the buffer is
-     *   large enough) or the number of characters that would have been
-     *   written (if the buffer is too small), in both cases not including
-     *   the final NUL character.
+    /** Standard C99 formatted string output function.
+     *  This is an implementation of the snprintf(3) function as defined in the
+     *  C99 standard. Like all functions of the  printf() family, it produces
+     *  output according to a format string. Output is written to the character
+     *  array passed as parameter str. The function never writes more than size
+     *  bytes and guarantees that the result will be NUL terminated, although
+     *  it may be truncated if the buffer provided is too small.
+     *  @param str string buffer to write to
+     *  @param size size of string buffer, in bytes
+     *  @param format printf() format string
+     *  @param ... parameters to be formatted
+     *  @return number of characters that have been written (if the buffer is
+     *    large enough) or the number of characters that would have been
+     *    written (if the buffer is too small), in both cases not including
+     *    the final NUL character.
      */
     static int snprintf(char *str, size_t size, const char *format, ...);
 
-    /* Standard C99 formatted string output function.
-     * This is an implementation of the snprintf(3) function as defined in the
-     * C99 standard. Like all functions of the  printf() family, it produces
-     * output according to a format string. Output is written to the character
-     * array passed as parameter str. The function never writes more than size
-     * bytes and guarantees that the result will be NUL terminated, although
-     * it may be truncated if the buffer provided is too small.
-     * @param str string buffer to write to
-     * @param size size of string buffer, in bytes
-     * @param format printf() format string
-     * @param ap parameters to be formatted
-     * @return number of characters that have been written (if the buffer is
-     *   large enough) or the number of characters that would have been
-     *   written (if the buffer is too small), in both cases not including
-     *   the final NUL character.
+    /** Standard C99 formatted string output function.
+     *  This is an implementation of the snprintf(3) function as defined in the
+     *  C99 standard. Like all functions of the  printf() family, it produces
+     *  output according to a format string. Output is written to the character
+     *  array passed as parameter str. The function never writes more than size
+     *  bytes and guarantees that the result will be NUL terminated, although
+     *  it may be truncated if the buffer provided is too small.
+     *  @param str string buffer to write to
+     *  @param size size of string buffer, in bytes
+     *  @param format printf() format string
+     *  @param ap parameters to be formatted
+     *  @return number of characters that have been written (if the buffer is
+     *    large enough) or the number of characters that would have been
+     *    written (if the buffer is too small), in both cases not including
+     *    the final NUL character.
      */
     static int vsnprintf(char *str, size_t size, const char *format, va_list ap);
 
@@ -981,7 +984,7 @@ class DCMTK_OFSTD_EXPORT OFStandard
      *    be OFTrue.
      *  @tparam Count the number of digits to extract. Must be greater zero
      *    and less or equal to OFnumeric_limits<T>::digits10
-     *  @param string a pointer to a character array to extract digits from.
+     *  @tparam string a pointer to a character array to extract digits from.
      *  @return a value of type T that is equivalent to the number represented
      *    by the digits.
      *  @details
@@ -1020,7 +1023,7 @@ class DCMTK_OFSTD_EXPORT OFStandard
     static OFTypename OFenable_if
     <
         OFnumeric_limits<T>::is_integer && ( Count > 1 ) &&
-             OFnumeric_limits<T>::digits10 >= Count,
+             OFstatic_cast(size_t, OFnumeric_limits<T>::digits10) >= Count,
         T
     >::type extractDigits(const char* string)
     {
@@ -1151,6 +1154,17 @@ class DCMTK_OFSTD_EXPORT OFStandard
      */
     static OFerror_code getLastNetworkErrorCode();
 
+   /** Method that ensures that the current thread is actually sleeping for the
+    *  defined number of seconds (at least).
+    *  The problem with the regular sleep() function called from
+    *  OFStandard::sleep is that it might be interrupted by signals or a
+    *  network timeout (depending on the operating system). This methods
+    *  re-executes OFStandard's sleep method until the desired number of
+    *  seconds have elapsed.
+    *  @param seconds The number of seconds to sleep (at least)
+    */
+    static void forceSleep(Uint32 seconds);
+
  private:
 
     /** private implementation of strlcpy. Called when strlcpy
index dcee816fdb9caa8c0d989d5d145ac6fa584c32dd..bbf4fb78f645e4c02734ee8a38806bf01a80b689 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2018, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -44,351 +44,163 @@ using namespace std;
 #endif
 #endif
 
-/* Header files as defined in ISO/IEC 14882:1998, Section 17.4.1.2, Table 11
- * These are header files for the Standard C++ Library.
+/* Print an error message in case some user code still uses the now unsupported
+ * include macros. A clear error message is better than follow-up errors due to
+ * "suddenly" missing includes.
  */
 
-// define INCLUDE_ALGORITHM to include "ofalgo.h"
 #ifdef INCLUDE_ALGORITHM
-#include "dcmtk/ofstd/ofalgo.h"
+#error "Macro INCLUDE_ALGORITHM not supported anymore. Include 'dcmtk/ofstd/ofalgo.h' instead."
 #endif
 
-// we don't yet support <bitset>, <complex>, <deque>, <exception>, <functional>
-
-// all stream related headers are handled by "ofstream.h"
-#if defined(INCLUDE_IOSFWD) || defined(INCLUDE_IOSTREAM) || defined(INCLUDE_ISTREAM) || \
-    defined(INCLUDE_OSTREAM) || defined(INCLUDE_IOMANIP) || defined(INCLUDE_IOS) || \
-    defined(INCLUDE_FSTREAM) || defined(INCLUDE_SSTREAM)
-#include "dcmtk/ofstd/ofstream.h"
-#endif
-
-// we don't yet support <iterator>, <limits>
-
-// define INCLUDE_LIST to include "oflist.h"
-#ifdef INCLUDE_LIST
-#include "dcmtk/ofstd/oflist.h"
-#endif
-
-// define INCLUDE_LOCALE to include <locale> or <locale.h> if available
-#ifdef INCLUDE_LOCALE
-#ifdef USE_STD_CXX_INCLUDES
-#include <locale>
-#elif defined(HAVE_LOCALE_H)
-#include <locale.h>
-#endif
-#endif
-
-// we don't yet support <numeric>, <queue>, <set>
-
-// define INCLUDE_MAP to include "ofmap.h"
-#ifdef INCLUDE_MAP
-#include "dcmtk/ofstd/ofmap.h"
-#endif
-
-// define INCLUDE_MEMORY to include <memory> or <memory.h> if available
-#ifdef INCLUDE_MEMORY
-#ifdef USE_STD_CXX_INCLUDES
-#include <memory>
-#elif defined(HAVE_MEMORY_H)
-#include <memory.h>
-#endif
-#endif
-
-// define INCLUDE_NEW to include <new> or <new.h> if available
-#ifdef INCLUDE_NEW
-#ifdef USE_STD_CXX_INCLUDES
-#include <new>
-#elif defined(HAVE_NEW_H)
-#include <new.h>
-#endif
-#endif
-
-// define INCLUDE_STACK to include "ofstack.h"
-#ifdef INCLUDE_STACK
-#include "dcmtk/ofstd/ofstack.h"
-#endif
-
-// we don't yet support <stdexcept>
-
-// define INCLUDE_STREAMBUF to include <streambuf> or <streambuf.h> if available
-#ifdef INCLUDE_STREAMBUF
-#ifdef USE_STD_CXX_INCLUDES
-#include <streambuf>
-#elif defined(HAVE_STREAMBUF_H)
-#include <streambuf.h>
-#endif
-#endif
-
-// define INCLUDE_STRING to include "ofstring.h"
-#ifdef INCLUDE_STRING
-#include "dcmtk/ofstd/ofstring.h"
-#endif
-
-// we don't yet support <typeinfo>, <valarray>
-
-// define INCLUDE_VECTOR to include "ofvector.h"
-#ifdef INCLUDE_VECTOR
-#include "dcmtk/ofstd/ofvector.h"
-#endif
-
-
-/* Header files as defined in ISO/IEC 14882:1998, Section 17.4.1.2, Table 12
- * These are header files for the Standard C Library.
- */
-
-// define INCLUDE_CASSERT to include <cassert> or <assert.h> if available
 #ifdef INCLUDE_CASSERT
-#ifdef USE_STD_CXX_INCLUDES
-#include <cassert>
-#elif defined(HAVE_ASSERT_H)
-BEGIN_EXTERN_C
-#include <assert.h>
-END_EXTERN_C
-#endif
+#error "Macro INCLUDE_CASSERT not supported anymore. Include <cassert> directly."
 #endif
 
-// define INCLUDE_CCTYPE to include <cctype> or <ctype.h> if available
 #ifdef INCLUDE_CCTYPE
-#ifdef USE_STD_CXX_INCLUDES
-#include <cctype>
-#elif defined(HAVE_CTYPE_H)
-BEGIN_EXTERN_C
-#include <ctype.h>
-END_EXTERN_C
-#endif
+#error "Macro INCLUDE_CCTYPE not supported anymore. Include <cctype> directly."
 #endif
 
-// define INCLUDE_CERRNO  to include <cerrno> or <errno.h> if available
 #ifdef INCLUDE_CERRNO
-#ifdef USE_STD_CXX_INCLUDES
-#include <cerrno>
-#elif defined(HAVE_ERRNO_H)
-BEGIN_EXTERN_C
-#include <errno.h>
-END_EXTERN_C
-#endif
+#error "Macro INCLUDE_CERRNO not supported anymore. Include <cerrno> directly."
 #endif
 
-// define INCLUDE_CFLOAT  to include <cfloat> or <float.h> if available
 #ifdef INCLUDE_CFLOAT
-#ifdef USE_STD_CXX_INCLUDES
-#include <cfloat>
-#elif defined(HAVE_FLOAT_H)
-BEGIN_EXTERN_C
-#include <float.h>
-END_EXTERN_C
+#error "Macro INCLUDE_CFLOAT not supported anymore. Include <cfloat> directly."
 #endif
+
+#ifdef INCLUDE_CINTTYPES
+#error "Macro INCLUDE_CINTTYPES not supported anymore. Include <inttypes.h> (C99) or <cinttypes> (C++11) directly."
 #endif
 
-// define INCLUDE_CISO646 to include <ciso646> or <iso646.h> if available
 #ifdef INCLUDE_CISO646
-#ifdef USE_STD_CXX_INCLUDES
-#include <ciso646>
-#elif defined(HAVE_ISO646_H)
-BEGIN_EXTERN_C
-#include <iso646.h>
-END_EXTERN_C
-#endif
+#error "Macro INCLUDE_CISO646 not supported anymore. Include <ciso646> directly."
 #endif
 
-// define INCLUDE_CLIMITS to include <climits> or <limits.h> if available
 #ifdef INCLUDE_CLIMITS
-#ifdef USE_STD_CXX_INCLUDES
-#include <climits>
-#elif defined(HAVE_LIMITS_H)
-BEGIN_EXTERN_C
-#include <limits.h>
-END_EXTERN_C
-#endif
+#error "Macro INCLUDE_CLIMITS not supported anymore. Include <climits> directly."
 #endif
 
-// define INCLUDE_CLOCALE to include <clocale> or <locale.h> if available
 #ifdef INCLUDE_CLOCALE
-#ifdef USE_STD_CXX_INCLUDES
-#include <clocale>
-#elif defined(HAVE_LOCALE_H)
-BEGIN_EXTERN_C
-#include <locale.h>
-END_EXTERN_C
-#endif
+#error "Macro INCLUDE_CLOCALE not supported anymore. Include <clocale> directly."
 #endif
 
-// define INCLUDE_CMATH to include <cmath> or <math.h> if available
 #ifdef INCLUDE_CMATH
-#if defined(USE_STD_CXX_INCLUDES) && defined(HAVE_CMATH)
-#include <cmath>
-#elif defined(HAVE_MATH_H)
-#ifndef INCLUDE_MATH_H_AS_CXX
-// some systems use C++ language features in <math.h>
-BEGIN_EXTERN_C
-#endif
-#include <math.h>
-#ifndef INCLUDE_MATH_H_AS_CXX
-END_EXTERN_C
-#endif
-#endif
+#error "Macro INCLUDE_CMATH not supported anymore. Include <cmath> directly."
 #endif
 
-// define INCLUDE_CSETJMP to include <csetjmp> or <setjmp.h> if available
 #ifdef INCLUDE_CSETJMP
-#ifdef USE_STD_CXX_INCLUDES
-#include <csetjmp>
-#elif defined(HAVE_SETJMP_H)
-BEGIN_EXTERN_C
-#include <setjmp.h>
-END_EXTERN_C
-#endif
+#error "Macro INCLUDE_CSETJMP not supported anymore. Include <csetjmp> directly."
 #endif
 
-// define INCLUDE_CSIGNAL to include <csignal> or <signal.h> if available
 #ifdef INCLUDE_CSIGNAL
-#ifdef USE_STD_CXX_INCLUDES
-#include <csignal>
-#elif defined(HAVE_SIGNAL_H)
-BEGIN_EXTERN_C
-#include <signal.h>
-END_EXTERN_C
-#endif
+#error "Macro INCLUDE_CSIGNAL not supported anymore. Include <csignal> directly."
 #endif
 
-// define INCLUDE_CSTDARG to include <cstdarg> or <stdarg.h> if available
 #ifdef INCLUDE_CSTDARG
-#ifdef USE_STD_CXX_INCLUDES
-#include <cstdarg>
-#elif defined(HAVE_STDARG_H)
-BEGIN_EXTERN_C
-#include <stdarg.h>
-END_EXTERN_C
-#endif
+#error "Macro INCLUDE_CSTDARG not supported anymore. Include <cstdarg> directly."
 #endif
 
-// define INCLUDE_CSTDDEF to include <cstddef> or <stddef.h> if available
 #ifdef INCLUDE_CSTDDEF
-#if defined(USE_STD_CXX_INCLUDES) && defined(HAVE_CSTDDEF)
-#include <cstddef>
-#elif defined(HAVE_STDDEF_H)
-BEGIN_EXTERN_C
-#include <stddef.h>
-END_EXTERN_C
-#endif
+#error "Macro INCLUDE_CSTDDEF not supported anymore. Include <cstddef> directly."
 #endif
 
-// define INCLUDE_CSTDDINT to include <cstdint>, <stdint.h> or <sys/types.h> if available
 #ifdef INCLUDE_CSTDINT
-#if defined(USE_STD_CXX_INCLUDES) && defined(HAVE_CSTDINT)
-#include <cstdint>
-#elif defined(HAVE_STDINT_H)
-#include <stdint.h>
-#elif defined(HAVE_SYS_TYPES_H)
-#include <sys/types.h>
-#endif
+#error "Macro INCLUDE_CSTDINT not supported anymore. Include <cstdint> directly."
 #endif
 
-// define INCLUDE_CINTTYPES to include <cinttypes> or <inttypes.h> if available
-#ifdef INCLUDE_CINTTYPES
-// TODO: see DCMTK issues 762, 774 and 778
-//#ifdef USE_STD_CXX_INCLUDES
-//#include <cinttypes>
-//#elif defined(HAVE_INTTYPES_H)
-#ifdef HAVE_INTTYPES_H
-BEGIN_EXTERN_C
-#include <inttypes.h>
-END_EXTERN_C
+#ifdef INCLUDE_CSTDIO
+#error "Macro INCLUDE_CSTDIO not supported anymore. Include <cstdio> directly."
 #endif
+
+#ifdef INCLUDE_CSTDLIB
+#error "Macro INCLUDE_CSTDLIB not supported anymore. Include <cstdlib> directly."
 #endif
 
-// define INCLUDE_CSTDIO to include <cstdio> or <stdio.h> if available
-#ifdef INCLUDE_CSTDIO
-#ifdef USE_STD_CXX_INCLUDES
-#include <cstdio>
-#elif defined(HAVE_STDIO_H)
-BEGIN_EXTERN_C
-#include <stdio.h>
-END_EXTERN_C
+#ifdef INCLUDE_CSTRING
+#error "Macro INCLUDE_CSTRING not supported anymore. Include <cstring> directly."
 #endif
-// MSVC6 doesn't know vsnprintf(), but it does know _vsnprintf()
-#if defined(_WIN32) && !defined(HAVE_VSNPRINTF)
-#define vsnprintf _vsnprintf
+
+#ifdef INCLUDE_CTIME
+#error "Macro INCLUDE_CTIME not supported anymore. Include <ctime> directly."
 #endif
+
+#ifdef INCLUDE_CWCTYPE
+#error "Macro INCLUDE_CWCTYPE not supported anymore. Include <cwctype> directly."
 #endif
 
-// define INCLUDE_CSTDLIB to include <cstdlib> or <stdlib.h> if available
-#ifdef INCLUDE_CSTDLIB
-#ifdef USE_STD_CXX_INCLUDES
-#include <cstdlib>
-#elif defined(HAVE_STDLIB_H)
-/* workaround for bug in Borland C++ Builder */
-#ifndef __BORLANDC__
-BEGIN_EXTERN_C
+#ifdef INCLUDE_FSTREAM
+#error "Macro INCLUDE_FSTREAM not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead."
 #endif
-#include <stdlib.h>
-#ifndef __BORLANDC__
-END_EXTERN_C
+
+#ifdef INCLUDE_IOMANIP
+#error "Macro INCLUDE_IOMANIP not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead."
 #endif
+
+#ifdef INCLUDE_IOS
+#error "Macro INCLUDE_IOS not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead."
 #endif
+
+#ifdef INCLUDE_IOSFWD
+#error "Macro INCLUDE_IOSFWD not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead."
 #endif
 
-// define INCLUDE_CSTRING to include <cstring> or <string.h> if available
-#ifdef INCLUDE_CSTRING
-#ifdef USE_STD_CXX_INCLUDES
-#include <cstring>
-#elif defined(HAVE_STRING_H)
-BEGIN_EXTERN_C
-#include <string.h>
-END_EXTERN_C
+#ifdef INCLUDE_IOSTREAM
+#error "Macro INCLUDE_IOSTREAM not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead."
 #endif
-// Some platforms define additional string functions like bzero or
-// strcasecmp in <strings.h>, so we always include this file if available.
-#ifdef HAVE_STRINGS_H
-BEGIN_EXTERN_C
-#include <strings.h>
-END_EXTERN_C
+
+#ifdef INCLUDE_ISTREAM
+#error "Macro INCLUDE_ISTREAM not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead."
 #endif
+
+#ifdef INCLUDE_LIBC
+#error "Macro INCLUDE_LIBC not supported anymore. Include <libc.h> directly."
 #endif
 
-// define INCLUDE_CTIME to include <ctime> or <time.h> if available
-#ifdef INCLUDE_CTIME
-#ifdef USE_STD_CXX_INCLUDES
-#include <ctime>
-#elif defined(HAVE_TIME_H)
-BEGIN_EXTERN_C
-#include <time.h>
-END_EXTERN_C
+#ifdef INCLUDE_LIST
+#error "Macro INCLUDE_LIST not supported anymore. Include 'dcmtk/ofstd/oflist.h' instead."
 #endif
+
+#ifdef INCLUDE_LOCALE
+#error "Macro INCLUDE_LOCALE not supported anymore. Include <locale> directly."
 #endif
 
-// define INCLUDE_CWCTYPE to include <cwctype> or <wctype.h> if available
-#ifdef INCLUDE_CWCTYPE
-#ifdef USE_STD_CXX_INCLUDES
-#include <cwctype>
-#elif defined(HAVE_WCTYPE_H)
-BEGIN_EXTERN_C
-#include <wctype.h>
-END_EXTERN_C
+#ifdef INCLUDE_MAP
+#error "Macro INCLUDE_MAP not supported anymore. Include 'dcmtk/ofstd/ofmap.h' instead."
 #endif
+
+#ifdef INCLUDE_MEMORY
+#error "Macro INCLUDE_MEMORY not supported anymore. Include <memory> directly."
 #endif
 
+#ifdef INCLUDE_NEW
+#error "Macro INCLUDE_NEW not supported anymore. Include <new> directly."
+#endif
 
-/* Headers other than ISO C++, such as BSD and Posix.1 headers */
+#ifdef INCLUDE_OSTREAM
+#error "Macro INCLUDE_OSTREAM not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead."
+#endif
 
-// define INCLUDE_LIBC to include <libc.h> if available
-#ifdef INCLUDE_LIBC
-#ifdef HAVE_LIBC_H
-#ifndef INCLUDE_LIBC_H_AS_CXX
-BEGIN_EXTERN_C
+#ifdef INCLUDE_SSTREAM
+#error "Macro INCLUDE_SSTREAM not supported anymore. Include 'dcmtk/ofstd/ofstream.h' instead."
 #endif
-#include <libc.h>
-#ifndef INCLUDE_LIBC_H_AS_CXX
-END_EXTERN_C
+
+#ifdef INCLUDE_STACK
+#error "Macro INCLUDE_STACK not supported anymore. Include 'dcmtk/ofstd/ofstack.h' instead."
 #endif
+
+#ifdef INCLUDE_STREAMBUF
+#error "Macro INCLUDE_STREAMBUF not supported anymore. Include <streambuf> directly."
 #endif
+
+#ifdef INCLUDE_STRING
+#error "Macro INCLUDE_STRING not supported anymore. Include 'dcmtk/ofstd/ofstring.h' instead."
 #endif
 
-// define INCLUDE_UNISTD to include <unistd.h> if available
 #ifdef INCLUDE_UNISTD
-#ifdef HAVE_UNISTD_H
-BEGIN_EXTERN_C
-#include <unistd.h>
-END_EXTERN_C
+#error "Macro INCLUDE_UNISTD not supported anymore. Include <unistd.h> directly."
 #endif
+
+#ifdef INCLUDE_VECTOR
+#error "Macro INCLUDE_VECTOR not supported anymore. Include 'dcmtk/ofstd/ofvector.h' instead."
 #endif
index 48ed6fdddee797b42cf632cff714a93b029a1de3..852bab2436326863c34f7b149aff5e3386c8d110 100644 (file)
@@ -25,8 +25,6 @@
 
 #include "dcmtk/config/osconfig.h"
 
-#ifdef USE_STD_CXX_INCLUDES
-
 #include <iostream>
 #ifdef HAVE_IOS
 #include <ios>
  * If user code still relies on namespace std to be included, compile with
  * macro USING_STD_NAMESPACE defined.
  */
-#ifdef USING_STD_NAMESPACE
-namespace std { }
-using namespace std;
-#endif
-
-#else /* USE_STD_CXX_INCLUDES */
-
-#include <iostream.h>
-#include <fstream.h>
-// For old STREAMS library: preference for strstream
-#if defined(HAVE_STRSTREA_H) || defined(HAVE_STRSTREAM_H)
-#ifdef HAVE_STRSTREA_H
-#include <strstrea.h>
-#else
-#include <strstream.h>
-#endif
-#elif defined(HAVE_SSTREAM_H)
-#include <sstream.h>
-#define USE_STRINGSTREAM
-#else
-#error DCMTK needs stringstream or strstream type
-#endif
-#include <iomanip.h>
-
-#endif /* USE_STD_CXX_INCLUDES */
+#include "dcmtk/ofstd/ofstdinc.h"
 
 // define STD_NAMESPACE to std:: if the standard namespace exists
 #ifndef STD_NAMESPACE
index 0d0929f09cd84f9c796c4b081eab645c3ef72ea3..fa558aaa99e8c2802b5dc0f1e97a238d0186c2d7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2017, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 ** Declare our own string class
 */
 
-#define INCLUDE_CASSERT
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDLIB
-#define INCLUDE_LIBC
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cassert>
 
 #include "dcmtk/ofstd/ofstream.h"
 #include "dcmtk/ofstd/oftypes.h"
index 18b0b5f375f0379f62768ffa4dcd0d0dfea9f72c..538d0e8ffe66dcb8d8c1342cdb032dee2a79a979 100644 (file)
@@ -105,13 +105,11 @@ public:
     }
 
     /** Execute this test case.
-     *  @param result the list of error messages generated by this test.
      *  @see #OFCHECK(condition)
      */
     virtual void run() = 0;
 
     /** Add a new failure to the result set.
-     *  @param result list of test failures
      *  @param file filename for this failure
      *  @param line line number for this failure
      *  @param message error description.
index bcc62133b3007deeff747e8723c08de1b6fe724e..f17e18f4fb59c28b0e3e9695405777f989046791 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2020, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,9 +25,6 @@
 
 #include "dcmtk/config/osconfig.h"
 
-#define INCLUDE_CTIME
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TYPES_H
 # include <sys/types.h>    /* for struct time_t */
index 436daa032d10b2044b4000650e641d7ffbf2575d..7739cfbcbe14de87cb6be24ba7c6087d0524610b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2019, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 #include "dcmtk/ofstd/ofdefine.h"
 
+// some C++ implementations only define printf format macros like PRIu32
+// when this macro is defined before <inttypes.h> or <cinttypes> are included.
+#define __STDC_FORMAT_MACROS 1
+
 // include this file in doxygen documentation
 
 /** @file oftypes.h
  *  @brief Definition of standard types used throughout the toolkit
  */
 
+#include "dcmtk/ofstd/ofstdinc.h"
+
 // use native types if C++11 is supported
 #ifdef HAVE_CXX11
 #include <cstdint>
 #include <cstddef>
 #include <ostream>
+#include <cinttypes>
 
 #define OFTypename typename
 #define OFlonglong long long
@@ -68,11 +75,17 @@ inline std::ostream& operator<<( std::ostream& o, OFnullptr_t /* unused */ )
 
 #else // fallback definitions
 
-#define INCLUDE_OSTREAM
-#define INCLUDE_CSTDINT
-#define INCLUDE_CSTDDEF
-#define INCLUDE_CINTTYPES
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cstddef>
+BEGIN_EXTERN_C
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+END_EXTERN_C
+
+#include "dcmtk/ofstd/ofstream.h"
 
 typedef signed char     Sint8;
 typedef unsigned char   Uint8;
index a8bfcee48adc141acd9c171185691d75adb01fab..60873a508d19bbe83ac6049e75621c5e7a208bac 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2010-2018, OFFIS e.V.
+ *  Copyright (C) 2010-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -41,9 +41,8 @@
 
 #else
 
-#define INCLUDE_CASSERT          /* for assert() */
-#define INCLUDE_CSTDLIB          /* for NULL */
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cassert>
+
 #include "dcmtk/ofstd/oftypes.h" /* for OFBool */
 
 /** this is a resizable array. You can add and remove elements after it was
index 052da8b1e02afc8704b757e64ce675b347beb140..7cb9f9e57d2e8920427efefe93547e54e214144d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2016-2017, OFFIS e.V.
+ *  Copyright (C) 2016-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -23,6 +23,7 @@
 #define OFVARIANT_H
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+#include "dcmtk/ofstd/ofdiag.h"
 
 /** @file
  *  Declares OFvariant and related functionality.
 #include <cassert>
 #include <limits>
 
+// suppress warnings generated by old gcc 4.x compiler versions
+#include DCMTK_DIAGNOSTIC_PUSH
+#include DCMTK_DIAGNOSTIC_IGNORE_STRICT_ALIASING_WARNING
+
 template<std::size_t,typename... Alternatives>
 class OFvariant_traits
 {
@@ -373,6 +378,8 @@ ReturnType OFvisit( FN&& fn, const OFvariant<Alternatives...>& v )
     return (v.*visit[v.index()])( std::forward<FN>( fn ) );
 }
 
+#include DCMTK_DIAGNOSTIC_POP
+
 #elif !defined(DOXYGEN) // fallback implementation
 
 // Include the actual implementation (that emulates variadic templates)
@@ -429,7 +436,7 @@ public:
      *  argument.
      *  @tparam T the type of the argument, will be deduced automatically.
      *  @param t an object of type `T` that will be converted to one of the alternatives.
-     *  @precondition There must be at least one alternative that can be constructed from
+     *  @remark There must be at least one alternative that can be constructed from
      *    the given parameter `t` and there must be exactly one such alternative that
      *    takes precedence over the others.
      *  @attention t will be perfectly forwarded if C++11 support is available, i.e. the
index 06d2e85a4656b247b96602f411d58447cef67552..7010e24162cf9cd8dcc63b13e6166bafab7891fc 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2011-2020, OFFIS e.V.
+ *  Copyright (C) 2011-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were slightly modified by
 // DCMTK: we need this header file at the beginning of each file
 #include "dcmtk/config/osconfig.h"
 
-// DCMTK: we want to use our own standard include wrappers
-#define INCLUDE_CSTDLIB
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cstdlib>
+
 #include "dcmtk/ofstd/ofdefine.h"
 
 // DCMTK: The XML parser is compiled in wide char (UTF-16) mode if and only if this macro is defined.
index dee1308a81047347df77300585bab228dbbca921..ce3db53c901bbe1cd45e848adde2c66f78ed07cc 100644 (file)
@@ -1,4 +1,31 @@
 # create library from source files
-DCMTK_ADD_LIBRARY(ofstd ofchrenc ofcmdln ofconapp ofcond ofconfig ofconsol ofcrc32 ofdate ofdatime oferror offile offilsys offname oflist ofstd ofstring ofstrutl ofthread oftime oftimer oftempf ofxml ofuuid ofmath ofsockad ofrand)
+DCMTK_ADD_LIBRARY(ofstd 
+  ofchrenc.cc
+  ofcmdln.cc
+  ofconapp.cc
+  ofcond.cc
+  ofconfig.cc
+  ofconsol.cc
+  ofcrc32.cc
+  ofdate.cc
+  ofdatime.cc
+  oferror.cc
+  offile.cc
+  offilsys.cc
+  offname.cc
+  oflist.cc
+  ofstd.cc
+  ofstring.cc
+  ofstrutl.cc
+  ofthread.cc
+  oftime.cc
+  oftimer.cc
+  oftempf.cc
+  ofxml.cc
+  ofuuid.cc
+  ofmath.cc
+  ofsockad.cc
+  ofrand.cc
+)
 
-DCMTK_TARGET_LINK_LIBRARIES(ofstd ${CHARSET_CONVERSION_LIBS} ${SOCKET_LIBS} ${THREAD_LIBS} ${WIN32_STD_LIBRARIES})
+DCMTK_TARGET_LINK_LIBRARIES(ofstd config ${CHARSET_CONVERSION_LIBS} ${SOCKET_LIBS} ${THREAD_LIBS} ${WIN32_STD_LIBRARIES})
index ad85ec11c3f9b1cd21735e00a9f48eda1ca7c926..879feff1f0a3e0ed83c8af1866f2de53b4f1bcb3 100644 (file)
@@ -6,10 +6,14 @@ ofchrenc.o: ofchrenc.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/ofstd/ofutil.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/ofstd.h \
- ../include/dcmtk/ofstd/oflist.h ../include/dcmtk/ofstd/oflimits.h \
+ ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
+ ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
  ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofdiag.h \
- ../include/dcmtk/ofstd/ofconsol.h
+ ../include/dcmtk/ofstd/ofconsol.h ../include/dcmtk/ofstd/ofthread.h \
+ ../include/dcmtk/ofstd/diag/push.def \
+ ../include/dcmtk/ofstd/diag/shadow.def \
+ ../include/dcmtk/ofstd/diag/pop.def
 ofcmdln.o: ofcmdln.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofcmdln.h ../include/dcmtk/ofstd/oftypes.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
@@ -19,9 +23,10 @@ ofcmdln.o: ofcmdln.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/ofconsol.h \
  ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/offile.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/ofcond.h \
- ../include/dcmtk/ofstd/oflimits.h ../include/dcmtk/ofstd/oferror.h \
- ../include/dcmtk/ofstd/ofchrenc.h ../include/dcmtk/ofstd/ofmem.h \
- ../include/dcmtk/ofstd/ofutil.h \
+ ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofchrenc.h \
+ ../include/dcmtk/ofstd/ofmem.h ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h
 ofconapp.o: ofconapp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofconapp.h ../include/dcmtk/ofstd/oftypes.h \
@@ -33,7 +38,11 @@ ofconapp.o: ofconapp.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofconsol.h ../include/dcmtk/ofstd/ofthread.h \
  ../include/dcmtk/ofstd/offile.h ../include/dcmtk/ofstd/ofstd.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
- ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofexit.h
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofexit.h \
+ ../include/dcmtk/ofstd/ofchrenc.h ../include/dcmtk/ofstd/ofmem.h \
+ ../include/dcmtk/ofstd/ofutil.h \
+ ../include/dcmtk/ofstd/variadic/tuplefwd.h
 ofcond.o: ofcond.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oftypes.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
@@ -47,32 +56,32 @@ ofconfig.o: ofconfig.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstack.h
 ofconsol.o: ofconsol.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofconsol.h ../include/dcmtk/ofstd/ofstream.h \
- ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/oftypes.h \
- ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
- ../include/dcmtk/ofstd/ofexport.h ../include/dcmtk/ofstd/ofstdinc.h \
+ ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofthread.h \
+ ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
+ ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \
  ../include/dcmtk/ofstd/ofstring.h
 ofcrc32.o: ofcrc32.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofcrc32.h ../include/dcmtk/ofstd/ofdefine.h \
- ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \
- ../include/dcmtk/ofstd/ofstdinc.h
+ ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h
 ofdate.o: ofdate.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofdate.h ../include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
  ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \
  ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstream.h
 ofdatime.o: ofdatime.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofdatime.h \
- ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftypes.h \
- ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
- ../include/dcmtk/ofstd/ofexport.h ../include/dcmtk/ofstd/ofstream.h \
+ ../include/dcmtk/ofstd/ofdatime.h ../include/dcmtk/ofstd/ofstring.h \
+ ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
+ ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \
+ ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/ofstd/ofdate.h ../include/dcmtk/ofstd/oftime.h
 oferror.o: oferror.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstd.h \
- ../include/dcmtk/ofstd/oflist.h ../include/dcmtk/ofstd/oftypes.h \
- ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
- ../include/dcmtk/ofstd/ofexport.h ../include/dcmtk/ofstd/ofstream.h \
+ ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
+ ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
+ ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \
+ ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
  ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofdiag.h \
  ../include/dcmtk/ofstd/diag/push.def \
  ../include/dcmtk/ofstd/diag/vsprfw.def \
@@ -84,20 +93,19 @@ offile.o: offile.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstream.h ../include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
- ../include/dcmtk/ofstd/oflimits.h ../include/dcmtk/ofstd/oferror.h \
- ../include/dcmtk/ofstd/offilsys.h ../include/dcmtk/ofstd/ofmem.h \
- ../include/dcmtk/ofstd/ofutil.h \
- ../include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../include/dcmtk/ofstd/ofthread.h
+ ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/offilsys.h \
+ ../include/dcmtk/ofstd/ofmem.h ../include/dcmtk/ofstd/ofutil.h \
+ ../include/dcmtk/ofstd/variadic/tuplefwd.h
 offilsys.o: offilsys.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/offilsys.h \
- ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftypes.h \
- ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
- ../include/dcmtk/ofstd/ofexport.h ../include/dcmtk/ofstd/ofstream.h \
+ ../include/dcmtk/ofstd/offilsys.h ../include/dcmtk/ofstd/ofstring.h \
+ ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
+ ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \
+ ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/ofstd/ofmem.h ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/oftraits.h \
- ../include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../include/dcmtk/ofstd/ofthread.h
+ ../include/dcmtk/ofstd/variadic/tuplefwd.h
 offname.o: offname.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/offname.h ../include/dcmtk/ofstd/oftypes.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
@@ -105,7 +113,9 @@ offname.o: offname.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstream.h ../include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
- ../include/dcmtk/ofstd/oflimits.h ../include/dcmtk/ofstd/oferror.h
+ ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 oflist.o: oflist.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oflist.h ../include/dcmtk/ofstd/oftypes.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
@@ -113,9 +123,9 @@ oflist.o: oflist.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstream.h
 ofmath.o: ofmath.cc ../../config/math.cc \
  ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
  ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \
+ ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/ofstd/ofmath.h ../include/dcmtk/ofstd/oftraits.h
 ofrand.o: ofrand.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofrand.h ../include/dcmtk/ofstd/oftypes.h \
@@ -124,11 +134,13 @@ ofrand.o: ofrand.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstream.h ../include/dcmtk/ofstd/ofstd.h \
  ../include/dcmtk/ofstd/oflist.h ../include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
- ../include/dcmtk/ofstd/oflimits.h ../include/dcmtk/ofstd/oferror.h
+ ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 ofsockad.o: ofsockad.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofsockad.h ../include/dcmtk/ofstd/ofdefine.h \
  ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \
- ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstream.h
+ ../include/dcmtk/ofstd/ofstream.h ../include/dcmtk/ofstd/ofstdinc.h
 ofstd.o: ofstd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -136,6 +148,7 @@ ofstd.o: ofstd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftraits.h \
  ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
  ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/offile.h \
  ../include/dcmtk/ofstd/oftuple.h ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h \
@@ -145,8 +158,10 @@ ofstd.o: ofstd.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/variadic/tuple.h \
  ../include/dcmtk/ofstd/diag/pop.def ../include/dcmtk/ofstd/ofmath.h \
  ../include/dcmtk/ofstd/ofsockad.h ../include/dcmtk/ofstd/ofvector.h \
- ../include/dcmtk/ofstd/ofgrp.h ../include/dcmtk/ofstd/ofpwd.h \
- ../include/dcmtk/ofstd/ofoption.h ../include/dcmtk/ofstd/ofalign.h
+ ../include/dcmtk/ofstd/oftimer.h ../include/dcmtk/ofstd/ofgrp.h \
+ ../include/dcmtk/ofstd/ofpwd.h ../include/dcmtk/ofstd/ofoption.h \
+ ../include/dcmtk/ofstd/ofalign.h \
+ ../include/dcmtk/ofstd/diag/stralias.def
 ofstring.o: ofstring.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftypes.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
@@ -154,7 +169,9 @@ ofstring.o: ofstring.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstream.h ../include/dcmtk/ofstd/ofbmanip.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
- ../include/dcmtk/ofstd/oflimits.h ../include/dcmtk/ofstd/oferror.h
+ ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 ofstrutl.o: ofstrutl.cc ../include/dcmtk/ofstd/ofstrutl.h \
  ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftypes.h \
@@ -169,12 +186,17 @@ oftempf.o: oftempf.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/offname.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
  ../include/dcmtk/ofstd/oferror.h
 ofthread.o: ofthread.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/oftypes.h \
- ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
- ../include/dcmtk/ofstd/ofexport.h ../include/dcmtk/ofstd/ofstdinc.h \
- ../include/dcmtk/ofstd/ofstream.h ../include/dcmtk/ofstd/ofstring.h \
+ ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
+ ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
+ ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \
+ ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofstream.h \
+ ../include/dcmtk/ofstd/ofstring.h ../include/dcmtk/ofstd/oftraits.h \
+ ../include/dcmtk/ofstd/ofcond.h ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofthread.h \
  ../include/dcmtk/ofstd/ofconsol.h
 oftime.o: oftime.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/oftime.h \
@@ -183,11 +205,13 @@ oftime.o: oftime.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofexport.h ../include/dcmtk/ofstd/ofstream.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
- ../include/dcmtk/ofstd/oflimits.h ../include/dcmtk/ofstd/oferror.h
+ ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 oftimer.o: oftimer.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftimer.h ../include/dcmtk/ofstd/ofstream.h \
- ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
- ../include/dcmtk/ofstd/ofexport.h ../include/dcmtk/ofstd/ofstdinc.h
+ ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofdefine.h \
+ ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h
 ofuuid.o: ofuuid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofuuid.h ../include/dcmtk/ofstd/oftypes.h \
  ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
@@ -196,8 +220,11 @@ ofuuid.o: ofuuid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofrand.h ../include/dcmtk/ofstd/ofthread.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/oflist.h \
  ../include/dcmtk/ofstd/oftraits.h ../include/dcmtk/ofstd/ofcond.h \
- ../include/dcmtk/ofstd/oflimits.h ../include/dcmtk/ofstd/oferror.h
+ ../include/dcmtk/ofstd/oflimits.h \
+ ../../config/include/dcmtk/config/arith.h \
+ ../include/dcmtk/ofstd/oferror.h
 ofxml.o: ofxml.cc ../../config/include/dcmtk/config/osconfig.h \
- ../include/dcmtk/ofstd/ofxml.h ../include/dcmtk/ofstd/ofstdinc.h \
- ../include/dcmtk/ofstd/ofdefine.h ../include/dcmtk/ofstd/ofcast.h \
- ../include/dcmtk/ofstd/ofexport.h
+ ../include/dcmtk/ofstd/ofstdinc.h ../include/dcmtk/ofstd/ofdiag.h \
+ ../include/dcmtk/ofstd/ofxml.h ../include/dcmtk/ofstd/ofdefine.h \
+ ../include/dcmtk/ofstd/ofcast.h ../include/dcmtk/ofstd/ofexport.h \
+ ../include/dcmtk/ofstd/diag/memacces.def
index a90cc79d11aa7259c05eb18e9e855392c770a386..5740b28181bcd09f4c101d057307143a305a3717 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2011-2019, OFFIS e.V.
+ *  Copyright (C) 2011-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,9 +26,7 @@
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/ofdiag.h"
 #include "dcmtk/ofstd/ofconsol.h"
-
-#define INCLUDE_CERRNO
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cerrno>
 
 #ifdef HAVE_WINDOWS_H
 #define WIN32_LEAN_AND_MEAN
@@ -376,8 +374,9 @@ class OFCharacterEncoding::Implementation
         // different encoding flags and only has a (varying) fixed functionality
         // that we detect with a configuration test.
         return flags == DCMTK_FIXED_ICONV_CONVERSION_FLAGS;
-#endif
+#else
         return OFFalse;
+#endif
     }
 
     unsigned getConversionFlags() const
@@ -404,8 +403,9 @@ class OFCharacterEncoding::Implementation
         // different encoding flags and only has a (varying) fixed functionality
         // that we detect with a configuration test.
         return DCMTK_FIXED_ICONV_CONVERSION_FLAGS;
-#endif
+#else
         return 0;
+#endif
     }
 
     OFBool setConversionFlags(const unsigned flags)
@@ -451,8 +451,9 @@ class OFCharacterEncoding::Implementation
         // different encoding flags and only has a (varying) fixed functionality
         // that we detect with a configuration test.
         return flags == DCMTK_FIXED_ICONV_CONVERSION_FLAGS;
-#endif
+#else
         return OFFalse;
+#endif
     }
 
 
@@ -600,14 +601,17 @@ OFString OFCharacterEncoding::getLocaleEncoding()
 }
 
 
+#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
 OFBool OFCharacterEncoding::supportsConversionFlags(const unsigned flags)
 {
-#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
     return Implementation::supportsConversionFlags(flags);
+}
 #else
+OFBool OFCharacterEncoding::supportsConversionFlags(const unsigned /* flags */)
+{
     return OFFalse;
-#endif
 }
+#endif
 
 
 OFCharacterEncoding::OFCharacterEncoding()
@@ -678,9 +682,9 @@ unsigned OFCharacterEncoding::getConversionFlags() const
 }
 
 
+#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
 OFCondition OFCharacterEncoding::setConversionFlags(const unsigned flags)
 {
-#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
     if (TheImplementation)
     {
         if (TheImplementation->setConversionFlags(flags))
@@ -689,42 +693,55 @@ OFCondition OFCharacterEncoding::setConversionFlags(const unsigned flags)
             "Conversion flags not supported by the underlying implementation");
     }
     return EC_NoEncodingSelected;
-#endif
+}
+#else
+OFCondition OFCharacterEncoding::setConversionFlags(const unsigned /* flags */)
+{
     return EC_NoEncodingLibrary;
 }
+#endif
 
 
+#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
 OFCondition OFCharacterEncoding::selectEncoding(const OFString &fromEncoding,
                                                 const OFString &toEncoding)
 {
-#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
     OFCondition result;
     TheImplementation.reset(Implementation::create(fromEncoding, toEncoding, result));
     return result;
+}
 #else
+OFCondition OFCharacterEncoding::selectEncoding(const OFString & /* fromEncoding */,
+                                                const OFString & /* toEncoding */)
+{
     return EC_NoEncodingLibrary;
-#endif
 }
+#endif
 
 
+#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
 OFCondition OFCharacterEncoding::convertString(const OFString &fromString,
                                                OFString &toString,
                                                const OFBool clearMode)
 {
-#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
     return convertString(fromString.c_str(), fromString.length(), toString, clearMode);
+}
 #else
+OFCondition OFCharacterEncoding::convertString(const OFString & /* fromString */,
+                                               OFString & /* toString */,
+                                               const OFBool /* clearMode */)
+{
     return EC_NoEncodingLibrary;
-#endif
 }
+#endif
 
 
+#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
 OFCondition OFCharacterEncoding::convertString(const char *fromString,
                                                const size_t fromLength,
                                                OFString &toString,
                                                const OFBool clearMode)
 {
-#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
     if (TheImplementation)
     {
         // first, clear result variable if requested
@@ -733,10 +750,16 @@ OFCondition OFCharacterEncoding::convertString(const char *fromString,
         return TheImplementation->convert(toString, fromString, fromLength);
     }
     return EC_NoEncodingSelected;
+}
 #else
+OFCondition OFCharacterEncoding::convertString(const char * /* fromString */,
+                                               const size_t /* fromLength */,
+                                               OFString & /* toString */,
+                                               const OFBool /* clearMode */)
+{
     return EC_NoEncodingLibrary;
-#endif
 }
+#endif
 
 
 #ifdef HAVE_WINDOWS_H  // Windows-specific conversion functions
index 8d6efc071d09ef11e728994973104020f218d212..27ab8b7d9ef9d67920686c3a5654f4b5a5f99987 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1998-2019, OFFIS e.V.
+ *  Copyright (C) 1998-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -1160,9 +1160,15 @@ OFCommandLine::E_ParseStatus OFCommandLine::parseCommandFile(const char *argValu
 #ifdef DCMTK_USE_WCHAR_T
 
 // Windows-specific version with wide character strings (UTF-16)
+#ifdef DEBUG
 OFCommandLine::E_ParseStatus OFCommandLine::parseCommandFile(const wchar_t *argValue,
                                                              const OFString &strValue,
                                                              OFList<OFString> &argList)
+#else
+OFCommandLine::E_ParseStatus OFCommandLine::parseCommandFile(const wchar_t *argValue,
+                                                             const OFString & /* strValue */,
+                                                             OFList<OFString> &argList)
+#endif
 {
     E_ParseStatus result = PS_NoArguments;
     /* check for command file parameter (syntax: "@filename") */
index 360ca9b0e8f007b37b8c769b686d583578248028..bf06ef0c6385221e38b47fee4665ddbddf765bb9 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1999-2018, OFFIS e.V.
+ *  Copyright (C) 1999-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -28,9 +28,8 @@
 #ifdef DCMTK_ENABLE_CHARSET_CONVERSION
 #include "dcmtk/ofstd/ofchrenc.h"     /* for OFCharacterEncoding */
 
-#define INCLUDE_LOCALE
-#include "dcmtk/ofstd/ofstdinc.h"     /* for setlocale() */
-#endif // WITH_LIBICONV
+#include <locale>
+#endif // DCMTK_ENABLE_CHARSET_CONVERSION
 
 #ifdef HAVE_WINDOWS_H
 #define WIN32_LEAN_AND_MEAN
@@ -167,10 +166,55 @@ void OFConsoleApplication::printHeader(const OFBool hostInfo,
             (*output) << "Code page: " << GetOEMCP() << " (OEM) / " << GetACP() << " (ANSI)" << OFendl;
         }
 #endif
+        /* output details on DCMTK's build options */
+        (*output) << "Build options:";
 #ifdef DEBUG
         /* indicate that debug code is present */
-        (*output) << OFendl << "Compiled with DEBUG defined, i.e. with debug code" << OFendl;
+        (*output) << " debug";
 #endif
+#ifdef ofstd_EXPORTS
+        /* indicate that shared library support is enabled */
+        (*output) << " shared";
+#endif
+#ifdef HAVE_CXX11
+        /* indicate that C++11 is used */
+        (*output) << " cxx11";
+#endif
+#ifdef HAVE_STL
+        /* indicate that the C++ STL is used */
+        (*output) << " stl";
+#endif
+#ifdef WITH_THREADS
+        /* indicate that MT support is enabled */
+        (*output) << " threads";
+#endif
+#ifdef DCMTK_ENABLE_LFS
+        /* indicate that LFS support is enabled */
+        (*output) << " lfs";
+#endif
+#if DCM_DICT_DEFAULT == 1
+        /* indicate that the builtin data dictionary is enabled */
+        (*output) << " builtin-dict";
+#elif DCM_DICT_DEFAULT == 2
+        /* indicate that the external data dictionary is enabled */
+        (*output) << " extern-dict";
+#endif
+#ifdef DCM_DICT_USE_DCMDICTPATH
+        /* indicate that the DCMDICTPATH environment variable is checked */
+        (*output) << " dcmdictpath";
+#elif DCM_DICT_DEFAULT == 0
+        /* indicate that no data dictionary is available */
+        (*output) << " no-dict";
+#endif
+#ifdef ENABLE_PRIVATE_TAGS
+        /* indicate that private tag dictionary is enabled */
+        (*output) << " private-tags";
+#endif
+#ifdef DCMTK_ENABLE_CHARSET_CONVERSION
+        /* indicate that character set conversion is enabled */
+        (*output) << " char-conv";
+#endif
+        (*output) << OFendl;
     }
     /* release output stream */
     if (stdError)
index 3759635e900e0e81babd3aa0ffe1b69099535e0f..62c8a2cc5fce0c71c2b90c575bce37582024088b 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2014, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofconfig.h"
 #include "dcmtk/ofstd/ofcast.h"
 
-#define INCLUDE_CSTRING
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
+#include <cstring>
 
 OFConfigFileNode::OFConfigFileNode(const char *keyword)
 : brother_(NULL)
index e3ef631c8845f89d53264668a3dd53eff54cef37..21b3b86b490d9dbb1123f0a01d6a4fd74b206016 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2010, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofconsol.h"
 #include "dcmtk/ofstd/ofthread.h"
 
-#define INCLUDE_CASSERT
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cassert>
+#ifdef HAVE_UNISTD_H
+BEGIN_EXTERN_C
+#include <unistd.h>
+END_EXTERN_C
+#endif
+
+
+BEGIN_EXTERN_C
+#ifdef HAVE_FCNTL_H
+#include <fcntl.h>
+#endif
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif
+END_EXTERN_C
 
 
 #ifdef DCMTK_GUI
@@ -120,6 +134,64 @@ OFConsole& OFConsole::instance()
   return instance_;
 }
 
+int OFConsole::old_stderr = -1;
+
+void OFConsole::mergeStderrStdout()
+{
+    fflush(stderr);
+    if (fileno(stderr) != fileno(stdout))
+    {
+        /* duplicate the stderr file descriptor to be the same as stdout */
+        if (old_stderr < 0) old_stderr = dup(fileno(stderr));
+
+        /* now duplicate the file descriptor of stdout into the file descriptor of stderr.
+         * This will silently close the previous file descriptor of stderr.
+         */
+        if (0 != dup2(fileno(stdout), fileno(stderr)))
+        {
+            OFConsole::instance().lockCerr() << "Unable to redirect stderr to stdout" << OFendl;
+            OFConsole::instance().unlockCerr();
+        }
+    }
+
+#ifndef __BORLANDC__  /* setvbuf on stdout/stderr does not work with Borland C++ */
+    /* set stdout and stderr to unbuffered mode */
+    if (setvbuf(stdout, NULL, _IONBF, 0 ) != 0 )
+    {
+        OFConsole::instance().lockCerr() << "Unable to switch stdout to unbuffered mode" << OFendl;
+        OFConsole::instance().unlockCerr();
+    }
+    if (setvbuf(stderr, NULL, _IONBF, 0 ) != 0 )
+    {
+        OFConsole::instance().lockCerr() << "Unable to switch stderr to unbuffered mode" << OFendl;
+        OFConsole::instance().unlockCerr();
+    }
+#endif /* __BORLANDC__ */
+}
+
+
+void OFConsole::unmergeStderrStdout()
+{
+    /* only execute this code if stderr was actually redirected before */
+    if (old_stderr > 0)
+    {
+        if (0 != dup2(old_stderr, fileno(stderr)))
+        {
+            OFConsole::instance().lockCerr() << "Error: Unable to release redirection of stderr to stdout" << OFendl;
+            OFConsole::instance().unlockCerr();
+        }
+
+#ifndef __BORLANDC__
+        /* switch stdout to buffered mode */
+        if (setvbuf(stdout, NULL, _IOFBF, BUFSIZ ) != 0 )
+        {
+            OFConsole::instance().lockCerr() << "Error: Unable to switch stdout to buffered mode" << OFendl;
+            OFConsole::instance().unlockCerr();
+
+        }
+#endif /* __BORLANDC__ */
+    }
+}
 
 class OFConsoleInitializer
 {
index 8a4230ba9b2d7d5d6c1da3c19b7362e6cccaa3af..44cab53a4222df71b70f83210284f6644b93c9fe 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2011, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"
 #include "dcmtk/ofstd/ofdate.h"
-
-#define INCLUDE_CSTDIO
-#define INCLUDE_CTIME
 #include "dcmtk/ofstd/ofstdinc.h"
+#include <ctime>
 
 
 /*------------------*
index acda440bfbb379007e5de5bc258025e3d59b8bff..308167a820c2217ee0ca78877056a1244d849ac2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2017, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"
 
-#define INCLUDE_CTIME
-#define INCLUDE_CCTYPE
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"
-
-BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TYPES_H
+BEGIN_EXTERN_C
 #include <sys/types.h>    /* for struct time_t */
-#endif
 END_EXTERN_C
+#endif
 
 #include "dcmtk/ofstd/ofdatime.h"
+#include "dcmtk/ofstd/ofstdinc.h"
+#include <ctime>
 
 
 /*------------------*
index 3a8d4f44cc582f69521701770e771d9d96f41b73..cb21ec831ae5d905363d10b4d53291a473cfa8b6 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017, OFFIS e.V.
+ *  Copyright (C) 2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -26,8 +26,6 @@
 // Only provide the implementation if the STL one is not used
 #if !defined(HAVE_STL_SYSTEM_ERROR) || !defined(HAVE_STL_STRING)
 
-#define INCLUDE_CERRNO
-#include "dcmtk/ofstd/ofstdinc.h"
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/oferror.h"
 #include "dcmtk/ofstd/ofdiag.h"
index 82584188e6545f71c85fb7e71e6f5f63bb3bbc3f..f04a096414b2e44c442da4895c3d6fa3ad4832be 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2011-2020, OFFIS e.V.
+ *  Copyright (C) 2011-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/offile.h"
 #include "dcmtk/ofstd/offilsys.h"
 #include "dcmtk/ofstd/ofutil.h"
+#include <cerrno>
+
+#ifdef __SUNPRO_CC
+BEGIN_EXTERN_C
+#include <stdio.h>
+END_EXTERN_C
+#else
+#include <cstdio>
+#endif
 
 #ifdef HAVE_WINDOWS_H
 #include "dcmtk/ofstd/ofchrenc.h"   /* for class OFCharacterEncoding */
@@ -223,3 +232,41 @@ STD_NAMESPACE ostream &operator<<(STD_NAMESPACE ostream &stream,
     stream << OFSTRING_GUARD(filename.getCharPointer());
     return stream;
 }
+
+OFBool OFFile::popen(const char *command, const char *modes)
+{
+  if (file_) fclose();
+#if defined(HAVE_POPEN) || defined(__SUNPRO_CC)
+  // SunPro defines popen() in a header file where CMake cannot find it, but it is there.
+  file_ = :: popen(command, modes);
+#else
+  file_ = _popen(command, modes);
+#endif
+  if (file_) popened_ = OFTrue; else storeLastError();
+  return (file_ != NULL);
+}
+
+int OFFile::fclose()
+{
+  int result = 0;
+  if (file_)
+  {
+    if (popened_)
+    {
+#if defined(HAVE_PCLOSE) || defined(__SUNPRO_CC)
+      // SunPro defines pclose() in a header file where CMake cannot find it, but it is there.
+      result = :: pclose(file_);
+#else
+      result = _pclose(file_);
+#endif
+    }
+    else
+    {
+      result = STDIO_NAMESPACE fclose(file_);
+    }
+    // After calling fclose() once, the FILE* is gone even if fclose() failed.
+    file_ = NULL;
+  }
+  if (result) storeLastError();
+  return result;
+}
index e2e62354b767fef410061f0686eeadbf0029f000..5ce4e5ba6e69b5696aef28d5cb1ea25539385d0c 100755 (executable)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2018, OFFIS e.V.
+ *  Copyright (C) 2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"
 
-#define INCLUDE_CLIMITS
-#define INCLUDE_CASSERT
-#include "dcmtk/ofstd/ofstdinc.h"
+#include <cstring>
+#include <cassert>
+#include <climits>
+
 #include "dcmtk/ofstd/offilsys.h"
 
 #ifdef _WIN32
@@ -66,17 +67,47 @@ OFpath::OFpath( OFrvalue_ref(OFpath) rhs )
     m_NativeString.swap( OFrvalue_access( rhs ).m_NativeString );
 }
 
-OFpath::OFpath( const char* const cstr )
+OFpath::OFpath( const char* const cstr, format fmt )
 : m_NativeString( cstr )
 {
-
+#ifdef _WIN32
+    convertSeparator(fmt);
+#endif
 }
 
-OFpath::OFpath( const OFString& string )
+OFpath::OFpath( const OFString& string, format fmt )
 : m_NativeString( string )
 {
+#ifdef _WIN32
+    convertSeparator(fmt);
+#endif
+}
 
+#ifdef _WIN32
+void OFpath::convertSeparator( format fmt )
+{
+    size_t pos = OFString_npos;
+    switch( fmt )
+    {
+    case native_format:
+        return;
+    case auto_format:
+        pos = m_NativeString.find_first_of( "\\/" );
+        if( pos == OFString_npos || m_NativeString[pos] == preferred_separator )
+            return;
+        break;
+    default:
+    case generic_format:
+        pos = m_NativeString.find( '/' );
+        if( pos == OFString_npos )
+            return;
+        break;
+    }
+    m_NativeString[pos] = preferred_separator;
+    for( pos = m_NativeString.find( '/', pos + 1 ); pos != OFString_npos; pos = m_NativeString.find( '/', pos + 1 ) )
+        m_NativeString[pos] = preferred_separator;
 }
+#endif
 
 OFpath& OFpath::operator=( const OFpath& rhs )
 {
index cb6c652a8b1f825bfd450e2724ba689cd97044b1..832376189d14b1291f90f1471244328eb3480152 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2018, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/offname.h"
 #include "dcmtk/ofstd/ofcast.h"
 #include "dcmtk/ofstd/ofstd.h"        /* for OFString::myrand_r */
-
-#define INCLUDE_CERRNO
-#define INCLUDE_CSTRING
-#define INCLUDE_CTIME
-#define INCLUDE_CSTDLIB
 #include "dcmtk/ofstd/ofstdinc.h"
+#include <cerrno>
+#include <ctime>
+
 
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TYPES_H
index b4ebe213db5df8686173576f42c052fcbd9e8e83..45401c4dd6f0e535b2a66050eba8c1c57d6bb96e 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2018, OFFIS e.V.
+ *  Copyright (C) 2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofrand.h"
 #include "dcmtk/ofstd/ofcast.h"
 #include "dcmtk/ofstd/ofstd.h"
-
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTDDEF
-#define INCLUDE_CTIME
 #include "dcmtk/ofstd/ofstdinc.h"
+#include <ctime>
+
 
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TIME_H
index 87ebcd400685d5a17fd356f8ec0ffb8ea80811ea..708173b075f9d4d962458bb21c29f50fa967d0ed 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2017-2018, OFFIS e.V.
+ *  Copyright (C) 2017-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofsockad.h"
 #include "dcmtk/ofstd/ofstream.h"
 
-BEGIN_EXTERN_C
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-END_EXTERN_C
-
-#ifdef HAVE_WINDOWS_H
-#include <winsock2.h>
-#include <ws2tcpip.h>    /* for struct sockaddr_in6 */
-#endif
-
 socklen_t OFSockAddr::size() const
 {
-  switch (sa.ss_family)
+  switch (getFamily())
   {
     case AF_INET:
       return sizeof(struct sockaddr_in);
@@ -57,7 +40,7 @@ void OFSockAddr::setPort(unsigned short port)
 {
   struct sockaddr_in *si = NULL;
   struct sockaddr_in6 *si6 = NULL;
-  switch (sa.ss_family)
+  switch (getFamily())
   {
       case AF_INET:
         si = getSockaddr_in();
index 2ee83427aa3db76a56b9a6dc01bee5524a7f7021..ae1466a9ff08dd4809b555005038e7e5155ed913 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2001-2020, OFFIS e.V.
+ *  Copyright (C) 2001-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
+#ifdef __SUNPRO_CC
+BEGIN_EXTERN_C
+// SunPro declares vsnprintf() only in <stdio.h>, not in <cstdio>.
+#include <stdio.h>
+END_EXTERN_C
+#else
+#include <cstdio>
+#endif
+
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/ofcond.h"
 #include "dcmtk/ofstd/offile.h"
 #include "dcmtk/ofstd/ofmath.h"
 #include "dcmtk/ofstd/ofsockad.h"
 #include "dcmtk/ofstd/ofvector.h"
+#include "dcmtk/ofstd/ofdiag.h"
+#include "dcmtk/ofstd/oftimer.h"
 
-#define INCLUDE_CMATH
-#define INCLUDE_CFLOAT
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDIO
-#define INCLUDE_CCTYPE
-#define INCLUDE_UNISTD
-#include "dcmtk/ofstd/ofstdinc.h"
 
+#include <cmath>
+#include <cstring>       /* for memset() */
 
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_STAT_H
@@ -220,7 +226,7 @@ size_t OFStandard::my_strlcpy(char *dst, const char *src, size_t siz)
   {
      if (siz != 0)
         *d = '\0'; /* NUL-terminate dst */
-     while (*s++) /* do_nothing */ ;
+     while (*s++) /* do nothing */ ;
   }
 
   return(s - src - 1);    /* count does not include NUL */
@@ -594,6 +600,13 @@ OFFilename &OFStandard::getDirNameFromPath(OFFilename &result,
     {
         const wchar_t *strValue = pathName.getWideCharPointer();
         const wchar_t *strPos = wcsrchr(strValue, L'\\' /* WIDE_PATH_SEPARATOR */);
+
+        // Windows accepts both backslash and forward slash as path separators.
+        const wchar_t *strPos2 = wcsrchr(strValue, L'/');
+
+        // if strPos2 points to a character closer to the end of the string, use this instead of strPos
+        if ((strPos == NULL) || ((strPos2 != NULL) && (strPos2 > strPos))) strPos = strPos2;
+
         /* path separator found? */
         if (strPos == NULL)
         {
@@ -614,6 +627,15 @@ OFFilename &OFStandard::getDirNameFromPath(OFFilename &result,
     {
         const char *strValue = pathName.getCharPointer();
         const char *strPos = strrchr(strValue, PATH_SEPARATOR);
+
+#ifdef _WIN32
+        // Windows accepts both backslash and forward slash as path separators.
+        const char *strPos2 = strrchr(strValue, '/');
+
+        // if strPos2 points to a character closer to the end of the string, use this instead of strPos
+        if ((strPos == NULL) || ((strPos2 != NULL) && (strPos2 > strPos))) strPos = strPos2;
+#endif
+
         /* path separator found? */
         if (strPos == NULL)
         {
@@ -651,6 +673,13 @@ OFFilename &OFStandard::getFilenameFromPath(OFFilename &result,
     {
         const wchar_t *strValue = pathName.getWideCharPointer();
         const wchar_t *strPos = wcsrchr(strValue, L'\\' /* WIDE_PATH_SEPARATOR */);
+
+        // Windows accepts both backslash and forward slash as path separators.
+        const wchar_t *strPos2 = wcsrchr(strValue, L'/');
+
+        // if strPos2 points to a character closer to the end of the string, use this instead of strPos
+        if ((strPos == NULL) || ((strPos2 != NULL) && (strPos2 > strPos))) strPos = strPos2;
+
         /* path separator found? */
         if (strPos == NULL)
         {
@@ -670,6 +699,15 @@ OFFilename &OFStandard::getFilenameFromPath(OFFilename &result,
     {
         const char *strValue = pathName.getCharPointer();
         const char *strPos = strrchr(strValue, PATH_SEPARATOR);
+
+#ifdef _WIN32
+        // Windows accepts both backslash and forward slash as path separators.
+        const char *strPos2 = strrchr(strValue, '/');
+
+        // if strPos2 points to a character closer to the end of the string, use this instead of strPos
+        if ((strPos == NULL) || ((strPos2 != NULL) && (strPos2 > strPos))) strPos = strPos2;
+#endif
+
         /* path separator found? */
         if (strPos == NULL)
         {
@@ -709,7 +747,9 @@ OFFilename &OFStandard::normalizeDirName(OFFilename &result,
     {
         const wchar_t *strValue = dirName.getWideCharPointer();
         size_t strLength = (strValue == NULL) ? 0 : wcslen(strValue);
-        while ((strLength > 1) && (strValue[strLength - 1] == L'\\' /* WIDE_PATH_SEPARATOR */))
+        // Windows accepts both backslash and forward slash as path separators.
+        while ((strLength > 1) && ((strValue[strLength - 1] == L'\\' /* WIDE_PATH_SEPARATOR */) ||
+              (strValue[strLength - 1] == L'/' )))
             --strLength;
         /* avoid "." as a directory name, use empty string instead */
         if (allowEmptyDirName && ((strLength == 0) || ((strLength == 1) && (strValue[0] == L'.'))))
@@ -731,8 +771,15 @@ OFFilename &OFStandard::normalizeDirName(OFFilename &result,
     {
         const char *strValue = dirName.getCharPointer();
         size_t strLength = (strValue == NULL) ? 0 : strlen(strValue);
+#ifdef _WIN32
+        // Windows accepts both backslash and forward slash as path separators.
+        while ((strLength > 1) && ((strValue[strLength - 1] == PATH_SEPARATOR) ||
+              (strValue[strLength - 1] == '/' )))
+            --strLength;
+#else
         while ((strLength > 1) && (strValue[strLength - 1] == PATH_SEPARATOR))
             --strLength;
+#endif
         /* avoid "." as a directory name, use empty string instead */
         if (allowEmptyDirName && ((strLength == 0) || ((strLength == 1) && (strValue[0] == '.'))))
             result.clear();
@@ -776,7 +823,8 @@ OFFilename &OFStandard::combineDirAndFilename(OFFilename &result,
         size_t strLength = (strValue == NULL) ? 0 : wcslen(strValue);
         /* check whether 'fileName' contains absolute path */
         /* (this check also covers UNC syntax, e.g. "\\server\...") */
-        if ((strLength > 0) && (strValue[0] == L'\\' /* WIDE_PATH_SEPARATOR */))
+        // Windows accepts both backslash and forward slash as path separators.
+        if ((strLength > 0) && ((strValue[0] == L'\\' /* WIDE_PATH_SEPARATOR */) || (strValue[0] == L'/')))
         {
             result.set(strValue, OFTrue /*convert*/);
             return result;
@@ -788,7 +836,8 @@ OFFilename &OFStandard::combineDirAndFilename(OFFilename &result,
             const wchar_t c = strValue[0];
             if (((c >= L'A') && (c <= L'Z')) || ((c >= L'a') && (c <= L'z')))
             {
-                if ((strValue[1] == L':') && (strValue[2] == L'\\' /* WIDE_PATH_SEPARATOR */))
+                // Windows accepts both backslash and forward slash as path separators.
+                if ((strValue[1] == L':') && ((strValue[2] == L'\\' /* WIDE_PATH_SEPARATOR */))||(strValue[2] == L'/'))
                 {
                     result.set(strValue, OFTrue /*convert*/);
                     return result;
@@ -817,7 +866,8 @@ OFFilename &OFStandard::combineDirAndFilename(OFFilename &result,
                 wchar_t *tmpString = new wchar_t[strLength + resLength + 1 + 1];
                 wcscpy(tmpString, resValue);
                 /* add path separator (if required) ... */
-                if (resValue[resLength - 1] != L'\\' /* WIDE_PATH_SEPARATOR */)
+                // Windows accepts both backslash and forward slash as path separators.
+                if ((resValue[resLength - 1] != L'\\' /* WIDE_PATH_SEPARATOR */) && (resValue[resLength - 1] != L'/'))
                 {
                     tmpString[resLength] = L'\\' /* WIDE_PATH_SEPARATOR */;
                     tmpString[resLength + 1] = L'\0';
@@ -836,7 +886,12 @@ OFFilename &OFStandard::combineDirAndFilename(OFFilename &result,
         size_t strLength = (strValue == NULL) ? 0 : strlen(strValue);
         /* check whether 'fileName' contains absolute path */
         /* (this check also covers UNC syntax, e.g. "\\server\...") */
+#ifdef _WIN32
+        // Windows accepts both backslash and forward slash as path separators.
+        if ((strLength > 0) && ((strValue[0] == PATH_SEPARATOR) || (strValue[0] == '/')))
+#else
         if ((strLength > 0) && (strValue[0] == PATH_SEPARATOR))
+#endif
         {
             result.set(strValue);
             return result;
@@ -848,7 +903,7 @@ OFFilename &OFStandard::combineDirAndFilename(OFFilename &result,
             const char c = strValue[0];
             if (((c >= 'A') && (c <= 'Z')) || ((c >= 'a') && (c <= 'z')))
             {
-                if ((strValue[1] == ':') && (strValue[2] == '\\'))
+                if ((strValue[1] == ':') && ((strValue[2] == '\\') || (strValue[2] == '/')))
                 {
                     result.set(strValue);
                     return result;
@@ -871,7 +926,12 @@ OFFilename &OFStandard::combineDirAndFilename(OFFilename &result,
                 char *tmpString = new char[buflen];
                 OFStandard::strlcpy(tmpString, resValue, buflen);
                 /* add path separator (if required) ... */
+#ifdef _WIN32
+                // Windows accepts both backslash and forward slash as path separators.
+                if ((resValue[resLength - 1] != PATH_SEPARATOR) && (resValue[resLength - 1] != '/'))
+#else
                 if (resValue[resLength - 1] != PATH_SEPARATOR)
+#endif
                 {
                     tmpString[resLength] = PATH_SEPARATOR;
                     tmpString[resLength + 1] = '\0';
@@ -924,7 +984,7 @@ OFCondition OFStandard::removeRootDirFromPathname(OFFilename &result,
                 /* remove root dir prefix from path name */
                 wcscpy(tmpString, pathValue + rootLength);
                 /* remove leading path separator (if present) */
-                if (!allowLeadingPathSeparator && (tmpString[0] == PATH_SEPARATOR))
+                if (!allowLeadingPathSeparator && ((tmpString[0] == PATH_SEPARATOR) || (tmpString[0] == '/')))
                     result.set(tmpString + 1, OFTrue /*convert*/);
                 else
                     result.set(tmpString, OFTrue /*convert*/);
@@ -964,7 +1024,12 @@ OFCondition OFStandard::removeRootDirFromPathname(OFFilename &result,
                 /* remove root dir prefix from path name */
                 OFStandard::strlcpy(tmpString, pathValue + rootLength, buflen);
                 /* remove leading path separator (if present) */
+#ifdef _WIN32
+                // Windows accepts both backslash and forward slash as path separators.
+                if (!allowLeadingPathSeparator && ((tmpString[0] == PATH_SEPARATOR) || (tmpString[0] == '/')))
+#else
                 if (!allowLeadingPathSeparator && (tmpString[0] == PATH_SEPARATOR))
+#endif
                     result.set(tmpString + 1);
                 else
                     result.set(tmpString);
@@ -1232,12 +1297,22 @@ OFCondition OFStandard::createDirectory(const OFFilename &dirName,
             size_t rootLength = (rootValue == NULL) ? 0 : wcslen(rootValue);
             /* check for absolute path containing Windows drive name, e. g. "c:\",
              * is not required since the root directory should always exist */
+#ifdef _WIN32
+            // Windows accepts both backslash and forward slash as path separators.
+            if ((dirLength > 1) && ((dirValue[dirLength - 1] == L'\\' /* WIDE_PATH_SEPARATOR */) || (dirValue[dirLength - 1] == L'/')))
+#else
             if ((dirLength > 1) && (dirValue[dirLength - 1] == L'\\' /* WIDE_PATH_SEPARATOR */))
+#endif
             {
                 /* ignore trailing path separator */
                 --dirLength;
             }
+#ifdef _WIN32
+            // Windows accepts both backslash and forward slash as path separators.
+            if ((rootLength > 1) && ((rootValue[rootLength - 1] == L'\\' /* WIDE_PATH_SEPARATOR */) || (rootValue[rootLength - 1] == L'/')))
+#else
             if ((rootLength > 1) && (rootValue[rootLength - 1] == L'\\' /* WIDE_PATH_SEPARATOR */))
+#endif
             {
                 /* ignore trailing path separator */
                 --rootLength;
@@ -1261,7 +1336,13 @@ OFCondition OFStandard::createDirectory(const OFFilename &dirName,
                 /* search for next path separator */
                 do {
                     ++pos;
+#ifdef _WIN32
+                // Windows accepts both backslash and forward slash as path separators.
+                } while ((dirValue[pos] != L'\\' /* WIDE_PATH_SEPARATOR */) && (dirValue[pos] != L'/') && (dirValue[pos] != '\0'));
+#else
                 } while ((dirValue[pos] != L'\\' /* WIDE_PATH_SEPARATOR */) && (dirValue[pos] != L'\0'));
+#endif
+
                 /* get name of current directory component */
                 wchar_t *subDir = new wchar_t[pos + 1];
                 wcsncpy(subDir, dirValue, pos /*num*/);
@@ -1293,12 +1374,22 @@ OFCondition OFStandard::createDirectory(const OFFilename &dirName,
             size_t rootLength = (rootValue == NULL) ? 0 : strlen(rootValue);
             /* check for absolute path containing Windows drive name, e. g. "c:\",
              * is not required since the root directory should always exist */
+#ifdef _WIN32
+            // Windows accepts both backslash and forward slash as path separators.
+            if ((dirLength > 1) && ((dirValue[dirLength - 1] == PATH_SEPARATOR) || (dirValue[dirLength - 1] == '/')))
+#else
             if ((dirLength > 1) && (dirValue[dirLength - 1] == PATH_SEPARATOR))
+#endif
             {
                 /* ignore trailing path separator */
                 --dirLength;
             }
+#ifdef _WIN32
+            // Windows accepts both backslash and forward slash as path separators.
+            if ((rootLength > 1) && ((rootValue[rootLength - 1] == PATH_SEPARATOR) || (rootValue[rootLength - 1] == '/')))
+#else
             if ((rootLength > 1) && (rootValue[rootLength - 1] == PATH_SEPARATOR))
+#endif
             {
                 /* ignore trailing path separator */
                 --rootLength;
@@ -1322,7 +1413,12 @@ OFCondition OFStandard::createDirectory(const OFFilename &dirName,
                 /* search for next path separator */
                 do {
                     ++pos;
+#ifdef _WIN32
+                // Windows accepts both backslash and forward slash as path separators.
+                } while ((dirValue[pos] != PATH_SEPARATOR) && (dirValue[pos] != '/') && (dirValue[pos] != '\0'));
+#else
                 } while ((dirValue[pos] != PATH_SEPARATOR) && (dirValue[pos] != '\0'));
+#endif
                 /* get name of current directory component */
                 char *subDir = new char[pos + 1];
                 strlcpy(subDir, dirValue, pos + 1 /*size*/);
@@ -2673,6 +2769,7 @@ void OFStandard::milliSleep(unsigned int millisecs)
 #endif
 }
 
+
 long OFStandard::getProcessID()
 {
 #ifdef _WIN32
@@ -2736,9 +2833,7 @@ OFString OFStandard::getHostnameByAddress(const char* addr, int len, int type)
   // We have getaddrinfo(). In this case we also presume that we have
   // getnameinfo(), since both functions were introduced together.
   // This is the preferred implementation, being thread-safe and protocol independent.
-
-  struct sockaddr_storage sas; // this type is large enough to hold all supported protocol specific sockaddr structs
-  memzero(&sas, sizeof(sas));
+  OFSockAddr sas;
 
   // a DNS name must be shorter than 256 characters, so this should be enough
   char hostname[512];
@@ -2747,14 +2842,14 @@ OFString OFStandard::getHostnameByAddress(const char* addr, int len, int type)
   if (type == AF_INET)
   {
     if (len != sizeof(struct in_addr)) return result; // invalid address length
-    struct sockaddr_in *sa4 = OFreinterpret_cast(sockaddr_in *, &sas);
+    struct sockaddr_in *sa4 = sas.getSockaddr_in();
     sa4->sin_family = AF_INET;
     memcpy(&sa4->sin_addr, addr, len);
   }
   else if (type == AF_INET6)
   {
     if (len != sizeof(struct in6_addr)) return result; // invalid address length
-    struct sockaddr_in6 *sa6 = OFreinterpret_cast(sockaddr_in6 *, &sas);
+    struct sockaddr_in6 *sa6 = sas.getSockaddr_in6();
     sa6->sin6_family = AF_INET6;
     memcpy(&sa6->sin6_addr, addr, len);
   }
@@ -2762,10 +2857,10 @@ OFString OFStandard::getHostnameByAddress(const char* addr, int len, int type)
 
   int err = EAI_AGAIN;
   int rep = DCMTK_MAX_EAI_AGAIN_REPETITIONS;
-  struct sockaddr *sa = OFreinterpret_cast(struct sockaddr *, &sas);
+  struct sockaddr *sa = sas.getSockaddr();
 
   // perform reverse DNS lookup. Repeat while we receive temporary failures.
-  while ((EAI_AGAIN == err) && (rep-- > 0)) err = getnameinfo(sa, sizeof(sas), hostname, 512, NULL, 0, 0);
+  while ((EAI_AGAIN == err) && (rep-- > 0)) err = getnameinfo(sa, sizeof(struct sockaddr_storage), hostname, 512, NULL, 0, 0);
   if ((err == 0) && (hostname[0] != '\0')) result = hostname;
 
 #elif defined(HAVE_GETHOSTBYADDR_R)
@@ -3137,6 +3232,21 @@ OFerror_code OFStandard::getLastNetworkErrorCode()
 #endif
 }
 
+
+void OFStandard::forceSleep(Uint32 seconds)
+{
+    OFTimer timer;
+    double elapsed = timer.getDiff();
+    while (elapsed < OFstatic_cast(double, seconds))
+    {
+        // Use ceiling since otherwise we could wait too short
+        OFStandard::sleep(OFstatic_cast(unsigned int, ceil(seconds - elapsed)));
+        elapsed = timer.getDiff();
+    }
+}
+
+#include DCMTK_DIAGNOSTIC_IGNORE_STRICT_ALIASING_WARNING
+
 // black magic:
 // The C++ standard says that std::in_place should not be called as a function,
 // but the linker says we still need a function body. Normally, we would mark
index 1e8674a04ed3abbb6ce86a41920b77ef142c951c..447a63da6b2542fb19ccd59062034be64a613627 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2019, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -38,9 +38,6 @@
 #include "dcmtk/ofstd/oftypes.h"
 #include "dcmtk/ofstd/ofstd.h"
 
-#define INCLUDE_CCTYPE
-#include "dcmtk/ofstd/ofstdinc.h"
-
 static const char* verify_string(const char *s)
 {
     if (s == NULL)
index a3761f7c7d0faa6456e56ac4e2467233443ac645..67317e7c5bacaa36c5281deeb2c7ed3ce0b25839 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2011-2015, OFFIS e.V.
+ *  Copyright (C) 2011-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/oftempf.h"
 #include "dcmtk/ofstd/offname.h"
 #include "dcmtk/ofstd/ofstd.h"
-
-#define INCLUDE_CERRNO
-#define INCLUDE_CTIME
 #include "dcmtk/ofstd/ofstdinc.h"
+#include <ctime>
+
 
 BEGIN_EXTERN_C
 #ifdef HAVE_IO_H
index 622248443c429835c0acae1546ff45722f82f392..6b590c84c085f09ee3cde57f4e658a9006e02534 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2018, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 /* if WITH_THREADS is undefined, we don't even attempt to implement a thread interface. */
 #ifdef WITH_THREADS
 
-#define INCLUDE_CSTDLIB
-#define INCLUDE_CSTRING
-#define INCLUDE_CERRNO
-#include "dcmtk/ofstd/ofstdinc.h"
-
 #include "dcmtk/ofstd/ofstd.h"
 
 #ifdef _DARWIN_C_SOURCE
@@ -76,6 +71,7 @@ extern "C" {
 #include "dcmtk/ofstd/ofthread.h"
 #include "dcmtk/ofstd/ofconsol.h"
 #include "dcmtk/ofstd/ofstring.h"
+#include <cerrno>
 
 // The Posix interfaces are not always correctly declared as volatile,
 // so we need a two-step cast from our internal representation
index 72941e1769dc91515b6a6d43476202b300c34695..1f6618020c0ac10d936b853fe0a86c3f7c3475d7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2020, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 
 
 #include "dcmtk/config/osconfig.h"
-
-#define INCLUDE_CSTDIO
-#define INCLUDE_CTIME
-#define INCLUDE_CSTRING
 #include "dcmtk/ofstd/ofstdinc.h"
+#include <ctime>
+
 
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TIME_H
index 98581245694b3aa213ee86b457d329e1a1d8dda7..e0c8f5a7d7c8aea94f6d974f75a06a4146aa3174 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2011-2018, OFFIS e.V.
+ *  Copyright (C) 2011-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,9 +27,6 @@
 #include "dcmtk/ofstd/ofthread.h"
 #include "dcmtk/ofstd/ofstd.h"
 
-#define INCLUDE_CASSERT
-#include "dcmtk/ofstd/ofstdinc.h"
-
 BEGIN_EXTERN_C
 #ifdef HAVE_SYS_TIME_H
 #include <sys/time.h>
index 9ff4d4a7b291b89a2f13239791acb008781aa89e..79e459b1ecb07aecb528bf3477bd0f56104c1d31 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2011-2019, OFFIS e.V.
+ *  Copyright (C) 2011-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were slightly modified by
 #endif
 // DCMTK: we need this header file at the beginning of each file
 #include "dcmtk/config/osconfig.h"
+#include "dcmtk/ofstd/ofstdinc.h"
+#include "dcmtk/ofstd/ofdiag.h"
 
 // DCMTK: we need the correct header file (was "xmlParser.h")
 #include "dcmtk/ofstd/ofxml.h"
                      // to have "MessageBoxA" to display error messages for openFileHelper
 #endif
 
-// DCMTK: we want to use our own standard include wrappers
-#define INCLUDE_CMEMORY
-#define INCLUDE_CASSERT
-#define INCLUDE_CSTDIO
-#define INCLUDE_CSTRING
-#define INCLUDE_CSTDLIB
+#include <cstdio>
+#include <cstring>
+#include <cassert>
+#include <cstdlib>
 #include "dcmtk/ofstd/ofstdinc.h"
 
-// DCMTK: workaround for SunPro not defining these C functions in the global namespace
-#ifdef __sun
 using STD_NAMESPACE free;
 using STD_NAMESPACE malloc;
-using STD_NAMESPACE realloc;
-using STD_NAMESPACE atoi;
-using STD_NAMESPACE atol;
-using STD_NAMESPACE atof;
 using STD_NAMESPACE FILE;
 using STD_NAMESPACE fopen;
+using STD_NAMESPACE atoi;
 using STD_NAMESPACE fread;
-using STD_NAMESPACE fwrite;
+using STD_NAMESPACE atof;
+using STD_NAMESPACE fclose;
 using STD_NAMESPACE fprintf;
+using STD_NAMESPACE realloc;
+using STD_NAMESPACE atol;
+using STD_NAMESPACE fwrite;
 using STD_NAMESPACE fseek;
 using STD_NAMESPACE ftell;
-using STD_NAMESPACE fclose;
+
+#ifdef HAVE_STRINGS_H
+BEGIN_EXTERN_C
+#include <strings.h>
+END_EXTERN_C
 #endif
 
+// The code in this class ensures that raw access to 'struct XMLNode'
+// is safe. Therefore it is safe to suppress this warning.
+#include DCMTK_DIAGNOSTIC_IGNORE_CLASS_MEMACCESS_WARNING
+
 XMLCSTR XMLNode::getVersion() { return _CXML("v2.44"); }
 void freeXMLString(XMLSTR t){if(t)free(t);}
 
@@ -419,7 +426,6 @@ char myIsTextWideChar(const void * /*b*/, int /*len*/) { return FALSE; }
         static inline XMLSTR xstrstr(XMLCSTR c1, XMLCSTR c2) { return OFconst_cast(XMLSTR, strstr(c1,c2)); }
         static inline XMLSTR xstrcpy(XMLSTR c1, XMLCSTR c2) { return OFconst_cast(XMLSTR, strcpy(c1,c2)); }
     #endif
-    static inline int _strnicmp(const char *c1,const char *c2, int l) { return strncasecmp(c1,c2,l);}
 #endif
 
 
@@ -788,7 +794,7 @@ XMLSTR ToXMLStringTool::toXMLUnSafe(XMLSTR dest,XMLCSTR source)
     XMLSTR dd=dest;
     XMLCHAR ch;
     XMLCharacterEntity *entity;
-    while ((ch=*source))
+    while ((ch=*source) != 0)
     {
         entity=XMLEntities;
         do
@@ -847,7 +853,7 @@ int ToXMLStringTool::lengthXMLString(XMLCSTR source)
     int r=0;
     XMLCharacterEntity *entity;
     XMLCHAR ch;
-    while ((ch=*source))
+    while ((ch=*source) != 0)
     {
         entity=XMLEntities;
         do
@@ -1062,7 +1068,7 @@ static NextToken GetNextToken(XML *pXML, int *pcbToken, enum XMLTokenTypeTag *pT
             nFoundMatch = FALSE;
 
             // Search through the string to find a matching quote
-            while((ch = getNextChar(pXML)))
+            while((ch = getNextChar(pXML)) != 0)
             {
                 if (ch==chTemp) { nFoundMatch = TRUE; break; }
                 if (ch==_CXML('<')) break;
@@ -1167,7 +1173,7 @@ static NextToken GetNextToken(XML *pXML, int *pcbToken, enum XMLTokenTypeTag *pT
         {
             // Indicate we are dealing with text
             *pType = eTokenText;
-            while((ch = getNextChar(pXML)))
+            while((ch = getNextChar(pXML)) != 0)
             {
                 if XML_isSPACECHAR(ch)
                 {
@@ -2282,7 +2288,7 @@ XMLSTR XMLNode::createXMLString(int nFormat, int *pnSize) const
     if (!dropWhiteSpace) nFormat=0;
     nFormat = nFormat ? 0 : -1;
     cbStr = CreateXMLStringR(d, 0, nFormat);
-    // Alllocate memory for the XML string + the NULL terminator and
+    // Allocate memory for the XML string + the NULL terminator and
     // create the recursively XML string.
     lpszResult=OFreinterpret_cast(XMLSTR, malloc((cbStr+1)*sizeof(XMLCHAR)));
     CreateXMLStringR(d, lpszResult, nFormat);
index 33451826b27454afe9673cb787723cdb7cacd176..565dd02f574b355586502a1fa5223940a46acfb4 100644 (file)
@@ -1,5 +1,31 @@
 # declare executables
-DCMTK_ADD_EXECUTABLE(ofstd_tests tests tatof terror tmap tvec tfilsys tftoa tthread tbase64 tstring tstrutl tlist tstack tofdatim tofstd tmarkup tchrenc txml tuuid toffile tmem toption ttuple tlimits tvariant)
+DCMTK_ADD_EXECUTABLE(ofstd_tests
+  tests.cc
+  tatof.cc
+  terror.cc
+  tmap.cc
+  tvec.cc
+  tfilsys.cc
+  tftoa.cc
+  tthread.cc
+  tbase64.cc
+  tstring.cc
+  tstrutl.cc
+  tlist.cc
+  tstack.cc
+  tofdatim.cc
+  tofstd.cc
+  tmarkup.cc
+  tchrenc.cc
+  txml.cc
+  tuuid.cc
+  toffile.cc
+  tmem.cc
+  toption.cc
+  ttuple.cc
+  tlimits.cc
+  tvariant.cc
+)
 
 # make sure executables are linked to the corresponding libraries
 DCMTK_TARGET_LINK_MODULES(ofstd_tests ofstd)
index f522e116d5f6af7b15a0d7fe7bb6e5f8fa88df18..2f32ce848e446c78408754c65c7ba24522f8228a 100644 (file)
@@ -65,7 +65,8 @@ tests.o: tests.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofstd.h ../include/dcmtk/ofstd/ofcond.h \
  ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
- ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofexit.h
+ ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofexit.h \
+ ../include/dcmtk/ofstd/ofxml.h
 tfilsys.o: tfilsys.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -82,7 +83,9 @@ tfilsys.o: tfilsys.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/offilsys.h ../include/dcmtk/ofstd/ofmem.h \
  ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../include/dcmtk/ofstd/ofvector.h ../include/dcmtk/ofstd/ofassert.h
+ ../include/dcmtk/ofstd/ofvector.h ../include/dcmtk/ofstd/ofassert.h \
+ ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/diag/slfassov.def \
+ ../include/dcmtk/ofstd/diag/constexp.def
 tftoa.o: tftoa.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -169,7 +172,8 @@ tmem.o: tmem.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../config/include/dcmtk/config/arith.h \
  ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofexit.h \
  ../include/dcmtk/ofstd/ofmem.h ../include/dcmtk/ofstd/ofutil.h \
- ../include/dcmtk/ofstd/variadic/tuplefwd.h
+ ../include/dcmtk/ofstd/variadic/tuplefwd.h \
+ ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/diag/pessmove.def
 tofdatim.o: tofdatim.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/ofdate.h ../include/dcmtk/ofstd/ofstring.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -195,6 +199,7 @@ toffile.o: toffile.cc ../../config/include/dcmtk/config/osconfig.h \
  ../../config/include/dcmtk/config/arith.h \
  ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofconsol.h \
  ../include/dcmtk/ofstd/ofthread.h ../include/dcmtk/ofstd/ofrand.h \
+ ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/diag/constexp.def \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/ofcmdln.h ../include/dcmtk/ofstd/ofexbl.h \
  ../include/dcmtk/ofstd/ofexit.h
@@ -301,7 +306,9 @@ ttuple.o: ttuple.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/diag/mmtag.def \
  ../include/dcmtk/ofstd/variadic/tuplefrd.h \
  ../include/dcmtk/ofstd/variadic/tuple.h \
- ../include/dcmtk/ofstd/diag/pop.def
+ ../include/dcmtk/ofstd/diag/pop.def \
+ ../include/dcmtk/ofstd/diag/constexp.def \
+ ../include/dcmtk/ofstd/diag/cnvrsn.def
 tuuid.o: tuuid.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oftest.h ../include/dcmtk/ofstd/ofconapp.h \
  ../include/dcmtk/ofstd/oftypes.h ../include/dcmtk/ofstd/ofdefine.h \
@@ -329,12 +336,12 @@ tvariant.o: tvariant.cc ../../config/include/dcmtk/config/osconfig.h \
  ../include/dcmtk/ofstd/oflimits.h \
  ../../config/include/dcmtk/config/arith.h \
  ../include/dcmtk/ofstd/oferror.h ../include/dcmtk/ofstd/ofexit.h \
- ../include/dcmtk/ofstd/ofvriant.h \
+ ../include/dcmtk/ofstd/ofvriant.h ../include/dcmtk/ofstd/ofdiag.h \
  ../include/dcmtk/ofstd/variadic/variant.h \
  ../include/dcmtk/ofstd/variadic/helpers.h \
  ../include/dcmtk/ofstd/ofalign.h ../include/dcmtk/ofstd/ofutil.h \
  ../include/dcmtk/ofstd/variadic/tuplefwd.h \
- ../include/dcmtk/ofstd/ofdiag.h ../include/dcmtk/ofstd/diag/push.def \
+ ../include/dcmtk/ofstd/diag/push.def \
  ../include/dcmtk/ofstd/diag/cnvrsn.def \
  ../include/dcmtk/ofstd/diag/vsprfw.def \
  ../include/dcmtk/ofstd/diag/pop.def
index b0cf04c7d1b1827b00791af51d0ac456d337c39c..6efde0971b598214b77b4d3af1502225abc8ee9c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 1997-2020, OFFIS e.V.
+ *  Copyright (C) 1997-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -27,9 +27,7 @@
 #define OFTEST_OFSTD_ONLY
 #include "dcmtk/ofstd/oftest.h"
 
-#define INCLUDE_CMATH
-#include "dcmtk/ofstd/ofstdinc.h"
-
+#include <cmath>
 
 struct ValuePair
 {
index 234e1e7834f967b5773848033049d5dc833c4532..7c6d88600a38bd40280f81f85e10bbd51e187683 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2018, OFFIS e.V.
+ *  Copyright (C) 2018-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofvector.h"
 #include "dcmtk/ofstd/oftraits.h"
 #include "dcmtk/ofstd/ofassert.h"
+#include "dcmtk/ofstd/ofdiag.h"      /* for DCMTK_DIAGNOSTIC macros */
+
+// suppress warning about "p /= p" lines, which are intentional for this test case.
+#include DCMTK_DIAGNOSTIC_IGNORE_SELF_ASSIGN_OVERLOADED_WARNING
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
 
 OFTEST(ofstd_filesystem)
 {
@@ -79,6 +84,11 @@ OFTEST(ofstd_filesystem)
     OFCHECK_EQUAL( ( OFpath( "test" ) / "..bla" ).extension(), ".bla" );
     OFCHECK_EQUAL( ( OFpath( "test" ) / ".." ).extension(), "" );
     OFCHECK_EQUAL( ( OFpath( "test" ) / "..." ).extension(), "." );
+    // separator conversion
+    OFCHECK_EQUAL( OFpath( "path/to/file" ), expected );
+    OFCHECK_EQUAL( OFpath( OFpath( expected ).native() ), expected );
+    OFCHECK_EQUAL( ( OFpath( "path/to/file", OFpath::generic_format ) ), expected );
+    OFCHECK_EQUAL( ( OFpath( OFpath( expected ).native(), OFpath::native_format ) ), expected );
     // self append
     OFpath p( OFString( "my" ) + OFpath::preferred_separator + "path" );
     expected = OFString( "my" )
index 13e879c290e7394725522889a51300088ae7ebe1..e5e9730f71036b6833b66e063abc2f7d11fd04c7 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2012-2013, OFFIS e.V.
+ *  Copyright (C) 2012-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -25,6 +25,8 @@
 #define OFTEST_OFSTD_ONLY
 #include "dcmtk/ofstd/oftest.h"
 #include "dcmtk/ofstd/ofmem.h"
+#include "dcmtk/ofstd/ofdiag.h"
+#include DCMTK_DIAGNOSTIC_IGNORE_PESSIMIZING_MOVE_WARNING
 
 OFrvalue<OFunique_ptr<int> > testMove()
 {
index a3a6f481a7779c03b02057b598d1d37a64c6949e..e6d1201818e4a459422942f0e83b6aefd7667e1d 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2018, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/ofconsol.h"
 #include "dcmtk/ofstd/ofstd.h"
 #include "dcmtk/ofstd/ofrand.h"
+#include "dcmtk/ofstd/ofdiag.h"      /* for DCMTK_DIAGNOSTIC macros */
+
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
 
 #define OFTEST_OFSTD_ONLY
 #include "dcmtk/ofstd/oftest.h"
 
-#define INCLUDE_CTIME
-#define INCLUDE_CSTDLIB
-#define INCLUDE_IOSTREAM
-#include "dcmtk/ofstd/ofstdinc.h"
-
 // size of block (Uint32 values, not bytes): 1 MByte
 #define BLOCKSIZE 0x40000
 // size of file (in blocks): 6 GByte
@@ -232,7 +230,8 @@ static OFBool seekFile(OFFile &file)
     if (1 == file.fread(&v, sizeof(Uint32), 1))
     {
       // successfully read value. Now check if the value is correct.
-      expected = (OFstatic_cast(offile_off_t, FILESIZE) * BLOCKSIZE * sizeof(Uint32) + pos) / sizeof(Uint32);
+      expected = OFstatic_cast(offile_off_t, FILESIZE);
+      expected = (expected * BLOCKSIZE * sizeof(Uint32) + pos) / sizeof(Uint32);
       if (v != OFstatic_cast(Uint32, expected))
       {
         COUT << "\nError: unexpected data read after fseek(SEEK_END) to block " << block
index 96ef044560ef4db47eb5dacb758f65ad42640463..0acdfb3864e5b000e7334c5ed06f4a11057b8f9f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2002-2018, OFFIS e.V.
+ *  Copyright (C) 2002-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
@@ -52,6 +52,11 @@ static void checkPathHandling(const OFString& input, const OFString& normalized,
     OFString slashFile;
     slashFile = PATH_SEPARATOR;
     slashFile += "file";
+#ifdef _WIN32
+    OFString slashFile2;
+    slashFile2 = '/';
+    slashFile2 += "file";
+#endif
 
     OFStandard::normalizeDirName(result, input);
     OFCHECK_EQUAL(result, normalized);
@@ -61,6 +66,12 @@ static void checkPathHandling(const OFString& input, const OFString& normalized,
 
     OFStandard::combineDirAndFilename(result, input, PATH_SEPARATOR + file);
     OFCHECK_EQUAL(result, slashFile);
+
+#ifdef _WIN32
+    OFStandard::combineDirAndFilename(result, input, '/' + file);
+    OFCHECK_EQUAL(result, slashFile2);
+#endif
+
 }
 
 OFTEST(ofstd_testPaths_1)
@@ -167,6 +178,84 @@ OFTEST(ofstd_testPaths_1)
     // hidden files/directories start with a "." (on Unix systems)
     OFStandard::combineDirAndFilename(result, "", ".hidden", OFTrue /*allowEmptyDirName*/);
     OFCHECK_EQUAL(result, ".hidden");
+
+#ifdef _WIN32
+    // now some special cases for Windows, where both slash and backslash are
+    // supported as path separators
+    pathSeparator = '/';
+    sourceRoot = ".." + pathSeparator + "..";
+
+    normalized = sourceRoot;
+    input = normalized + pathSeparator;
+    combined = normalized + PATH_SEPARATOR + "file";
+
+    checkExists(input, OFTrue, OFFalse, OFTrue);
+    checkPathHandling(input, normalized, combined);
+
+    // Trailing slashes shouldn't matter
+    input += pathSeparator + pathSeparator + pathSeparator;
+
+    checkExists(input, OFTrue, OFFalse, OFTrue);
+    checkPathHandling(input, normalized, combined);
+
+    // Now check a non-existent file
+    normalized = sourceRoot + pathSeparator + "does_not_exist";
+    input = normalized;
+    combined = input + PATH_SEPARATOR + "file";
+
+    checkExists(input, OFFalse, OFFalse, OFFalse);
+    checkPathHandling(input, normalized, combined);
+
+    // Check the working dir handling
+    input = normalized = ".";
+    combined = ".";
+    combined += PATH_SEPARATOR;
+    combined += "file";
+
+    checkExists(input, OFTrue, OFFalse, OFTrue);
+    checkPathHandling(input, normalized, combined);
+
+    // Check what happens to "///"
+    normalized = pathSeparator;
+    input = pathSeparator + pathSeparator + pathSeparator;
+    combined = normalized + "file";
+
+    // No checkExists() since Windows doesn't have "/"
+    checkPathHandling(input, normalized, combined);
+
+    // Now come some special tests for combineDirAndFilename
+    input = pathSeparator + pathSeparator + "caesar" + pathSeparator + "share";
+    OFStandard::combineDirAndFilename(result, input, "file");
+    OFCHECK_EQUAL(result, input + PATH_SEPARATOR + "file");
+
+    OFStandard::combineDirAndFilename(result, input, pathSeparator + "file");
+    OFCHECK_EQUAL(result, pathSeparator + "file");
+
+    combined = ".";
+    combined += PATH_SEPARATOR;
+    combined += "file";
+    OFStandard::combineDirAndFilename(result, "", "file");
+    OFCHECK_EQUAL(result, combined);
+
+    OFStandard::combineDirAndFilename(result, "", "file", OFTrue /*allowEmptyDirName*/);
+    OFCHECK_EQUAL(result, "file");
+
+    OFStandard::combineDirAndFilename(result, "", ".");
+    OFCHECK_EQUAL(result, ".");
+
+    OFStandard::combineDirAndFilename(result, "..", ".");
+    OFCHECK_EQUAL(result, "..");
+
+    OFStandard::combineDirAndFilename(result, "", "");
+    OFCHECK_EQUAL(result, ".");
+
+    OFStandard::combineDirAndFilename(result, "", "", OFTrue /*allowEmptyDirName*/);
+    OFCHECK_EQUAL(result, "");
+
+    // hidden files/directories start with a "." (on Unix systems)
+    OFStandard::combineDirAndFilename(result, "", ".hidden", OFTrue /*allowEmptyDirName*/);
+    OFCHECK_EQUAL(result, ".hidden");
+#endif
 }
 
 OFTEST(ofstd_testPaths_2)
@@ -185,6 +274,18 @@ OFTEST(ofstd_testPaths_2)
     OFCHECK_EQUAL(result, "dirname");
     OFStandard::getDirNameFromPath(result, "dirname", OFFalse /*assumeDirName*/);
     OFCHECK_EQUAL(result, "");
+#ifdef _WIN32
+    // on Windows, we also check paths containing '/' as a path separator,
+    // as well as mixed paths containing both separators
+    OFStandard::getDirNameFromPath(result, "dirname/filename");
+    OFCHECK_EQUAL(result, "dirname");
+    OFStandard::getDirNameFromPath(result, "dirname/dirname" + pathSeparator +"filename");
+    OFCHECK_EQUAL(result, "dirname/dirname");
+    OFStandard::getDirNameFromPath(result, "dirname" + pathSeparator + "dirname/filename");
+    OFCHECK_EQUAL(result, "dirname" + pathSeparator + "dirname");
+    OFStandard::getDirNameFromPath(result, "/dirname/");
+    OFCHECK_EQUAL(result, "/dirname");
+#endif
 
     // Check getFilenameFromPath()
     OFStandard::getFilenameFromPath(result, "dirname" + pathSeparator + "filename");
index 38f01e92e795e59d04c316350eb5adbcad963e13..ff59e149754b8519d6f1070bcf5857b92b13d3fa 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2000-2015, OFFIS e.V.
+ *  Copyright (C) 2000-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 } while (0)
 
 static OFMutex *mutex=NULL;
-static int mtx_var=0;
-static int mtx_cond1=0;
-static int mtx_cond2=0;
-static int mtx_cond3=0;
+static volatile int mtx_var=0;
+static volatile int mtx_cond1=0;
+static volatile int mtx_cond2=0;
+static volatile int mtx_cond3=0;
 static const int wait_timeout = 100;
 
 
@@ -83,6 +83,9 @@ static void mutex_test()
   OFString errmsg;
   mutex = new OFMutex();
   if ((!mutex)||(! mutex->initialized())) BAILOUT("creation of mutex failed");
+  OFMutex memory_barrier;
+  if (! memory_barrier.initialized()) BAILOUT("creation of mutex failed");
+
   int condition = mutex->trylock();
   if (condition)
   {
@@ -100,10 +103,17 @@ static void mutex_test()
   if (0 != t2.start()) BAILOUT("unable to create thread, mutex test failed");
 
   OFStandard::milliSleep(wait_timeout); // since I've got the mutex, nobody should write to mtx_var
+  memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+  memory_barrier.unlock();
   if (mtx_var != -1) BAILOUT("mutex test failed");
 
   int i=0;
-  while ((i++<5) && (!mtx_cond1)) OFStandard::milliSleep(wait_timeout);
+  while ((i++<10) && (!mtx_cond1))
+  {
+    memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+    memory_barrier.unlock();
+    OFStandard::milliSleep(wait_timeout);
+  }
   if (!mtx_cond1) BAILOUT("mutex trylock test failed");
 
   if (0 != (condition = mutex->unlock()))
@@ -113,7 +123,12 @@ static void mutex_test()
     BAILOUT(errmsg);
   }
 
-  while ((i++<5) && ((!mtx_cond2)||(!mtx_cond3))) OFStandard::milliSleep(wait_timeout);
+  while ((i++<10) && ((!mtx_cond2)||(!mtx_cond3)))
+  {
+    memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+    memory_barrier.unlock();
+    OFStandard::milliSleep(wait_timeout);
+  }
   if ((!mtx_cond2) || (!mtx_cond3)) BAILOUT("mutex lock/unlock test failed");
 
   if (0 != t1.join()) BAILOUT("unable to join thread, mutex test failed");
@@ -123,10 +138,10 @@ static void mutex_test()
 }
 
 static OFSemaphore *semaphore=NULL;
-static int sem_cond1=0;
-static int sem_cond2=0;
-static int sem_cond3=0;
-static int sem_cond4=0;
+static volatile int sem_cond1=0;
+static volatile int sem_cond2=0;
+static volatile int sem_cond3=0;
+static volatile int sem_cond4=0;
 
 class SemaT1: public OFThread
 {
@@ -162,6 +177,11 @@ public:
         if (0== semaphore->post()) sem_cond4=1;
       }
     }
+    else
+    {
+        sem_cond3 = 1; // acquired semaphore
+        if (0== semaphore->post()) sem_cond4=1;
+    }
   }
 };
 
@@ -187,11 +207,19 @@ static void semaphore_test()
     BAILOUT(errmsg);
   }
 
+  OFMutex memory_barrier;
+  if (! memory_barrier.initialized()) BAILOUT("creation of mutex failed");
+
   SemaT1 t1;
   if (0 != t1.start()) BAILOUT("unable to create thread, semaphore test failed");
 
   int i=0;
-  while ((i++<5) && (!sem_cond1)) OFStandard::milliSleep(wait_timeout);
+  while ((i++<10) && (!sem_cond1))
+  {
+    memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+    memory_barrier.unlock();
+    OFStandard::milliSleep(wait_timeout);
+  }
   if (!sem_cond1) BAILOUT("semaphore lock/unlock test failed");
 
   SemaT2 t2;
@@ -202,8 +230,14 @@ static void semaphore_test()
   mutex->unlock();
 
   i=0;
-  while ((i++<5) && ((!sem_cond2)||(!sem_cond3)||(!sem_cond4))) OFStandard::milliSleep(wait_timeout);
-  if ((!mtx_cond2) || (!mtx_cond3) || (!sem_cond4)) BAILOUT("semaphore lock/unlock test failed");
+  while ((i++<10) && ((!sem_cond2)||(!sem_cond3)||(!sem_cond4)))
+  {
+    memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+    memory_barrier.unlock();
+    OFStandard::milliSleep(wait_timeout);
+  }
+
+  if ((!sem_cond2)||(!sem_cond3)||(!sem_cond4)) BAILOUT("semaphore lock/unlock test failed: sem_cond2=" << sem_cond2 << ", sem_cond3=" << sem_cond3 << ", sem_cond4=" << sem_cond4);
 
   if (0 != t1.join()) BAILOUT("unable to join thread, semaphore test failed");
   if (0 != t2.join()) BAILOUT("unable to join thread, semaphore test failed");
@@ -214,13 +248,13 @@ static void semaphore_test()
 
 static OFReadWriteLock *rwlock=NULL;
 static OFMutex *mutex2=NULL;
-static int rw_cond1=0;
-static int rw_cond2=0;
-static int rw_cond3=0;
-static int rw_cond4=0;
-static int rw_cond5=0;
-static int rw_cond6=0;
-static int rw_cond7=0;
+static volatile int rw_cond1=0;
+static volatile int rw_cond2=0;
+static volatile int rw_cond3=0;
+static volatile int rw_cond4=0;
+static volatile int rw_cond5=0;
+static volatile int rw_cond6=0;
+static volatile int rw_cond7=0;
 
 class RWLockT2: public OFThread
 {
@@ -298,12 +332,20 @@ static void rwlock_test()
     BAILOUT(errmsg);
   }
 
+  OFMutex memory_barrier;
+  if (! memory_barrier.initialized()) BAILOUT("creation of mutex failed");
+
   RWLockT2 t2;
   RWLockT1 t1(t2);
   if (0 != t1.start()) BAILOUT("unable to create thread, read/write lock/unlock test failed");
 
   int i=0;
-  while ((i++<5) && ((!rw_cond1)||(!rw_cond5))) OFStandard::milliSleep(wait_timeout);
+  while ((i++<10) && ((!rw_cond1)||(!rw_cond5)))
+  {
+    memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+    memory_barrier.unlock();
+    OFStandard::milliSleep(wait_timeout);
+  }
 
   if ((!rw_cond1)||(!rw_cond5)) BAILOUT("read/write lock/unlock test failed");
   condition = rwlock->rdunlock();
@@ -314,12 +356,20 @@ static void rwlock_test()
     BAILOUT(errmsg);
   }
   OFStandard::milliSleep(wait_timeout);
+  memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+  memory_barrier.unlock();
   if (rw_cond6) BAILOUT("read/write lock/unlock test failed");
 
   mutex->unlock();
 
   i=0;
-  while ((i++<5) && ((!rw_cond2)||(!rw_cond3)||(!rw_cond4)||(!rw_cond5)||(!rw_cond6)||(!rw_cond7))) OFStandard::milliSleep(wait_timeout);
+  while ((i++<10) && ((!rw_cond2)||(!rw_cond3)||(!rw_cond4)||(!rw_cond5)||(!rw_cond6)||(!rw_cond7)))
+  {
+    memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+    memory_barrier.unlock();
+    OFStandard::milliSleep(wait_timeout);
+  }
+
   if ((!rw_cond2)||(!rw_cond3)||(!rw_cond4)||(!rw_cond5)||(!rw_cond6)||(!rw_cond7)) BAILOUT("read/write lock/unlock test failed");
 
   if (0 != t1.join()) BAILOUT("unable to join thread, read/write lock/unlock test failed");
@@ -422,12 +472,20 @@ static void rwlocker_test()
     BAILOUT(errmsg);
   }
 
+  OFMutex memory_barrier;
+  if (! memory_barrier.initialized()) BAILOUT("creation of mutex failed");
+
   RWLockerT2 t2;
   RWLockerT1 t1(t2);
   if (0 != t1.start()) BAILOUT("unable to create thread, read/write lock test failed");
 
   int i=0;
-  while ((i++<5) && ((!rw_cond1)||(!rw_cond5))) OFStandard::milliSleep(wait_timeout);
+  while ((i++<10) && ((!rw_cond1)||(!rw_cond5)))
+  {
+    memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+    memory_barrier.unlock();
+    OFStandard::milliSleep(wait_timeout);
+  }
 
   if ((!rw_cond1)||(!rw_cond5)) BAILOUT("read/write lock test failed");
   condition = rwlockLocker.unlock();
@@ -438,12 +496,20 @@ static void rwlocker_test()
     BAILOUT(errmsg);
   }
   OFStandard::milliSleep(wait_timeout);
+  memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+  memory_barrier.unlock();
   if (rw_cond6) BAILOUT("read/write lock test failed");
 
   mutex->unlock();
 
   i=0;
-  while ((i++<5) && ((!rw_cond2)||(!rw_cond3)||(!rw_cond4)||(!rw_cond5)||(!rw_cond6)||(!rw_cond7))) OFStandard::milliSleep(wait_timeout);
+  while ((i++<10) && ((!rw_cond2)||(!rw_cond3)||(!rw_cond4)||(!rw_cond5)||(!rw_cond6)||(!rw_cond7)))
+  {
+    memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+    memory_barrier.unlock();
+    OFStandard::milliSleep(wait_timeout);
+  }
+
   if ((!rw_cond2)||(!rw_cond3)||(!rw_cond4)||(!rw_cond5)||(!rw_cond6)||(!rw_cond7)) BAILOUT("read/write lock test failed");
 
   if (0 != t1.join()) BAILOUT("unable to join thread, read/write lock test failed");
@@ -456,10 +522,10 @@ static void rwlocker_test()
 
 
 static OFThreadSpecificData *tsdata=NULL;
-static int tsd_cond1=0;
-static int tsd_cond2=0;
-static int tsd_cond3=0;
-static int tsd_cond4=0;
+static volatile int tsd_cond1=0;
+static volatile int tsd_cond2=0;
+static volatile int tsd_cond3=0;
+static volatile int tsd_cond4=0;
 
 class TSDataT1: public OFThread
 {
@@ -532,6 +598,9 @@ static void tsdata_test()
     BAILOUT(errmsg);
   }
 
+  OFMutex memory_barrier;
+  if (! memory_barrier.initialized()) BAILOUT("creation of mutex failed");
+
   TSDataT1 t1;
   if (0 != t1.start()) BAILOUT("unable to create thread, thread specific data test failed");
 
@@ -540,7 +609,12 @@ static void tsdata_test()
 
 
   int i=0;
-  while ((i++<5) && ((!tsd_cond1)||(!tsd_cond2))) OFStandard::milliSleep(wait_timeout);
+  while ((i++<10) && ((!tsd_cond1)||(!tsd_cond2)))
+  {
+    memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+    memory_barrier.unlock();
+    OFStandard::milliSleep(wait_timeout);
+  }
 
   if ((!tsd_cond1)||(!tsd_cond2)) BAILOUT("thread specific data write test failed");
 
@@ -560,7 +634,13 @@ static void tsdata_test()
   }
 
   i=0;
-  while ((i++<5) && ((!tsd_cond3)||(!tsd_cond4))) OFStandard::milliSleep(wait_timeout);
+  while ((i++<10) && ((!tsd_cond3)||(!tsd_cond4)))
+  {
+    memory_barrier.lock(); // locking the mutex acts as a (inefficient, but portable) memory barrier
+    memory_barrier.unlock();
+    OFStandard::milliSleep(wait_timeout);
+  }
+
   if ((!tsd_cond3)||(!tsd_cond4)) BAILOUT("thread specific data read test failed");
 
   if (0 != t1.join()) BAILOUT("unable to create thread, thread specific data test failed");
index d4d4c381197f20e8517e8a2978866f497d6792e0..5b58f5f46ee1d22de81fbd2a9a8f694a0bdb329c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2014-2017, OFFIS e.V.
+ *  Copyright (C) 2014-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
  *
  */
 
-// Disable some warnings.
-// We're testing if a tuple containing floats can be initialized from a tuple of
-// ints, which is required by the standard. But this gives precision warnings
-// on some compilers / at some settings and we don't want to see these warnings.
-#ifdef __GNUG__
-#pragma GCC diagnostic ignored "-Wconversion"
-#elif defined(_MSC_VER)
-#pragma warning(disable: 4244)
-#endif
-
 #include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
 
 #define OFTEST_OFSTD_ONLY
 #include "dcmtk/ofstd/oftest.h"
 #include "dcmtk/ofstd/oftuple.h"
 #include "dcmtk/ofstd/ofstring.h"
+#include "dcmtk/ofstd/ofdiag.h"      /* for DCMTK_DIAGNOSTIC macros */
+
+// Disable some warnings.
+// We're testing if a tuple containing floats can be initialized from a tuple of
+// ints, which is required by the standard. But this gives precision warnings
+// on some compilers / at some settings and we don't want to see these warnings.
+#include DCMTK_DIAGNOSTIC_IGNORE_CONST_EXPRESSION_WARNING
+#include DCMTK_DIAGNOSTIC_IGNORE_IMPLICIT_CONVERSION
 
 OFTEST(ofstd_tuple)
 {
index 2c5fffe1363ffe04c51440af8c0d086cf7468c6d..619d2803515942d4a65eed0f6e8cbd3600d8eaed 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *
- *  Copyright (C) 2011, OFFIS e.V.
+ *  Copyright (C) 2011-2021, OFFIS e.V.
  *  All rights reserved.  See COPYRIGHT file for details.
  *
  *  This software and supporting documentation were developed by
 #include "dcmtk/ofstd/oftest.h"
 #include "dcmtk/ofstd/ofuuid.h"
 
-#define INCLUDE_CSTRING
-#include "dcmtk/ofstd/ofstdinc.h"     /* needed for memcmp() */
-
-
 OFTEST(ofstd_OFUUID_1)
 {
     /* Verify that two UUIDs are different and a UUID is equal to itself */