Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Toolbox/SortedFrames.h @ 1645:bc7bd8ee13f8
making private two potentially dangerous methods in SortedFrames
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 10 Nov 2020 21:07:05 +0100 |
parents | 4796fb60999e |
children | 4a43106bc122 |
comparison
equal
deleted
inserted
replaced
1644:4796fb60999e | 1645:bc7bd8ee13f8 |
---|---|
28 | 28 |
29 namespace OrthancStone | 29 namespace OrthancStone |
30 { | 30 { |
31 class SortedFrames : public boost::noncopyable | 31 class SortedFrames : public boost::noncopyable |
32 { | 32 { |
33 #if defined(FRIEND_TEST) | |
34 // We're compiling the unit tests | |
35 FRIEND_TEST(SortedFrames, Basic); | |
36 FRIEND_TEST(SortedFrames, SortSopInstanceUid); | |
37 FRIEND_TEST(SortedFrames, SortInstanceNumber); | |
38 FRIEND_TEST(SortedFrames, SortInstanceNumberAndImageIndex); | |
39 #endif | |
40 | |
33 private: | 41 private: |
34 struct Frame | 42 struct Frame |
35 { | 43 { |
36 private: | 44 private: |
37 const DicomInstanceParameters* instance_; | 45 const DicomInstanceParameters* instance_; |
65 std::vector<DicomInstanceParameters*> instances_; | 73 std::vector<DicomInstanceParameters*> instances_; |
66 std::vector<Frame> frames_; | 74 std::vector<Frame> frames_; |
67 bool sorted_; | 75 bool sorted_; |
68 InstancesIndex instancesIndex_; | 76 InstancesIndex instancesIndex_; |
69 FramesIndex framesIndex_; | 77 FramesIndex framesIndex_; |
78 | |
79 const DicomInstanceParameters& GetInstance(size_t instanceIndex) const; | |
80 | |
81 bool LookupSopInstanceUid(size_t& instanceIndex, | |
82 const std::string& sopInstanceUid) const; | |
70 | 83 |
71 const Frame& GetFrame(size_t frameIndex) const; | 84 const Frame& GetFrame(size_t frameIndex) const; |
72 | 85 |
73 void AddFramesOfInstance(std::set<size_t>& remainingInstances, | 86 void AddFramesOfInstance(std::set<size_t>& remainingInstances, |
74 size_t instanceIndex); | 87 size_t instanceIndex); |
108 size_t GetInstancesCount() const | 121 size_t GetInstancesCount() const |
109 { | 122 { |
110 return instances_.size(); | 123 return instances_.size(); |
111 } | 124 } |
112 | 125 |
113 // TODO - REMOVE THIS DANGEROUS FUNCTION (might be taken for GetInstanceOfFrame()) | |
114 const DicomInstanceParameters& GetInstance(size_t instanceIndex) const; | |
115 | |
116 bool LookupSopInstanceUid(size_t& instanceIndex, | |
117 const std::string& sopInstanceUid) const; | |
118 | |
119 bool IsSorted() const | 126 bool IsSorted() const |
120 { | 127 { |
121 return sorted_; | 128 return sorted_; |
122 } | 129 } |
123 | 130 |