Mercurial > hg > orthanc-stone
diff 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 |
line wrap: on
line diff
--- a/OrthancStone/Sources/Toolbox/BucketAccumulator2D.cpp Wed Jan 19 12:32:15 2022 +0100 +++ b/OrthancStone/Sources/Toolbox/BucketAccumulator2D.cpp Wed Jan 19 13:50:28 2022 +0100 @@ -176,4 +176,29 @@ y = LinearAlgebra::ComputeMedian(v); } + + + void BucketAccumulator2D::Print(FILE* fp) const + { + fprintf(fp, " "); + + for (size_t x = 0; x < mapperX_.GetSize(); x++) + { + fprintf(fp, "%7.2f ", mapperX_.GetBucketCenter(x)); + } + + fprintf(fp, "\n"); + + for (size_t y = 0; y < mapperY_.GetSize(); y++) + { + fprintf(fp, "%7.2f: ", mapperY_.GetBucketCenter(y)); + + for (size_t x = 0; x < mapperX_.GetSize(); x++) + { + fprintf(fp, "%7lu ", GetBucketContentSize(x, y)); + } + + fprintf(fp, "\n"); + } + } }