ITK  4.6.0
Insight Segmentation and Registration Toolkit
itkAnchorOpenCloseImageFilter.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 __itkAnchorOpenCloseImageFilter_h
19 #define __itkAnchorOpenCloseImageFilter_h
20 
21 #include "itkKernelImageFilter.h"
22 #include "itkProgressReporter.h"
23 #include "itkAnchorOpenCloseLine.h"
25 #include "itkBresenhamLine.h"
26 
27 namespace itk
28 {
50 template< typename TImage, typename TKernel, typename TCompare1, typename TCompare2 >
52  public KernelImageFilter< TImage, TImage, TKernel >
53 {
54 public:
55 
62 
66  typedef TKernel KernelType;
67  typedef typename KernelType::LType KernelLType;
68 
69  typedef TImage InputImageType;
70  typedef typename InputImageType::Pointer InputImagePointer;
71  typedef typename InputImageType::ConstPointer InputImageConstPointer;
72  typedef typename InputImageType::RegionType InputImageRegionType;
73  typedef typename InputImageType::PixelType InputImagePixelType;
74 
76  itkStaticConstMacro(InputImageDimension, unsigned int,
77  TImage::ImageDimension);
78  itkStaticConstMacro(OutputImageDimension, unsigned int,
79  TImage::ImageDimension);
81 
83  itkNewMacro(Self);
84 
86  itkTypeMacro(AnchorOpenCloseImageFilter,
88 
89 protected:
92  void PrintSelf(std::ostream & os, Indent indent) const;
93 
95  void ThreadedGenerateData(const InputImageRegionType & outputRegionForThread,
96  ThreadIdType threadId);
97 
100 
101 private:
102  AnchorOpenCloseImageFilter(const Self &); //purposely not implemented
103  void operator=(const Self &); //purposely not implemented
104 
107 
108  // the class that operates on lines -- does the opening in one
109  // operation. The classes following are named on the assumption that
110  // we are doing an opening
111 
112 // typedef AnchorOpenCloseLine<InputImagePixelType, THistogramCompare,
113 // TFunction1, TFunction2> AnchorLineOpenType;
115 
117 
118  // the class that does the dilation
120 
122  InputImagePointer output,
123  InputImagePixelType border,
124  KernelLType line,
125  AnchorLineOpenType & AnchorLineOpen,
126  const BresOffsetArray LineOffsets,
127  std::vector<InputImagePixelType> & outbuffer,
128  const InputImageRegionType AllImage,
129  const InputImageRegionType face);
130 }; // end of class
131 } // end namespace itk
132 
133 #ifndef ITK_MANUAL_INSTANTIATION
134 #include "itkAnchorOpenCloseImageFilter.hxx"
135 #endif
136 
137 #endif
BresenhamLine< itkGetStaticConstMacro(InputImageDimension) > BresType
InputImageType::RegionType InputImageRegionType
InputImageType::ConstPointer InputImageConstPointer
InputImageType::ConstPointer InputImageConstPointer
AnchorErodeDilateLine< InputImagePixelType, TCompare2 > AnchorLineDilateType
InputImageType::Pointer InputImagePointer
AnchorOpenCloseLine< InputImagePixelType, TCompare1 > AnchorLineOpenType
KernelImageFilter< TImage, TImage, TKernel > Superclass
AnchorErodeDilateLine< InputImagePixelType, TCompare1 > AnchorLineErodeType
Base class for all process objects that output image data.
void DoFaceOpen(InputImageConstPointer input, InputImagePointer output, InputImagePixelType border, KernelLType line, AnchorLineOpenType &AnchorLineOpen, const BresOffsetArray LineOffsets, std::vector< InputImagePixelType > &outbuffer, const InputImageRegionType AllImage, const InputImageRegionType face)
void PrintSelf(std::ostream &os, Indent indent) const
class to implement openings and closings using anchor methods.
InputImageType::RegionType InputImageRegionType
A base class for all the filters working on an arbitrary shaped neighborhood.
static const unsigned int OutputImageDimension
void ThreadedGenerateData(const InputImageRegionType &outputRegionForThread, ThreadIdType threadId)
InputImageType::PixelType InputImagePixelType
class to implement openings and closings using anchor methods. This is the base class that must be in...
Control indentation during Print() invocation.
Definition: itkIndent.h:49
std::vector< OffsetType > OffsetArray
void operator=(const Self &)
unsigned int ThreadIdType
Definition: itkIntTypes.h:159
class to implement erosions and dilations using anchor methods. This is the base class that must be i...