loci.formats
Class AggregateMetadataStore

java.lang.Object
  extended by loci.formats.AggregateMetadataStore
All Implemented Interfaces:
MetadataStore

public class AggregateMetadataStore
extends Object
implements MetadataStore

A metadata store which delegates the actual storage to one or more sub metadata stores.

Source code:
Trac, SVN

Author:
Chris Allan callan at blackcat.ca

Constructor Summary
AggregateMetadataStore(List delegates)
          Creates a new instance.
 
Method Summary
 void addDelegate(MetadataStore delegate)
          Adds a delegate to the metadata store.
 void createRoot()
          Creates a new root object to be used by the metadata store and resets the internal state of the metadata store.
 List getDelegates()
          Retrieves the current list of metadata store delegates.
 Object getRoot()
          Unsupported with an AggregateMetadataStore.
 void removeDelegate(MetadataStore delegate)
          Removes a delegate from the metadata store.
 void setArc(String type, Float power, Integer lightNdx, Integer arcNdx)
          Sets an arc for a particular instrument.
 void setChannelGlobalMinMax(int channel, Double globalMin, Double globalMax, Integer i)
          Sets a channel's global min and global max in the metadata store for a particular pixels set.
 void setDefaultDisplaySettings(Integer i)
          Instructs the metadata store to set the default display settings for a particular pixels set.
 void setDetector(String manufacturer, String model, String serialNumber, String type, Float gain, Float voltage, Float offset, Integer instrumentNdx, Integer detectorNdx)
          Sets a detector for a particular instrument.
 void setDichroic(String manufacturer, String model, String lotNumber, Integer dichroicNdx)
          Sets a dichroic for a particular instrument.
 void setDimensions(Float pixelSizeX, Float pixelSizeY, Float pixelSizeZ, Float pixelSizeC, Float pixelSizeT, Integer i)
          Creates a set of pixel dimensions in the metadata store with a particular index.
 void setDisplayChannel(Integer channelNumber, Double blackLevel, Double whiteLevel, Float gamma, Integer i)
          Sets information about the specified channel for a particular image.
 void setDisplayOptions(Float zoom, Boolean redChannelOn, Boolean greenChannelOn, Boolean blueChannelOn, Boolean displayRGB, String colorMap, Integer zstart, Integer zstop, Integer tstart, Integer tstop, Integer imageNdx, Integer pixelNdx, Integer redChannel, Integer greenChannel, Integer blueChannel, Integer grayChannel)
          Sets various display options for a particular pixels set.
 void setDisplayROI(Integer x0, Integer y0, Integer z0, Integer x1, Integer y1, Integer z1, Integer t0, Integer t1, Object displayOptions, Integer i)
          Creates a 5D bounding box region of interest and a set of display options in the metadata store with a particular index.
 void setEmissionFilter(String manufacturer, String model, String lotNumber, String type, Integer filterNdx)
          Sets an emission filter for a particular instrument.
 void setExcitationFilter(String manufacturer, String model, String lotNumber, String type, Integer filterNdx)
          Sets an excitation filter for a particular instrument.
 void setExperimenter(String firstName, String lastName, String email, String institution, String dataDirectory, Object group, Integer i)
          Creates an experimenter in the metadata store with a particular index.
 void setFilament(String type, Float power, Integer lightNdx, Integer filamentNdx)
          Sets a filament for a particular instrument.
 void setFilterSet(String manufacturer, String model, String lotNumber, Integer filterSetNdx, Integer filterNdx)
          Sets a filter set for a particular instrument.
 void setGroup(String name, Object leader, Object contact, Integer i)
          Creates a group in the metadata store with a particular index.
 void setImage(String name, String creationDate, String description, Integer i)
          Creates an image in the metadata store with a particular index.
 void setImagingEnvironment(Float temperature, Float airPressure, Float humidity, Float co2Percent, Integer i)
          Sets the imaging environment for a particular image.
 void setInstrument(String manufacturer, String model, String serialNumber, String type, Integer i)
          Creates an instrument in the metadata store with a particular index.
 void setLaser(String type, String medium, Integer wavelength, Boolean frequencyDoubled, Boolean tunable, String pulse, Float power, Integer instrumentNdx, Integer lightNdx, Integer pumpNdx, Integer laserNdx)
          Sets a laser for a particular instrument.
 void setLightSource(String manufacturer, String model, String serialNumber, Integer instrumentNdx, Integer lightNdx)
          Sets a light source for a particular instrument.
 void setLogicalChannel(int channelIdx, String name, Integer samplesPerPixel, Integer filter, Integer lightSource, Float lightAttenuation, Integer lightWavelength, Integer otf, Integer detector, Float detectorOffset, Float detectorGain, String illuminationType, Integer pinholeSize, String photometricInterpretation, String mode, String contrastMethod, Integer auxLightSource, Float auxLightAttenuation, String auxTechnique, Integer auxLightWavelength, Integer emWave, Integer exWave, String fluor, Float ndFilter, Integer i)
          Creates a logical channel and physical channel in the metadata store for a particular pixels.
 void setObjective(String manufacturer, String model, String serialNumber, Float lensNA, Float magnification, Integer instrumentNdx, Integer objectiveNdx)
          Sets an objective for a particular instrument.
 void setOTF(Integer sizeX, Integer sizeY, String pixelType, String path, Boolean opticalAxisAverage, Integer instrumentNdx, Integer otfNdx, Integer filterNdx, Integer objectiveNdx)
          Sets an OTF for a particular instrument.
 void setPixels(Integer sizeX, Integer sizeY, Integer sizeZ, Integer sizeC, Integer sizeT, Integer pixelType, Boolean bigEndian, String dimensionOrder, Integer imageNo, Integer pixelsNo)
          Creates a pixels set in the metadata store with a particular image and pixels index.
 void setPlaneInfo(int theZ, int theC, int theT, Float timestamp, Float exposureTime, Integer i)
          Sets the plane information for a particular X-Y plane (section) within a particular pixels set.
 void setRoot(Object root)
          Unsupported with an AggregateMetadataStore.
 void setStageLabel(String name, Float x, Float y, Float z, Integer i)
          Creates a stage label in the metadata store with a particular index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AggregateMetadataStore

public AggregateMetadataStore(List delegates)
Creates a new instance.

Parameters:
delegates - of type MetadataStore.
Method Detail

addDelegate

public void addDelegate(MetadataStore delegate)
Adds a delegate to the metadata store.

Parameters:
delegate - a MetadataStore

removeDelegate

public void removeDelegate(MetadataStore delegate)
Removes a delegate from the metadata store.

Parameters:
delegate - a MetadataStore

getDelegates

public List getDelegates()
Retrieves the current list of metadata store delegates.

Returns:
list of MetadataStore delegates.

createRoot

public void createRoot()
Description copied from interface: MetadataStore
Creates a new root object to be used by the metadata store and resets the internal state of the metadata store.

Specified by:
createRoot in interface MetadataStore

getRoot

public Object getRoot()
Unsupported with an AggregateMetadataStore. Throws a RuntimeException up to the caller.

Specified by:
getRoot in interface MetadataStore
Returns:
object that the store is using as its root.

setRoot

public void setRoot(Object root)
Unsupported with an AggregateMetadataStore. Throws a RuntimeException up to the caller.

Specified by:
setRoot in interface MetadataStore
Parameters:
root - object that the store can use as its root.

setChannelGlobalMinMax

public void setChannelGlobalMinMax(int channel,
                                   Double globalMin,
                                   Double globalMax,
                                   Integer i)
Description copied from interface: MetadataStore
Sets a channel's global min and global max in the metadata store for a particular pixels set. NOTE: The implementation of this method is optional and can be purely a no-op. It is here to ensure compatability with certain stores which require this data to be specified explicitly.

Specified by:
setChannelGlobalMinMax in interface MetadataStore
Parameters:
channel - the index of the channel within the pixels set.
globalMin - the global minimum pixel value for the channel.
globalMax - the global maximum pixel value for the channel.
i - the index of the pixels set within the metadata store.

setDefaultDisplaySettings

public void setDefaultDisplaySettings(Integer i)
Description copied from interface: MetadataStore
Instructs the metadata store to set the default display settings for a particular pixels set.

Specified by:
setDefaultDisplaySettings in interface MetadataStore
Parameters:
i - the index of the pixels set within the metadata store.

setDimensions

public void setDimensions(Float pixelSizeX,
                          Float pixelSizeY,
                          Float pixelSizeZ,
                          Float pixelSizeC,
                          Float pixelSizeT,
                          Integer i)
Description copied from interface: MetadataStore
Creates a set of pixel dimensions in the metadata store with a particular index. Unless both values are non-null, the MetadataStore should assume pixelSizeX equals pixelSizeY (i.e., should populate the null field with the other field's value).

Specified by:
setDimensions in interface MetadataStore
Parameters:
pixelSizeX - size of an individual pixel's X axis in microns.
pixelSizeY - size of an individual pixel's Y axis in microns.
pixelSizeZ - size of an individual pixel's Z axis in microns.
pixelSizeC - FIXME: Unknown
pixelSizeT - FIXME: Unknown
i - the index to use in the store. If null the default index of 0 will be used.

setDisplayROI

public void setDisplayROI(Integer x0,
                          Integer y0,
                          Integer z0,
                          Integer x1,
                          Integer y1,
                          Integer z1,
                          Integer t0,
                          Integer t1,
                          Object displayOptions,
                          Integer i)
Description copied from interface: MetadataStore
Creates a 5D bounding box region of interest and a set of display options in the metadata store with a particular index.

Specified by:
setDisplayROI in interface MetadataStore
Parameters:
x0 - the starting X coordinate.
y0 - the starting Y coordinate.
z0 - the starting Z coordinate.
x1 - the ending X coordinate.
y1 - the ending Y coordinate.
z1 - the ending Z coordinate.
t0 - the starting timepoint.
t1 - the ending timepoint.
displayOptions - the display options to attach to this region of interest.
i - the index to use in the store. If null the default index of 0 will be used.

setExperimenter

public void setExperimenter(String firstName,
                            String lastName,
                            String email,
                            String institution,
                            String dataDirectory,
                            Object group,
                            Integer i)
Description copied from interface: MetadataStore
Creates an experimenter in the metadata store with a particular index.

Specified by:
setExperimenter in interface MetadataStore
Parameters:
firstName - the first name of the experimenter
lastName - the last name of the experimenter
email - the e-mail address of the experimenter
institution - the institution for which the experimenter belongs
dataDirectory - the fully qualified path to the experimenter's data
group - the group to which the experimenter belongs
i - the index to use in the store. If null the default index of 0 will be used.

setGroup

public void setGroup(String name,
                     Object leader,
                     Object contact,
                     Integer i)
Description copied from interface: MetadataStore
Creates a group in the metadata store with a particular index.

Specified by:
setGroup in interface MetadataStore
Parameters:
name - the name of the group.
leader - the leader of the group.
contact - the contact for the group.
i - the index to use in the store. If null the default index of 0 will be used.

setImage

public void setImage(String name,
                     String creationDate,
                     String description,
                     Integer i)
Description copied from interface: MetadataStore
Creates an image in the metadata store with a particular index.

Specified by:
setImage in interface MetadataStore
Parameters:
name - the full name of the image.
creationDate - the creation date of the image.
description - the full description of the image.
i - the index to use in the store. If null the default index of 0 will be used.

setInstrument

public void setInstrument(String manufacturer,
                          String model,
                          String serialNumber,
                          String type,
                          Integer i)
Description copied from interface: MetadataStore
Creates an instrument in the metadata store with a particular index.

Specified by:
setInstrument in interface MetadataStore
Parameters:
manufacturer - the name of the manufacturer.
model - the model number of the instrument.
serialNumber - the serial number of the instrument.
type - the type of the instrument.
i - the index to use in the store. If null the default index of 0 will be used.

setLogicalChannel

public void setLogicalChannel(int channelIdx,
                              String name,
                              Integer samplesPerPixel,
                              Integer filter,
                              Integer lightSource,
                              Float lightAttenuation,
                              Integer lightWavelength,
                              Integer otf,
                              Integer detector,
                              Float detectorOffset,
                              Float detectorGain,
                              String illuminationType,
                              Integer pinholeSize,
                              String photometricInterpretation,
                              String mode,
                              String contrastMethod,
                              Integer auxLightSource,
                              Float auxLightAttenuation,
                              String auxTechnique,
                              Integer auxLightWavelength,
                              Integer emWave,
                              Integer exWave,
                              String fluor,
                              Float ndFilter,
                              Integer i)
Description copied from interface: MetadataStore
Creates a logical channel and physical channel in the metadata store for a particular pixels.

Specified by:
setLogicalChannel in interface MetadataStore
Parameters:
channelIdx - the index of the channel within the pixels set.
name - the logical channel's name.
filter - index of the filter associated with this channel.
lightSource - index of the primary light source.
lightAttenuation - the primary light source attenuation.
lightWavelength - the primary light source wavelength.
otf - the index of the OTF associated with this channel.
detector - the index of the detector associated with this channel.
detectorOffset - the detector offset.
detectorGain - the detector gain.
illuminationType - the illumination type.
pinholeSize - the size of the pinhole.
photometricInterpretation - the photometric interpretation type.
mode - the acquisition mode.
contrastMethod - the constrast method name.
auxLightSource - index of the auxiliary light source.
auxLightAttenuation - the auxiliary light source attenuation.
auxTechnique - the auxiliary technique type.
auxLightWavelength - the auxiliary light source wavelength.
emWave - the emission wavelength.
exWave - the excitation wavelength.
fluor - the fluorescence type.
ndFilter - the neutral-density filter value.
i - the index of the pixels set within the metadata store.

setPixels

public void setPixels(Integer sizeX,
                      Integer sizeY,
                      Integer sizeZ,
                      Integer sizeC,
                      Integer sizeT,
                      Integer pixelType,
                      Boolean bigEndian,
                      String dimensionOrder,
                      Integer imageNo,
                      Integer pixelsNo)
Description copied from interface: MetadataStore
Creates a pixels set in the metadata store with a particular image and pixels index.

Specified by:
setPixels in interface MetadataStore
Parameters:
sizeX - size of an individual plane or section's X axis (width)
sizeY - size of an individual plane of section's Y axis (height)
sizeZ - number of optical sections per channel, per timepoint (per stack)
sizeC - number of channels per timepoint.
sizeT - number of timepoints.
pixelType - the pixel type. One of the enumerated static values present in FormatReader.
bigEndian - if the pixels set is big endian or not.
dimensionOrder - the dimension order of the pixels set.
imageNo - the image index to use in the store. If null the default index of 0 will be used.
pixelsNo - the pixels index to use in the store. If null the default index of 0 will be used.

setPlaneInfo

public void setPlaneInfo(int theZ,
                         int theC,
                         int theT,
                         Float timestamp,
                         Float exposureTime,
                         Integer i)
Description copied from interface: MetadataStore
Sets the plane information for a particular X-Y plane (section) within a particular pixels set. NOTE: The implementation of this method is optional as this is a transitional type. More information about the PlaneInfo type can be found here.

Specified by:
setPlaneInfo in interface MetadataStore
Parameters:
theZ - the optical section index.
theC - the channel index.
theT - the timepoint.
timestamp - the time of acquisition in seconds of the plane (section) with zero being the start of acquistion.
exposureTime - exposure time in seconds.
i - the index of the pixels set within the metadata store.

setStageLabel

public void setStageLabel(String name,
                          Float x,
                          Float y,
                          Float z,
                          Integer i)
Description copied from interface: MetadataStore
Creates a stage label in the metadata store with a particular index.

Specified by:
setStageLabel in interface MetadataStore
Parameters:
name - a name for the stage label.
x - coordinate of the stage.
y - coordinate of the stage.
z - coordinate of the stage.
i - the index to use in the store. If null the default index of 0 will be used.

setImagingEnvironment

public void setImagingEnvironment(Float temperature,
                                  Float airPressure,
                                  Float humidity,
                                  Float co2Percent,
                                  Integer i)
Description copied from interface: MetadataStore
Sets the imaging environment for a particular image.

Specified by:
setImagingEnvironment in interface MetadataStore

setDisplayChannel

public void setDisplayChannel(Integer channelNumber,
                              Double blackLevel,
                              Double whiteLevel,
                              Float gamma,
                              Integer i)
Description copied from interface: MetadataStore
Sets information about the specified channel for a particular image.

Specified by:
setDisplayChannel in interface MetadataStore

setDisplayOptions

public void setDisplayOptions(Float zoom,
                              Boolean redChannelOn,
                              Boolean greenChannelOn,
                              Boolean blueChannelOn,
                              Boolean displayRGB,
                              String colorMap,
                              Integer zstart,
                              Integer zstop,
                              Integer tstart,
                              Integer tstop,
                              Integer imageNdx,
                              Integer pixelNdx,
                              Integer redChannel,
                              Integer greenChannel,
                              Integer blueChannel,
                              Integer grayChannel)
Description copied from interface: MetadataStore
Sets various display options for a particular pixels set.

Specified by:
setDisplayOptions in interface MetadataStore

setLightSource

public void setLightSource(String manufacturer,
                           String model,
                           String serialNumber,
                           Integer instrumentNdx,
                           Integer lightNdx)
Description copied from interface: MetadataStore
Sets a light source for a particular instrument.

Specified by:
setLightSource in interface MetadataStore

setLaser

public void setLaser(String type,
                     String medium,
                     Integer wavelength,
                     Boolean frequencyDoubled,
                     Boolean tunable,
                     String pulse,
                     Float power,
                     Integer instrumentNdx,
                     Integer lightNdx,
                     Integer pumpNdx,
                     Integer laserNdx)
Description copied from interface: MetadataStore
Sets a laser for a particular instrument.

Specified by:
setLaser in interface MetadataStore

setFilament

public void setFilament(String type,
                        Float power,
                        Integer lightNdx,
                        Integer filamentNdx)
Description copied from interface: MetadataStore
Sets a filament for a particular instrument.

Specified by:
setFilament in interface MetadataStore

setArc

public void setArc(String type,
                   Float power,
                   Integer lightNdx,
                   Integer arcNdx)
Description copied from interface: MetadataStore
Sets an arc for a particular instrument.

Specified by:
setArc in interface MetadataStore

setDetector

public void setDetector(String manufacturer,
                        String model,
                        String serialNumber,
                        String type,
                        Float gain,
                        Float voltage,
                        Float offset,
                        Integer instrumentNdx,
                        Integer detectorNdx)
Description copied from interface: MetadataStore
Sets a detector for a particular instrument.

Specified by:
setDetector in interface MetadataStore

setObjective

public void setObjective(String manufacturer,
                         String model,
                         String serialNumber,
                         Float lensNA,
                         Float magnification,
                         Integer instrumentNdx,
                         Integer objectiveNdx)
Description copied from interface: MetadataStore
Sets an objective for a particular instrument.

Specified by:
setObjective in interface MetadataStore

setExcitationFilter

public void setExcitationFilter(String manufacturer,
                                String model,
                                String lotNumber,
                                String type,
                                Integer filterNdx)
Description copied from interface: MetadataStore
Sets an excitation filter for a particular instrument.

Specified by:
setExcitationFilter in interface MetadataStore

setDichroic

public void setDichroic(String manufacturer,
                        String model,
                        String lotNumber,
                        Integer dichroicNdx)
Description copied from interface: MetadataStore
Sets a dichroic for a particular instrument.

Specified by:
setDichroic in interface MetadataStore

setEmissionFilter

public void setEmissionFilter(String manufacturer,
                              String model,
                              String lotNumber,
                              String type,
                              Integer filterNdx)
Description copied from interface: MetadataStore
Sets an emission filter for a particular instrument.

Specified by:
setEmissionFilter in interface MetadataStore

setFilterSet

public void setFilterSet(String manufacturer,
                         String model,
                         String lotNumber,
                         Integer filterSetNdx,
                         Integer filterNdx)
Description copied from interface: MetadataStore
Sets a filter set for a particular instrument.

Specified by:
setFilterSet in interface MetadataStore

setOTF

public void setOTF(Integer sizeX,
                   Integer sizeY,
                   String pixelType,
                   String path,
                   Boolean opticalAxisAverage,
                   Integer instrumentNdx,
                   Integer otfNdx,
                   Integer filterNdx,
                   Integer objectiveNdx)
Description copied from interface: MetadataStore
Sets an OTF for a particular instrument.

Specified by:
setOTF in interface MetadataStore