Package mgui.io.standard.nifti
Class NiftiVolumeWriter
java.lang.Object
mgui.io.FileWriter
mgui.io.domestic.shapes.VolumeFileWriter
mgui.io.standard.nifti.NiftiVolumeWriter
- All Implemented Interfaces:
InterfaceIO
,IconObject
public class NiftiVolumeWriter extends VolumeFileWriter
Writer for Nifti-format volumes. Built upon
NiftiDataset
, which in turn extends the
Nifti1Dataset
class of the niftijlib library.
See: NITRC page
- Since:
- 1.0
- Version:
- 1.0
- Author:
- Andrew Reid
-
Field Summary
Fields Modifier and Type Field Description protected NiftiMetadata
metadata
Fields inherited from class mgui.io.FileWriter
dataFile, dataURL, failure_message, options, success_message
-
Constructor Summary
Constructors Constructor Description NiftiVolumeWriter()
NiftiVolumeWriter(java.io.File file)
-
Method Summary
Modifier and Type Method Description protected double[][][]
getDoubleArray(Volume3DInt volume, java.lang.String column)
InterfaceIOType
getLoaderComplement()
Returns theInterfaceIOType
of aFileLoader
which is the complement of this writer; i.e., reads what this writer writes with identical encoding.void
setFile(java.io.File file)
boolean
setFromVolume(Volume3DInt volume)
void
setVolumeMetadata(VolumeMetadata metadata)
Sets the metadata for this volume.boolean
writeVolume(Volume3DInt volume, java.lang.String column, NiftiMetadata dataset)
Writesvolume
to the current file, using the specified column andNiftiMetadata
.boolean
writeVolume(Volume3DInt volume, VolumeOutputOptions options)
Writes a volume to file using the specified options.boolean
writeVolume(Volume3DInt volume, NiftiMetadata dataset)
Writesvolume
to the current file, using the current column andNiftiMetadata
.Methods inherited from class mgui.io.domestic.shapes.VolumeFileWriter
getObjectIcon, getSupportedObjects, write, writeVolume
Methods inherited from class mgui.io.FileWriter
getComplementIOType, getFailureMessage, getFile, getIOType, getOptions, getProgressMessage, getSuccessMessage, getTitle, getURL, setOptions, setURL, toString, write, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
metadata
-
-
Constructor Details
-
NiftiVolumeWriter
public NiftiVolumeWriter() -
NiftiVolumeWriter
public NiftiVolumeWriter(java.io.File file)
-
-
Method Details
-
getLoaderComplement
Description copied from class:FileWriter
Returns theInterfaceIOType
of aFileLoader
which is the complement of this writer; i.e., reads what this writer writes with identical encoding. Transfer between loader and writer should be lossless.Returns
null
if no complement is defined.- Overrides:
getLoaderComplement
in classFileWriter
- Returns:
-
setFile
public void setFile(java.io.File file)- Specified by:
setFile
in interfaceInterfaceIO
- Overrides:
setFile
in classFileWriter
-
setVolumeMetadata
Description copied from class:VolumeFileWriter
Sets the metadata for this volume.- Specified by:
setVolumeMetadata
in classVolumeFileWriter
-
writeVolume
public boolean writeVolume(Volume3DInt volume, VolumeOutputOptions options) throws java.io.IOExceptionDescription copied from class:VolumeFileWriter
Writes a volume to file using the specified options.- Specified by:
writeVolume
in classVolumeFileWriter
- Returns:
- Throws:
java.io.IOException
-
writeVolume
Writesvolume
to the current file, using the current column andNiftiMetadata
.- Parameters:
volume
-dataset
-- Returns:
- Throws:
java.io.IOException
-
writeVolume
public boolean writeVolume(Volume3DInt volume, java.lang.String column, NiftiMetadata dataset) throws java.io.IOExceptionWritesvolume
to the current file, using the specified column andNiftiMetadata
.- Parameters:
volume
-column
-dataset
-- Returns:
- Throws:
java.io.IOException
-
setFromVolume
-
getDoubleArray
-