ImFusion C++ SDK 4.4.0
ImFusion::LabelNameMatching Namespace Reference

Functions for matching labelnames. More...

Detailed Description

Functions for matching labelnames.

This is intended to match labels known to TotalSegmentator to labels defined in a Labels project. Matching is performed via an editing distance - we identify labels with editing distance smaller than 3.

Functions

std::vector< std::stringtokenize (std::string name)
 Split into tokens i.e.
std::optional< size_t > minDistanceIndex (const std::vector< std::string > &totalSegLabels, std::vector< std::string > projectTokens)
template<typename T>
std::string match (const std::vector< std::string > &totalSegLabels, const T &projectLabel)
template<typename T>
std::map< std::string, T > match (const std::vector< std::string > &totalSegLabels, const std::vector< T > &projectLabels)

Variables

const std::map< std::string, std::stringracoonMappings
 Hardcoded list of mappings from a RACOON labelname to the corresponding TotalSegmentator name.

Function Documentation

◆ tokenize()

std::vector< std::string > ImFusion::LabelNameMatching::tokenize ( std::string name)

Split into tokens i.e.

words. "upper-right-lung" becomes {"lung", "right", "upper"} same as "Lung (upper-right)"

Search Tab / S to search, Esc to close