Constructor and Description |
---|
Histogram(HistogramBinMapper<T> mapper,
Img<T> image)
Create a Histogram using the given mapper, calculating from the given
Image.
|
Histogram(HistogramBinMapper<T> mapper,
RealCursor<T> c)
Create a Histogram using the given mapper, calculating from the given
Cursor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkInput() |
int |
getBin(int i)
Returns the bin count given by the indicated bin index.
|
int |
getBin(T t)
Returns the bin count corresponding to a given
Type . |
T |
getBinCenter(int i)
Creates and returns the a Type whose value corresponds to the center of
the bin indexed by i.
|
ArrayList<T> |
getBinCenters()
Creates and returns a List containing Types that correspond to the
centers of the histogram bins.
|
HistogramBinMapper<T> |
getBinMapper()
Returns this Histogram's HistogramBinMapper.
|
String |
getErrorMessage() |
int[] |
getHistogram()
Returns the histogram array.
|
int |
getNumBins()
Returns the number of bins in this Histogram.
|
long |
getProcessingTime() |
boolean |
process() |
void |
reset()
Resets the histogram array and the Cursor.
|
public Histogram(HistogramBinMapper<T> mapper, RealCursor<T> c)
mapper
- the HistogramBinMapper used to map Type values to histogram
bin indices.c
- a Cursor corresponding to the Image from which the Histogram
will be calculatedpublic Histogram(HistogramBinMapper<T> mapper, Img<T> image)
mapper
- the HistogramBinMapper used to map Type values to histogram
bin indices.image
- an Image from which the Histogram will be calculatedpublic void reset()
public int getBin(T t)
Type
.t
- the Type corresponding to the requestedpublic int getBin(int i)
i
- the index of the requested binpublic HistogramBinMapper<T> getBinMapper()
public int[] getHistogram()
public T getBinCenter(int i)
i
- the requested bin index.public ArrayList<T> getBinCenters()
public int getNumBins()
public boolean checkInput()
checkInput
in interface Algorithm
public String getErrorMessage()
getErrorMessage
in interface Algorithm
public long getProcessingTime()
getProcessingTime
in interface Benchmark
Copyright © 2015–2022 ImgLib2. All rights reserved.