@ALDAOperator(genericExecutionMode=ALL, shortDescription="Applies a non-linear rank operator to the image.") public class RankOperator extends MTBOperator implements loci.common.StatusReporter
Modifier and Type | Class and Description |
---|---|
static class |
RankOperator.RankOpMode
Defines the operation
|
Modifier and Type | Field and Description |
---|---|
private MTBImage |
inImg |
private int |
m_idx
index of the minimum, median or maximum element in the sorted array
|
private int |
m_rC
Radius of the median in the corresponding dimension.
|
private int |
m_rT
Radius of the median in the corresponding dimension.
|
private int |
m_rX
Radius of the median in the corresponding dimension.
|
private int |
m_rY
Radius of the median in the corresponding dimension.
|
private int |
m_rZ
Radius of the median in the corresponding dimension.
|
private int |
m_sizeC
Size of the dimensions, size of the real stack.
|
private int |
m_sizeT
Size of the dimensions, size of the real stack.
|
private int |
m_sizeX
Size of the dimensions, size of the real stack.
|
private int |
m_sizeY
Size of the dimensions, size of the real stack.
|
private int |
m_sizeZ
Size of the dimensions, size of the real stack.
|
private Vector<loci.common.StatusListener> |
m_statusListeners
vector of installed StatusListeners
|
private int |
maskRadiusC |
private int |
maskRadiusT |
private int |
maskRadiusX |
private int |
maskRadiusY |
private int |
maskRadiusZ |
private RankOperator.RankOpMode |
rankOpMode |
private MTBImage |
resultImg |
Constructor and Description |
---|
RankOperator()
Constructor
|
RankOperator(MTBImage inImg,
RankOperator.RankOpMode mode,
int maskRadius)
Constructor
|
RankOperator(MTBImage inImg,
RankOperator.RankOpMode mode,
int maskRadiusX,
int maskRadiusY,
int maskRadiusZ,
int maskRadiusT,
int maskRadiusC)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addStatusListener(loci.common.StatusListener statuslistener) |
String |
getDocumentation() |
MTBImage |
getInImg()
Get value of Input argument inImg.
|
int |
getMaskRadiusC()
Get value of Parameter argument maskRadiusC.
|
int |
getMaskRadiusT()
Get value of Parameter argument maskRadiusT.
|
int |
getMaskRadiusX()
Get value of Parameter argument maskRadiusX.
|
int |
getMaskRadiusY()
Get value of Parameter argument maskRadiusY.
|
int |
getMaskRadiusZ()
Get value of Parameter argument maskRadiusZ.
|
RankOperator.RankOpMode |
getRankOpMode()
Get value of Parameter argument rankOpMode.
|
MTBImage |
getResultImg()
Get value of Output argument resultImg.
|
void |
notifyListeners(loci.common.StatusEvent e) |
protected void |
operate() |
private double |
rankedValueAt(int x,
int y,
int z,
int t,
int c,
MTBImage img,
double[] values)
Compute rank operator value for coordinate (x,y,z,t,c)
Treatment at boundaries: Image values are mirrored at the border element to determine
values under the mask that are outside the image.
|
protected MTBImage |
rankOp(MTBImage img,
RankOperator.RankOpMode mode,
int radiusX,
int radiusY,
int radiusZ,
int radiusT,
int radiusC)
Compute the rank operation of a gray-valued image, stack or hyperstack
|
void |
removeStatusListener(loci.common.StatusListener statuslistener) |
void |
setInImg(MTBImage img)
Set value of Input argument inImg.
|
void |
setMaskRadiusC(int value)
Set value of Parameter argument maskRadiusC.
|
void |
setMaskRadiusT(int value)
Set value of Parameter argument maskRadiusT.
|
void |
setMaskRadiusX(int value)
Set value of Parameter argument maskRadiusX.
|
void |
setMaskRadiusY(int value)
Set value of Parameter argument maskRadiusY.
|
void |
setMaskRadiusZ(int value)
Set value of Parameter argument maskRadiusZ.
|
void |
setRankOpMode(RankOperator.RankOpMode opMode)
Set value of Parameter argument rankOpMode.
|
protected void |
setResultImg(MTBImage img)
Set value of Output argument resultImg.
|
void |
validateCustom() |
readResolve
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getHidingMode, getInactiveParameterNames, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterDescriptorUnconditioned, getParameterNames, getParameterUnconditioned, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, hasInOutParameters, hasParameter, isAnnotatedParameter, isConfigured, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, removeParameter, runOp, runOp, runOp, setConstructionMode, setConstructionMode, setConstructionMode, setHidingMode, setName, setParameter, setParameterUnconditioned, setVerbose, toStringVerbose, unconfiguredItems, validate, validateGeneric, writeHistory, writeHistory, writeHistory
@Parameter(label="Input image", required=true, direction=IN, mode=STANDARD, dataIOOrder=1, description="Input image") private MTBImage inImg
@Parameter(label="Result image", required=true, direction=OUT, mode=STANDARD, dataIOOrder=1, description="Resulting image") private MTBImage resultImg
@Parameter(label="Rank operation", required=true, direction=IN, mode=STANDARD, dataIOOrder=2, description="Type of the rank operation") private RankOperator.RankOpMode rankOpMode
@Parameter(label="Mask-radius x", required=true, direction=IN, mode=ADVANCED, dataIOOrder=3, description="Radius of the mask in x-dimension in a city-block sense (rectangular mask)") private int maskRadiusX
@Parameter(label="Mask-radius y", required=true, direction=IN, mode=ADVANCED, dataIOOrder=4, description="Radius of the mask in y-dimension in a city-block sense (rectangular mask)") private int maskRadiusY
@Parameter(label="Mask-radius z", required=true, direction=IN, mode=ADVANCED, dataIOOrder=5, description="Radius of the mask in z-dimension in a city-block sense (rectangular mask)") private int maskRadiusZ
@Parameter(label="Mask-radius t", required=true, direction=IN, mode=ADVANCED, dataIOOrder=6, description="Radius of the mask in t-dimension in a city-block sense (rectangular mask)") private int maskRadiusT
@Parameter(label="Mask-radius c", required=true, direction=IN, mode=ADVANCED, dataIOOrder=7, description="Radius of the mask in c-dimension in a city-block sense (rectangular mask)") private int maskRadiusC
private int m_sizeX
private int m_sizeY
private int m_sizeZ
private int m_sizeT
private int m_sizeC
private int m_rX
private int m_rY
private int m_rZ
private int m_rT
private int m_rC
private Vector<loci.common.StatusListener> m_statusListeners
private int m_idx
public RankOperator() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public RankOperator(MTBImage inImg, RankOperator.RankOpMode mode, int maskRadius) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
inImg
- input imagemode
- rank operationmaskRadius
- mask radius in a city-block sense for cubic mask of size (2*maskRadius + 1) in x-, y-dimension and z-dimension if availablede.unihalle.informatik.Alida.exceptions.ALDOperatorException
- if given parameters are not validpublic RankOperator(MTBImage inImg, RankOperator.RankOpMode mode, int maskRadiusX, int maskRadiusY, int maskRadiusZ, int maskRadiusT, int maskRadiusC) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
inImg
- input imagemode
- rank operationmaskRadiusX
- mask radius in x-dimension in a city-block sense (rectangular mask)maskRadiusY
- mask radius in y-dimension in a city-block sense (rectangular mask)maskRadiusZ
- mask radius in z-dimension in a city-block sense (rectangular mask)maskRadiusT
- mask radius in t-dimension in a city-block sense (rectangular mask)maskRadiusC
- mask radius in c-dimension in a city-block sense (rectangular mask)de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- if given parameters are not validprotected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void validateCustom() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
validateCustom
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected MTBImage rankOp(MTBImage img, RankOperator.RankOpMode mode, int radiusX, int radiusY, int radiusZ, int radiusT, int radiusC)
img
- input MTBImageradius
- radius of the median maskmode
- rank operator modeprivate double rankedValueAt(int x, int y, int z, int t, int c, MTBImage img, double[] values)
x
- x-coordinatey
- y-coordinatez
- z-coordinatet
- t-coordinatec
- c-coordinateimg
- Image to compute the ranked value frompublic void addStatusListener(loci.common.StatusListener statuslistener)
addStatusListener
in interface loci.common.StatusReporter
public void removeStatusListener(loci.common.StatusListener statuslistener)
removeStatusListener
in interface loci.common.StatusReporter
public void notifyListeners(loci.common.StatusEvent e)
notifyListeners
in interface loci.common.StatusReporter
public int getMaskRadiusX()
public void setMaskRadiusX(int value)
value
- New value for maskRadiusXpublic int getMaskRadiusT()
public void setMaskRadiusT(int value)
value
- New value for maskRadiusTpublic RankOperator.RankOpMode getRankOpMode()
public void setRankOpMode(RankOperator.RankOpMode opMode)
value
- New value for rankOpModepublic int getMaskRadiusZ() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setMaskRadiusZ(int value) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
value
- New value for maskRadiusZde.unihalle.informatik.Alida.exceptions.ALDOperatorException
public int getMaskRadiusC() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setMaskRadiusC(int value) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
value
- New value for maskRadiusCde.unihalle.informatik.Alida.exceptions.ALDOperatorException
public int getMaskRadiusY() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setMaskRadiusY(int value) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
value
- New value for maskRadiusYde.unihalle.informatik.Alida.exceptions.ALDOperatorException
public MTBImage getInImg() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setInImg(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
value
- New value for inImgde.unihalle.informatik.Alida.exceptions.ALDOperatorException
public MTBImage getResultImg() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected void setResultImg(MTBImage img) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
value
- New value for resultImgde.unihalle.informatik.Alida.exceptions.ALDOperatorException
public String getDocumentation()
getDocumentation
in class de.unihalle.informatik.Alida.operator.ALDOperator
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.