001/*
002 * Copyright 2010-2015 Institut Pasteur.
003 * 
004 * This file is part of Icy.
005 * 
006 * Icy 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 * Icy 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 Icy. If not, see <http://www.gnu.org/licenses/>.
018 */
019package icy.sequence;
020
021import java.awt.image.BufferedImage;
022import java.util.EventListener;
023
024/**
025 * Sequence Model.<br>
026 * <br>
027 * Basic sequence model (5D image data structure).
028 * 
029 * @author Stephane
030 */
031public interface SequenceModel
032{
033    public static interface SequenceModelListener extends EventListener
034    {
035        /**
036         * Sequence model image changed.
037         */
038        public void imageChanged();
039
040        /**
041         * Sequence dimension image changed.
042         */
043        public void dimensionChanged();
044    }
045
046    /**
047     * Get dimension X size
048     */
049    public int getSizeX();
050
051    /**
052     * Get dimension Y size
053     */
054    public int getSizeY();
055
056    /**
057     * Get dimension Z size
058     */
059    public int getSizeZ();
060
061    /**
062     * Get dimension T size
063     */
064    public int getSizeT();
065
066    /**
067     * Get dimension C size
068     */
069    public int getSizeC();
070
071    /**
072     * Get image at position [T, Z]
073     */
074    public BufferedImage getImage(int t, int z);
075
076    /**
077     * Get image at position [T, Z, C]
078     */
079    public BufferedImage getImage(int t, int z, int c);
080
081    /**
082     * fire model image changed event
083     */
084    public void fireModelImageChangedEvent();
085
086    /**
087     * fire model dimension changed event
088     */
089    public void fireModelDimensionChangedEvent();
090
091    public void addSequenceModelListener(SequenceModelListener listener);
092
093    public void removeSequenceModelListener(SequenceModelListener listener);
094}