|
JIU 0.14.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.jiu.ops.Operation
net.sourceforge.jiu.ops.ImageToImageOperation
net.sourceforge.jiu.ops.LookupTableOperation
public abstract class LookupTableOperation
An operation that replaces samples with values taken from a lookup table. Operations where each pixel is treated independently from its neighbors and where a pixel value is always mapped to the same new pixel value can be implemented this way.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
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. |
Methods inherited from class net.sourceforge.jiu.ops.ImageToImageOperation |
---|
canInputAndOutputBeEqual, ensureImagesHaveSameResolution, ensureInputImageIsAvailable, ensureOutputImageResolution, getInputImage, getOutputImage, setCanInputAndOutputBeEqual, setInputImage, setOutputImage |
Methods inherited from class net.sourceforge.jiu.ops.Operation |
---|
addProgressListener, addProgressListeners, getAbort, removeProgressListener, setAbort, setProgress, setProgress |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 operationMethod Detail |
---|
public 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() - 1
public void prepareImages() throws MissingParameterException, WrongParameterException
MissingParameterException
WrongParameterException
public void process() throws MissingParameterException, WrongParameterException
Operation
process
in class Operation
MissingParameterException
- if any mandatory parameter was not given to the operation
WrongParameterException
- if at least one of the input parameters was
not initialized appropriately (values out of the valid interval, etc.)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 larger
IllegalArgumentException
- 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 lookup
IllegalArgumentException
- 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
|
JIU 0.14.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |