@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION) public class ImageReaderMTB extends MTBOperator implements loci.common.StatusReporter
Modifier and Type | Class and Description |
---|---|
static class |
ImageReaderMTB.OutImageType
Specifies the image object that is constructed by the reader
|
Modifier and Type | Field and Description |
---|---|
protected de.unihalle.informatik.Alida.datatypes.ALDFileString |
fileName |
protected int |
imageIndex |
protected loci.formats.meta.IMetadata |
omemeta |
protected String |
omexml |
protected ImageReaderMTB.OutImageType |
outImageType |
protected loci.formats.IFormatReader |
reader |
protected ij.ImagePlus |
resultImagePlus |
protected MTBImage |
resultMTBImage |
private Vector<loci.common.StatusListener> |
statusListeners |
Constructor and Description |
---|
ImageReaderMTB() |
ImageReaderMTB(String filename)
Constructor of an image reader instance by filename.
|
Modifier and Type | Method and Description |
---|---|
void |
addStatusListener(loci.common.StatusListener listener) |
String |
getFileName()
Get the filename of the image that has to be read.
|
int |
getImageCount()
Get the number of (multi-dimensional) images stored in the specified file.
|
String |
getImageID(int imageIdx)
Get the ID of the imageIdx-th image in the file, if available
|
String |
getImageName(int imageIdx)
Get the name of the imageIdx-th image in the file, if available
|
int |
getIndexOfImageToRead()
Get the index of the image that has to be read from the file.
|
ImageReaderMTB.OutImageType |
getOutImageType()
Get the type of image object that is created as result image.
|
ij.ImagePlus |
getResultImagePlus()
Get resulting image that was read from disk.
|
MTBImage |
getResultMTBImage()
Get resulting image that was read from disk.
|
protected void |
initReader()
Initialize the reader (this method is called in the constructor)
|
void |
notifyListeners(loci.common.StatusEvent event) |
protected void |
operate() |
protected ij.ImagePlus |
readImagePlus(int imageIdx)
Read image
imageIdx from the specified file and return it as ImagePlus object. |
protected MTBImage |
readMTBImage(int imageIdx)
Read image
imageIdx from the specified file and return it as MTBImage object. |
protected Object |
readResolve()
Init function for deserialized objects.
|
void |
removeStatusListener(loci.common.StatusListener listener) |
void |
setFileName(String filename)
Set the filename of the image that has to be read.
|
void |
setIndexOfImageToRead(int imageIdx)
Set the index of the image that has to be read from the file.
|
void |
setOutImageType(ImageReaderMTB.OutImageType outtype)
Set the type of image object that is created as result image.
|
protected void |
setResultImagePlus(ij.ImagePlus img)
Set resulting image
|
protected void |
setResultMTBImage(MTBImage img)
Set resulting image
|
void |
validateCustom() |
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, validateGeneric, writeHistory, writeHistory, writeHistory
private transient Vector<loci.common.StatusListener> statusListeners
protected transient loci.formats.IFormatReader reader
protected String omexml
protected transient loci.formats.meta.IMetadata omemeta
@Parameter(label="Image index", required=true, direction=IN, mode=ADVANCED, dataIOOrder=2, description="Index of the image (aka series) in the file that has to be read") protected int imageIndex
@Parameter(label="Output image type", required=true, direction=IN, mode=STANDARD, dataIOOrder=3, description="Determines the image object class that is created as result image") protected ImageReaderMTB.OutImageType outImageType
@Parameter(label="Filename", required=true, direction=IN, mode=STANDARD, dataIOOrder=1, description="Filename of the image to be read") protected de.unihalle.informatik.Alida.datatypes.ALDFileString fileName
@Parameter(label="Result ImagePlus", required=false, direction=OUT, mode=STANDARD, dataIOOrder=2, description="Image that has been read from disk returned as ImagePlus") protected transient ij.ImagePlus resultImagePlus
@Parameter(label="Result MTBImage", required=false, direction=OUT, mode=STANDARD, dataIOOrder=1, description="Image that has been read from disk returned as MTBImage") protected transient MTBImage resultMTBImage
public ImageReaderMTB() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public ImageReaderMTB(String filename) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, loci.formats.FormatException, IOException, loci.common.services.DependencyException, loci.common.services.ServiceException
filename
- de.unihalle.informatik.Alida.exceptions.ALDOperatorException
loci.formats.FormatException
IOException
loci.common.services.DependencyException
loci.common.services.ServiceException
protected Object readResolve()
This function is called on an instance of this class being deserialized from file, prior to handing the instance over to the user. It takes care of a proper initialization of transient member variables as they are not initialized to the default values during deserialization.
readResolve
in class MTBOperator
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
public void validateCustom() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
validateCustom
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected void initReader() throws loci.formats.FormatException, IOException, loci.common.services.DependencyException, loci.common.services.ServiceException
loci.formats.FormatException
IOException
loci.common.services.DependencyException
loci.common.services.ServiceException
protected MTBImage readMTBImage(int imageIdx) throws loci.formats.FormatException, IOException, IllegalArgumentException, loci.common.services.DependencyException, loci.common.services.ServiceException, de.unihalle.informatik.Alida.exceptions.ALDOperatorException
imageIdx
from the specified file and return it as MTBImage object. Some formats
can store a series of image, e.g. different experiment runs (not to confuse with a time series). The imageIdx
specifies
which image of a series has to be read.loci.formats.FormatException
IOException
IllegalArgumentException
loci.common.services.DependencyException
loci.common.services.ServiceException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected ij.ImagePlus readImagePlus(int imageIdx) throws loci.formats.FormatException, IOException, loci.common.services.DependencyException, loci.common.services.ServiceException, IllegalArgumentException, de.unihalle.informatik.Alida.exceptions.ALDOperatorException
imageIdx
from the specified file and return it as ImagePlus object. Some formats
can store a series of image, e.g. different experiment runs (not to confuse with a time series). The imageIdx
specifies
which image of a series has to be read.loci.formats.FormatException
IOException
loci.common.services.DependencyException
loci.common.services.ServiceException
IllegalArgumentException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected void setResultMTBImage(MTBImage img)
protected void setResultImagePlus(ij.ImagePlus img)
public MTBImage getResultMTBImage()
public ij.ImagePlus getResultImagePlus()
public void setFileName(String filename) throws loci.formats.FormatException, IOException, loci.common.services.DependencyException, loci.common.services.ServiceException
loci.formats.FormatException
IOException
loci.common.services.DependencyException
loci.common.services.ServiceException
public String getFileName()
public void setOutImageType(ImageReaderMTB.OutImageType outtype)
public ImageReaderMTB.OutImageType getOutImageType()
public int getImageCount()
public String getImageName(int imageIdx)
public String getImageID(int imageIdx)
public void setIndexOfImageToRead(int imageIdx)
public int getIndexOfImageToRead()
public void addStatusListener(loci.common.StatusListener listener)
addStatusListener
in interface loci.common.StatusReporter
public void notifyListeners(loci.common.StatusEvent event)
notifyListeners
in interface loci.common.StatusReporter
public void removeStatusListener(loci.common.StatusListener listener)
removeStatusListener
in interface loci.common.StatusReporter
Copyright © 2010–2020 Martin Luther University Halle-Wittenberg, Institute of Computer Science, Pattern Recognition and Bioinformatics. All rights reserved.