ITK  5.0.0
Insight Segmentation and Registration Toolkit
itkBinaryDilateParaImageFilter.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 itkBinaryDilateParaImageFilter_h
19 #define itkBinaryDilateParaImageFilter_h
20 
23 
24 namespace itk
25 {
66 template< typename TInputImage,
67  typename TOutputImage = TInputImage >
68 class ITK_EXPORT BinaryDilateParaImageFilter:
69  public ImageToImageFilter< TInputImage, TOutputImage >
70 
71 {
72 public:
73  ITK_DISALLOW_COPY_AND_ASSIGN(BinaryDilateParaImageFilter);
74 
80 
82  itkNewMacro(Self);
83 
86 
88  using InputImageType = TInputImage;
89  using OutputImageType = TOutputImage;
90  using PixelType = typename TInputImage::PixelType;
93  using OutputPixelType = typename TOutputImage::PixelType;
94 
96  using InputImagePointer = typename TInputImage::Pointer;
97  using InputImageConstPointer = typename TInputImage::ConstPointer;
98 
100  // perhaps a bit dodgy, change to int if you want to do enormous
101  // binary operations
102  using InternalIntType = short;
103 
105  static constexpr unsigned int ImageDimension = TInputImage::ImageDimension;
106 
108 
109  void SetRadius(ScalarRealType radius);
110 
111  itkSetMacro(Radius, RadiusType);
112  itkGetConstReferenceMacro(Radius, RadiusType);
113 
114  void Modified() const override;
115 
116  void SetUseImageSpacing(bool g)
117  {
118  m_RectPara->SetUseImageSpacing(g);
119  m_CircPara->SetUseImageSpacing(g);
120  }
121 
126  itkSetMacro(Circular, bool);
127  itkGetConstReferenceMacro(Circular, bool);
128  itkBooleanMacro(Circular);
129 
132  /* add in the traits here */
133 protected:
134  void GenerateData(void) override;
135 
138  void PrintSelf(std::ostream & os, Indent indent) const override;
139 
146 private:
149 
150  typename CircParabolicType::Pointer m_CircPara;
151  typename CCastType::Pointer m_CircCast;
152 
153  typename RectParabolicType::Pointer m_RectPara;
154  typename RCastType::Pointer m_RectCast;
155 };
156 } // end namespace itk
157 
158 #ifndef ITK_MANUAL_INSTANTIATION
159 #include "itkBinaryDilateParaImageFilter.hxx"
160 #endif
161 
162 #endif //__itkBinaryDilateParaImageFilter_h
typename NumericTraits< PixelType >::RealType RealType
typename TInputImage::PixelType PixelType
typename itk::Image< InternalIntType, InputImageType::ImageDimension > InternalIntImageType
Define numeric traits for std::vector.
typename NumericTraits< PixelType >::FloatType InternalRealType
The base class for all process objects (source, filters, mappers) in the Insight data processing pipe...
typename itk::ParabolicDilateImageFilter< TInputImage, InternalRealImageType > RectParabolicType
Base class for all process objects that output image data.
typename itk::FixedArray< ScalarRealType, TInputImage::ImageDimension > RadiusType
typename TOutputImage::PixelType OutputPixelType
typename itk::ParabolicDilateImageFilter< TInputImage, InternalRealImageType > CircParabolicType
typename itk::BinaryThresholdImageFilter< InternalRealImageType, OutputImageType > CCastType
Binarize an input image by thresholding.
typename InputImageType::Pointer InputImagePointer
Class for morphological dilation operations with parabolic structuring elements.
typename itk::Image< InternalRealType, InputImageType::ImageDimension > InternalRealImageType
typename itk::BinaryThresholdImageFilter< InternalRealImageType, OutputImageType > RCastType
TOutputImage OutputImageType
typename NumericTraits< PixelType >::ScalarRealType ScalarRealType
Class for binary morphological erosion operation.
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
typename InputImageType::ConstPointer InputImageConstPointer
Templated n-dimensional image class.
Definition: itkImage.h:75