17 #ifndef DCM_TREE_UTILS_H
18 #define DCM_TREE_UTILS_H
21 #pragma warning (push)
22 #pragma warning (disable : 4350)
The delegate that is responsible for loading the specific DICOM library.
virtual bool loadDICOMLibraries()=0
virtual ~LoadLibraryDelegate()
Dictionary class to provide DICOM meta information.
DCMTREE_EXPORT StringList split(const std::string &tosplit, char c, bool skipempties=false)
Splits the given string at each c.
DCMTREE_EXPORT DCMTree::Time toTime(const std::string &str)
Converts a string str to time.
DCMTREE_EXPORT unsigned int hexToUInt(const std::string &str)
Converts a hex-string str to unsigned int.
DCMTREE_EXPORT int hexToInt(const std::string &str)
Converts a hex-string str to int.
DCMTREE_EXPORT std::string digitsOnly(const std::string &str, bool allowhex=false)
Removes all non-digits from the given strings.
DCMTREE_EXPORT DCMTree::Date toDate(const std::string &str)
Converts a string str to a date.
std::list< std::string > StringList
A list of strings.
DCMTREE_EXPORT void logMessage(std::string message, int errorCode=0)
Logs a message using the provided callback, if any.
DCMTREE_EXPORT std::string toString(const DCMTree::Date &date)
Converts a date to a string.
DCMTREE_EXPORT double toDouble(const std::string &str)
Converts a string str to double.
bool configLoadDll(std::string dllPath)
Loads a dynamic library from the specified path.
DCMTREE_EXPORT std::string beforeFractionPart(const std::string &str)
Returns the part of the string before the right-most dot.
DCMTREE_EXPORT LoggingHandler getLoggingHandler()
Returns the currently set logging callback.
void(* LoggingHandler)(std::string, int)
DCMTREE_EXPORT int toInt(const std::string &str)
Converts a string str to int.
DCMTREE_EXPORT void fromStream(std::istream &in, std::string &val, size_t maxSize=0)
Helper functions to read data out of a stream.
const std::list< std::string > configLibraryPathList(const std::string &installPath)
Returns a list of paths to search for dynamic libraries.
DCMTREE_EXPORT void configLoadLibraries(LoadLibraryDelegate *delegate=nullptr)
Loads dynamic libraries and searches in file DCMTree.cfg for their names.
DCMTREE_EXPORT DCMTree::Vr toVr(const std::string &vrString)
Converts a string str to a VR.
DCMTREE_EXPORT std::string afterFractionPart(const std::string &str)
Returns the part of the string after the right-most dot.
DCMTREE_EXPORT unsigned int toUInt(const std::string &str)
Converts a string str to unsigned int.
const std::string configInstallPath()
Returns the 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)
Sets a callback for logging purposes.
DCMTREE_EXPORT void toStream(std::ostream &out, const std::string &val)
Helper functions to write data into a stream.
DCMTREE_EXPORT DCMTree::DateTime toDateTime(const std::string &str)
Converts a string str to datetime.
std::pair< Date, Time > DateTime
DateTime.
Date class for DCMTree library.
Time class for DCMTree library.