public class MTBImageWindow extends Object implements MTBImageManipulator
Modifier and Type | Class and Description |
---|---|
static class |
MTBImageWindow.BoundaryPadding
Padding of image: Method of how to obtain pixel values outside the image domain
|
Modifier and Type | Field and Description |
---|---|
protected MTBImageManipulator |
m_impulator
source image on which the window is applied
|
protected MTBImageWindow.BoundaryPadding |
m_padMode
padding mode for nonexistent values (outside the underlying image), see static finals
|
protected int |
m_posC
current c-position of the window in the source image
|
protected int |
m_posT
current t-position of the window in the source image
|
protected int |
m_posX
current x-position of the window in the source image
|
protected int |
m_posY
current y-position of the window in the source image
|
protected int |
m_posZ
current z-position of the window in the source image
|
protected int |
m_sizeC
size of the window in c-dimension
|
protected int |
m_sizeT
size of the window in t-dimension
|
protected int |
m_sizeX
size of the window in x-dimension
|
protected int |
m_sizeY
size of the window in y-dimension
|
protected int |
m_sizeZ
size of the window in z-dimension
|
Constructor and Description |
---|
MTBImageWindow(int sizeX,
int sizeY,
int sizeZ,
int sizeT,
int sizeC,
MTBImageManipulator sourceImage,
MTBImageWindow.BoundaryPadding paddingMode)
Create a new window on a given source MTBImageManipulator (i.e.
|
Modifier and Type | Method and Description |
---|---|
MTBImage |
createImageFromWindow() |
int |
getSizeC()
Get window size in c-dimension
|
int |
getSizeT()
Get window size in t-dimension
|
int |
getSizeX()
Get window size in x-dimension
|
int |
getSizeY()
Get window size in y-dimension
|
int |
getSizeZ()
Get window size in z-dimension
|
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 title of underlying image
|
MTBImage.MTBImageType |
getType()
Get underlying data type
|
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
|
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
|
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
|
int[] |
getWindowPosition()
Get the current window position
|
void |
incrPositionC()
Increment the window's position by 1 in the c-dimension
|
void |
incrPositionC(int increment)
Increment the window's position by 'increment' in the c-dimension
|
void |
incrPositionT()
Increment the window's position by 1 in the t-dimension
|
void |
incrPositionT(int increment)
Increment the window's position by 'increment' in the t-dimension
|
void |
incrPositionX()
Increment the window's position by 1 in the x-dimension
|
void |
incrPositionX(int increment)
Increment the window's position by 'increment' in the x-dimension
|
void |
incrPositionY()
Increment the window's position by 1 in the y-dimension
|
void |
incrPositionY(int increment)
Increment the window's position by 'increment' in the y-dimension
|
void |
incrPositionZ()
Increment the window's position by 1 in the z-dimension
|
void |
incrPositionZ(int increment)
Increment the window's position by 'increment' in the z-dimension
|
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
|
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
|
void |
setPositionC(int c)
Set the window's position to 'c' in the c-dimension
|
void |
setPositionT(int t)
Set the window's position to 't' in the t-dimension
|
void |
setPositionX(int x)
Set the window's position to 'x' in the x-dimension
|
void |
setPositionY(int y)
Set the window's position to 'y' in the y-dimension
|
void |
setPositionZ(int z)
Set the window's position to 'z' in the z-dimension
|
void |
setSource(MTBImageManipulator sourceImage)
Set a new source for the window.
|
void |
setWindowPosition(int x,
int y,
int z,
int t,
int c)
Set the window's position in the source image.
|
protected int m_sizeX
protected int m_sizeY
protected int m_sizeZ
protected int m_sizeT
protected int m_sizeC
protected MTBImageManipulator m_impulator
protected int m_posX
protected int m_posY
protected int m_posZ
protected int m_posT
protected int m_posC
protected MTBImageWindow.BoundaryPadding m_padMode
public MTBImageWindow(int sizeX, int sizeY, int sizeZ, int sizeT, int sizeC, MTBImageManipulator sourceImage, MTBImageWindow.BoundaryPadding paddingMode)
sizeX
- size of the window in x-dimensionsizeY
- size of the window in y-dimensionsizeZ
- size of the window in z-dimensionsizeT
- size of the window in t-dimensionsizeC
- size of the window in c-dimensionsourceImage
- source image on which the window is appliedpaddingMode
- public void setSource(MTBImageManipulator sourceImage)
sourceImage
- source image on which the window is appliedpublic MTBImage createImageFromWindow()
public String getTitle()
getTitle
in interface MTBImageManipulator
public MTBImage.MTBImageType getType()
getType
in interface MTBImageManipulator
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 double getValueDouble(int x, int y, int z, int t, int c)
getValueDouble
in interface MTBImageManipulator
x
- x-coordinatey
- y-coordinatez
- z-coordinatet
- t-coordinatec
- c-coordinatepublic int getValueInt(int x, int y, int z, int t, int c)
getValueInt
in interface MTBImageManipulator
x
- x-coordinatey
- y-coordinatez
- z-coordinatet
- t-coordinatec
- c-coordinatepublic void putValueDouble(int x, int y, int z, int t, int c, double value)
putValueDouble
in interface MTBImageManipulator
x
- x-coordinatey
- y-coordinatez
- z-coordinatet
- t-coordinatec
- c-coordinatevalue
- to set the voxel topublic void putValueInt(int x, int y, int z, int t, int c, int value)
putValueInt
in interface MTBImageManipulator
x
- x-coordinatey
- y-coordinatez
- z-coordinatet
- t-coordinatec
- c-coordinatevalue
- to set the voxel topublic void setWindowPosition(int x, int y, int z, int t, int c)
x
- x-coordinate in source imagey
- y-coordinate in source imagez
- z-coordinate in source imaget
- t-coordinate in source imagec
- c-coordinate in source imagepublic int[] getWindowPosition()
public void incrPositionX()
public void incrPositionX(int increment)
increment
- public void incrPositionY()
public void incrPositionY(int increment)
increment
- public void incrPositionZ()
public void incrPositionZ(int increment)
increment
- public void incrPositionT()
public void incrPositionT(int increment)
increment
- public void incrPositionC()
public void incrPositionC(int increment)
increment
- public void setPositionX(int x)
x
- public void setPositionY(int y)
y
- public void setPositionZ(int z)
z
- public void setPositionT(int t)
t
- public void setPositionC(int c)
c
- 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 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
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.