Mercurial > hg > orthanc-stone
comparison OrthancStone/Sources/Toolbox/BucketAccumulator2D.cpp @ 1892:cdf91ad891a5
estimated geometry of rt-struct
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 19 Jan 2022 13:50:28 +0100 |
parents | 3716d72161d2 |
children | bd527bbc34df |
comparison
equal
deleted
inserted
replaced
1891:3716d72161d2 | 1892:cdf91ad891a5 |
---|---|
174 v.push_back(*it); | 174 v.push_back(*it); |
175 } | 175 } |
176 | 176 |
177 y = LinearAlgebra::ComputeMedian(v); | 177 y = LinearAlgebra::ComputeMedian(v); |
178 } | 178 } |
179 | |
180 | |
181 void BucketAccumulator2D::Print(FILE* fp) const | |
182 { | |
183 fprintf(fp, " "); | |
184 | |
185 for (size_t x = 0; x < mapperX_.GetSize(); x++) | |
186 { | |
187 fprintf(fp, "%7.2f ", mapperX_.GetBucketCenter(x)); | |
188 } | |
189 | |
190 fprintf(fp, "\n"); | |
191 | |
192 for (size_t y = 0; y < mapperY_.GetSize(); y++) | |
193 { | |
194 fprintf(fp, "%7.2f: ", mapperY_.GetBucketCenter(y)); | |
195 | |
196 for (size_t x = 0; x < mapperX_.GetSize(); x++) | |
197 { | |
198 fprintf(fp, "%7lu ", GetBucketContentSize(x, y)); | |
199 } | |
200 | |
201 fprintf(fp, "\n"); | |
202 } | |
203 } | |
179 } | 204 } |