- java.lang.Object
-
- ij.process.ImageConverter
-
public class ImageConverter extends java.lang.ObjectThis class converts an ImagePlus object to a different type.
-
-
Constructor Summary
Constructors Constructor Description ImageConverter(ImagePlus imp)Constructs an ImageConverter based on an ImagePlus object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidconvertAndCalibrate(ImagePlus imp, java.lang.String type)voidconvertHSB32ToRGB()Converts a 3-slice (hue, saturation, brightness) 32-bit stack to RGB.voidconvertHSBToRGB()Converts a 3-slice (hue, saturation, brightness) 8-bit stack to RGB.voidconvertLabToRGB()Converts a Lab stack to RGB.voidconvertRGBStackToRGB()Converts a 2 or 3 slice 8-bit stack to RGB.voidconvertRGBtoIndexedColor(int nColors)Converts an RGB image to 8-bits indexed color.voidconvertToGray16()Converts this ImagePlus to 16-bit grayscale.voidconvertToGray32()Converts this ImagePlus to 32-bit grayscale.voidconvertToGray8()Converts this ImagePlus to 8-bit grayscale.voidconvertToHSB()Converts an RGB image to a HSB (hue, saturation and brightness) stack.voidconvertToHSB32()Converts an RGB image to a 32-bit HSB (hue, saturation and brightness) stack.voidconvertToLab()Converts an RGB image to a Lab stack.voidconvertToRGB()Converts this ImagePlus to RGB.voidconvertToRGBStack()Converts an RGB image to an RGB (red, green and blue) stack.static booleangetDoScaling()Returns true if scaling is enabled.static voidrecord()static voidsetDoScaling(boolean scaleConversions)Set true to scale to 0-255 when converting short to byte or float to byte and to 0-65535 when converting float to short.
-
-
-
Constructor Detail
-
ImageConverter
public ImageConverter(ImagePlus imp)
Constructs an ImageConverter based on an ImagePlus object.
-
-
Method Detail
-
convertToGray8
public void convertToGray8()
Converts this ImagePlus to 8-bit grayscale.
-
convertToGray16
public void convertToGray16()
Converts this ImagePlus to 16-bit grayscale.
-
convertAndCalibrate
public static void convertAndCalibrate(ImagePlus imp, java.lang.String type)
-
record
public static void record()
-
convertToGray32
public void convertToGray32()
Converts this ImagePlus to 32-bit grayscale.
-
convertToRGB
public void convertToRGB()
Converts this ImagePlus to RGB.
-
convertToRGBStack
public void convertToRGBStack()
Converts an RGB image to an RGB (red, green and blue) stack.
-
convertToHSB
public void convertToHSB()
Converts an RGB image to a HSB (hue, saturation and brightness) stack.
-
convertToHSB32
public void convertToHSB32()
Converts an RGB image to a 32-bit HSB (hue, saturation and brightness) stack.
-
convertToLab
public void convertToLab()
Converts an RGB image to a Lab stack.
-
convertRGBStackToRGB
public void convertRGBStackToRGB()
Converts a 2 or 3 slice 8-bit stack to RGB.
-
convertHSBToRGB
public void convertHSBToRGB()
Converts a 3-slice (hue, saturation, brightness) 8-bit stack to RGB.
-
convertHSB32ToRGB
public void convertHSB32ToRGB()
Converts a 3-slice (hue, saturation, brightness) 32-bit stack to RGB.
-
convertLabToRGB
public void convertLabToRGB()
Converts a Lab stack to RGB.
-
convertRGBtoIndexedColor
public void convertRGBtoIndexedColor(int nColors)
Converts an RGB image to 8-bits indexed color. 'nColors' must be greater than 1 and less than or equal to 256.
-
setDoScaling
public static void setDoScaling(boolean scaleConversions)
Set true to scale to 0-255 when converting short to byte or float to byte and to 0-65535 when converting float to short.
-
getDoScaling
public static boolean getDoScaling()
Returns true if scaling is enabled.
-
-