Documentation of 'edu.rit.mri.SignalDataSetWriter' Java class
SignalDataSetWriter
edu.rit.mri

Class SignalDataSetWriter



  • public class SignalDataSetWriter
    extends java.lang.Object
    Class SignalDataSetWriter provides an object that writes a magnetic resonance image spin signal data set to a file. The data set includes the measured spin signals for each pixel in the image.

    The spin signal data set file format is as follows. Primitive types are written as with java.io.DataOutput.

    • Image height H (int, 4 bytes).
    • Image width W (int, 4 bytes). Number of pixels P = H×W.
    • P offsets (long, 8 bytes each). Each is the offset to the start of the pixel signal data for the corresponding pixel index. An offset of 0 means no signal data for that pixel index.
    • Length of time series M (short, 2 bytes).
    • M time values (double, 8 bytes each).
    • Pixel signal data for each pixel. Written using PixelSignal.write().
    • Constructor Summary

      Constructors 
      Constructor and Description
      SignalDataSetWriter(java.io.File theFile, int H, int W, Series t_series)
      Construct a new spin signal data set writer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addPixelSignal(PixelSignal signal)
      Add the given pixel signal data to this data set.
      void close()
      Close this data set.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SignalDataSetWriter

        public SignalDataSetWriter(java.io.File theFile,
                                   int H,
                                   int W,
                                   Series t_series)
                            throws java.io.IOException
        Construct a new spin signal data set writer.
        Parameters:
        theFile - File to write.
        H - Height (number of rows).
        W - Width (number of columns).
        t_series - Time series.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if theFile is null. Thrown if t_series is null.
        java.lang.IllegalArgumentException - (unchecked exception) Thrown if H < 0 or W < 0.
        java.io.IOException - Thrown if an I/O error occurred.
    • Method Detail

      • addPixelSignal

        public void addPixelSignal(PixelSignal signal)
                            throws java.io.IOException
        Add the given pixel signal data to this data set. The pixel signal data consists of the pixel index and the signal series. The signal series is a series of length M giving the spin signal measurements S(ti), where the ti are the elements of the time series.
        Parameters:
        signal - PixelSignal object, with a pixel index i in the range 0 ≤ iP−1.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if signal is null.
        java.lang.IndexOutOfBoundsException - (unchecked exception) Thrown if i is out of bounds.
        java.lang.IllegalArgumentException - (unchecked exception) Thrown if the length of the signal series ≠ M, the length of the time series.
        java.io.IOException - Thrown if an I/O error occurred.
      • close

        public void close()
                   throws java.io.IOException
        Close this data set.
        Throws:
        java.io.IOException - Thrown if an I/O error occurred.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.