public class StringToImagePlusConverter extends AbstractConverter<String,ij.ImagePlus>
ImagePlus
object. Both image
titles and ID values are supported (with IDs being preferred).
This converter exists to make ImageJ 1.x macro calls to SciJava modules work
better with ImagePlus
inputs—e.g.:
run("Print Title", "imp=blobs.gif name=Jan");
The converter enables string fragments like imp=blobs.gif
or
imp=-2
to properly resolve to the associated ImagePlus
.
Note that unlike most other classes in the ImageJ Legacy project, this one
needs typed references to classes in the ij
package,
particularly ImagePlus
, so that the conversion logic works as
intended. It seems to work without side effects in the standard case...
Modifier and Type | Class and Description |
---|---|
static class |
StringToImagePlusConverter.ImageTitle
Adapter for
ImagePlus that emits the image title when
StringToImagePlusConverter.ImageTitle.toString() is called. |
Constructor and Description |
---|
StringToImagePlusConverter() |
Modifier and Type | Method and Description |
---|---|
boolean |
canConvert(Object src,
Class<?> dest) |
<T> T |
convert(Object src,
Class<T> dest) |
Class<String> |
getInputType() |
Class<ij.ImagePlus> |
getOutputType() |
canConvert, canConvert, canConvert, canConvert, convert, convert, getType, populateInputCandidates, supports
getInfo, getPriority, setInfo, setPriority, toString
context, getContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getIdentifier, log
context, getContext, setContext
compareTo, getPriority, setPriority
getInfo, setInfo
getLocation
getVersion
public boolean canConvert(Object src, Class<?> dest)
canConvert
in interface Converter<String,ij.ImagePlus>
canConvert
in class AbstractConverter<String,ij.ImagePlus>
public Class<ij.ImagePlus> getOutputType()
Copyright © 2014–2022 ImageJ. All rights reserved.