Class SimilarityIndexImageFilter


public class SimilarityIndexImageFilter extends ImageFilter
Measures the similarity between the set of non-zero pixels of two images. SimilarityIndexImageFilter measures the similarity between the set non-zero pixels of two images using the following formula: \\[ S = \\frac{2 | A \\cap B |}{|A| + |B|} \\] where $A$ and $B$ are respectively the set of non-zero pixels in the first and second input images. Operator $|\\cdot|$ represents the size of a set and $\\cap$ represents the intersection of two sets. The measure is derived from a reliability measure known as the kappa statistic. $S$ is sensitive to both differences in size and in location and have been in the literature for comparing two segmentation masks. For more information see: "Morphometric Analysis of White Matter Lesions in MR Images: Method and Validation", A. P. Zijdenbos, B. M. Dawant, R. A. Margolin and A. C. Palmer, IEEE Trans. on Medical Imaging, 13(4) pp 716-724,1994 This filter requires the largest possible region of the first image and the same corresponding region in the second image. It behaves as filter with two input and one output. Thus it can be inserted in a pipeline with other filters. The filter passes the first input through unmodified. This filter is templated over the two input image type. It assume both image have the same number of dimensions. See: itk::SimilarityIndexImageFilter for the Doxygen on the original ITK class. C++ includes: sitkSimilarityIndexImageFilter.h
  • Constructor Details

    • SimilarityIndexImageFilter

      protected SimilarityIndexImageFilter(long cPtr, boolean cMemoryOwn)
    • SimilarityIndexImageFilter

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

    • getCPtr

      protected static long getCPtr(SimilarityIndexImageFilter obj)
    • swigRelease

      protected static long swigRelease(SimilarityIndexImageFilter obj)
    • finalize

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

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

      public double getSimilarityIndex()
      double itk::simple::SimilarityIndexImageFilter::GetSimilarityIndex() const Return the computed similarity index. This is a measurement. Its value is updated in the Execute methods, so the value will only be valid after an execution.
    • getName

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

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

      public void execute(Image image1, Image image2)
      void itk::simple::SimilarityIndexImageFilter::Execute(const Image &image1, const Image &image2) Execute the filter on the input images