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 Details

  • Constructor Details

    • NiftiVolumeWriter

      public NiftiVolumeWriter()
    • NiftiVolumeWriter

      public NiftiVolumeWriter​(java.io.File file)
  • Method Details

    • getLoaderComplement

      public InterfaceIOType getLoaderComplement()
      Description copied from class: FileWriter
      Returns the InterfaceIOType of a FileLoader 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 class FileWriter
      Returns:
    • setFile

      public void setFile​(java.io.File file)
      Specified by:
      setFile in interface InterfaceIO
      Overrides:
      setFile in class FileWriter
    • setVolumeMetadata

      public void setVolumeMetadata​(VolumeMetadata metadata)
      Description copied from class: VolumeFileWriter
      Sets the metadata for this volume.
      Specified by:
      setVolumeMetadata in class VolumeFileWriter
    • writeVolume

      public boolean writeVolume​(Volume3DInt volume, VolumeOutputOptions options) throws java.io.IOException
      Description copied from class: VolumeFileWriter
      Writes a volume to file using the specified options.
      Specified by:
      writeVolume in class VolumeFileWriter
      Returns:
      Throws:
      java.io.IOException
    • writeVolume

      public boolean writeVolume​(Volume3DInt volume, NiftiMetadata dataset) throws java.io.IOException
      Writes volume to the current file, using the current column and NiftiMetadata.
      Parameters:
      volume -
      dataset -
      Returns:
      Throws:
      java.io.IOException
    • writeVolume

      public boolean writeVolume​(Volume3DInt volume, java.lang.String column, NiftiMetadata dataset) throws java.io.IOException
      Writes volume to the current file, using the specified column and NiftiMetadata.
      Parameters:
      volume -
      column -
      dataset -
      Returns:
      Throws:
      java.io.IOException
    • setFromVolume

      public boolean setFromVolume​(Volume3DInt volume)
    • getDoubleArray

      protected double[][][] getDoubleArray​(Volume3DInt volume, java.lang.String column)