All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.celldynamics.quimp.filesystem.StatsCollection Maven / Gradle / Ivy

Go to download

QuimP software, a set of plugins for ImageJ to quantify spatio-temporal patterns of fluorescently labeled proteins in the cortex of moving cells.

The newest version!
package com.github.celldynamics.quimp.filesystem;

import java.util.ArrayList;
import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.github.celldynamics.quimp.CellStats;
import com.github.celldynamics.quimp.CellStatsEval;

/**
 * Keep statistics for cells.
 * 
 * 

This class is used as storage of frame statistics in * {@link com.github.celldynamics.quimp.filesystem.DataContainer}. * * @author p.baniukiewicz * */ public class StatsCollection implements IQuimpSerialize { /** * The Constant LOGGER. */ static final Logger LOGGER = LoggerFactory.getLogger(StatsCollection.class.getName()); /** * List of statistic objects for separate cells. */ public ArrayList sHs; /** * Create size elements in store for {@link CellStats} objects. * *

Size of the store usually equals to the number of cells in the image. * * @param size Number of cells */ public StatsCollection(int size) { sHs = new ArrayList<>(size); } /** * Default constructor. * *

Create empty store for {@link CellStats} objects. */ public StatsCollection() { sHs = new ArrayList<>(); } /* * (non-Javadoc) * * @see com.github.celldynamics.quimp.IQuimpSerialize#beforeSerialize() */ @Override public void beforeSerialize() { } /* * (non-Javadoc) * * @see com.github.celldynamics.quimp.IQuimpSerialize#afterSerialize() */ @Override public void afterSerialize() throws Exception { } /** * Bridge method to maintain compatibility with old code. Copies statistics from CellStat * objects into internal fields of StatsHandler. * * @param in List of CellStat objects - size of this list equals to number of cells. Each * {@link CellStats} object maintain statistic for one cell along all frames. */ public void copyFromCellStat(List in) { in.forEach(cl -> sHs.add(cl.getStatH())); } /** * Get stats collection object wrapped by this class. * * @return the sHs */ public ArrayList getStatCollection() { return sHs; } /** * Set stats collection object wrapped by this class. * * @param shs the sHs to set */ public void setStatCollection(ArrayList shs) { this.sHs = shs; } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy