comparison Framework/Inputs/SingleLevelDecodedPyramid.h @ 327:4e25eb77cd1d

implementation of padding for IIIF
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 17 Oct 2024 17:55:49 +0200
parents 9947e70cbcea
children
comparison
equal deleted inserted replaced
326:9947e70cbcea 327:4e25eb77cd1d
31 { 31 {
32 private: 32 private:
33 Orthanc::ImageAccessor image_; 33 Orthanc::ImageAccessor image_;
34 unsigned int tileWidth_; 34 unsigned int tileWidth_;
35 unsigned int tileHeight_; 35 unsigned int tileHeight_;
36 unsigned int padding_;
37 uint8_t backgroundRed_;
38 uint8_t backgroundGreen_;
39 uint8_t backgroundBlue_;
36 40
37 protected: 41 protected:
38 void SetImage(const Orthanc::ImageAccessor& image) 42 void SetImage(const Orthanc::ImageAccessor& image)
39 { 43 {
40 image.GetReadOnlyAccessor(image_); 44 image.GetReadOnlyAccessor(image_);
46 unsigned int x, 50 unsigned int x,
47 unsigned int y) ORTHANC_OVERRIDE; 51 unsigned int y) ORTHANC_OVERRIDE;
48 52
49 public: 53 public:
50 SingleLevelDecodedPyramid(unsigned int tileWidth, 54 SingleLevelDecodedPyramid(unsigned int tileWidth,
51 unsigned int tileHeight) : 55 unsigned int tileHeight);
52 tileWidth_(tileWidth),
53 tileHeight_(tileHeight)
54 {
55 }
56 56
57 virtual unsigned int GetTileWidth(unsigned int level) const ORTHANC_OVERRIDE 57 virtual unsigned int GetTileWidth(unsigned int level) const ORTHANC_OVERRIDE
58 { 58 {
59 return tileWidth_; 59 return tileWidth_;
60 } 60 }
78 return image_.GetFormat(); 78 return image_.GetFormat();
79 } 79 }
80 80
81 virtual Orthanc::PhotometricInterpretation GetPhotometricInterpretation() const ORTHANC_OVERRIDE; 81 virtual Orthanc::PhotometricInterpretation GetPhotometricInterpretation() const ORTHANC_OVERRIDE;
82 82
83 void SetPadding(unsigned int paddingAlignement, 83 void SetPadding(unsigned int padding,
84 uint8_t paddingRed, 84 uint8_t backgroundRed,
85 uint8_t paddingGreen, 85 uint8_t backgroundGreen,
86 uint8_t paddingBlue); 86 uint8_t backgroundBlue);
87 }; 87 };
88 } 88 }