• Views
  • Iteration Report
  • My Iteration Report
  •  
OMERO.server
  • Login
  • Help/Guide
  • About Trac
  • Preferences
  • Wiki
  • Timeline
  • Roadmap
  • Browse Source
  • View Tickets
  • Search

Context Navigation

  • ← Previous Changeset
  • Next Changeset →

Changeset 2588

Show
Ignore:
Timestamp:
07/03/08 09:20:35 (5 months ago)
Author:
callan
Message:

Initial projection and in memory pixel buffer support (#11):

  • MappedByteBuffer? --> ByteBuffer? throughout
  • PixelData? is now read-write
  • Eclipse .classpath fixes for common, server, rendering and client
  • Removal of public ICompress interface
  • IProjection added, naively assumes all projections are maximum intensity
  • renderAsPackedInt() can now take an arbitrary pixel buffer for rendering
  • RenderingEngine now performs projections and renders the resulting plane for display
  • Various unused imports removed
  • Some Javadoc cleanups
  • Missing Blitz mappings will be added with interface cleanups
Location:
trunk/components
Files:
5 added
1 removed
30 modified

  • client/.classpath (modified) (4 diffs)
  • common/.classpath (modified) (2 diffs)
  • common/src/ome/api/ICompress.java (deleted)
  • common/src/ome/api/IProjection.java (added)
  • common/src/omeis/providers/re/RenderingEngine.java (modified) (3 diffs)
  • rendering/.classpath (modified) (2 diffs)
  • rendering/src/omeis/providers/re/HSBStrategy.java (modified) (2 diffs)
  • rendering/src/omeis/providers/re/Renderer.java (modified) (4 diffs)
  • rendering/src/omeis/providers/re/RenderingStrategy.java (modified) (1 diff)
  • romio/.classpath (modified) (2 diffs)
  • romio/src/ome/io/nio/DeltaVision.java (modified) (8 diffs)
  • romio/src/ome/io/nio/DeltaVisionHeader.java (modified) (3 diffs)
  • romio/src/ome/io/nio/InMemoryPlanarPixelBuffer.java (added)
  • romio/src/ome/io/nio/PixelData.java (modified) (5 diffs)
  • romio/src/ome/io/nio/ReorderedPixelData.java (modified) (3 diffs)
  • romio/src/ome/io/nio/RomioPixelBuffer.java (modified) (8 diffs)
  • romio/test/ome/io/nio/utests/DeltaVisionTest.java (modified) (2 diffs)
  • romio/test/ome/io/nio/utests/deltavision/BasicIOUnitTest.java (modified) (3 diffs)
  • romio/test/ome/io/nio/utests/deltavision/DeltaVisionWZTUnitTest.java (modified) (5 diffs)
  • romio/test/ome/io/nio/utests/deltavision/DeltaVisionZTWUnitTest.java (modified) (5 diffs)
  • romio/test/ome/io/nio/utests/deltavision/DeltaVisionZWTUnitTest.java (modified) (5 diffs)
  • romio/test/ome/io/nio/utests/deltavision/EightBitBasicIOUnitTest.java (modified) (3 diffs)
  • romio/test/ome/io/nio/utests/deltavision/UnsignedSixteenBitBasicIOUnitTest.java (modified) (3 diffs)
  • server/.classpath (modified) (2 diffs)
  • server/resources/ome/services/service-ome.api.IProjection.xml (added)
  • server/resources/ome/services/service-omeis.providers.re.RenderingEngine.xml (modified) (1 diff)
  • server/src/ome/api/local/LocalCompress.java (modified) (1 diff)
  • server/src/ome/logic/AWTScaleService.java (modified) (2 diffs)
  • server/src/ome/logic/CompressImpl.java (modified) (1 diff)
  • server/src/ome/logic/PixelsImpl.java (modified) (1 diff)
  • server/src/ome/logic/RenderingSettingsImpl.java (modified) (4 diffs)
  • server/src/ome/services/RawPixelsBean.java (modified) (2 diffs)
  • server/src/ome/services/RenderingBean.java (modified) (11 diffs)
  • server/src/ome/services/ThumbnailBean.java (modified) (1 diff)
  • server/src/ome/services/projection (added)
  • server/src/ome/services/projection/ProjectionBean.java (added)

Legend:

Unmodified
Added
Removed
  • trunk/components/client/.classpath

    r2263 r2588  
    99        <classpathentry kind="lib" path="target/libs/ant.jar"/> 
    1010        <classpathentry kind="lib" path="target/libs/antlr.jar"/> 
    11         <classpathentry kind="lib" path="target/libs/asm.jar"/> 
    12         <classpathentry kind="lib" path="target/libs/asm-attrs.jar"/> 
    13         <classpathentry kind="lib" path="target/libs/cglib.jar"/> 
    1411        <classpathentry kind="lib" path="target/libs/checkstyle.jar"/> 
    1512        <classpathentry kind="lib" path="target/libs/common.jar"/> 
    … …  
    1714        <classpathentry kind="lib" path="target/libs/commons-collections.jar"/> 
    1815        <classpathentry kind="lib" path="target/libs/commons-logging.jar"/> 
    19         <classpathentry kind="lib" path="target/libs/dom4j.jar"/> 
    2016        <classpathentry kind="lib" path="target/libs/dsl.jar"/> 
    21         <classpathentry kind="lib" path="target/libs/ehcache.jar"/> 
    2217        <classpathentry kind="lib" path="target/libs/emma_ant.jar"/> 
    2318        <classpathentry kind="lib" path="target/libs/emma.jar"/> 
    … …  
    2520        <classpathentry kind="lib" path="target/libs/freemarker.jar"/> 
    2621        <classpathentry kind="lib" path="target/libs/groovy.jar"/> 
    27         <classpathentry kind="lib" path="target/libs/hibernate.jar"/> 
    2822        <classpathentry kind="lib" path="target/libs/hibernate-annotations.jar"/> 
    2923        <classpathentry kind="lib" path="target/libs/hibernate-commons-annotations.jar"/> 
    … …  
    4337        <classpathentry kind="lib" path="target/libs/persistence-api.jar"/> 
    4438        <classpathentry kind="lib" path="target/libs/postgresql.jar"/> 
    45         <classpathentry kind="lib" path="target/libs/qdox.jar"/> 
    4639        <classpathentry kind="lib" path="target/libs/spring.jar"/> 
    4740        <classpathentry kind="lib" path="target/libs/spring-mock.jar"/> 
  • trunk/components/common/.classpath

    r2019 r2588  
    1818        <classpathentry kind="lib" path="target/libs/dom4j.jar"/> 
    1919        <classpathentry kind="lib" path="target/libs/dsl.jar"/> 
    20         <classpathentry kind="lib" path="target/libs/ehcache.jar"/> 
    2120        <classpathentry kind="lib" path="target/libs/emma_ant.jar"/> 
    2221        <classpathentry kind="lib" path="target/libs/emma.jar"/> 
    … …  
    4140        <classpathentry kind="lib" path="target/libs/persistence-api.jar"/> 
    4241        <classpathentry kind="lib" path="target/libs/postgresql.jar"/> 
    43         <classpathentry kind="lib" path="target/libs/qdox.jar"/> 
    4442        <classpathentry kind="lib" path="target/libs/spring.jar"/> 
    4543        <classpathentry kind="lib" path="target/libs/spring-mock.jar"/> 
  • trunk/components/common/src/omeis/providers/re/RenderingEngine.java

    r2344 r2588  
    7878     *             If <code>pd</code> is <code>null</code>. 
    7979     */ 
    80     public RGBBuffer render(PlaneDef pd) throws ValidationException; 
     80    public RGBBuffer render(PlaneDef pd); 
    8181 
    8282    /** 
    … …  
    9595     * @see render() 
    9696     */ 
    97     public int[] renderAsPackedInt(PlaneDef pd) throws ValidationException; 
     97    public int[] renderAsPackedInt(PlaneDef pd); 
    9898     
    9999    /** 
    … …  
    110110     * @see renderAsPackedInt() 
    111111     */ 
    112     public byte[] renderCompressed(PlaneDef pd) throws ValidationException; 
     112    public byte[] renderCompressed(PlaneDef pd); 
     113     
     114     
     115    /** 
     116     * Performs a projection through selected optical sections of a particular  
     117     * timepoint with the currently active channels and renders the data for 
     118     * display. 
     119     * @param algorithm {@link IProjection#MAXIMUM_INTENSITY}, 
     120     * {@link IProjection#MEAN_INTENSITY} or {@link IProjection#SUM_INTENSITY}. 
     121     * @param stepping Stepping value to use while calculating the projection. 
     122     * For example, <code>stepping=1</code> will use every optical section from 
     123     * <code>start</code> to <code>end</code> where <code>stepping=2</code> will 
     124     * use every other section from <code>start</code> to <code>end</code> to 
     125     * perform the projection. 
     126     * @param start Optical section to start projecting from. 
     127     * @param end Optical section to finish projecting. 
     128     * @return A packed-integer <i>RGBA</i> rendered image of the projected 
     129     * pixels. 
     130     * @throws ValidationException Where: 
     131     * <ul> 
     132     *   <li><code>algorithm</code> is unknown</li> 
     133     *   <li><code>timepoint</code> is out of range</li> 
     134     *   <li><code>start</code> is out of range</li> 
     135     *   <li><code>end</code> is out of range</li> 
     136     *   <li><code>start > end</code></li> 
     137     * </ul> 
     138     * @see IPixels#projectPixels() 
     139     */ 
     140    public int[] renderProjectedAsPackedInt(int algorithm, int timepoint, 
     141                                            int stepping, int start, int end); 
     142     
     143    /** 
     144     * Performs a projection through selected optical sections of a particular  
     145     * timepoint with the currently active channels, renders the data for 
     146     * display and compresses the resulting RGBA composite image. 
     147     * @param algorithm {@link IProjection#MAXIMUM_INTENSITY}, 
     148     * {@link IProjection#MEAN_INTENSITY} or {@link IProjection#SUM_INTENSITY}. 
     149     * @param stepping Stepping value to use while calculating the projection. 
     150     * For example, <code>stepping=1</code> will use every optical section from 
     151     * <code>start</code> to <code>end</code> where <code>stepping=2</code> will 
     152     * use every other section from <code>start</code> to <code>end</code> to 
     153     * perform the projection. 
     154     * @param start Optical section to start projecting from. 
     155     * @param end Optical section to finish projecting. 
     156     * @return A compressed <i>RGBA</i> rendered JPEG image of the projected 
     157     * pixels. 
     158     * @throws ValidationException Where: 
     159     * <ul> 
     160     *   <li><code>algorithm</code> is unknown</li> 
     161     *   <li><code>timepoint</code> is out of range</li> 
     162     *   <li><code>start</code> is out of range</li> 
     163     *   <li><code>end</code> is out of range</li> 
     164     *   <li><code>start > end</code></li> 
     165     * </ul> 
     166     * @see IPixels#projectPixels() 
     167     */ 
     168    public byte[] renderProjectedCompressed(int algorithm, int timepoint, 
     169                                            int stepping, int start, int end); 
    113170 
    114171    /** 
  • trunk/components/rendering/.classpath

    r2019 r2588  
    1919        <classpathentry kind="lib" path="target/libs/dom4j.jar"/> 
    2020        <classpathentry kind="lib" path="target/libs/dsl.jar"/> 
    21         <classpathentry kind="lib" path="target/libs/ehcache.jar"/> 
    2221        <classpathentry kind="lib" path="target/libs/emma_ant.jar"/> 
    2322        <classpathentry kind="lib" path="target/libs/emma.jar"/> 
    … …  
    4241        <classpathentry kind="lib" path="target/libs/persistence-api.jar"/> 
    4342        <classpathentry kind="lib" path="target/libs/postgresql.jar"/> 
    44         <classpathentry kind="lib" path="target/libs/qdox.jar"/> 
    4543        <classpathentry kind="lib" path="target/libs/romio.jar"/> 
    4644        <classpathentry kind="lib" path="target/libs/spring.jar"/> 
  • trunk/components/rendering/src/omeis/providers/re/HSBStrategy.java

    r1894 r2588  
    4242 * Transforms a plane within a given pixels set into an <i>RGB</i> image. As 
    4343 * many wavelengths (channels) as desired can contribute to the final image and 
    44  * each wavelength is mapped to a color. All this things are specified by the 
     44 * each wavelength is mapped to a color. All these things are specified by the 
    4545 * rendering context. 
    4646 * <p> 
    47  * When multiple wavelengths have to be combined into the final image (this is 
    48  * the case if the rendering context specifies more than one active channel), 
    49  * this strategy renders each wavelength in a separate thread &#151; this often 
    50  * results in parallel rendering on multi-processor machines. 
     47 * This strategy renders the in "regions", dividing the planar data up based 
     48 * on {@link #maxTasks} and assigning each task to its own thread. This should 
     49 * result in parallel rendering on multi-processor machines. 
    5150 * </p> 
    5251 * <p> 
    5352 * Thread-safety relies on the fact that the rendering context is not going to 
    54  * change during the whole image rendering process. (This is enforced by the 
    55  * {@link RenderingEngineImpl}; in fact, while the <code>render</code> method 
    56  * executes, the whole component is locked.) 
     53 * change during the whole image rendering process and that each task is 
     54 * working on its own atomic unit of work. 
    5755 * </p> 
    5856 *  
    … …  
    261259     * Implemented as specified by the superclass. 
    262260     *  
    263      * @see RenderingStrategy#render(Renderer ctx, PlaneDef planeDef) 
     261     * @see RenderingStrategy#renderAsPackedInt(Renderer ctx, PlaneDef planeDef) 
    264262     */ 
    265263    @Override 
  • trunk/components/rendering/src/omeis/providers/re/Renderer.java

    r2344 r2588  
    2020// Application-internal dependencies 
    2121import ome.conditions.ResourceError; 
     22import ome.conditions.ValidationException; 
    2223import ome.io.nio.PixelBuffer; 
    2324import ome.model.core.Channel; 
    … …  
    422423     *            Selects a plane orthogonal to one of the <i>X</i>, <i>Y</i>, 
    423424     *            or <i>Z</i> axes. 
     425     * @param newBuffer 
     426     *             The pixel buffer to use in place of the one currently 
     427     *             defined in the renderer. This will not change the state 
     428     *             of the Renderer. If <code>null</code> is passed the existing 
     429     *             pixel buffer will be used. 
    424430     * @return An <i>RGB</i> image ready to be displayed on screen. 
    425431     * @throws IOException 
    426      *             If an error occured while trying to pull out data from the 
     432     *             If an error occurred while trying to pull out data from the 
    427433     *             pixels data repository. 
    428434     * @throws QuantizationException 
    … …  
    431437     *             If <code>pd</code> is <code>null</code>. 
    432438     */ 
    433     public int[] renderAsPackedInt(PlaneDef pd) throws IOException, 
    434             QuantizationException { 
     439    public int[] renderAsPackedInt(PlaneDef pd, PixelBuffer newBuffer) 
     440        throws IOException, QuantizationException 
     441    { 
    435442        if (pd == null) { 
    436443            throw new NullPointerException("No plane definition."); 
    … …  
    439446        log.info("Using: '" + renderingStrategy.getClass().getName() 
    440447                + "' rendering strategy."); 
    441         RGBIntBuffer img = renderingStrategy.renderAsPackedInt(this, pd); 
    442         stats.stop(); 
    443         // TODO: Commenting this out for now. -- callan 
    444         //log.info(stats.getStats()); 
    445         return img.getDataBuffer(); 
    446     } 
    447  
     448        PixelBuffer oldBuffer = buffer; 
     449        try 
     450        { 
     451            if (newBuffer != null) 
     452            { 
     453                buffer = newBuffer; 
     454            } 
     455            RGBIntBuffer img = renderingStrategy.renderAsPackedInt(this, pd); 
     456            stats.stop(); 
     457            // TODO: Commenting this out for now. -- callan 
     458            //log.info(stats.getStats()); 
     459            return img.getDataBuffer(); 
     460        } 
     461        finally 
     462        { 
     463            buffer = oldBuffer; 
     464        } 
     465    } 
     466     
    448467    /** 
    449468     * Returns the size, in bytes, of the {@link RGBBuffer} that would be 
  • trunk/components/rendering/src/omeis/providers/re/RenderingStrategy.java

    r1739 r2588  
    124124     * Encapsulates a specific rendering algorithm. The image is rendered 
    125125     * according to the current settings hold by the <code>ctx</code> 
    126      * argument. Typically, active wavelenghts are processed by first quantizing 
    127      * the wavelenght data in the plane selected by <code>pd</code> &#151; the 
     126     * argument. Typically, active wavelengths are processed by first quantizing 
     127     * the wavelength data in the plane selected by <code>pd</code> &#151; the 
    128128     * quantum strategy is retrieved from the {@link QuantumManager} (accessed 
    129129     * through the <code>ctx</code> object) and the actual data from the 
  • trunk/components/romio/.classpath

    r2019 r2588  
    1919        <classpathentry kind="lib" path="target/libs/dom4j.jar"/> 
    2020        <classpathentry kind="lib" path="target/libs/dsl.jar"/> 
    21         <classpathentry kind="lib" path="target/libs/ehcache.jar"/> 
    2221        <classpathentry kind="lib" path="target/libs/emma_ant.jar"/> 
    2322        <classpathentry kind="lib" path="target/libs/emma.jar"/> 
    … …  
    4241        <classpathentry kind="lib" path="target/libs/persistence-api.jar"/> 
    4342        <classpathentry kind="lib" path="target/libs/postgresql.jar"/> 
    44         <classpathentry kind="lib" path="target/libs/qdox.jar"/> 
    4543        <classpathentry kind="lib" path="target/libs/spring.jar"/> 
    4644        <classpathentry kind="lib" path="target/libs/spring-mock.jar"/> 
  • trunk/components/romio/src/ome/io/nio/DeltaVision.java

    r1937 r2588  
    1111import java.io.IOException; 
    1212import java.io.RandomAccessFile; 
    13 import java.nio.Buffer; 
    1413import java.nio.ByteBuffer; 
    1514import java.nio.ByteOrder; 
    1615import java.nio.IntBuffer; 
    17 import java.nio.MappedByteBuffer; 
    1816import java.nio.ShortBuffer; 
    1917import java.nio.channels.FileChannel; 
    … …  
    5250        private Integer totalSize; 
    5351         
    54         protected MappedByteBuffer buf; 
     52        protected ByteBuffer buf; 
    5553 
    5654        private OriginalFile originalFile; 
    … …  
    9492                for (int t = 0; t < getSizeT(); t++) { 
    9593                        try { 
    96                                 MappedByteBuffer buffer = getTimepoint(t).getData(); 
     94                                ByteBuffer buffer = getTimepoint(t).getData(); 
    9795                                md.update(buffer); 
    9896                        } catch (DimensionsOutOfBoundsException e) { 
    … …  
    132130                if (buffer.length != count * header.getBytesPerPixel()) 
    133131                        throw new ApiUsageException("Buffer size incorrect."); 
    134                 MappedByteBuffer plane = getPlane(z, c, t).getData(); 
     132                ByteBuffer plane = getPlane(z, c, t).getData(); 
    135133                swapAndReorderIfRequired(plane, ByteBuffer.wrap(buffer), offset, count); 
    136134                return buffer; 
    … …  
    157155                if (buffer.length != getPlaneSize()) 
    158156                        throw new ApiUsageException("Buffer size incorrect."); 
    159                 MappedByteBuffer b = getPlane(z, c, t).getData(); 
     157                ByteBuffer b = getPlane(z, c, t).getData(); 
    160158                swapAndReorderIfRequired(b, ByteBuffer.wrap(buffer),  
    161159                                         0, getSizeX() * getSizeY()); 
    … …  
    192190                        throws IOException { 
    193191                FileChannel fileChannel = getFileChannel(); 
    194                 MappedByteBuffer buf = fileChannel.map(MapMode.READ_ONLY, offset, size); 
     192                ByteBuffer buf = fileChannel.map(MapMode.READ_ONLY, offset, size); 
    195193                if (!header.isNative()) 
    196194                        buf.order(ByteOrder.LITTLE_ENDIAN); 
    … …  
    206204                if (buffer.length != size) 
    207205                        throw new ApiUsageException("Buffer size incorrect."); 
    208                 MappedByteBuffer b = getRegion(size, offset).getData(); 
     206                ByteBuffer b = getRegion(size, offset).getData(); 
    209207                b.get(buffer); 
    210208                return buffer; 
    … …  
    230228                if (buffer.length != getRowSize()) 
    231229                        throw new ApiUsageException("Buffer size incorrect."); 
    232                 MappedByteBuffer b = getRow(y, z, c, t).getData(); 
     230                ByteBuffer b = getRow(y, z, c, t).getData(); 
    233231                swapAndReorderIfRequired(b, ByteBuffer.wrap(buffer), 0, getSizeX()); 
    234232                return buffer; 
  • trunk/components/romio/src/ome/io/nio/DeltaVisionHeader.java

    r1906 r2588  
    11package ome.io.nio; 
    22 
     3import java.nio.ByteBuffer; 
    34import java.nio.ByteOrder; 
    45import java.nio.MappedByteBuffer; 
    … …  
    2122public class DeltaVisionHeader { 
    2223 
    23         private MappedByteBuffer data; 
     24        private ByteBuffer data; 
    2425         
    2526        /** 
    … …  
    105106         * @param endian 
    106107         */ 
    107         public DeltaVisionHeader(MappedByteBuffer data, boolean endian) { 
     108        public DeltaVisionHeader(ByteBuffer data, boolean endian) { 
    108109                this.data = data; 
    109110                 
  • trunk/components/romio/src/ome/io/nio/PixelData.java

    r1860 r2588  
    99 
    1010import java.nio.ByteOrder; 
    11 import java.nio.MappedByteBuffer; 
     11import java.nio.ByteBuffer; 
    1212 
    1313import ome.model.enums.PixelsType; 
    … …  
    4646     
    4747    /** The pixels data backing buffer. */ 
    48     protected MappedByteBuffer data; 
     48    protected ByteBuffer data; 
    4949     
    5050    /** If the data is signed. */ 
    … …  
    6363         * @param data The raw pixel data. 
    6464         */ 
    65         public PixelData(PixelsType pixelsType, MappedByteBuffer data) 
     65        public PixelData(PixelsType pixelsType, ByteBuffer data) 
    6666        { 
    6767                this.data = data; 
    … …  
    150150            return true; 
    151151        return false; 
     152    } 
     153     
     154    /** 
     155     * Sets the pixel intensity value of the pixel at a given offset within 
     156     * the backing buffer. This method takes into account bytes per pixel.  
     157     *  
     158     * @param offset The relative offset (taking into account the number of  
     159     * bytes per pixel) within the backing buffer. 
     160     * @param value Pixel value to set. 
     161     */ 
     162    public void setPixelValue(int offset, double value) 
     163    { 
     164        setPixelValueDirect(offset * bytesPerPixel, value); 
     165    } 
     166     
     167    /** 
     168     * Sets the pixel intensity value of the pixel at a given offset within 
     169     * the backing buffer. This method does not take into account bytes per 
     170     * pixel. 
     171     *  
     172     * @param offset The absolute offset within the backing buffer. 
     173     * @param value Pixel value to set. 
     174     */ 
     175    public void setPixelValueDirect(int offset, double value) 
     176    { 
     177        switch (javaType) 
     178        { 
     179            case BYTE: 
     180                data.put(offset, (byte) value); 
     181                break; 
     182            case SHORT: 
     183                data.putShort(offset, (short) value); 
     184                break; 
     185            case INT: 
     186                data.putInt(offset, (int) value); 
     187                break; 
     188            case FLOAT: 
     189                data.putFloat(offset, (float) value); 
     190                break; 
     191            case DOUBLE: 
     192                data.putDouble(offset, value); 
     193                break; 
     194        } 
    152195    } 
    153196     
    … …  
    212255     * @return See above. 
    213256     */ 
    214     public MappedByteBuffer getData() 
     257    public ByteBuffer getData() 
    215258    { 
    216259        return data; 
  • trunk/components/romio/src/ome/io/nio/ReorderedPixelData.java

    r1906 r2588  
    99 
    1010import java.nio.ByteOrder; 
    11 import java.nio.MappedByteBuffer; 
     11import java.nio.ByteBuffer; 
    1212 
    1313import ome.conditions.ApiUsageException; 
    … …  
    3838         * @param rowSize The size of each pixels row in bytes. 
    3939         */ 
    40         public ReorderedPixelData(PixelsType pixelsType, MappedByteBuffer data, 
     40        public ReorderedPixelData(PixelsType pixelsType, ByteBuffer data, 
    4141                                          int rowSize) 
    4242        { 
    … …  
    8282     * @return See above. 
    8383     */ 
    84     public MappedByteBuffer getData() 
     84    public ByteBuffer getData() 
    8585    { 
    8686        return data; 
  • trunk/components/romio/src/ome/io/nio/RomioPixelBuffer.java

    r1891 r2588  
    210210                if (buffer.length != size) 
    211211                        throw new ApiUsageException("Buffer size incorrect."); 
    212                 MappedByteBuffer b = getRegion(size, offset).getData(); 
     212                ByteBuffer b = getRegion(size, offset).getData(); 
    213213                b.get(buffer); 
    214214                return buffer; 
    … …  
    228228                if (buffer.length != getRowSize()) 
    229229                        throw new ApiUsageException("Buffer size incorrect."); 
    230                 MappedByteBuffer b = getRow(y, z, c, t).getData(); 
     230                ByteBuffer b = getRow(y, z, c, t).getData(); 
    231231                b.get(buffer); 
    232232                return buffer;