17 from __future__
import print_function
21 numberOfComponents = 2
23 histogram = itk.Histogram.New(MeasurementVectorSize=numberOfComponents)
26 size = itk.Array.UL(numberOfComponents)
31 histogram.Initialize(size, lowerBound, upperBound)
55 for instance_identifier, frequency
in frequencies:
56 histogram.SetFrequency(instance_identifier, frequency)
63 print(
"Frequency of the bin at index", index,
64 "is", histogram.GetFrequency(index),
65 "and the bin's instance identifier is",
66 histogram.GetInstanceIdentifier(index))