ITK  4.1.0
Insight Segmentation and Registration Toolkit
itkBinaryBallStructuringElement.h
Go to the documentation of this file.
00001 /*=========================================================================
00002  *
00003  *  Copyright Insight Software Consortium
00004  *
00005  *  Licensed under the Apache License, Version 2.0 (the "License");
00006  *  you may not use this file except in compliance with the License.
00007  *  You may obtain a copy of the License at
00008  *
00009  *         http://www.apache.org/licenses/LICENSE-2.0.txt
00010  *
00011  *  Unless required by applicable law or agreed to in writing, software
00012  *  distributed under the License is distributed on an "AS IS" BASIS,
00013  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00014  *  See the License for the specific language governing permissions and
00015  *  limitations under the License.
00016  *
00017  *=========================================================================*/
00018 #ifndef __itkBinaryBallStructuringElement_h
00019 #define __itkBinaryBallStructuringElement_h
00020 
00021 #include "itkNeighborhood.h"
00022 
00023 namespace itk
00024 {
00057 template< class TPixel, unsigned int VDimension = 2,
00058           class TAllocator = NeighborhoodAllocator< TPixel > >
00059 class ITK_EXPORT BinaryBallStructuringElement:
00060   public Neighborhood< TPixel, VDimension, TAllocator >
00061 {
00062 public:
00064   typedef BinaryBallStructuringElement                   Self;
00065   typedef Neighborhood< TPixel, VDimension, TAllocator > Superclass;
00066 
00068   typedef TAllocator AllocatorType;
00069 
00071   itkStaticConstMacro(NeighborhoodDimension, unsigned int, VDimension);
00072 
00074   typedef TPixel PixelType;
00075 
00079   typedef typename AllocatorType::iterator       Iterator;
00080   typedef typename AllocatorType::const_iterator ConstIterator;
00081 
00083   typedef typename Superclass::SizeType      SizeType;
00084   typedef typename Superclass::SizeValueType SizeValueType;
00085 
00087   typedef typename Superclass::RadiusType RadiusType;
00088 
00090   typedef SliceIterator< TPixel, Self > SliceIteratorType;
00091 
00093   BinaryBallStructuringElement() {}
00094 
00096   virtual ~BinaryBallStructuringElement() {}
00097 
00099   BinaryBallStructuringElement(const Self & other):
00100     Neighborhood< TPixel, VDimension, TAllocator >(other)
00101   {}
00102 
00104   Self & operator=(const Self & other)
00105   {
00106     Superclass::operator=(other);
00107     return *this;
00108   }
00110 
00112   void CreateStructuringElement();
00113 
00114 protected:
00115 private:
00116 };
00117 } // namespace itk
00118 
00119 // Define instantiation macro for this template.
00120 #define ITK_TEMPLATE_BinaryBallStructuringElement(_, EXPORT, TypeX, TypeY)     \
00121   namespace itk                                                                \
00122   {                                                                            \
00123   _( 2 ( class EXPORT BinaryBallStructuringElement< ITK_TEMPLATE_2 TypeX > ) ) \
00124   namespace Templates                                                          \
00125   {                                                                            \
00126   typedef BinaryBallStructuringElement< ITK_TEMPLATE_2 TypeX >                 \
00127   BinaryBallStructuringElement##TypeY;                                       \
00128   }                                                                            \
00129   }
00130 
00131 #if ITK_TEMPLATE_EXPLICIT
00132 #include "Templates/itkBinaryBallStructuringElement+-.h"
00133 #endif
00134 
00135 #if ITK_TEMPLATE_TXX
00136 #include "itkBinaryBallStructuringElement.hxx"
00137 #endif
00138 
00139 #endif
00140