ITK  4.4.0
Insight Segmentation and Registration Toolkit
itkMaskedRankImageFilter.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 __itkMaskedRankImageFilter_h
19 #define __itkMaskedRankImageFilter_h
20 
22 #include <list>
23 #include <map>
24 #include <set>
25 #include "itkRankHistogram.h"
27 
28 namespace itk
29 {
64 template< class TInputImage, class TMaskImage, class TOutputImage, class TKernel =
65  FlatStructuringElement< TInputImage::ImageDimension > >
66 class ITK_EXPORT MaskedRankImageFilter:
67  public MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel,
68  Function::RankHistogram< typename TInputImage::PixelType > >
69 {
70 public:
73  typedef MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel,
75 
78 
80  itkNewMacro(Self);
81 
83  itkTypeMacro(MaskedRankImageFilter,
85 
87  typedef TInputImage InputImageType;
88  typedef TOutputImage OutputImageType;
89  typedef typename TInputImage::RegionType RegionType;
90  typedef typename TInputImage::SizeType SizeType;
91  typedef typename TInputImage::IndexType IndexType;
92  typedef typename TInputImage::PixelType PixelType;
93  typedef typename TInputImage::OffsetType OffsetType;
94  typedef typename Superclass::OutputImageRegionType OutputImageRegionType;
95  typedef typename TOutputImage::PixelType OutputPixelType;
96  typedef typename TInputImage::PixelType InputPixelType;
97 
98  typedef typename Superclass::HistogramType HistogramType;
99 
101  itkStaticConstMacro(ImageDimension, unsigned int,
102  TInputImage::ImageDimension);
103 
105  typedef TKernel KernelType;
106 
108  typedef typename KernelType::ConstIterator KernelIteratorType;
109 
111  typedef typename KernelType::SizeType RadiusType;
112 
113  itkSetMacro(Rank, float)
114  itkGetConstMacro(Rank, float)
115 
116  bool GetUseVectorBasedAlgorithm()
117  {
118  return HistogramType::UseVectorBasedAlgorithm();
119  }
120 
121 protected:
124 
125  void PrintSelf(std::ostream & os, Indent indent) const;
126 
127  void ConfigureHistogram( HistogramType & histogram );
128 
129 private:
130  MaskedRankImageFilter(const Self &); //purposely not implemented
131  void operator=(const Self &); //purposely not implemented
132 
133  float m_Rank;
134 }; // end of class
135 } // end namespace itk
136 
137 #ifndef ITK_MANUAL_INSTANTIATION
138 #include "itkMaskedRankImageFilter.hxx"
139 #endif
140 
141 #endif
142