Class ConvertIDataset

java.lang.Object
org.dawnsci.boofcv.converter.ConvertIDataset

public class ConvertIDataset extends Object
Functions for converting to and from IDataset.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.eclipse.january.dataset.Dataset
    contourImageToIDataset(List<boofcv.alg.filter.binary.Contour> contours, int colorExternal, int colorInternal, int width, int height)
    Draws contours.
    static <T extends boofcv.struct.image.ImageBase<?>>
    boofcv.struct.image.ImageBase<?>
    convertFrom(org.eclipse.january.dataset.IDataset src, Class<T> clazz, boolean shareData)
    Converts the IDataset image into an ImageBase.
    static <T extends boofcv.struct.image.ImageBase<?>>
    T
    convertFrom(org.eclipse.january.dataset.IDataset src, Class<T> clazz, int bands)
     
    static <T extends boofcv.struct.image.ImageBase<?>>
    org.eclipse.january.dataset.Dataset
    convertTo(T src, boolean isBinary)
    Converts a ImageBase into an IDataset

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConvertIDataset

      public ConvertIDataset()
  • Method Details

    • convertFrom

      public static <T extends boofcv.struct.image.ImageBase<?>> boofcv.struct.image.ImageBase<?> convertFrom(org.eclipse.january.dataset.IDataset src, Class<T> clazz, boolean shareData)
      Converts the IDataset image into an ImageBase.
      Parameters:
      src - Input IDataset.
      clazz - class of data returned, can be null
      shareData - if true, share where possible (i.e. not a boolean dataset)
      Returns:
      Converted image.
    • convertFrom

      public static <T extends boofcv.struct.image.ImageBase<?>> T convertFrom(org.eclipse.january.dataset.IDataset src, Class<T> clazz, int bands)
    • convertTo

      public static <T extends boofcv.struct.image.ImageBase<?>> org.eclipse.january.dataset.Dataset convertTo(T src, boolean isBinary)
      Converts a ImageBase into an IDataset
      Parameters:
      src - Input image.
      isBinary - if true will convert to a binary image
      Returns:
      Converted image.
    • contourImageToIDataset

      public static org.eclipse.january.dataset.Dataset contourImageToIDataset(List<boofcv.alg.filter.binary.Contour> contours, int colorExternal, int colorInternal, int width, int height)
      Draws contours. Internal and external contours are different user specified colors.
      Parameters:
      contours - List of contours
      colorExternal - RGB color
      colorInternal - RGB color
      width - Image width
      height - Image height
      out - (Optional) storage for output image
      Returns:
      Rendered contours