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

Class SignalDataSetReader



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

    The spin signal data set file format is defined in class SignalDataSetWriter.

    • Constructor Summary

      Constructors 
      Constructor and Description
      SignalDataSetReader(java.io.File theFile)
      Construct a new spin signal data set reader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void close()
      Close this data set.
      int columnFor(int i)
      Get the column index corresponding to the given pixel index.
      int getHeight()
      Get the height H of this data set's magnetic resonance image.
      int getPixelCount()
      Get the number of pixels P in this data set's magnetic resonance image.
      PixelSignal getPixelSignal(int i)
      Get the pixel signal data for the given pixel in this data set.
      Series getTimeSeries()
      Get the time series for this data set.
      int getWidth()
      Get the width W of this data set's magnetic resonance image.
      int indexFor(int r, int c)
      Get the pixel index for the given row and column indexes.
      int rowFor(int i)
      Get the row index corresponding to the given pixel index.
      • Methods inherited from class java.lang.Object

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

      • SignalDataSetReader

        public SignalDataSetReader(java.io.File theFile)
                            throws java.io.IOException
        Construct a new spin signal data set reader.
        Parameters:
        theFile - File to read.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if theFile is null.
        java.io.IOException - Thrown if an I/O error occurred.
    • Method Detail

      • getHeight

        public int getHeight()
        Get the height H of this data set's magnetic resonance image.
        Returns:
        Height (number of rows).
      • getWidth

        public int getWidth()
        Get the width W of this data set's magnetic resonance image.
        Returns:
        Width (number of columns).
      • getPixelCount

        public int getPixelCount()
        Get the number of pixels P in this data set's magnetic resonance image.
        Returns:
        Number of pixels.
      • indexFor

        public int indexFor(int r,
                            int c)
        Get the pixel index for the given row and column indexes.
        Parameters:
        r - Row index, 0 ≤ rH−1.
        c - Column index, 0 ≤ cW−1.
        Returns:
        Pixel index.
        Throws:
        java.lang.IndexOutOfBoundsException - (unchecked exception) Thrown if r or c is out of bounds.
      • rowFor

        public int rowFor(int i)
        Get the row index corresponding to the given pixel index.
        Parameters:
        i - Pixel index, 0 ≤ iP−1.
        Returns:
        Row index.
        Throws:
        java.lang.IndexOutOfBoundsException - (unchecked exception) Thrown if i is out of bounds.
      • columnFor

        public int columnFor(int i)
        Get the column index corresponding to the given pixel index.
        Parameters:
        i - Pixel index, 0 ≤ iP−1.
        Returns:
        Column index.
        Throws:
        java.lang.IndexOutOfBoundsException - (unchecked exception) Thrown if i is out of bounds.
      • getTimeSeries

        public Series getTimeSeries()
        Get the time series for this data set.
        Returns:
        Time series.
      • getPixelSignal

        public PixelSignal getPixelSignal(int i)
                                   throws java.io.IOException
        Get the pixel signal data for the given pixel in this data set. If the given pixel has no associated signal data, null is returned.
        Parameters:
        i - Pixel index, 0 ≤ iP−1.
        Returns:
        PixelSignal object for pixel i, or null.
        Throws:
        java.lang.IndexOutOfBoundsException - (unchecked exception) Thrown if i is out of bounds.
        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.