Package skyview.survey
Class Subset
java.lang.Object
skyview.survey.Image
skyview.survey.Subset
- All Implemented Interfaces:
Serializable,Component
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:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the data arraydoublegetData(long npix) Get a pixels data associated with the image.double[]Get the data as an array.Get a description of the objectvoidsetData(long npix, double newData) Set the data associated with the image.voidsetDataArray(double[] newData) Set the data arraystatic int[][]Split an index array into subarrays for each subset.static Image[]Split an image into subsets.Methods inherited from class skyview.survey.Image
getBaseImage, getCenter, getCorners, getDepth, getHeight, getName, getTransformer, getWCS, getWidth, initialize, isTiled, setAccumulate, setName, valid, validate
-
Constructor Details
-
Subset
Create a two-d subset of a (presumed) 2-d parent.- Throws:
TransformationException
-
Subset
public Subset(Image parent, int x, int y, int z, int nx, int ny, int nz) throws TransformationException Create a subset of a parent image.- Throws:
TransformationException
-
-
Method Details
-
getDescription
Get a description of the object- Specified by:
getDescriptionin interfaceComponent- Overrides:
getDescriptionin classImage
-
getData
public double getData(long npix) Get a pixels data associated with the 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:
getDataArrayin classImage
-
setData
public void setData(long npix, double newData) Set the data associated with the image. -
clearData
public void clearData()Clear the data array -
setDataArray
public void setDataArray(double[] newData) Set the data array- Overrides:
setDataArrayin classImage
-
split
Split an image into subsets. If the image is too small, just return it/- Throws:
TransformationException
-
split
Split an index array into subarrays for each subset. If the image is too small, just return it/
-