itkBloxBoundaryPointToCoreAtomImageFilter.h
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 __itkBloxBoundaryPointToCoreAtomImageFilter_h
00018 #define __itkBloxBoundaryPointToCoreAtomImageFilter_h
00019
00020 #include "itkImageToImageFilter.h"
00021 #include "itkPoint.h"
00022 #include "itkVector.h"
00023 #include "itkCovariantVector.h"
00024 #include "itkBloxBoundaryPointItem.h"
00025 #include "itkBloxBoundaryPointPixel.h"
00026 #include "itkBloxBoundaryPointImage.h"
00027 #include "itkBloxCoreAtomItem.h"
00028 #include "itkBloxCoreAtomPixel.h"
00029 #include "itkBloxCoreAtomImage.h"
00030
00031 namespace itk
00032 {
00033
00042 template<unsigned int dim>
00043 class ITK_EXPORT BloxBoundaryPointToCoreAtomImageFilter :
00044 public ImageToImageFilter< BloxBoundaryPointImage<dim>,
00045 BloxCoreAtomImage<dim> >
00046 {
00047 public:
00049 typedef BloxBoundaryPointToCoreAtomImageFilter Self;
00050 typedef ImageToImageFilter<BloxBoundaryPointImage<dim>,
00051 BloxCoreAtomImage<dim> > Superclass;
00052 typedef SmartPointer<Self> Pointer;
00053 typedef SmartPointer<const Self> ConstPointer;
00054
00056 itkNewMacro(Self);
00057
00059 itkTypeMacro( BloxBoundaryPointToCoreAtomImageFilter, ImageToImageFilter );
00060
00062 itkStaticConstMacro(NDimensions, unsigned int, dim);
00063
00065 typedef BloxBoundaryPointImage<dim> TInputImage;
00066 typedef BloxBoundaryPointImage<dim> InputImageType;
00067 typedef BloxCoreAtomImage<dim> TOutputImage;
00068 typedef BloxCoreAtomImage<dim> OutputImageType;
00069 typedef typename OutputImageType::Pointer OutputImagePointer;
00070 typedef typename InputImageType::Pointer InputImagePointer;
00071 typedef typename InputImageType::ConstPointer InputImageConstPointer;
00072
00074 typedef Size<dim> SizeType;
00075
00077 typedef typename TOutputImage::IndexType IndexType;
00078
00080 typedef typename TOutputImage::PixelType PixelType;
00081
00083 typedef typename TOutputImage::RegionType OutputImageRegionType;
00084
00086 typedef Point<double, dim> PositionType;
00087
00089 typedef typename PositionType::VectorType VectorType;
00090
00092 typedef CovariantVector<double, dim> GradientType;
00093
00095 void FindCoreAtoms();
00096
00098 void FindCoreAtomsAtBoundaryPoint(BloxBoundaryPointItem<dim>* pItem);
00099
00101 itkSetMacro(DistanceMin, double);
00102 itkSetMacro(DistanceMax, double);
00103 itkSetMacro(Epsilon, double);
00104 itkSetMacro(Polarity, bool);
00106
00108 void GenerateInputRequestedRegion();
00109
00110 protected:
00111 BloxBoundaryPointToCoreAtomImageFilter();
00112 virtual ~BloxBoundaryPointToCoreAtomImageFilter() {};
00113 void PrintSelf(std::ostream& os, Indent indent) const;
00114
00116 void GenerateData();
00117
00118 private:
00119 BloxBoundaryPointToCoreAtomImageFilter(const Self&);
00120 void operator=(const Self&);
00121
00123 InputImageConstPointer m_InputPtr;
00124 OutputImagePointer m_OutputPtr;
00125
00129 double m_DistanceMin;
00130 double m_DistanceMax;
00131 double m_Epsilon;
00132 bool m_Polarity;
00133
00135 float m_InverseNumberOfBoundaryPoints;
00136 unsigned long m_CurrentBoundaryPoint;
00137 unsigned long m_BoundaryPointsPerUpdate;
00138 unsigned long m_BoundaryPointsBeforeUpdate;
00139 };
00140
00141 }
00142
00143 #ifndef ITK_MANUAL_INSTANTIATION
00144 #include "itkBloxBoundaryPointToCoreAtomImageFilter.txx"
00145 #endif
00146
00147 #endif
00148