MeVisLab Toolbox Reference
mlMLToDicomTagSetUpArguments.h
Go to the documentation of this file.
1// Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2// **InsertLicense** code
3//----------------------------------------------------------------------------------
6
11//----------------------------------------------------------------------------------
12
13#pragma once
14
16#include <mlModuleIncludes.h>
17#include <DCMTree_Lib.h>
18
19ML_START_NAMESPACE
20
23namespace MLToDicomTools {
24
32
33 public:
34
50
53 typedef std::map<DCMTree::RawTagId, std::string> IndexVectorLookUpMap;
54
56 typedef std::vector<DCMTree::RawTagId> RawIdVector;
57
59 static const char* const MapDimensionToFrameIncrementStrings[NumMapDimensionToFrameIncrementStrings];
60
64 DoNotModifyImageType = 0,
73
74 NumImageTypeForFrameIncrementPointerStrings
75 };
76
78 static const char* const ImageTypeForFrameIncrementPointerStrings[NumImageTypeForFrameIncrementPointerStrings];
79
82
90 const ImageVector &newImageExtents,
91 std::string &issues);
92
96
100
106
112
115
118
121
124
125 private:
126
128 bool _hasDuplicateDimensionMapping() const;
129
131 void _removeNMRelatedTags(DCMTree::TreePtr dcmTree);
132
141 size_t _buildIndexVectorStrings(const ImageVector &newImageExtents,
142 std::string &zVectorStr,
143 std::string &tVectorStr,
144 std::string &uVectorStr,
145 std::string &otherVectorStr);
146
159 void _setUpIdxVectorIdToStringLookUp(IndexVectorLookUpMap &indexVectorLookUpMap,
160 const std::string &zVectorStr,
161 const std::string &tVectorStr,
162 const std::string &uVectorStr,
163 const std::string &otherVectorStr);
164
179 std::string _updateImageTypeTag(DCMTree::TreePtr dcmTree,
180 bool modifyImageType,
181 const std::string &firstImageTypeVal = "DERIVED",
182 const std::string &secondImageTypeVal = "SECONDARY");
183
198 std::string _setUpNMFrameIncrementVectorIndexVectorAndNumberTags(DCMTree::TreePtr &dcmTree,
199 const ImageVector &newImageExtents,
200 const std::string &imgType3,
201 IndexVectorLookUpMap &indexVectorLookUpMap,
202 const size_t totalFrameNum);
203
206 RawIdVector _getFrameIncrementPointerVal(const std::string &imgTypeVal3Str) const;
207
209 static DCMTree::RawTagId _getIndexVectorTagId(const MapDimensionToFrameIncrement dimMap);
210
212 static DCMTree::RawTagId _getNumberOfIndexVectorItemsTagId(const MapDimensionToFrameIncrement dimMap);
213
216 static ImageTypeForFrameIncrementPointer _getImageTypeVal3ForString(const std::string &val3);
217
236 void _setUpAssignedIndexVectorTags(DCMTree::TreePtr &dcmTree,
237 const ImageVector &newImageExtents,
238 IndexVectorLookUpMap &indexVectorLookUpMap,
239 RawIdVector &requiredIdxVecIds,
240 RawIdVector &sortedRequiredIdxVecIds);
241
258 void _setUpUnAssignedIndexVectorTags(DCMTree::TreePtr &dcmTree,
259 IndexVectorLookUpMap &indexVectorLookUpMap,
260 const size_t totalFrameNum,
261 RawIdVector &requiredIdxVecIds,
262 RawIdVector &sortedRequiredIdxVecIds);
263
265 void _addFrameIncrementPointerTag(DCMTree::TreePtr &dcmTree,
266 const RawIdVector &tagIds);
267
272 std::string _setUpNumberOfEnergyWindowsAndNumberOfDetectors(DCMTree::TreePtr &dcmTree);
273 };
274
275};
276
277ML_END_NAMESPACE
Project global and OS specific declarations.
#define ML_MLToDicomTools_EXPORT
Only for diagnostic purposes.
Some dedicated parameters for advanced tag setups when setting pixel data and related tags in DICOM f...
MapDimensionToFrameIncrement uDimToIndexVector
Determines to which DICOM index vector the u-extent is mapped.
MapDimensionToFrameIncrement
An enumerator describing how an ML dimension shall be mapped onto an NM tag vector.
int originalNumberOfFrames
If < 0 then it is expected that adjustNMModalityImageTags determines the NumberOfFrames value from in...
MapDimensionToFrameIncrement tDimToIndexVector
Determines to which DICOM index vector the t-extent is mapped.
std::vector< DCMTree::RawTagId > RawIdVector
An std::vector of DCMTree::RawID items.
AdvancedTagSetUpArgs()
Default constructor for a defined member initialization.
ImageTypeForFrameIncrementPointer imageTypeValue3
Determines to which DICOM index vector the z-extent is mapped.
void adjustNMModalityImageTags(DCMTree::TreePtr dcmTree, const ImageVector &newImageExtents, std::string &issues)
Modifies NM modality tags related to image extents.
bool skipOutrangedTSlices
If true and if the t component in the Vector6Field named "framePosition" is outside the inImg....
MapDimensionToFrameIncrement zDimToIndexVector
Determines to which DICOM index vector the z-extent is mapped.
std::map< DCMTree::RawTagId, std::string > IndexVectorLookUpMap
A map which assigns index vector strings (separated by backslashes between indexes) to their correspo...
bool skipOutrangedUSlices
If true and if the u component in the Vector6Field named "framePosition" is outside the inImg....
ImageTypeForFrameIncrementPointer
Image Type(0008,0008), Value 3, see Table C.8-8 of C.8.4.8.1 NM Multi-Frame Attribute Descriptions in...
std::string originalImageTypeValue3
If empty then it is expected that adjustNMModalityImageTags determines the value 3 of the ImageType t...
boost::shared_ptr< Tree > TreePtr
Shared pointer to a DCMTree::Tree.
Definition DCMTree_Lib.h:66
unsigned int RawTagId