Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

itkNeighborhoodSampler.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkNeighborhoodSampler.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:47 $ 00007 Version: $Revision: 1.6 $ 00008 00009 Copyright (c) Insight Software Consortium. All rights reserved. 00010 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details. 00011 00012 This software is distributed WITHOUT ANY WARRANTY; without even 00013 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 00014 PURPOSE. See the above copyright notices for more information. 00015 00016 =========================================================================*/ 00017 #ifndef __itkNeighborhoodSampler_h 00018 #define __itkNeighborhoodSampler_h 00019 00020 #include "itkMacro.h" 00021 #include "itkObject.h" 00022 #include "itkSample.h" 00023 #include "itkSubsample.h" 00024 #include "itkFixedArray.h" 00025 #include "itkSampleAlgorithmBase.h" 00026 00027 namespace itk{ 00028 namespace Statistics{ 00029 00040 template < class TSample > 00041 class ITK_EXPORT NeighborhoodSampler : public SampleAlgorithmBase< TSample > 00042 { 00043 public: 00045 typedef NeighborhoodSampler Self ; 00046 typedef SampleAlgorithmBase< TSample > Superclass ; 00047 typedef SmartPointer< Self > Pointer ; 00048 typedef SmartPointer< const Self > ConstPointer ; 00049 00051 itkTypeMacro(NeighborhoodSampler, SampleAlgorithmBase); 00052 00054 itkNewMacro(Self) ; 00055 00057 typedef TSample SampleType ; 00058 00060 itkStaticConstMacro(MeasurementVectorSize, unsigned int, 00061 TSample::MeasurementVectorSize) ; 00062 typedef typename TSample::MeasurementVectorType MeasurementVectorType ; 00063 typedef typename TSample::MeasurementType MeasurementType ; 00064 typedef typename TSample::FrequencyType FrequencyType ; 00065 typedef typename TSample::InstanceIdentifier InstanceIdentifier ; 00066 00068 typedef typename Superclass::InputSampleType InputSampleType ; 00069 00071 typedef Subsample< TSample > SubsampleType ; 00072 00074 typedef double RadiusType ; 00075 00077 typedef FixedArray< double, itkGetStaticConstMacro(MeasurementVectorSize) > CenterType ; 00078 00080 void SetCenter(CenterType* center) 00081 { 00082 if ( m_Center != center ) 00083 { 00084 m_Center = center ; 00085 this->Modified() ; 00086 } 00087 } 00088 00090 CenterType* GetCenter() 00091 { return m_Center ; } 00092 00094 void SetRadius(RadiusType* radius) 00095 { 00096 if ( m_Radius != radius ) 00097 { 00098 m_Radius = radius ; 00099 this->Modified() ; 00100 } 00101 } 00102 00104 RadiusType* GetRadius() 00105 { return m_Radius ; } 00106 00108 typedef SubsampleType OutputType ; 00109 00111 typedef typename SubsampleType::Pointer OutputPointer ; 00112 00114 OutputPointer GetOutput() ; 00115 00116 protected: 00117 NeighborhoodSampler() ; 00118 virtual ~NeighborhoodSampler() {} 00119 virtual void PrintSelf(std::ostream& os, Indent indent) const ; 00120 00121 void GenerateData() ; 00122 00123 private: 00124 NeighborhoodSampler(const Self&) ; //purposely not implemented 00125 void operator=(const Self&) ; //purposely not implemented 00126 00127 CenterType* m_Center ; 00128 RadiusType* m_Radius ; 00129 typename SubsampleType::Pointer m_Subsample ; 00130 } ; // end of class 00131 00132 } // end of namespace Statistics 00133 } // end of namespace itk 00134 00135 #ifndef ITK_MANUAL_INSTANTIATION 00136 #include "itkNeighborhoodSampler.txx" 00137 #endif 00138 00139 #endif

Generated at Sat Mar 31 02:26:18 2007 for ITK by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2000