de.unihalle.informatik.MiToBo.segmentation.activecontours.energies
Class MTBActiveContourEnergy_CVRegionFit

java.lang.Object
  extended by de.unihalle.informatik.MiToBo.segmentation.activecontours.energies.MTBActiveContourEnergy_CVRegionFit
Direct Known Subclasses:
MTBSnakeEnergyCD_CVRegionFit

public class MTBActiveContourEnergy_CVRegionFit
extends java.lang.Object

Active contour energy based on Chan-Vese region fitting for single contour.

This energy models the inner and outer regions of a contour by a Gaussian model, i.e. each region is specified by a mean intensity value and deviations from this value are penalized.

Note that class 0 is interpreted as background while class 1 is taken as foreground or contour interior. If the provided membership function represents more than two classes, only the first two of them are used and all others ignored.

Author:
moeller

Field Summary
protected  int[] areas
          Region sizes.
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 factor for inner region fit.
protected  double lambda_out
          Weighting factor for outer region fit.
protected  double[] means
          Average intensities.
protected  double[] means_compl
          Average intensities of non-regions.
 
Constructor Summary
MTBActiveContourEnergy_CVRegionFit()
          Default constructor.
MTBActiveContourEnergy_CVRegionFit(MTBImage im, double lin, double lout)
          Default constructor with arguments.
 
Method Summary
protected  double calcEnergy(MTBSegmentationInterface seg)
           
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.
 java.lang.String toString()
           
protected  void updateParameters(MTBSegmentationInterface mem)
          Updates parameters according to given membership.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

areas

protected transient int[] areas
Region sizes.


imgStatsOp

private transient CalcSegmentationStatistics imgStatsOp
Operator to calculate energy parameters, i.e., some statistical numbers on the regions of the segmentation.


inImg

@ALDClassParameter(label="Input Image",
                   mode=ADVANCED,
                   dataIOOrder=-10)
protected transient MTBImage inImg
Image to work on.


lambda_in

@ALDClassParameter(label="Interior Lambda",
                   mode=STANDARD,
                   dataIOOrder=-5)
protected double lambda_in
Weighting factor for inner region fit.


lambda_out

@ALDClassParameter(label="Exterior Lambda",
                   mode=STANDARD,
                   dataIOOrder=-4)
protected double lambda_out
Weighting factor for outer region fit.


means

protected transient double[] means
Average intensities.


means_compl

protected transient double[] means_compl
Average intensities of non-regions.

A non-region is the complement of a region with regarding the segmentation, i.e., subsumes all pixels belonging to any other region.

Constructor Detail

MTBActiveContourEnergy_CVRegionFit

public MTBActiveContourEnergy_CVRegionFit()
Default constructor.


MTBActiveContourEnergy_CVRegionFit

public MTBActiveContourEnergy_CVRegionFit(MTBImage im,
                                          double lin,
                                          double lout)
Default constructor with arguments.

Parameters:
im - Image to work on.
l_in - Weighting factor for inner region fit.
l_out - Weighting factor for outer region fit.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

calcEnergy

protected double calcEnergy(MTBSegmentationInterface seg)

getDerivative

protected double getDerivative(MTBSegmentationInterface seg,
                               int x,
                               int y,
                               int z)
Returns the energy derivative value at position (x,y,z).


getEnergyDerivativeMaxVal

protected double getEnergyDerivativeMaxVal()
Returns the maximum possible derivative value this energy may yield.

Returns:
Maximal derivative value.

getEnergyDerivativeMinVal

protected double getEnergyDerivativeMinVal()
Returns the minimum possible derivative value this energy may yield.

Returns:
Minimal derivative value.

getMeans

protected double[] getMeans()
Returns the average region intensities last calculated.

Returns:
List of the regions' average intensity values.

init

protected void init()
             throws MTBActiveContourException
Method to properly initialize instances of this class.

Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
MTBActiveContourException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

updateParameters

protected void updateParameters(MTBSegmentationInterface mem)
                         throws MTBActiveContourException
Updates parameters according to given membership.

Parameters:
mem - Current segmentation object.
Throws:
MTBActiveContourException