de.unihalle.informatik.MiToBo.drawing
Class DrawTracks2D

java.lang.Object
  extended by de.unihalle.informatik.Alida.operator.ALDOperator
      extended by de.unihalle.informatik.MiToBo.core.operator.MTBOperator
          extended by de.unihalle.informatik.MiToBo.drawing.DrawTracks2D
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator

@ALDAOperator(genericExecutionMode=NONE,
              level=STANDARD)
public class DrawTracks2D
extends MTBOperator

Draw trajectories of tracked observations over time.

Author:
Oliver Gress

Nested Class Summary
 
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode
 
Field Summary
 MTBRegion2DSetBag detectedRegions
           
 boolean drawSpots
           
 boolean drawTrajectories
           
 MTBImage inputImage
           
 java.util.Vector<MultiState<MotionModelID>> observations
           
 DynamicColorLUT trackcolors
           
 java.util.Vector<MTBGraph> trackgraphs
           
protected  MTBImage trackImage
           
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
completeDAG, name, portHashAccess, verbose, versionProvider
 
Constructor Summary
DrawTracks2D()
          Constructor.
 
Method Summary
protected  void drawSpot(MTBImage img, MTBRegion2D reg, int t, int c, int color)
          Draw region to an image at time=t and channel=c with specified color.
protected  void drawSqare(MTBImage img, MTBRegion2D reg, int t, int c, int color, int radius)
          Draw square to an image at time=t and channel=c with specified color and size=2*radius+1.
protected  void drawTrajectories(Jama.Matrix oldP, Jama.Matrix newP, int t, int t_last, int c, MTBImage img, int color)
          Draw trajectory between two points at the given and all later timepoints until t_last
 MTBImage getTrackImage()
           
protected  void operate()
           
 void validateCustom()
           
 
Methods inherited from class de.unihalle.informatik.MiToBo.core.operator.MTBOperator
readResolve
 
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
deserializeFromXmlFile, fieldContained, getALDPortHashAccessKey, getConstructionMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, isConfigured, parametersToXmlObject, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, runOp, runOp, runOp, serializeToXmlFile, setConstructionMode, setName, setParameter, setParametersFromXml, setParametersFromXml, setVerbose, toStringVerbose, unconfiguredItems, validate, validateGeneric, writeHistory, writeHistory, writeHistory, writeParametersToXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

detectedRegions

@Parameter(label="Detected regions",
           direction=IN,
           required=false,
           dataIOOrder=2,
           mode=STANDARD,
           description="Detected regions whose IDs determine target association")
public MTBRegion2DSetBag detectedRegions

drawSpots

@Parameter(label="Draw spots",
           direction=IN,
           required=true,
           dataIOOrder=6,
           mode=STANDARD,
           description="Flag to draw spots (otherwise squares indicate target location)")
public boolean drawSpots

drawTrajectories

@Parameter(label="Draw trajectories",
           direction=IN,
           required=true,
           dataIOOrder=5,
           mode=STANDARD,
           description="Flag to draw trajectories")
public boolean drawTrajectories

inputImage

@Parameter(label="Input image",
           direction=IN,
           required=true,
           dataIOOrder=1,
           mode=STANDARD,
           description="Image used for drawing tracks")
public MTBImage inputImage

observations

@Parameter(label="Observations",
           direction=IN,
           required=false,
           dataIOOrder=3,
           mode=STANDARD,
           description="Observations whose IDs determine target association")
public java.util.Vector<MultiState<MotionModelID>> observations

trackcolors

@Parameter(label="Track colors",
           direction=IN,
           required=false,
           dataIOOrder=7,
           mode=STANDARD,
           description="Color lookup table of track colors")
public DynamicColorLUT trackcolors

trackgraphs

@Parameter(label="Track graphs",
           direction=IN,
           required=false,
           dataIOOrder=4,
           mode=STANDARD,
           description="Graphs that determine target association. If specified IDs in observations or detected regions are ignored.")
public java.util.Vector<MTBGraph> trackgraphs

trackImage

@Parameter(label="Track image",
           direction=OUT,
           required=false,
           dataIOOrder=1,
           mode=STANDARD,
           description="Image with tracks drawn")
protected MTBImage trackImage
Constructor Detail

DrawTracks2D

public DrawTracks2D()
             throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Constructor.

Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

drawSpot

protected void drawSpot(MTBImage img,
                        MTBRegion2D reg,
                        int t,
                        int c,
                        int color)
Draw region to an image at time=t and channel=c with specified color.


drawSqare

protected void drawSqare(MTBImage img,
                         MTBRegion2D reg,
                         int t,
                         int c,
                         int color,
                         int radius)
Draw square to an image at time=t and channel=c with specified color and size=2*radius+1.


drawTrajectories

protected void drawTrajectories(Jama.Matrix oldP,
                                Jama.Matrix newP,
                                int t,
                                int t_last,
                                int c,
                                MTBImage img,
                                int color)
Draw trajectory between two points at the given and all later timepoints until t_last


getTrackImage

public MTBImage getTrackImage()

operate

protected void operate()
                throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException,
                       de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
Specified by:
operate in class de.unihalle.informatik.Alida.operator.ALDOperator
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException

validateCustom

public void validateCustom()
                    throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Overrides:
validateCustom in class de.unihalle.informatik.Alida.operator.ALDOperator
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException