Search in sources :

Example 1 with IObject

use of omero.model.IObject in project imagej-omero by imagej.

the class DefaultOMEROSession method getPixelsType.

private PixelsType getPixelsType(final String pixelType) throws ServerError, FormatException {
    final List<IObject> list = session.getPixelsService().getAllEnumerations(PixelsType.class.getName());
    final Iterator<IObject> iter = list.iterator();
    while (iter.hasNext()) {
        final PixelsType type = (PixelsType) iter.next();
        final String value = type.getValue().getValue();
        if (value.equals(pixelType))
            return type;
    }
    throw new FormatException("Invalid pixel type: " + pixelType);
}
Also used : IObject(omero.model.IObject) PixelsType(omero.model.PixelsType) FormatException(io.scif.FormatException)

Aggregations

FormatException (io.scif.FormatException)1 IObject (omero.model.IObject)1 PixelsType (omero.model.PixelsType)1