Package org.anchoranalysis.mpp.io.input
Class MultiInput
Object
MultiInput
- All Implemented Interfaces:
ProvidesStackInput
,InputFromManager
,ExportSharedObjects
An input to an experiment that combines a particular
Stack
with other types of entities.
These entities each have a unique name, and must be one of the following types:
Stack
(in addition to the primary stack that forms the input).MarkCollection
.ObjectCollection
.Dictionary
.Histogram
.Path
.
- Author:
- Owen Feehan
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMultiInput
(String mainObjectName, ProvidesStackInput mainInputObject) Creates a newMultiInput
with a specified name for the main input object.MultiInput
(ProvidesStackInput mainInputObject) Creates a newMultiInput
with a default name for the main input object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addToStoreInferNames
(NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) Adds any stacks exposed by the current element to a named-store of stacks - inferring the names of theStack
s.void
addToStoreWithName
(String name, NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) Adds any stacks exposed by the current element to a named-store of stacks - with a particular name.void
close
(ErrorReporter errorReporter) Performs all tidying up, file-closing etc. after we are finished using theInputFromManager
void
copyTo
(SharedObjects target, Logger logger) Adds any exported shared objects to the target container.Gets the map ofDictionary
s.filePath()
Gets the map ofPath
s.Gets the name of the main input object.Gets the map ofHistogram
s.A unique name associated with the input.marks()
Gets the map ofMarkCollection
s.int
The number of time-frames in the underlying input image.objects()
Gets the map ofObjectCollection
s.A path to a file from which this input originated.stack()
Gets the map ofTimeSeries
(stacks).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.anchoranalysis.io.input.InputFromManager
allAssociatedPaths, asFile, identifierAsPath, pathForBindingRequired
Methods inherited from interface org.anchoranalysis.image.io.stack.input.ProvidesStackInput
addToStoreInferNames, asSet, asStack
-
Field Details
-
DEFAULT_IMAGE_INPUT_NAME
The default name for the input image stack.- See Also:
-
-
Constructor Details
-
MultiInput
Creates a newMultiInput
with a default name for the main input object.- Parameters:
mainInputObject
- the main input object that provides the stack
-
MultiInput
Creates a newMultiInput
with a specified name for the main input object.- Parameters:
mainObjectName
- the name for the main input objectmainInputObject
- the main input object that provides the stack
-
-
Method Details
-
addToStoreInferNames
public void addToStoreInferNames(NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) throws OperationFailedException Description copied from interface:ProvidesStackInput
Adds any stacks exposed by the current element to a named-store of stacks - inferring the names of theStack
s.- Specified by:
addToStoreInferNames
in interfaceProvidesStackInput
- Parameters:
stacks
- the named-store of stacks.seriesIndex
- the index of the series (beginning at 0) to retrieve stacks from theTimeSeries
.logger
- a logger for any non-fatal errors. Fatal errors throw an exception.- Throws:
OperationFailedException
- if the operation cannot successfully complete.
-
addToStoreWithName
public void addToStoreWithName(String name, NamedProviderStore<TimeSeries> stacks, int seriesIndex, Logger logger) throws OperationFailedException Description copied from interface:ProvidesStackInput
Adds any stacks exposed by the current element to a named-store of stacks - with a particular name.- Specified by:
addToStoreWithName
in interfaceProvidesStackInput
- Parameters:
name
- the name to use for the added stack.stacks
- the named-store of stacks.seriesIndex
- the index of the series (beginning at 0) to retrieve stacks from theTimeSeries
.logger
- a logger for any non-fatal errors. Fatal errors throw an exception.- Throws:
OperationFailedException
- if the operation cannot successfully complete.
-
identifier
Description copied from interface:InputFromManager
A unique name associated with the input.The name should never begin with or end with whitespace.
It should never contain backslashes, but forward-slashes are permitted.
- Specified by:
identifier
in interfaceInputFromManager
- Returns:
- a string uniquely (in the current dataset) identifying the input in a meaningful way.
-
pathForBinding
Description copied from interface:InputFromManager
A path to a file from which this input originated.This path is not guaranteed to be unique for each input i.e. multiple inputs may originate from the same path.
- Specified by:
pathForBinding
in interfaceInputFromManager
- Returns:
- the primary path associated with the input, if it exists.
-
close
Description copied from interface:InputFromManager
Performs all tidying up, file-closing etc. after we are finished using theInputFromManager
- Specified by:
close
in interfaceInputFromManager
- Parameters:
errorReporter
- whether errors are reported to.
-
marks
Gets the map ofMarkCollection
s.- Returns:
- the
MultiInputSubMap
ofMarkCollection
s
-
objects
Gets the map ofObjectCollection
s.- Returns:
- the
MultiInputSubMap
ofObjectCollection
s
-
dictionary
Gets the map ofDictionary
s.- Returns:
- the
MultiInputSubMap
ofDictionary
s
-
histogram
Gets the map ofHistogram
s.- Returns:
- the
MultiInputSubMap
ofHistogram
s
-
filePath
Gets the map ofPath
s.- Returns:
- the
MultiInputSubMap
ofPath
s
-
stack
Gets the map ofTimeSeries
(stacks).- Returns:
- the
MultiInputSubMap
ofTimeSeries
-
getMainObjectName
Gets the name of the main input object.- Returns:
- the name of the main input object
-
numberFrames
Description copied from interface:ProvidesStackInput
The number of time-frames in the underlying input image.- Specified by:
numberFrames
in interfaceProvidesStackInput
- Returns:
- the number of time-frames.
- Throws:
OperationFailedException
- if the operation cannot successfully complete.
-