Package mgui.io.domestic.shapes
Class VolumeFileWriter
java.lang.Object
mgui.io.FileWriter
mgui.io.domestic.shapes.VolumeFileWriter
- All Implemented Interfaces:
InterfaceIO
,IconObject
- Direct Known Subclasses:
NiftiVolumeWriter
public abstract class VolumeFileWriter extends FileWriter
Writes a
Volume3DInt
to file. All volume writers should extend this class. This class
also provides default implementations for writing volumes to the domestic standard, NIFTI format, using the
jniftilib library. See NITRIC for details.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields inherited from class mgui.io.FileWriter
dataFile, dataURL, failure_message, options, success_message
-
Constructor Summary
Constructors Constructor Description VolumeFileWriter()
-
Method Summary
Modifier and Type Method Description javax.swing.Icon
getObjectIcon()
Returns theIcon
associated with this object.java.util.ArrayList<java.lang.Class<?>>
getSupportedObjects()
Returns a list of classes for objects which are supported by this I/O interfaceabstract void
setVolumeMetadata(VolumeMetadata metadata)
Sets the metadata for this volume.boolean
write(InterfaceIOOptions options, ProgressUpdater progress_bar)
Writes this object according to the givenoptions
.boolean
writeVolume(Volume3DInt volume)
Writesvolume
to file using default parameters.abstract boolean
writeVolume(Volume3DInt volume, VolumeOutputOptions options)
Writes a volume to file using the specified options.Methods inherited from class mgui.io.FileWriter
getComplementIOType, getFailureMessage, getFile, getIOType, getLoaderComplement, getOptions, getProgressMessage, getSuccessMessage, getTitle, getURL, setFile, setOptions, setURL, toString, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
VolumeFileWriter
public VolumeFileWriter()
-
-
Method Details
-
write
Description copied from class:FileWriter
Writes this object according to the givenoptions
. If loaded object is of typePersistentObject
, this method should also set the file writer and reference URL for the object.- Specified by:
write
in classFileWriter
- Returns:
-
writeVolume
Writesvolume
to file using default parameters.- Parameters:
volume
-options
-- Returns:
- Throws:
java.io.IOException
-
writeVolume
public abstract boolean writeVolume(Volume3DInt volume, VolumeOutputOptions options) throws java.io.IOExceptionWrites a volume to file using the specified options.- Parameters:
volume
-options
-- Returns:
- Throws:
java.io.IOException
-
getObjectIcon
public javax.swing.Icon getObjectIcon()Description copied from interface:IconObject
Returns theIcon
associated with this object.- Specified by:
getObjectIcon
in interfaceIconObject
- Overrides:
getObjectIcon
in classFileWriter
- Returns:
-
getSupportedObjects
public java.util.ArrayList<java.lang.Class<?>> getSupportedObjects()Description copied from interface:InterfaceIO
Returns a list of classes for objects which are supported by this I/O interface- Specified by:
getSupportedObjects
in interfaceInterfaceIO
- Overrides:
getSupportedObjects
in classFileWriter
- Returns:
-
setVolumeMetadata
Sets the metadata for this volume.- Parameters:
metadata
-
-