Orfeo Toolbox  3.16
itkDilateObjectMorphologyImageFilter.txx
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Insight Segmentation & Registration Toolkit
4  Module: $RCSfile: itkDilateObjectMorphologyImageFilter.txx,v $
5  Language: C++
6  Date: $Date: 2009-04-28 14:36:19 $
7  Version: $Revision: 1.6 $
8 
9  Copyright (c) Insight Software Consortium. All rights reserved.
10  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
11 
12  This software is distributed WITHOUT ANY WARRANTY; without even
13  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14  PURPOSE. See the above copyright notices for more information.
15 
16 =========================================================================*/
17 #ifndef __itkDilateObjectMorphologyImageFilter_txx
18 #define __itkDilateObjectMorphologyImageFilter_txx
19 
21 
22 namespace itk {
23 
24 template<class TInputImage, class TOutputImage, class TKernel>
27 {
28  m_DilateBoundaryCondition.SetConstant(
29  NumericTraits<PixelType>::NonpositiveMin() );
30  this->OverrideBoundaryCondition( &m_DilateBoundaryCondition );
31 
32 }
33 
34 
35 template<class TInputImage, class TOutputImage, class TKernel>
36 void
39 {
40  unsigned int i;
41  KernelIteratorType kernel_it;
42  const KernelIteratorType kernelEnd = kernel.End();
43 
44  bool valid = true;
45  for( i=0, kernel_it=kernel.Begin(); kernel_it<kernelEnd; ++kernel_it, ++i )
46  {
47  if( *kernel_it > NumericTraits< KernelPixelType >::Zero )
48  {
49  nit.SetPixel(i, this->GetObjectValue(), valid);
50  }
51  }
52 }
53 
54 template<class TInputImage, class TOutputImage, class TKernel>
55 void
57 ::PrintSelf(std::ostream &os, Indent indent) const
58 {
59  Superclass::PrintSelf(os, indent);
60 }
61 
62 }// end namespace itk
63 #endif

Generated at Sat Feb 2 2013 23:35:18 for Orfeo Toolbox with doxygen 1.8.1.1