ome.io.bioformats
Class BfPixelsWrapper

java.lang.Object
  extended by ome.io.bioformats.BfPixelsWrapper

public class BfPixelsWrapper
extends Object

Since:
Beta4.3

Constructor Summary
BfPixelsWrapper(String path, loci.formats.IFormatReader reader)
          We may want a constructor that takes the id of an imported file or that takes a File object?
 
Method Summary
 void checkBounds(Integer x, Integer y, Integer z, Integer c, Integer t)
           
 void close()
           
 int getByteWidth()
           
 byte[] getCol(Integer x, Integer z, Integer c, Integer t, byte[] buffer)
           
 Integer getColSize()
           
 byte[] getHypercube(List<Integer> offset, List<Integer> size, List<Integer> step, byte[] buffer)
           
 Integer getHypercubeSize(List<Integer> offset, List<Integer> size, List<Integer> step)
           
 long getId()
           
 byte[] getMessageDigest()
           
 String getPath()
           
 String getPixelsType()
          cgb - created from the methods below?
 byte[] getPlane(Integer z, Integer c, Integer t, byte[] buffer)
           
 Long getPlaneOffset(Integer z, Integer c, Integer t)
           
 byte[] getPlaneRegion(Integer z, Integer c, Integer t, Integer count, Integer offset, byte[] buffer)
           
 Integer getPlaneSize()
           
 byte[] getRegion(Integer size, Long offset, byte[] buffer)
           
 byte[] getRow(Integer y, Integer z, Integer c, Integer t, byte[] buffer)
           
 Long getRowOffset(Integer y, Integer z, Integer c, Integer t)
           
 Integer getRowSize()
           
 int getSizeC()
           
 int getSizeT()
           
 int getSizeX()
           
 int getSizeY()
           
 int getSizeZ()
           
 byte[] getStack(Integer c, Integer t, byte[] buffer)
           
 Long getStackOffset(Integer c, Integer t)
           
 Integer getStackSize()
           
 byte[] getTile(int z, int c, int t, int x, int y, int w, int h, byte[] buffer)
           
 byte[] getTimepoint(Integer t, byte[] buffer)
           
 Long getTimepointOffset(Integer t)
           
 Integer getTimepointSize()
           
 Integer getTotalSize()
           
 boolean isFloat()
           
 boolean isSigned()
           
 byte[] swapIfRequired(byte[] bytes)
          cgb - stolen from ImportLibrary - slightly modified Examines a byte array to see if it needs to be byte swapped and modifies the byte array directly.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BfPixelsWrapper

public BfPixelsWrapper(String path,
                       loci.formats.IFormatReader reader)
                throws IOException,
                       loci.formats.FormatException
We may want a constructor that takes the id of an imported file or that takes a File object? There should ultimately be some sort of check here that the file is in a/the repository.

Throws:
IOException
loci.formats.FormatException
Method Detail

getMessageDigest

public byte[] getMessageDigest()
                        throws IOException
Throws:
IOException

checkBounds

public void checkBounds(Integer x,
                        Integer y,
                        Integer z,
                        Integer c,
                        Integer t)
                 throws DimensionsOutOfBoundsException
Throws:
DimensionsOutOfBoundsException

close

public void close()
           throws IOException
Throws:
IOException

getId

public long getId()

getPath

public String getPath()

getSizeC

public int getSizeC()

getSizeT

public int getSizeT()

getSizeX

public int getSizeX()

getSizeY

public int getSizeY()

getSizeZ

public int getSizeZ()

getByteWidth

public int getByteWidth()

getRowSize

public Integer getRowSize()

getColSize

public Integer getColSize()

getPlaneSize

public Integer getPlaneSize()

getStackSize

public Integer getStackSize()

getTimepointSize

public Integer getTimepointSize()

getTotalSize

public Integer getTotalSize()

getHypercubeSize

public Integer getHypercubeSize(List<Integer> offset,
                                List<Integer> size,
                                List<Integer> step)
                         throws DimensionsOutOfBoundsException
