net.sourceforge.jiu.color.analysis
Class Histogram3DCreator
public class Histogram3DCreator
This class creates three-dimensional histograms for images with integer samples.
Only
IntegerImage
is supported.
Existing histogram objects can be given to this operation to be reused.
Note: Before JIU 0.10.0 there was a single HistogramCreator class.
naive
private boolean naive
count
public static Integer count(IntegerImage image)
Static convenience method to count the number of colors in
any three channel
IntegerImage
object.
image
- the IntegerImage whose number of used colors is to be determined
- the number of colors or null on failure (image does not have three
channels, etc.)
createHistogramIfNecessary
private void createHistogramIfNecessary()
getHistogram
public Histogram3D getHistogram()
Returns the histogram initialized in this operation.
setHistogram3D
public void setHistogram3D(Histogram3D histogram)
Sets the histogram object to be reused for this operation.
If this method is not called, a new histogram will be created.
histogram
- the histogram object to be used in this operation
setImage
public void setImage(IntegerImage newImage)
newImage
- the image for the histogram initialization
setImage
public void setImage(IntegerImage newImage,
int channelIndex1,
int channelIndex2,
int channelIndex3)