/** * Populates the given {@link MetadataStore}, for the specified series, using * the provided values. * <p> * After calling this method, the metadata store will be sufficiently * populated for use with an {@link IFormatWriter} (assuming it is also a * {@link MetadataRetrieve}). * </p> */ public static void populateMetadata(MetadataStore store, int series, String imageName, boolean littleEndian, String dimensionOrder, String pixelType, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT, int samplesPerPixel) { populateMetadata(store, null, series, imageName, littleEndian, dimensionOrder, pixelType, sizeX, sizeY, sizeZ, sizeC, sizeT, samplesPerPixel); }
/** * Populates the given {@link MetadataStore}, for the specified series, using * the provided values. * <p> * After calling this method, the metadata store will be sufficiently * populated for use with an {@link IFormatWriter} (assuming it is also a * {@link MetadataRetrieve}). * </p> */ public static void populateMetadata(MetadataStore store, int series, String imageName, boolean littleEndian, String dimensionOrder, String pixelType, int sizeX, int sizeY, int sizeZ, int sizeC, int sizeT, int samplesPerPixel) { populateMetadata(store, null, series, imageName, littleEndian, dimensionOrder, pixelType, sizeX, sizeY, sizeZ, sizeC, sizeT, samplesPerPixel); }
@Override public void populateMetadata(final MetadataStore store, final String file, final int imageIndex, final String imageName, final boolean littleEndian, final String dimensionOrder, final String pixelType, final int sizeX, final int sizeY, final int sizeZ, final int sizeC, final int sizeT, final double calX, final double calY, final double calZ, final double calC, final double calT, final int samplesPerPixel) { MetadataTools.populateMetadata(store, imageIndex, imageName, littleEndian, dimensionOrder, pixelType, sizeX, sizeY, sizeZ, sizeC, sizeT, samplesPerPixel); populateCalibrations(store, imageIndex, calX, calY, calZ, calC, calT); }
/** * Populates the given {@link MetadataStore}, for the specified series, using * the values from the provided {@link CoreMetadata}. * <p> * After calling this method, the metadata store will be sufficiently * populated for use with an {@link IFormatWriter} (assuming it is also a * {@link MetadataRetrieve}). * </p> */ public static void populateMetadata(MetadataStore store, int series, String imageName, CoreMetadata coreMeta) { final String pixelType = FormatTools.getPixelTypeString(coreMeta.pixelType); final int effSizeC = coreMeta.imageCount / coreMeta.sizeZ / coreMeta.sizeT; final int samplesPerPixel = coreMeta.sizeC / effSizeC; populateMetadata(store, null, series, imageName, coreMeta.littleEndian, coreMeta.dimensionOrder, pixelType, coreMeta.sizeX, coreMeta.sizeY, coreMeta.sizeZ, coreMeta.sizeC, coreMeta.sizeT, samplesPerPixel); }
/** * Populates the given {@link MetadataStore}, for the specified series, using * the values from the provided {@link CoreMetadata}. * <p> * After calling this method, the metadata store will be sufficiently * populated for use with an {@link IFormatWriter} (assuming it is also a * {@link MetadataRetrieve}). * </p> */ public static void populateMetadata(MetadataStore store, int series, String imageName, CoreMetadata coreMeta) { final String pixelType = FormatTools.getPixelTypeString(coreMeta.pixelType); final int effSizeC = coreMeta.imageCount / coreMeta.sizeZ / coreMeta.sizeT; final int samplesPerPixel = coreMeta.sizeC / effSizeC; populateMetadata(store, null, series, imageName, coreMeta.littleEndian, coreMeta.dimensionOrder, pixelType, coreMeta.sizeX, coreMeta.sizeY, coreMeta.sizeZ, coreMeta.sizeC, coreMeta.sizeT, samplesPerPixel); }
serviceFactory.getInstance(OMEXMLService.class); final IMetadata meta = omexmlService.createOMEXMLMetadata(); MetadataTools.populateMetadata(meta, 0, name, info);
serviceFactory.getInstance(OMEXMLService.class); final IMetadata meta = omexmlService.createOMEXMLMetadata(); MetadataTools.populateMetadata(meta, 0, name, info);
private IMetadata createMetadata(String pixelType, int rgbChannels, int seriesCount, boolean littleEndian) throws Exception { IMetadata metadata; try { ServiceFactory factory = new ServiceFactory(); OMEXMLService service = factory.getInstance(OMEXMLService.class); metadata = service.createOMEXMLMetadata(); } catch (DependencyException exc) { throw new FormatException("Could not create OME-XML store.", exc); } catch (ServiceException exc) { throw new FormatException("Could not create OME-XML store.", exc); } for (int i=0; i<seriesCount; i++) { MetadataTools.populateMetadata(metadata, i, "image #" + i, littleEndian, "XYCZT", pixelType, WIDTH, HEIGHT, 1, rgbChannels, 1, rgbChannels); } return metadata; }
MetadataTools.populateMetadata(metadata, 0, "foo", false, "XYCZT", "uint8", 1, 1, 1, 1, 1, 1); IFormatWriter writer = new JPEG2000Writer();
public static IMetadata createMetadata(String pixelType, int rgbChannels, int seriesCount, boolean littleEndian, int sizeT) throws Exception { IMetadata metadata; try { ServiceFactory factory = new ServiceFactory(); OMEXMLService service = factory.getInstance(OMEXMLService.class); metadata = service.createOMEXMLMetadata(); } catch (DependencyException exc) { throw new FormatException("Could not create OME-XML store.", exc); } catch (ServiceException exc) { throw new FormatException("Could not create OME-XML store.", exc); } for (int i=0; i<seriesCount; i++) { MetadataTools.populateMetadata(metadata, i, "image #" + i, littleEndian, "XYCZT", pixelType, 160, 160, 1, rgbChannels, sizeT, rgbChannels); } return metadata; }
MetadataTools.populateMetadata(metadata8, 0, "foo", false, "XYCZT", "uint8", 1, 1, 1, 1, 1, 1); IFormatWriter writer8 = new JPEG2000Writer(); MetadataTools.populateMetadata(metadata16, 0, "foo", false, "XYCZT", "uint16", 1, 1, 1, 1, 1, 1); IFormatWriter writer16 = new JPEG2000Writer();
MetadataTools.populateMetadata(metadata16, 0, "foo", false, "XYCZT", "uint16", 1, 1, 1, 1, 1, 1); IFormatWriter writer16 = new JPEG2000Writer();
populateMetadata(store, r.getCurrentFile(), i, imageName, r.isLittleEndian(), r.getDimensionOrder(), pixelType, r.getSizeX(), r.getSizeY(), r.getSizeZ(), r.getSizeC(), r.getSizeT(),
populateMetadata(store, r.getCurrentFile(), i, imageName, r.isLittleEndian(), r.getDimensionOrder(), pixelType, r.getSizeX(), r.getSizeY(), r.getSizeZ(), r.getSizeC(), r.getSizeT(),