de.unihalle.informatik.MiToBo.apps.particles2D
Class MultiChannelParticleAnalyzer2D

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.apps.particles2D.MultiChannelParticleAnalyzer2D
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator

@ALDAOperator(genericExecutionMode=ALL,
              level=APPLICATION)
public class MultiChannelParticleAnalyzer2D
extends MTBOperator

Operator for detecting sub-cellular structures in a given image.

This operator allows to configure a particle detector for each channel of the image separately. If a proper nucleus channel is given that one is skipped. The first detector in the vector of detectors is applied to the first non-nucleus channel, the second to the second, etc. It is important that for all channels to be processed detectors are provided.

Author:
moeller

Nested Class Summary
static class MultiChannelParticleAnalyzer2D.ResultImageMode
          Display mode of the result image.
 
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode
 
Field Summary
private  MTBImageByte excludeMask
          Optional mask to exclude particles in certain regions.
private  int height
          Height of the processed image.
private  MTBImage inImg
          Multi-channel input image to be processed.
private  SegResultEnums.MeasureUnit measureUnits
          Units for measurements.
private  ParticleDetector particleDetector_1
           
private  ParticleDetector particleDetector_2
           
private  ParticleDetector particleDetector_3
           
private  ParticleDetector particleDetector_4
           
private  ParticleDetector particleDetector_5
           
private  SegResult_ParticlesMultiChannel resultData
          Vector of result data objects.
private  MultiChannelParticleAnalyzer2D.ResultImageMode resultDisplayMode
          Mode of how to display result image.
private  MTBImageRGB resultImg
          Stack with result overlays corresponding to channels.
private  int stackSize
          Number of channels in image.
private  int width
          Width of the processed image.
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
completeDAG, name, portHashAccess, verbose, versionProvider
 
Constructor Summary
MultiChannelParticleAnalyzer2D()
          Empty constructor.
MultiChannelParticleAnalyzer2D(MTBImage image, java.util.Vector<ParticleDetector> pOps)
          Default constructor.
 
Method Summary
 java.util.Vector<ParticleDetector> getDetectors()
          Get a reference to configured detectors' vector.
 SegResult_ParticlesMultiChannel getResultDataArray()
          Returns extracted result data.
 MTBImageRGB getResultImage()
          Returns result image, i.e. the segmentation mask.
protected  void operate()
           
private  void prepareResultImage()
          Prepare visualization of result data by overlay on input image.
private  MTBImageRGB prepareResultImageStack(java.util.Vector<MTBImage> imgvec)
          Initialize result image stack.
 void setInputImage(MTBImage img)
          Specify input image.
 void setMeasureUnits(SegResultEnums.MeasureUnit mu)
          Specify units in which to measure areas.
 void setNucleiMask(MTBImageByte mask)
          Specify nuclei mask.
 
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, validateCustom, 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

excludeMask

@Parameter(label="Region exclude mask",
           direction=IN,
           mode=ADVANCED,
           required=false,
           description="Region exclude mask.")
private transient MTBImageByte excludeMask
Optional mask to exclude particles in certain regions.

Particles in exclude regions are ignored if mask is non-null.


height

private transient int height
Height of the processed image.


inImg

@Parameter(label="Input image",
           required=true,
           mode=STANDARD,
           direction=IN,
           description="Input image.",
           dataIOOrder=-20)
private transient MTBImage inImg
Multi-channel input image to be processed.


measureUnits

@Parameter(label="Measure units",
           required=false,
           dataIOOrder=20,
           mode=ADVANCED,
           direction=IN,
           description="Units for area measurements.")
private SegResultEnums.MeasureUnit measureUnits
Units for measurements.


particleDetector_1

@Parameter(label="Particle detector channel 1",
           required=false,
           direction=IN,
           dataIOOrder=-15,
           mode=STANDARD,
           description="Particle detector operator(s) for channels.")
private ParticleDetector particleDetector_1

particleDetector_2

@Parameter(label="Particle detector channel 2",
           required=false,
           direction=IN,
           dataIOOrder=-14,
           mode=STANDARD,
           description="Particle detector operator(s) for channels.")
private ParticleDetector particleDetector_2

particleDetector_3

@Parameter(label="Particle detector channel 3",
           required=false,
           direction=IN,
           dataIOOrder=-13,
           mode=STANDARD,
           description="Particle detector operator(s) for channels.")
private ParticleDetector particleDetector_3

particleDetector_4

@Parameter(label="Particle detector channel 4",
           required=false,
           direction=IN,
           dataIOOrder=-12,
           mode=STANDARD,
           description="Particle detector operator(s) for channels.")
private ParticleDetector particleDetector_4

particleDetector_5

@Parameter(label="Particle detector channel 5",
           required=false,
           direction=IN,
           dataIOOrder=-11,
           mode=STANDARD,
           description="Particle detector operator(s) for channels.")
private ParticleDetector particleDetector_5

resultData

@Parameter(label="Result statistics",
           direction=OUT,
           description="Result data.")
private transient SegResult_ParticlesMultiChannel resultData
Vector of result data objects.


resultDisplayMode

@Parameter(label="Result image display mode",
           required=false,
           mode=ADVANCED,
           direction=IN,
           supplemental=true,
           description="Mode how result image is displayed.")
private MultiChannelParticleAnalyzer2D.ResultImageMode resultDisplayMode
Mode of how to display result image.


resultImg

@Parameter(label="Result image",
           direction=OUT,
           description="Result image",
           supplemental=true)
private transient MTBImageRGB resultImg
Stack with result overlays corresponding to channels.


stackSize

private transient int stackSize
Number of channels in image.


width

private transient int width
Width of the processed image.

Constructor Detail

MultiChannelParticleAnalyzer2D

public MultiChannelParticleAnalyzer2D()
                               throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Empty constructor.

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

MultiChannelParticleAnalyzer2D

public MultiChannelParticleAnalyzer2D(MTBImage image,
                                      java.util.Vector<ParticleDetector> pOps)
                               throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

Parameters:
image - Image to be processed.
pOps - List of detectors.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

getDetectors

public java.util.Vector<ParticleDetector> getDetectors()
Get a reference to configured detectors' vector.

Returns:
Reference to vector of detectors.

getResultDataArray

public SegResult_ParticlesMultiChannel getResultDataArray()
Returns extracted result data.


getResultImage

public MTBImageRGB getResultImage()
Returns result image, i.e. the segmentation mask.


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

prepareResultImage

private void prepareResultImage()
Prepare visualization of result data by overlay on input image.


prepareResultImageStack

private MTBImageRGB prepareResultImageStack(java.util.Vector<MTBImage> imgvec)
Initialize result image stack.

Transfers result images to a multi-channel RGB image.


setInputImage

public void setInputImage(MTBImage img)
Specify input image.


setMeasureUnits

public void setMeasureUnits(SegResultEnums.MeasureUnit mu)
Specify units in which to measure areas.


setNucleiMask

public void setNucleiMask(MTBImageByte mask)
Specify nuclei mask.