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 <FMEThirdPartyWarningsDisable.h>
20#include <string>
21#include <FMEThirdPartyWarningsRestore.h>
22
23// DCMTree pointers etc.
24#include <FMEThirdPartyWarningsDisable.h>
25#include "DCMTree_Lib.h"
26#include <FMEThirdPartyWarningsRestore.h>
28
30
31// Forwards
32class DicomMessageCollector;
33
34//----------------------------------------------------------------------------------
36//----------------------------------------------------------------------------------
37namespace MultiFrameTools
38{
45
49
52
71
83 std::vector<DCMTree::RawTagId> *copyTagIds,
85 size_t frameIdx,
87 DicomMessageCollector &dcmMsgCollector);
88
97 size_t pffgItemIdx,
99 DicomMessageCollector &dcmMsgCollector);
100
126 std::vector<DCMTree::TreePtr> &singleFrameList,
130 DicomMessageCollector &dcmMsgCollector);
131
152 std::vector<DCMTree::TreePtr> &singleFrameList,
156 DicomMessageCollector &dcmMsgCollector);
157};
158
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.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
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:72
unsigned int RawTagId
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.