|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectannotool.io.DataInput
public class DataInput
The class that wraps the data.
Field Summary | |
---|---|
static int |
COLOR_256
|
static int |
COLOR_RGB
|
static int |
DIRECTORYMODE
|
static int |
GRAY16
|
static int |
GRAY32
|
static int |
GRAY8
|
static int |
ROIANNOMODE
|
static int |
ROIMODE
|
static int |
TARGETFILEMODE
|
Constructor Summary | |
---|---|
DataInput(ij.ImagePlus image,
java.util.HashMap<java.lang.String,ij.gui.Roi> roiList,
java.util.HashMap<java.lang.String,java.lang.String> classMap,
java.lang.String channel,
int depth,
int newwidth,
int newheight)
Creates DataInput object in ROI input method. |
|
DataInput(java.lang.String directory,
java.lang.String[] files,
java.lang.String ext,
java.lang.String channel)
This constructor takes no target file and is strictly for ROI Annotation mode. |
|
DataInput(java.lang.String directory,
java.lang.String ext,
java.lang.String channel,
boolean useDirStructureForTarget)
This constructor takes a directory hierarchy that has image of different classes There is no need of the target file in this case. |
|
DataInput(java.lang.String directory,
java.lang.String ext,
java.lang.String channel,
java.lang.String targetFile)
This constructor takes the target file (in addition to image dir, ext, channel) to populate the label related information. |
|
DataInput(java.lang.String directory,
java.lang.String ext,
java.lang.String channel,
java.lang.String targetFile,
int newwidth,
int newheight)
The constructor takes the target file and resize the (2D) images based on the dimension passed in If the images are 3D, it resizes each slice. |
Method Summary | |
---|---|
java.util.ArrayList |
getAllStacksOfOneImage(int imageindex)
Get one image or ROI with all the stacks. |
java.util.ArrayList<java.lang.String> |
getAnnotations()
|
java.lang.String |
getChannel()
|
java.lang.String[] |
getChildren()
|
java.util.HashMap<java.lang.String,java.lang.String> |
getClassNames()
|
java.lang.Object |
getData(int imgIndex,
int stackIndex)
Get the array of the image (2D slice) of a given stackIndex The type of the Object depends on the image type |
int |
getDepth()
This method is preferred since it covers both ROI and non-ROI cases This returns the depth if ROI, and the stack size for non-ROI. |
int[] |
getDepthList()
|
int |
getHeight()
It is the height of the first image (or ROI). |
int[] |
getHeightList()
|
ij.ImagePlus |
getImagePlus(int i)
Return the ImagePlus object of the given image index. |
int |
getImageType()
|
int |
getLength()
|
int |
getMode()
|
ij.ImagePlus |
getROIImagePlus(int i)
|
java.util.ArrayList<java.lang.Object> |
getStackData(int stackIndex)
Deprecated. |
int |
getStackSize()
This is the stack size of the first image in the case of image set. |
int[][] |
getTargets()
|
int |
getWidth()
It is the width of the first image (or ROI). |
int[] |
getWidthList()
|
boolean |
is3D()
|
boolean |
isColor()
|
boolean |
isDirectoryMode()
|
boolean |
ofSameSize()
If all images are of the same size, return true; otherwise, return false. |
static java.lang.Object |
openOneImage(ij.ImagePlus imgp,
int stackIndex,
java.lang.String channel,
int width,
int height)
|
void |
setChannel(java.lang.String channel)
To set channel for an already constructed object. |
void |
setDataNull()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int GRAY8
public static final int GRAY16
public static final int GRAY32
public static final int COLOR_256
public static final int COLOR_RGB
public static final int TARGETFILEMODE
public static final int DIRECTORYMODE
public static final int ROIMODE
public static final int ROIANNOMODE
Constructor Detail |
---|
public DataInput(java.lang.String directory, java.lang.String ext, java.lang.String channel, java.lang.String targetFile, int newwidth, int newheight) throws java.lang.Exception
java.lang.Exception
public DataInput(java.lang.String directory, java.lang.String ext, java.lang.String channel, java.lang.String targetFile) throws java.lang.Exception
java.lang.Exception
public DataInput(java.lang.String directory, java.lang.String[] files, java.lang.String ext, java.lang.String channel) throws java.lang.Exception
java.lang.Exception
public DataInput(ij.ImagePlus image, java.util.HashMap<java.lang.String,ij.gui.Roi> roiList, java.util.HashMap<java.lang.String,java.lang.String> classMap, java.lang.String channel, int depth, int newwidth, int newheight) throws java.lang.Exception
image
- roiList
- HashMap with roi names for keys and Roi objects for valuesclassMap
- HashMap with roi names for keys and corresponding class names for valueschannel
- r, g or bdepth
- for 3D ROInewwidth
- only if need to resizenewheight
- only if need to resize
java.lang.Exception
public DataInput(java.lang.String directory, java.lang.String ext, java.lang.String channel, boolean useDirStructureForTarget) throws java.lang.Exception
java.lang.Exception
Method Detail |
---|
public java.util.ArrayList<java.lang.Object> getStackData(int stackIndex) throws java.lang.Exception
java.lang.Exception
public java.lang.Object getData(int imgIndex, int stackIndex) throws java.lang.Exception
imgIndex
- start from 0stackIndex
- start from 1.
java.lang.Exception
public int getLength() throws java.lang.Exception
java.lang.Exception
public int getWidth() throws java.lang.Exception
java.lang.Exception
public int getHeight() throws java.lang.Exception
java.lang.Exception
public int getStackSize() throws java.lang.Exception
java.lang.Exception
public int getDepth() throws java.lang.Exception
java.lang.Exception
public java.lang.String[] getChildren() throws java.lang.Exception
java.lang.Exception
public boolean is3D()
public boolean isColor()
public void setDataNull()
public ij.ImagePlus getImagePlus(int i) throws java.lang.Exception
i
- The index of the image to be returned. (Ignored in ROI mode.)
java.lang.Exception
public ij.ImagePlus getROIImagePlus(int i) throws java.lang.Exception
java.lang.Exception
public int getImageType()
public boolean ofSameSize()
public java.util.ArrayList getAllStacksOfOneImage(int imageindex) throws java.lang.Exception
imageindex
-
java.lang.Exception
public int[] getWidthList() throws java.lang.Exception
java.lang.Exception
public int[] getHeightList() throws java.lang.Exception
java.lang.Exception
public int[] getDepthList() throws java.lang.Exception
java.lang.Exception
public int[][] getTargets()
public java.util.ArrayList<java.lang.String> getAnnotations()
public java.util.HashMap<java.lang.String,java.lang.String> getClassNames()
public void setChannel(java.lang.String channel)
channel
- public java.lang.String getChannel()
public boolean isDirectoryMode()
public int getMode()
public static java.lang.Object openOneImage(ij.ImagePlus imgp, int stackIndex, java.lang.String channel, int width, int height) throws java.lang.Exception
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |