Interface IPlotImageService

All Superinterfaces:
IFileIconService
All Known Implementing Classes:
PlotImageService

public interface IPlotImageService extends IFileIconService
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 Type
    Method
    Description
    org.eclipse.january.dataset.IDataset
    Create dataset from buffered image
    org.eclipse.swt.graphics.Image
    Create image from buffered image
    org.eclipse.swt.graphics.Image
    createImage(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.IDisposable
    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.Image
    Main method for thumbnails and other images of plots which must have a certain size.
    org.eclipse.january.dataset.IDataset
    getThumbnail(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

      org.eclipse.swt.graphics.Image createImage(File f, int width, int height)
      Create a square image from a specified file, f of given side size, size in pixels.
      Parameters:
      f -
      size -
      Returns:
    • createImage

      org.eclipse.swt.graphics.Image createImage(BufferedImage image)
      Create image from buffered image
      Parameters:
      image -
      Returns:
      image
    • createDataset

      org.eclipse.january.dataset.IDataset createDataset(BufferedImage image)
      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 set
      size -
      Returns:
    • getImage

      org.eclipse.swt.graphics.Image getImage(PlotImageData data) throws Exception
      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

      org.eclipse.ui.services.IDisposable createPlotDisposable(String plotName) throws Exception
      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