Class ImageMethods
java.lang.Object
com.eco.bio7.image.ImageMethods
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidimageFeatureStackSelectionToR(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 voidimageFeatureStackToR(String name, int transferDataType, ij.ImagePlus impPlus) This methods transfers image stack data to R (embedded R).static voidimageFromR(int type, String name, int transferDataType) This method creates an ImageJ image from the given named data (matrix or vector) in R.protected static voidimagePlusToR(ij.ImagePlus imp, String name, boolean matrix, int transferDataType) static voidThis methods transfers image data from ImageJ to R (embedded R).static voidtransferImageInPlace(String dataName, int type) A method to transfer byte information directly to an image as one container.static voidtransferRGBImageInPlace(String dataName) A method to transfer Color information (as datatype raw) directly to an image as one container.
-
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
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
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
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
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=byteimpPlus- 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!
-