Mercurial > hg > orthanc-stone
diff Resources/Orthanc/Plugins/Samples/Common/DicomDatasetReader.h @ 32:517c46f527cd
sync
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 19 Dec 2016 11:00:23 +0100 |
parents | 9aace933cb64 |
children | 7207a407bcd8 |
line wrap: on
line diff
--- a/Resources/Orthanc/Plugins/Samples/Common/DicomDatasetReader.h Fri Dec 16 15:41:20 2016 +0100 +++ b/Resources/Orthanc/Plugins/Samples/Common/DicomDatasetReader.h Mon Dec 19 11:00:23 2016 +0100 @@ -35,26 +35,38 @@ #include "IDicomDataset.h" #include <memory> +#include <vector> namespace OrthancPlugins { class DicomDatasetReader : public boost::noncopyable { private: - std::auto_ptr<IDicomDataset> dataset_; + const IDicomDataset& dataset_; public: - DicomDatasetReader(IDicomDataset* dataset); // takes ownership + DicomDatasetReader(const IDicomDataset& dataset); - IDicomDataset& GetDataset() const + const IDicomDataset& GetDataset() const { - return *dataset_; + return dataset_; } + std::string GetStringValue(const DicomPath& path, + const std::string& defaultValue) const; + std::string GetMandatoryStringValue(const DicomPath& path) const; - int GetIntegerValue(const DicomPath& path); + bool GetIntegerValue(int& target, + const DicomPath& path) const; + + bool GetUnsignedIntegerValue(unsigned int& target, + const DicomPath& path) const; - unsigned int GetUnsignedIntegerValue(const DicomPath& path); + bool GetFloatValue(float& target, + const DicomPath& path) const; + + bool GetDoubleValue(double& target, + const DicomPath& path) const; }; }