Class ConvertToImageProcessor
Object
ConvertToImageProcessor
Converts other voxel data-structures (as used by Anchor) to an ImageJ
ImageProcessor
.- Author:
- Owen Feehan
-
Method Summary
Modifier and TypeMethodDescriptionstatic ij.process.ImageProcessor
from
(VoxelsUntyped voxels, int z) Creates aImageProcessor
by extracting a slice from aVoxelsUntyped
.static ij.process.ImageProcessor
fromByte
(SliceBufferIndex<UnsignedByteBuffer> pixelsForSlice, int z) static ij.process.ImageProcessor
fromByte
(VoxelBuffer<UnsignedByteBuffer> slice, Extent extent) Creates aImageProcessor
from voxel-buffer (of typeByteBuffer
) that is already a slice.static ij.process.ImageProcessor
fromFloat
(VoxelBuffer<FloatBuffer> slice, Extent extent) Creates aImageProcessor
from voxel-buffer (of typeFloatBuffer
) that is already a slice.static ij.process.ImageProcessor
fromShort
(SliceBufferIndex<UnsignedShortBuffer> pixelsForSlice, int z) static ij.process.ImageProcessor
fromShort
(VoxelBuffer<UnsignedShortBuffer> slice, Extent extent) Creates aImageProcessor
from voxel-buffer (of typeShortBuffer
) that is already a slice.
-
Method Details
-
from
public static ij.process.ImageProcessor from(VoxelsUntyped voxels, int z) throws ImageJConversionException Creates aImageProcessor
by 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(SliceBufferIndex<UnsignedByteBuffer> pixelsForSlice, int z) - 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(SliceBufferIndex<UnsignedShortBuffer> pixelsForSlice, int z) - 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(VoxelBuffer<UnsignedByteBuffer> slice, Extent extent) Creates aImageProcessor
from 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(VoxelBuffer<UnsignedShortBuffer> slice, Extent extent) Creates aImageProcessor
from 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
Creates aImageProcessor
from 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).
-