Class ImageMethods

java.lang.Object
com.eco.bio7.image.ImageMethods

public class ImageMethods extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    imageFeatureStackSelectionToR(ij.ImagePlus imp, int transferType, int minStackSlice, int maxStackSlice, boolean signatureFromGroup)
    This methods transfers image stack data of ROI selections (ROI Manager) to R (embedded R).
    static void
    imageFeatureStackToR(String name, int transferDataType, ij.ImagePlus impPlus)
    This methods transfers image stack data to R (embedded R).
    static void
    imageFromR(int type, String name, int transferDataType)
    This method creates an ImageJ image from the given named data (matrix or vector) in R.
    protected static void
    imagePlusToR(ij.ImagePlus imp, String name, boolean matrix, int transferDataType)
     
    static void
    imageToR(String name, boolean matrix, int transferDataType, ij.ImagePlus impPlus)
    This methods transfers image data from ImageJ to R (embedded R).
    static void
    transferImageInPlace(String dataName, int type)
    A method to transfer byte information directly to an image as one container.
    static void
    A method to transfer Color information (as datatype raw) directly to an image as one container.

    Methods inherited from class Object

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

    • createMatrix

      protected static boolean createMatrix
  • Constructor Details

    • ImageMethods

      public ImageMethods()
  • Method Details

    • imageToR

      public static void imageToR(String name, boolean matrix, int transferDataType, ij.ImagePlus impPlus)
      This methods transfers image data from ImageJ to R (embedded R). Matrix or vector data is created and variables for the width, height and the name of the image will be created.
      Parameters:
      name - the name for the data.
      matrix - a boolean, if true automatically a data matrix will be created (only for double values - in case of an RGB transfer an integer matrix will be created!).
      transferDataType - an integer value for the data type which will be transfered. (0=double, 1=integer, 2=byte, 3=RGB as single byte vectors or integer matrix)
      impPlus - an optional ImagePlus object as the default image source.
    • imageFromR

      public static void imageFromR(int type, String name, int transferDataType)
      This method creates an ImageJ image from the given named data (matrix or vector) in R. This method expects the variables imageSizeX, imageSizeY to be present in the R workspace if vector data is transferred.
      Parameters:
      type - an integer which represents an ImageJ image type.(0=ColourProcessor, 1=ByteProcessor, 2=FloatProcessor, 3=ShortProcessor, 4=DoubleProcessor)
      name - a string identifier for the R data.
      transferDataType - the data type as transfer type (0=double, 1=integer, 2=byte).
    • imagePlusToR

      protected static void imagePlusToR(ij.ImagePlus imp, String name, boolean matrix, int transferDataType)
    • transferImageInPlace

      public static void transferImageInPlace(String dataName, int type)
      A method to transfer byte information directly to an image as one container. If no image is present a new one will be created. This method expects the variables imageSizeX, imageSizeY to be present in the R workspace.
      Parameters:
      dataName - the name of the R vector.
      type - the type of the image (1 = byte, 2 = float).
    • transferRGBImageInPlace

      public static void transferRGBImageInPlace(String dataName)
      A method to transfer Color information (as datatype raw) directly to an image as one container. If no image is present a new one will be created. This method expects the variables imageSizeX, imageSizeY to be present in the R workspace.
      Parameters:
      dataName - the name of the raw R vector.
      type - the type of the image.
    • imageFeatureStackToR

      public static void imageFeatureStackToR(String name, int transferDataType, ij.ImagePlus impPlus)
      This methods transfers image stack data to R (embedded R). A feature matrix from the slices will be created and variables for the width, height and the name of the image stack will be created in the R workspace, too.
      Parameters:
      name - the name for the data matrix.
      transferDataType - an integer value for the data type which will be transfered. (0=double, 1=integer, 2=byte
      impPlus - an optional ImagePlus object as the default image source.
    • imageFeatureStackSelectionToR

      public static void imageFeatureStackSelectionToR(ij.ImagePlus imp, int transferType, int minStackSlice, int maxStackSlice, boolean signatureFromGroup)
      This methods transfers image stack data of ROI selections (ROI Manager) to R (embedded R). A feature matrix from the slices will be created and variables for the width, height and the name of the image ROI data will be created in the R workspace, too. Signatures can be added, too (from the group number or extracted from the ROI names number at the end seperated by an underscore. If the group argument is false and if the name of the ROI has no underscore followed by a signature number no signatures will be added to the R matrix data!
      Parameters:
      imp - A given ImagePlus instance.
      transferType - The data type as transfer type (0=double, 1=integer, 2=byte).
      minStackSlice - The first stack slice (transfer starts with this slice!).
      maxStackSlice - The last stack slice. (transfer stops with this slice!).
      signatureFromGroup - A boolean if the group number is added as signature. If false the underscore is used!