Package ome.io.bioformats
Class BfPixelsWrapper
- java.lang.Object
-
- ome.io.bioformats.BfPixelsWrapper
-
public class BfPixelsWrapper extends java.lang.Object- Since:
- Beta4.3
-
-
Constructor Summary
Constructors Constructor Description BfPixelsWrapper(java.lang.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? There should ultimately be some sort of check here that the file is in a/the repository.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckBounds(java.lang.Integer x, java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t)voidclose()intgetByteWidth()byte[]getCol(java.lang.Integer x, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, byte[] buffer)java.lang.IntegergetColSize()byte[]getHypercube(java.util.List<java.lang.Integer> offset, java.util.List<java.lang.Integer> size, java.util.List<java.lang.Integer> step, byte[] buffer)java.lang.LonggetHypercubeSize(java.util.List<java.lang.Integer> offset, java.util.List<java.lang.Integer> size, java.util.List<java.lang.Integer> step)longgetId()byte[]getMessageDigest()java.lang.StringgetPath()java.lang.StringgetPixelsType()cgb - created from the methods below? Retrieves how many bytes per pixel the current plane or section has.byte[]getPlane(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, byte[] buffer)java.lang.LonggetPlaneOffset(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t)byte[]getPlaneRegion(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, java.lang.Integer count, java.lang.Integer offset, byte[] buffer)java.lang.LonggetPlaneSize()byte[]getRegion(java.lang.Integer size, java.lang.Long offset, byte[] buffer)byte[]getRow(java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, byte[] buffer)java.lang.LonggetRowOffset(java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t)java.lang.IntegergetRowSize()intgetSizeC()intgetSizeT()intgetSizeX()intgetSizeY()intgetSizeZ()byte[]getStack(java.lang.Integer c, java.lang.Integer t, byte[] buffer)java.lang.LonggetStackOffset(java.lang.Integer c, java.lang.Integer t)java.lang.LonggetStackSize()byte[]getTile(int z, int c, int t, int x, int y, int w, int h, byte[] buffer)byte[]getTimepoint(java.lang.Integer t, byte[] buffer)java.lang.LonggetTimepointOffset(java.lang.Integer t)java.lang.LonggetTimepointSize()java.lang.LonggetTotalSize()booleanisFloat()booleanisLittleEndian()booleanisSigned()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.
-
-
-
Constructor Detail
-
BfPixelsWrapper
public BfPixelsWrapper(java.lang.String path, loci.formats.IFormatReader reader) throws java.io.IOException, loci.formats.FormatExceptionWe 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:
java.io.IOExceptionloci.formats.FormatException
-
-
Method Detail
-
getMessageDigest
public byte[] getMessageDigest() throws java.io.IOException- Throws:
java.io.IOException
-
checkBounds
public void checkBounds(java.lang.Integer x, java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws DimensionsOutOfBoundsException- Throws:
DimensionsOutOfBoundsException
-
close
public void close() throws java.io.IOException- Throws:
java.io.IOException
-
getId
public long getId()
-
getPath
public java.lang.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 java.lang.Integer getRowSize()
-
getColSize
public java.lang.Integer getColSize()
-
getPlaneSize
public java.lang.Long getPlaneSize()
-
getStackSize
public java.lang.Long getStackSize()
-
getTimepointSize
public java.lang.Long getTimepointSize()
-
getTotalSize
public java.lang.Long getTotalSize()
-
getHypercubeSize
public java.lang.Long getHypercubeSize(java.util.List<java.lang.Integer> offset, java.util.List<java.lang.Integer> size, java.util.List<java.lang.Integer> step) throws DimensionsOutOfBoundsException- Throws:
DimensionsOutOfBoundsException
-
getRowOffset
public java.lang.Long getRowOffset(java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws DimensionsOutOfBoundsException- Throws:
DimensionsOutOfBoundsException
-
getPlaneOffset
public java.lang.Long getPlaneOffset(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t) throws DimensionsOutOfBoundsException- Throws:
DimensionsOutOfBoundsException
-
getStackOffset
public java.lang.Long getStackOffset(java.lang.Integer c, java.lang.Integer t) throws DimensionsOutOfBoundsException- Throws:
DimensionsOutOfBoundsException
-
getTimepointOffset
public java.lang.Long getTimepointOffset(java.lang.Integer t) throws DimensionsOutOfBoundsException- Throws:
DimensionsOutOfBoundsException
-
getCol
public byte[] getCol(java.lang.Integer x, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException- Throws:
java.io.IOExceptionDimensionsOutOfBoundsException
-
getPlane
public byte[] getPlane(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException- Throws:
java.io.IOExceptionDimensionsOutOfBoundsException
-
getPlaneRegion
public byte[] getPlaneRegion(java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, java.lang.Integer count, java.lang.Integer offset, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException- Throws:
java.io.IOExceptionDimensionsOutOfBoundsException
-
getRegion
public byte[] getRegion(java.lang.Integer size, java.lang.Long offset, byte[] buffer) throws java.io.IOException- Throws:
java.io.IOException
-
getRow
public byte[] getRow(java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException- Throws:
java.io.IOExceptionDimensionsOutOfBoundsException
-
getStack
public byte[] getStack(java.lang.Integer c, java.lang.Integer t, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException- Throws:
java.io.IOExceptionDimensionsOutOfBoundsException
-
getTimepoint
public byte[] getTimepoint(java.lang.Integer t, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException- Throws:
java.io.IOExceptionDimensionsOutOfBoundsException
-
getHypercube
public byte[] getHypercube(java.util.List<java.lang.Integer> offset, java.util.List<java.lang.Integer> size, java.util.List<java.lang.Integer> step, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException- Throws:
java.io.IOExceptionDimensionsOutOfBoundsException
-
getTile
public byte[] getTile(int z, int c, int t, int x, int y, int w, int h, byte[] buffer) throws loci.formats.FormatException, java.io.IOException- Throws:
loci.formats.FormatExceptionjava.io.IOException
-
getPixelsType
public java.lang.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()
-
isLittleEndian
public boolean isLittleEndian()
-
swapIfRequired
public byte[] swapIfRequired(byte[] bytes) throws loci.formats.FormatException, java.io.IOExceptioncgb - 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:
java.io.IOException- if there is an error read from the file.loci.formats.FormatException- if there is an error during metadata parsing.
-
-