|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcds.aladin.AladinData
public class AladinData
Aladin stack plane access for plugins.
This class allows Aladin compatible plugins to access the stack plane data. An Aladin compatible plugin must extend the AladinPlugin class. In a plugin, the current usage is to get an AladinData object from one of these Aladin methods.
Constructor Summary | |
---|---|
AladinData(Aladin aladin)
Aladin plane data for the first selected plane in the stack (from the top) |
|
AladinData(Aladin aladin,
int planeHashCode)
Aladin plane data for the specified plane |
|
AladinData(Aladin aladin,
int mode,
java.lang.String name)
Aladin plane data creation and/or simple access. |
|
AladinData(Aladin aladin,
java.lang.String name)
Aladin plane data for the specified plane |
Method Summary | |
---|---|
Obj |
addSource(java.lang.String id,
double ra,
double dec,
java.lang.String[] value)
FOR ADVANCED DEVELOPERS ONLY ! |
void |
bytePixelsModified()
FOR ADVANCED DEVELOPERS ONLY ! |
void |
codedPixelsModified()
FOR ADVANCED DEVELOPERS ONLY ! |
static double |
CodedPixelsToDouble(byte[] codedPixels,
int bitpix,
int pos)
FOR ADVANCED DEVELOPERS ONLY ! |
static void |
DoubleToCodedPixels(double val,
byte[] codedPixels,
int bitpix,
int pos)
FOR ADVANCED DEVELOPERS ONLY ! |
void |
fitsKeysModified()
FOR ADVANCED DEVELOPERS ONLY ! |
double[] |
getCoord(double x,
double y)
Return the J2000 coordinates for a x,y position according to the image astrometrical calibration This method is dedicated to the image planes |
double[][][] |
getCube()
Return the cube pixels. |
double[][][] |
getCube(int x,
int y,
int z,
int width,
int height,
int depth)
Extract a sub-cube. |
int |
getDepth()
Return the cube depth This method is dedicated to the blink or cube planes |
java.lang.String |
getError()
Return the last error message associated to the plane |
int |
getFitsBitPix()
Return the image coding in FITS standard. |
double |
getFitsBscale()
Return the BSCALE value of the original pixels. |
double |
getFitsBzero()
Return the BZERO value of the original pixels. |
java.lang.String |
getFitsHeader()
Return the Fits header as a String. |
int |
getHeight()
Return the image height This method is dedicated to the image planes |
java.lang.String |
getLabel()
Return the plane label |
int |
getNbObj()
FOR ADVANCED DEVELOPERS ONLY ! |
java.lang.String |
getOrigin()
Return the origin of the plane |
double |
getPixel(int x,
int y)
Return the full pixel value convert in double for a dedicated position. |
double |
getPixel(int x,
int y,
int z)
Return the full pixel value from a cube convert in double for a dedicated position. |
double[][] |
getPixels()
Return a copy of the image pixels in doubles This method is dedicated to the image planes |
int |
getPlaneHashCode()
return the plane internal hashCode (never modified during the Aladin session) |
java.lang.String |
getPlaneType()
Return the plane type. |
java.net.URL |
getUrl()
Return the url from where the plane has been built |
int |
getWidth()
Return the image width This method is dedicated to the image planes |
double[] |
getXY(double ra,
double dec)
Return the x,y pixel coordinates for a ra,dec J2000 postion according to the image astrometrical calibration. |
boolean |
isOn()
Return true if the plane is activated |
boolean |
isReady()
Return true if the plane is ready |
boolean |
isSelected()
Return true if the plane is selected |
void |
objModified()
FOR ADVANCED DEVELOPERS ONLY ! |
void |
rmObj(Obj obj)
FOR ADVANCED DEVELOPERS ONLY ! |
byte[] |
seeBytePixels()
FOR ADVANCED DEVELOPERS ONLY ! |
byte[] |
seeBytePixels(int z)
FOR ADVANCED DEVELOPERS ONLY ! |
byte[] |
seeCodedPixels()
FOR ADVANCED DEVELOPERS ONLY ! |
java.util.Hashtable |
seeFitsKeys()
FOR ADVANCED DEVELOPERS ONLY ! |
Obj[] |
seeObj()
FOR ADVANCED DEVELOPERS ONLY ! |
void |
setDatatype(java.lang.String[] datatype)
FOR ADVANCED DEVELOPERS ONLY ! |
void |
setFitsHeader(java.lang.String header)
Replace original Fits header, and modify the astrometrical projection according to the WCS keys in this new Fits header. |
void |
setName(java.lang.String[] name)
FOR ADVANCED DEVELOPERS ONLY ! |
void |
setPixels(double[][] pixels)
Replace the original image pixel values. |
void |
setPixels(double[][] pixels,
int bitpix)
Replace the original image and possibly modify its internal coding (byte,integer,float..) |
void |
setUCD(java.lang.String[] ucd)
FOR ADVANCED DEVELOPERS ONLY ! |
void |
setUnit(java.lang.String[] unit)
FOR ADVANCED DEVELOPERS ONLY ! |
void |
setWidth(java.lang.String[] width)
This method is dedicated to the overlay planes and specifically source planes For providing a fast and direct way for creating overlay source plane. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AladinData(Aladin aladin) throws AladinException
aladin
- Aladin object reference
AladinException
public AladinData(Aladin aladin, java.lang.String name) throws AladinException
aladin
- Aladin object referencename
- plane label as displayed in the Aladin stack
or plane number (The bottom one is 1)
AladinException
public AladinData(Aladin aladin, int planeHashCode) throws AladinException
aladin
- Aladin object referenceplaneHashCode
- plane hashCode (see getPlaneHashCode())
AladinException
public AladinData(Aladin aladin, int mode, java.lang.String name) throws AladinException
aladin
- aladin object referencemode
- Plan mode: 0-get a plane, 1-create a new image, 2-create a new catalogname
- plane name for mode 0 (as displayed in the Aladin stack)
AladinException
Method Detail |
---|
public int getPlaneHashCode()
public java.lang.String getLabel()
public java.lang.String getOrigin()
the
- origin of the planepublic java.net.URL getUrl()
public java.lang.String getError()
public java.lang.String getPlaneType()
public boolean isSelected()
public boolean isOn()
public boolean isReady()
public double[][] getPixels() throws AladinException
AladinException
public double getPixel(int x, int y) throws AladinException
x,y
- Image coordinates (line 0 at the bottom "a la Fits")
AladinException
public double getPixel(int x, int y, int z) throws AladinException
x,y,z
- Cube coordinates (line 0 at the bottom "a la Fits")
AladinException
public double[][][] getCube(int x, int y, int z, int width, int height, int depth) throws AladinException
AladinException
public double[][][] getCube() throws AladinException
AladinException
public void setPixels(double[][] pixels) throws AladinException
pixels
- image pixels (([0][0] at the bottom left, [width-1][height-1] at the top right)
AladinException
public void setPixels(double[][] pixels, int bitpix) throws AladinException
pixels
- image pixels (([0][0] at the bottom left, [width-1][height-1] at the top right)bitpix
- coding mode "a la Fits"
(8, 16 or 32 for unsigned integers, -32 or -64 for reals)
AladinException
public int getWidth() throws AladinException
AladinException
public int getHeight() throws AladinException
AladinException
public int getDepth() throws AladinException
AladinException
public int getFitsBitPix() throws AladinException
AladinException
public double getFitsBzero() throws AladinException
AladinException
public double getFitsBscale() throws AladinException
AladinException
public java.lang.String getFitsHeader() throws AladinException
AladinException
public void setFitsHeader(java.lang.String header) throws AladinException
header
- the fits header
AladinException
public byte[] seeBytePixels() throws AladinException
AladinException
public byte[] seeBytePixels(int z) throws AladinException
AladinException
public byte[] seeCodedPixels() throws AladinException
AladinException
public java.util.Hashtable seeFitsKeys() throws AladinException
AladinException
public static double CodedPixelsToDouble(byte[] codedPixels, int bitpix, int pos)
codedPixels
- Coded pixel array (see seeCodedPixels())bitpix
- pixel coding (see getFitsBitPix)pos
- pixel position in the array (takes into account the pixel size coding)
public static void DoubleToCodedPixels(double val, byte[] codedPixels, int bitpix, int pos)
val
- double pixel valuecodedPixels
- Coded pixel array (see seeCodedPixels())bitpix
- pixel coding (see getFitsBitPix)pos
- pixel position in the array (takes into account the pixel size coding)public void bytePixelsModified() throws AladinException
AladinException
public void codedPixelsModified() throws AladinException
AladinException
public void fitsKeysModified() throws AladinException
AladinException
public double[] getCoord(double x, double y) throws AladinException
x,y
- image coordinates (the center of the left-bottom pixel is (1,1) "a la FITS")
AladinException
public double[] getXY(double ra, double dec) throws AladinException
ra,dec
- RA and DEC J2000 coordinates
AladinException
public Obj[] seeObj() throws AladinException
AladinException
public int getNbObj() throws AladinException
AladinException
public void rmObj(Obj obj) throws AladinException
obj
- the object to remove
AladinException
public void setName(java.lang.String[] name)
name
- column name listmethod for adding new sources
public void setDatatype(java.lang.String[] datatype)
name
- column name listmethod for adding new sources
public void setUnit(java.lang.String[] unit)
name
- column name listmethod for adding new sources
public void setUCD(java.lang.String[] ucd)
name
- column name listmethod for adding new sources
public void setWidth(java.lang.String[] width)
name
- column name listmethod for adding new sources
public Obj addSource(java.lang.String id, double ra, double dec, java.lang.String[] value) throws AladinException
id
- source IDra
- RA J2000 in degreesdec
- DEC J2000 in degreesvalue
- value list (according to the current measurement table
description defined with setName(), setDatatype(), setUnit(), setUCD(), setWidth() methods)
AladinException
public void objModified() throws AladinException
AladinException
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |