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

📄 statisticalclusteringvalidationappbase.h

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

  Program:   Insight Segmentation & Registration Toolkit
  Module:    $RCSfile: StatisticalClusteringValidationAppBase.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 __StatisticalClusteringValidationAppBase_h
#define __StatisticalClusteringValidationAppBase_h

#include "OptionList.h"
#include "ValidationSampleGenerator.h"
#include "ParameterTable.h"

#include "itkEuclideanDistance.h"
#include "ClusteringOutputEvaluator.h"
#include "KdTreeBasedKmeansClusteringMethod.h"

#define IMAGE_DIMENSION 3

template< class TPixel, unsigned int VMeasurementVectorSize >
class StatisticalClusteringValidationAppBase
{
public:
  StatisticalClusteringValidationAppBase() ;
  ~StatisticalClusteringValidationAppBase() ;

  typedef itk::Image< short, IMAGE_DIMENSION > ImageType ;
  typedef itk::Image< unsigned char , IMAGE_DIMENSION > MaskImageType ;
  typedef itk::FixedArray< short, VMeasurementVectorSize > VectorPixelType ;
  typedef itk::Image< VectorPixelType, IMAGE_DIMENSION > VectorImageType ;

  typedef ValidationSampleGenerator< ImageType, MaskImageType, 
                                     VectorImageType > SampleGeneratorType ;
  
  typedef itk::Array< double > ParametersType ;
  typedef itk::Vector< double, VMeasurementVectorSize > VectorType ;
  typedef itk::Statistics::EuclideanDistance< VectorType > DistanceMetricType ;
  
  void SetCommandLineOptions(int argc, char* argv[]) ;
  void SetSelectedClasses(const std::vector< unsigned int >& classLabels) ;

  void Run() ;

protected:
  virtual void GenerateSample() = 0 ; 
  virtual void PrepareInputParameterFilter() = 0 ; 
  virtual void PrepareOutputParameterTableHeader() = 0 ; 
  virtual void StartClustering(ParametersType& params) = 0 ;
  virtual void MapClusterToClass() = 0 ;
  virtual void PutResult(unsigned int caseNo) = 0 ;

  SampleGeneratorType m_SampleGenerator ;
  ParametersType m_InitialProportions ;

  ParameterTable::HeaderType m_InputFilter ;
  ParameterTable::HeaderType m_OutputHeader ;
  ParameterTable m_InputParameterTable ;
  ParameterTable m_OutputParameterTable ;

  unsigned int m_NumberOfCases ;
  unsigned int m_NumberOfClasses ;
  std::vector< unsigned int > m_ClassLabels ;
  
  std::vector< std::string > m_ImageFileNames ;
  std::string m_MaskFileName ;
  int m_MaskImageSliceOffset ;
  std::string m_ParameterFileName ;
  std::string m_ResultFileName ;
  int m_KdTreeBucketSize ;
  int m_MaximumIteration ;
  bool m_NormalizedSample ;
  std::vector< unsigned int > m_SelectedClasses ;

  ParametersType m_EstimatedParameters ;
  itk::hash_map< unsigned long, unsigned int >* m_ClusterLabels ;
  std::vector< unsigned int > m_ClusterMap ;
  DistanceMetricType::Pointer m_DistanceMetric ;
  ClusteringOutputEvaluator m_Evaluator ;
} ; // end of class

#ifndef ITK_MANUAL_INSTANTIATION
#include "StatisticalClusteringValidationAppBase.txx"
#endif

#endif

⌨️ 快捷键说明

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