public class ScannerOrderDataSource extends ExternalDataSource
Constructor and Description |
---|
ScannerOrderDataSource(double[][] data)
Constructs a data source from an array.
|
ScannerOrderDataSource(java.lang.String filename,
int numVox,
int components,
java.lang.String type)
Constructor requires the filename, the dimensions of the measurement
volume, the number of values in each voxel and the data type.
|
ScannerOrderDataSource(java.lang.String filename,
int numVox,
int components,
java.lang.String type,
boolean intelByteOrder)
Constructor requires the filename, the dimensions of the measurement
volume, the number of values in each voxel and the data type.
|
ScannerOrderDataSource(java.lang.String filename,
int numVox,
int components,
java.lang.String type,
boolean intelByteOrder,
int offset)
Constructor requires the filename, the number of values in each voxel and
the data type.
|
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 ScannerOrderDataSource(java.lang.String filename, int numVox, int components, java.lang.String type)
filename
- The name of the data file.numVox
- The number of voxels in the measurement volume.components
- The number of values in each voxel.type
- A string indicating the data type: either "char", "short",
"int", "long", "float" or "double".public ScannerOrderDataSource(java.lang.String filename, int numVox, int components, java.lang.String type, boolean intelByteOrder)
filename
- The name of the data file.numVox
- The number of voxels in the measurement volume.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 ordering of the input is little-endian.public ScannerOrderDataSource(java.lang.String filename, int numVox, int components, java.lang.String type, boolean intelByteOrder, int offset)
filename
- The name of the data file.numVox
- The number of voxels in the measurement volume.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 ScannerOrderDataSource(double[][] data)
data
- where data[x][y]
is component y for voxel x.public double[] nextVoxel() throws DataSourceException
DataSource
DataSourceException
public boolean more()
DataSource