support_dcmtk.h
Go to the documentation of this file.
1 /*
2 * ECVL - European Computer Vision Library
3 * Version: 0.3.4
4 * copyright (c) 2021, Università degli Studi di Modena e Reggio Emilia (UNIMORE), AImageLab
5 * Authors:
6 * Costantino Grana (costantino.grana@unimore.it)
7 * Federico Bolelli (federico.bolelli@unimore.it)
8 * Michele Cancilla (michele.cancilla@unimore.it)
9 * Laura Canalini (laura.canalini@unimore.it)
10 * Stefano Allegretti (stefano.allegretti@unimore.it)
11 * All rights reserved.
12 */
13 
14 #ifndef SUPPORT_DCMTK_H_
15 #define SUPPORT_DCMTK_H_
16 
17 #include "ecvl/core/filesystem.h"
18 #include "ecvl/core/image.h"
19 
20 namespace ecvl
21 {
22 class OverlayMetaData : public MetaData
23 {
24  ecvl::Image overlay_;
25 
26 public:
27 
28  OverlayMetaData(const ecvl::Image& overlay) : overlay_(overlay) {}
29  OverlayMetaData(ecvl::Image&& overlay) = delete; // always copy, so that memory is contiguous
30  virtual bool Query(const std::string& name, std::string& value) const override;
31 };
32 
45 extern bool DicomRead(const ecvl::filesystem::path& filename, Image& dst);
46 
58 extern bool DicomWrite(const ecvl::filesystem::path& filename, const Image& src);
59 
63 } // namespace ecvl
64 
65 #endif // SUPPORT_DCMTK_H_
bool DicomWrite(const ecvl::filesystem::path &filename, const Image &src)
Saves an image into a specified DICOM file.
Image class.
Definition: image.h:72
OverlayMetaData(const ecvl::Image &overlay)
Definition: support_dcmtk.h:28
bool DicomRead(const ecvl::filesystem::path &filename, Image &dst)
Loads an image from a DICOM file.
virtual bool Query(const std::string &name, std::string &value) const override