[Insight-developers] stl algorithms with itk Histogram classes

Richard Beare richard.beare at gmail.com
Wed Dec 3 00:29:59 EST 2008


Hi,
I'm probably missing something basic here.

I'd like to use std::max_element to search a multidimensional
histogram for the bin with the highest frequency. This means that I
need to supply a function that compares frequencies by calling
GetFrequency(), but I can't figure out the types to use in the
function arguments.

bool CompFreq(const HistType::??? &a, const HistType::??? &b)
{
    return(a.GetFrequency() < b.GetFrequency());
}

Any suggestions??
Thanks


More information about the Insight-developers mailing list