Throws:
DimensionsOutOfBoundsException

getRowOffset

public Long getRowOffset(Integer y,
                         Integer z,
                         Integer c,
                         Integer t)
                  throws DimensionsOutOfBoundsException
Throws:
DimensionsOutOfBoundsException

getPlaneOffset

public Long getPlaneOffset(Integer z,
                           Integer c,
                           Integer t)
                    throws DimensionsOutOfBoundsException
Throws:
DimensionsOutOfBoundsException

getStackOffset

public Long getStackOffset(Integer c,
                           Integer t)
                    throws DimensionsOutOfBoundsException
Throws:
DimensionsOutOfBoundsException

getTimepointOffset

public Long getTimepointOffset(Integer t)
                        throws DimensionsOutOfBoundsException
Throws:
DimensionsOutOfBoundsException

getCol

public byte[] getCol(Integer x,
                     Integer z,
                     Integer c,
                     Integer t,
                     byte[] buffer)
              throws IOException,
                     DimensionsOutOfBoundsException
Throws:
IOException
DimensionsOutOfBoundsException

getPlane

public byte[] getPlane(Integer z,
                       Integer c,
                       Integer t,
                       byte[] buffer)
                throws IOException,
                       DimensionsOutOfBoundsException
Throws:
IOException
DimensionsOutOfBoundsException

getPlaneRegion

public byte[] getPlaneRegion(Integer z,
                             Integer c,
                             Integer t,
                             Integer count,
                             Integer offset,
                             byte[] buffer)
                      throws IOException,
                             DimensionsOutOfBoundsException
Throws:
IOException
DimensionsOutOfBoundsException

getRegion

public byte[] getRegion(Integer size,
                        Long offset,
                        byte[] buffer)
                 throws IOException
Throws:
IOException

getRow

public byte[] getRow(Integer y,
                     Integer z,
                     Integer c,
                     Integer t,
                     byte[] buffer)
              throws IOException,
                     DimensionsOutOfBoundsException
Throws:
IOException
DimensionsOutOfBoundsException

getStack

public byte[] getStack(Integer c,
                       Integer t,
                       byte[] buffer)
                throws IOException,
                       DimensionsOutOfBoundsException
Throws:
IOException
DimensionsOutOfBoundsException

getTimepoint

public byte[] getTimepoint(Integer t,
                           byte[] buffer)
                    throws IOException,
                           DimensionsOutOfBoundsException
Throws:
IOException
DimensionsOutOfBoundsException

getHypercube

public byte[] getHypercube(List<Integer> offset,
                           List<Integer> size,
                           List<Integer> step,
                           byte[] buffer)
                    throws IOException,
                           DimensionsOutOfBoundsException
Throws:
IOException
DimensionsOutOfBoundsException

getTile

public byte[] getTile(int z,
                      int c,
                      int t,
                      int x,
                      int y,
                      int w,
                      int h,
                      byte[] buffer)
               throws loci.formats.FormatException,
                      IOException
Throws:
loci.formats.FormatException
IOException

getPixelsType

public String getPixelsType()
cgb - created from the methods below? Retrieves how many bytes per pixel the current plane or section has.

Returns:
the number of bytes per pixel.

isFloat

public boolean isFloat()

isSigned

public boolean isSigned()

swapIfRequired

public byte[] swapIfRequired(byte[] bytes)
                      throws loci.formats.FormatException,
                             IOException
cgb - stolen from ImportLibrary - slightly modified Examines a byte array to see if it needs to be byte swapped and modifies the byte array directly.

Parameters:
bytes - The byte array to check and modify if required.
Returns:
the byteArray either swapped or not for convenience.
Throws:
IOException - if there is an error read from the file.
loci.formats.FormatException - if there is an error during metadata parsing.


OmeroJava Api

Version: 4.3.4-dbcbce5a-b4

Copyright © 2009 The University of Dundee. All Rights Reserved.