public abstract class AbstractReaderCommand extends AbstractSCIFIOToolCommand
SCIFIOToolCommand implementations that read
images. Contains common parameter flags, e.g. for enabling certain filters,
cropping, etc... methods for generating readers using these parameters, and a
read helper method that performs all the necessary index setup and looping
over desired planes.| Constructor and Description |
|---|
AbstractReaderCommand() |
| Modifier and Type | Method and Description |
|---|---|
protected SCIFIOConfig |
getConfig() |
protected long[] |
getCrop() |
protected String |
getMap() |
protected void |
makeRange(long[] values,
long[] offsets,
long[] lengths,
ImageMetadata meta,
List<CalibratedAxis> axes)
Convenience method to split a single list of values to a set of
offset/length values.
|
protected ReaderFilter |
makeReader(String path)
Helper method to initialize a reader given the current command parameters.
|
protected abstract Plane |
processPlane(Reader reader,
Plane plane,
int imageIndex,
long planeIndex,
long planeNo,
Interval bounds)
Helper method to open the specified region of the specified plane and
perform any command-specific operations.
|
protected void |
read(Reader reader)
Intermediate read method.
|
protected void |
setCrop(long[] crop) |
protected void |
setMap(String map) |
commandName, debug, description, err, getExtraArguments, getName, info, location, run, runCommand, validateParams, warngetVersion, loggetInfo, getPriority, setInfo, setPriority, toStringcontext, getContextclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetVersion, loggetIdentifiercontext, getContext, setContextcompareTo, getPriority, setPrioritygetInfo, setInfogetLocationprotected String getMap()
protected void setMap(String map)
map - File on disk to map toprotected long[] getCrop()
protected void setCrop(long[] crop)
crop - Cropped axis lengths as [offset, length] pairs in axis order.protected ReaderFilter makeReader(String path) throws org.kohsuke.args4j.CmdLineException
path - - Path to a dataset used to initialize a readerorg.kohsuke.args4j.CmdLineExceptionprotected void makeRange(long[] values,
long[] offsets,
long[] lengths,
ImageMetadata meta,
List<CalibratedAxis> axes)
values - List of values, in alternating offset,length formatoffsets - Array of minimum values. Populated by referencelengths - Array of maximum values. Populated by referencemeta - Metadata to look up axis lengthsaxes - List of axes determining the order of the offset/length arraysprotected void read(Reader reader) throws org.kohsuke.args4j.CmdLineException
processPlane(Reader, Plane, int, long, long, Interval)
method.reader - Reader to use for opening a datasetorg.kohsuke.args4j.CmdLineExceptionprotected abstract Plane processPlane(Reader reader, Plane plane, int imageIndex, long planeIndex, long planeNo, Interval bounds) throws org.kohsuke.args4j.CmdLineException
org.kohsuke.args4j.CmdLineExceptionprotected SCIFIOConfig getConfig()
SCIFIOConfig based on the parameters passed to this
command.Copyright © 2015–2022 SCIFIO. All rights reserved.