001/** 002 * Copyright (C) 2014 Universidade de Aveiro, DETI/IEETA, Bioinformatics Group - http://bioinformatics.ua.pt/ 003 * 004 * This file is part of Dicoogle/dicoogle. 005 * 006 * Dicoogle/dicoogle is free software: you can redistribute it and/or modify 007 * it under the terms of the GNU General Public License as published by 008 * the Free Software Foundation, either version 3 of the License, or 009 * (at your option) any later version. 010 * 011 * Dicoogle/dicoogle is distributed in the hope that it will be useful, 012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 014 * GNU General Public License for more details. 015 * 016 * You should have received a copy of the GNU General Public License 017 * along with Dicoogle. If not, see <http://www.gnu.org/licenses/>. 018 */ 019 020package pt.ua.dicoogle.server.web.utils; 021 022import java.io.IOException; 023import java.io.InputStream; 024import java.net.URI; 025 026/** Interface for retrieving the image content of an instance, in a format compatible with browsers. 027 * 028 * @author Eduardo Pinho <eduardopinho@ua.pt> 029 */ 030public interface ImageRetriever { 031 032 /** Obtain an image by URI. 033 * 034 * @param uri the URI to the image 035 * @param frame the frame number 036 * @param thumbnail whether to retrieve a thumbnail (true) or the image in its original size (false) 037 * @return an input stream for retrieving the image's content 038 * @throws IOException 039 */ 040 public InputStream get(URI uri, int frame, boolean thumbnail) throws IOException; 041}