comparison ViewerPlugin/RawTile.h @ 318:8ad12abde290

sparse re-encoding with OpenSlide (notably for MIRAX format)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 11 Sep 2024 16:11:16 +0200
parents 0683312e21ba
children
comparison
equal deleted inserted replaced
317:f611fb47d0e8 318:8ad12abde290
32 namespace OrthancWSI 32 namespace OrthancWSI
33 { 33 {
34 class RawTile : public boost::noncopyable 34 class RawTile : public boost::noncopyable
35 { 35 {
36 private: 36 private:
37 bool isEmpty_;
37 Orthanc::PixelFormat format_; 38 Orthanc::PixelFormat format_;
38 unsigned int tileWidth_; 39 unsigned int tileWidth_;
39 unsigned int tileHeight_; 40 unsigned int tileHeight_;
40 Orthanc::PhotometricInterpretation photometric_; 41 Orthanc::PhotometricInterpretation photometric_;
41 std::string tile_; 42 std::string tile_;
51 RawTile(ITiledPyramid& pyramid, 52 RawTile(ITiledPyramid& pyramid,
52 unsigned int level, 53 unsigned int level,
53 unsigned int tileX, 54 unsigned int tileX,
54 unsigned int tileY); 55 unsigned int tileY);
55 56
56 ImageCompression GetCompression() const 57 bool IsEmpty() const
57 { 58 {
58 return compression_; 59 return isEmpty_;
59 } 60 }
61
62 unsigned int GetTileWidth() const
63 {
64 return tileWidth_;
65 }
66
67 unsigned int GetTileHeight() const
68 {
69 return tileHeight_;
70 }
71
72 ImageCompression GetCompression() const;
60 73
61 void Answer(OrthancPluginRestOutput* output, 74 void Answer(OrthancPluginRestOutput* output,
62 Orthanc::MimeType encoding); 75 Orthanc::MimeType encoding);
63 76
64 Orthanc::ImageAccessor* Decode(); 77 Orthanc::ImageAccessor* Decode();
70 // This semaphore is used to implement throttling for the 83 // This semaphore is used to implement throttling for the
71 // decoding/encoding of tiles 84 // decoding/encoding of tiles
72 static void InitializeTranscoderSemaphore(unsigned int maxThreads); 85 static void InitializeTranscoderSemaphore(unsigned int maxThreads);
73 86
74 static void FinalizeTranscoderSemaphore(); 87 static void FinalizeTranscoderSemaphore();
88
89 static void AnswerBackgroundTile(OrthancPluginRestOutput* output,
90 unsigned int tileWidth,
91 unsigned int tileHeight);
75 }; 92 };
76 } 93 }