JSci.instruments
Class PTTemplate

java.lang.Object
  extended by JSci.instruments.PTTemplate
All Implemented Interfaces:
Control, Dimensions, ImageFilter, ImageSink, ImageSource, ParticleTracker

public class PTTemplate
extends java.lang.Object
implements ImageFilter, ParticleTracker

Find a given template in a two dimensional image. Usage: press Add button; the image stops; select a template with the inner rectangle; press Done. The tracking starts immediately. If you want to track another object, simply repeat the procedure. Select an object number before Remove.


Nested Class Summary
(package private) static class PTTemplate.SimulatedBarycentreSource
           
 
Field Summary
(package private)  javax.swing.JComponent comp
           
 
Constructor Summary
PTTemplate(TwoROI r)
           
 
Method Summary
 java.awt.Component getControlComponent()
          defines the Component that controls this filter
 int getHeight()
           
 java.lang.String getName()
          defines the name of the filter
 java.awt.Dimension getSize()
           
 int getWidth()
           
static void main(java.lang.String[] args)
           
 void receive(Image f)
          find the bead
 void setListener(ParticleTrackerListener ptl)
          Sets the object that wants to receive the data collected by the particle tracker.
 void setSink(ImageSink fs)
          set the object that must read the frames through receive() method.
 void setSource(ImageSource fs)
          set the object that sends the Images.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

comp

javax.swing.JComponent comp
Constructor Detail

PTTemplate

public PTTemplate(TwoROI r)
Parameters:
r - a TwoROI is needed. The inner rectangle represents the template to be searched for; the outer represents the region in which the template is searched.
Method Detail

setSink

public void setSink(ImageSink fs)
Description copied from interface: ImageSource
set the object that must read the frames through receive() method.

Specified by:
setSink in interface ImageSource
Parameters:
fs - the object that reads the frames

setSource

public void setSource(ImageSource fs)
Description copied from interface: ImageSink
set the object that sends the Images.

Specified by:
setSource in interface ImageSink
Parameters:
fs - the object that sends the frames

getWidth

public int getWidth()
Specified by:
getWidth in interface Dimensions
Returns:
the width of the image

getHeight

public int getHeight()
Specified by:
getHeight in interface Dimensions
Returns:
the height of the image

getSize

public java.awt.Dimension getSize()
Specified by:
getSize in interface Dimensions
Returns:
the dimension of the image

getName

public java.lang.String getName()
defines the name of the filter


setListener

public void setListener(ParticleTrackerListener ptl)
Description copied from interface: ParticleTracker
Sets the object that wants to receive the data collected by the particle tracker.

Specified by:
setListener in interface ParticleTracker
Parameters:
ptl - the object that receives the data; each time a new image is processed, ptl.receivePosition() is called.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

receive

public void receive(Image f)
find the bead

Specified by:
receive in interface ImageSink
Parameters:
f - the new frame that must be displayed

getControlComponent

public java.awt.Component getControlComponent()
defines the Component that controls this filter

Specified by:
getControlComponent in interface Control
Returns:
the component that controls the object that implements this interface

main

public static void main(java.lang.String[] args)