private static class RoiManagerAdapter.RoiReader extends MTBOperator
Modifier and Type | Class and Description |
---|---|
static class |
RoiManagerAdapter.RoiReader.TargetFormat
Format into which the ROIs should be converted.
|
Modifier and Type | Field and Description |
---|---|
private double |
domainXmax
Maximal x coordinate of user-specified domain.
|
private double |
domainXmin
Minimal x coordinate of user-specified domain.
|
private double |
domainYmax
Maximal y coordinate of user-specified domain.
|
private double |
domainYmin
Minimal y coordinate of user-specified domain.
|
private RoiManagerAdapter.RoiReader.TargetFormat |
format
Target format.
|
private MTBStringData |
inFile
Input file name.
|
private MTBPolygon2DSet |
polys
Result polygon set, if target format are polygons or snakes.
|
private MTBRegion2DSet |
regions
Result region set, if target format are regions.
|
private Hashtable<String,ij.gui.Roi> |
roitable
Helper hash table.
|
private boolean |
useSpecifiedDomain
Flag for using user-specified domain information.
|
Constructor and Description |
---|
RoiReader(String infile,
RoiManagerAdapter.RoiReader.TargetFormat tFormat)
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected void |
doUseSpecifiedDomain(boolean b)
Enable/disable use of domain specified by the user.
|
MTBPolygon2DSet |
getPolySet()
Get the polygon set.
|
MTBRegion2DSet |
getRegionSet()
Get the region set.
|
private String |
getUniqueName(String ename)
Generates a unique name for a new roi in the manager.
|
private void |
openRoiManagerFile(String path)
Opens a zip file with ImageJ ROIs.
|
protected void |
operate() |
void |
setDomainXMax(double xm)
Set maximal x value of user-specified domain.
|
protected void |
setDomainXMin(double xm)
Set minimal x value of user-specified domain.
|
void |
setDomainYMax(double ym)
Set maximal y value of user-specified domain.
|
void |
setDomainYMin(double ym)
Set minimal y value of user-specified domain.
|
readResolve
addOperatorExecutionProgressEventListener, addParameter, addParameter, addParameterUnconditioned, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getDocumentation, getHidingMode, getInactiveParameterNames, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterDescriptorUnconditioned, getParameterNames, getParameterUnconditioned, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, hasInOutParameters, hasParameter, isAnnotatedParameter, isConfigured, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, removeParameter, runOp, runOp, runOp, setConstructionMode, setConstructionMode, setConstructionMode, setHidingMode, setName, setParameter, setParameterUnconditioned, setVerbose, toStringVerbose, unconfiguredItems, validate, validateCustom, validateGeneric, writeHistory, writeHistory, writeHistory
@Parameter(label="Input file", required=true, dataIOOrder=0, direction=IN, supplemental=false, description="Input ROI file.") private MTBStringData inFile
@Parameter(label="Target format", required=true, dataIOOrder=1, direction=IN, supplemental=false, description="Target format.") private RoiManagerAdapter.RoiReader.TargetFormat format
@Parameter(label="Use user-specified domain?", required=true, direction=IN, supplemental=false, dataIOOrder=10, mode=ADVANCED, description="Flag for using user-specified domain.") private boolean useSpecifiedDomain
@Parameter(label="Minimal x", required=true, direction=IN, supplemental=false, dataIOOrder=11, mode=ADVANCED, description="Minimal value in x of user-specified domain.") private double domainXmin
@Parameter(label="Maximal x", required=true, direction=IN, supplemental=false, dataIOOrder=12, mode=ADVANCED, description="Maximal value in x of user-specified domain.") private double domainXmax
@Parameter(label="Minimal y", required=true, direction=IN, supplemental=false, dataIOOrder=13, mode=ADVANCED, description="Minimal value in y of user-specified domain.") private double domainYmin
@Parameter(label="Maximal y", required=true, direction=IN, supplemental=false, dataIOOrder=14, mode=ADVANCED, description="Maximal value in y of user-specified domain.") private double domainYmax
@Parameter(label="Polygon set", supplemental=false, direction=OUT, description="Output set of polygons.") private MTBPolygon2DSet polys
@Parameter(label="Region set", supplemental=false, direction=OUT, description="Output set of regions.") private MTBRegion2DSet regions
public RoiReader(String infile, RoiManagerAdapter.RoiReader.TargetFormat tFormat) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
infile
- Input filename.tFormat
- Target format to return.de.unihalle.informatik.Alida.exceptions.ALDOperatorException
- Thrown in case of failure.protected void doUseSpecifiedDomain(boolean b)
b
- If true, domain usage is enabled, otherwise disabled.protected void setDomainXMin(double xm)
xm
- Minimal x value.public void setDomainXMax(double xm)
xm
- Maximal x value.public void setDomainYMin(double ym)
ym
- Minimal y value.public void setDomainYMax(double ym)
ym
- Maximal y value.public MTBPolygon2DSet getPolySet()
public MTBRegion2DSet getRegionSet()
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
private void openRoiManagerFile(String path)
path
- Path to file that should be opened.Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.