ITK  4.8.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< typename TInputImage, typename TMaskImage, typename TOutputImage, typename TKernel =
65  FlatStructuringElement< TInputImage::ImageDimension > >
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;
95  typedef typename TOutputImage::PixelType OutputPixelType;
96  typedef typename TInputImage::PixelType InputPixelType;
97 
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 
117  {
118  return HistogramType::UseVectorBasedAlgorithm();
119  }
120 
121 protected:
124 
125  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
126 
127  void ConfigureHistogram( HistogramType & histogram ) ITK_OVERRIDE;
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
Superclass::OutputImageRegionType OutputImageRegionType
MaskedMovingHistogramImageFilter< TInputImage, TMaskImage, TOutputImage, TKernel, Function::RankHistogram< typename TInputImage::PixelType > > Superclass
TInputImage::IndexType IndexType
TInputImage::OffsetType OffsetType
Implements a generic moving histogram algorithm.
Base class for all process objects that output image data.
static const unsigned int ImageDimension
Superclass::HistogramType HistogramType
TInputImage::PixelType PixelType
TInputImage::RegionType RegionType
void ConfigureHistogram(HistogramType &histogram) override
TOutputImage::PixelType OutputPixelType
Superclass::OutputImageRegionType OutputImageRegionType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
void operator=(const Self &)
KernelType::ConstIterator KernelIteratorType
SmartPointer< const Self > ConstPointer
Rank filter of a greyscale image.
void PrintSelf(std::ostream &os, Indent indent) const override
TInputImage::PixelType InputPixelType