de.grogra.imp3d.shading
Class ChannelSPD
java.lang.Object
de.grogra.persistence.ShareableBase
de.grogra.imp3d.shading.ChannelSPD
- All Implemented Interfaces:
- Icon, IconSource, ChannelMap, ColorMap, Manageable, Shareable, RenderedIcon
public class ChannelSPD
- extends ShareableBase
- implements ColorMap, IconSource, Icon, RenderedIcon
Constructor Summary |
ChannelSPD()
Constructor, creates a spectral channel |
ChannelSPD(SpectralCurve curve)
Constructor, creates a spectral channel with specified spectral curve |
Method Summary |
void |
accept(ChannelMapVisitor visitor)
|
int |
getAverageColor()
|
float |
getFloatValue(ChannelData data,
int channel)
|
Icon |
getIcon(java.awt.Dimension size,
int state)
|
java.awt.Rectangle |
getIconBounds()
|
IconSource |
getIconSource()
|
java.awt.Image |
getImage()
|
java.awt.Image |
getImage(int w,
int h)
|
java.net.URL |
getImageSource()
|
ManageableType |
getManageableType()
|
java.lang.Object |
getObjectValue(ChannelData data,
int channel)
|
java.awt.Dimension |
getPreferredIconSize(boolean small)
|
float |
getSizeRatio()
|
SPD |
getSpectraldistribution()
|
boolean |
isMutable()
|
void |
paintIcon(java.awt.Component c,
java.awt.Graphics2D g,
int x,
int y,
int w,
int h,
int state)
|
void |
prepareIcon()
|
int |
renderImage(JobManager jm,
java.awt.image.BufferedImage img,
int y)
|
void |
setSpectraldistribution(SPD spd)
Set spectral curve |
void |
setSpectraldistribution(SpectralCurve curve)
Set spectral curve |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
$TYPE
public static final ChannelSPD.Type $TYPE
spectraldistribution$FIELD
public static final SCOType.Field spectraldistribution$FIELD
ChannelSPD
public ChannelSPD()
- Constructor, creates a spectral channel
ChannelSPD
public ChannelSPD(SpectralCurve curve)
- Constructor, creates a spectral channel with specified spectral curve
- Parameters:
curve
- spectral curve
accept
public void accept(ChannelMapVisitor visitor)
- Specified by:
accept
in interface ChannelMap
getAverageColor
public int getAverageColor()
- Specified by:
getAverageColor
in interface ColorMap
getFloatValue
public float getFloatValue(ChannelData data,
int channel)
- Specified by:
getFloatValue
in interface ChannelMap
getIcon
public Icon getIcon(java.awt.Dimension size,
int state)
- Specified by:
getIcon
in interface IconSource
getIconBounds
public java.awt.Rectangle getIconBounds()
- Specified by:
getIconBounds
in interface Icon
getIconSource
public IconSource getIconSource()
- Specified by:
getIconSource
in interface Icon
getImage
public java.awt.Image getImage()
- Specified by:
getImage
in interface Icon
getImage
public java.awt.Image getImage(int w,
int h)
- Specified by:
getImage
in interface Icon
getImageSource
public java.net.URL getImageSource()
- Specified by:
getImageSource
in interface Icon
getManageableType
public ManageableType getManageableType()
- Specified by:
getManageableType
in interface Manageable
getObjectValue
public java.lang.Object getObjectValue(ChannelData data,
int channel)
- Specified by:
getObjectValue
in interface ChannelMap
getPreferredIconSize
public java.awt.Dimension getPreferredIconSize(boolean small)
- Specified by:
getPreferredIconSize
in interface IconSource
getSizeRatio
public float getSizeRatio()
- Specified by:
getSizeRatio
in interface RenderedIcon
getSpectraldistribution
public SPD getSpectraldistribution()
isMutable
public boolean isMutable()
- Specified by:
isMutable
in interface Icon
paintIcon
public void paintIcon(java.awt.Component c,
java.awt.Graphics2D g,
int x,
int y,
int w,
int h,
int state)
- Specified by:
paintIcon
in interface Icon
prepareIcon
public void prepareIcon()
- Specified by:
prepareIcon
in interface Icon
renderImage
public int renderImage(JobManager jm,
java.awt.image.BufferedImage img,
int y)
- Specified by:
renderImage
in interface RenderedIcon
setSpectraldistribution
public void setSpectraldistribution(SPD spd)
- Set spectral curve
- Parameters:
spd
- spectral curve
setSpectraldistribution
public void setSpectraldistribution(SpectralCurve curve)
- Set spectral curve
- Parameters:
curve
- spectral curve