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);
}
Aggregations