Interface IPlotImageService
- All Superinterfaces:
IFileIconService
- All Known Implementing Classes:
PlotImageService
A service for getting thumbnails from datasets as images and for
getting system file icons for File objects.
The implementor or this service contributes using an eclipse extension
point and then later any plugin may ask for an implementation of the service.
-
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.january.dataset.IDatasetcreateDataset(BufferedImage image) Create dataset from buffered imageorg.eclipse.swt.graphics.ImagecreateImage(BufferedImage image) Create image from buffered imageorg.eclipse.swt.graphics.ImagecreateImage(File f, int width, int height) Create a square image from a specified file, f of given side size, size in pixels.org.eclipse.ui.services.IDisposablecreatePlotDisposable(String plotName) Creates an object which may be used to cache the plotting system when looping over a stack and getting many images.org.eclipse.swt.graphics.ImagegetImage(PlotImageData data) Main method for thumbnails and other images of plots which must have a certain size.org.eclipse.january.dataset.IDatasetgetThumbnail(org.eclipse.january.dataset.IDataset set, int width, int height) Get a thumbnail Dataset of square shape.Methods inherited from interface org.eclipse.dawnsci.plotting.api.image.IFileIconService
getIconForFile, getIconForFile
-
Method Details
-
createImage
Create a square image from a specified file, f of given side size, size in pixels.- Parameters:
f-size-- Returns:
-
createImage
Create image from buffered image- Parameters:
image-- Returns:
- image
-
createDataset
Create dataset from buffered image- Parameters:
image-- Returns:
- dataset
-
getThumbnail
org.eclipse.january.dataset.IDataset getThumbnail(org.eclipse.january.dataset.IDataset set, int width, int height) Get a thumbnail Dataset of square shape.- Parameters:
set- - must be 2D setsize-- Returns:
-
getImage
Main method for thumbnails and other images of plots which must have a certain size. Deals with 1D and 2D, including surfaces. THREAD SAFE- Parameters:
set-size-- Returns:
- Throws:
Exception
-
createPlotDisposable
Creates an object which may be used to cache the plotting system when looping over a stack and getting many images. For instance when exporting surface or 1D plots. This IDisposable is then set in the call to PlotImageData to make it more efficient. THREAD SAFE- Parameters:
plotName- to use to look up plotting system (can be null)- Returns:
- Throws:
Exception
-