17#ifndef DCM_TREE_UTILS_H
18#define DCM_TREE_UTILS_H
21 #pragma warning (push)
22 #pragma warning (disable : 4350)
the delegate who is responsible for loading the specific DICOM library used in initialization,...
virtual bool loadDICOMLibraries()=0
virtual ~LoadLibraryDelegate()
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
dictionary class to provide dicom-meta information
DCMTREE_EXPORT StringList split(const std::string &tosplit, char c, bool skipempties=false)
split the given string at each c if skipempties is true, all empty results would be removed
DCMTREE_EXPORT DCMTree::Time toTime(const std::string &str)
convert a string to time
const std::list< std::string > configLibraryPathList(const std::string &installPath)
get list of paths where to search for dynamic libraries
DCMTREE_EXPORT unsigned int hexToUInt(const std::string &str)
convert a hex-string to unsigned int
DCMTREE_EXPORT int hexToInt(const std::string &str)
convert a hex-string to int
DCMTREE_EXPORT std::string digitsOnly(const std::string &str, bool allowhex=false)
remove all non-digits from the given strings if allowhex is true 'a'-'f','A'-'F' are preserved too
DCMTREE_EXPORT DCMTree::Date toDate(const std::string &str)
convert a string to date
std::list< std::string > StringList
a list of strings
DCMTREE_EXPORT void logMessage(std::string message, int errorCode=0)
Log a message using the provided callback, if any.
DCMTREE_EXPORT std::string toString(const DCMTree::Date &date)
convert a date to a string
DCMTREE_EXPORT double toDouble(const std::string &str)
convert a string to double
bool configLoadDll(std::string dllPath)
load a dynamic library from the specified path returns true on success else false
DCMTREE_EXPORT std::string beforeFractionPart(const std::string &str)
get the part of the string before the right-most dot if there is no dot in the string the result is t...
DCMTREE_EXPORT LoggingHandler getLoggingHandler()
Get the currently set logging callback.
void(* LoggingHandler)(std::string, int)
DCMTREE_EXPORT int toInt(const std::string &str)
convert a string to int
DCMTREE_EXPORT void fromStream(std::istream &in, std::string &val, size_t maxSize=0)
helpers to get data out of a stream
DCMTREE_EXPORT void configLoadLibraries(LoadLibraryDelegate *delegate=nullptr)
load dynamic libraries, search in file DCMTree.cfg for their names
DCMTREE_EXPORT DCMTree::Vr toVr(const std::string &vrString)
convert a string into vr.
DCMTREE_EXPORT std::string afterFractionPart(const std::string &str)
get the part of the string after the right-most dot if there is no dot in the string the result is em...
DCMTREE_EXPORT unsigned int toUInt(const std::string &str)
convert a string to unsigned int
const std::string configInstallPath()
get path where the current application is installed
DCMTREE_EXPORT std::string condGetNameForTag(DCMTree::TagId tag, const std::string &defaultName)
DCMTREE_EXPORT void setLoggingHandler(LoggingHandler handler)
Set a callback for logging purposes.
DCMTREE_EXPORT void toStream(std::ostream &out, const std::string &val)
helpers to put data into a stream
DCMTREE_EXPORT DCMTree::DateTime toDateTime(const std::string &str)
convert a string to datetime
std::pair< Date, Time > DateTime
DateTime.
Date class for DCMTree library.
Time class for DCMTree library.