Interface Metadata
public interface Metadata
This interface defines the metadata for Images. Note that Metadatas are
immutable; if you need to modify one, create a new one using a
MetadataBuilder.
All fields of the Metadata that are not explicitly initialized will default
to null.
You are not expected to implement this interface; it is here to describe how
you can interact with Metadata created by Micro-Manager itself. If you need
to get a MetadataBuilder, call the getMetadataBuilder() method of the
DataManager class, or use the copy() method of an existing Metadata.
This class uses a Builder pattern. Please see https://micro-manager.org/wiki/Using_Builders for more information.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceBuilder for Metadata.static interfaceDeprecated. -
Method Summary
Modifier and TypeMethodDescriptioncopy()Deprecated.Use the appropriate of the following:copyBuilderPreservingUUID(),copyBuilderWithNewUUID(),copyBuilderRemovingUUID().Return a builder with the same content, preserving the image UUID.Return a builder with the same content but removing the image UUID.Return a builder with the same content, assigning a new image UUID.The binning mode of the camera for this image.The number of bits used to represent each pixel (e.g.The name of the camera for this image.Deprecated.- use DoublegetElapsedTimeMs(double)insteaddoublegetElapsedTimeMs(double defaultValue) Time in milliseconds since the start of the given data acquisition at which the image was received by Micro-Manager.How long of an exposure was used to collect this image.The name of the file from which the image was loaded, if applicable.The sequence number of this image, for sequence acquisitions.The aspect ratio of the pixels in this image, as a Y/X ratio (e.g.Geometric relation between stage movement (in microns) and pixels.How much of the sample, in microns, a single pixel of the camera sees.Deprecated.UsegetPositionName(java.lang.String)insteadgetPositionName(String defaultPosName) Any name attached to the stage position at which this image was acquired.The time at which the Java layer of Micro-Manager receives the image from the Core, expressed as a date-time string.getROI()The ROI of the camera when acquiring this image.Any information provided by Micro-Manager or its device adapters that is relevant to this image.Arbitrary additional metadata added by third-party code.getUUID()A unique identifier for this specific image.The X stage position of the sample for this image.The Y stage position of the sample for this image.The Z stage position of the sample for this image.booleanWhether or not this image has metadata indicating the time elapsed since the start of the acquisition.boolean
-
Method Details
-
copyBuilderPreservingUUID
Metadata.Builder copyBuilderPreservingUUID()Return a builder with the same content, preserving the image UUID. The UUID is a unique identifier for the image. Micro-Manager uses this field to determine if two images are truly different, so if you copy this Metadata instance to apply to a new image, use another builder.- Returns:
- Builder, useful for command chaining
-
copyBuilderWithNewUUID
Metadata.Builder copyBuilderWithNewUUID()Return a builder with the same content, assigning a new image UUID. The UUID is a unique identifier for the image. Micro-Manager uses this field to determine if two images are truly different, so if you copy this Metadata instance to apply to a new image, use this builder.- Returns:
- Builder, useful for command chaining
-
copyBuilderRemovingUUID
Metadata.Builder copyBuilderRemovingUUID()Return a builder with the same content but removing the image UUID. The UUID is a unique identifier for the image. Micro-Manager uses this field to determine if two images are truly different.- Returns:
- Builder, useful for command chaining
-
copy
Deprecated.Use the appropriate of the following:copyBuilderPreservingUUID(),copyBuilderWithNewUUID(),copyBuilderRemovingUUID(). This method is equivalent tocopyBuilderPreservingUUID.Deprecated. -
hasElapsedTimeMs
boolean hasElapsedTimeMs()Whether or not this image has metadata indicating the time elapsed since the start of the acquisition.- Returns:
- true if the image metadata has a field indicating the elapsed time
-
getElapsedTimeMs
Deprecated.- use DoublegetElapsedTimeMs(double)insteadThe time at which Micro-Manager received this image, in milliseconds. There can be substantial jitter in this value; as a rule of thumb it should not be assumed to be accurate to better than 20ms or so.- Returns:
- Milliseconds since the start of the acquisition up to the moment this image was received by Micro-Manager
-
getElapsedTimeMs
double getElapsedTimeMs(double defaultValue) Time in milliseconds since the start of the given data acquisition at which the image was received by Micro-Manager. This is a proxy for the time at which the exposure happened, but there is considerable jitter so it should not be assumed to be accurate to more than ~20 ms.- Parameters:
defaultValue- - value returned of the image metadata did not contain information about the elapsed time- Returns:
- Milliseconds since the start of the acquisition up to the moment this image was received by Micro-Manager
-
getExposureMs
Double getExposureMs()How long of an exposure was used to collect this image.- Returns:
- Camera exposure (in ms) of this image
-
getPixelAspect
Double getPixelAspect()The aspect ratio of the pixels in this image, as a Y/X ratio (e.g. 2.0 means that the pixels are twice as tall as they are wide).- Returns:
- Pixel aspect ratio
-
getPixelSizeUm
Double getPixelSizeUm()How much of the sample, in microns, a single pixel of the camera sees.- Returns:
- Sample pixel size in microns
-
getPixelSizeAffine
AffineTransform getPixelSizeAffine()Geometric relation between stage movement (in microns) and pixels.- Returns:
- Affine transform describing geometric relation between stage movement (in microns) and camera (in pixels)
-
getXPositionUm
Double getXPositionUm()The X stage position of the sample for this image.- Returns:
- X position of the default XY stage for this image
-
getYPositionUm
Double getYPositionUm()The Y stage position of the sample for this image.- Returns:
- Y position of the default XY stage for this image
-
getZPositionUm
Double getZPositionUm()The Z stage position of the sample for this image.- Returns:
- Position of the default focus stage for this image
-
getBinning
Integer getBinning()The binning mode of the camera for this image.- Returns:
- binning mode of the camera for this image
-
getBitDepth
Integer getBitDepth()The number of bits used to represent each pixel (e.g. 12-bit means that pixel values range from 0 to 4095).- Returns:
- Number of bits used to represent each pixel
-
getImageNumber
Long getImageNumber()The sequence number of this image, for sequence acquisitions.- Returns:
- sequence number of this image
-
getScopeData
PropertyMap getScopeData()Any information provided by Micro-Manager or its device adapters that is relevant to this image. This includes a copy of the Core's knowledge of every device property at the time of image acquisition. It is possible that the values in this object are not up to date, as devices are allowed to change their settings without notifying the Core, and the Core does not manually update its copy of device settings after each image, for performance reasons.- Returns:
- Miscellaneous medatada provided by the microscope.
-
getUserData
PropertyMap getUserData()Arbitrary additional metadata added by third-party code.- Returns:
- arbitrary additional metadata added by third-party code
-
getROI
-
getCamera
-
getPositionName
Deprecated.UsegetPositionName(java.lang.String)insteadAny name attached to the stage position at which this image was acquired.- Returns:
- Name of the position at which this image was acquired
-
getPositionName
-
hasPositionName
boolean hasPositionName() -
getReceivedTime
String getReceivedTime()The time at which the Java layer of Micro-Manager receives the image from the Core, expressed as a date-time string. Depending on the parameters for your acquisition, there may be significant and/or variable delay between the time the image was actually acquired by the camera and the time in this field. It will always be at least a little behind.- Returns:
- Time at which this image was received by Micro-Manager
-
getUUID
UUID getUUID()A unique identifier for this specific image. Micro-Manager uses this field to determine if two images are truly different, so if you copy this Metadata instance to apply to a new image, you should make certain to set a new UUID for it (which you can conveniently do using MetadataBuilder.uuid() with no parameter).- Returns:
- Unique identifier
-
getFileName
String getFileName()The name of the file from which the image was loaded, if applicable.- Returns:
- filename.
-
Metadata.Builderinstead