Class SpectrogramImage
java.lang.Object
rawDeepLearningClassifier.layoutFX.dlTransfroms.SpectrogramImage
Draws the image of a spectrogram on a canvas.
- Author:
- Jamie Macaulay
-
Constructor Summary
ConstructorDescriptionSpectrogramImage
(double[][] spectrogram, ColourArray colourArray, double[] clims) Constructor for a spectrogram image.SpectrogramImage
(double[][] spectrogram, ColourArray colourArray, double[] clims, boolean log) Constructor for a spectrogram image. -
Method Summary
Modifier and TypeMethodDescriptionjavafx.scene.image.WritableImage
Create a an image of the spectrogram by applying a colour gradient to the surface data.javafx.scene.image.WritableImage
writeImageData
(double[][] data, ColourArray colourArray, double[] clims) Create a an image of the spectrogram by applying a colour gradient to the surface data.
-
Constructor Details
-
SpectrogramImage
Constructor for a spectrogram image.- Parameters:
spectrogram
- - the spectrogram to make an image ofclims
- - the colour limits for the spectrogram.colourArrayType
- - the colour map to use for the spectrogram
-
SpectrogramImage
public SpectrogramImage(double[][] spectrogram, ColourArray colourArray, double[] clims, boolean log) Constructor for a spectrogram image.- Parameters:
spectrogram
- - the spectrogram to make an image ofclims
- - the colour limits for the spectrogram.colourArrayType
- - the colour map to use for the spectrogram
-
-
Method Details
-
writeImageData
public javafx.scene.image.WritableImage writeImageData(double[][] data, ColourArray colourArray, double[] clims) Create a an image of the spectrogram by applying a colour gradient to the surface data.- Parameters:
colourArray
- - the colour array to use for the colour gradient.clims
- - the colour limits to apply.spectrogram
- - the spectrogram to draw
-
getRawSpecImage
public javafx.scene.image.WritableImage getRawSpecImage()Create a an image of the spectrogram by applying a colour gradient to the surface data.- Returns:
- spectrogram image which is the same size in pixels as it is in data length
-