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 NiftiMetadatametadataFields 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)InterfaceIOTypegetLoaderComplement()Returns theInterfaceIOTypeof aFileLoaderwhich is the complement of this writer; i.e., reads what this writer writes with identical encoding.voidsetFile(java.io.File file)booleansetFromVolume(Volume3DInt volume)voidsetVolumeMetadata(VolumeMetadata metadata)Sets the metadata for this volume.booleanwriteVolume(Volume3DInt volume, java.lang.String column, NiftiMetadata dataset)Writesvolumeto the current file, using the specified column andNiftiMetadata.booleanwriteVolume(Volume3DInt volume, VolumeOutputOptions options)Writes a volume to file using the specified options.booleanwriteVolume(Volume3DInt volume, NiftiMetadata dataset)Writesvolumeto the current file, using the current column andNiftiMetadata.Methods inherited from class mgui.io.domestic.shapes.VolumeFileWriter
getObjectIcon, getSupportedObjects, write, writeVolumeMethods inherited from class mgui.io.FileWriter
getComplementIOType, getFailureMessage, getFile, getIOType, getOptions, getProgressMessage, getSuccessMessage, getTitle, getURL, setOptions, setURL, toString, write, writeMethods 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:FileWriterReturns theInterfaceIOTypeof aFileLoaderwhich 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
nullif no complement is defined.- Overrides:
getLoaderComplementin classFileWriter- Returns:
-
setFile
public void setFile(java.io.File file)- Specified by:
setFilein interfaceInterfaceIO- Overrides:
setFilein classFileWriter
-
setVolumeMetadata
Description copied from class:VolumeFileWriterSets the metadata for this volume.- Specified by:
setVolumeMetadatain classVolumeFileWriter
-
writeVolume
public boolean writeVolume(Volume3DInt volume, VolumeOutputOptions options) throws java.io.IOExceptionDescription copied from class:VolumeFileWriterWrites a volume to file using the specified options.- Specified by:
writeVolumein classVolumeFileWriter- Returns:
- Throws:
java.io.IOException
-
writeVolume
Writesvolumeto 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.IOExceptionWritesvolumeto the current file, using the specified column andNiftiMetadata.- Parameters:
volume-column-dataset-- Returns:
- Throws:
java.io.IOException
-
setFromVolume
-
getDoubleArray
-