KWStyle - itkNeighborhoodOperatorImageFunction.txx
 
Matrix View
Description

1 /*=========================================================================
2
3   Program:   Insight Segmentation & Registration Toolkit
4   Module:    $RCSfile: itkNeighborhoodOperatorImageFunction.txx.html,v $
5   Language:  C++
6   Date:      $Date: 2006/01/17 19:15:42 $
7   Version:   $Revision: 1.4 $
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 DEF #ifndef _itkNeighborhoodOperatorImageFunction_txx
18 DEF #define _itkNeighborhoodOperatorImageFunction_txx
19
20 #include "itkNeighborhoodOperatorImageFunction.h"
21
22 #include "itkNeighborhoodInnerProduct.h"
23 #include "itkConstNeighborhoodIterator.h"
24
25 namespace itk
26 {
27
28 /** Set the Input Image */
29 template <class TInputImage,class TOutput>
30 NeighborhoodOperatorImageFunction<TInputImage,TOutput>
31 ::NeighborhoodOperatorImageFunction()
32 {
33 }
34
35 /** Print self method */
36 template <class TInputImage,class TOutput>
37 void
38 NeighborhoodOperatorImageFunction<TInputImage,TOutput>
39 ::PrintSelf(std::ostream& os, Indent indent) const
40 {
41   this->Superclass::PrintSelf(os,indent);
42   os << indent << "Applying Operator Function:" << std::endl;
43 }
44
45 /** Evaluate the function at the specifed point */
46 template <class TInputImage,class TOutput>
47 TOutput
48 NeighborhoodOperatorImageFunction<TInputImage,TOutput>
49 ::EvaluateAtIndex(const IndexType& index) const
50 {
51   NeighborhoodInnerProduct<InputImageType,TOutput,TOutput> smartInnerProduct;
52   ConstNeighborhoodIterator<InputImageType> bit;
53 LEN   bit = ConstNeighborhoodIterator<InputImageType>(m_Operator.GetRadius(),this->GetInputImage(),this->GetInputImage()->GetRequestedRegion());
54   bit.SetLocation(index);
55   
56   return smartInnerProduct(bit, m_Operator);
57 }
58
59
60 EML
61 // namespace itk
62
63 #endif
64

Generated by KWStyle 1.0b on Tuesday January,17 at 02:14:27PM
© Kitware Inc.