MCPcopy Create free account
hub / github.com/MITK/MITK / GetRelativeBin

Method GetRelativeBin

Modules/AlgorithmsExt/src/mitkSimpleHistogram.cpp:51–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50 bool SimpleImageHistogram::GetValid() { return valid; }
51 float SimpleImageHistogram::GetRelativeBin(double left, double right) const
52 {
53 if (!valid)
54 return 0.0f;
55
56 CountType maximum = 0;
57
58 for (unsigned int i = 0; i < nBins; i++)
59 {
60 auto binMin = histogram->GetBinMin(0, i);
61 auto binMax = histogram->GetBinMax(0, i);
62 if (left < binMax && right > binMin)
63 {
64 maximum = histogram->GetFrequency(i);
65 }
66 }
67 return float(log(double(maximum)) * invLogHighest);
68 }
69
70 double SimpleImageHistogram::GetMin() const
71 {

Callers 2

PaintHistogramMethod · 0.80
mitkSimpleHistogramTestFunction · 0.80

Calls

no outgoing calls

Tested by 1

mitkSimpleHistogramTestFunction · 0.64