org.shapelogic.imageprocessing
Class ColorParticleAnalyzer

java.lang.Object
  extended by org.shapelogic.imageutil.BaseImageOperation
      extended by org.shapelogic.imageprocessing.BaseParticleCounter
          extended by org.shapelogic.imageprocessing.ColorParticleAnalyzer
All Implemented Interfaces:
java.lang.Runnable, RecursiveContext, IParticleCounter, ImageOperation
Direct Known Subclasses:
ColorParticleAnalyzerIJ

public class ColorParticleAnalyzer
extends BaseParticleCounter

Analyzes a particle image in gray or RGB and group the particles according to shape rules.
Find a place in the base class where there is a hook for this extended functionality.
Some of the methods can be moved to ColorParticleAnalyzer to remove dependency of ImageJ.

Author:
Sami Badawi

Field Summary
protected  NumberedStream<java.lang.Double> _aspectRatioStream
           
protected  NumberedStream<java.lang.Integer> _curveArchCountStream
           
protected  IEdgeTracer _edgeTracer
           
protected  NumberedStream<java.lang.Integer> _grayValueStream
           
protected  NumberedStream<java.lang.Integer> _hardCornerCountStream
           
protected  NumberedStream<java.lang.Integer> _inflectionPointCountStream
           
protected  WrappedListStream<IColorAndVariance> _particleStream
           
protected  ListStream<Polygon> _polygonStream
           
protected  ListCalcStream1<IColorAndVariance,java.lang.Boolean> _roundishStream
           
protected  LoadLetterStreams loadLetterStreams
           
protected  LoadParticleStreams loadParticleStreams
           
protected  LoadPolygonStreams loadPolygonStreams
           
 
Fields inherited from class org.shapelogic.imageprocessing.BaseParticleCounter
_backgroundArea, _backgroundColor, _backgroundCount, _boundingBoxArea, _categorizer, _colorHypothesis, _colorHypothesisFinder, _context, _countOnly, _displayInternalInfo, _displayTable, _inputColor, _iterations, _maxDistance, _maxPixelsInArea, _minPixelsInArea, _modifying, _paintBackground, _paintForground, _parentContext, _particleCount, _particleImage, _particlesFiltered, _particlesOrig, _referenceColor, _saveArea, _segmentation, _toMask, _useReferenceAsBackground, ITERATIONS_DEFAULTS, MAX_DISTANCE_DEFAULTS, MAX_PIXELS_IN_AREA_DEFAULTS, MIN_PIXELS_IN_AREA_DEFAULTS
 
Fields inherited from class org.shapelogic.imageutil.BaseImageOperation
_arg, _guiWrapper, _image, _keyValueParser, _setupReturnValue
 
Constructor Summary
ColorParticleAnalyzer()
           
 
Method Summary
protected  void categorizeStreams()
          Analyzes particles and group them.
Not sure if I should use named streams or try to avoid it to make it more thread safe.
protected  void customStreamDefinitions()
          Define extra streams.
protected  void defaultStreamDefinitions()
          Define extra streams and also extra columns.
 java.lang.StringBuffer getInternalInfo()
           
 void init()
          Setup all the needed factory methods based on what type the image has.
protected  void populateResultsTable()
          Populate the table with the streams.
 
Methods inherited from class org.shapelogic.imageprocessing.BaseParticleCounter
customColumnDefinitions, defaultColumnDefinitions, displayInternalInfo, displayResultsTable, findBackground, findColorHypothesis, getColorHypothesisFinder, getContext, getImageArea, getInputColor, getIterations, getMaxDistance, getMinPixelsInArea, getParentContext, getParticleCount, getParticleFiltered, getSegmentation, getStatus, globalFilter, isParticleImage, isUseReferenceAsBackground, populateResultsTableRow, populateResultsTableRowCustom, run, segment, setColorHypothesisFinder, setDisplayTable, setInputColor, setIterations, setMaxDistance, setMinPixelsInArea, setToMask, setUseReferenceAsBackground, showResultDialog
 
Methods inherited from class org.shapelogic.imageutil.BaseImageOperation
getGuiWrapper, getImage, getKeyValueParser, getSetupReturnValue, isImageValid, setArg, setGuiWrapper, setKeyValueParser, setSetupReturnValue, setup, showAbout, showMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.shapelogic.imageutil.ImageOperation
getGuiWrapper, getImage, getKeyValueParser, getSetupReturnValue, isImageValid, setArg, setGuiWrapper, setKeyValueParser, setSetupReturnValue, setup, showAbout, showMessage
 

Field Detail

_particleStream

protected WrappedListStream<IColorAndVariance> _particleStream

_polygonStream

protected ListStream<Polygon> _polygonStream

_edgeTracer

protected IEdgeTracer _edgeTracer

_aspectRatioStream

protected NumberedStream<java.lang.Double> _aspectRatioStream

_grayValueStream

protected NumberedStream<java.lang.Integer> _grayValueStream

_hardCornerCountStream

protected NumberedStream<java.lang.Integer> _hardCornerCountStream

_roundishStream

protected ListCalcStream1<IColorAndVariance,java.lang.Boolean> _roundishStream

_inflectionPointCountStream

protected NumberedStream<java.lang.Integer> _inflectionPointCountStream

_curveArchCountStream

protected NumberedStream<java.lang.Integer> _curveArchCountStream

loadPolygonStreams

protected LoadPolygonStreams loadPolygonStreams

loadParticleStreams

protected LoadParticleStreams loadParticleStreams

loadLetterStreams

protected LoadLetterStreams loadLetterStreams
Constructor Detail

ColorParticleAnalyzer

public ColorParticleAnalyzer()
Method Detail

init

public void init()
          throws java.lang.Exception
Description copied from class: BaseParticleCounter
Setup all the needed factory methods based on what type the image has.

Overrides:
init in class BaseParticleCounter
Throws:
java.lang.Exception

defaultStreamDefinitions

protected void defaultStreamDefinitions()
Description copied from class: BaseParticleCounter
Define extra streams and also extra columns.

Overrides:
defaultStreamDefinitions in class BaseParticleCounter

categorizeStreams

protected void categorizeStreams()
Analyzes particles and group them.
Not sure if I should use named streams or try to avoid it to make it more thread safe.

Overrides:
categorizeStreams in class BaseParticleCounter

customStreamDefinitions

protected void customStreamDefinitions()
Define extra streams.

Overrides:
customStreamDefinitions in class BaseParticleCounter

populateResultsTable

protected void populateResultsTable()
Description copied from class: BaseParticleCounter
Populate the table with the streams.

Overrides:
populateResultsTable in class BaseParticleCounter

getInternalInfo

public java.lang.StringBuffer getInternalInfo()
Overrides:
getInternalInfo in class BaseParticleCounter


Copyright © 2008. All Rights Reserved.