Package skyview.survey

# Class Image

java.lang.Object
skyview.survey.Image

All Implemented Interfaces:
  `Serializable`, `Component`

Direct Known Subclasses:
  `DSSImage`, `FitsImage`, `HealPixImage`, `HipsImage`, `ProxyImage`, `Subset`

public class Image extends Object implements Component
This class defines an image as the combination of a set of pixel values and a WCS describing the pixel coordinates. some subclasses of the Image class may be 'read-only' images and may throw an Error if the user attempts to set the data values.

See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`protected double[]`
`data`
The data in the image.

## Constructor Summary

Constructors
Constructor
Description
`Image()`
Null constructor to be used in overriding classes
`Image(double[] data, WCS wcs, int width, int height)`
Construct an image given the data and WCS with default depth
`Image(double[] data, WCS wcs, int width, int height, int depth)`
Construct an image given the data and WCS with specified depth

## Method Summary

Modifier and Type
Method
Description
`void`
`clearData()`
Clear the data array
`Image`
`getBaseImage()`
Get the base image if this is not the working image.
`double[]`
`getCenter(int npix)`
Get the center position of the given output pixel
`double[][]`
`getCorners(int npix)`
Get the corners of the given output pixel
`double`
`getData(long npix)`
Get a pixels data associated with the image.
`double[]`
`getDataArray()`
Get the data as an array
`int`
`getDepth()`
Get the number of planes in the image
`String`
`getDescription()`
Get a description of the object
`int`
`getHeight()`
Get the height of the image
`String`
`getName()`
Get the name of the image
`Transformer`
`getTransformer()`
Get the transformation to the pixel coordinates of the image
`WCS`
`getWCS()`
Get the WCS associated with the image.
`int`
`getWidth()`
Get the width of the image
`void`
`initialize(double[] data, WCS wcs, int width, int height, int depth)`
Initialize an image.
`boolean`
`isTiled()`
Is this image tiled? I.e., do we read in only a piece of the image at a time?
`void`
`setAccumulate(boolean flag)`
Set the accumulation mode.
`void`
`setData(long npix, double newData)`
Set the Data associated with the image.
`void`
`setDataArray(double[] newData)`
Set the data array
`protected void`
`setName(String name)`
set the name of the image
`boolean`
`valid()`
Is this image fully available?
`void`
`validate()`
Make sure the image is ready for detailed use.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### data

protected double[] data
The data in the image. It should have dimension nx*ny*nz

## Constructor Details

### Image

public Image()
Null constructor to be used in overriding classes

### Image

public Image(double[] data, WCS wcs, int width, int height) throws TransformationException
Construct an image given the data and WCS with default depth

Throws:
  `TransformationException`

### Image

public Image(double[] data, WCS wcs, int width, int height, int depth) throws TransformationException
Construct an image given the data and WCS with specified depth

Throws:
  `TransformationException`

## Method Details

### getName

public String getName()
Get the name of the image

Specified by:
  `getName` in interface `Component`

### setName

protected void setName(String name)
set the name of the image

### getDescription

public String getDescription()
Get a description of the object

Specified by:
  `getDescription` in interface `Component`

### initialize

public void initialize(double[] data, WCS wcs, int width, int height, int depth) throws TransformationException
Initialize an image. Probably should be a protected method but used in some skyview.geometry calls.

Throws:
  `TransformationException`

### getWCS

public WCS getWCS()
Get the WCS associated with the image.

### getData

public double getData(long npix)
Get a pixels data associated with the image.

### getDataArray

public double[] getDataArray()
Get the data as an array

### setAccumulate

public void setAccumulate(boolean flag)
Set the accumulation mode.

### 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

### getTransformer

public Transformer getTransformer()
Get the transformation to the pixel coordinates of the image

### getWidth

public int getWidth()
Get the width of the image

### getHeight

public int getHeight()
Get the height of the image

### getDepth

public int getDepth()
Get the number of planes in the image

### getCenter

public double[] getCenter(int npix)
Get the center position of the given output pixel

### getCorners

public double[][] getCorners(int npix)
Get the corners of the given output pixel

### validate

public void validate()
Make sure the image is ready for detailed use. This may be overriden in classes which initially approximate the image.

### valid

public boolean valid()
Is this image fully available?

### isTiled

public boolean isTiled()
Is this image tiled? I.e., do we read in only a piece of the image at a time?

### getBaseImage

public Image getBaseImage()
Get the base image if this is not the working image.