public class VoxelOrderDataSource extends ExternalDataSource
Constructor and Description |
---|
VoxelOrderDataSource(EndianNeutralDataInputStream input,
int components,
java.lang.String type)
Initialize a VoxelOrderDataSource from an input stream.
|
VoxelOrderDataSource(java.lang.String filename,
int components,
java.lang.String type)
Constructor requires the filename, the number of values in each voxel and
the data type.
|
VoxelOrderDataSource(java.lang.String filename,
int components,
java.lang.String type,
boolean intelByteOrder) |
VoxelOrderDataSource(java.lang.String filename,
int components,
java.lang.String type,
boolean intelByteOrder,
int offset) |
Modifier and Type | Method and Description |
---|---|
boolean |
more()
Tests whether there are unprocessed voxels in the data source.
|
double[] |
nextVoxel()
Returns the data in the next voxel.
|
getDataTypeCode, typeString
public VoxelOrderDataSource(java.lang.String filename, int components, java.lang.String type)
filename
- The name of the data file.components
- The number of values in each voxel.type
- A string indicating the data type: either "char", "short",
"int", "long", "float" or "double".public VoxelOrderDataSource(java.lang.String filename, int components, java.lang.String type, boolean intelByteOrder)
filename
- The name of the data file.components
- The number of values in each voxel.type
- A string indicating the data type: either "char", "short",
"int", "long", "float" or "double".intelByteOrder
- true if the byte ordering of the input stream is little-endian.public VoxelOrderDataSource(java.lang.String filename, int components, java.lang.String type, boolean intelByteOrder, int offset)
filename
- The name of the data file.components
- The number of values in each voxel.type
- A string indicating the data type: either "char", "short",
"int", "long", "float" or "double".intelByteOrder
- true if the byte ordering of the input stream is little-endian.offset
- read and discard this many bytes; used to skip headers.public VoxelOrderDataSource(EndianNeutralDataInputStream input, int components, java.lang.String type)
input
- The stream, which should be ready to read data.components
- The number of values in each voxel.type
- A string indicating the data type: either "char", "short",
"int", "long", "float" or "double".public double[] nextVoxel() throws DataSourceException
DataSource
DataSourceException
public boolean more()
DataSource