MeVisLab Toolbox Reference
MLDICOMCachedIOTagCacheMap::TagHashFunction Struct Reference

This is a self defined hash function for the boost::unordered map used as cache for tags. More...

#include <mlDICOMCachedIOTagCacheMap.h>

Public Member Functions

size_t operator() (TagKey const &key) const
 Calculates the has key from last string segment. More...
 

Detailed Description

This is a self defined hash function for the boost::unordered map used as cache for tags.

Especially in imports of enhanced multi-frame files in DirectDicomImport and in large frame series this function becomes essential for the performance, because it will heavily be used to look up already read tags. The key is calculated only from at most the last 16 bytes of the string which, in the case of enhanced multi-frames, contains the frame id. In all frames then follows the tags ID as hexadecimal string. This means that usually only the last 14 bytes are changing and the rest before often is only the path and a non changing string which is not needed for hash key calculation. Since paths are typically quite long therefore the default hash would calculation becomes slow. This speeds up the overall import time of enhanced multi-frame file by about 5%-10%.

Definition at line 132 of file mlDICOMCachedIOTagCacheMap.h.

Member Function Documentation

◆ operator()()

size_t MLDICOMCachedIOTagCacheMap::TagHashFunction::operator() ( TagKey const &  key) const
inline

Calculates the has key from last string segment.

Definition at line 135 of file mlDICOMCachedIOTagCacheMap.h.

References MLDICOMCachedIOTagCacheMap::TagKey::_fileName, MLDICOMCachedIOTagCacheMap::TagKey::_id, and hash_value().


The documentation for this struct was generated from the following file: