Skip navigation links

Package com.github.celldynamics.quimp

This is the main package.

See: Description

Package com.github.celldynamics.quimp Description

This is the main package. Below there are fragments of QuimP architecture.

QCONF file description

The content of QCONF file is strictly related to the QuimP architecture. User is supposed to read JavaDoc documentation for particular classes to find what data are kept there. The starting point is the main container DataContainer that covers the whole QCONF structure. Briefly relations among classes used by DataContainer are:

Check also this repo: https://github.com/CellDynamics/QuimP-Python for more data-related QCONF scheme.

Architecture

Generating statistics files

Statistics generated by QuimP are related to cell shape and fluorescence distribution along cell cortex. They are stored in stQP.csv and QCONF files but they are built on different stages of processing. The general class relationship is as follows:

CellStatsEval depending how it is created, writes statistics to disk as stQP files or only computes them internally (they are computed as well for first case). They can be obtained by calling CellStatsEval.getStatH() which provides CellStats object that holds statistics for one cell for all frames (as List of FrameStatistics objects. FrameStatistics are computed by CellStatsEval and they are used by old path (paQP) to write stQP file. CellStats is wrapper to FrameStatistics[] that delivers List of FrameStatistics (stats for subsequent frames for one cell) to StatsCollection which gather statistics for all cells in experiments and then is serialized. DataContainer holds List of CellStats for every cell in experiment. Fitting statistic object into DataContainer:

Relevant part of code:
 
     DataContainer dt = new DataContainer(); // create container
     dt.BOAState = qState; // assign boa state to correct field
     dt.Stats = new StatsCollection();
     dt.Stats.copyFromCellStat(ret); // StatsHandler is initialized here.
     n = new Serializer<>(dt, quimpInfo);
     if (qState.boap.savePretty) // set pretty format if configured
         n.setPretty();
     n.save(qState.boap.deductNewParamFileName());
 
 
Some general dependencies:

Geometric properties of Shapes

  1. PointList PointsList
    1. Point coordinates PointsList.point - set during initialisation
    2. Linear index PointsList.position - set by Shape.setPositions()
    3. Normal vector PointsList.normal - set by PointsList.updateNormale(boolean) and Shape.updateNormals(boolean). Snakes have normals dependent on BOAState.SegParam.expandSnake whereas Outlines use inner==false in PointsList.updateNormale(boolean). Snakes are also reversed by Shape.makeAntiClockwise()
    4. Tangent PointsList.tan - set during updating normals Shape.updateNormals(boolean)
  2. Shape Shape
    1. Centroid Shape.centroid - set by Shape.calcCentroid()
  3. Snake Snake
    1. Bounds Snake.bounds - set by Snake.getBounds()
  4. Outline Outline
    1. Local curvature Vert.curvatureLocal - set by Outline.updateCurvature()

Segmentation

Read documentation of BOA_.runBoa(int, int), BOA_.tightenSnake(Snake), Constrictor, Constrictor.constrict(Snake, ij.process.ImageProcessor) and Constrictor.loosen(Nest, int)

Code rules

Other

Nondeterministic results

Many algorithms implemented in QuimP related to either Snake or Outline perform node removing from PointsList wrapped by Shape. If head node (can be Vert or Node object) is removed, new head is chosen randomly between next and previous element. This affects end result making it nondeterministic, especially for iterative shrinking like e.g. Outline.scaleOutline(double, double, double, double) or scaling in Snake. To make testing possible, threshold level defined in Shape is static and private to avoid accidental modification.

This filed can be overridden in setUp and restored in after:

 
 Field f = Shape.class.getDeclaredField("threshold");
 f.setAccessible(true);
 f.setDouble(Shape.class, 1.0);
 
 

Restoring Snake parameters

If Snake is given as pure list of points some remaining internal parameters can be restored as follows:
 
 Constrictor constrictor = new Constrictor();
 for (SnakeHandler sh : nest.getHandlers()) {
   for (int f = sh.getStartFrame(); f <= sh.getEndFrame(); f++) {
     sh.getBackupSnake(f).calcCentroid(); // called in Shape constructor
     sh.getBackupSnake(f).setPositions();
     sh.getBackupSnake(f).updateNormals(true);
     sh.getBackupSnake(f).getBounds(); // called in Snake constructor

     sh.getStoredSnake(f).calcCentroid();
     sh.getStoredSnake(f).setPositions();
     sh.getStoredSnake(f).updateNormals(true);
     sh.getStoredSnake(f).getBounds();

     constrictor.constrict(sh.getStoredSnake(f), ip.getStack().getProcessor(f));
     constrictor.constrict(sh.getBackupSnake(f), ip.getStack().getProcessor(f));
   }
   sh.getLiveSnake().calcCentroid();
   sh.getLiveSnake().setPositions();
   sh.getLiveSnake().updateNormals(true);
   sh.getLiveSnake().getBounds();
   constrictor.constrict(sh.getLiveSnake(), ip.getStack().getProcessor(sh.getStartFrame()));
 }
 
 
Some of them are computed in constructors.
Skip navigation links

Copyright © 2002–2019 Department of Computer Science, Warwick University. All rights reserved.