Class Subset

  • All Implemented Interfaces:
    java.io.Serializable, Component

    public class Subset
    extends Image
    A image that is a subset of an existing image. Generally this class is expected to be used when we break down a larger image into subimages for sampling purposes. Any action that modifies the image should use the setData or setDataArray methods. Modifying the array returned by getDataArray will not modify the underlying image. E.g., the BoxSmoother should not be run on the subset images but on the parent.
    See Also:
    Serialized Form
    • Method Detail

      • getData

        public double getData​(long npix)
        Get a pixels data associated with the image.
        Overrides:
        getData in class Image
      • getDataArray

        public double[] getDataArray()
        Get the data as an array. Note that for an image this array can be used to modify the image, but that will not be true for the array returned here.
        Overrides:
        getDataArray in class Image
      • setData

        public void setData​(long npix,
                            double newData)
        Set the data associated with the image.
        Overrides:
        setData in class Image
      • clearData

        public void clearData()
        Clear the data array
        Overrides:
        clearData in class Image
      • setDataArray

        public void setDataArray​(double[] newData)
        Set the data array
        Overrides:
        setDataArray in class Image
      • split

        public static int[][] split​(Image parent,
                                    int[] index,
                                    int nx,
                                    int ny)
        Split an index array into subarrays for each subset. If the image is too small, just return it/