Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __itkBloxBoundaryPointImageToBloxBoundaryProfileImageFilter_h
00018 #define __itkBloxBoundaryPointImageToBloxBoundaryProfileImageFilter_h
00019
00020 #include "itkBloxBoundaryPointImage.h"
00021 #include "itkBloxBoundaryProfileImage.h"
00022 #include "itkImageToImageFilter.h"
00023 #include "itkSize.h"
00024
00025 namespace itk
00026 {
00027
00054 template< typename TSourceImage >
00055 class ITK_EXPORT BloxBoundaryPointImageToBloxBoundaryProfileImageFilter :
00056 public ImageToImageFilter<TSourceImage,BloxBoundaryProfileImage< ::itk::GetImageDimension<TSourceImage>::ImageDimension> >
00057 {
00058 public:
00060 itkStaticConstMacro(NDimensions, unsigned int, TSourceImage::ImageDimension);
00061
00063 typedef BloxBoundaryPointImageToBloxBoundaryProfileImageFilter Self;
00064 typedef ImageToImageFilter<TSourceImage,BloxBoundaryProfileImage<itkGetStaticConstMacro(NDimensions)> > Superclass;
00065 typedef SmartPointer<Self> Pointer;
00066 typedef SmartPointer<const Self> ConstPointer;
00067
00069 itkNewMacro(Self);
00070
00072 itkTypeMacro(BloxBoundaryPointImageToBloxBoundaryProfileImageFilter, ImageToImageFilter);
00073
00075 typedef BloxBoundaryPointImage<itkGetStaticConstMacro(NDimensions)>
00076 BoundaryPointImageType;
00077 typedef typename BoundaryPointImageType::Pointer BoundaryPointImagePointer;
00078 typedef typename BoundaryPointImageType::RegionType BoundaryPointImageRegionType;
00079 typedef typename BoundaryPointImageType::PixelType BoundaryPointImagePixelType;
00080 typedef typename BoundaryPointImageType::ConstPointer BoundaryPointImageConstPointer;
00081
00083 typedef TSourceImage SourceImageType;
00084 typedef typename SourceImageType::Pointer SourceImagePointer;
00085 typedef typename SourceImageType::RegionType SourceImageRegionType;
00086 typedef typename SourceImageType::PixelType SourceImagePixelType;
00087 typedef typename SourceImageType::ConstPointer SourceImageConstPointer;
00088
00090 typedef BloxBoundaryProfileImage<itkGetStaticConstMacro(NDimensions)>
00091 OutputImageType;
00092 typedef typename OutputImageType::Pointer OutputImagePointer;
00093 typedef typename OutputImageType::RegionType OutputImageRegionType;
00094 typedef typename OutputImageType::PixelType OutputImagePixelType;
00095
00097 typedef typename BloxBoundaryProfileImage<itkGetStaticConstMacro(NDimensions)>::IndexType IndexType;
00098
00100 typedef typename BloxBoundaryProfileImage<itkGetStaticConstMacro(NDimensions)>::PixelType PixelType;
00101
00103 typedef Point<double, itkGetStaticConstMacro(NDimensions)> PositionType;
00104
00106 typedef typename PositionType::VectorType VectorType;
00107
00109 void SetInput1( const SourceImageType * image1 );
00110
00112 void SetInput2( const BoundaryPointImageType * image2 );
00113
00115 double FindAccumulatorMaximum();
00116
00118 double FindAccumulatorMinimum();
00119
00121 void FindBoundaryProfiles();
00122
00124 bool AddSplatToAccumulatorAndNormalizer(int binNumber, double weight, double sourcePixelValue);
00125
00127 void NormalizeSplatAccumulator();
00128
00130 int FitProfile();
00131
00133 void Initialize(double setUniqueAxis, double setSymmetricAxes, unsigned int numberOfBins,
00134 unsigned int splatMethod, unsigned int spaceDimension);
00135
00136 #ifdef ITK_USE_CONCEPT_CHECKING
00137
00138 itkConceptMacro(SourceConvertibleToDoubleCheck,
00139 (Concept::Convertible<typename TSourceImage::PixelType, double>));
00140
00142 #endif
00143
00144 protected:
00145 BloxBoundaryPointImageToBloxBoundaryProfileImageFilter();
00146 ~BloxBoundaryPointImageToBloxBoundaryProfileImageFilter();
00147
00148 void PrintSelf(std::ostream& os, Indent indent) const;
00149
00151 void GenerateData();
00152
00153 private:
00154 BloxBoundaryPointImageToBloxBoundaryProfileImageFilter(const Self&);
00155 void operator=(const Self&);
00156
00158 double m_UniqueAxis;
00159
00161 double m_SymmetricAxes;
00162
00164 unsigned int m_NumberOfBins;
00165
00167 unsigned int m_SplatMethod;
00168
00170 unsigned long int m_NumBoundaryProfiles;
00171
00173 double * m_Accumulator;
00174
00176 double * m_Normalizer;
00177
00179 double * m_NormalizedAccumulator;
00180
00182 double * m_FinalParameters;
00183
00185 unsigned int m_SpaceDimension;
00186 };
00187
00188 }
00189
00190 #ifndef ITK_MANUAL_INSTANTIATION
00191 #include "itkBloxBoundaryPointImageToBloxBoundaryProfileImageFilter.txx"
00192 #endif
00193
00194 #endif
00195