public class IOUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static void |
forceMkDirs(java.io.File directory)
Creates directory if it does not exists already.
|
static ij.ImagePlus |
openImage(java.io.File file)
Open an image using ImageJ image reader.
|
static ij.ImagePlus |
openImage(java.lang.String fileName)
Open an image using ImageJ image reader.
|
static void |
saveAsTiff(ij.ImagePlus imp,
java.io.File file)
Save image to a file using image TIFF encoder.
|
static void |
saveAsTiff(ij.process.ImageProcessor ip,
java.io.File file)
Save image to a file using image TIFF encoder.
|
static void |
saveAsTiff(ij.ImageStack stack,
java.io.File file)
Save image to a file using image TIFF encoder.
|
static void |
skip(java.io.Reader reader,
long n)
Skips over and discards n bytes of data from this input stream.
|
public static ij.ImagePlus openImage(java.io.File file) throws java.io.IOException
file
- image file.java.io.IOException
- when image cannot be open.public static ij.ImagePlus openImage(java.lang.String fileName) throws java.io.IOException
fileName
- image file name.java.io.IOException
- when image cannot be open.openImage(java.io.File)
public static void saveAsTiff(ij.ImagePlus imp, java.io.File file) throws java.io.IOException
imp
- image.file
- destination file.java.io.IOException
- when image cannot be saved.public static void saveAsTiff(ij.process.ImageProcessor ip, java.io.File file) throws java.io.IOException
ip
- image.file
- destination file.java.io.IOException
- when image cannot be saved.public static void saveAsTiff(ij.ImageStack stack, java.io.File file) throws java.io.IOException
stack
- image.file
- destination file.java.io.IOException
- when image cannot be saved.public static void forceMkDirs(java.io.File directory) throws java.io.IOException
directory
- directory to create.java.io.IOException
- if directory cannot be created.public static void skip(java.io.Reader reader, long n) throws java.io.IOException
reader
- input readern
- number of bytes to skip.java.io.IOException
- if the stream is too short or I/O error happened.