@ALDAOperator(genericExecutionMode=ALL, level=STANDARD) public class ImageDimensionReducer extends MTBOperator
This operator can for example be applied to generate a maximum projection of a z-stack, or to project images row- or columnwise.
Modifier and Type | Class and Description |
---|---|
private class |
ImageDimensionReducer.IntObject
Internal helper class for iterating over an image dimension.
|
static class |
ImageDimensionReducer.ReducerMethod
Methods for dimension reduction/projection.
|
Modifier and Type | Field and Description |
---|---|
private MTBImage |
inImg
Multi-dimensional input image or input stack.
|
private boolean |
projectAlongC
Enables/disables projection along c-dimension.
|
private boolean |
projectAlongT
Enables/disables projection along t-dimension.
|
private boolean |
projectAlongX
Enables/disables projection along x-dimension.
|
private boolean |
projectAlongY
Enables/disables projection along y-dimension.
|
private boolean |
projectAlongZ
Enables/disables projection along z-dimension.
|
private ImageDimensionReducer.ReducerMethod |
projMode
Projection mode.
|
private MTBImage |
resultImg
Result image (stack).
|
Constructor and Description |
---|
ImageDimensionReducer()
Constructor.
|
ImageDimensionReducer(MTBImage img,
boolean reduceX,
boolean reduceY,
boolean reduceZ,
boolean reduceT,
boolean reduceC,
ImageDimensionReducer.ReducerMethod method)
Constructor with arguments.
|
Modifier and Type | Method and Description |
---|---|
MTBImage |
getResultImg()
Get result image.
|
protected void |
operate() |
private MTBImage |
reduce()
Method which implements the dimension reduction.
|
void |
setInImg(MTBImage img)
Set input image.
|
void |
setReduceC(boolean value)
Enable/disable projection along c-dimension.
|
protected void |
setReduceT(boolean value)
Enable/disable projection along t-dimension.
|
void |
setReduceX(boolean value)
Enable/disable projection along x-dimension.
|
void |
setReduceY(boolean value)
Enable/disable projection along y-dimension.
|
void |
setReduceZ(boolean value)
Enable/disable projection along z-dimension.
|
void |
setReductionMode(ImageDimensionReducer.ReducerMethod value)
Specify projection mode.
|
readResolve
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getDocumentation, 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, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
@Parameter(label="Input image", required=true, dataIOOrder=-1, direction=IN, mode=STANDARD, description="Input image to reduce in dimension.") private MTBImage inImg
@Parameter(label="Reduction Mode", required=true, direction=IN, mode=STANDARD, dataIOOrder=0, description="Reduction mode.") private ImageDimensionReducer.ReducerMethod projMode
@Parameter(label="Project along x", required=true, dataIOOrder=1, direction=IN, mode=STANDARD, description="Select for projection along x-dimension.") private boolean projectAlongX
@Parameter(label="Project along y", required=true, dataIOOrder=2, direction=IN, mode=STANDARD, description="Select for projection along y-dimension.") private boolean projectAlongY
@Parameter(label="Project along z", required=true, dataIOOrder=3, direction=IN, mode=STANDARD, description="Select for projection along z-dimension.") private boolean projectAlongZ
@Parameter(label="Project along t", required=true, dataIOOrder=4, direction=IN, mode=STANDARD, description="Select for projection along t-dimension.") private boolean projectAlongT
@Parameter(label="Project along c", required=true, dataIOOrder=5, direction=IN, mode=STANDARD, description="Select for projection along c-dimension.") private boolean projectAlongC
@Parameter(label="Result image", dataIOOrder=0, direction=OUT, mode=STANDARD, description="Resulting dimension-reduced image.") private MTBImage resultImg
public ImageDimensionReducer() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.public ImageDimensionReducer(MTBImage img, boolean reduceX, boolean reduceY, boolean reduceZ, boolean reduceT, boolean reduceC, ImageDimensionReducer.ReducerMethod method) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
- Input image.reduceX
- Flag for x-dimension reduction.reduceY
- Flag for y-dimension reduction.reduceZ
- Flag for z-dimension reduction.reduceT
- Flag for t-dimension reduction.reduceC
- Flag for c-dimension reduction.method
- Reduction method.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
private MTBImage reduce()
public void setReduceZ(boolean value)
value
- If true, projection along z is enabled.public void setReduceC(boolean value)
value
- If true, projection along c is enabled.public void setReduceY(boolean value)
value
- If true, projection along y is enabled.public void setReduceX(boolean value)
value
- If true, projection along x is enabled.protected void setReduceT(boolean value)
value
- If true, projection along t is enabled.public void setReductionMode(ImageDimensionReducer.ReducerMethod value)
value
- Mode to apply.public void setInImg(MTBImage img)
img
- Image to process.public MTBImage getResultImg()
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.