endrov.typeLineage
Class Lineage

java.lang.Object
  extended by endrov.data.EvContainer
      extended by endrov.data.EvObject
          extended by endrov.typeLineage.Lineage
All Implemented Interfaces:
java.lang.Cloneable

public class Lineage
extends EvObject
implements java.lang.Cloneable

Meta object: Lineage (particles) and expression info


Nested Class Summary
static class Lineage.InterpolatedParticle
          Interpolated particles, contains additional information
static class Lineage.MeshRenderMode
          Render modes
 class Lineage.Particle
          One particle
static class Lineage.ParticlePos
          Position key frame
 
Field Summary
static LineageParticleGrouping cellGroups
           
static java.lang.String[] connectNuc
           
static int KEY_CHANGE_RADIUS
           
static int KEY_DIVIDENUC
           
static int KEY_MAKEPARENT
           
static int KEY_SETEND
           
static int KEY_SETPARENT
           
static int KEY_SETSTART
           
static int KEY_SETZ
           
static int KEY_TRANSLATE
           
 java.util.HashMap<java.lang.String,Lineage.Particle> particle
           
 
Fields inherited from class endrov.data.EvContainer
author, containerIcon, coreMetadataModified, dateCreate, dateLastModify, isGeneratedData, metaObject, ostBlobID
 
Constructor Summary
Lineage()
           
 
Method Summary
 void associateParentChildCheckNoLoop(java.lang.String parent, java.lang.String child)
           
 void buildMetamenu(javax.swing.JMenu menu, EvContainer parentObject)
          Additions to the object-specific menu
 java.lang.Object clone()
          Make a deep copy
 EvObject cloneEvObject()
          Get a deep copy of the object, not including children
 int countParticlesAtFrame(EvDecimal frame)
          Count how many particles exist at a given frame
 int countParticlesUpTo(EvDecimal frame)
          Count how many particles exist up to and equal the frame
 void createParentChild(java.lang.String parent, java.lang.String child)
          Create parent-children relation based on selected particles
 Tuple<EvDecimal,java.lang.String> firstFrameOfLineage(boolean checkMesh)
          Find the first keyframe and particle ever mentioned in a lineage object.
 void flattenSingleChildren()
          Join single children with their parents.
 java.util.Set<java.lang.String> getAllExpNames()
          Get names of all expressions mentioned
 Lineage.Particle getCreateParticle(java.lang.String name)
          Get a particle; create if needed
 java.util.Set<java.lang.String> getLeafs()
           
 Tuple<java.lang.Double,java.lang.Double> getMaxMinExpLevel(java.lang.String expName)
          Get maximum and minimum level of expression
 java.lang.String getMetaTypeDesc()
          Description of this metatype
static java.util.Collection<Lineage> getParticles(EvContainer meta)
           
 java.util.Set<java.lang.String> getRecursiveChildNames(java.lang.String name)
           
 java.util.Set<java.lang.String> getRoots()
           
 java.lang.String getUniqueParticleName()
          Get an unused name for a particle
static void initPlugin()
          Plugin declaration
 java.util.Map<LineageSelParticle,Lineage.InterpolatedParticle> interpolateParticles(EvDecimal frame)
          Get all interpolated particles
 Tuple<EvDecimal,java.lang.String> lastFrameOfLineage(boolean checkMesh)
          Find the last keyframe and particle ever mentioned in a lineage object
 void loadColorScheme(java.io.File filename)
          Load color scheme from a file
 void loadColorSchemeDialog(java.awt.Component parent)
          Bring up dialog to save color scheme
 void loadMetadata(org.jdom.Element e)
          Unserialize object
 void mergeParticles(java.lang.String sourceName, java.lang.String targetName)
          Merge particles.
 void removeAllParentReference(java.lang.String particleName)
          Remove all parent references from particle
 void removeParticle(java.lang.String name)
          Remove a particle.
 void removePosAfter(java.lang.String name, EvDecimal frame, boolean alsoEqual)
          Delete all positions after or equal to the current frame.
 void removePosBefore(java.lang.String name, EvDecimal frame, boolean alsoEqual)
          Delete all positions before or equal to the current frame.
 boolean renameParticles(java.lang.String oldName, java.lang.String newName)
          Rename particles
static java.awt.Color representativeColor(java.awt.Color nucColor)
           
 void saveColorScheme(java.io.File filename)
          Save color scheme to a file
 void saveColorSchemeDialog(java.awt.Component parent)
          Bring up dialog to save color scheme
 java.lang.String saveMetadata(org.jdom.Element e)
          Save down data
 
Methods inherited from class endrov.data.EvObject
cloneEvObjectRecursive, cloneUsingSerialize, getContainerIcon
 
Methods inherited from class endrov.data.EvContainer
addMetaObject, getChild, getChildNames, getFreeChildName, getIdObjects, getIdObjectsRecursive, getMetaContainer, getMetaObject, getObjects, isMetadataModified, putChild, removeMetaObjectByValue, setMetadataModified, setMetadataNotModified
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cellGroups

public static LineageParticleGrouping cellGroups

KEY_TRANSLATE

public static final int KEY_TRANSLATE

KEY_CHANGE_RADIUS

public static final int KEY_CHANGE_RADIUS

KEY_SETZ

public static final int KEY_SETZ

KEY_DIVIDENUC

public static final int KEY_DIVIDENUC

KEY_SETEND

public static final int KEY_SETEND

KEY_SETSTART

public static final int KEY_SETSTART

KEY_MAKEPARENT

public static final int KEY_MAKEPARENT

KEY_SETPARENT

public static final int KEY_SETPARENT

connectNuc

public static final java.lang.String[] connectNuc

particle

public java.util.HashMap<java.lang.String,Lineage.Particle> particle
Constructor Detail

Lineage

public Lineage()
Method Detail

getParticles

public static java.util.Collection<Lineage> getParticles(EvContainer meta)

createParentChild

public void createParentChild(java.lang.String parent,
                              java.lang.String child)
Create parent-children relation based on selected particles


loadColorScheme

public void loadColorScheme(java.io.File filename)
                     throws java.lang.Exception
Load color scheme from a file

Throws:
java.lang.Exception

saveColorScheme

public void saveColorScheme(java.io.File filename)
                     throws java.lang.Exception
Save color scheme to a file

Throws:
java.lang.Exception

saveColorSchemeDialog

public void saveColorSchemeDialog(java.awt.Component parent)
Bring up dialog to save color scheme


loadColorSchemeDialog

public void loadColorSchemeDialog(java.awt.Component parent)
Bring up dialog to save color scheme


clone

public java.lang.Object clone()
Make a deep copy

Overrides:
clone in class java.lang.Object

getMetaTypeDesc

public java.lang.String getMetaTypeDesc()
Description of this metatype

Specified by:
getMetaTypeDesc in class EvObject

saveMetadata

public java.lang.String saveMetadata(org.jdom.Element e)
Save down data

Specified by:
saveMetadata in class EvObject

loadMetadata

public void loadMetadata(org.jdom.Element e)
Description copied from class: EvObject
Unserialize object

Specified by:
loadMetadata in class EvObject

getCreateParticle

public Lineage.Particle getCreateParticle(java.lang.String name)
Get a particle; create if needed


removePosAfter

public void removePosAfter(java.lang.String name,
                           EvDecimal frame,
                           boolean alsoEqual)
Delete all positions after or equal to the current frame. If there are no more positions, remove the particle as well


removePosBefore

public void removePosBefore(java.lang.String name,
                            EvDecimal frame,
                            boolean alsoEqual)
Delete all positions before or equal to the current frame. If there are no more positions, remove the particle as well


removeParticle

public void removeParticle(java.lang.String name)
Remove a particle. Cleans up child references


interpolateParticles

public java.util.Map<LineageSelParticle,Lineage.InterpolatedParticle> interpolateParticles(EvDecimal frame)
Get all interpolated particles


getUniqueParticleName

public java.lang.String getUniqueParticleName()
Get an unused name for a particle


renameParticles

public boolean renameParticles(java.lang.String oldName,
                               java.lang.String newName)
Rename particles


mergeParticles

public void mergeParticles(java.lang.String sourceName,
                           java.lang.String targetName)
Merge particles. The target is removed, source stays and contains everything from the target TODO also handle expression pattern?


associateParentChildCheckNoLoop

public void associateParentChildCheckNoLoop(java.lang.String parent,
                                            java.lang.String child)

removeAllParentReference

public void removeAllParentReference(java.lang.String particleName)
Remove all parent references from particle


firstFrameOfLineage

public Tuple<EvDecimal,java.lang.String> firstFrameOfLineage(boolean checkMesh)
Find the first keyframe and particle ever mentioned in a lineage object. Can optionally also check mesh frames


lastFrameOfLineage

public Tuple<EvDecimal,java.lang.String> lastFrameOfLineage(boolean checkMesh)
Find the last keyframe and particle ever mentioned in a lineage object


representativeColor

public static java.awt.Color representativeColor(java.awt.Color nucColor)

countParticlesUpTo

public int countParticlesUpTo(EvDecimal frame)
Count how many particles exist up to and equal the frame


countParticlesAtFrame

public int countParticlesAtFrame(EvDecimal frame)
Count how many particles exist at a given frame


flattenSingleChildren

public void flattenSingleChildren()
Join single children with their parents. Useful if an algorithm generates one cell for each time point


getAllExpNames

public java.util.Set<java.lang.String> getAllExpNames()
Get names of all expressions mentioned


getMaxMinExpLevel

public Tuple<java.lang.Double,java.lang.Double> getMaxMinExpLevel(java.lang.String expName)
Get maximum and minimum level of expression


cloneEvObject

public EvObject cloneEvObject()
Description copied from class: EvObject
Get a deep copy of the object, not including children

Specified by:
cloneEvObject in class EvObject

buildMetamenu

public void buildMetamenu(javax.swing.JMenu menu,
                          EvContainer parentObject)
Additions to the object-specific menu

Specified by:
buildMetamenu in class EvObject
parentObject - TODO

getRecursiveChildNames

public java.util.Set<java.lang.String> getRecursiveChildNames(java.lang.String name)

getRoots

public java.util.Set<java.lang.String> getRoots()

getLeafs

public java.util.Set<java.lang.String> getLeafs()

initPlugin

public static void initPlugin()
Plugin declaration