<commit_before>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkMaskedRankHistogram.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) Insight Software Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

    This software is distributed WITHOUT ANY WARRANTY; without even 
    the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
    PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

// histogram from the moving histogram operations
#ifndef __itkMaskedRankHistogram_h
#define __itkMaskedRankHistogram_h
#include "itkNumericTraits.h"

namespace itk {

// a simple histogram class hierarchy. One subclass will be maps, the
// other vectors.
// This version is intended for keeping track of arbitary ranks. It is
// based on the code from consolidatedMorphology.
//
// Support for different TCompare hasn't been tested, and shouldn't be
// necessary for the rank filters.
//
// This is a modified version for use with masks. Need to allow for
// the situation in which the map is empty
template <class TInputPixel>
class MaskedRankHistogram
{
public:
  MaskedRankHistogram() 
    {
    m_Rank = 0.5;
    }
  virtual ~MaskedRankHistogram(){}

  virtual MaskedRankHistogram *Clone(){return 0;}
  
  virtual void Reset(){}
    
  virtual void AddPixel(const TInputPixel &p){}

  virtual void RemovePixel(const TInputPixel &p){}
 
  // For the map based version - to be called after there is some data
  // included. Meant to be an optimization so that the rank value
  // iterator is properly set.
  // virtual void Initialize(){};

  virtual bool IsValid()
    {
    return false;
    }

  virtual TInputPixel GetValue( const TInputPixel & )
    {
    return NumericTraits<TInputPixel>::Zero;
    }

  void SetRank(float rank)
    {
    m_Rank = rank;
    }

  void AddBoundary(){}

  void RemoveBoundary(){}<commit_msg>COMP: Fix warning: Parameter 'p' is never used.<commit_after>/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    itkMaskedRankHistogram.h
  Language:  C++
  Date:      $Date$
  Version:   $Revision$

  Copyright (c) Insight Software Consortium. All rights reserved.
  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.

    This software is distributed WITHOUT ANY WARRANTY; without even 
    the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
    PURPOSE.  See the above copyright notices for more information.

=========================================================================*/

// histogram from the moving histogram operations
#ifndef __itkMaskedRankHistogram_h
#define __itkMaskedRankHistogram_h
#include "itkNumericTraits.h"

namespace itk {

// a simple histogram class hierarchy. One subclass will be maps, the
// other vectors.
// This version is intended for keeping track of arbitary ranks. It is
// based on the code from consolidatedMorphology.
//
// Support for different TCompare hasn't been tested, and shouldn't be
// necessary for the rank filters.
//
// This is a modified version for use with masks. Need to allow for
// the situation in which the map is empty
template <class TInputPixel>
class MaskedRankHistogram
{
public:
  MaskedRankHistogram() 
    {
    m_Rank = 0.5;
    }
  virtual ~MaskedRankHistogram(){}

  virtual MaskedRankHistogram *Clone(){return 0;}
  
  virtual void Reset(){}
    
  virtual void AddPixel(const TInputPixel & itkNotUsed(p)){}

  virtual void RemovePixel(const TInputPixel & itkNotUsed(p)){}
 
  // For the map based version - to be called after there is some data
  // included. Meant to be an optimization so that the rank value
  // iterator is properly set.
  // virtual void Initialize(){};

  virtual bool IsValid()
    {
    return false;
    }

  virtual TInputPixel GetValue( const TInputPixel & )
    {
    return NumericTraits<TInputPixel>::Zero;
    }

  void SetRank(float rank)
    {
    m_Rank = rank;
    }

  void AddBoundary(){}

  void RemoveBoundary(){}
{'fraction_non_alphanumeric': 0.1434904339710686, 'fraction_numerical': 0.0013999066728884741, 'mean_word_length': 3.7058177826564216, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3381115', 'n_tokens_mistral': 1206, 'n_tokens_neox': 1132, 'n_words': 440}