ITK  4.8.0
Insight Segmentation and Registration Toolkit
itkImageBoundaryCondition.h
Go to the documentation of this file.
1 /*=========================================================================
2  *
3  * Copyright Insight Software Consortium
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0.txt
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *=========================================================================*/
18 #ifndef itkImageBoundaryCondition_h
19 #define itkImageBoundaryCondition_h
20 
21 #include "itkIndex.h"
22 #include "itkNeighborhood.h"
23 #include "itkImageRegion.h"
24 
25 namespace itk
26 {
51 template< typename TInputImage, typename TOutputImage = TInputImage >
53 {
54 public:
55 
57  itkStaticConstMacro(ImageDimension, unsigned int,
58  TInputImage::ImageDimension);
59 
62 
64  typedef typename TInputImage::PixelType PixelType;
65  typedef typename TInputImage::InternalPixelType * PixelPointerType;
66  typedef typename TOutputImage::PixelType OutputPixelType;
72 
75  itkGetStaticConstMacro(ImageDimension) > NeighborhoodType;
76 
78  typedef typename TInputImage::NeighborhoodAccessorFunctorType
80 
83 
85  virtual const char * GetNameOfClass() const
86  {
87  return "itkImageBoundaryCondition";
88  }
89 
91  virtual void Print( std::ostream & os, Indent i = 0 ) const
92  {
93  os << i << this->GetNameOfClass() << " (" << this << ")" << std::endl;
94  }
95 
100  virtual OutputPixelType operator()(const OffsetType & point_index,
101  const OffsetType & boundary_offset,
102  const NeighborhoodType *data) const = 0;
103 
106  virtual OutputPixelType operator()(
107  const OffsetType & point_index,
108  const OffsetType & boundary_offset,
109  const NeighborhoodType *data,
110  const NeighborhoodAccessorFunctorType & neighborhoodAccessorFunctor) const = 0;
111 
113 
120  virtual bool RequiresCompleteNeighborhood() { return true; }
121 
131  virtual RegionType GetInputRequestedRegion( const RegionType & inputLargestPossibleRegion,
132  const RegionType & outputRequestedRegion ) const
133  {
134  (void) outputRequestedRegion;
135  return inputLargestPossibleRegion;
136  }
138 
147  virtual OutputPixelType GetPixel( const IndexType & index,
148  const TInputImage * image ) const = 0;
149 
150 };
151 } // end namespace itk
152 
153 #endif
static const unsigned int ImageDimension
virtual const char * GetNameOfClass() const
virtual OutputPixelType GetPixel(const IndexType &index, const TInputImage *image) const =0
Represent the offset between two n-dimensional indexes in a n-dimensional image.
Definition: itkOffset.h:55
virtual RegionType GetInputRequestedRegion(const RegionType &inputLargestPossibleRegion, const RegionType &outputRequestedRegion) const
A light-weight container object for storing an N-dimensional neighborhood of values.
Neighborhood< PixelPointerType, itkGetStaticConstMacro(ImageDimension) > NeighborhoodType
An image region represents a structured region of data.
Index< itkGetStaticConstMacro(ImageDimension) > IndexType
TInputImage::NeighborhoodAccessorFunctorType NeighborhoodAccessorFunctorType
ImageRegion< itkGetStaticConstMacro(ImageDimension) > RegionType
virtual OutputPixelType operator()(const OffsetType &point_index, const OffsetType &boundary_offset, const NeighborhoodType *data) const =0
virtual void Print(std::ostream &os, Indent i=0) const
A virtual base object that defines an interface to a class of boundary condition objects for use by n...
Size< itkGetStaticConstMacro(ImageDimension) > SizeType
TInputImage::InternalPixelType * PixelPointerType
Offset< itkGetStaticConstMacro(ImageDimension) > OffsetType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
TOutputImage::PixelType OutputPixelType