MeVisLab Toolbox Reference
mlDICOMTagIdTools.h File Reference

A collection of tools related to DICOM tag Ids. More...

#include "MLDICOMTagsSystem.h"
#include <ThirdPartyWarningsDisable.h>
#include <string>
#include <vector>
#include <ThirdPartyWarningsRestore.h>
#include <mlUtilsSystem.h>
#include <DCMTree_Lib.h>

Go to the source code of this file.

Namespaces

 ml
 Main documentation file for ML users and developers.
 
 ml::DICOMTagTools
 A namespace collecting tools related to DICOM tags and tree tools.
 

Functions

MLDICOMTags_EXPORT bool ml::DICOMTagTools::hasValidTagIdRange (MLint val)
 Returns true if the MLint argument val has a valid uint32 range, otherwise false is returned. More...
 
MLDICOMTags_EXPORT bool ml::DICOMTagTools::hasValidTagIdRange (size_t val)
 Returns true if the size_t argument val has a valid uint32 range, otherwise false is returned. More...
 
MLDICOMTags_EXPORT std::string ml::DICOMTagTools::checkForOneOf (DCMTree::TagId id, DCMTree::Const_TreePtr dcmTree, const char *const valueList[], size_t numValues, bool requiresExistingTag=true, bool requiresTextStringValue=true)
 Checks whether the tag has any of the values in valueList - if yes then an empty string is returned, otherwise a textual error description; dcmTree and valueList must be non-nullptr. More...
 
MLDICOMTags_EXPORT std::string ml::DICOMTagTools::validatePrivateCreators (DCMTree::Const_TreePtr dcmTree, std::vector< unsigned int > &privateCreators, std::vector< unsigned int > *badPrivateCreators=nullptr)
 Applies some consistency checks on private creators and returns an empty string if no issues are found, otherwise a text description of the problem(s). More...
 
MLDICOMTags_EXPORT std::string ml::DICOMTagTools::validatePrivateTagIds (DCMTree::Const_TreePtr dcmTree, std::vector< unsigned int > privateIds, std::vector< unsigned int > privateCreators)
 Applies some consistency checks on private creators and private tags and returns an empty string if no issues are found, otherwise a text description of the problem(s). More...
 
MLDICOMTags_EXPORT std::string ml::DICOMTagTools::printTagId (DCMTree::TagId id, DCMTree::Const_DictPtr dict, bool printValue=false, DCMTree::Const_TreePtr dcmTree=DCMTree::Const_TreePtr(), const std::string &valueIntro=" with value '", const std::string &valueExtro="'", size_t abbreviateAfter=15u)
 Convert a tag name with its id and optionally the tag value to a string by
using the DicomTree dictionary. More...
 
MLDICOMTags_EXPORT MLint ml::DICOMTagTools::parseUserTagIdStringVal (std::string tagIdStrVal, bool replaceXsByZeros=false)
 Parses the given string tagIdStrVal and returns it as positive unsigned integer value if the parsed value looks like a valid raw tag id. More...
 
MLDICOMTags_EXPORT std::string ml::DICOMTagTools::replaceTagIdPlaceholder (DCMTree::Const_TreePtr dcmTree, std::string strToReplace, bool correctTagValues=false, const std::string &defaultTagContent="")
 Replaces all substrings of the format "$(TAGID(ABCD,EFGH))" by the values of the first occurrence values of the corresponding DICOM tag ids in dcmTree; syntactically correct placeholders will be replaced by found tags values or defaultTagContent, syntactically incorrect placeholders will not be replaced. More...
 

Detailed Description

A collection of tools related to DICOM tag Ids.

Author
Wolf Spindler.
Date
07/2013

Definition in file mlDICOMTagIdTools.h.