vega
encapsulated_pixel_data_manipulator.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "vega/types.h"
5 
6 namespace vega {
7  namespace manipulators {
8  // TODO: Properly handle different bit encodings
10  private:
11  std::vector<uint32_t> m_offsets;
12  std::vector<std::vector<Byte>> m_fragments;
13 
14  public:
15  virtual std::shared_ptr<dicom::RawValue> raw_value() override;
16  virtual std::string str() const override;
17  virtual bool read_from(dicom::RawReader* reader, size_t num_bytes) override;
18  virtual size_t write_to(dicom::RawWriter* writer) const override;
19 
20  virtual bool operator==(const ValueManipulator& other) const override;
21  virtual bool operator!=(const ValueManipulator& other) const override;
22 
23  static bool allows_vr(const VR& vr) {
24  return vr == vr::OB || vr == vr::OW || vr == vr::OX;
25  }
26 
27  virtual bool is_valid_for(const VR& vr) const override {
29  }
30  };
31  }
32 
33  namespace vr {
34  template <>
35  bool manipulator_is_valid_for<manipulators::EncapsulatedPixelDataManipulator>(VR::value_type value);
36  }
37 }
static bool allows_vr(const VR &vr)
Definition: encapsulated_pixel_data_manipulator.h:23
Definition: encapsulated_pixel_data_manipulator.h:9
virtual std::shared_ptr< dicom::RawValue > raw_value() override
Definition: vr.h:13
virtual bool is_valid_for(const VR &vr) const override
Definition: encapsulated_pixel_data_manipulator.h:27
virtual bool operator!=(const ValueManipulator &other) const override
uint16_t value_type
Definition: vr.h:29
virtual bool operator==(const ValueManipulator &other) const override
Definition: value_manipulator.h:29
virtual size_t write_to(dicom::RawWriter *writer) const override
virtual std::string str() const override
const VR OB
Definition: vr_constants.h:258
Definition: age.h:6
const VR OX
Definition: vr_constants.h:433
virtual bool read_from(dicom::RawReader *reader, size_t num_bytes) override
const VR OW
Definition: vr_constants.h:290