ITK  4.0.0
Insight Segmentation and Registration Toolkit
itkBinaryCrossStructuringElement.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 __itkBinaryCrossStructuringElement_h
00019 #define __itkBinaryCrossStructuringElement_h
00020 
00021 #include "itkNeighborhood.h"
00022 
00023 namespace itk
00024 {
00044 template< class TPixel, unsigned int VDimension = 2,
00045           class TAllocator = NeighborhoodAllocator< TPixel > >
00046 class ITK_EXPORT BinaryCrossStructuringElement:
00047   public Neighborhood< TPixel, VDimension, TAllocator >
00048 {
00049 public:
00051   typedef BinaryCrossStructuringElement                  Self;
00052   typedef Neighborhood< TPixel, VDimension, TAllocator > Superclass;
00053 
00055   typedef TAllocator AllocatorType;
00056 
00058   itkStaticConstMacro(NeighborhoodDimension, unsigned int, VDimension);
00059 
00061   typedef TPixel PixelType;
00062 
00066   typedef typename AllocatorType::iterator       Iterator;
00067   typedef typename AllocatorType::const_iterator ConstIterator;
00068 
00070   typedef typename Superclass::SizeType      SizeType;
00071   typedef typename Superclass::SizeValueType SizeValueType;
00072 
00074   typedef typename Superclass::OffsetType      OffsetType;
00075   typedef typename OffsetType::OffsetValueType OffsetValueType;
00076 
00078   typedef typename Superclass::RadiusType RadiusType;
00079 
00081   typedef SliceIterator< TPixel, Self > SliceIteratorType;
00082 
00084   BinaryCrossStructuringElement() {}
00085 
00087   virtual ~BinaryCrossStructuringElement() {}
00088 
00090   BinaryCrossStructuringElement(const Self & other):
00091     Neighborhood< TPixel, VDimension, TAllocator >(other)
00092   {}
00093 
00095   Self & operator=(const Self & other)
00096   {
00097     Superclass::operator=(other);
00098     return *this;
00099   }
00101 
00103   void CreateStructuringElement();
00104 
00105 protected:
00106 private:
00107 };
00108 } // namespace itk
00109 
00110 // Define instantiation macro for this template.
00111 #define ITK_TEMPLATE_BinaryCrossStructuringElement(_, EXPORT, TypeX, TypeY)     \
00112   namespace itk                                                                 \
00113   {                                                                             \
00114   _( 2 ( class EXPORT BinaryCrossStructuringElement< ITK_TEMPLATE_2 TypeX > ) ) \
00115   namespace Templates                                                           \
00116   {                                                                             \
00117   typedef BinaryCrossStructuringElement< ITK_TEMPLATE_2 TypeX >                 \
00118   BinaryCrossStructuringElement##TypeY;                                       \
00119   }                                                                             \
00120   }
00121 
00122 #if ITK_TEMPLATE_EXPLICIT
00123 #include "Templates/itkBinaryCrossStructuringElement+-.h"
00124 #endif
00125 
00126 #if ITK_TEMPLATE_TXX
00127 #include "itkBinaryCrossStructuringElement.hxx"
00128 #endif
00129 
00130 #endif
00131