de.unihalle.informatik.MiToBo.core.imageJ
Class RoiManagerAdapter.RoiReader

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.core.imageJ.RoiManagerAdapter.RoiReader
All Implemented Interfaces:
de.unihalle.informatik.Alida.datatypes.ALDConfigurationValidator
Enclosing class:
RoiManagerAdapter

private static class RoiManagerAdapter.RoiReader
extends MTBOperator

Class for parsing ImageJ roi files and zip archives.

Author:
moeller

Nested Class Summary
 
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode
 
Field Summary
private  boolean asSnakes
          Flag to either return snakes or polygons.
private  MTBStringData inFile
          Input file name.
private  MTBPolygon2DSet polys
          Result polygon set.
private  java.util.Hashtable<java.lang.String,ij.gui.Roi> roitable
          Helper hash table.
 
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator
completeDAG, name, portHashAccess, verbose, versionProvider
 
Constructor Summary
RoiManagerAdapter.RoiReader(java.lang.String infile, boolean _asSnakes)
          Default constructor.
 
Method Summary
 MTBPolygon2DSet getPolySet()
          Get the polygon set.
private  java.lang.String getUniqueName(java.lang.String ename)
          Generates a unique name for a new roi in the manager.
private  void openRoiManagerFile(java.lang.String path)
           
protected  void operate()
           
 
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

asSnakes

@Parameter(label="asSnakes",
           required=false,
           direction=IN,
           supplemental=false,
           description="If true, snakes are returned, otherwise polygons.")
private boolean asSnakes
Flag to either return snakes or polygons.


inFile

@Parameter(label="inFile",
           required=true,
           direction=IN,
           supplemental=false,
           description="Input ROI file.")
private MTBStringData inFile
Input file name.


polys

@Parameter(label="snakeSet",
           supplemental=false,
           direction=OUT,
           description="Output set of snakes")
private MTBPolygon2DSet polys
Result polygon set.


roitable

private java.util.Hashtable<java.lang.String,ij.gui.Roi> roitable
Helper hash table.

Constructor Detail

RoiManagerAdapter.RoiReader

public RoiManagerAdapter.RoiReader(java.lang.String infile,
                                   boolean _asSnakes)
                            throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Default constructor.

Parameters:
infile - Input filename.
roi - Flag for indicating if file contains ImageJ roi's.
Throws:
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail

getPolySet

public MTBPolygon2DSet getPolySet()
Get the polygon set.

Returns:
Polygon set read from file.

getUniqueName

private java.lang.String getUniqueName(java.lang.String ename)
Generates a unique name for a new roi in the manager.

Parameters:
ename - Roi to rename for uniqueness.
Returns:
Unique name of roi under consideration.

openRoiManagerFile

private void openRoiManagerFile(java.lang.String path)

operate

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