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

Class TissuesDataSetWriter



  • public class TissuesDataSetWriter
    extends java.lang.Object
    Class TissuesDataSetWriter provides an object that writes a magnetic resonance image tissues data set to a file. The data set includes the results of a spin relaxometry analysis for each pixel in the image, including number of tissues, spin density of each tissue, and spin-lattice relaxation rate of each tissue.

    The tissues 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 tissues data for the corresponding pixel index. An offset of 0 means no tissues data for that pixel index.
    • Pixel tissues data for each pixel. Written using PixelTissues.write().
    • Constructor Summary

      Constructors 
      Constructor and Description
      TissuesDataSetWriter(java.io.File theFile, int H, int W)
      Construct a new tissues data set writer.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addPixelTissues(PixelTissues tissues)
      Add the given pixel tissues 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

      • TissuesDataSetWriter

        public TissuesDataSetWriter(java.io.File theFile,
                                    int H,
                                    int W)
                             throws java.io.IOException
        Construct a new tissues data set writer.
        Parameters:
        theFile - File to write.
        H - Height (number of rows).
        W - Width (number of columns).
        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

      • addPixelTissues

        public void addPixelTissues(PixelTissues tissues)
                             throws java.io.IOException
        Add the given pixel tissues data to this data set. The pixel tissues data consists of the pixel index, a list of spin densities, and a list of spin-lattice relaxation rates. The length of the lists gives the number of tissues.
        Parameters:
        tissues - PixelTissues object, with a pixel index i in the range 0 ≤ iP−1.
        Throws:
        java.lang.NullPointerException - (unchecked exception) Thrown if tissues is null.
        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.