ITK
4.1.0
Insight Segmentation and Registration Toolkit
|
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 __itkVectorNeighborhoodInnerProduct_h 00019 #define __itkVectorNeighborhoodInnerProduct_h 00020 00021 #include "itkNeighborhoodIterator.h" 00022 #include "itkVector.h" 00023 #include "itkConstSliceIterator.h" 00024 #include "itkImageBoundaryCondition.h" 00025 00026 namespace itk 00027 { 00044 template< class TImage > 00045 class ITK_EXPORT VectorNeighborhoodInnerProduct 00046 { 00047 public: 00049 typedef VectorNeighborhoodInnerProduct Self; 00050 00051 itkStaticConstMacro(ImageDimension, unsigned int, TImage::ImageDimension); 00052 00055 typedef typename TImage::PixelType PixelType; 00056 typedef typename PixelType::ValueType ScalarValueType; 00057 typedef Neighborhood< PixelType, itkGetStaticConstMacro(ImageDimension) > 00058 NeighborhoodType; 00059 00062 itkStaticConstMacro(VectorDimension, unsigned int, 00063 PixelType::Dimension); 00064 00066 typedef Neighborhood< ScalarValueType, 00067 itkGetStaticConstMacro(ImageDimension) > OperatorType; 00068 00070 PixelType operator()(const std::slice & s, 00071 const ConstNeighborhoodIterator< TImage > & it, 00072 const OperatorType & op) const; 00073 00075 PixelType operator()(const ConstNeighborhoodIterator< TImage > & it, 00076 const OperatorType & op) const 00077 { 00078 return this->operator()(std::slice(0, it.Size(), 1), it, op); 00079 } 00080 00081 PixelType operator()(const std::slice & s, const NeighborhoodType & N, 00082 const OperatorType & op) const; 00083 }; 00084 } // end namespace itk 00085 00086 #ifndef ITK_MANUAL_INSTANTIATION 00087 #include "itkVectorNeighborhoodInnerProduct.hxx" 00088 #endif 00089 00090 #endif 00091