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 void
checkBounds(java.lang.Integer x, java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t)
void
close()
int
getByteWidth()
byte[]
getCol(java.lang.Integer x, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t, byte[] buffer)
java.lang.Integer
getColSize()
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.Long
getHypercubeSize(java.util.List<java.lang.Integer> offset, java.util.List<java.lang.Integer> size, java.util.List<java.lang.Integer> step)
long
getId()
byte[]
getMessageDigest()
java.lang.String
getPath()
java.lang.String
getPixelsType()
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.Long
getPlaneOffset(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.Long
getPlaneSize()
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.Long
getRowOffset(java.lang.Integer y, java.lang.Integer z, java.lang.Integer c, java.lang.Integer t)
java.lang.Integer
getRowSize()
int
getSizeC()
int
getSizeT()
int
getSizeX()
int
getSizeY()
int
getSizeZ()
byte[]
getStack(java.lang.Integer c, java.lang.Integer t, byte[] buffer)
java.lang.Long
getStackOffset(java.lang.Integer c, java.lang.Integer t)
java.lang.Long
getStackSize()
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.Long
getTimepointOffset(java.lang.Integer t)
java.lang.Long
getTimepointSize()
java.lang.Long
getTotalSize()
boolean
isFloat()
boolean
isLittleEndian()
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.
-
-
-
Constructor Detail
-
BfPixelsWrapper
public BfPixelsWrapper(java.lang.String path, loci.formats.IFormatReader reader) throws java.io.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:
java.io.IOException
loci.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.IOException
DimensionsOutOfBoundsException
-
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.IOException
DimensionsOutOfBoundsException
-
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.IOException
DimensionsOutOfBoundsException
-
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.IOException
DimensionsOutOfBoundsException
-
getStack
public byte[] getStack(java.lang.Integer c, java.lang.Integer t, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException
- Throws:
java.io.IOException
DimensionsOutOfBoundsException
-
getTimepoint
public byte[] getTimepoint(java.lang.Integer t, byte[] buffer) throws java.io.IOException, DimensionsOutOfBoundsException
- Throws:
java.io.IOException
DimensionsOutOfBoundsException
-
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.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, java.io.IOException
- Throws:
loci.formats.FormatException
java.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.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:
java.io.IOException
- if there is an error read from the file.loci.formats.FormatException
- if there is an error during metadata parsing.
-
-