MeVisLab Toolbox Reference
mlMultiFrameTools.h
Go to the documentation of this file.
1 // Copyright (c) Fraunhofer MEVIS, Germany. All rights reserved.
2 // **InsertLicense** code
3 //----------------------------------------------------------------------------------
6 
11 //----------------------------------------------------------------------------------
12 #pragma once
13 
14 #include "MLDICOMTagsSystem.h"
15 
16 // ML includes
17 #include <mlTypeDefs.h>
18 
19 #include <ThirdPartyWarningsDisable.h>
20 #include <string>
21 #include <ThirdPartyWarningsRestore.h>
22 
23 // DCMTree pointers etc.
24 #include <ThirdPartyWarningsDisable.h>
25 #include "DCMTree_Lib.h"
26 #include <ThirdPartyWarningsRestore.h>
28 
29 ML_START_NAMESPACE
30 
31 // Forwards
32 class DicomMessageCollector;
33 
34 //----------------------------------------------------------------------------------
36 //----------------------------------------------------------------------------------
37 namespace MultiFrameTools
38 {
45 
49 
52 
68  DCMTree::TreePtr dstTree,
69  const DICOMTagTools::TagIdDesc *tagsToCopy,
70  bool alsoCopySequenceTags);
71 
83  std::vector<DCMTree::RawTagId> *copyTagIds,
84  DCMTree::Const_TreePtr srcTree,
85  size_t frameIdx,
86  DCMTree::TreePtr &dstTree,
87  DicomMessageCollector &dcmMsgCollector);
88 
97  size_t pffgItemIdx,
98  DCMTree::TreePtr dstFramePtr,
99  DicomMessageCollector &dcmMsgCollector);
100 
126  std::vector<DCMTree::TreePtr> &singleFrameList,
127  const DICOMTagTools::TagIdDesc *tagsToCopy,
128  const DICOMTagTools::TagIdDesc *tagsToRemove,
129  bool addFullFunctionalGroupSequences,
130  DicomMessageCollector &dcmMsgCollector);
131 
152  std::vector<DCMTree::TreePtr> &singleFrameList,
153  const DICOMTagTools::TagIdDesc *tagsToCopy,
154  const DICOMTagTools::TagIdDesc *tagsToRemove,
155  bool addFullFunctionalGroupSequences,
156  DicomMessageCollector &dcmMsgCollector);
157 };
158 
159 ML_END_NAMESPACE
Project global and OS specific declarations.
#define MLDICOMTags_EXPORT
If included by external modules, exported symbols are declared as import symbols.
Class to collect messages and errors related to a given frame handle.
A collection of tools related to DICOM tags and tree removal and modifications.
boost::shared_ptr< const Tree > Const_TreePtr
Definition: DCMTree_Lib.h:73
boost::shared_ptr< Tree > TreePtr
shared pointer to a DCMTree::Tree
Definition: DCMTree_Lib.h:70
unsigned int RawTagId
Definition: DCMTree_Lib.h:147
MLDICOMTags_EXPORT void copyTopLevelTags(DCMTree::Const_TreePtr mfTree, DCMTree::TreePtr dstTree, const DICOMTagTools::TagIdDesc *tagsToCopy, bool alsoCopySequenceTags)
This routine copies root tags from mfTree to destTree; pixel data and/or sequence tags are possibly s...
MLDICOMTags_EXPORT bool isEnhanced(DCMTree::Const_TreePtr dcmTree)
Returns true if dcmTree seems to be a valid dcmTree and and enhanced IOD; nullptr trees return false.
MLDICOMTags_EXPORT bool extractSingleFramesFromMultiFrameTree(DCMTree::Const_TreePtr dcmMFTree, std::vector< DCMTree::TreePtr > &singleFrameList, const DICOMTagTools::TagIdDesc *tagsToCopy, const DICOMTagTools::TagIdDesc *tagsToRemove, bool addFullFunctionalGroupSequences, DicomMessageCollector &dcmMsgCollector)
If possible this routine tries to build a set of DICOM trees (one for each frame) from the multi-fram...
MLDICOMTags_EXPORT bool doMultiFrameDecomposition(DCMTree::Const_TreePtr mfTree, std::vector< DCMTree::TreePtr > &singleFrameList, const DICOMTagTools::TagIdDesc *tagsToCopy, const DICOMTagTools::TagIdDesc *tagsToRemove, bool addFullFunctionalGroupSequences, DicomMessageCollector &dcmMsgCollector)
Decomposes a the multi-frame file given by fileAttributes and adds each frame as a single frame with ...
MLDICOMTags_EXPORT bool isSingleFrame(DCMTree::Const_TreePtr dcmTree)
Returns true if dcmTree seems to be a valid dcmTree and no multi-frame file; nullptr trees return fal...
MLDICOMTags_EXPORT void addSubSequenceTags(DCMTree::RawTagId sequenceTagId, std::vector< DCMTree::RawTagId > *copyTagIds, DCMTree::Const_TreePtr srcTree, size_t frameIdx, DCMTree::TreePtr &dstTree, DicomMessageCollector &dcmMsgCollector)
Gets the tag with ID sequenceTagId from the given srcTree, checks whether it is a sequence tag,...
MLDICOMTags_EXPORT const DICOMTagTools::TagIdDesc BaseTagsToRemove[]
A list of tags which should not copied from a top level multi-frame tree to a single frame,...
MLDICOMTags_EXPORT void addSequenceContents(DCMTree::Const_TreePtr srcFrameTree, size_t pffgItemIdx, DCMTree::TreePtr dstFramePtr, DicomMessageCollector &dcmMsgCollector)
Searches all sequences in srcFrameTree and copies the tags in all sequence items flatly to dstFramePt...
Small helper class describing the raw-id of the DICOM tag as well as its human readable name.