public SegmentedCellImages(Cell cell) { this.cell = cell; images = new ImageInt[cell.getNbStructures(true)]; probabilityMap = new ImageFloat[cell.getNbStructures(false)]; distanceMap = new ImageFloat[cell.getNbStructures(true)]; objects = new Object3DVoxels[images.length][]; }
public synchronized ImageFloat getProbabilityMap(int structureIdx) { if (structureIdx <= 0 || structureIdx >= probabilityMap.length) return null; if (probabilityMap[structureIdx] == null || !probabilityMap[structureIdx].isOpened()) probabilityMap[structureIdx] = ((Structure) cell.getStructure(structureIdx)).openProbabilityMap(); return probabilityMap[structureIdx]; }
@Override public synchronized ImageInt getImage(int structureIdx) { if (structureIdx < 0 || structureIdx >= images.length) return null; if (images[structureIdx] == null || !images[structureIdx].isOpened()) images[structureIdx] = cell.getStructure(structureIdx).openSegmented(); return images[structureIdx]; }
public synchronized Object3DVoxels[] getObjects(int structureIdx) { if (structureIdx < 0 || structureIdx >= objects.length) return null; if (objects[structureIdx] == null) cell.getStructure(structureIdx).createObjects(); return objects[structureIdx]; }