root/trunk/components/common/src/ome/api/RawPixelsStore.java

Revision 3867, 3.1 KB (checked in by callan, 13 months ago)
  • Fixing server side "prepare" code (missing @Validate and HQL whitespace)
  • Performance of populateMinMax now much better.
  • Property svn:keywords set to
    Date
    Revision
    Id
    URL
Line 
1/*
2 *   ome.api.RawPixelsStore
3 *
4 *   Copyright 2006 University of Dundee. All rights reserved.
5 *   Use is subject to license terms supplied in LICENSE.txt
6 */
7
8package ome.api;
9
10import java.util.Set;
11
12import ome.annotations.Validate;
13
14/**
15 * Binary data provider. Initialized with the id of a
16 * {@link ome.model.core.Pixels} instance, this interface can provide various
17 * slices, stacks, regions of the 5-dimensional (X-Y planes with multiple
18 * Z-sections and Channels over Time). The byte array returned by the getter
19 * methods and passed to the setter methods can and will be interpreted
20 * according to results of {@link #getByteWidth()}, {@link #isFloat()}, and
21 * {@link #isSigned()}.
22 */
23public interface RawPixelsStore extends StatefulServiceInterface {
24
25    // State management.
26    /**
27     * Initializes the stateful service for a given Pixels set.
28     * @param pixelsId Pixels set identifier.
29     * @param bypassOriginalFile Whether or not to bypass checking for an
30     * original file to back the pixel buffer used by this service. If requests
31     * are predominantly <code>write-only</code> or involve the population of
32     * a brand new pixel buffer using <code>true</code> here is a safe
33     * optimization otherwise <code>false</code> is expected.
34     */
35    public void setPixelsId(long pixelsId, boolean bypassOriginalFile);
36   
37    /**
38     * Prepares the stateful service with a cache of loaded Pixels objects.
39     * This method is designed to combat query overhead, where many sets of
40     * Pixels are to be read from or written to, by loading all the Pixels
41     * sets at once. Multiple calls will result in the existing cache being
42     * overwritten.
43     * @param pixelsIds Pixels IDs to cache.
44     */
45    public void prepare(@Validate(Long.class) Set<Long> pixelsIds);
46
47    /**
48     * delegates to {@link ome.io.nio.PixelBuffer}
49     *
50     * @param pixelsId
51     * @return
52     * @see ome.io.nio.PixelBuffer#getPlaneSize()
53     */
54    public int getPlaneSize();
55
56    public int getRowSize();
57
58    public int getStackSize();
59
60    public int getTimepointSize();
61
62    public int getTotalSize();
63
64    public long getRowOffset(int y, int z, int c, int t);
65
66    public long getPlaneOffset(int z, int c, int t);
67
68    public long getStackOffset(int c, int t);
69
70    public long getTimepointOffset(int t);
71
72    public byte[] getRegion(int size, long offset);
73   
74    public byte[] getRow(int y, int z, int c, int t);
75   
76    public byte[] getCol(int x, int z, int c, int t);
77
78    public byte[] getPlaneRegion(int z, int c, int t, int count, int offset);
79
80    public byte[] getPlane(int z, int c, int t);
81
82    public byte[] getStack(int c, int t);
83
84    public byte[] getTimepoint(int t);
85
86    public void setRegion(int size, long offset, byte[] buffer);
87
88    public void setRow(byte[] buffer, int y, int z, int c, int t);
89
90    public void setPlane(byte[] buffer, int z, int c, int t);
91
92    public void setStack(byte[] buffer, int z, int c, int t);
93
94    public void setTimepoint(byte[] buffer, int t);
95
96    public int getByteWidth();
97
98    public boolean isSigned();
99
100    public boolean isFloat();
101
102    public byte[] calculateMessageDigest();
103
104}
Note: See TracBrowser for help on using the browser.

1.2.1-PRO © 2008-2009 agile42 all rights reserved (this page was served in: 0.41701 sec.)