18#include <dcmtk/dcmdata/dcfilefo.h>
19#include <dcmtk/dcmdata/dcdeftag.h>
33 if (
errVal) { *
errVal = std::string(
"loadDcmFile:") + std::string(
cond.text()); }
38 if (
errVal) { *
errVal = std::string(
"loadDcmFile:") + std::string(
cond.text()); }
53 if (
errVal){ *
errVal = std::string(
"getModality:") + std::string(
cond.text()); }
65 template <
typename DCMObjType>
96template <
typename DCMObjType,
typename DCMObjBoostPtrType,
class DCMReaderFunctor=DefaultDcmtkReaderFunctor>
147template <
typename DCMObjType,
typename DCMObjBoostPtrType,
class DCMReaderFunctor=DefaultDcmtkReaderFunctor>
Project global and OS specific declarations.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.
DCMObjBoostPtrType getDCMTKObjFromFile(DcmFileFormat &dcmFile, std::string *errVal, const std::string &modalityStr, const std::string &typeStr, DCMReaderFunctor *readerFunctor=NULL)
A template for loading a dcmtk object by a file object.
OFString getDcmtkModality(DcmFileFormat &dcmfile, std::string *errVal)
Return the modality of a given DcmFileFormat.
bool loadDcmtkFile(const std::string &fName, DcmFileFormat &dcmfile, std::string *errVal)
Load a DICOM file into the dcmtk DcmFileFormat object.
DCMObjBoostPtrType getDCMTKObjFromString(const std::string &fName, std::string *errVal, DcmFileFormatPtr *dcmFilePtr, const std::string &modalityStr, const std::string &typeStr, DCMReaderFunctor *readerFunctor=NULL)
A template for loading a dcmtk object by a file name.
Default class providing the read function for getDCMTKObjFromFile which needs the option to extent it...
OFCondition read(DCMObjType &dcmObj, DcmItem &item)
Returns the result after reading item from dcmObj.