public class WlzServiceImpl extends loci.common.services.AbstractService implements WlzService
| Modifier and Type | Field and Description |
|---|---|
private uk.ac.mrc.hgu.Wlz.WlzIBox3 |
bBox |
static java.lang.String |
NO_WLZ_MSG |
private int |
objGType |
private int |
objType |
private int |
pixelType |
private int |
state |
private uk.ac.mrc.hgu.Wlz.WlzDVertex3 |
voxSz |
static java.lang.String |
WLZ_ORG_LABEL |
static int |
WLZ_SERVICE_READ |
static int |
WLZ_SERVICE_UNKNOWN |
static int |
WLZ_SERVICE_WRITE |
private uk.ac.mrc.hgu.Wlz.WlzFileStream |
wlzFP |
private uk.ac.mrc.hgu.Wlz.WlzObject |
wlzObj |
private java.lang.String |
wlzVersion |
| Constructor and Description |
|---|
WlzServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkClassDependency(java.lang.Class<? extends java.lang.Object> klass) |
void |
close()
Closes the file.
|
java.lang.String |
getNoWlzMsg()
Gets the text string for when Woolz has not been found.
|
double |
getOrgX()
Gets column origin.
|
double |
getOrgY()
Gets line origin.
|
double |
getOrgZ()
Gets plane origin.
|
int |
getPixelType()
Gets the image pixel type.
|
int |
getSizeC()
Gets number of channels.
|
int |
getSizeT()
Gets number of time samples.
|
int |
getSizeX()
Gets width in pixels/voxels.
|
int |
getSizeY()
Gets height in pixels/voxels.
|
int |
getSizeZ()
Gets depth (number of x-y planes) in voxels.
|
int[] |
getSupPixelTypes()
Gets supported pixel types.
|
double |
getVoxSzX()
Gets voxel width.
|
double |
getVoxSzY()
Gets voxel height.
|
double |
getVoxSzZ()
Gets voxel depth.
|
java.lang.String |
getWlzOrgLabelName()
Gets the text string used for the Woolz origin label.
|
boolean |
isRGB()
Gets boolean for whether image is colour or not.
|
void |
open(java.lang.String file,
java.lang.String rw)
Initializes the service for the given file path.
|
private void |
openRead(java.lang.String file) |
private void |
openWrite(java.lang.String file) |
byte[] |
readBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
Reads a rectangle of bytes in an x-y plane from the opened Woolz
object.
|
private byte[] |
readBytes2DDomObj(byte[] buf,
int x,
int y,
int w,
int h) |
private byte[] |
readBytes3DDomObj(byte[] buf,
int x,
int y,
int z,
int w,
int h) |
void |
saveBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
Adds a rectangle of bytes in an x-y plane to the opened Woolz object.
|
void |
setupWrite(int orgX,
int orgY,
int orgZ,
int pixSzX,
int pixSzY,
int pixSzZ,
int pixSzC,
int pixSzT,
double voxSzX,
double voxSzY,
double voxSzZ,
int gType)
Sets up the service, which must have already been opened for writing.
|
public static final java.lang.String WLZ_ORG_LABEL
public static final java.lang.String NO_WLZ_MSG
public static final int WLZ_SERVICE_UNKNOWN
public static final int WLZ_SERVICE_READ
public static final int WLZ_SERVICE_WRITE
private int state
private int pixelType
private int objType
private int objGType
private java.lang.String wlzVersion
private uk.ac.mrc.hgu.Wlz.WlzIBox3 bBox
private uk.ac.mrc.hgu.Wlz.WlzDVertex3 voxSz
private uk.ac.mrc.hgu.Wlz.WlzObject wlzObj
private uk.ac.mrc.hgu.Wlz.WlzFileStream wlzFP
protected void checkClassDependency(java.lang.Class<? extends java.lang.Object> klass)
checkClassDependency in class loci.common.services.AbstractServicepublic java.lang.String getNoWlzMsg()
WlzServicegetNoWlzMsg in interface WlzServicepublic java.lang.String getWlzOrgLabelName()
WlzServicegetWlzOrgLabelName in interface WlzServicepublic void open(java.lang.String file,
java.lang.String rw)
throws FormatException,
java.io.IOException
WlzServiceopen in interface WlzServicefile - File path with which to initialize the service.FormatExceptionjava.io.IOExceptionpublic int getSizeX()
WlzServicegetSizeX in interface WlzServicepublic int getSizeY()
WlzServicegetSizeY in interface WlzServicepublic int getSizeZ()
WlzServicegetSizeZ in interface WlzServicepublic int getSizeC()
WlzServicegetSizeC in interface WlzServicepublic int getSizeT()
WlzServicegetSizeT in interface WlzServicepublic boolean isRGB()
WlzServiceisRGB in interface WlzServicepublic double getVoxSzX()
WlzServicegetVoxSzX in interface WlzServicepublic double getVoxSzY()
WlzServicegetVoxSzY in interface WlzServicepublic double getVoxSzZ()
WlzServicegetVoxSzZ in interface WlzServicepublic double getOrgX()
WlzServicegetOrgX in interface WlzServicepublic double getOrgY()
WlzServicegetOrgY in interface WlzServicepublic double getOrgZ()
WlzServicegetOrgZ in interface WlzServicepublic int[] getSupPixelTypes()
WlzServicegetSupPixelTypes in interface WlzServicepublic int getPixelType()
WlzServicegetPixelType in interface WlzServicepublic void setupWrite(int orgX,
int orgY,
int orgZ,
int pixSzX,
int pixSzY,
int pixSzZ,
int pixSzC,
int pixSzT,
double voxSzX,
double voxSzY,
double voxSzZ,
int gType)
throws FormatException
WlzServicesetupWrite in interface WlzServiceorgX - x origin.orgY - y origin.orgZ - z origin (set to 0 for 2D).pixSzX - width.pixSzY - height.pixSzZ - depth (number of planes, set to 1 for 2D).pixSzC - number of channels.pixSzT - number of time samples.voxSzX - pixel/voxel width.voxSzY - pixel/voxel heigth.voxSzZ - voxel deoth.gType - image value type.FormatExceptionpublic void close()
throws java.io.IOException
WlzServiceclose in interface WlzServicejava.io.IOExceptionpublic byte[] readBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
throws FormatException,
java.io.IOException
WlzServicereadBytes in interface WlzServiceno - plane coordinate (set to 0 for 2D).buf - buffer for bytes.x - rectangle first column.y - rectangle first line.w - rectangle width (in columns).h - rectangle heigth (in lines).FormatExceptionjava.io.IOExceptionpublic void saveBytes(int no,
byte[] buf,
int x,
int y,
int w,
int h)
throws FormatException,
java.io.IOException
WlzServicesaveBytes in interface WlzServiceno - plane coordinate (set to 0 for 2D).buf - buffer with bytes.x - rectangle first column.y - rectangle first line.w - rectangle width (in columns).h - rectangle heigth (in lines).FormatExceptionjava.io.IOExceptionprivate void openRead(java.lang.String file)
throws FormatException,
java.io.IOException
FormatExceptionjava.io.IOExceptionprivate void openWrite(java.lang.String file)
throws FormatException,
java.io.IOException
FormatExceptionjava.io.IOExceptionprivate byte[] readBytes2DDomObj(byte[] buf,
int x,
int y,
int w,
int h)
throws uk.ac.mrc.hgu.Wlz.WlzException
uk.ac.mrc.hgu.Wlz.WlzExceptionprivate byte[] readBytes3DDomObj(byte[] buf,
int x,
int y,
int z,
int w,
int h)
throws uk.ac.mrc.hgu.Wlz.WlzException
uk.ac.mrc.hgu.Wlz.WlzExceptionCopyright © 2019 Open Microscopy Environment