Package mgui.io.foreign.vol
Class VolFileLoader
java.lang.Object
mgui.io.FileLoader
mgui.io.domestic.shapes.InterfaceShapeLoader
mgui.io.domestic.shapes.VolumeFileLoader
mgui.io.foreign.vol.VolFileLoader
- All Implemented Interfaces:
InterfaceIO
,IconObject
public class VolFileLoader extends VolumeFileLoader
-
Field Summary
Fields inherited from class mgui.io.domestic.shapes.VolumeFileLoader
dataMax, dataMin, flipX, flipY, flipZ, maxAlpha, minAlpha, setAlpha
Fields inherited from class mgui.io.FileLoader
dataFile, dataURL, options
-
Constructor Summary
Constructors Constructor Description VolFileLoader(java.net.URL voldat)
Creates a VolFile from a URL. -
Method Summary
Modifier and Type Method Description byte[][][]
getFileData()
java.lang.String
getId()
Returns the ID string for the volume fileVolume3DInt
getVolume3D()
Volume3DInt
getVolume3D(int v)
Return a Grid3D object representing the geometrical boundary of this volumeVolumeMetadata
getVolumeMetadata()
Returns a set of metadata describing the current volume file.int
getXDim()
Gets the X dimension of the volumeint
getYDim()
Gets the Y dimension of the volumeint
getZDim()
Gets the Z dimension of the volumevoid
loadData()
protected void
releaseData()
boolean
setVolume3D(Volume3DInt volume, java.lang.String column, int v, VolumeInputOptions options, ProgressUpdater progress)
Fills a grid with this file's data.protected boolean
setVolume3DBlocking(Volume3DInt volume, java.lang.String column, int v, VolumeInputOptions options, ProgressUpdater progress)
Methods inherited from class mgui.io.domestic.shapes.VolumeFileLoader
getDefaultOptions, getObjectIcon, getSupportedObjects, getVolCount, getVolume3D, getVolume3D, getVolume3D, getVolume3DCustom, load, loadObject, loadShape, loadVolume, loadVolume, loadVolume, setAlpha, setAlpha, setVolume3D, setVolume3D, setVolume3D, setVolume3DWorker
Methods inherited from class mgui.io.FileLoader
getComplementIOType, getFailureMessage, getFile, getIOType, getOptions, getProgressMessage, getSuccessMessage, getTitle, getWriterComplement, load, load, loadObject, loadObject, loadObject, setFile, setOptions, setURL, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
VolFileLoader
public VolFileLoader(java.net.URL voldat)Creates a VolFile from a URL.- Parameters:
voldat
- The URL for a .vol file holding the volume
-
-
Method Details
-
getVolumeMetadata
Description copied from class:VolumeFileLoader
Returns a set of metadata describing the current volume file.- Specified by:
getVolumeMetadata
in classVolumeFileLoader
- Returns:
-
loadData
public void loadData() -
getId
public java.lang.String getId()Returns the ID string for the volume file -
getXDim
public int getXDim()Gets the X dimension of the volume -
getYDim
public int getYDim()Gets the Y dimension of the volume -
getZDim
public int getZDim()Gets the Z dimension of the volume -
getFileData
public byte[][][] getFileData() -
setVolume3D
public boolean setVolume3D(Volume3DInt volume, java.lang.String column, int v, VolumeInputOptions options, ProgressUpdater progress)Fills a grid with this file's data. Data with be truncated if grid dimensions are too small, and will not set values for extra elements if grid is too large. TODO set extra elements to 0 TODO allow scaling of data to fit grid dimensions- Overrides:
setVolume3D
in classVolumeFileLoader
- Parameters:
grid
- Grid3D object to fill
-
releaseData
protected void releaseData() -
getVolume3D
- Overrides:
getVolume3D
in classVolumeFileLoader
-
getVolume3D
Return a Grid3D object representing the geometrical boundary of this volume- Overrides:
getVolume3D
in classVolumeFileLoader
- Returns:
- Grid3D object
-
setVolume3DBlocking
protected boolean setVolume3DBlocking(Volume3DInt volume, java.lang.String column, int v, VolumeInputOptions options, ProgressUpdater progress) throws ShapeIOException- Specified by:
setVolume3DBlocking
in classVolumeFileLoader
- Throws:
ShapeIOException
-