|
MeVisLab Toolbox Reference
|
Dictionary class to provide DICOM meta information. More...
Classes | |
| class | LoadLibraryDelegate |
| The delegate that is responsible for loading the specific DICOM library. More... | |
| class | thread_scoped_criticalsection |
| Class to manage thread specific critical sections. More... | |
| class | UIDGenerator |
| Class to generate unique IDs, valid to be used in a DICOM environment. More... | |
Typedefs | |
| typedef void * | thread_parameter |
| System dependent types and definitions. | |
| typedef unsigned int | thread_result |
| typedef HANDLE | thread_id |
| typedef thread_result(thread_modifier * | thread_function) (thread_parameter) |
| typedef CRITICAL_SECTION | thread_criticalsection |
| typedef std::list< std::string > | StringList |
| A list of strings. | |
| typedef void(* | LoggingHandler) (std::string, int) |
Functions | |
| thread_id DCMTREE_EXPORT | thread_start (thread_function func, thread_parameter param) |
Starts func as a new thread with param as parameter (void-pointer :) ) | |
| void DCMTREE_EXPORT | thread_await (thread_id id) |
| Waits for a thread to complete its work. | |
| bool DCMTREE_EXPORT | thread_running (thread_id id) |
| Tests whether a thread is running. | |
| void DCMTREE_EXPORT | thread_initcriticalsection (thread_criticalsection &cs) |
| Prepares a critical section for further usage. | |
| void DCMTREE_EXPORT | thread_entercriticalsection (thread_criticalsection &cs) |
| Enters a critical section. | |
| void DCMTREE_EXPORT | thread_leavecriticalsection (thread_criticalsection &cs) |
| Leaves a critical section. | |
| void DCMTREE_EXPORT | thread_destroycriticalsection (thread_criticalsection &cs) |
| Destroys a critical section. | |
| const std::string | configInstallPath () |
| Returns the path where the current application is installed. | |
| const std::list< std::string > | configLibraryPathList (const std::string &installPath) |
| Returns a list of paths to search for dynamic libraries. | |
| bool | configLoadDll (std::string dllPath) |
| Loads a dynamic library from the specified path. | |
| DCMTREE_EXPORT void | configLoadLibraries (LoadLibraryDelegate *delegate=nullptr) |
| Loads dynamic libraries and searches in file DCMTree.cfg for their names. | |
| DCMTREE_EXPORT StringList | split (const std::string &tosplit, char c, bool skipempties=false) |
Splits the given string at each c. | |
| DCMTREE_EXPORT std::string | toString (const DCMTree::Date &date) |
Converts a date to a string. | |
| DCMTREE_EXPORT std::string | toString (const DCMTree::Time &time) |
Converts a time to a string. | |
| DCMTREE_EXPORT std::string | toString (const DCMTree::DateTime &datetime) |
Converts a datetime to a string. | |
| DCMTREE_EXPORT std::string | toString (int val) |
Convert an int val to a string. | |
| DCMTREE_EXPORT std::string | toString (unsigned int val) |
Converts an unsigned int val to a string. | |
| DCMTREE_EXPORT std::string | toString (float val) |
Converts a float val to a string. | |
| DCMTREE_EXPORT std::string | toString (double val) |
Converts a double val to a string. | |
| DCMTREE_EXPORT DCMTree::Date | toDate (const std::string &str) |
Converts a string str to a date. | |
| DCMTREE_EXPORT DCMTree::Time | toTime (const std::string &str) |
Converts a string str to time. | |
| DCMTREE_EXPORT DCMTree::DateTime | toDateTime (const std::string &str) |
Converts a string str to datetime. | |
| DCMTREE_EXPORT std::string | digitsOnly (const std::string &str, bool allowhex=false) |
| Removes all non-digits from the given strings. | |
| DCMTREE_EXPORT std::string | afterFractionPart (const std::string &str) |
| Returns the part of the string after the right-most dot. | |
| DCMTREE_EXPORT std::string | beforeFractionPart (const std::string &str) |
| Returns the part of the string before the right-most dot. | |
| DCMTREE_EXPORT int | hexToInt (const std::string &str) |
Converts a hex-string str to int. | |
| DCMTREE_EXPORT unsigned int | hexToUInt (const std::string &str) |
Converts a hex-string str to unsigned int. | |
| DCMTREE_EXPORT int | toInt (const std::string &str) |
Converts a string str to int. | |
| DCMTREE_EXPORT unsigned int | toUInt (const std::string &str) |
Converts a string str to unsigned int. | |
| DCMTREE_EXPORT double | toDouble (const std::string &str) |
Converts a string str to double. | |
| DCMTREE_EXPORT std::string | toString (const DCMTree::Vr vr) |
Converts a VR vr to a string. | |
| DCMTREE_EXPORT DCMTree::Vr | toVr (const std::string &vrString) |
Converts a string str to a VR. | |
| DCMTREE_EXPORT void | toStream (std::ostream &out, const std::string &val) |
| Helper functions to write data into a stream. | |
| DCMTREE_EXPORT void | toStream (std::ostream &out, const int &val) |
| DCMTREE_EXPORT void | toStream (std::ostream &out, const unsigned int &val) |
| DCMTREE_EXPORT void | toStream (std::ostream &out, const bool &val) |
| DCMTREE_EXPORT void | toStream (std::ostream &out, const unsigned char *ptr, unsigned int size) |
| DCMTREE_EXPORT void | fromStream (std::istream &in, std::string &val, size_t maxSize=0) |
| Helper functions to read data out of a stream. | |
| DCMTREE_EXPORT void | fromStream (std::istream &in, int &val) |
| DCMTREE_EXPORT void | fromStream (std::istream &in, unsigned int &val) |
| DCMTREE_EXPORT void | fromStream (std::istream &in, bool &val) |
| DCMTREE_EXPORT void | fromStream (std::istream &in, unsigned char *ptr, unsigned int size) |
| DCMTREE_EXPORT void | setLoggingHandler (LoggingHandler handler) |
| Sets a callback for logging purposes. | |
| DCMTREE_EXPORT LoggingHandler | getLoggingHandler () |
| Returns the currently set logging callback. | |
| DCMTREE_EXPORT void | logMessage (std::string message, int errorCode=0) |
| Logs a message using the provided callback, if any. | |
| DCMTREE_EXPORT std::string | condGetNameForTag (DCMTree::TagId tag, const std::string &defaultName) |
Dictionary class to provide DICOM meta information.
Utility functions for DCMTree.
Uses its own namespace to avoid name mangling problems with alias types. For example, toString(unsigned int) vs. toString(Tagid).
| typedef void(* DCMTree_Utils::LoggingHandler) (std::string, int) |
Definition at line 207 of file DCMTree_Utils.h.
| typedef std::list<std::string> DCMTree_Utils::StringList |
A list of strings.
Definition at line 80 of file DCMTree_Utils.h.
| typedef CRITICAL_SECTION DCMTree_Utils::thread_criticalsection |
Definition at line 42 of file DCMTree_ThreadSupport.h.
| typedef thread_result(thread_modifier * DCMTree_Utils::thread_function) (thread_parameter) |
Definition at line 41 of file DCMTree_ThreadSupport.h.
| typedef HANDLE DCMTree_Utils::thread_id |
Definition at line 40 of file DCMTree_ThreadSupport.h.
| typedef void* DCMTree_Utils::thread_parameter |
System dependent types and definitions.
Definition at line 35 of file DCMTree_ThreadSupport.h.
| typedef unsigned int DCMTree_Utils::thread_result |
Definition at line 39 of file DCMTree_ThreadSupport.h.
| DCMTREE_EXPORT std::string DCMTree_Utils::afterFractionPart | ( | const std::string & | str | ) |
Returns the part of the string after the right-most dot.
If there is no dot in the string, the result is empty.
| DCMTREE_EXPORT std::string DCMTree_Utils::beforeFractionPart | ( | const std::string & | str | ) |
Returns the part of the string before the right-most dot.
If there is no dot in the string, the result is the given string.
| DCMTREE_EXPORT std::string DCMTree_Utils::condGetNameForTag | ( | DCMTree::TagId | tag, |
| const std::string & | defaultName | ||
| ) |
| const std::string DCMTree_Utils::configInstallPath | ( | ) |
Returns the path where the current application is installed.
| const std::list< std::string > DCMTree_Utils::configLibraryPathList | ( | const std::string & | installPath | ) |
Returns a list of paths to search for dynamic libraries.
| bool DCMTree_Utils::configLoadDll | ( | std::string | dllPath | ) |
Loads a dynamic library from the specified path.
Returns true on success else false.
| DCMTREE_EXPORT void DCMTree_Utils::configLoadLibraries | ( | LoadLibraryDelegate * | delegate = nullptr | ) |
Loads dynamic libraries and searches in file DCMTree.cfg for their names.
| DCMTREE_EXPORT std::string DCMTree_Utils::digitsOnly | ( | const std::string & | str, |
| bool | allowhex = false |
||
| ) |
Removes all non-digits from the given strings.
If allowhex is true, 'a'-'f','A'-'F' are preserved, too.
| DCMTREE_EXPORT void DCMTree_Utils::fromStream | ( | std::istream & | in, |
| bool & | val | ||
| ) |
| DCMTREE_EXPORT void DCMTree_Utils::fromStream | ( | std::istream & | in, |
| int & | val | ||
| ) |
| DCMTREE_EXPORT void DCMTree_Utils::fromStream | ( | std::istream & | in, |
| std::string & | val, | ||
| size_t | maxSize = 0 |
||
| ) |
Helper functions to read data out of a stream.
| DCMTREE_EXPORT void DCMTree_Utils::fromStream | ( | std::istream & | in, |
| unsigned char * | ptr, | ||
| unsigned int | size | ||
| ) |
| DCMTREE_EXPORT void DCMTree_Utils::fromStream | ( | std::istream & | in, |
| unsigned int & | val | ||
| ) |
| DCMTREE_EXPORT LoggingHandler DCMTree_Utils::getLoggingHandler | ( | ) |
Returns the currently set logging callback.
| DCMTREE_EXPORT int DCMTree_Utils::hexToInt | ( | const std::string & | str | ) |
Converts a hex-string str to int.
| DCMTREE_EXPORT unsigned int DCMTree_Utils::hexToUInt | ( | const std::string & | str | ) |
Converts a hex-string str to unsigned int.
| DCMTREE_EXPORT void DCMTree_Utils::logMessage | ( | std::string | message, |
| int | errorCode = 0 |
||
| ) |
Logs a message using the provided callback, if any.
| DCMTREE_EXPORT void DCMTree_Utils::setLoggingHandler | ( | LoggingHandler | handler | ) |
Sets a callback for logging purposes.
| DCMTREE_EXPORT StringList DCMTree_Utils::split | ( | const std::string & | tosplit, |
| char | c, | ||
| bool | skipempties = false |
||
| ) |
Splits the given string at each c.
If skipempties is true, all empty results are removed.
| void DCMTREE_EXPORT DCMTree_Utils::thread_await | ( | thread_id | id | ) |
Waits for a thread to complete its work.
| id | The thread to wait for |
| void DCMTREE_EXPORT DCMTree_Utils::thread_destroycriticalsection | ( | thread_criticalsection & | cs | ) |
Destroys a critical section.
| &cs | The lock variable |
| void DCMTREE_EXPORT DCMTree_Utils::thread_entercriticalsection | ( | thread_criticalsection & | cs | ) |
Enters a critical section.
| &cs | The lock variable |
Referenced by DCMTree_Utils::thread_scoped_criticalsection::thread_scoped_criticalsection().
| void DCMTREE_EXPORT DCMTree_Utils::thread_initcriticalsection | ( | thread_criticalsection & | cs | ) |
Prepares a critical section for further usage.
| &cs | The variable to protect the critical section |
| void DCMTREE_EXPORT DCMTree_Utils::thread_leavecriticalsection | ( | thread_criticalsection & | cs | ) |
Leaves a critical section.
| &cs | The lock variable |
Referenced by DCMTree_Utils::thread_scoped_criticalsection::~thread_scoped_criticalsection().
| bool DCMTREE_EXPORT DCMTree_Utils::thread_running | ( | thread_id | id | ) |
Tests whether a thread is running.
| id | The thread to test |
| thread_id DCMTREE_EXPORT DCMTree_Utils::thread_start | ( | thread_function | func, |
| thread_parameter | param | ||
| ) |
Starts func as a new thread with param as parameter (void-pointer :) )
| func | The function to call |
| param | The parameter to pass to func |
| DCMTREE_EXPORT DCMTree::Date DCMTree_Utils::toDate | ( | const std::string & | str | ) |
Converts a string str to a date.
| DCMTREE_EXPORT DCMTree::DateTime DCMTree_Utils::toDateTime | ( | const std::string & | str | ) |
Converts a string str to datetime.
| DCMTREE_EXPORT double DCMTree_Utils::toDouble | ( | const std::string & | str | ) |
Converts a string str to double.
| DCMTREE_EXPORT int DCMTree_Utils::toInt | ( | const std::string & | str | ) |
Converts a string str to int.
| DCMTREE_EXPORT void DCMTree_Utils::toStream | ( | std::ostream & | out, |
| const bool & | val | ||
| ) |
| DCMTREE_EXPORT void DCMTree_Utils::toStream | ( | std::ostream & | out, |
| const int & | val | ||
| ) |
| DCMTREE_EXPORT void DCMTree_Utils::toStream | ( | std::ostream & | out, |
| const std::string & | val | ||
| ) |
Helper functions to write data into a stream.
| DCMTREE_EXPORT void DCMTree_Utils::toStream | ( | std::ostream & | out, |
| const unsigned char * | ptr, | ||
| unsigned int | size | ||
| ) |
| DCMTREE_EXPORT void DCMTree_Utils::toStream | ( | std::ostream & | out, |
| const unsigned int & | val | ||
| ) |
| DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | const DCMTree::Date & | date | ) |
Converts a date to a string.
| DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | const DCMTree::DateTime & | datetime | ) |
Converts a datetime to a string.
| DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | const DCMTree::Time & | time | ) |
Converts a time to a string.
| DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | const DCMTree::Vr | vr | ) |
Converts a VR vr to a string.
| DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | double | val | ) |
Converts a double val to a string.
| DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | float | val | ) |
Converts a float val to a string.
| DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | int | val | ) |
Convert an int val to a string.
| DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | unsigned int | val | ) |
Converts an unsigned int val to a string.
| DCMTREE_EXPORT DCMTree::Time DCMTree_Utils::toTime | ( | const std::string & | str | ) |
Converts a string str to time.
| DCMTREE_EXPORT unsigned int DCMTree_Utils::toUInt | ( | const std::string & | str | ) |
Converts a string str to unsigned int.
| DCMTREE_EXPORT DCMTree::Vr DCMTree_Utils::toVr | ( | const std::string & | vrString | ) |
Converts a string str to a VR.
If the conversion fails, VR will be UN.