@RolesAllowed("user") @Transactional(readOnly = false) public void setChannelGlobalMinMax(long pixelsId, int channelIndex, double min, double max) { Pixels pixels = retrievePixDescription(pixelsId); Channel channel = pixels.getChannel(channelIndex); StatsInfo stats = channel.getStatsInfo(); if (stats == null) { stats = new StatsInfo(); channel.setStatsInfo(stats); } stats.setGlobalMax(max); stats.setGlobalMin(min); iUpdate.saveAndReturnObject(channel); }
@RolesAllowed("user") @Transactional(readOnly = false) public Long copyAndResizePixels(long pixelsId, Integer sizeX, Integer sizeY, Integer sizeZ, Integer sizeT, List<Integer> channelList, String methodology, boolean copyStats) { Pixels from = retrievePixDescription(pixelsId); Pixels to = _copyAndResizePixels(pixelsId, sizeX, sizeY, sizeZ, sizeT, channelList, methodology, copyStats); // Deal with Image linkage Image image = from.getImage(); image.addPixels(to); // Save and return our newly created Pixels Id image = iUpdate.saveAndReturnObject(image); return image.getPixels(image.sizeOfPixels() - 1).getId(); }
List<Integer> channelList, String methodology, boolean copyStats) Pixels from = retrievePixDescription(pixelsId); Pixels to = new Pixels();