|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.MiToBo.core.operator.MTBOperator
de.unihalle.informatik.MiToBo.io.images.ImageWriterMTB
@ALDAOperator(genericExecutionMode=ALL, level=APPLICATION) public class ImageWriterMTB
Image writer operator to store MTBImage or ImagePlus to disk along with the
image history (.mph) file. This writer operator is based on Bio-Formats, thus the
available formats depend on Bio-Formats (and its available extension). The format is
determined by the given filename extension.
Different formats allow different options, e.g. compression of images or framerate of movies.
If options are set by the available setter-methods that are not applicable to the current format
writer, the options are simply ignored.
The ImageWriterMTB.runOp(..)
throws a special OverwriteException
in case that
the specified file already exists, but the overwrite-flag is set to false
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary | |
---|---|
private java.lang.Integer |
codec
|
private java.lang.String |
compression
|
private de.unihalle.informatik.Alida.datatypes.ALDFileString |
fileName
|
private java.lang.Integer |
fps
|
private boolean |
ignoreInvalidStackSpec
|
private ij.ImagePlus |
inputImagePlus
|
private MTBImage |
inputMTBImage
|
private boolean |
overwrite
|
private java.lang.Integer |
quality
|
private java.util.Vector<loci.common.StatusListener> |
statusListeners
|
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
ImageWriterMTB()
|
|
ImageWriterMTB(ij.ImagePlus imp,
java.lang.String filename)
Image file output operator for ImagePlus objects. |
|
ImageWriterMTB(MTBImage img,
java.lang.String filename)
Image file output operator for MTBImage objects. |
Method Summary | |
---|---|
void |
addStatusListener(loci.common.StatusListener listener)
|
java.util.HashMap<java.lang.Integer,java.lang.String> |
getAvailableCodecs()
Return available codecs for movie writers (see Bio-Formats package loci.formats.out.QTWriter) represented by a hashmap. |
java.lang.String[] |
getAvailableCompression()
Get the available compression methods for the specified file format. |
java.util.HashMap<java.lang.Integer,java.lang.String> |
getAvailableQualities()
Return available qualities for quicktime movie writers (see Bio-Formats package loci.formats.out.QTWriter) represented by a hashmap. |
java.lang.Integer |
getCodec()
Get the codec (quicktime only) |
java.lang.String |
getCompression()
Get the compression type |
java.lang.String |
getFileName()
Get image filename |
java.lang.Integer |
getFps()
Get the frames per second for movie writers (*.avi,*.mov). |
boolean |
getIgnoreInvalidStackSpecification()
Get the flag to ignore an invalid stack specification. |
ij.ImagePlus |
getInputImagePlus()
Get ImagePlus that has to be stored to disk |
MTBImage |
getInputMTBImage()
Get MTBImage that has to be stored to disk |
boolean |
getOverwrite()
Get the overwrite permission flag |
java.lang.Integer |
getQuality()
Get the quality (quicktime only) |
void |
notifyListeners(loci.common.StatusEvent event)
|
protected void |
operate()
|
void |
removeStatusListener(loci.common.StatusListener listener)
|
void |
setCodec(java.lang.Integer codec)
Set the codec (quicktime only). |
void |
setCompression(java.lang.String compression)
Set the compression type |
void |
setFileName(java.lang.String filename)
Set image filename |
void |
setFps(java.lang.Integer fps)
Set the frames per second for movie writers (*.avi,*.mov). |
void |
setIgnoreInvalidStackSpecification(boolean ignore)
Set the flag to ignore an invalid stack specification. |
void |
setInputImagePlus(ij.ImagePlus imp)
Set ImagePlus to store to disk |
void |
setInputMTBImage(MTBImage img)
Set MTBImage to store to disk |
void |
setOverwrite(boolean overwrite)
Set the overwrite permission flag |
void |
setQuality(java.lang.Integer quality)
Set the quality (quicktime only). |
void |
validateCustom()
|
protected void |
writeImagePlus(java.lang.String filename,
ij.ImagePlus imp)
Write ImagePlus to disk |
protected void |
writeMTBImage(java.lang.String filename,
MTBImage img)
Write an MTBImage to disk |
Methods inherited from class de.unihalle.informatik.MiToBo.core.operator.MTBOperator |
---|
readResolve |
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
deserializeFromXmlFile, fieldContained, getALDPortHashAccessKey, getConstructionMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, isConfigured, parametersToXmlObject, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, runOp, runOp, runOp, serializeToXmlFile, setConstructionMode, setName, setParameter, setParametersFromXml, setParametersFromXml, setVerbose, toStringVerbose, unconfiguredItems, validate, validateGeneric, writeHistory, writeHistory, writeHistory, writeParametersToXml |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Parameter(label="Video codec", required=false, direction=IN, mode=ADVANCED, dataIOOrder=8, description="Video codec (quicktime only)") private java.lang.Integer codec
@Parameter(label="Image compression", required=false, direction=IN, mode=ADVANCED, dataIOOrder=6, description="Image compression") private java.lang.String compression
@Parameter(label="Filename", required=true, direction=IN, mode=STANDARD, dataIOOrder=3, description="Image filename") private de.unihalle.informatik.Alida.datatypes.ALDFileString fileName
@Parameter(label="Fps", required=false, direction=IN, mode=ADVANCED, dataIOOrder=7, description="Frames per second for movies") private java.lang.Integer fps
@Parameter(label="Ignore stack specifications", required=true, direction=IN, mode=ADVANCED, dataIOOrder=5, description="Flag to ignore an invalid specification of the stack") private boolean ignoreInvalidStackSpec
@Parameter(label="Input ImagePlus", required=false, direction=IN, mode=STANDARD, dataIOOrder=2, description="ImagePlus to save") private transient ij.ImagePlus inputImagePlus
@Parameter(label="Input MTBImage", required=false, direction=IN, mode=STANDARD, dataIOOrder=1, description="MTBImage to save") private transient MTBImage inputMTBImage
@Parameter(label="overwrite", required=true, direction=IN, mode=STANDARD, dataIOOrder=4, description="Overwrite permission flag") private boolean overwrite
@Parameter(label="Video quality", required=false, direction=IN, mode=ADVANCED, dataIOOrder=9, description="Video quality (quicktime only)") private java.lang.Integer quality
private transient java.util.Vector<loci.common.StatusListener> statusListeners
Constructor Detail |
---|
public ImageWriterMTB() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public ImageWriterMTB(ij.ImagePlus imp, java.lang.String filename) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
imp
- image to write to diskfilename
- filename to write the image to. The extension specifies the output format.
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public ImageWriterMTB(MTBImage img, java.lang.String filename) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
- image to write to diskfilename
- filename to write the image to. The extension specifies the output format.
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
public void addStatusListener(loci.common.StatusListener listener)
addStatusListener
in interface loci.common.StatusReporter
public java.util.HashMap<java.lang.Integer,java.lang.String> getAvailableCodecs() throws loci.formats.FormatException
loci.formats.FormatException
public java.lang.String[] getAvailableCompression() throws loci.formats.FormatException
loci.formats.FormatException
public java.util.HashMap<java.lang.Integer,java.lang.String> getAvailableQualities() throws loci.formats.FormatException
loci.formats.FormatException
public java.lang.Integer getCodec()
public java.lang.String getCompression() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public java.lang.String getFileName()
public java.lang.Integer getFps()
public boolean getIgnoreInvalidStackSpecification()
setIgnoreInvalidStackSpecification(.)
-method
for more explanation
public ij.ImagePlus getInputImagePlus()
public MTBImage getInputMTBImage()
public boolean getOverwrite()
public java.lang.Integer getQuality()
public void notifyListeners(loci.common.StatusEvent event)
notifyListeners
in interface loci.common.StatusReporter
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException, OverwriteException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
OverwriteException
public void removeStatusListener(loci.common.StatusListener listener)
removeStatusListener
in interface loci.common.StatusReporter
public void setCodec(java.lang.Integer codec) throws loci.formats.FormatException
codec
- the quicktime codec ID (see Bio-Formats package loci.formats.out.QTWriter)
loci.formats.FormatException
public void setCompression(java.lang.String compression)
public void setFileName(java.lang.String filename)
public void setFps(java.lang.Integer fps) throws loci.formats.FormatException
fps
- frames per second of the written movie file (fps must be larger 0, otherwise validation fails)
loci.formats.FormatException
public void setIgnoreInvalidStackSpecification(boolean ignore)
public void setInputImagePlus(ij.ImagePlus imp)
public void setInputMTBImage(MTBImage img)
public void setOverwrite(boolean overwrite)
public void setQuality(java.lang.Integer quality) throws loci.formats.FormatException
quality
- quicktime movie quality ID (see Bio-Formats package loci.formats.out.QTWriter)
loci.formats.FormatException
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 writeImagePlus(java.lang.String filename, ij.ImagePlus imp) throws java.lang.RuntimeException, loci.formats.FormatException, java.io.IOException, loci.common.services.DependencyException, loci.common.services.ServiceException, ome.xml.model.enums.EnumerationException, de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
java.lang.RuntimeException
loci.formats.FormatException
java.io.IOException
loci.common.services.DependencyException
loci.common.services.ServiceException
ome.xml.model.enums.EnumerationException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected void writeMTBImage(java.lang.String filename, MTBImage img) throws loci.common.services.DependencyException, loci.common.services.ServiceException, de.unihalle.informatik.Alida.exceptions.ALDOperatorException, java.lang.RuntimeException, loci.formats.FormatException, java.io.IOException, ome.xml.model.enums.EnumerationException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
loci.common.services.DependencyException
loci.common.services.ServiceException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
java.lang.RuntimeException
loci.formats.FormatException
java.io.IOException
ome.xml.model.enums.EnumerationException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |