Search in sources :

Example 6 with ImageStatistics

use of cbit.vcell.VirtualMicroscopy.Image.ImageStatistics in project vcell by virtualcell.

the class ImageDataset method getImageStatistics.

public ImageStatistics getImageStatistics() {
    ImageStatistics allImageStatistics = new ImageStatistics();
    for (int i = 0; i < getAllImages().length; i++) {
        ImageStatistics imageStatistics = getAllImages()[i].getImageStatistics();
        if (i == 0) {
            allImageStatistics.maxValue = imageStatistics.maxValue;
            allImageStatistics.minValue = imageStatistics.minValue;
            allImageStatistics.meanValue = imageStatistics.meanValue / getAllImages().length;
        } else {
            allImageStatistics.maxValue = Math.max(allImageStatistics.maxValue, imageStatistics.maxValue);
            allImageStatistics.minValue = Math.min(allImageStatistics.minValue, imageStatistics.minValue);
            allImageStatistics.meanValue += imageStatistics.meanValue / getAllImages().length;
        }
    }
    return allImageStatistics;
}
Also used : ImageStatistics(cbit.vcell.VirtualMicroscopy.Image.ImageStatistics)

Example 7 with ImageStatistics

use of cbit.vcell.VirtualMicroscopy.Image.ImageStatistics in project vcell by virtualcell.

the class ImageTimeSeries method getImageStatistics.

public ImageStatistics getImageStatistics() {
    ImageStatistics allImageStatistics = new ImageStatistics();
    for (int i = 0; i < getAllImages().length; i++) {
        ImageStatistics imageStatistics = getAllImages()[i].getImageStatistics();
        if (i == 0) {
            allImageStatistics.maxValue = imageStatistics.maxValue;
            allImageStatistics.minValue = imageStatistics.minValue;
            allImageStatistics.meanValue = imageStatistics.meanValue / getAllImages().length;
        } else {
            allImageStatistics.maxValue = Math.max(allImageStatistics.maxValue, imageStatistics.maxValue);
            allImageStatistics.minValue = Math.min(allImageStatistics.minValue, imageStatistics.minValue);
            allImageStatistics.meanValue += imageStatistics.meanValue / getAllImages().length;
        }
    }
    return allImageStatistics;
}
Also used : ImageStatistics(cbit.vcell.VirtualMicroscopy.Image.ImageStatistics)

Aggregations

ImageStatistics (cbit.vcell.VirtualMicroscopy.Image.ImageStatistics)7 UShortImage (cbit.vcell.VirtualMicroscopy.UShortImage)4 Point (java.awt.Point)3 Image (cbit.vcell.VirtualMicroscopy.Image)2 ROI (cbit.vcell.VirtualMicroscopy.ROI)2 BufferedImage (java.awt.image.BufferedImage)1 DataBufferByte (java.awt.image.DataBufferByte)1 IndexColorModel (java.awt.image.IndexColorModel)1 Range (org.vcell.util.Range)1