|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDData
de.unihalle.informatik.MiToBo.core.datatypes.MTBImageHistogram
@ALDParametrizedClass public class MTBImageHistogram
Class for generating intensity histograms of objects from class
MTBImage
.
Constructor Summary | |
---|---|
MTBImageHistogram(double[] vals,
int bins,
double lowBoundary,
double highBoundary)
Construct new histogram from array of values. |
|
MTBImageHistogram(MTBImage img)
construct a new MTBHistogram object from the given MTBImage number of bins is 256 and the histogram ranges from the smallest image value to the largest image value |
|
MTBImageHistogram(MTBImage img,
int bins)
construct a new MTBHistogram object from the given MTBImage the histogram ranges from the smallest image value to the largest image value |
|
MTBImageHistogram(MTBImage img,
int bins,
double lowBoundary,
double highBoundary)
construct a histogram for the given input image with specification of binning and value range all MTBImage types except RGB type are supported |
|
MTBImageHistogram(MTBImage img,
MTBImage mask,
int bins)
construct a new MTBHistogram object from the given MTBImage the histogram ranges from the smallest image value to the largest image value |
|
MTBImageHistogram(MTBImage img,
MTBImage mask,
int bins,
double lowBoundary,
double highBoundary)
construct a histogram for the given input image only for the pixels specified by a binary mask all MTBImage types except RGB type are supported with specification of binning and value range |
Method Summary | |
---|---|
void |
add(MTBImageHistogram h)
add histogram data to this MTBHistogram object. |
void |
binning(int bins)
change the binning of the histogram |
void |
cumulate()
calculate the cumulative histogram |
void |
cumulateOnly()
calculate the cumulative histogram without changing the sum of absolute frequencies (normalizing factor), because cumulate() calls initialize() and thus destroys this normalizing factor |
int |
getBinIndex(double value)
determines the index of the histogram bin, to which a value is assigned, if histogram value range and binning were specified at creation |
double |
getBinMidpoint(int binIndex)
determines the value midpoint of a histogram bin for given bin index, if histogram value range and binning were specified at creation |
double |
getBinValue(int i)
|
double[] |
getData()
|
int |
getLargestNonEmptyBin()
|
double |
getMaxValue()
|
double |
getMaxValueBin()
|
double |
getMean()
|
double |
getNumEntries()
|
int |
getSize()
|
int |
getSmallestNonEmptyBin()
|
double |
getStdDev()
|
double |
getSum()
|
double |
getVariance()
|
void |
logarithmize()
calculate the logarithmic (base e) histogram; entries smaller than one become zero! |
double |
mapIndexToValue(int index)
|
void |
normalize()
normalize the histogram |
void |
normalizeOnly()
normalize the histogram without changing the sum of absolute frequencies (normalizing factor), because normalize() calls initialize() and thus destroys this normalizing factor. |
void |
save(String fileName)
write the histogram data into a text file |
void |
setBinValue(int i,
double val)
set the bin value at i-th position |
String |
toString()
|
void |
truncate(int l,
int r)
truncate the histogram to the specified interval |
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDData |
---|
cloneProperties, getLocation, getProperty, getPropertyKeys, print, setLocation, setProperty |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MTBImageHistogram(MTBImage img, int bins, double lowBoundary, double highBoundary) throws IllegalArgumentException
img
- input image for which the histogram is calculatedbins
- number of histogram binslowBoundary
- determines the lower boundary of the first binhighBoundary
- determines the upper boundary of the last bin
IllegalArgumentException
- if an RGB image is given as inputpublic MTBImageHistogram(MTBImage img, MTBImage mask, int bins, double lowBoundary, double highBoundary) throws IllegalArgumentException
img
- input image for which the histogram is calculatedmask
- binary mask specifying which pixels are considered for the creation of the histogram.
A value of zeor in the mask image indicates this pixel not to be consideredbins
- number of histogram binslowBoundary
- determines the lower boundary of the first binhighBoundary
- determines the upper boundary of the last bin
IllegalArgumentException
- if an RGB image is given as inputpublic MTBImageHistogram(MTBImage img, MTBImage mask, int bins)
img
- MTBImagemask
- binary mask specifying which pixels are considered for the creation of the histogrambins
- number of binspublic MTBImageHistogram(MTBImage img, int bins)
img
- MTBImagebins
- number of binspublic MTBImageHistogram(MTBImage img)
img
- MTBImagepublic MTBImageHistogram(double[] vals, int bins, double lowBoundary, double highBoundary)
vals
- Valuesbins
- Number of bins.lowBoundary
- Lower boundary of first bin.highBoundary
- Upper boundary of last bin.Method Detail |
---|
public int getBinIndex(double value)
value
- image value
public double getBinMidpoint(int binIndex)
binIndex
- bin index
public double getBinValue(int i)
i
- position
public double mapIndexToValue(int index)
index
-
public void setBinValue(int i, double val)
i
- positionval
- bin valuepublic double getMaxValue()
public double getMaxValueBin()
public double getMean()
public double getVariance()
public double getStdDev()
public String toString()
toString
in class Object
public void add(MTBImageHistogram h) throws IllegalArgumentException
h
- MTBHistogram to add
IllegalArgumentException
public void normalize()
public void normalizeOnly()
public void truncate(int l, int r)
l
- left borderr
- right borderpublic void binning(int bins)
bins
- number of binspublic void logarithmize()
public void cumulate()
public void cumulateOnly()
public double[] getData()
public int getSize()
public int getSmallestNonEmptyBin()
public int getLargestNonEmptyBin()
public double getSum()
public double getNumEntries()
public void save(String fileName)
fileName
- file name for histogram data
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |