Interface IImageTrace

All Superinterfaces:
IAxesTrace, ICoordinateSystemTrace, IDownsampledTrace, org.eclipse.january.INameable, IPaletteTrace, ITrace
All Known Subinterfaces:
IImageStackTrace
All Known Implementing Classes:
ImageStackTrace, ImageTrace

public interface IImageTrace extends IPaletteTrace, IDownsampledTrace, ICoordinateSystemTrace
Interface used for the plotting system to plot images. In the LightWeightPlotter this is called ImageTrace.
  • Method Details

    • getRGBData

      org.eclipse.january.dataset.IDataset getRGBData()
      If the original data was RGB data, the trace may sum this and ignore the RGB values. In this case the original RGB data as read from disk is available by calling this method.
      Returns:
    • getImageOrigin

      Default is TOP_LEFT unlike normal plotting
      Returns:
    • setImageOrigin

      void setImageOrigin(ImageServiceBean.ImageOrigin origin)
      Repaints the axes and the image to the new origin.
      Parameters:
      origin -
    • setData

      boolean setData(org.eclipse.january.dataset.ILazyDataset image, List<? extends org.eclipse.january.dataset.IDataset> axes, boolean performAutoScale)
      Call to set image data
      Parameters:
      image -
      axes - - may be null
      performAutoScale - - true to rescale to new selection, otherwise keeps last axis position.
      Returns:
      false if could not set data
    • setDynamicData

      void setDynamicData(org.eclipse.january.dataset.IDynamicShape dynamic)
      Set image as a changeable one
      Parameters:
      dynamic -
    • setAxes

      void setAxes(List<? extends org.eclipse.january.dataset.IDataset> axes, boolean performAutoScale)
      Change the axes without changing the underlying data.
      Parameters:
      axes -
      performAutoScale -
    • getDownsampleType

      IImageTrace.DownsampleType getDownsampleType()
      Returns:
      the down-sample type being used for plotting less data than received.
    • setDownsampleType

      void setDownsampleType(IImageTrace.DownsampleType type)
      Change the down-sample type, will also refresh the UI.
      Parameters:
      type -
    • rehistogram

      void rehistogram()
      Parameters:
      rehisto - image when run
    • getHistoType

      return the HistoType being used
      Returns:
    • setHistoType

      boolean setHistoType(ImageServiceBean.HistoType type)
      Sets the histo type.
    • setImageUpdateActive

      void setImageUpdateActive(boolean b)
      You may set the image not to redraw images during updating a number of settings for efficiency reasons. Do this in a try{} finally{} block to avoid it being left off.
      Parameters:
      b -
    • repaint

      void repaint()
      Call to redraw the image, normally the same as repaint on Figure.
    • getDownsampled

      org.eclipse.january.dataset.IDataset getDownsampled()
      Returns:
      the current downsampled Dataset being used to draw the image.
    • getDownsampledMask

      org.eclipse.january.dataset.IDataset getDownsampledMask()
      Returns:
      the current downsampled mask or null if there is no mask.
    • getDownsampleBin

      int getDownsampleBin()
      Returns:
      the bin side in pixels which will be used when drawing the image. The bin is a square of side = the return value.
    • getMask

      org.eclipse.january.dataset.IDataset getMask()
      The masking dataset of there is one, normally null. false to mask the pixel, true to leave as is.
      Returns:
    • setMask

      void setMask(org.eclipse.january.dataset.IDataset bd)
      The masking dataset of there is one, normally null. false to mask the pixel, true to leave as is. If you don't send a BooleanDataset the system may attempt a cast and throw an exception.
    • sleep

      void sleep()
      Can be used to clear memory used by the image if the plotting system is no longer active.
    • setAlpha

      void setAlpha(int alpha)
      Set the transparency setting The alpha value must be between 0 (transparent) and 255 (opaque). A value of -1 is the default and means that no CPU is used for alpha.
      Parameters:
      alpha -
    • getAlpha

      int getAlpha()
      Return the transparency value of the image. The alpha value must be between 0 (transparent) and 255 (opaque). A value of -1 is the default and means that no CPU is used for alpha.
    • getGlobalRange

      double[] getGlobalRange()
      Get a global axis range associated with the image. This parameter is used to mark an image trace as part of a collection which will be plotted on true linear axes (in the same style as XY data), potentially with multiple other traces
    • setGlobalRange

      void setGlobalRange(double[] globalRange)
      Set a global axis range associated with the image. This parameter is used to mark an image trace as part of a collection which will be plotted on true linear axes (in the same style as XY data), potentially with multiple other traces
      Parameters:
      globalRange -
    • hasTrueAxes

      boolean hasTrueAxes()
      If true the image is plotted against a true linear axis rather than indicies. Only true if a global range is set.
      Returns:
      trueAxes
    • getImage

      default Object getImage()
      Get Image object.
      Returns:
      Image or null(default)