public class DefaultOMEMetadataService extends AbstractService implements OMEMetadataService
OMEMetadataService
.Constructor and Description |
---|
DefaultOMEMetadataService() |
Modifier and Type | Method and Description |
---|---|
String |
createLSID(String type,
int... indices)
Constructs an LSID, given the object type and indices.
|
AxisType[] |
findDimensionList(String dimensionOrder)
Converts the given String to a list of AxisTypes suitable for Metadata
construction.
|
String |
findDimensionOrder(ImageMetadata imageMeta)
Extracts a standard 5-D dimension order from an N-dimensional ImageMetadata
object.
|
String |
findDimensionOrder(Metadata meta,
int imageIndex)
Extracts a standard 5-D dimension order from an N-dimensional ImageMetadata
object.
|
ome.xml.model.enums.Binning |
getBinning(String value)
Retrieves an
Binning enumeration value for the
given String. |
ome.xml.model.enums.Correction |
getCorrection(String value)
Retrieves an
Correction enumeration value for
the given String. |
ome.xml.model.enums.DetectorType |
getDetectorType(String value)
Retrieves an
DetectorType enumeration value for
the given String. |
ome.xml.model.enums.ExperimentType |
getExperimentType(String value)
Retrieves an
ExperimentType enumeration value
for the given String. |
ome.xml.model.enums.Immersion |
getImmersion(String value)
Retrieves an
Immersion enumeration value for
the given String. |
ome.xml.model.enums.LaserMedium |
getLaserMedium(String value)
Retrieves an
LaserMedium enumeration value for
the given String. |
ome.xml.model.enums.LaserType |
getLaserType(String value)
Retrieves an
LaserType enumeration value for
the given String. |
String |
makeSaneDimensionOrder(String dimensionOrder)
Adjusts the given dimension order as needed so that it contains exactly one
of each of the following characters: 'X', 'Y', 'Z', 'C', 'T'.
|
void |
populateImageMetadata(MetadataRetrieve retrieve,
int imageIndex,
ImageMetadata iMeta)
Populates the provided ImageMetadata object using the specified image index
into the MetadataRetrieve.
|
void |
populateMetadata(MetadataRetrieve retrieve,
Metadata meta)
Uses the provided MetadataRetrieve to populate the format-agnostic image
information in the provided Metadata object (that is, the ImageMetadata).
|
void |
populateMetadata(MetadataStore store,
int imageIndex,
String imageName,
boolean littleEndian,
String dimensionOrder,
String pixelType,
int sizeX,
int sizeY,
int sizeZ,
int sizeC,
int sizeT,
double calX,
double calY,
double calZ,
double calC,
double calT,
int samplesPerPixel)
Populates the given
MetadataStore , for the specified imageIndex,
using the provided values. |
void |
populateMetadata(MetadataStore store,
int imageIndex,
String imageName,
ImageMetadata iMeta)
Populates the given
MetadataStore , for the specified imageIndex,
using the values from the provided ImageMetadata . |
void |
populateMetadata(MetadataStore store,
int imageIndex,
String imageName,
Metadata meta)
Populates the given
MetadataStore , for the specified imageIndex,
using the values from the provided Metadata . |
void |
populateMetadata(MetadataStore store,
String file,
int imageIndex,
String imageName,
boolean littleEndian,
String dimensionOrder,
String pixelType,
int sizeX,
int sizeY,
int sizeZ,
int sizeC,
int sizeT,
double calX,
double calY,
double calZ,
double calC,
double calT,
int samplesPerPixel)
Populates the given
MetadataStore , for the specified imageIndex,
using the provided values. |
void |
populatePixels(MetadataStore store,
List<ImageMetadata> imageMeta,
boolean doPlane,
String imageName)
Populates the 'pixels' element of the given metadata store, using the
provided
ImageMetadata . |
void |
populatePixels(MetadataStore store,
Metadata meta)
Populates the 'pixels' element of the given metadata store, using core
metadata from the given reader.
|
void |
populatePixels(MetadataStore store,
Metadata meta,
boolean doPlane)
Populates the 'pixels' element of the given metadata store, using core
metadata from the given reader.
|
void |
populatePixels(MetadataStore store,
Metadata meta,
boolean doPlane,
boolean doImageName)
Populates the 'pixels' element of the given metadata store, using core
metadata from the given metadata.
|
void |
populatePixelsOnly(MetadataStore store,
int imageIndex,
boolean littleEndian,
String dimensionOrder,
String pixelType,
int sizeX,
int sizeY,
int sizeZ,
int sizeC,
int sizeT,
double calX,
double calY,
double calZ,
double calC,
double calT,
int samplesPerPixel) |
void |
populatePixelsOnly(MetadataStore store,
Reader r) |
void |
setDefaultCreationDate(MetadataStore store,
String id,
int imageIndex)
Sets a default creation date.
|
void |
setDefaultDateEnabled(boolean enabled)
Disables the setting of a default creation date.
|
void |
verifyMinimumPopulated(MetadataRetrieve src) |
void |
verifyMinimumPopulated(MetadataRetrieve src,
int n) |
long[] |
zctToArray(String order,
int z,
int c,
int t)
Given a String dimension order, places the given z, c and t indices in the
correct relative positions in a long array, which is returned.
|
getContext, setContext, toString
getInfo, getPriority, setInfo, setPriority
context
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
initialize, registerEventHandlers
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
dispose
public void populatePixels(MetadataStore store, Metadata meta)
OMEMetadataService
populatePixels
in interface OMEMetadataService
public void populatePixels(MetadataStore store, Metadata meta, boolean doPlane)
OMEMetadataService
populatePixels
in interface OMEMetadataService
public void populatePixels(MetadataStore store, Metadata meta, boolean doPlane, boolean doImageName)
OMEMetadataService
populatePixels
in interface OMEMetadataService
public void populatePixels(MetadataStore store, List<ImageMetadata> imageMeta, boolean doPlane, String imageName)
OMEMetadataService
ImageMetadata
. If the 'doPlane' flag is set, then the
'plane' elements will be populated as well. If the 'imageName' field is
non-null, then the image name will be populated as well.populatePixels
in interface OMEMetadataService
public void populateMetadata(MetadataStore store, int imageIndex, String imageName, boolean littleEndian, String dimensionOrder, String pixelType, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT, double calX, double calY, double calZ, double calC, double calT, int samplesPerPixel)
OMEMetadataService
MetadataStore
, for the specified imageIndex,
using the provided values.
After calling this method, the metadata store will be sufficiently
populated for use with an IFormatWriter
(assuming it is also a
MetadataRetrieve
).
populateMetadata
in interface OMEMetadataService
public void populateMetadata(MetadataStore store, int imageIndex, String imageName, Metadata meta)
OMEMetadataService
MetadataStore
, for the specified imageIndex,
using the values from the provided Metadata
.
After calling this method, the metadata store will be sufficiently
populated for use with an IFormatWriter
(assuming it is also a
MetadataRetrieve
).
populateMetadata
in interface OMEMetadataService
public void populateMetadata(MetadataStore store, int imageIndex, String imageName, ImageMetadata iMeta)
OMEMetadataService
MetadataStore
, for the specified imageIndex,
using the values from the provided ImageMetadata
.
After calling this method, the metadata store will be sufficiently
populated for use with an IFormatWriter
(assuming it is also a
MetadataRetrieve
).
populateMetadata
in interface OMEMetadataService
public void populateMetadata(MetadataStore store, String file, int imageIndex, String imageName, boolean littleEndian, String dimensionOrder, String pixelType, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT, double calX, double calY, double calZ, double calC, double calT, int samplesPerPixel)
OMEMetadataService
MetadataStore
, for the specified imageIndex,
using the provided values.
After calling this method, the metadata store will be sufficiently
populated for use with an IFormatWriter
(assuming it is also a
MetadataRetrieve
).
populateMetadata
in interface OMEMetadataService
public void populatePixelsOnly(MetadataStore store, Reader r)
populatePixelsOnly
in interface OMEMetadataService
public void populatePixelsOnly(MetadataStore store, int imageIndex, boolean littleEndian, String dimensionOrder, String pixelType, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT, double calX, double calY, double calZ, double calC, double calT, int samplesPerPixel)
populatePixelsOnly
in interface OMEMetadataService
public void setDefaultDateEnabled(boolean enabled)
OMEMetadataService
setDefaultDateEnabled
in interface OMEMetadataService
enabled
- See above.OMEMetadataService.setDefaultCreationDate(MetadataStore, String, int)
public void setDefaultCreationDate(MetadataStore store, String id, int imageIndex)
OMEMetadataService
setDefaultCreationDate
in interface OMEMetadataService
OMEMetadataService.setDefaultDateEnabled(boolean)
public void verifyMinimumPopulated(MetadataRetrieve src) throws FormatException
verifyMinimumPopulated
in interface OMEMetadataService
FormatException
- if there is a missing metadata field, or the
metadata object is uninitializedpublic void verifyMinimumPopulated(MetadataRetrieve src, int n) throws FormatException
verifyMinimumPopulated
in interface OMEMetadataService
FormatException
- if there is a missing metadata field, or the
metadata object is uninitializedpublic String findDimensionOrder(Metadata meta, int imageIndex)
OMEMetadataService
findDimensionOrder
in interface OMEMetadataService
public String findDimensionOrder(ImageMetadata imageMeta)
OMEMetadataService
findDimensionOrder
in interface OMEMetadataService
public AxisType[] findDimensionList(String dimensionOrder)
OMEMetadataService
findDimensionList
in interface OMEMetadataService
public long[] zctToArray(String order, int z, int c, int t)
OMEMetadataService
zctToArray
in interface OMEMetadataService
public String makeSaneDimensionOrder(String dimensionOrder)
OMEMetadataService
makeSaneDimensionOrder
in interface OMEMetadataService
public String createLSID(String type, int... indices)
OMEMetadataService
createLSID
in interface OMEMetadataService
public ome.xml.model.enums.ExperimentType getExperimentType(String value) throws FormatException
OMEMetadataService
ExperimentType
enumeration value
for the given String.getExperimentType
in interface OMEMetadataService
FormatException
- if an appropriate enumeration value is not found.public ome.xml.model.enums.LaserType getLaserType(String value) throws FormatException
OMEMetadataService
LaserType
enumeration value for
the given String.getLaserType
in interface OMEMetadataService
FormatException
- if an appropriate enumeration value is not found.public ome.xml.model.enums.LaserMedium getLaserMedium(String value) throws FormatException
OMEMetadataService
LaserMedium
enumeration value for
the given String.getLaserMedium
in interface OMEMetadataService
FormatException
- if an appropriate enumeration value is not found.public ome.xml.model.enums.Immersion getImmersion(String value) throws FormatException
OMEMetadataService
Immersion
enumeration value for
the given String.getImmersion
in interface OMEMetadataService
FormatException
- if an appropriate enumeration value is not found.public ome.xml.model.enums.Correction getCorrection(String value) throws FormatException
OMEMetadataService
Correction
enumeration value for
the given String.getCorrection
in interface OMEMetadataService
FormatException
- if an appropriate enumeration value is not found.public ome.xml.model.enums.DetectorType getDetectorType(String value) throws FormatException
OMEMetadataService
DetectorType
enumeration value for
the given String.getDetectorType
in interface OMEMetadataService
FormatException
- if an appropriate enumeration value is not found.public ome.xml.model.enums.Binning getBinning(String value) throws FormatException
OMEMetadataService
Binning
enumeration value for the
given String.getBinning
in interface OMEMetadataService
FormatException
- if an appropriate enumeration value is not found.public void populateMetadata(MetadataRetrieve retrieve, Metadata meta)
OMEMetadataService
populateMetadata
in interface OMEMetadataService
public void populateImageMetadata(MetadataRetrieve retrieve, int imageIndex, ImageMetadata iMeta)
OMEMetadataService
populateImageMetadata
in interface OMEMetadataService
Copyright © 2015–2022 SCIFIO. All rights reserved.