Class ConvertToImageProcessor
Object
org.anchoranalysis.io.imagej.convert.ConvertToImageProcessor
public class ConvertToImageProcessor extends Object
Converts other voxel data-structures (as used by Anchor) to an ImageJ
ImageProcessor.- Author:
- Owen Feehan
-
Method Summary
Modifier and Type Method Description static ij.process.ImageProcessorfrom(org.anchoranalysis.image.voxel.VoxelsUntyped voxels, int z)Creates aImageProcessorby extracting a slice from aVoxelsUntyped.static ij.process.ImageProcessorfromByte(org.anchoranalysis.image.voxel.buffer.slice.SliceBufferIndex<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> pixelsForSlice, int z)Creates aImageProcessorby extracting a slice from aSliceBufferIndexof typeUnsignedByteBuffer.static ij.process.ImageProcessorfromByte(org.anchoranalysis.image.voxel.buffer.VoxelBuffer<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> slice, org.anchoranalysis.spatial.box.Extent extent)Creates aImageProcessorfrom voxel-buffer (of typeByteBuffer) that is already a slice.static ij.process.ImageProcessorfromFloat(org.anchoranalysis.image.voxel.buffer.VoxelBuffer<FloatBuffer> slice, org.anchoranalysis.spatial.box.Extent extent)Creates aImageProcessorfrom voxel-buffer (of typeFloatBuffer) that is already a slice.static ij.process.ImageProcessorfromShort(org.anchoranalysis.image.voxel.buffer.slice.SliceBufferIndex<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedShortBuffer> pixelsForSlice, int z)Creates aImageProcessorby extracting a slice from aSliceBufferIndexof typeUnsignedShortBuffer.static ij.process.ImageProcessorfromShort(org.anchoranalysis.image.voxel.buffer.VoxelBuffer<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedShortBuffer> slice, org.anchoranalysis.spatial.box.Extent extent)Creates aImageProcessorfrom voxel-buffer (of typeShortBuffer) that is already a slice.
-
Method Details
-
from
public static ij.process.ImageProcessor from(org.anchoranalysis.image.voxel.VoxelsUntyped voxels, int z) throws ImageJConversionExceptionCreates aImageProcessorby extracting a slice from aVoxelsUntyped.- Parameters:
voxels- the voxels to extract a slice from.z- slice-index.- Returns:
- a newly created image-procesor (reusing the existing buffer).
- Throws:
ImageJConversionException- if the voxels are neither unsigned byte nor unsigned short (the only two supported types).
-
fromByte
public static ij.process.ImageProcessor fromByte(org.anchoranalysis.image.voxel.buffer.slice.SliceBufferIndex<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> pixelsForSlice, int z)Creates aImageProcessorby extracting a slice from aSliceBufferIndexof typeUnsignedByteBuffer.- Parameters:
pixelsForSlice- the pixels to extract a slice from.z- slice-index.- Returns:
- a newly created image-processor (reusing the existing buffer).
-
fromShort
public static ij.process.ImageProcessor fromShort(org.anchoranalysis.image.voxel.buffer.slice.SliceBufferIndex<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedShortBuffer> pixelsForSlice, int z)Creates aImageProcessorby extracting a slice from aSliceBufferIndexof typeUnsignedShortBuffer.- Parameters:
pixelsForSlice- the pixels to extract a slice from.z- slice-index.- Returns:
- a newly created image-processor (reusing the existing buffer).
-
fromByte
public static ij.process.ImageProcessor fromByte(org.anchoranalysis.image.voxel.buffer.VoxelBuffer<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedByteBuffer> slice, org.anchoranalysis.spatial.box.Extent extent)Creates aImageProcessorfrom voxel-buffer (of typeByteBuffer) that is already a slice.- Parameters:
slice- the voxels representing a sliceextent- the size of image to create- Returns:
- a newly created image-processor (reusing the existing buffer).
-
fromShort
public static ij.process.ImageProcessor fromShort(org.anchoranalysis.image.voxel.buffer.VoxelBuffer<org.anchoranalysis.image.voxel.buffer.primitive.UnsignedShortBuffer> slice, org.anchoranalysis.spatial.box.Extent extent)Creates aImageProcessorfrom voxel-buffer (of typeShortBuffer) that is already a slice.- Parameters:
slice- the voxels representing a slice.extent- the size of image to create.- Returns:
- a newly created image-processor (reusing the existing buffer).
-
fromFloat
public static ij.process.ImageProcessor fromFloat(org.anchoranalysis.image.voxel.buffer.VoxelBuffer<FloatBuffer> slice, org.anchoranalysis.spatial.box.Extent extent)Creates aImageProcessorfrom voxel-buffer (of typeFloatBuffer) that is already a slice.- Parameters:
slice- the voxels representing a slice.extent- the size of image to create.- Returns:
- a newly created image-processor (reusing the existing buffer).
-