public class ImageBlockDeblock extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
class |
ImageBlockDeblock.BlockCallable |
Constructor and Description |
---|
ImageBlockDeblock(File inFile,
File outFile,
int[] bs,
int[] o) |
ImageBlockDeblock(File inFile,
File outFileFormat,
int[] bs,
int[] o,
int nOutput)
Creates an ImageBlockDeblock that will split a file into blocks of size at most bs, plus
an overlap determined by o.
|
Modifier and Type | Method and Description |
---|---|
ArrayList<File> |
blockFile()
Splits the input file into blocks.
|
File |
deblockFile(int idx)
Recombine image blocks into the original image shape.
|
int |
getHeight() |
File |
getInputFile() |
int |
getNumOutput() |
File |
getOutputFile(int idx) |
String |
getOutputFileName(int idx) |
int |
getWidth() |
Callable<ImageBlockDeblock> |
imageBlockCallable() |
ArrayList<File> |
imageBlockFiles() |
Callable<ImageBlockDeblock> |
imageDeblockCallable() |
void |
mapChunks(File origChunk,
File newChunk)
Map a new block file of the same size to the original one given.
|
void |
mapChunks(File origChunk,
File newChunk,
int idx) |
int |
numUnmappedBlocks() |
int |
numUnmappedBlocks(int idx) |
void |
setSubfolder(String folder) |
public ImageBlockDeblock(File inFile, File outFileFormat, int[] bs, int[] o, int nOutput)
inFile
- input file.outFileFormat
- re-combined output file format string.bs
- a 2-element array containing the size of the blocks, not including overlap.o
- the total block overlap in pixels. Each image block will be of size at most bs + o.public ArrayList<File> blockFile() throws ExecutionException, InterruptedException
ExecutionException
- if an ExecutionError is encounteredInterruptedException
- if this method is interrupted,public File deblockFile(int idx) throws ExecutionException
idx
- the slice index to deblockExecutionException
- if something goes wrong, probably file IO relatedpublic void mapChunks(File origChunk, File newChunk)
origChunk
- the File representing the original image block file, created by
blockImage().newChunk
- the File representing a new image block file representing the output of
processing on the original block image.public void setSubfolder(String folder)
public File getInputFile()
public File getOutputFile(int idx)
public String getOutputFileName(int idx)
public Callable<ImageBlockDeblock> imageBlockCallable()
public Callable<ImageBlockDeblock> imageDeblockCallable()
public int numUnmappedBlocks()
public int numUnmappedBlocks(int idx)
public int getWidth()
public int getHeight()
public int getNumOutput()
Copyright © 2015–2021 Fiji. All rights reserved.