<CRANTaskView>
  <name>MedicalImaging</name>
  <topic>Medical Image Analysis</topic>
  <maintainer email = "bwhitcher@gmail.com">Brandon Whitcher</maintainer>
  <version>2016-08-16</version>
  <info>
    <p><strong>Data Input/Output</strong></p>
    <p><em>DICOM</em></p>
    <p>The industry standard format, for data coming off a clinical
    imaging device, is <a href="http://dicom.nema.org">DICOM</a>
    (Digital Imaging and Communications in Medicine).  The DICOM
    "standard" is very broad and very complicated.  Roughly speaking
    each DICOM-compliant file is a collection of fields organized into
    two four-byte sequences (group,element) that are represented as
    hexadecimal numbers and form a <em>tag</em>.  The (group,element)
    combination announces what type of information is coming next.
    There is no fixed number of bytes for a DICOM header.  The final
    (group,element) tag should be the "data" tag (7FE0,0010), such
    that all subsequent information is related to the image(s).</p>
    <ul>
      <li>The packages <pkg>oro.dicom</pkg>, <pkg>fmri</pkg> and
      <pkg>tractor.base</pkg> (part of the <gcode>tractor</gcode>
      project) provide R functions that read DICOM files and
      facilitate their conversion to ANALYZE or NIfTI format.</li>
    </ul>
    <p><em>ANALYZE and NIfTI</em></p>
    <p>Although the industry standard for medical imaging data is
    DICOM, another format has come to be heavily used in the image
    analysis community.  The <a
    href="http://www.mayo.edu/research/labs/biomedical-imaging/software/analyze-software-system">ANALYZE</a>
    format was originally developed in conjunction with an image
    processing system (of the same name) at the Mayo Foundation.  An
    Anlayze (7.5) format image is comprised of two files, the "hdr"
    and "img" files, that contain information about the acquisition
    and the acquisition itself, respectively.  A more recent adaption
    of this format is known as <a
    href="http://nifti.nimh.nih.gov/nifti-1">NIfTI-1</a> and is a
    product of the Data Format Working Group (DFWG) from the
    Neuroimaging Informatics Technology Initiative (NIfTI).  The
    NIfTI-1 data format is almost identical to the ANALYZE format, but
    offers a few improvements: merging of the header and image
    information into one file (.nii), re-organization of the 348-byte
    fixed header into more relevant categories and the possibility of
    extending the header information.</p>
    <ul>

      <li>The packages <pkg>AnalyzeFMRI</pkg>, <pkg>fmri</pkg>,
      <pkg>tractor.base</pkg> (part of the <gcode>tractor</gcode>
      project), <pkg>oro.nifti</pkg>, and <pkg>neuroim</pkg> all
      provide functions that read/write ANALYZE and NIfTI files.</li>

    </ul>
    <p><strong>Magnetic Resonance Imaging (MRI)</strong></p>
    <p><em>Diffusion Tensor Imaging (DTI)</em></p>
    <ul>

      <li>The R package <pkg>dti</pkg> provides structural adaptive
      smoothing methods for the analysis of diffusion weighted data in
      the context of the DTI model.  Due to its edge preserving
      properties these smoothing methods are capable of reducing noise
      without compromizing significant structures (e.g., fibre
      tracts).  The package also provides functions for DTI data
      processing from input, via tensor reconstruction to
      visualization (2D and 3D).</li>

      <li>The <pkg>tractor.base</pkg> package (part of the <a
      href="http://www.tractor-mri.org.uk/">tractor project</a>)
      consists of functions for reading, writing and visualising MRI
      images.  Images may be stored in ANALYZE, NIfTI or DICOM file
      formats, and can be visualised slice-by-slice or in projection.
      It also provides functions for common image manipulation tasks,
      such as masking and thresholding; and for applying arbitrary
      functions to image data.  The package is written in pure R.</li>

    </ul>
    <ul>

      <li> Diffusion anisotropy has been used to characterize white
      matter neuronal pathways in the human brain, and infer global
      connectivity in the central nervous system.  The
      <pkg>gdimap</pkg> package implements algorithms to estimate and
      visualize the orientation of neuronal pathways using model-free
      methods (q-space imaging methods). The estimation of fibre
      orientation has been implemented using (1) by extracting local
      maxima or (2) directional statistical clustering of the ODF
      voxel data.</li>

    </ul>
    <p><em>Dynamic Contrast-Enhanced MRI (DCE-MRI)</em></p>
    <ul>

      <li>The <pkg>DATforDCEMRI</pkg> package performs voxel-wise
      deconvolution analysis of contrast agent concentration versus
      time data and generates the impulse response function (IRF),
      which may be used to approximate commonly utilized kinetic
      parameters such as Ktrans and Ve.  An interactive advanced
      voxel diagnosis tool (AVDT) is also provided to facilitate
      easy navigation of the voxel-wise data.</li>

      <li>The <pkg>dcemriS4</pkg> package contains a collection of
      functions to perform quantitative analysis from a DCE-MRI (or
      diffusion-weighted MRI) acquisition on a voxel-by-voxel basis
      and depends on the S4 implementation of the NIfTI and ANALYZE
      classes in <pkg>oro.nifti</pkg>.  Data management capabilities
      include: read/write for NIfTI extensions, full audit trail,
      improved visualization, etc. The steps to quantify DCE-MRI are
      as follows: motion correction and/or co-registration, T1
      estimation, conversion of signal intensity to gadolinium
      contrast-agent concentration and kinetic parameter estimation.
      Parametric estimation of the kinetic parameters, from a
      single-compartment (Kety or extended Kety) model, is performed
      via Levenburg-Marquardt optimization or Bayesian estimation.
      Semi-parametric estimation of the kinetic parameters is also
      possible via Bayesian P-splines.</li>

      <li>The <pkg>KATforDCEMRI</pkg> package contains functions for
      fitting compartmental models to voxel-wise contrast agent
      concentration versus time data in order to estimate commonly
      utilized kinetic parameters such as Ktrans and Ve. An
      interactive advanced voxel diagnosis tool (AVDT) is also
      provided to facilitate easy navigation of the voxel-wise data
      and per-voxel fitted model parameters.</li>

    </ul>
    <p><em>Functional Connectivity</em></p>
    <ul>

      <li>The <pkg>brainwaver</pkg> package provides basic wavelet
      analysis of multivariate time series with a visualisation and
      parametrisation using graph theory.  It computes the correlation
      matrix for each scale of a wavelet decomposition, via
      <pkg>waveslim</pkg>.  Hypothesis testing is applied to each
      entry of one matrix in order to construct an adjacency matrix of
      a graph.  The graph obtained is finally analysed using
      small-world theory and, with efficient computation techniques,
      tested using simulated attacks.  The brainwaver project is
      complementary to the <a
      href="http://sourceforge.net/projects/camba/">CamBA</a> project
      for brain image data processing.  A collection of scripts (with
      a makefile) is available to <a
      href="http://www.gipsa-lab.inpg.fr/~sophie.achard/brainwaver">download</a>
      along with the <pkg>brainwaver</pkg> package.</li>

    </ul>
    <p><em>Functional MRI</em></p>
    <ul>
      <li><pkg>AnalyzeFMRI</pkg> is a package originally written for
      the processing and analysis of large structural and functional
      MRI data sets under the ANALYZE format.  It has been updated to
      include new functionality: complete NIfTI input/output,
      cross-platform visualization based on Tcl/Tk components, and
      spatial/temporal ICA (<a href="http://en.wikipedia.org/wiki/Independent_component_analysis">Independent Components Analysis</a>) 
      via a graphical user interface (GUI).</li>
      <li>The package <pkg>arf3DS4</pkg> applied the active region
      fitting (ARF) algorithm for the analysis of functional magnetic
      resonance imaging (fMRI) data.  ARF uses Gaussian shape spatial
      models to parameterize active brain regions.</li>
      <li>The R package <pkg>fmri</pkg> provides tools for the
      analysis of functional MRI data.  The core is the implementation
      of a new class of adaptive smoothing methods.  These methods
      allow for a significant signal enhancement and reduction of
      false positive detections without, in contrast to traditional
      non-adaptive smoothing methods, reducing the effective spatial
      resolution.  This property is especially of interest in the
      analysis of high-resolution functional MRI.  The package
      includes functions for input/output of some standard imaging
      formats (ANALYZE, NIfTI, AFNI, DICOM) as well as for linear
      modelling the data and signal detection using <a href="http://imaging.mrc-cbu.cam.ac.uk/imaging/PrinciplesRandomFields">Random Field Theory</a>.  
      It also includes ICA and NGCA (non-Gaussian Components Analysis)
      based methods and hence has some overlap with
      <pkg>AnalyzeFMRI</pkg>.</li>
      <li>Neuroimage is an R package (currently only available within
      the <rforge>neuroim</rforge> project on R-Forge) that provides
      data structures and input/output routines for functional brain
      imaging data.  It reads and writes NIfTI-1 data and provides S4
      classes for handling multi-dimensional images.</li>
      <li>Compute Unified Device Architecture (CUDA) is a software
      platform for massively parallel high-performance computing on
      NVIDIA GPUs. <pkg>cudaBayesreg</pkg> provides a CUDA
      implementation of a Bayesian multilevel model for the analysis
      of brain fMRI data.  The CUDA programming model uses a separate
      thread for fitting a linear regression model at each voxel in
      parallel.  The global statistical model implements a Gibbs
      Sampler for hierarchical linear models with a normal prior.
      This model has been proposed by Rossi, Allenby and McCulloch in
      <a href="http://dx.doi.org/10.1002/0470863692">Bayesian
      Statistics and Marketing</a>, Chapter 3, and is referred to as
      "rhierLinearModel" in the R package <pkg>bayesm</pkg>.</li>
    </ul>
    <p><em>Structural MRI</em></p>
    <ul>
      <li>The package <pkg>dpmixsim</pkg> implements a Dirichlet
      Process Mixture (DPM) model for clustering and image
      segmentation.  The DPM model is a Bayesian nonparametric
      methodology that relies on MCMC simulations for exploring
      mixture models with an unknown number of components.  The code
      implements conjugate models with normal structure (conjugate
      normal-normal DPM model).  Applications are oriented towards the
      classification of MR images according to tissue type or region
      of interest.</li>
      <li>The package <pkg>mritc</pkg> provides tools for MRI tissue
      classification using normal mixture models and (partial volume,
      higher resolution) hidden Markov normal mixture models fitted by
      various methods.  Functions to obtain initial values and spatial
      parameters are available.  Facilities for visualization and
      evaluation of classification results are provided.  To improve
      the speed, table lookup methods are used in various places,
      vectorization is used to take advantage of conditional
      independence, and some computations are performed by embedded C
      code.</li>
    </ul>
    <p><em>Visualization</em></p>
    <ul>
      <li>The package <pkg>brainR</pkg> includes functions for creating
      three-dimensinoal (3D) and four-dimensional (4D) images using
      WebGL, RGL, and JavaScript commands.  This package relies on the X
      ToolKit (<a href="https://github.com/xtk/X#readme">XTK</a>).</li>
    </ul>
    <p><em>Simulation</em></p>
    <ul>
      <li>The package <pkg>neuRosim</pkg>allows users to generate fMRI
      time series or 4D data. Some high-level functions are created for
      fast data generation with only a few arguments and a diversity of
      functions to define activation and noise. For more advanced users
      it is possible to use the low-level functions and manipulate the
      arguments.</li>
    </ul>
    <p><strong>General Image Processing</strong></p>
    <ul>

      <li><pkg>adimpro</pkg> is a package for 2D digital (color and
      B/W) images, actually not specific to medical imaging, but for
      general image processing.</li>

      <li><bioc>EBImage</bioc>is an R package which provides general
      purpose functionality for the reading, writing, processing and
      analysis of images.  Furthermore, in the context of
      microscopy-based cellular assays, this package offers tools to
      transform the images, segment cells and extract quantitative
      cellular descriptors.</li>

      <li>The package <pkg>mmand</pkg> (Mathematical Morphology in Any
      Number of Dimensions) provides morphological operations like
      erode and dilate, opening and closing, as well as smoothing and
      kernel-based image processing.  It operates on arrays or 
      array-like data of arbitrary dimension.</li>

      <li>The <pkg>RNiftyReg</pkg> provides an interface to the <a
      href="http://sourceforge.net/projects/niftyreg/">NiftyReg</a>
      image registration tools.  Rigid-body, affine and non-linear
      registrations are available and may be applied in 2D-to-2D,
      3D-to-2D and 4D-to-3D procedures.</li>

      <li>The package <pkg>fslr</pkg> contains wrapper functions that
      interface with the <a
      href="http://fsl.fmrib.ox.ac.uk/fsl/fslwiki">FMRIB Sofware
      Library</a> (FSL), a powerful and widely-used neuroimaging
      software library, using system commands.  The goal with this
      package is to interface with FSL completely in R, where you pass
      R-based NIfTI objects and the function executes an FSL command
      and returns an R-based NIfTI object.</li>

    </ul>
    <p><strong>Positron Emission Tomography (PET)</strong></p>
    <ul>
      <li>The <pkg>occ</pkg> package provides a generic function for
      estimating PET neuro-receptor occupancies by a drug, from the
      total volumes of distribution of a set of regions of interest
      (ROI).  Fittings methods include the reference region, the
      <em>ordinary least squares</em> (OLS, sometimes known as
      "occupancy plot") and the <em>restricted maximum likelihood
      estimation</em> (REML).</li>
      <li>The <pkg>PET</pkg> package contains three of the major
      iterative reconstruction techniques (Algebraic Reconstruction
      Technique, Likelihood Reconstruction using Expectation
      Maximization and Least Squares Conjugate Method) and several
      direct reconstruction methods for radon transformed data.
      Furthermore, it offers the possibility to simulate a marked
      Poisson process with spatial varying intensity.</li>
    </ul>    
    <p><strong>Electroencephalography (EEG)</strong></p>
    <ul>
      <li>The EEG package (currently only available within the
      <rforge>eeg</rforge> project on R-Forge) reads in single trial
      EEG (currently only ascii-exported pre-processed and trial
      segmented in Brain Vision Analyzer), computes averages (i.e.,
      event-related potentials or ERP's) and stores ERP's from
      multiple data sets in a <tt>data.frame</tt> like object, such
      that statistical analysis (linear model, (M)ANOVA) can be done
      using the familiar R modeling frame work.</li>
      <li><pkg>PTAk</pkg> is an R package that uses a multiway method
      to decompose a tensor (array) of any order, as a generalisation
      of a singular value decomposition (SVD) also supporting
      non-identity metrics and penalisations.  A 2-way SVD with these
      extensions is also available.  The package also includes
      additional multiway methods: PCAn (Tucker-n) and
      PARAFAC/CANDECOMP with these extensions.  Applications include
      the analysis of EEG and functional MRI data.</li>
    </ul>    
  </info>

  <packagelist>
    <pkg priority="core">adimpro</pkg>
    <pkg priority="core">arf3DS4</pkg>
    <pkg priority="core">AnalyzeFMRI</pkg>
    <pkg>bayesm</pkg>
    <pkg>brainR</pkg>
    <pkg>brainwaver</pkg>
    <pkg>cudaBayesreg</pkg>
    <pkg priority="core">DATforDCEMRI</pkg>
    <pkg priority="core">dcemriS4</pkg>
    <pkg priority="core">dpmixsim</pkg>
    <pkg priority="core">dti</pkg>
    <pkg priority="core">fmri</pkg>
    <pkg>fslr</pkg>
    <pkg priority="core">gdimap</pkg>
    <pkg priority="core">KATforDCEMRI</pkg>
    <pkg priority="core">mmand</pkg>
    <pkg priority="core">mritc</pkg>
    <pkg priority="core">neuroim</pkg>
    <pkg priority="core">neuRosim</pkg>
    <pkg priority="core">occ</pkg>
    <pkg priority="core">oro.dicom</pkg>
    <pkg priority="core">oro.nifti</pkg>
    <pkg>PET</pkg>
    <pkg>PTAk</pkg>
    <pkg priority="core">RNiftyReg</pkg>
    <pkg priority="core">tractor.base</pkg>
    <pkg>waveslim</pkg>
  </packagelist>

  <links>
    <view>ChemPhys</view>
    <bioc>EBImage</bioc>
    <rforge>eeg</rforge>
    <a href="http://www.jstatsoft.org/v44/">Journal of Statistical Software>: Special Volume on Magnetic Resonance Imaging in R</a>
    <a href="http://picsl.upenn.edu/antsr">ANTsR</a> is a framework that incorporates ITK and ANTs-based image processing methods into the R programming language.
    <a href="http://www.simpleitk.org/">SimpleITK</a> is a simplified layer built on top of <a href="http://www.itk.org">ITK</a>, intended to facilitate its use in rapid prototyping, education, interpreted languages. SimpleITK provides support for 2D and 3D images, and a selected set of pixel types for them. Different image filters may support a different collection of pixel types, in many cases due to computational requirements. The library is wrapped for interpreted languages by using SWIG. In particular, the following wrappings are available: Python, Java, Tcl, Lua, R and Ruby.
  </links>
</CRANTaskView>
