public class Histogram3DCreator extends Operation
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.
| Modifier and Type | Field | Description |
|---|---|---|
private Histogram3D |
hist |
|
private IntegerImage |
image |
|
private int |
index1 |
|
private int |
index2 |
|
private int |
index3 |
|
private boolean |
naive |
| Constructor | Description |
|---|---|
Histogram3DCreator() |
| Modifier and Type | Method | Description |
|---|---|---|
static Integer |
count(IntegerImage image) |
Static convenience method to count the number of colors in
any three channel
IntegerImage object. |
private void |
createHistogramIfNecessary() |
|
Histogram3D |
getHistogram() |
Returns the histogram initialized in this operation.
|
void |
process() |
This method does the actual work of the operation.
|
void |
setHistogram3D(Histogram3D histogram) |
Sets the histogram object to be reused for this operation.
|
void |
setImage(IntegerImage newImage) |
The image for which a histogram will be initialized.
|
void |
setImage(IntegerImage newImage,
int channelIndex1,
int channelIndex2,
int channelIndex3) |
The image for which a histogram will be initialized.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgressprivate Histogram3D hist
private IntegerImage image
private int index1
private int index2
private int index3
private boolean naive
public static Integer count(IntegerImage image)
IntegerImage object.image - the IntegerImage whose number of used colors is to be determinedprivate void createHistogramIfNecessary()
public Histogram3D getHistogram()
public void process()
throws MissingParameterException,
WrongParameterException
Operationprocess in class OperationMissingParameterException - if any mandatory parameter was not given to the operationWrongParameterException - if at least one of the input parameters was
not initialized appropriately (values out of the valid interval, etc.)public void setHistogram3D(Histogram3D histogram)
histogram - the histogram object to be used in this operationpublic void setImage(IntegerImage newImage)
setImage(IntegerImage, int, int, int)
with 0, 1 and 2 as parameters.newImage - the image for the histogram initializationpublic void setImage(IntegerImage newImage, int channelIndex1, int channelIndex2, int channelIndex3)
setImage(IntegerImage, int, int, int)
with 0, 1 and 2 as parameters.newImage -