@ALDAOperator(genericExecutionMode=NONE) public class UndecimatedWaveletTransform extends MTBOperatorControllable implements loci.common.StatusReporter
Modifier and Type | Class and Description |
---|---|
protected static class |
UndecimatedWaveletTransform.TransformationMode |
de.unihalle.informatik.Alida.operator.ALDOperatorControllable.OperatorControlStatus, de.unihalle.informatik.Alida.operator.ALDOperatorControllable.OperatorControlStatusHandle, de.unihalle.informatik.Alida.operator.ALDOperatorControllable.OperatorExecutionStatus
Modifier and Type | Field and Description |
---|---|
private Boolean |
denoise |
private MTBImage |
excludeMask |
private MTBImage |
img |
private Integer |
Jmax |
private MTBImage[] |
kernels |
private double[] |
m_sigmaScales
noise sigma scale factors for different wavelet scales
|
private Vector<loci.common.StatusListener> |
m_statusListeners
vector of installed StatusListeners
|
private static String |
opIdentifier
Identifier for outputs in verbose mode.
|
private UndecimatedWaveletTransform.TransformationMode |
transform |
private MTBImageSet |
uwtImages |
Constructor and Description |
---|
UndecimatedWaveletTransform()
Constructor with default Gaussian kernel [1/16, 1/4, 3/8, 1/4, 1/16] for dimension x, y and z,
no image and
denoise set to false. |
UndecimatedWaveletTransform(MTBImage _img,
int _Jmax,
boolean _denoise)
Constructor with default Gaussian kernel [1/16, 1/4, 3/8, 1/4, 1/16] for at most dimension x, y (and z if present).
|
UndecimatedWaveletTransform(MTBImage _img,
int _Jmax,
boolean _denoise,
boolean sigmaEqualsOne)
Constructor with default Gaussian kernel for sd = 1 [1/16, 1/4, 3/8, 1/4, 1/16] for at most dimension x, y (and z if present)
or sd=0.5 [0.0002638651, 0.1064507720, 0.7865707259, 0.1064507720, 0.0002638651] if
sigmaEqualsOne is false |
UndecimatedWaveletTransform(MTBImage _img,
int _Jmax,
boolean _denoise,
MTBImage[] _kernels)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addStatusListener(loci.common.StatusListener statuslistener) |
protected MTBImage[] |
aTrousDWT(MTBImage _img,
int _Jmax,
MTBImage[] _kernels)
A trous DWT
|
protected double[] |
computeSigmaScales()
Compute scaling factors of noise sigma for wavelet scales
(these scaling factors are estimated using a gaussian noise image with sigma=1 to measure noise in the wavelet scales)
|
protected MTBImage |
conv(MTBImage img,
MTBImage[] scaleOneKernels,
int j)
Convolve input image with an 'a trous' kernel (zeros inserted) given the original kernel and scale j
|
protected MTBImage |
createGaussianNoiseImage(double mean,
double sigma,
double clippingFactor,
int bins,
int sizeX,
int sizeY,
int sizeZ,
int sizeT,
int sizeC)
Create an image with Gaussian noise
|
protected void |
denoise(MTBImage img,
double sigma)
Denoise wavelet coefficients using Jeffrey's noninformative prior for a given sigma of noise
|
protected void |
denoiseDWTJeffreys(MTBImage[] dwt,
double scaleOneSigma,
double[] sigmaScales)
Denoise wavelet coefficients using Jeffrey's noninformative prior [..]
|
protected double |
get3SigClippedStdDev(MTBImage img)
Get the standard deviation (sigma) of an image only using values clipped by 3*sigma from a first estimate of sigma
|
boolean |
getDenoise()
Get the denoising flag. true if denoising is activated.
|
MTBImage |
getExcludeMask() |
MTBImage |
getImg()
Get reference to the (input) image.
|
int |
getJmax()
Get Jmax (maximum scale 2^Jmax - 1)
|
protected MTBImage[] |
getKernels()
Get smoothing kernels
|
protected double |
getSample(double[] cdf)
Returns a sample in the range [0, 1] from a cumulative distribution given by the array cdf
|
protected double |
getStdDev(MTBImage img)
Get standard deviation of the image
|
MTBImageSet |
getUWT()
Get the UWT coefficient images.
|
protected MTBImage |
inverseATrousDWT(MTBImage[] dwt)
Inverse a trous DWT
|
boolean |
isForwardTransform()
Test if parameter object is set to (forward) transform (image to wavelet)
|
boolean |
isInverseTransform()
Test if parameter object is set to Inverse Transform (wavelet to image)
|
void |
notifyListeners(loci.common.StatusEvent e) |
protected void |
operate() |
void |
removeStatusListener(loci.common.StatusListener statuslistener) |
protected void |
setDenoise(boolean denoise)
Set the denoising flag. true to activate denoising.
|
void |
setExcludeMask(MTBImage excludeMask) |
void |
setForwardTransform()
Toggle computation of the (forward) transform (image to wavelet)
|
void |
setImg(MTBImage img)
Set the image domain image
|
void |
setInverseTransform()
Set computation of the inverse transform (wavelet to image)
|
protected void |
setJmax(int Jmax)
Set Jmax (maximum scale 2^Jmax - 1)
|
protected void |
setKernels(MTBImage[] kernels)
Set smoothing kernels
|
void |
setUWT(MTBImageSet uwtImages)
Set UWT coefficient images
|
boolean |
supportsStepWiseExecution() |
addALDConfigurationEventListener, addALDControlEventListener, fireALDConfigurationEvent, fireALDControlEvent, getControlStatus, getControlStatusHandle, getExecutionStatus, handleALDConfigurationEvent, handleALDControlEvent, removeALDConfigurationEventListener, removeALDControlEventListener, setControlStatus, setNotifyRecursiveFlag
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, readResolve, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, removeParameter, runOp, runOp, runOp, setConstructionMode, setConstructionMode, setConstructionMode, setHidingMode, setName, setParameter, setParameterUnconditioned, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
private static final String opIdentifier
@Parameter(label="Kernels", required=true, direction=IN, mode=ADVANCED, dataIOOrder=1, description="A set of lowpass kernels interpreted as parts of a separable kernel") private MTBImage[] kernels
@Parameter(label="Type of transform", required=true, direction=IN, mode=STANDARD, dataIOOrder=4, description="Specifies if forward or backward transform is computed") private UndecimatedWaveletTransform.TransformationMode transform
@Parameter(label="Denoise", required=true, direction=IN, mode=ADVANCED, dataIOOrder=3, description="Specifies whether the wavelet coefficients will be denoised using Jeffrey\'s noninformative prior") private Boolean denoise
@Parameter(label="Jmax", required=true, direction=IN, mode=STANDARD, dataIOOrder=2, description="Maximum scale index (decimal > 0)") private Integer Jmax
@Parameter(label=" image", required=true, direction=IN, mode=STANDARD, dataIOOrder=1, description="Input image") private MTBImage img
@Parameter(label="mask image", required=false, direction=IN, mode=STANDARD, dataIOOrder=5, description="mask image used for denoising: a value of zero INCLUDES a pixel") private MTBImage excludeMask
@Parameter(label="UWT coefficient images", required=true, direction=OUT, mode=STANDARD, dataIOOrder=1, description="Images with UWT coefficients of the different scales") private MTBImageSet uwtImages
private Vector<loci.common.StatusListener> m_statusListeners
private final double[] m_sigmaScales
public UndecimatedWaveletTransform() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
denoise
set to false.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public UndecimatedWaveletTransform(MTBImage _img, int _Jmax, boolean _denoise, MTBImage[] _kernels) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
_img
- input image_Jmax
- maximum scale (2^Jmax - 1)_denoise
- reduction of gaussian noise_kernels
- an array of kernels, which are inflated for each scale and used to convolve the image consecutively, because a separable filter is expected to be specified by this arrayde.unihalle.informatik.Alida.exceptions.ALDOperatorException
public UndecimatedWaveletTransform(MTBImage _img, int _Jmax, boolean _denoise) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
- input imageJmax
- maximum scale (2^Jmax - 1)denoise
- reduction of gaussian noisede.unihalle.informatik.Alida.exceptions.ALDOperatorException
public UndecimatedWaveletTransform(MTBImage _img, int _Jmax, boolean _denoise, boolean sigmaEqualsOne) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
sigmaEqualsOne
is falseimg
- input imageJmax
- maximum scale (2^Jmax - 1)denoise
- reduction of gaussian noisede.unihalle.informatik.Alida.exceptions.ALDOperatorException
public boolean supportsStepWiseExecution()
supportsStepWiseExecution
in class de.unihalle.informatik.Alida.operator.ALDOperatorControllable
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected MTBImage inverseATrousDWT(MTBImage[] dwt) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
dwt
- DWT-coefficient imagesde.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected MTBImage[] aTrousDWT(MTBImage _img, int _Jmax, MTBImage[] _kernels) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected MTBImage conv(MTBImage img, MTBImage[] scaleOneKernels, int j) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
img
- input imagescaleOneKernels
- original kernel (without inserted zeros)j
- scale parameterde.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected void denoiseDWTJeffreys(MTBImage[] dwt, double scaleOneSigma, double[] sigmaScales)
dwt
- scaleOneSigma
- sigmaScales
- protected void denoise(MTBImage img, double sigma)
img
- input imagesigma
- sigma of noiseprotected double[] computeSigmaScales() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
p
- DWT configuration (only Jmax is important here)de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected double get3SigClippedStdDev(MTBImage img)
img
- input imageprotected double getStdDev(MTBImage img)
img
- input imageprotected MTBImage createGaussianNoiseImage(double mean, double sigma, double clippingFactor, int bins, int sizeX, int sizeY, int sizeZ, int sizeT, int sizeC)
mean
- sigma
- clippingFactor
- bins
- sizeX
- sizeY
- sizeZ
- sizeT
- sizeC
- protected double getSample(double[] cdf)
cdf
- cumulative distribution arraypublic boolean getDenoise()
protected void setDenoise(boolean denoise)
public MTBImage getImg()
public void setImg(MTBImage img)
public MTBImage getExcludeMask()
public void setExcludeMask(MTBImage excludeMask)
excludeMask
- the excludeMask to setpublic int getJmax()
protected void setJmax(int Jmax)
Jmax
- protected MTBImage[] getKernels()
protected void setKernels(MTBImage[] kernels)
public boolean isForwardTransform()
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setForwardTransform()
public boolean isInverseTransform() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setInverseTransform() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public MTBImageSet getUWT()
public void setUWT(MTBImageSet uwtImages)
public 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
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.