ITK  4.13.0
Insight Segmentation and Registration Toolkit
itkDoubleThresholdImageFilter.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 itkDoubleThresholdImageFilter_h
19 #define itkDoubleThresholdImageFilter_h
20 
21 #include "itkImageToImageFilter.h"
22 
23 namespace itk
24 {
53 template< typename TInputImage, typename TOutputImage >
54 class ITK_TEMPLATE_EXPORT DoubleThresholdImageFilter:
55  public ImageToImageFilter< TInputImage, TOutputImage >
56 {
57 public:
63 
65  itkNewMacro(Self);
66 
69 
71  typedef typename Superclass::InputImagePointer InputImagePointer;
72  typedef typename Superclass::InputImageType InputImageType;
73 
75  typedef typename TInputImage::PixelType InputPixelType;
76  typedef typename TOutputImage::PixelType OutputPixelType;
77 
80  itkSetMacro(OutsideValue, OutputPixelType);
81 
83  itkGetConstMacro(OutsideValue, OutputPixelType);
84 
87  itkSetMacro(InsideValue, OutputPixelType);
88 
90  itkGetConstMacro(InsideValue, OutputPixelType);
91 
97  itkSetMacro(Threshold1, InputPixelType);
98  itkSetMacro(Threshold2, InputPixelType);
99  itkSetMacro(Threshold3, InputPixelType);
100  itkSetMacro(Threshold4, InputPixelType);
102 
104  itkGetConstMacro(Threshold1, InputPixelType);
105  itkGetConstMacro(Threshold2, InputPixelType);
106  itkGetConstMacro(Threshold3, InputPixelType);
107  itkGetConstMacro(Threshold4, InputPixelType);
109 
116  itkSetMacro(FullyConnected, bool);
117  itkGetConstReferenceMacro(FullyConnected, bool);
118  itkBooleanMacro(FullyConnected);
120 
121 #ifdef ITK_USE_CONCEPT_CHECKING
122  // Begin concept checking
123  itkConceptMacro( OutputEqualityComparableCheck,
125  itkConceptMacro( InputComparableCheck,
127  itkConceptMacro( InputOStreamWritableCheck,
129  itkConceptMacro( OutputOStreamWritableCheck,
131  // End concept checking
132 #endif
133 
134 protected:
136  virtual ~DoubleThresholdImageFilter() ITK_OVERRIDE {}
137  void PrintSelf(std::ostream & os, Indent indent) const ITK_OVERRIDE;
138 
141  void GenerateInputRequestedRegion() ITK_OVERRIDE;
142 
145  void EnlargeOutputRequestedRegion( DataObject *itkNotUsed(output) ) ITK_OVERRIDE;
146 
150  void GenerateData() ITK_OVERRIDE;
151 
152 private:
153  ITK_DISALLOW_COPY_AND_ASSIGN(DoubleThresholdImageFilter);
154 
155  InputPixelType m_Threshold1;
156  InputPixelType m_Threshold2;
157  InputPixelType m_Threshold3;
158  InputPixelType m_Threshold4;
159 
160  OutputPixelType m_InsideValue;
162 
163  unsigned long m_NumberOfIterationsUsed;
164 
165  bool m_FullyConnected;
166 };
167 } // end namespace itk
168 
169 #ifndef ITK_MANUAL_INSTANTIATION
170 #include "itkDoubleThresholdImageFilter.hxx"
171 #endif
172 
173 #endif
Base class for all process objects that output image data.
Superclass::InputImagePointer InputImagePointer
TOutput m_OutsideValue
Base class for filters that take an image as input and produce an image as output.
Control indentation during Print() invocation.
Definition: itkIndent.h:49
ImageToImageFilter< TInputImage, TOutputImage > Superclass
#define itkConceptMacro(name, concept)
Binarize an input image using double thresholding.
Base class for all data objects in ITK.