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

itkJointDomainImageToListAdaptor.h

Go to the documentation of this file.
00001 /*========================================================================= 00002 00003 Program: Insight Segmentation & Registration Toolkit 00004 Module: $RCSfile: itkJointDomainImageToListAdaptor.h,v $ 00005 Language: C++ 00006 Date: $Date: 2003/09/10 14:29:46 $ 00007 Version: $Revision: 1.7 $ 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 __itkJointDomainImageToListAdaptor_h 00018 #define __itkJointDomainImageToListAdaptor_h 00019 00020 #include "itkMacro.h" 00021 #include "itkFixedArray.h" 00022 #include "itkPoint.h" 00023 #include "itkPixelTraits.h" 00024 #include "itkImageToListAdaptor.h" 00025 #include "itkImageRegionIteratorWithIndex.h" 00026 #include "itkEuclideanDistance.h" 00027 #include "itkListSample.h" 00028 00029 namespace itk{ 00030 namespace Statistics{ 00031 00039 template< class TImage > 00040 struct ImageJointDomainTraits 00041 { 00042 typedef ImageJointDomainTraits Self ; 00043 typedef PixelTraits< typename TImage::PixelType > PixelTraitsType ; 00044 typedef typename PixelTraitsType::ValueType RangeDomainMeasurementType ; 00045 typedef typename TImage::IndexType::IndexValueType IndexValueType ; 00046 itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension) ; 00047 itkStaticConstMacro(Dimension, 00048 unsigned int, 00049 TImage::ImageDimension + 00050 PixelTraitsType::Dimension ) ; 00051 typedef float CoordinateRepType ; 00052 typedef Point< CoordinateRepType, itkGetStaticConstMacro(ImageDimension) > PointType ; 00053 typedef JoinTraits< RangeDomainMeasurementType, CoordinateRepType > 00054 JoinTraitsType ; 00055 typedef typename JoinTraitsType::ValueType MeasurementType ; 00056 typedef FixedArray< MeasurementType, itkGetStaticConstMacro(Dimension) > 00057 MeasurementVectorType ; 00058 } ; // end of ImageJointDomainTraits 00059 00089 template < class TImage > 00090 class ITK_EXPORT JointDomainImageToListAdaptor 00091 : public ImageToListAdaptor< 00092 TImage, 00093 typename ImageJointDomainTraits< TImage >::MeasurementVectorType > 00094 { 00095 public: 00096 typedef ImageJointDomainTraits< TImage > ImageJointDomainTraitsType ; 00097 typedef typename ImageJointDomainTraitsType::MeasurementVectorType 00098 MeasurementVectorType ; 00099 typedef typename ImageJointDomainTraitsType::MeasurementType 00100 MeasurementType ; 00101 typedef typename ImageJointDomainTraitsType::RangeDomainMeasurementType 00102 RangeDomainMeasurementType ; 00103 typedef typename ImageJointDomainTraitsType::PointType PointType ; 00104 typedef typename ImageJointDomainTraitsType::CoordinateRepType 00105 CoordinateRepType ; 00107 typedef JointDomainImageToListAdaptor Self; 00108 typedef ImageToListAdaptor< TImage, MeasurementVectorType > 00109 Superclass; 00110 typedef SmartPointer< Self > Pointer; 00111 00113 itkTypeMacro(JointDomainImageToListAdaptor, ImageToListAdaptor) ; 00114 00116 itkNewMacro(Self) ; 00117 00119 itkStaticConstMacro(MeasurementVectorSize, 00120 unsigned int, 00121 ImageJointDomainTraitsType::Dimension) ; 00122 00125 typedef typename Superclass::FrequencyType FrequencyType ; 00126 typedef typename Superclass::InstanceIdentifier InstanceIdentifier ; 00127 00128 typedef typename TImage::IndexType ImageIndexType ; 00129 typedef typename TImage::IndexType::IndexValueType ImageIndexValueType ; 00130 typedef typename TImage::SizeType ImageSizeType ; 00131 typedef typename TImage::RegionType ImageRegionType ; 00132 typedef ImageRegionIteratorWithIndex< TImage > ImageIteratorType ; 00133 00134 typedef MeasurementVectorType ValueType ; 00135 00136 itkStaticConstMacro(RangeDomainDimension, 00137 unsigned int, 00138 itk::PixelTraits< 00139 typename TImage::PixelType >::Dimension) ; 00140 00141 typedef FixedArray< RangeDomainMeasurementType, 00142 itkGetStaticConstMacro( RangeDomainDimension ) > 00143 RangeDomainMeasurementVectorType ; 00144 00145 typedef std::vector< InstanceIdentifier > InstanceIdentifierVectorType ; 00146 00147 typedef FixedArray< float, itkGetStaticConstMacro(MeasurementVectorSize) > 00148 NormalizationFactorsType ; 00149 00151 void SetNormalizationFactors(NormalizationFactorsType& factors) ; 00152 00155 inline MeasurementVectorType GetMeasurementVector(const InstanceIdentifier &id) ; 00156 00159 inline void ComputeRegion(const MeasurementVectorType& mv, 00160 const double radius, 00161 ImageRegionType& region) ; 00162 00166 inline void Search(const MeasurementVectorType& mv, 00167 const double radius, 00168 InstanceIdentifierVectorType& result) ; 00169 00170 protected: 00171 JointDomainImageToListAdaptor() ; 00172 virtual ~JointDomainImageToListAdaptor() {} 00173 void PrintSelf(std::ostream& os, Indent indent) const; 00174 00175 private: 00176 JointDomainImageToListAdaptor(const Self&) ; //purposely not implemented 00177 void operator=(const Self&) ; //purposely not implemented 00178 00179 NormalizationFactorsType m_NormalizationFactors ; 00180 00181 MeasurementVectorType m_TempVector ; 00182 PointType m_TempPoint ; 00183 ImageIndexType m_TempIndex ; 00184 RangeDomainMeasurementVectorType m_TempRangeVector ; 00185 } ; // end of class JointDomainImageToListAdaptor 00186 00187 } // end of namespace Statistics 00188 } // end of namespace itk 00189 00190 #ifndef ITK_MANUAL_INSTANTIATION 00191 #include "itkJointDomainImageToListAdaptor.txx" 00192 #endif 00193 00194 #endif

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