de.grogra.imp3d.shading
Class Filter
java.lang.Object
de.grogra.graph.impl.Edge
de.grogra.graph.impl.Node
de.grogra.imp3d.shading.ChannelMapNode
de.grogra.imp3d.shading.Filter
- All Implemented Interfaces:
- ChannelMap, Manageable, PersistenceCapable, Shareable, UserFields, XObject, Map, java.io.Serializable
- Direct Known Subclasses:
- Laplace3D, Smooth3D
public abstract class Filter
- extends ChannelMapNode
A Filter is the base for 3D image filtering operations.
Subclasses provide a 3D filter coefficient matrix (which is queried by the getCoefficient* functions).
The filter is applied to the requested channel by sampling values for each coefficient in the matrix
and then calculating the weigthed sum. The size of the sampling cube can be adjusted by the fields
sx, sy and sy (in x/y/z and u/v directions).
- Author:
- nmi
- See Also:
- Serialized Form
Nested classes/interfaces inherited from interface de.grogra.util.Map |
Map.Chain |
Fields inherited from class de.grogra.imp3d.shading.ChannelMapNode |
AMBIENT, COLOR, COLOR_2, DIFFUSE_TRANSPARENCY, DISPLACEMENT, EMISSIVE, FIRST_OP, INPUT, input$FIELD, MIN_UNUSED_SPECIAL_OF_TARGET, SECOND_OP, SHININESS, SPECULAR, TRANSPARENCY, TRANSPARENCY_SHININESS |
Fields inherited from class de.grogra.graph.impl.Node |
ADDITIONAL_FIELDS, bits, DELETED, EXTENT_BIT, EXTENT_MASK, extentIndex$FIELD, extentTail$FIELD, HAS_OBSERVERS, IS_INTERPRETIVE, isInterpretive$FIELD, LAST_EXTENT_INDEX, layer$FIELD, MARK, mark$FIELD, MIME_TYPE, MIN_UNUSED_SPECIAL_OF_SOURCE, name$FIELD, USED_BITS |
Methods inherited from class de.grogra.graph.impl.Node |
addEdgeBitsTo, addReference, appendBranchNode, appendBranchNode, appendReferencesTo, clone, clone, cloneGraph, dump, dumpTree, dup, dupUnmanagedFields, edgeChanged, fieldModified, findAdjacent, get, getAccessor, getAccessor, getAttributes, getAxisParent, getBoolean, getBranch, getBranchLength, getBranchNode, getBranchTail, getByte, getChar, getCommonAncestor, getCurrentGraphState, getDirectChildCount, getDouble, getEdgeAttributeAccessor, getEdgeAttributes, getEdgeBitsTo, getEdgeTo, getExtentIndex, getFirst, getFirstEdge, getFloat, getGraph, getId, getIndex, getInstantiator, getInt, getLayer, getLong, getManageableType, getName, getNeighbor, getNext, getNType, getNTypeImpl, getObject, getOrCreateEdgeTo, getOrNull, getPersistenceManager, getPredecessor, getProvider, getShort, getSource, getStamp, getSuccessor, getSymbol, getSymbolColor, getTarget, getTransaction, getUserField, getUserFieldCount, getXClass, getXData, hasName, initProvider, initXClass, insertBranchNode, insertBranchNode, instantiateGraph, isAncestorOf, isDirection, isManagingInstance, isMarked, isRoot, isSource, isTarget, manageableReadResolve, manageableWriteReplace, newInstance, paramString, removeAll, removeEdgeBitsTo, removeFromChain, removeFromChain, removeReference, setBranch, setBranch, setExtentIndex, setGraphForDeserialization, setLayer, setMark, setName, setSuccessor, setSuccessor, specialEdgeAdded, specialEdgeRefModified, specialEdgeRemoved, toString, writeReplace |
Methods inherited from class de.grogra.graph.impl.Edge |
addEdgeBits, getBitMark, getEdgeBits, getObjectMark, getSpecialEdgeDescriptor, parseEdgeKeys, remove, removeEdgeBits, setBitMark, setEdgeBits, setObjectMark, testEdgeBits |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
$TYPE
public static final Node.NType $TYPE
sx$FIELD
public static final Node.NType.Field sx$FIELD
sy$FIELD
public static final Node.NType.Field sy$FIELD
sz$FIELD
public static final Node.NType.Field sz$FIELD
Filter
public Filter()
accept
public void accept(ChannelMapNodeVisitor visitor)
- Overrides:
accept
in class ChannelMapNode
getCoefficient
protected abstract float getCoefficient(int gx,
int gy,
int gz)
- Get the coefficient at position (gx/gy/gz) in the filter matrix. The
functions getCoefficientMaskSize* are used to obtain the indexable range
(i.e. sx, sy and sz), so 0 <= gx <= sx. Derived classes implement this
function to provide filter coefficients. The Filter class will perform
the filtering by applying those coefficients as weigths to the sampled
values from the input channel.
- Parameters:
gx
- gy
- gz
-
- Returns:
getFloatValue
public float getFloatValue(ChannelData data,
int channel)
- Specified by:
getFloatValue
in interface ChannelMap
- Overrides:
getFloatValue
in class ChannelMapNode
getSx
public float getSx()
getSy
public float getSy()
getSz
public float getSz()
setSx
public void setSx(float value)
setSy
public void setSy(float value)
setSz
public void setSz(float value)