|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDData
de.unihalle.informatik.MiToBo.core.datatypes.images.MTBImage
public abstract class MTBImage
Abstract wrapper class for easy access to hyperstacks.
Indices range is different from ImageJ. Here, indices in each dimension range from 0 to (dimSize - 1), while ImageJ stack indices range from 1 to dimSize. Subclasses implement the wrapper for different types.
Nested Class Summary | |
---|---|
protected static class |
MTBImage.FactoryMethod
methods to create new image from an existing one. used in MTBImageFactory |
class |
MTBImage.MTBImageFactory
A class for creating MTBImages which implements the MTBOperator. |
static class |
MTBImage.MTBImageType
MiToBo image types |
Field Summary | |
---|---|
protected ij.measure.Calibration |
calibration
calibration object (from ImageJ) |
protected int |
m_currentC
current c-coordinate, for 3D only access functions |
protected int |
m_currentSliceIdx
Index of the current slice. |
protected int |
m_currentT
current t-coordinate, for 3D only access functions |
protected ij.ImagePlus |
m_img
the underlying ImagePlus object |
protected ij.ImageStack |
m_imgStack
reference to the ImageStack object of the underlying ImagePlus object |
protected int |
m_sizeC
size of c-dimension |
protected int |
m_sizeStack
stacksize |
protected int |
m_sizeT
size of t-dimension |
protected int |
m_sizeX
size of x-dimension |
protected int |
m_sizeY
size of y-dimension |
protected int |
m_sizeZ
size of z-dimension |
protected String |
m_title
image title |
protected MTBImage.MTBImageType |
m_type
MiToBo image type |
static String |
UNTITLED
Title string for new and untitled images |
protected String |
xml
File description XML string if available |
Constructor Summary | |
---|---|
protected |
MTBImage()
Constructor for initializing an empty image (dimension sizes = -1). |
protected |
MTBImage(ij.ImagePlus img)
Constructor. |
Method Summary | |
---|---|
void |
adoptSliceLabels(MTBImage src)
Copy slice labels from src to this |
void |
close()
Close the displayed ImagePlus |
MTBImage |
convertType(MTBImage.MTBImageType type,
boolean scaleDown)
Create an image of given type from this image's values. |
MTBImage |
convertType(MTBOperator callingOperator,
MTBImage.MTBImageType type,
boolean scaleDown)
Create an image of given type from this image's values. |
void |
copyPhysicalProperties(MTBImage sourceImg)
Copy physical properties like stepsizes and units from sourceImg to this. |
static MTBImage |
createMTBImage(ij.ImagePlus img)
Factory method to create MTBImage objects. |
static MTBImage |
createMTBImage(int sizeX,
int sizeY,
int sizeZ,
int sizeT,
int sizeC,
MTBImage.MTBImageType type)
Factory method to create MTBImage objects with value 0 at each coordinate. |
static MTBImageByte |
createMTBImageByte(int sizeX,
int sizeY,
int sizeZ,
int sizeT,
int sizeC,
byte[][] data)
Creates an image of type MTBImage.MTBImageType.MTB_BYTE from
the given data array. |
void |
drawLine2D(int xstart,
int ystart,
int xend,
int yend,
int value)
Draws a 2D line into the current slice of the image. |
void |
drawPoint2D(int x,
int y,
int z,
int value,
int mode)
Draws a point at given position into the x-y-plane. |
MTBImage |
duplicate()
Duplicates the object. |
MTBImage |
duplicate(MTBOperator callingOperator)
Duplicates the object. |
boolean |
equals(MTBImage img)
Test if this object and img are of same type, have same size and same values |
boolean |
equalSize(MTBImage img)
Test if this object and img have the same size in x-, y-, z-, t- and c-dimension |
void |
fillBlack()
|
void |
fillWhite()
|
ij.measure.Calibration |
getCalibration()
Get the calibration object. |
MTBImage |
getCurrentSlice()
Get a copy of the current slice. |
MTBImage |
getCurrentSlice(MTBOperator callingOperator)
Get a copy of the current slice. |
int[] |
getCurrentSliceCoords()
Get the current slice coordinates (z,t,c) (for functions that work on a slice only, this has nothing to do with the ij.ImageStack's current slice) |
int |
getCurrentSliceIndex()
Get the current slice index (for functions that work on a slice only, this has nothing to do with the ij.ImageStack's current slice) |
String |
getCurrentSliceLabel()
Get the slice label of the slice specified by the current slice index |
int[] |
getCurrentZStackCoords()
Get the current z-stack coordinates. [0]=t-coordinate, [1]=c-coordinate. |
MTBImage |
getImagePart(int x,
int y,
int z,
int t,
int c,
int sizeX,
int sizeY,
int sizeZ,
int sizeT,
int sizeC)
Get a copy of a part of this image as new MTBImage. |
MTBImage |
getImagePart(MTBOperator callingOperator,
int x,
int y,
int z,
int t,
int c,
int sizeX,
int sizeY,
int sizeZ,
int sizeT,
int sizeC)
Get a copy of a part of this image as new MTBImage. |
abstract ij.ImagePlus |
getImagePlus()
Get an ImagePlus object. |
abstract double[] |
getMinMaxDouble()
Get minimum and maximum value of the image as double |
abstract int[] |
getMinMaxInt()
Get minimum and maximum value of the image as int |
int |
getSizeC()
Get size of c(hannel)-dimension |
int |
getSizeStack()
Get size of the underlying (ImageJ) stack which corresponds to the number of slices |
int |
getSizeT()
Get size of t(ime)-dimension |
int |
getSizeX()
Get size of x-dimension |
int |
getSizeY()
Get size of y-dimension |
int |
getSizeZ()
Get size of z-dimension |
MTBImage |
getSlice(int z,
int t,
int c)
Get a copy of the specified slice. |
MTBImage |
getSlice(MTBOperator callingOperator,
int z,
int t,
int c)
Get a copy of the specified slice. |
String |
getSliceLabel(int z,
int t,
int c)
Get the slice label of the slice specified by (z,t,c) |
double |
getStepsizeT()
Get the stepsize in t-dimension (timestep) |
double |
getStepsizeX()
Get the physical size of a voxel (stepsize) in x-dimension |
double |
getStepsizeY()
Get the physical size of a voxel (stepsize) in y-dimension |
double |
getStepsizeZ()
Get the physical size of a voxel (stepsize) in z-dimension |
String |
getTitle()
Get the image's title |
static String |
getTitleRunning(String title)
Return a unique title for the copy of an image, i.e. a running number is appended/incremented. |
MTBImage.MTBImageType |
getType()
Get MiToBo image type |
double |
getTypeMax()
Return the maximum value that the current type can handle |
double |
getTypeMin()
Return the minimum value that the current type can handle |
static String |
getTypeName(int type)
Deprecated. |
String |
getUnitT()
Get the unit of the t-dimension |
String |
getUnitX()
Get the unit of the x-dimension |
String |
getUnitY()
Get the unit of the y-dimension |
String |
getUnitZ()
Get the unit of the z-dimension |
abstract double |
getValueDouble(int x,
int y)
Get the value of the current slice at coordinate (x,y) as an Double |
abstract double |
getValueDouble(int x,
int y,
int z)
Get the value of the current slice at coordinate (x,y,z) as an Double |
abstract double |
getValueDouble(int x,
int y,
int z,
int t,
int c)
Get the value of the 5D image at coordinate (x,y,z,t,c) as a Double |
abstract int |
getValueInt(int x,
int y)
Get the value of the current slice at coordinate (x,y) as an Integer |
abstract int |
getValueInt(int x,
int y,
int z)
Get the value of the current z-stack coordinate (x,y,z) as an Integer |
abstract int |
getValueInt(int x,
int y,
int z,
int t,
int c)
Get the value of the 5D image at coordinate (x,y,z,t,c) as an Integer |
String |
getXML()
Get the XML file description string if one was available. |
boolean |
hasImagePlus()
|
static boolean |
isValidType(MTBImage.MTBImageType type)
Deprecated. |
void |
keyPressed(KeyEvent e)
|
void |
keyReleased(KeyEvent e)
|
void |
keyTyped(KeyEvent e)
|
static MTBImage.MTBImageType |
ordinalToType(int enumIdx)
Return the corresponding MTBImageType for its index in the enum. |
abstract void |
putValueDouble(int x,
int y,
double value)
Set the value of the current slice at coordinate (x,y) using a Double |
abstract void |
putValueDouble(int x,
int y,
int z,
double value)
Set the value of the current slice at coordinate (x,y,z) using a Double |
abstract void |
putValueDouble(int x,
int y,
int z,
int t,
int c,
double value)
Set the value of the 5D image at coordinate (x,y,z,t,c) using a Double |
abstract void |
putValueInt(int x,
int y,
int value)
Set the value of the current slice at coordinate (x,y) using an Integer |
abstract void |
putValueInt(int x,
int y,
int z,
int value)
Set the value of the current slice at coordinate (x,y,z) using an Integer |
abstract void |
putValueInt(int x,
int y,
int z,
int t,
int c,
int value)
Set the value of the 5D image at coordinate (x,y,z,t,c) using an Integer |
MTBImageDouble |
scaleValues(int c,
int t,
double curMin,
double curMax,
double scaleMin,
double scaleMax)
Method to scale the intensity values (range [curMin, curMax]) of the image to a given range [scaleMin, scaleMax]. |
void |
setCalibration(ij.measure.Calibration _calibration)
Set the calibration object (see getCalibration() for further information). |
void |
setCurrentSlice(MTBImageManipulator src)
Copy the values of the source to the current slice |
void |
setCurrentSliceCoords(int z,
int t,
int c)
Set the current slice for functions that work on a slice only (this has nothing to do with the ij.ImageStack's current slice) |
void |
setCurrentSliceIndex(int stackindex)
Set the current slice for functions that work on a slice only (this has nothing to do with the ij.ImageStack's current slice) Stack indices range from 0 to N-1 (unlike ImageJ, where stack indices range from 1 to N) |
void |
setCurrentSliceLabel(String label)
Set the slice label of the slice specified by the current slice index |
void |
setCurrentZStackCoordinates(int t,
int c)
Set the current z-stack coordinates for functions that work on (spatial) 3D only. |
void |
setImagePart(MTBImageManipulator src,
int x,
int y,
int z,
int t,
int c)
Set a part of this image to the values of the source |
void |
setSlice(MTBImageManipulator src,
int z,
int t,
int c)
Copy the value of source to the specified slice |
void |
setSliceLabel(String label,
int z,
int t,
int c)
Set the slice label of the slice specified by (z,t,c) |
void |
setStepsizeT(double stepsize)
Set the stepsize in t-dimension (timestep) |
void |
setStepsizeX(double stepsize)
Set the physical size of a voxel (stepsize) in x-dimension |
void |
setStepsizeY(double stepsize)
Set the physical size of a voxel (stepsize) in y-dimension |
void |
setStepsizeZ(double stepsize)
Set the physical size of a voxel (stepsize) in z-dimension |
void |
setTitle(String title)
Set the image's title. |
void |
setUnitT(String unit)
Set the unit of the t-dimension |
void |
setUnitX(String unit)
Set the unit of the x-dimension |
void |
setUnitY(String unit)
Set the unit of the y-dimension |
void |
setUnitZ(String unit)
Set the unit of the z-dimension |
void |
setXML(String _xml)
Set the XML file description string if one was available |
void |
show()
Display the image as an ImagePlus. |
static MTBImage.MTBImageType |
stringToType(String s)
For a given String, return the corresponding MTBImageType. |
String |
toString()
Returns the String "IMG("title of the image")" |
void |
updateAndRepaintWindow()
Update and repaint the image window if the image is displayed by ImageJ |
protected abstract void |
updateImagePlus()
Should be used to create or update ImagePlus data if the MTBImage is not using an ImagePlus to store the data (MTB_INT, MTB_DOUBLE, MTB_RGB). |
protected void |
updateImageSize_ImgToProp()
Update the image size in the properties hashtable from the image's size |
protected void |
updatePhysProperties_ImgToProp()
Update physical properties (stepsizes, units) in the properties hashtable from its member variables |
protected void |
updatePhysProperties_PropToImg()
Update physical properties (stepsizes, units) of the image (member variables) from its properties hashtable |
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDData |
---|
cloneProperties, getLocation, getProperty, getPropertyKeys, print, setLocation, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String UNTITLED
protected ij.ImagePlus m_img
protected ij.ImageStack m_imgStack
protected int m_sizeX
protected int m_sizeY
protected int m_sizeZ
protected int m_sizeT
protected int m_sizeC
protected int m_sizeStack
protected MTBImage.MTBImageType m_type
protected int m_currentSliceIdx
This has nothing to do with the ij.ImageStack's current slice.
protected int m_currentT
protected int m_currentC
protected String m_title
protected ij.measure.Calibration calibration
protected String xml
Constructor Detail |
---|
protected MTBImage(ij.ImagePlus img)
img
- Wrapped ImagePlus object.protected MTBImage()
Method Detail |
---|
public ij.measure.Calibration getCalibration()
public void setCalibration(ij.measure.Calibration _calibration)
_calibration
- Calibration for image.public String getXML()
public void setXML(String _xml)
_xml
- @Deprecated public static boolean isValidType(MTBImage.MTBImageType type)
type
- Integer specifying a MTBImage type.
@Deprecated public static String getTypeName(int type)
type
- Numerical identifier for image.
public boolean equalSize(MTBImage img)
img
- image to compare with
public boolean equals(MTBImage img)
img
- image to compare with
public double getStepsizeX()
getStepsizeX
in interface MTBImageManipulator
public double getStepsizeY()
getStepsizeY
in interface MTBImageManipulator
public double getStepsizeZ()
getStepsizeZ
in interface MTBImageManipulator
public double getStepsizeT()
getStepsizeT
in interface MTBImageManipulator
public void setStepsizeX(double stepsize)
stepsize
- public void setStepsizeY(double stepsize)
stepsize
- public void setStepsizeZ(double stepsize)
stepsize
- public void setStepsizeT(double stepsize)
stepsize
- public String getUnitX()
getUnitX
in interface MTBImageManipulator
public String getUnitY()
getUnitY
in interface MTBImageManipulator
public String getUnitZ()
getUnitZ
in interface MTBImageManipulator
public String getUnitT()
getUnitT
in interface MTBImageManipulator
public void setUnitX(String unit)
unit
- String of x-dimension unitpublic void setUnitY(String unit)
unit
- String of y-dimension unitpublic void setUnitZ(String unit)
unit
- String of z-dimension unitpublic void setUnitT(String unit)
unit
- String of t-dimension unitpublic void copyPhysicalProperties(MTBImage sourceImg)
sourceImg
- protected void updatePhysProperties_PropToImg()
protected void updatePhysProperties_ImgToProp()
protected void updateImageSize_ImgToProp()
public String getTitle()
getTitle
in interface MTBImageManipulator
public void setTitle(String title)
title
- New title for image.
MTBImageException
public int getSizeX()
getSizeX
in interface MTBImageManipulator
public int getSizeY()
getSizeY
in interface MTBImageManipulator
public int getSizeZ()
getSizeZ
in interface MTBImageManipulator
public int getSizeT()
getSizeT
in interface MTBImageManipulator
public int getSizeC()
getSizeC
in interface MTBImageManipulator
public MTBImage.MTBImageType getType()
getType
in interface MTBImageManipulator
public int getSizeStack()
public double getTypeMax()
public double getTypeMin()
public int[] getCurrentSliceCoords()
public int getCurrentSliceIndex()
public void setCurrentSliceCoords(int z, int t, int c)
public void setCurrentSliceIndex(int stackindex)
stackindex
- index of the slice in the underlying (ImageJ) stackpublic int[] getCurrentZStackCoords()
public void setCurrentZStackCoordinates(int t, int c)
t
- current t-coordinatec
- current c-coordinatepublic void show()
public void updateAndRepaintWindow()
public void close()
public MTBImageDouble scaleValues(int c, int t, double curMin, double curMax, double scaleMin, double scaleMax) throws IllegalArgumentException
c
- current c-coordinate of channel dimensiont
- current t-coordinate of time dimensioncurMin
- minimal intensity value of the current imagecurMax
- maximal intensity value of the current imagescaleMin
- new minimal intensity value of the scaled imagescaleMax
- new maximal intensity value of the scaled image
IllegalArgumentException
- on illegal scaling valuespublic MTBImage convertType(MTBImage.MTBImageType type, boolean scaleDown)
type
- new image's type (see static final fields for types)scaleDown
- If true, the data is scaled down to fit in the range of the new
image type values, if the new image type is of less precision. If
false, the values are simply casted.
public MTBImage convertType(MTBOperator callingOperator, MTBImage.MTBImageType type, boolean scaleDown)
callingOperator
- the MTBOperator, which calls this methodtype
- new image's type (see static final fields for types)scaleDown
- If true, the data is scaled down to fit in the range of the new
image type values, if the new image type is of less precision. If
false, the values are simply casted.
public MTBImage getImagePart(int x, int y, int z, int t, int c, int sizeX, int sizeY, int sizeZ, int sizeT, int sizeC) throws IllegalArgumentException
x
- x-coordinate where the first value is copied fromy
- y-coordinate where the first value is copied fromz
- z-coordinate where the first value is copied fromt
- t-coordinate where the first value is copied fromc
- c-coordinate where the first value is copied fromsizeX
- size of the copied part in x-dimensionsizeY
- size of the copied part in y-dimensionsizeZ
- size of the copied part in z-dimensionsizeT
- size of the copied part in t-dimensionsizeC
- size of the copied part in c-dimension
IllegalArgumentException
- if image boundaries are exceeded in any waypublic MTBImage getImagePart(MTBOperator callingOperator, int x, int y, int z, int t, int c, int sizeX, int sizeY, int sizeZ, int sizeT, int sizeC) throws IllegalArgumentException
callingOperator
- the MTBOperator, which calls this methodx
- x-coordinate where the first value is copied fromy
- y-coordinate where the first value is copied fromz
- z-coordinate where the first value is copied fromt
- t-coordinate where the first value is copied fromc
- c-coordinate where the first value is copied fromsizeX
- size of the copied part in x-dimensionsizeY
- size of the copied part in y-dimensionsizeZ
- size of the copied part in z-dimensionsizeT
- size of the copied part in t-dimensionsizeC
- size of the copied part in c-dimension
IllegalArgumentException
- if image boundaries are exceeded in any waypublic void setImagePart(MTBImageManipulator src, int x, int y, int z, int t, int c) throws IllegalArgumentException
src
- source MTBImage (or MTBImageWindow)x
- x-coordinate where the first value is copied toy
- y-coordinate where the first value is copied toz
- z-coordinate where the first value is copied tot
- t-coordinate where the first value is copied toc
- c-coordinate where the first value is copied to
IllegalArgumentException
- if image boundaries are exceeded in any waypublic MTBImage getSlice(int z, int t, int c) throws IllegalArgumentException
z
- t
- c
-
IllegalArgumentException
- if z, c or t do not match the image sizepublic MTBImage getSlice(MTBOperator callingOperator, int z, int t, int c) throws IllegalArgumentException
callingOperator
- the MTBOperator, which calls this methodz
- t
- c
-
IllegalArgumentException
- if z, c or t do not match the image sizepublic MTBImage getCurrentSlice()
IllegalArgumentException
public MTBImage getCurrentSlice(MTBOperator callingOperator)
callingOperator
- the MTBOperator, which calls this method
IllegalArgumentException
public void setSlice(MTBImageManipulator src, int z, int t, int c) throws IllegalArgumentException
src
- z
- t
- c
-
IllegalArgumentException
public void setCurrentSlice(MTBImageManipulator src) throws IllegalArgumentException
src
-
IllegalArgumentException
public String toString()
toString
in class Object
public void drawLine2D(int xstart, int ystart, int xend, int yend, int value)
MTBImages are 5D, but here t- and c-dimensions are ignored. This function implements the Bresenham algorithm. Code was 'stolen' from Wikipedia, and then translated into Java (German comments where kept).
xstart
- x-coordinate of start point.ystart
- y-coordinate of start point.xend
- x-coordinate of end point.yend
- y-coordinate of end point.value
- Color/gray-scale value of the polygon.public void drawPoint2D(int x, int y, int z, int value, int mode)
MTBImages are 5D, but here t- and c-dimensions are ignored.
x
- x-coordinate of point.y
- y-coordinate of point.z
- z-coordinate of point.value
- Color/gray-scale value to be used.mode
- Shape of the point (0 = one pixel, 1 = X, 2 = cross)public String getCurrentSliceLabel()
public String getSliceLabel(int z, int t, int c)
z
- z-coordinate of desired label.t
- t-coordinate of desired label.c
- c-coordinate of desired label.
public void setCurrentSliceLabel(String label)
label
- public void setSliceLabel(String label, int z, int t, int c)
label
- z
- t
- c
- public void adoptSliceLabels(MTBImage src) throws IllegalArgumentException
src
-
IllegalArgumentException
public boolean hasImagePlus()
public abstract ij.ImagePlus getImagePlus()
(MTBImage)(ImagePlus.getProperty("MTBImage"))
;
protected abstract void updateImagePlus()
public abstract int getValueInt(int x, int y, int z, int t, int c)
getValueInt
in interface MTBImageManipulator
x
- x-coordinate ranging from 0 to (sizeX - 1)y
- y-coordinate ranging from 0 to (sizeY - 1)z
- z-coordinate ranging from 0 to (sizeZ - 1)t
- t-coordinate ranging from 0 to (sizeT - 1)c
- c-coordinate ranging from 0 to (sizeC - 1)
public abstract double getValueDouble(int x, int y, int z, int t, int c)
getValueDouble
in interface MTBImageManipulator
x
- x-coordinate ranging from 0 to (sizeX - 1)y
- y-coordinate ranging from 0 to (sizeY - 1)z
- z-coordinate ranging from 0 to (sizeZ - 1)t
- t-coordinate ranging from 0 to (sizeT - 1)c
- c-coordinate ranging from 0 to (sizeC - 1)
public abstract void putValueInt(int x, int y, int z, int t, int c, int value)
putValueInt
in interface MTBImageManipulator
x
- x-coordinate ranging from 0 to (sizeX - 1)y
- y-coordinate ranging from 0 to (sizeY - 1)z
- z-coordinate ranging from 0 to (sizeZ - 1)t
- t-coordinate ranging from 0 to (sizeT - 1)c
- c-coordinate ranging from 0 to (sizeC - 1)value
- to set the voxel topublic abstract void putValueDouble(int x, int y, int z, int t, int c, double value)
putValueDouble
in interface MTBImageManipulator
x
- x-coordinate ranging from 0 to (sizeX - 1)y
- y-coordinate ranging from 0 to (sizeY - 1)z
- z-coordinate ranging from 0 to (sizeZ - 1)t
- t-coordinate ranging from 0 to (sizeT - 1)c
- c-coordinate ranging from 0 to (sizeC - 1)value
- to set the voxel topublic abstract int getValueInt(int x, int y, int z)
x
- x-coordinate ranging from 0 to (sizeX - 1)y
- y-coordinate ranging from 0 to (sizeY - 1)z
- z-coordinate ranging from 0 to (sizeZ - 1)
public abstract double getValueDouble(int x, int y, int z)
x
- x-coordinate ranging from 0 to (sizeX - 1)y
- y-coordinate ranging from 0 to (sizeY - 1)z
- z-coordinate ranging from 0 to (sizeZ - 1)
public abstract void putValueInt(int x, int y, int z, int value)
x
- x-coordinate ranging from 0 to (sizeX - 1)y
- y-coordinate ranging from 0 to (sizeY - 1)z
- z-coordinate ranging from 0 to (sizeZ - 1)value
- to set the voxel topublic abstract void putValueDouble(int x, int y, int z, double value)
x
- x-coordinate ranging from 0 to (sizeX - 1)y
- y-coordinate ranging from 0 to (sizeY - 1)z
- z-coordinate ranging from 0 to (sizeZ - 1)value
- to set the voxel topublic abstract int getValueInt(int x, int y)
x
- x-coordinate ranging from 0 to (sizeX - 1)y
- y-coordinate ranging from 0 to (sizeY - 1)
public abstract double getValueDouble(int x, int y)
x
- x-coordinate ranging from 0 to (sizeX - 1)y
- y-coordinate ranging from 0 to (sizeY - 1)
public void fillWhite()
public void fillBlack()
public abstract void putValueInt(int x, int y, int value)
x
- x-coordinate ranging from 0 to (sizeX - 1)y
- y-coordinate ranging from 0 to (sizeY - 1)value
- to set the voxel topublic abstract void putValueDouble(int x, int y, double value)
x
- x-coordinate ranging from 0 to (sizeX - 1)y
- y-coordinate ranging from 0 to (sizeY - 1)value
- to set the voxel topublic abstract int[] getMinMaxInt()
public abstract double[] getMinMaxDouble()
public MTBImage duplicate()
public MTBImage duplicate(MTBOperator callingOperator)
callingOperator
- the MTBOperator, which calls this method
public static MTBImage.MTBImageType stringToType(String s)
s
- String must be one of "MTB_BYTE", "MTB_SHORT", "MTB_INT", "MTB_FLOAT", "MTB_DOUBLE", "MTB_RGB"
public static MTBImage.MTBImageType ordinalToType(int enumIdx)
enumIdx
- Type identifier.
public void keyPressed(KeyEvent e)
keyPressed
in interface KeyListener
public void keyReleased(KeyEvent e)
keyReleased
in interface KeyListener
public void keyTyped(KeyEvent e)
keyTyped
in interface KeyListener
public static MTBImage createMTBImage(ij.ImagePlus img) throws IllegalArgumentException
img
- ImagePlus object to wrap
IllegalArgumentException
- for unsupported typespublic static MTBImage createMTBImage(int sizeX, int sizeY, int sizeZ, int sizeT, int sizeC, MTBImage.MTBImageType type) throws IllegalArgumentException
sizeX
- size in x-dimensionsizeY
- size in y-dimensionsizeZ
- size in z-dimensionsizeT
- size in t-dimensionsizeC
- size in c-dimensiontype
- image type (one of MTB_BYTE, MTB_SHORT, MTB_INT, MTB_FLOAT,
MTB_DOUBLE)
IllegalArgumentException
public static MTBImageByte createMTBImageByte(int sizeX, int sizeY, int sizeZ, int sizeT, int sizeC, byte[][] data) throws IllegalArgumentException
MTBImage.MTBImageType.MTB_BYTE
from
the given data array.
The array should contain for each xy-slice of the image a 1D-array, and the c,t and z dimensions should multiply to the number of slices given. Note that the dimension of the array must be consistent with the requested size of the image, if not, an exception occurs.
sizeX
- Size of new image in x dimension.sizeY
- Size of new image in y dimension.sizeZ
- Size of new image in z dimension.sizeT
- Size of new image in t dimension.sizeC
- Size of new image in c dimension.data
- Data array.
IllegalArgumentException
public static String getTitleRunning(String title)
title
- of the original image
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |