⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 clusteringoutputevaluator.h

📁 DTMK软件开发包,此为开源软件,是一款很好的医学图像开发资源.
💻 H
字号:
/*=========================================================================

  Program:   Insight Segmentation & Registration Toolkit
  Module:    $RCSfile: ClusteringOutputEvaluator.h,v $
  Language:  C++
  Date:      $Date: 2003-09-10 14:30:12 $
  Version:   $Revision: 1.2 $

  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.

=========================================================================*/
#ifndef __ClusteringOutputEvaluator_h
#define __ClusteringOutputEvaluator_h

#include "itk_hash_map.h"
#include <vector>
#include <map>
class ClusteringOutputEvaluator 
{
public:
  ClusteringOutputEvaluator() ;
  ~ClusteringOutputEvaluator() ;

  typedef std::vector< unsigned int > TrueClassLabelsType ;
  typedef std::vector< unsigned int > ClassLabelsType ;
  typedef itk::hash_map< unsigned long, unsigned int > EstimatedClassLabelsType ;

  void SetTruth(EstimatedClassLabelsType* classLabels) ;

  void SetClusteringResult(EstimatedClassLabelsType* classLabels) ;
  
  void SetUniqueClassLabels(const ClassLabelsType& classLabels) ;

  void SetClusterMap(ClassLabelsType classLabels)
  { m_ClusterMap = classLabels ; }

  const std::vector< int >& GetComposition(const unsigned int classLabels) const 
  { return m_ClassificationMatrix[this->GetClassIndex(classLabels)] ; }

  void GenerateData() ;

protected:
  unsigned int GetClassIndex(const unsigned int classLabel) const ;

  unsigned int GetMappedClassIndex(const unsigned int clusterLabel) const ;

private:
  EstimatedClassLabelsType* m_Truth ;
  EstimatedClassLabelsType* m_Estimates ;
  unsigned int m_NumberOfClasses ;
  std::vector< unsigned int > m_ClassLabels ;
  ClassLabelsType m_ClusterMap ;
  std::vector< std::vector< int > > m_ClassificationMatrix ;
} ; // end of class

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -