MeVisLab Toolbox Reference
|
dictionary class to provide dicom-meta information More...
Classes | |
class | LoadLibraryDelegate |
the delegate who is responsible for loading the specific DICOM library used in initialization, if the library is not loaded statically (via the DEF file) 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) |
Start func as a new thread, param as parameter (void-pointer :) ) | |
void DCMTREE_EXPORT | thread_await (thread_id id) |
Wait for a thread to complete its work. | |
bool DCMTREE_EXPORT | thread_running (thread_id id) |
Test if a thread is running. | |
void DCMTREE_EXPORT | thread_initcriticalsection (thread_criticalsection &cs) |
Prepare a critical section for further usage. | |
void DCMTREE_EXPORT | thread_entercriticalsection (thread_criticalsection &cs) |
Enter a critical section. | |
void DCMTREE_EXPORT | thread_leavecriticalsection (thread_criticalsection &cs) |
Leave a critical section. | |
void DCMTREE_EXPORT | thread_destroycriticalsection (thread_criticalsection &cs) |
Destroy a critical section. | |
const std::string | configInstallPath () |
get path where the current application is installed | |
const std::list< std::string > | configLibraryPathList (const std::string &installPath) |
get list of paths where to search for dynamic libraries | |
bool | configLoadDll (std::string dllPath) |
load a dynamic library from the specified path returns true on success else false | |
DCMTREE_EXPORT void | configLoadLibraries (LoadLibraryDelegate *delegate=nullptr) |
load dynamic libraries, search in file DCMTree.cfg for their names | |
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 std::string | toString (const DCMTree::Date &date) |
convert a date to a string | |
DCMTREE_EXPORT std::string | toString (const DCMTree::Time &time) |
convert a time to a string | |
DCMTREE_EXPORT std::string | toString (const DCMTree::DateTime &datetime) |
convert a datetime to a string | |
DCMTREE_EXPORT std::string | toString (int val) |
convert a int to a string | |
DCMTREE_EXPORT std::string | toString (unsigned int val) |
convert a unsigned int to a string | |
DCMTREE_EXPORT std::string | toString (float val) |
convert a float to a string | |
DCMTREE_EXPORT std::string | toString (double val) |
convert a double to a string | |
DCMTREE_EXPORT DCMTree::Date | toDate (const std::string &str) |
convert a string to date | |
DCMTREE_EXPORT DCMTree::Time | toTime (const std::string &str) |
convert a string to time | |
DCMTREE_EXPORT DCMTree::DateTime | toDateTime (const std::string &str) |
convert a string to datetime | |
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 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 empty | |
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 the given string | |
DCMTREE_EXPORT int | hexToInt (const std::string &str) |
convert a hex-string to int | |
DCMTREE_EXPORT unsigned int | hexToUInt (const std::string &str) |
convert a hex-string to unsigned int | |
DCMTREE_EXPORT int | toInt (const std::string &str) |
convert a string to int | |
DCMTREE_EXPORT unsigned int | toUInt (const std::string &str) |
convert a string to unsigned int | |
DCMTREE_EXPORT double | toDouble (const std::string &str) |
convert a string to double | |
DCMTREE_EXPORT std::string | toString (const DCMTree::Vr vr) |
convert a vr into a string | |
DCMTREE_EXPORT DCMTree::Vr | toVr (const std::string &vrString) |
convert a string into vr. | |
DCMTREE_EXPORT void | toStream (std::ostream &out, const std::string &val) |
helpers to put 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) |
helpers to get 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) |
Set a callback for logging purposes. | |
DCMTREE_EXPORT LoggingHandler | getLoggingHandler () |
Get the currently set logging callback. | |
DCMTREE_EXPORT void | logMessage (std::string message, int errorCode=0) |
Log 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 (toString(unsigned int) vs.
Author: Sascha Bohnenkamp devel.nosp@m.opme.nosp@m.nt@me.nosp@m.visb.nosp@m.reast.nosp@m.care.nosp@m..de
Copyright 2006 All Rights Reserved MeVis BreastCare GmbH & Co.KG Universitaetsallee 29 D-28359 Bremen phone +49 (0)421 330 74 0 fax +49 (0)421 330 74 50
Change history: 20060519 : SB initial version
toString(Tagid) for example)
Author: Sascha Bohnenkamp devel.nosp@m.opme.nosp@m.nt@me.nosp@m.visb.nosp@m.reast.nosp@m.care.nosp@m..de
Copyright 2006 All Rights Reserved MeVis BreastCare GmbH & Co.KG Universitaetsallee 29 D-28359 Bremen phone +49 (0)421 330 74 0 fax +49 (0)421 330 74 50
Change history: 20060531 : SB initial version
Definition at line 218 of file DCMTree_Utils.h.
typedef std::list<std::string> DCMTree_Utils::StringList |
a list of strings
Definition at line 92 of file DCMTree_Utils.h.
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.
Definition at line 40 of file DCMTree_ThreadSupport.h.
System dependent types and definitions.
Definition at line 35 of file DCMTree_ThreadSupport.h.
Definition at line 39 of file DCMTree_ThreadSupport.h.
DCMTREE_EXPORT std::string DCMTree_Utils::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 empty
DCMTREE_EXPORT std::string DCMTree_Utils::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 the given string
DCMTREE_EXPORT std::string DCMTree_Utils::condGetNameForTag | ( | DCMTree::TagId | tag, |
const std::string & | defaultName ) |
const std::string DCMTree_Utils::configInstallPath | ( | ) |
get path where the current application is installed
const std::list< std::string > DCMTree_Utils::configLibraryPathList | ( | const std::string & | installPath | ) |
get list of paths where to search for dynamic libraries
bool DCMTree_Utils::configLoadDll | ( | std::string | dllPath | ) |
load a dynamic library from the specified path returns true on success else false
DCMTREE_EXPORT void DCMTree_Utils::configLoadLibraries | ( | LoadLibraryDelegate * | delegate = nullptr | ) |
load dynamic libraries, search in file DCMTree.cfg for their names
DCMTREE_EXPORT std::string DCMTree_Utils::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 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 ) |
helpers to get 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 | ( | ) |
Get the currently set logging callback.
DCMTREE_EXPORT int DCMTree_Utils::hexToInt | ( | const std::string & | str | ) |
convert a hex-string to int
DCMTREE_EXPORT unsigned int DCMTree_Utils::hexToUInt | ( | const std::string & | str | ) |
convert a hex-string to unsigned int
DCMTREE_EXPORT void DCMTree_Utils::logMessage | ( | std::string | message, |
int | errorCode = 0 ) |
Log a message using the provided callback, if any.
DCMTREE_EXPORT void DCMTree_Utils::setLoggingHandler | ( | LoggingHandler | handler | ) |
Set a callback for logging purposes.
DCMTREE_EXPORT StringList DCMTree_Utils::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
void DCMTREE_EXPORT DCMTree_Utils::thread_await | ( | thread_id | id | ) |
Wait for a thread to complete its work.
id | The thread to wait for |
void DCMTREE_EXPORT DCMTree_Utils::thread_destroycriticalsection | ( | thread_criticalsection & | cs | ) |
Destroy a critical section.
&cs | The lock variable |
void DCMTREE_EXPORT DCMTree_Utils::thread_entercriticalsection | ( | thread_criticalsection & | cs | ) |
Enter 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 | ) |
Prepare a critical section for further usage.
&cs | The variable to protect the critical section |
void DCMTREE_EXPORT DCMTree_Utils::thread_leavecriticalsection | ( | thread_criticalsection & | cs | ) |
Leave 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 | ) |
Test if a thread is running.
id | The thread to test |
thread_id DCMTREE_EXPORT DCMTree_Utils::thread_start | ( | thread_function | func, |
thread_parameter | param ) |
Start func as a new thread, 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 | ) |
convert a string to date
DCMTREE_EXPORT DCMTree::DateTime DCMTree_Utils::toDateTime | ( | const std::string & | str | ) |
convert a string to datetime
DCMTREE_EXPORT double DCMTree_Utils::toDouble | ( | const std::string & | str | ) |
convert a string to double
DCMTREE_EXPORT int DCMTree_Utils::toInt | ( | const std::string & | str | ) |
convert a string 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 ) |
helpers to put 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 | ) |
convert a date to a string
DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | const DCMTree::DateTime & | datetime | ) |
convert a datetime to a string
DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | const DCMTree::Time & | time | ) |
convert a time to a string
DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | const DCMTree::Vr | vr | ) |
convert a vr into a string
DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | double | val | ) |
convert a double to a string
DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | float | val | ) |
convert a float to a string
DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | int | val | ) |
convert a int to a string
DCMTREE_EXPORT std::string DCMTree_Utils::toString | ( | unsigned int | val | ) |
convert a unsigned int to a string
DCMTREE_EXPORT DCMTree::Time DCMTree_Utils::toTime | ( | const std::string & | str | ) |
convert a string to time
DCMTREE_EXPORT unsigned int DCMTree_Utils::toUInt | ( | const std::string & | str | ) |
convert a string to unsigned int
DCMTREE_EXPORT DCMTree::Vr DCMTree_Utils::toVr | ( | const std::string & | vrString | ) |
convert a string into vr.
If the conversion fails, vr will be UN.