annotate UnitTestsSources/ImageToolboxTests.cpp @ 1770:073484e33bee

fix offset of textures
author Sebastien Jodogne <s.jodogne@gmail.com>
date Wed, 12 May 2021 10:53:37 +0200
parents 9ac2a65d4172
children 3889ae96d2e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1286
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
1 /**
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
2 * Stone of Orthanc
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
3 * Copyright (C) 2012-2016 Sebastien Jodogne, Medical Physics
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
4 * Department, University Hospital of Liege, Belgium
1739
9ac2a65d4172 upgrade to year 2021
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1587
diff changeset
5 * Copyright (C) 2017-2021 Osimis S.A., Belgium
1286
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
6 *
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
7 * This program is free software: you can redistribute it and/or
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
8 * modify it under the terms of the GNU Affero General Public License
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
9 * as published by the Free Software Foundation, either version 3 of
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
10 * the License, or (at your option) any later version.
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
11 *
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful, but
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
15 * Affero General Public License for more details.
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
16 *
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
17 * You should have received a copy of the GNU Affero General Public License
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
19 **/
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
20
1587
a1405ab3a91c reorganization
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1512
diff changeset
21 #include "../OrthancStone/Sources/Toolbox/ImageToolbox.h"
1286
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
22
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
23 // #include <boost/chrono.hpp>
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
24 // #include <boost/lexical_cast.hpp>
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
25
1455
30deba7bc8e2 simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1298
diff changeset
26 #include <Compatibility.h>
30deba7bc8e2 simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1298
diff changeset
27 #include <Images/Image.h>
30deba7bc8e2 simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1298
diff changeset
28 #include <Images/PixelTraits.h>
1286
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
29
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
30 #include "stdint.h"
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
31
1455
30deba7bc8e2 simplifying include_directories
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1298
diff changeset
32 #include <gtest/gtest.h>
1286
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
33
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
34 #include <cmath>
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
35
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
36
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
37 TEST(ImageToolbox, SimpleHisto_Grayscale8_BinSize1)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
38 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
39 using OrthancStone::HistogramData;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
40 using OrthancStone::DumpHistogramResult;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
41 using OrthancStone::ComputeHistogram;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
42
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
43 const unsigned int W = 16;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
44 const unsigned int H = 16;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
45
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
46 // 256/17 = 15,...
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
47 // 256 % 17 = 1
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
48 // 0 will be 16 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
49 // 1 will be 15 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
50 // 2 will be 15 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
51 // ...
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
52 // 16 will be 15 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
53
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
54 size_t pixCounter = 0;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
55
1298
8a0a62189f46 replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1296
diff changeset
56 std::unique_ptr<Orthanc::Image> image(new Orthanc::Image(
1286
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
57 Orthanc::PixelFormat_Grayscale8, W, H, false));
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
58
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
59 for (unsigned int y = 0; y < H; ++y)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
60 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
61 uint8_t* buffer = reinterpret_cast<uint8_t*>(image->GetRow(y));
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
62 for (unsigned int x = 0; x < W; ++x, ++buffer, ++pixCounter)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
63 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
64 *buffer = static_cast<uint8_t>(pixCounter % 17);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
65 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
66 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
67
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
68 HistogramData hd;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
69 ComputeHistogram(*image, hd, 1);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
70 ASSERT_EQ(-0.5, hd.minValue);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
71 ASSERT_EQ(17u, hd.bins.size());
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
72 ASSERT_EQ(16u, hd.bins[0]);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
73 for (size_t i = 1; i < hd.bins.size(); ++i)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
74 ASSERT_EQ(15u, hd.bins[i]);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
75 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
76
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
77 TEST(ImageToolbox, SimpleHisto_Grayscale8_BinSize1_FormatString)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
78 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
79 using OrthancStone::HistogramData;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
80 using OrthancStone::DumpHistogramResult;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
81 using OrthancStone::ComputeHistogram;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
82
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
83 const unsigned int W = 16;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
84 const unsigned int H = 16;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
85
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
86 // 256/17 = 15,...
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
87 // 256 % 17 = 1
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
88 // 0 will be 16 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
89 // 1 will be 15 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
90 // 2 will be 15 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
91 // ...
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
92 // 16 will be 15 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
93
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
94 size_t pixCounter = 0;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
95
1298
8a0a62189f46 replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1296
diff changeset
96 std::unique_ptr<Orthanc::Image> image(new Orthanc::Image(
1286
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
97 Orthanc::PixelFormat_Grayscale8, W, H, false));
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
98
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
99 for (unsigned int y = 0; y < H; ++y)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
100 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
101 uint8_t* buffer = reinterpret_cast<uint8_t*>(image->GetRow(y));
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
102 for (unsigned int x = 0; x < W; ++x, ++buffer, ++pixCounter)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
103 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
104 *buffer = static_cast<uint8_t>(pixCounter % 17);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
105 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
106 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
107
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
108 HistogramData hd;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
109 ComputeHistogram(*image, hd, 1);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
110
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
111 // void DumpHistogramResult(std::string& s, const HistogramData& hd)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
112 std::string s;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
113 DumpHistogramResult(s, hd);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
114 std::cout << s;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
115 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
116
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
117 template<Orthanc::PixelFormat Format>
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
118 void SimpleHisto_T_BinSize1_2()
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
119 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
120 using OrthancStone::HistogramData;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
121 using OrthancStone::DumpHistogramResult;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
122 using OrthancStone::ComputeHistogram;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
123
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
124 const unsigned int W = 16;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
125 const unsigned int H = 16;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
126
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
127 // 256/17 = 15,...
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
128 // 256 % 17 = 1
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
129 // 0 will be 16 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
130 // 1 will be 15 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
131 // 2 will be 15 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
132 // ...
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
133 // 16 will be 15 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
134
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
135 size_t pixCounter = 0;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
136
1298
8a0a62189f46 replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1296
diff changeset
137 std::unique_ptr<Orthanc::Image> image(new Orthanc::Image(
1286
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
138 Format, W, H, false));
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
139
1296
86400fa16091 fix build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1286
diff changeset
140 typedef typename Orthanc::PixelTraits<Format>::PixelType PixelType;
1286
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
141
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
142 PixelType pixValue = 0;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
143
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
144 for (unsigned int y = 0; y < H; ++y)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
145 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
146 PixelType* buffer = reinterpret_cast<PixelType*>(image->GetRow(y));
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
147 for (unsigned int x = 0; x < W; ++x, ++buffer, ++pixCounter)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
148 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
149 // 0..99 0..99 0..55
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
150 *buffer = pixValue;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
151 pixValue++;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
152 if (pixValue >= 100)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
153 pixValue = 0;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
154 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
155 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
156
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
157 HistogramData hd;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
158 ComputeHistogram(*image, hd, 1);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
159 ASSERT_EQ(-0.5, hd.minValue);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
160 ASSERT_EQ(100u, hd.bins.size());
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
161 for (size_t i = 0; i <= 55; ++i)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
162 ASSERT_EQ(3u, hd.bins[i]);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
163 for (size_t i = 56; i <= 99; ++i)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
164 ASSERT_EQ(2u, hd.bins[i]);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
165 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
166
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
167 TEST(ImageToolbox, SimpleHisto_Grayscale8_BinSize1_2)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
168 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
169 SimpleHisto_T_BinSize1_2<Orthanc::PixelFormat_Grayscale8>();
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
170 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
171
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
172 TEST(ImageToolbox, SimpleHisto_Grayscale16_BinSize1_2)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
173 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
174 SimpleHisto_T_BinSize1_2<Orthanc::PixelFormat_Grayscale16>();
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
175 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
176
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
177 TEST(ImageToolbox, SimpleHisto_SignedGrayscale16_BinSize1_2)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
178 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
179 SimpleHisto_T_BinSize1_2<Orthanc::PixelFormat_SignedGrayscale16>();
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
180 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
181
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
182 TEST(ImageToolbox, SimpleHisto_Grayscale32_BinSize1_2)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
183 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
184 SimpleHisto_T_BinSize1_2<Orthanc::PixelFormat_Grayscale32>();
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
185 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
186
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
187 template<Orthanc::PixelFormat Format>
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
188 void SimpleHisto_T_BinSize10_2()
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
189 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
190 using OrthancStone::HistogramData;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
191 using OrthancStone::DumpHistogramResult;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
192 using OrthancStone::ComputeHistogram;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
193
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
194 const unsigned int W = 16;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
195 const unsigned int H = 16;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
196
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
197 // 256/17 = 15,...
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
198 // 256 % 17 = 1
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
199 // 0 will be 16 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
200 // 1 will be 15 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
201 // 2 will be 15 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
202 // ...
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
203 // 16 will be 15 times
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
204
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
205 size_t pixCounter = 0;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
206
1298
8a0a62189f46 replacing std::auto_ptr by std::unique_ptr
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1296
diff changeset
207 std::unique_ptr<Orthanc::Image> image(new Orthanc::Image(
1286
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
208 Format, W, H, false));
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
209
1296
86400fa16091 fix build
Sebastien Jodogne <s.jodogne@gmail.com>
parents: 1286
diff changeset
210 typedef typename Orthanc::PixelTraits<Format>::PixelType PixelType;
1286
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
211
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
212 PixelType pixValue = 0;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
213
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
214 for (unsigned int y = 0; y < H; ++y)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
215 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
216 PixelType* buffer = reinterpret_cast<PixelType*>(image->GetRow(y));
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
217 for (unsigned int x = 0; x < W; ++x, ++buffer, ++pixCounter)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
218 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
219 // 0..99 0..99 0..55
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
220 *buffer = pixValue;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
221 pixValue++;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
222 if (pixValue >= 100)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
223 pixValue = 0;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
224 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
225 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
226
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
227 HistogramData hd;
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
228 ComputeHistogram(*image, hd, 10);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
229 ASSERT_EQ(-0.5, hd.minValue);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
230 ASSERT_EQ(10u, hd.bins.size());
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
231
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
232 for (size_t i = 0; i <= 4; ++i)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
233 ASSERT_EQ(30u, hd.bins[i]);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
234
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
235 ASSERT_EQ(26u, hd.bins[5]);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
236
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
237 for (size_t i = 6; i <= 9; ++i)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
238 ASSERT_EQ(20u, hd.bins[i]);
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
239 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
240
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
241 TEST(ImageToolbox, SimpleHisto_Grayscale8_BinSize10_2)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
242 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
243 SimpleHisto_T_BinSize10_2<Orthanc::PixelFormat_Grayscale8>();
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
244 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
245
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
246 TEST(ImageToolbox, SimpleHisto_Grayscale16_BinSize10_2)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
247 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
248 SimpleHisto_T_BinSize10_2<Orthanc::PixelFormat_Grayscale16>();
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
249 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
250
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
251 TEST(ImageToolbox, SimpleHisto_SignedGrayscale16_BinSize10_2)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
252 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
253 SimpleHisto_T_BinSize10_2<Orthanc::PixelFormat_SignedGrayscale16>();
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
254 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
255
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
256 TEST(ImageToolbox, SimpleHisto_Grayscale32_BinSize10_2)
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
257 {
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
258 SimpleHisto_T_BinSize10_2<Orthanc::PixelFormat_Grayscale32>();
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
259 }
ddb6676bbcbf Added Histogram functions (new files: ImageToolbox...)
Benjamin Golinvaux <bgo@osimis.io>
parents:
diff changeset
260