Brightness
, Contrast
, EqualizeHistogram
, GammaCorrection
, NormalizeHistogram
public abstract class LookupTableOperation extends ImageToImageOperation
Modifier and Type | Field | Description |
---|---|---|
private int[][] |
intTables |
|
private int |
numTables |
Constructor | Description |
---|---|
LookupTableOperation() |
Creates a LookupTableOperation for one lookup table.
|
LookupTableOperation(int numTables) |
Creates an object of this class, calling the super constructor with two
null
arguments and allocates space for the argument number of lookup tables. |
Modifier and Type | Method | Description |
---|---|---|
int |
getNumTables() |
Returns the number of tables in this operation.
|
int[] |
getTable(int channelIndex) |
Returns one of the internal
int lookup tables. |
void |
prepareImages() |
|
void |
process() |
This method does the actual work of the operation.
|
private void |
process(IntegerImage in,
IntegerImage out) |
|
private void |
process(IntegerImage in,
IntegerImage out,
int CHANNEL_INDEX,
int tableIndex,
int processedItems,
int TOTAL_ITEMS) |
|
void |
setNumTables(int numberOfTables) |
Resets the number of tables to be used in this operation to the
argument and drops all actual table data initialized so far.
|
void |
setTable(int channelIndex,
int[] tableData) |
Provides a new lookup table for one of the channels.
|
void |
setTables(int[] tableData) |
Sets the tables for all channels to the argument table.
|
canInputAndOutputBeEqual, ensureImagesHaveSameResolution, ensureInputImageIsAvailable, ensureOutputImageResolution, getInputImage, getOutputImage, setCanInputAndOutputBeEqual, setInputImage, setOutputImage
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgress
public LookupTableOperation()
public LookupTableOperation(int numTables)
null
arguments and allocates space for the argument number of lookup tables.numTables
- number of tables to be used in this operationpublic int getNumTables()
public int[] getTable(int channelIndex)
int
lookup tables.channelIndex
- the zero-based index of the table to be returned;
from 0 to getNumTables() - 1public void prepareImages() throws MissingParameterException, WrongParameterException
public void process() throws MissingParameterException, WrongParameterException
Operation
process
in class Operation
MissingParameterException
- 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.)private void process(IntegerImage in, IntegerImage out)
private void process(IntegerImage in, IntegerImage out, int CHANNEL_INDEX, int tableIndex, int processedItems, int TOTAL_ITEMS)
public void setNumTables(int numberOfTables)
getTable(int)
will return
null
as long as no new table data is provided
via setTable(int, int[])
or setTables(int[])
.numberOfTables
- the new number of tables for this operation, must be 1
or largerIllegalArgumentException
- if the number is zero or smallerpublic void setTable(int channelIndex, int[] tableData)
channelIndex
- the index of the channel for which a table is provided; must be at least 0
and smaller than getNumTables()
tableData
- the actual table to be used for lookupIllegalArgumentException
- if the channel index is not in the valid interval (see above)public void setTables(int[] tableData)
tableData
- the data that will be used as lookup table for all channels