MeVisLab Toolbox Reference
|
A collection of tools related to DICOM tags and dictionaries. More...
#include "MLDICOMTagsSystem.h"
#include <ThirdPartyWarningsDisable.h>
#include <string>
#include <ThirdPartyWarningsRestore.h>
#include <mlLinearAlgebra.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. | |
Enumerations | |
enum | ml::DICOMTagTools::ValueModifyModes { ml::DICOMTagTools::Replace =0 , ml::DICOMTagTools::DoNotModify , ml::DICOMTagTools::Prepend , ml::DICOMTagTools::Append } |
Ways how to modify a tag with with _modificationStringValue. More... | |
enum | { ml::DICOMTagTools::NumValueModifyModes = Append+1 } |
Number of available ValueModifyModes. More... | |
Functions | |
MLDICOMTags_EXPORT DCMTree::TagPtr | ml::DICOMTagTools::addTagToTree (DCMTree::TreePtr dcmTree, const DCMTree::TagId &tagId, unsigned int numValues=1, const DCMTree::Vr *vr=nullptr, unsigned int numSQValues=1) |
Add a tag with id tagId to dcmTree. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagValue (DCMTree::TagPtr tag, unsigned int v0, unsigned int v1, unsigned int v2) |
Set the three unsigned int values v0, v1, and v2 at value positions 0, 1, and 2, respectively, all other values are removed. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagValue (DCMTree::TagPtr tag, double v0, double v1, double v2) |
Set the three double values v0, v1, and v2 at value positions 0, 1, and 2, respectively, all other values are removed. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, const std::string &str) |
Set the string value str at value position 0, all other values are removed. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, float val) |
Sets value val at value position 0, all other values are removed. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, MLuint16 val) |
Sets value val at value position 0, all other values are removed. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, int val) |
Sets value val at value position 0, all other values are removed. More... | |
MLDICOMTags_EXPORT std::string | ml::DICOMTagTools::toDblStrLimited (double val, signed char maxSize) |
Printing double values can lead to the annoying problem that the fully printed double value does not fit in the allowed size of a value representation, for example a printed double value can easily lead to a value 0.999690871460849, however, the value representation DS allows only 16 bytes per value (stupid, but it is like this, who invented that in the DICOM standard???) This is a tool function which tries to limit a printed double value to a given length by reducing the number of decimal digits passed to toDblStr, which, however has its limitations. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, double val) |
Sets value val at value position 0, all other values are removed. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setSplitTagStringValue (DCMTree::TagPtr tag, const std::string &str) |
If str contains "\\" then it is split at those positions such that multiple values are created. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, const std::string &str, bool, signed char) |
Set the string value str at value position 0, all other values are removed. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, double v0, double v1, bool doMultValueAdd, signed char maxSize=-1) |
Set the value of tag as string whose components are v0 and v1 as strings separated by backslashes if doMultValueAdd is false; otherwise each one is added as its own value string. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, MLint v0, MLint v1, MLint v2, bool doMultValueAdd) |
Set the value of tag as string whose components are v0, v1, and v2 as strings separated by backslashes if doMultValueAdd is false; otherwise each one is added as its own value string. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, const ImageVector &vec, bool doMultValueAdd) |
Set the value of tag as string whose six vector components are separated by backslashes if doMultValueAdd is false; otherwise each one is added as its own value string. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, const Vector2 &vec, bool doMultValueAdd, signed char maxSize=-1) |
Set the value of tag as string whose two vector components are separated by backslashes if doMultValueAdd is false; otherwise each one is added as its own value string. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, const Vector3 &vec, bool doMultValueAdd, signed char maxSize=-1) |
Set the value of tag as string whose three vector components are separated by backslashes if doMultValueAdd is false; otherwise each one is added as its own value string. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, const Vector6 &vec, bool doMultValueAdd, signed char maxSize=-1) |
Set the value of tag as string whose six vector components are separated by backslashes if doMultValueAdd is false; otherwise each one is added as its own value string. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagStringValue (DCMTree::TagPtr tag, const Matrix4 &mat, bool doMultValueAdd, signed char maxSize=-1) |
Set the value of tag as string whose sixteen matrix components are separated by backslashes if doMultValueAdd is false; otherwise each one is added as its own value string. More... | |
template<typename TAG_VAL_TYPE > | |
DCMTree::TagPtr | ml::DICOMTagTools::addStringTagToTree (DCMTree::TreePtr dcmTree, const DCMTree::TagId &tagId, const TAG_VAL_TYPE &vec, bool doMultValueAdd, signed char maxSize=-1) |
A template function which adds a new tag to dcmTree which has the value representation vr and the id tagId. More... | |
template<typename TAG_VAL_TYPE > | |
DCMTree::TagPtr | ml::DICOMTagTools::addStringTagToTree (DCMTree::TreePtr dcmTree, const DCMTree::TagId &tagId, const TAG_VAL_TYPE &vec) |
Same as addStringTagToTree(DCMTree::TreePtr, DCMTree::TagId, const TAG_VAL_TYPE &, bool doMultiValueAdd) without doMultiValue add which only works a single string argument. More... | |
template<typename TAG_VAL_TYPE > | |
DCMTree::TagPtr | ml::DICOMTagTools::addTagToTree (DCMTree::TreePtr dcmTree, const DCMTree::TagId &tagId, TAG_VAL_TYPE val0, TAG_VAL_TYPE val1, TAG_VAL_TYPE val2) |
A template function which adds a new tag with id tagId to dcmTree. More... | |
MLDICOMTags_EXPORT DCMTree::TagPtr | ml::DICOMTagTools::addTag (DCMTree::TreePtr dcmTree, std::string *errStr, DCMTree::TagId tagId, const std::string &tagStrValue, bool setValue, MLuint32 numVals=1, const DCMTree::Vr *vr=nullptr, bool splitValue=false) |
Add the tag with ID _tagId to tree dcmTree and value _modificationStringValue; requires a valid non nullptr dcmTree. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::setTagValue (DCMTree::TreePtr dcmTree, std::string *errStr, DCMTree::TagId tagId, const std::string &tagStrValue, const ValueModifyModes modMode, bool splitValue=false) |
Sets the value of the tag with id tagId in dcmTree with the new value tagStrValue. More... | |
MLDICOMTags_EXPORT std::string | ml::DICOMTagTools::setOrAddCreatorAndTag (DCMTree::TreePtr dcmTree, const std::string &privateCreatorString, MLuint16 privateGroupId, MLuint8 privateElementGroupId, MLuint8 privateTagIdLowerByte, const std::string &privateTagValue, DCMTree::Vr privateVR, bool splitValue) |
Add and/or replace the private creator and add/replace the private tags in dcmTree. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::appendSequenceEntries (DCMTree::TagPtr tag, MLint numEntries, std::string &errStr) |
Append a number of entries to the sequence in tag and initialize it with an empty DCMTree; the number of appended entries is given in modificationValue, and any error will be appended as textual description to errStr which is left unchanged in case of success. More... | |
MLDICOMTags_EXPORT void | ml::DICOMTagTools::insertOneSequenceEntry (DCMTree::TagPtr tag, MLint posIdx, std::string &errStr) |
Inserts one entry in the sequence in tag at the position given in modificationValue; any error will be appended as textual description to errStr which is left unchanged in case of success. More... | |
Variables | |
MLDICOMTags_EXPORT const char *const | ml::DICOMTagTools::ValueModifyModesStrings [NumValueModifyModes] |
String versions for ModificationModes. More... | |
A collection of tools related to DICOM tags and dictionaries.
Definition in file mlDICOMSetAddTagTools.h.