Spectrogram
Class SpectrogramProjector
java.lang.Object
PamView.GeneralProjector
Spectrogram.SpectrogramProjector
public class SpectrogramProjector
- extends GeneralProjector
Spectrogram projector for overlaying data onto the spectrogram bitmap
which will always be scaled 1:1 with regard to pixels per frequency or
time bin.
- Author:
- Doug Gillespie
- See Also:
DirectDrawProjector
|
Method Summary |
double |
dataToX(double d1,
double d2)
|
double |
dataToY(double d1,
double frequency)
|
Coordinate3d |
getCoord3d(double d1,
double d2,
double d3)
Function ultimately used by a PamDataBlock to convert it's own data, in
whatever form that is in into screen coordinates. |
void |
setOffset(long timeOffsetMillis,
int timeOffsetPixs)
Set the x and the time offset |
void |
setScales(double xScale,
double yScale,
int specWidth,
int specHeight)
|
| Methods inherited from class PamView.GeneralProjector |
addHoverData, addHoverData, clearHoverList, findClosestDataUnitIndex, findClosestDataUnitIndex, getHoveredDataUnit, getMouseHoverAdapter, getParmeterType, getParmeterUnits, setParmeterType, setParmeterUnits |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
xScale
private double xScale
- xScale is in pixels per millisecond.
yScale
private double yScale
pixOriginX
private int pixOriginX
pixOriginY
private int pixOriginY
specWidth
private int specWidth
specHeight
private int specHeight
timeOffsetMillis
private long timeOffsetMillis
spectrogramDisplay
private SpectrogramDisplay spectrogramDisplay
SpectrogramProjector
SpectrogramProjector(SpectrogramDisplay spectrogramDisplay)
setScales
public void setScales(double xScale,
double yScale,
int specWidth,
int specHeight)
- Parameters:
xScale - pixels per millisecondyScale - 2/fftLengthspecWidth - display widthspecHeight - display height
setOffset
public void setOffset(long timeOffsetMillis,
int timeOffsetPixs)
- Set the x and the time offset
- Parameters:
timeOffsetMillis - time offset in Java millisecondstimeOffsetPixs - position in pixels
getCoord3d
public Coordinate3d getCoord3d(double d1,
double d2,
double d3)
- Description copied from class:
GeneralProjector
- Function ultimately used by a PamDataBlock to convert it's own data, in
whatever form that is in into screen coordinates.
- Specified by:
getCoord3d in class GeneralProjector
- Parameters:
d1 - d2 and d3 are data representing whatever is appropriate for
the concrete instance of the projector (e.g. Latitude,
Longitude, depth, Time Frequency, etc)
- Returns:
- A 3 dimensional coordinate (realistically z is never currently
used)
dataToX
public double dataToX(double d1,
double d2)
dataToY
public double dataToY(double d1,
double frequency)