Package mgui.io.standard.nifti
Class NiftiVolumeLoader
java.lang.Object
mgui.io.FileLoader
mgui.io.domestic.shapes.InterfaceShapeLoader
mgui.io.domestic.shapes.VolumeFileLoader
mgui.io.standard.nifti.NiftiVolumeLoader
- All Implemented Interfaces:
InterfaceIO,IconObject
public class NiftiVolumeLoader extends VolumeFileLoader
File loader to read Analyze 7.5 format volume files. Has methods to read from
both header (.hdr) and volume (.img) files.
See http://www.mayo.edu/PDF/ANALYZE75.pdf for details on this format.
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description java.io.Fileheaderbooleanis_niftijava.io.Filetransformjava.io.FilevolumeFields inherited from class mgui.io.domestic.shapes.VolumeFileLoader
dataMax, dataMin, flipX, flipY, flipZ, maxAlpha, minAlpha, setAlphaFields inherited from class mgui.io.FileLoader
dataFile, dataURL, options -
Constructor Summary
Constructors Constructor Description NiftiVolumeLoader()NiftiVolumeLoader(java.io.File input)NiftiVolumeLoader(java.io.File input, boolean trans) -
Method Summary
Modifier and Type Method Description Box3DgetBoundingBox()java.io.FilegetFile()Returns the current data file for this loader.intgetVolCount()VolumeMetadatagetVolumeMetadata()Returns a set of metadata describing the current volume file.InterfaceIOTypegetWriterComplement()Returns theInterfaceIOTypeof aFileWriterwhich is the complement of this loader; i.e., writes what this loader reads with identical encoding.booleanhasVol(int v)protected voidinit(java.io.File input, boolean trans)NiftiMetadatareadHeader()voidsetFile(java.io.File input)Sets the current File for this loader.protected booleansetVolume3DBlocking(Volume3DInt volume3d, java.lang.String column, int v, VolumeInputOptions options, ProgressUpdater progress)voidwriteHeader(NiftiMetadata h)Methods inherited from class mgui.io.domestic.shapes.VolumeFileLoader
getDefaultOptions, getObjectIcon, getSupportedObjects, getVolume3D, getVolume3D, getVolume3D, getVolume3D, getVolume3D, getVolume3DCustom, load, loadObject, loadShape, loadVolume, loadVolume, loadVolume, setAlpha, setAlpha, setVolume3D, setVolume3D, setVolume3D, setVolume3D, setVolume3DWorkerMethods inherited from class mgui.io.FileLoader
getComplementIOType, getFailureMessage, getIOType, getOptions, getProgressMessage, getSuccessMessage, getTitle, load, load, loadObject, loadObject, loadObject, setOptions, setURL, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
header
public java.io.File header -
volume
public java.io.File volume -
transform
public java.io.File transform -
is_nifti
public boolean is_nifti
-
-
Constructor Details
-
NiftiVolumeLoader
public NiftiVolumeLoader() -
NiftiVolumeLoader
public NiftiVolumeLoader(java.io.File input) -
NiftiVolumeLoader
public NiftiVolumeLoader(java.io.File input, boolean trans)
-
-
Method Details
-
setFile
public void setFile(java.io.File input)Description copied from class:FileLoaderSets the current File for this loader. Sets the URL tonull.- Specified by:
setFilein interfaceInterfaceIO- Overrides:
setFilein classFileLoader
-
getFile
public java.io.File getFile()Description copied from class:FileLoaderReturns the current data file for this loader.- Overrides:
getFilein classFileLoader- Returns:
-
init
protected void init(java.io.File input, boolean trans) throws java.io.IOException- Throws:
java.io.IOException
-
getBoundingBox
-
readHeader
-
getVolumeMetadata
Description copied from class:VolumeFileLoaderReturns a set of metadata describing the current volume file.- Specified by:
getVolumeMetadatain classVolumeFileLoader- Returns:
- Throws:
java.io.IOExceptionjava.io.FileNotFoundException
-
writeHeader
-
hasVol
public boolean hasVol(int v) -
getVolCount
public int getVolCount()- Overrides:
getVolCountin classVolumeFileLoader
-
setVolume3DBlocking
protected boolean setVolume3DBlocking(Volume3DInt volume3d, java.lang.String column, int v, VolumeInputOptions options, ProgressUpdater progress) throws ShapeIOException- Specified by:
setVolume3DBlockingin classVolumeFileLoader- Throws:
ShapeIOException
-
getWriterComplement
Description copied from class:FileLoaderReturns theInterfaceIOTypeof aFileWriterwhich is the complement of this loader; i.e., writes what this loader reads with identical encoding. Transfer between loader and writer should be lossless.Returns
nullif no complement is defined.- Overrides:
getWriterComplementin classFileLoader- Returns:
-