Class ShotNoiseImageFilter


public class ShotNoiseImageFilter extends ImageFilter
Alter an image with shot noise. The shot noise follows a Poisson distribution: $ I = N(I_0) $ where $ N(I_0) $ is a Poisson-distributed random variable of mean $ I_0 $ . The noise is thus dependent on the pixel intensities in the image. The intensities in the image can be scaled by a user provided value to map pixel values to the actual number of particles. The scaling can be seen as the inverse of the gain used during the acquisition. The noisy signal is then scaled back to its input intensity range: $ I = \\frac{N(I_0 \\times s)}{s} $ where $ s $ is the scale factor. The Poisson-distributed variable $ \\lambda $ is computed by using the algorithm: $ \\begin{array}{l} k \\leftarrow 0 \\\\ p \\leftarrow 1 \\\\ \\textbf{repeat} \\\\ \\left\\{ \\begin{array}{l} k \\leftarrow k+1 \\\\ p \\leftarrow p \\ast U() \\end{array} \\right. \\\\ \\textbf{until } p > e^{\\lambda} \\\\ \\textbf{return} (k) \\end{array} $ where $ U() $ provides a uniformly distributed random variable in the interval $ [0,1] $ . This algorithm is very inefficient for large values of $ \\lambda $ , though. Fortunately, the Poisson distribution can be accurately approximated by a Gaussian distribution of mean and variance $ \\lambda $ when $ \\lambda $ is large enough. In this implementation, this value is considered to be 50. This leads to the faster algorithm: $ \\lambda + \\sqrt{\\lambda} \\times N()$ where $ N() $ is a normally distributed random variable of mean 0 and variance 1. Gaetan Lehmann This code was contributed in the Insight Journal paper "Noise Simulation". https://www.insight-journal.org/browse/publication/721 See: itk::simple::ShotNoise for the procedural interface itk::ShotNoiseImageFilter for the Doxygen on the original ITK class. C++ includes: sitkShotNoiseImageFilter.h
  • Constructor Details

    • ShotNoiseImageFilter

      protected ShotNoiseImageFilter(long cPtr, boolean cMemoryOwn)
    • ShotNoiseImageFilter

      public ShotNoiseImageFilter()
      itk::simple::ShotNoiseImageFilter::ShotNoiseImageFilter() Default Constructor that takes no arguments and initializes default parameters
  • Method Details

    • getCPtr

      protected static long getCPtr(ShotNoiseImageFilter obj)
    • swigRelease

      protected static long swigRelease(ShotNoiseImageFilter obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class ImageFilter
    • delete

      public void delete()
      virtual itk::simple::ShotNoiseImageFilter::~ShotNoiseImageFilter() Destructor
      Overrides:
      delete in class ImageFilter
    • setScale

      public void setScale(double Scale)
      Self& itk::simple::ShotNoiseImageFilter::SetScale(double Scale) Set/Get the value to map the pixel value to the actual particle counting. The scaling can be seen as the inverse of the gain used during the acquisition. The noisy signal is then scaled back to its input intensity range. Defaults to 1.0.
    • getScale

      public double getScale()
      double itk::simple::ShotNoiseImageFilter::GetScale() const Set/Get the value to map the pixel value to the actual particle counting. The scaling can be seen as the inverse of the gain used during the acquisition. The noisy signal is then scaled back to its input intensity range. Defaults to 1.0.
    • setSeed

      public void setSeed(long Seed)
      Self& itk::simple::ShotNoiseImageFilter::SetSeed(uint32_t Seed)
    • getSeed

      public long getSeed()
      uint32_t itk::simple::ShotNoiseImageFilter::GetSeed() const
    • getName

      public String getName()
      std::string itk::simple::ShotNoiseImageFilter::GetName() const Name of this class
      Overrides:
      getName in class ProcessObject
    • toString

      public String toString()
      std::string itk::simple::ShotNoiseImageFilter::ToString() const Print ourselves out
      Overrides:
      toString in class ProcessObject
    • execute

      public Image execute(Image image1)
      Image itk::simple::ShotNoiseImageFilter::Execute(Image &&image1) Execute the filter on the input image