/usr/include/dcmtk/dcmiod/modhelp.h is in libdcmtk-dev 3.6.2-3build3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | /*
*
* Copyright (C) 2015, Open Connections GmbH
* 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: dcmiod
*
* Author: Michael Onken, Andriy Fedorov
*
* Purpose: Helper functions for copying common modules between datasets
*
*/
#ifndef MODHELP_H
#define MODHELP_H
#include "dcmtk/config/osconfig.h" /* make sure OS specific configuration is included first */
#include "dcmtk/ofstd/oftypes.h"
#include "dcmtk/dcmiod/ioddef.h"
// forward declarations
class DcmTagKey;
class DcmItem;
/** This class contains helper functions that permit copying common modules
* from DICOM standard part 3 between DICOM datasets.
* @note The attribute lists per module are taken from the final text version
* of DICOM 2013.
*/
class DCMTK_DCMIOD_EXPORT DcmModuleHelpers {
protected:
/// Generic copy module helper method.
template<size_t N>
static inline void copyModule(const DcmTagKey (&tags)[N],
DcmItem& src, DcmItem& dest);
/// List of tags within the Patient Module
static const DcmTagKey patientModuleTags[];
/// List of tags within the Clinical Trial Subject Module
static const DcmTagKey clinicalTrialSubjectModuleTags[];
/// List of tags within the General Study Module
static const DcmTagKey generalStudyModuleTags[];
/// List of tags within the Patient Study Module
static const DcmTagKey patientStudyModuleTags[];
/// List of tags within the Clinical Trial Study Module
static const DcmTagKey clinicalTrialStudyModuleTags[];
/// List of tags within the General Series Module
static const DcmTagKey generalSeriesModuleTags[];
/// List of tags within the Clinical Trial Series Module
static const DcmTagKey clinicalTrialSeriesModuleTags[];
/// List of tags within the General Equipment Module
static const DcmTagKey generalEquipmentModuleTags[];
/// List of tags within the Frame of Reference Module
static const DcmTagKey frameOfReferenceModuleTags[];
/// List of tags within the SOP Common Module, excluding Digital Signatures
/// Macro, i.e.\ MAC Parameters Sequence and Digital Signatures Sequence
static const DcmTagKey sopCommonModuleTags[];
/// List of tags within the General Image Module
static const DcmTagKey generalImageModuleTags[];
public:
/** Copy element defined by tag from source item to destination item.
* No in-depth search is performed but only the main level is searched
* for the given tag. If the tag is not found, the destination item
* is not touched at all.
* @param tag Tag key of the element to be copied
* @param src Item that serves as a source for copying the element.
* In typical image objects, this will be the main dataset.
* @param dest Item that serves as a destination for inserting the
* copied element, if found.
*/
static void copyElement(const DcmTagKey& tag, DcmItem& src, DcmItem& dest);
/** Copy Patient Module attributes.
* @param src Item to copy module from. Only the main level is searched,
* i.e.\ no in-depth search is performed on the various tags.
* @param dest Item to copy module to. An element not found within
* the source item will neither be created in the destination
* item, nor will any existing value be touched in the
* destination item.
*/
static void copyPatientModule(DcmItem& src, DcmItem& dest);
/** Copy Clinical Trial Subject Module attributes.
* @param src Item to copy module from. Only the main level is searched,
* i.e.\ no in-depth search is performed on the various tags.
* @param dest Item to copy module to. An element not found within
* the source item will neither be created in the destination
* item, nor will any existing value be touched in the
* destination item.
*/
static void copyClinicalTrialSubjectModule(DcmItem& src, DcmItem& dest);
/** Copy General Study Module attributes.
* @param src Item to copy module from. Only the main level is searched,
* i.e.\ no in-depth search is performed on the various tags.
* @param dest Item to copy module to. An element not found within
* the source item will neither be created in the destination
* item, nor will any existing value be touched in the
* destination item.
*/
static void copyGeneralStudyModule(DcmItem& src, DcmItem& dest);
/** Copy Patient Study Module attributes.
* @param src Item to copy module from. Only the main level is searched,
* i.e.\ no in-depth search is performed on the various tags.
* @param dest Item to copy module to. An element not found within
* the source item will neither be created in the destination
* item, nor will any existing value be touched in the
* destination item.
*/
static void copyPatientStudyModule(DcmItem& src, DcmItem& dest);
/** Copy Clinical Trial Study Module attributes.
* @param src Item to copy module from. Only the main level is searched,
* i.e.\ no in-depth search is performed on the various tags.
* @param dest Item to copy module to. An element not found within
* the source item will neither be created in the destination
* item, nor will any existing value be touched in the
* destination item.
*/
static void copyClinicalTrialStudyModule(DcmItem& src, DcmItem& dest);
/** Copy General Series Module attributes.
* @param src Item to copy module from. Only the main level is searched,
* i.e.\ no in-depth search is performed on the various tags.
* @param dest Item to copy module to. An element not found within
* the source item will neither be created in the destination
* item, nor will any existing value be touched in the
* destination item.
*/
static void copyGeneralSeriesModule(DcmItem& src, DcmItem& dest);
/** Copy Clinical Trial Series Module attributes.
* @param src Item to copy module from. Only the main level is searched,
* i.e.\ no in-depth search is performed on the various tags.
* @param dest Item to copy module to. An element not found within
* the source item will neither be created in the destination
* item, nor will any existing value be touched in the
* destination item.
*/
static void copyClinicalTrialSeriesModule(DcmItem& src, DcmItem& dest);
/** Copy General Equipment Module attributes.
* @param src Item to copy module from. Only the main level is searched,
* i.e.\ no in-depth search is performed on the various tags.
* @param dest Item to copy module to. An element not found within
* the source item will neither be created in the destination
* item, nor will any existing value be touched in the
* destination item.
*/
static void copyGeneralEquipmentModule(DcmItem& src, DcmItem& dest);
/** Copy Frame of Reference Module attributes.
* @param src Item to copy module from. Only the main level is searched,
* i.e.\ no in-depth search is performed on the various tags.
* @param dest Item to copy module to. An element not found within
* the source item will neither be created in the destination
* item, nor will any existing value be touched in the
* destination item.
*/
static void copyFrameOfReferenceModule(DcmItem& src, DcmItem& dest);
/** Copy SOP Common Module attributes.
* Excludes: Digital Signatures Macro, i.e.\ MAC Parameters Sequence and
* Digital Signatures Sequence.
* @param src Item to copy module from. Only the main level is searched,
* i.e.\ no in-depth search is performed on the various tags.
* @param dest Item to copy module to. An element not found within
* the source item will neither be created in the destination
* item, nor will any existing value be touched in the
* destination item.
*/
static void copySOPCommonModule(DcmItem& src, DcmItem& dest);
/** Copy General Image Module attributes.
* @param src Item to copy module from. Only the main level is searched,
* i.e.\ no in-depth search is performed on the various tags.
* @param dest Item to copy module to. An element not found within
* the source item will neither be created in the destination
* item, nor will any existing value be touched in the
* destination item.
*/
static void copyGeneralImageModule(DcmItem& src, DcmItem& dest);
};
#endif // MODHELP_H
|