fw4spl
fwGdcmIO::helper::DicomDataReader Class Reference

This class contains helpers to handle GDCM data reading. More...

#include <DicomDataReader.hxx>

Static Public Member Functions

template<std::uint16_t GROUP, std::uint16_t ELEMENT>
static std::string getTagValue (const ::gdcm::DataSet &dataset, const std::string &charset="", const ::fwLog::Logger::sptr &logger=nullptr)
 Return a string from a tag found in dataset. An empty string returned means the tag is not found or empty. The value is returned without binary space padding. More...
 
template<std::uint16_t GROUP, std::uint16_t ELEMENT>
static std::string getTagValue (const std::string &buffer, const std::string &charset="", const ::fwLog::Logger::sptr &logger=0)
 Return an utf-8 tag value from the tag value's buffer. More...
 
template<std::uint16_t GROUP, std::uint16_t ELEMENT, typename T >
static const T getTagValue (const ::gdcm::DataSet &dataset)
 Return a value from a tag found in dataset. More...
 

Detailed Description

This class contains helpers to handle GDCM data reading.

Definition at line 27 of file DicomDataReader.hxx.

Member Function Documentation

template<std::uint16_t GROUP, std::uint16_t ELEMENT>
static std::string fwGdcmIO::helper::DicomDataReader::getTagValue ( const ::gdcm::DataSet &  dataset,
const std::string &  charset = "",
const ::fwLog::Logger::sptr &  logger = nullptr 
)
inlinestatic

Return a string from a tag found in dataset. An empty string returned means the tag is not found or empty. The value is returned without binary space padding.

Template Parameters
GROUPGroup of the tag
ELEMENTElement of the tag
Parameters
[in]datasetData set containing the tag
[in]charsetSpecific Character Set (if empty assuming ASCII).
[in]loggerLogger used for encoding issue
Note
charset shall be set if SpecificCharacterSet (0008,0005) is definied and tag's VR is SH, LO, ST, PN, LT or UT.
Returns
The tag value as string

Definition at line 45 of file DicomDataReader.hxx.

References fwGdcmIO::helper::Encoding::convertString().

Referenced by fwGdcmIO::helper::DicomDir::findDicomDir().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

template<std::uint16_t GROUP, std::uint16_t ELEMENT>
static std::string fwGdcmIO::helper::DicomDataReader::getTagValue ( const std::string &  buffer,
const std::string &  charset = "",
const ::fwLog::Logger::sptr &  logger = 0 
)
inlinestatic

Return an utf-8 tag value from the tag value's buffer.

Template Parameters
GROUPGroup of the tag
ELEMENTElement of the tag
Parameters
[in]bufferTag value's buffer
[in]charsetSpecific Character Set (if empty assuming ASCII).
[in]loggerLogger used for encoding issue
Note
charset shall be set if SpecificCharacterSet (0008,0005) is definied and tag's VR is SH, LO, ST, PN, LT or UT.
Returns
The tag value as string

Definition at line 102 of file DicomDataReader.hxx.

References fwGdcmIO::helper::Encoding::convertString().

+ Here is the call graph for this function:

template<std::uint16_t GROUP, std::uint16_t ELEMENT, typename T >
static const T fwGdcmIO::helper::DicomDataReader::getTagValue ( const ::gdcm::DataSet &  dataset)
inlinestatic

Return a value from a tag found in dataset.

Template Parameters
GROUPGroup of the tag.
ELEMENTElement of the tag.
TType of value.
Parameters
[in]datasetData set of tags.
Returns
The tag value.

Definition at line 140 of file DicomDataReader.hxx.


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