Class GdalImageJ

java.lang.Object
com.eco.bio7.geo.GdalImageJ

public final class GdalImageJ extends Object
GDAL and ImageJ: rasters of all formats of GDAL as ImageJ images (with the georeferencing as calibration and properties), ImageJ images as GeoTIFF, the vectors of GDAL as ROIs of an image. GDAL must be loaded (see com.eco.bio7.gdal.ui.GdalActivation).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The properties of the image with the georeferencing of GDAL (for the export).
    static final String
    The properties of the image with the georeferencing of GDAL (for the export).
    static final String
    The properties of the image with the georeferencing of GDAL (for the export).
    static final String
    The properties of the image with the georeferencing of GDAL (for the export).
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    addVectorRois(Path file, ij.ImagePlus imp, ij.plugin.frame.RoiManager manager)
    The features of a vector file as ROIs of the image (in the ROI Manager): the coordinates are transformed into the coordinate system of the image (read with GDAL) and into pixels.
    static void
    exportGeoTiff(ij.ImagePlus imp, Path file)
    Writes an ImageJ image as GeoTIFF (compressed): 8 bit as Byte, 16 bit as UInt16, 32 bit as Float32 (NaN as no data), RGB as 3 bands; a stack as bands.
    static ij.ImagePlus
    open(Path file)
    Reads a raster as ImageJ image (not shown): 8 bit and 16 bit (unsigned) keep their type, other types are 32 bit (no data as NaN), RGB(A) bands of 8 bit an RGB image, a palette band an 8 bit image with the colors.

    Methods inherited from class Object

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

    • GEOTRANSFORM

      public static final String GEOTRANSFORM
      The properties of the image with the georeferencing of GDAL (for the export).
      See Also:
    • PROJECTION

      public static final String PROJECTION
      The properties of the image with the georeferencing of GDAL (for the export).
      See Also:
    • NODATA

      public static final String NODATA
      The properties of the image with the georeferencing of GDAL (for the export).
      See Also:
    • SOURCE

      public static final String SOURCE
      The properties of the image with the georeferencing of GDAL (for the export).
      See Also:
  • Method Details

    • open

      public static ij.ImagePlus open(Path file)
      Reads a raster as ImageJ image (not shown): 8 bit and 16 bit (unsigned) keep their type, other types are 32 bit (no data as NaN), RGB(A) bands of 8 bit an RGB image, a palette band an 8 bit image with the colors. Several bands are a stack. Very large rasters are read as overview.
    • exportGeoTiff

      public static void exportGeoTiff(ij.ImagePlus imp, Path file)
      Writes an ImageJ image as GeoTIFF (compressed): 8 bit as Byte, 16 bit as UInt16, 32 bit as Float32 (NaN as no data), RGB as 3 bands; a stack as bands. The georeferencing of an image read with GDAL is written.
    • addVectorRois

      public static int addVectorRois(Path file, ij.ImagePlus imp, ij.plugin.frame.RoiManager manager)
      The features of a vector file as ROIs of the image (in the ROI Manager): the coordinates are transformed into the coordinate system of the image (read with GDAL) and into pixels. Points as point ROIs, lines as polylines, polygons (with holes) as polygon or composite ROIs.
      Returns:
      the number of ROIs