public class MTBActiveContourEnergy_CVRegionFit extends Object
This energy models the inner and outer regions of a single contour by a Gaussian model, i.e. each of the two regions is characterized by a mean intensity value, and deviations from this value are penalized. The energy is defined as follows:
Note that class 0 is interpreted as background while class 1 is taken as foreground or contour interior. If there are additional labels present in the given segmentation they are ignored.
Papers:
Modifier and Type | Field and Description |
---|---|
protected int[] |
areas
Region sizes, entry with index 0 is assumed to refer to background.
|
protected int |
iChannels
Number of channels of the image.
|
private CalcSegmentationStatistics |
imgStatsOp
Operator to calculate energy parameters, i.e., some statistical
numbers on the regions of the segmentation.
|
protected MTBImage |
inImg
Image to work on.
|
protected double[] |
lambda_in
Weighting factors for inner region fit, one for each channel.
|
protected double[] |
lambda_out
Weighting factors for outer region fit, one for each channel.
|
protected double[][] |
means
Average intensities per region, first index refers to channel.
|
Constructor and Description |
---|
MTBActiveContourEnergy_CVRegionFit()
Default constructor.
|
MTBActiveContourEnergy_CVRegionFit(MTBImage im,
double[] lin,
double[] lout)
Default constructor with arguments.
|
Modifier and Type | Method and Description |
---|---|
protected double |
calcEnergy(MTBSegmentationInterface seg)
Calculates the absolute energy value for the given segmentation.
|
protected double |
calcInteriorEnergy(MTBSegmentationInterface seg)
Calculates the interior part of energy value for the given
segmentation.
|
protected double |
getDerivative(MTBSegmentationInterface seg,
int x,
int y,
int z)
Returns the energy derivative value at position (x,y,z).
|
protected double |
getEnergyDerivativeMaxVal()
Returns the maximum possible derivative value this energy may yield.
|
protected double |
getEnergyDerivativeMinVal()
Returns the minimum possible derivative value this energy may yield.
|
protected double[][] |
getMeans()
Returns the average region intensities last calculated.
|
protected void |
init()
Method to properly initialize instances of this class.
|
String |
toString() |
protected void |
updateParameters(MTBSegmentationInterface mem)
Updates parameters according to given membership.
|
@ALDClassParameter(label="Input Image", mode=ADVANCED, dataIOOrder=-10) protected transient MTBImage inImg
@ALDClassParameter(label="Interior Lambdas per Channel", mode=STANDARD, dataIOOrder=-5) protected double[] lambda_in
@ALDClassParameter(label="Exterior Lambdas per Channel", mode=STANDARD, dataIOOrder=-4) protected double[] lambda_out
private transient CalcSegmentationStatistics imgStatsOp
protected transient int[] areas
protected transient double[][] means
protected transient int iChannels
public MTBActiveContourEnergy_CVRegionFit()
public MTBActiveContourEnergy_CVRegionFit(MTBImage im, double[] lin, double[] lout)
im
- Image to work on.l_in
- Weighting factors for inner region fit.l_out
- Weighting factors for outer region fit.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected void init() throws MTBActiveContourException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
MTBActiveContourException
protected void updateParameters(MTBSegmentationInterface mem) throws MTBActiveContourException
mem
- Current segmentation object.MTBActiveContourException
protected double getDerivative(MTBSegmentationInterface seg, int x, int y, int z)
protected double calcEnergy(MTBSegmentationInterface seg)
seg
- Segmentation to consider.protected double calcInteriorEnergy(MTBSegmentationInterface seg)
seg
- Segmentation to consider.protected double getEnergyDerivativeMaxVal()
protected double getEnergyDerivativeMinVal()
protected double[][] getMeans()
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.