The ImageKind content is a semicolon-separated sequence of values, of which this is an example:
GRIP combined image;32 images;First started at 2010:01:31 23:59:59;Last ended at 2010:02:01 00:10:59;
Exposure 32 x 10s;ISO 3200;Aperture f/4.8;Focal length 1200mm
That is separated out and displayed in image information, on GRIP's image menu.
|
Constructor Summary |
Metadata()
Construct an object holding no values, for the values to be added individually through addValue. |
Metadata(java.util.List<FITS_KeywordRecord> list)
Construct from a list of keywords as read from a FITS file. |
Metadata(java.util.Map<java.lang.String,java.lang.String> values)
Construct from a map using the keys defined as static _KEYWORD values in this class. |
Metadata(java.lang.String value)
Construct by parsing the value obtained from Im.getImageMetadataAsMap (), with key "ImageKind" -
which may have been constructed by this class. |
|
Method Summary |
void |
addValue(java.lang.String key,
java.lang.String value)
Only the keys defined as static _KEYWORD strings in this class are recognised by its methods. |
javax.imageio.metadata.IIOMetadataNode |
buildTree()
Build a tree fragment in standard (javax_imageio_1.0) format suitable for merging into a
javax.imageio.metadata.IIOMetadata object. |
void |
clear()
Clear the metadata, for use when disposing an image. |
boolean |
contains(java.lang.String keyword)
|
void |
convertImageKindString()
|
java.lang.StringBuffer |
formatForDisplay()
Assemble metadata from all known keys into lines separated by HTML <br> elements. |
float |
getAperture()
Get aperture (f/) from the metadata if it is present, otherwise return 0. |
java.lang.String |
getCamera()
Get camera details from the metadata if present, otherwise return empty String. |
java.lang.String |
getCopyright()
Get copyright details from the metadata if present, otherwise return empty String. |
java.lang.String |
getDateTime()
Get date and time taken (yyyy:mm:dd hh:mm:ss) from the metadata if it is present
(with key "DateTimeOriginal"), otherwise return empty string. |
float |
getExposure()
Get exposure (s) from the metadata if it is present, otherwise return 0. |
int |
getFocalLength()
Get focal length (mm) from the metadata if it is present, otherwise return 0. |
int |
getISO()
Get sensitivity (ISO) from the metadata if it is present, otherwise return 0. |
java.util.List<FITS_KeywordRecord> |
getList()
|
java.util.Map<java.lang.String,java.lang.String> |
getMap()
|
java.lang.String |
getPhotographer()
Get photographer details from the metadata if present, otherwise return empty String. |
long |
getTimeInMillis()
Get date and time taken, in ms since 1970.0, or 0 if "DateTimeOriginal" key was not present in the metadata or the value was invalid. |
java.lang.String |
getValue(java.lang.String... possibleKeys)
For the first of the given keys found in the metadata, return the value. |
java.lang.String |
getValue(java.lang.String key)
Get the value for the key, or null if the key is not found. |
void |
mergeIntoIIOI(javax.imageio.IIOImage iioi)
Merge the metadata from the map into a JAI ImageIO image, if the image supports the standard format,
javax_imageio_1.0. |
void |
remove(java.lang.String keyword)
|
void |
removeTiffFields()
It is not always appropriate to keep hold of TIFF fields which describe data layout in a file,
eg when image is converted to different bit depth. |
void |
replaceValue(java.lang.String keyword,
java.lang.String newValue)
|
java.lang.String |
toFoldedString(java.lang.String lineEnd)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IMAGE_KIND_KEYWORD
public static final java.lang.String IMAGE_KIND_KEYWORD
- See Also:
- Constant Field Values
NIMAGES_KEYWORD
public static final java.lang.String NIMAGES_KEYWORD
- See Also:
- Constant Field Values
METHOD_KEYWORD
public static final java.lang.String METHOD_KEYWORD
- See Also:
- Constant Field Values
FIRST_KEYWORD
public static final java.lang.String FIRST_KEYWORD
- See Also:
- Constant Field Values
LAST_KEYWORD
public static final java.lang.String LAST_KEYWORD
- See Also:
- Constant Field Values
EXPOSURE_KEYWORD
public static final java.lang.String EXPOSURE_KEYWORD
- See Also:
- Constant Field Values
APERTURE_KEYWORD
public static final java.lang.String APERTURE_KEYWORD
- See Also:
- Constant Field Values
FOCAL_LENGTH_KEYWORD
public static final java.lang.String FOCAL_LENGTH_KEYWORD
- See Also:
- Constant Field Values
ISO_KEYWORD
public static final java.lang.String ISO_KEYWORD
- See Also:
- Constant Field Values
CAMERA_KEYWORD
public static final java.lang.String CAMERA_KEYWORD
- See Also:
- Constant Field Values
OBSERVER_KEYWORD
public static final java.lang.String OBSERVER_KEYWORD
- See Also:
- Constant Field Values
COPYRIGHT_KEYWORD
public static final java.lang.String COPYRIGHT_KEYWORD
- See Also:
- Constant Field Values
GRIP_COMBINED_IMAGE_ID
public static final java.lang.String GRIP_COMBINED_IMAGE_ID
- See Also:
- Constant Field Values
FITS_KEYWORDS
public static final java.util.Map<java.lang.String,java.lang.String> FITS_KEYWORDS
Metadata
public Metadata(java.util.Map<java.lang.String,java.lang.String> values)
- Construct from a map using the keys defined as static _KEYWORD values in this class.
Metadata
public Metadata(java.util.List<FITS_KeywordRecord> list)
- Construct from a list of keywords as read from a FITS file.
Metadata
public Metadata()
- Construct an object holding no values, for the values to be added individually through addValue.
Metadata
public Metadata(java.lang.String value)
- Construct by parsing the value obtained from Im.getImageMetadataAsMap (), with key "ImageKind" -
which may have been constructed by this class. If that value was not constructed by this class an
empty Metadata object will be constructed.
getMap
public java.util.Map<java.lang.String,java.lang.String> getMap()
getList
public java.util.List<FITS_KeywordRecord> getList()
convertImageKindString
public void convertImageKindString()
addValue
public void addValue(java.lang.String key,
java.lang.String value)
- Only the keys defined as static _KEYWORD strings in this class are recognised by its methods.
contains
public boolean contains(java.lang.String keyword)
clear
public void clear()
- Clear the metadata, for use when disposing an image.
getValue
public java.lang.String getValue(java.lang.String key)
- Get the value for the key, or null if the key is not found.
getValue
public java.lang.String getValue(java.lang.String... possibleKeys)
- For the first of the given keys found in the metadata, return the value.
Otherwise return an empty String (rather than null).
getAperture
public float getAperture()
- Get aperture (f/) from the metadata if it is present, otherwise return 0.
getCamera
public java.lang.String getCamera()
- Get camera details from the metadata if present, otherwise return empty String.
getCopyright
public java.lang.String getCopyright()
- Get copyright details from the metadata if present, otherwise return empty String.
getExposure
public float getExposure()
- Get exposure (s) from the metadata if it is present, otherwise return 0.
getFocalLength
public int getFocalLength()
- Get focal length (mm) from the metadata if it is present, otherwise return 0.
getISO
public int getISO()
- Get sensitivity (ISO) from the metadata if it is present, otherwise return 0.
getPhotographer
public java.lang.String getPhotographer()
- Get photographer details from the metadata if present, otherwise return empty String.
getDateTime
public java.lang.String getDateTime()
- Get date and time taken (yyyy:mm:dd hh:mm:ss) from the metadata if it is present
(with key "DateTimeOriginal"), otherwise return empty string.
getTimeInMillis
public long getTimeInMillis()
- Get date and time taken, in ms since 1970.0, or 0 if "DateTimeOriginal" key was not present in the metadata or the value was invalid.
Reasons for returning 0 are logged as warnings.
buildTree
public javax.imageio.metadata.IIOMetadataNode buildTree()
- Build a tree fragment in standard (javax_imageio_1.0) format suitable for merging into a
javax.imageio.metadata.IIOMetadata object.
formatForDisplay
public java.lang.StringBuffer formatForDisplay()
- Assemble metadata from all known keys into lines separated by HTML <br> elements.
mergeIntoIIOI
public void mergeIntoIIOI(javax.imageio.IIOImage iioi)
- Merge the metadata from the map into a JAI ImageIO image, if the image supports the standard format,
javax_imageio_1.0.
This is particularly useful at the end of the batch astro-process for putting combined metadata
into the new accumulator image. The metadata then consist of camera/telescope
settings and calculated creation and exposure times from the original sequence of images.
remove
public void remove(java.lang.String keyword)
removeTiffFields
public void removeTiffFields()
- It is not always appropriate to keep hold of TIFF fields which describe data layout in a file,
eg when image is converted to different bit depth.
replaceValue
public void replaceValue(java.lang.String keyword,
java.lang.String newValue)
toFoldedString
public java.lang.String toFoldedString(java.lang.String lineEnd)