GDCM  2.4.5
Public Member Functions | Protected Member Functions | List of all members
gdcm::StringFilter Class Reference

StringFilter StringFilter is the class that make gdcm2.x looks more like gdcm1 and transform the binary blob contained in a DataElement into a string, typically this is a nice feature to have for wrapped language. More...

#include <gdcmStringFilter.h>

Public Member Functions

 StringFilter ()
 
 ~StringFilter ()
 
bool ExecuteQuery (std::string const &query, std::string &value) const
 
std::string FromString (const Tag &t, const char *value, VL const &vl)
 
std::string FromString (const Tag &t, const char *value, size_t len)
 Convert to string the char array defined by the pair (value,len) More...
 
FileGetFile ()
 
const FileGetFile () const
 
void SetDicts (const Dicts &dicts)
 Allow user to pass in there own dicts. More...
 
void SetFile (const File &f)
 Set/Get File. More...
 
std::string ToString (const DataElement &de) const
 
std::string ToString (const Tag &t) const
 Directly from a Tag: More...
 
std::pair< std::string, std::string > ToStringPair (const DataElement &de) const
 
std::pair< std::string, std::string > ToStringPair (const Tag &t) const
 Directly from a Tag: More...
 
void UseDictAlways (bool)
 

Protected Member Functions

bool ExecuteQuery (std::string const &query, DataSet const &ds, std::string &value) const
 
std::pair< std::string, std::string > ToStringPair (const Tag &t, DataSet const &ds) const
 

Detailed Description

StringFilter StringFilter is the class that make gdcm2.x looks more like gdcm1 and transform the binary blob contained in a DataElement into a string, typically this is a nice feature to have for wrapped language.

Examples:
ReadAndPrintAttributes.cxx.

Constructor & Destructor Documentation

gdcm::StringFilter::StringFilter ( )
gdcm::StringFilter::~StringFilter ( )

Member Function Documentation

bool gdcm::StringFilter::ExecuteQuery ( std::string const &  query,
std::string &  value 
) const

Execute the XPATH query to find a value (as string) return false when attribute is not found (or an error in the XPATH query) You need to make sure that your XPATH query is syntatically correct

bool gdcm::StringFilter::ExecuteQuery ( std::string const &  query,
DataSet const &  ds,
std::string &  value 
) const
protected
std::string gdcm::StringFilter::FromString ( const Tag t,
const char *  value,
VL const &  vl 
)
std::string gdcm::StringFilter::FromString ( const Tag t,
const char *  value,
size_t  len 
)

Convert to string the char array defined by the pair (value,len)

File& gdcm::StringFilter::GetFile ( )
inline
const File& gdcm::StringFilter::GetFile ( ) const
inline
void gdcm::StringFilter::SetDicts ( const Dicts dicts)

Allow user to pass in there own dicts.

void gdcm::StringFilter::SetFile ( const File f)
inline
std::string gdcm::StringFilter::ToString ( const DataElement de) const

Convert to string the ByteValue contained in a DataElement. The DataElement must be coming from the actual DataSet associated with File (see SetFile).

Examples:
ReadAndPrintAttributes.cxx.
std::string gdcm::StringFilter::ToString ( const Tag t) const

Directly from a Tag:

std::pair<std::string, std::string> gdcm::StringFilter::ToStringPair ( const DataElement de) const

Convert to string the ByteValue contained in a DataElement the returned elements are: pair.first : the name as found in the dictionary of DataElement pari.second : the value encoded into a string (US,UL...) are properly converted

Examples:
ReadAndPrintAttributes.cxx.
std::pair<std::string, std::string> gdcm::StringFilter::ToStringPair ( const Tag t) const

Directly from a Tag:

std::pair<std::string, std::string> gdcm::StringFilter::ToStringPair ( const Tag t,
DataSet const &  ds 
) const
protected
void gdcm::StringFilter::UseDictAlways ( bool  )
inline

The documentation for this class was generated from the following file:

Generated on Fri Sep 25 2015 17:58:33 for GDCM by doxygen 1.8.9.1
SourceForge.net Logo