ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBinaryErodeParaImageFilter.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 itkBinaryErodeParaImageFilter_h
19 #define itkBinaryErodeParaImageFilter_h
20 
23 
24 namespace itk
25 {
67 template< typename TInputImage,
68  typename TOutputImage = TInputImage >
69 class ITK_EXPORT BinaryErodeParaImageFilter:
70  public ImageToImageFilter< TInputImage, TOutputImage >
71 
72 {
73 public:
74  ITK_DISALLOW_COPY_AND_ASSIGN(BinaryErodeParaImageFilter);
75 
81 
83  itkNewMacro(Self);
84 
87 
89  using InputImageType = TInputImage;
90  using OutputImageType = TOutputImage;
91  using PixelType = typename TInputImage::PixelType;
94  using OutputPixelType = typename TOutputImage::PixelType;
95 
97  using InputImagePointer = typename TInputImage::Pointer;
98  using InputImageConstPointer = typename TInputImage::ConstPointer;
99 
101  // perhaps a bit dodgy, change to int if you want to do enormous
102  // binary operations
103  using InternalIntType = short;
104 
106  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
107 
109 
110  void SetRadius(ScalarRealType radius);
111 
112  itkSetMacro(Radius, RadiusType);
113  itkGetConstReferenceMacro(Radius, RadiusType);
114 
115  void SetUseImageSpacing(bool g)
116  {
117  m_RectPara->SetUseImageSpacing(g);
118  m_CircPara->SetUseImageSpacing(g);
119  }
120 
125  itkSetMacro(Circular, bool);
126  itkGetConstReferenceMacro(Circular, bool);
127  itkBooleanMacro(Circular);
128 
131  /* add in the traits here */
132  void Modified() const override;
133 
134 protected:
135  void GenerateData(void) override;
136 
139  void PrintSelf(std::ostream & os, Indent indent) const override;
140 
147 private:
150 
151  typename CircParabolicType::Pointer m_CircPara;
152  typename CCastType::Pointer m_CircCast;
153 
154  typename RectParabolicType::Pointer m_RectPara;
155  typename RCastType::Pointer m_RectCast;
156 };
157 } // end namespace itk
158 
159 #ifndef ITK_MANUAL_INSTANTIATION
160 #include "itkBinaryErodeParaImageFilter.hxx"
161 #endif
162 
163 #endif //__itkBinaryErodeParaImageFilter_h
typename itk::ParabolicErodeImageFilter< TInputImage, InternalRealImageType > CircParabolicType
typename NumericTraits< PixelType >::ScalarRealType ScalarRealType
Define numeric traits for std::vector.
typename NumericTraits< PixelType >::FloatType InternalRealType
typename itk::ParabolicErodeImageFilter< TInputImage, InternalIntImageType > RectParabolicType
typename TInputImage::PixelType PixelType
typename itk::GreaterEqualValImageFilter< InternalIntImageType, OutputImageType > RCastType
Class for binary morphological erosion operation.
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
Class for morphological erosion operations with parabolic structuring elements.
Base class for all process objects that output image data.
typename itk::GreaterEqualValImageFilter< InternalRealImageType, OutputImageType > CCastType
typename itk::Image< InternalIntType, InputImageType::ImageDimension > InternalIntImageType
typename itk::Image< InternalRealType, InputImageType::ImageDimension > InternalRealImageType
typename InputImageType::Pointer InputImagePointer
Computes the absolute difference between an image and a constant. Can be done with ShiftScale and Abs...
TOutputImage OutputImageType
typename NumericTraits< PixelType >::RealType RealType
Base class for filters that take an image as input and produce an image as output.
typename TOutputImage::PixelType OutputPixelType
typename itk::FixedArray< ScalarRealType, TInputImage::ImageDimension > RadiusType
Control indentation during Print() invocation.
Definition: itkIndent.h:49
typename InputImageType::ConstPointer InputImageConstPointer
Templated n-dimensional image class.
Definition: itkImage.h:75