Skip to content
Snippets Groups Projects
Select Git revision
  • e5f87633107f181fdeef6323b894ab8ac806cd4d
  • master default protected
  • archive
  • v7.14.3
  • v7.14.2
  • v7.14.1
  • v7.14
  • v7.13
  • v7.12
  • v7.11
  • v7.10
  • v7.9
  • v7.8
  • v7.7
  • v7.6
  • v7.5
  • v7.4
  • v7.3
  • v7.3_MultiCellType
  • v7.2
  • v7.2_MultiCell
  • v7.1
  • v7.1_MultiCell
23 results

SplitHull.m

Blame
  • Eric Wait's avatar
    Eric Wait authored
    e5f87633
    History
    SplitHull.m 655 B
    function newTrackIDs = SplitHull(hullID, k)
    % Attempt to split hull corresponding to hullId into k pieces, and update
    % associated data structures if successful.
    
    %--Mark Winter
    
    global CellHulls CellFamilies
    
    newHulls = ResegmentHull(CellHulls(hullID), k);
    
    if ( isempty(newHulls) )
        return;
    end
    
    % Just arbitrarily assign clone's hull for now
    CellHulls(hullID) = newHulls(1);
    
    % Other hulls are just added off the clone
    newFamilyIDs = [];
    for i=2:length(newHulls)
        CellHulls(end+1) = newHulls(i);
        newFamilyIDs = [newFamilyIDs NewCellFamily(length(CellHulls), newHulls(i).time)];
    end
    newTrackIDs = [CellFamilies(newFamilyIDs).rootTrackID];
    end