ITK 6.0.0
Insight Toolkit
 
Loading...
Searching...
No Matches
itkIsolatedWatershedImageFilter.h
Go to the documentation of this file.
1/*=========================================================================
2 *
3 * Copyright NumFOCUS
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 * https://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 itkIsolatedWatershedImageFilter_h
19#define itkIsolatedWatershedImageFilter_h
20
23
24namespace itk
25{
40
41template <typename TInputImage, typename TOutputImage>
42class ITK_TEMPLATE_EXPORT IsolatedWatershedImageFilter : public ImageToImageFilter<TInputImage, TOutputImage>
43{
44public:
45 ITK_DISALLOW_COPY_AND_MOVE(IsolatedWatershedImageFilter);
46
52
54 itkNewMacro(Self);
55
57 itkOverrideGetNameOfClassMacro(IsolatedWatershedImageFilter);
58
59 using InputImageType = TInputImage;
60 using InputImagePointer = typename InputImageType::Pointer;
61 using InputImageConstPointer = typename InputImageType::ConstPointer;
62 using InputImageRegionType = typename InputImageType::RegionType;
63 using InputImagePixelType = typename InputImageType::PixelType;
64 using IndexType = typename InputImageType::IndexType;
65 using SizeType = typename InputImageType::SizeType;
66
67 using OutputImageType = TOutputImage;
68 using OutputImagePointer = typename OutputImageType::Pointer;
69 using OutputImageRegionType = typename OutputImageType::RegionType;
70 using OutputImagePixelType = typename OutputImageType::PixelType;
71
74
77 void
78 PrintSelf(std::ostream & os, Indent indent) const override;
79
83 itkSetMacro(Seed1, IndexType);
84 itkGetConstMacro(Seed1, IndexType);
86
90 itkSetMacro(Seed2, IndexType);
91 itkGetConstMacro(Seed2, IndexType);
93
95 itkSetMacro(Threshold, double);
96 itkGetConstMacro(Threshold, double);
98
101 itkSetMacro(IsolatedValueTolerance, double);
102 itkGetConstMacro(IsolatedValueTolerance, double);
104
107 itkSetMacro(UpperValueLimit, double);
108 itkGetConstMacro(UpperValueLimit, double);
110
114 itkSetMacro(ReplaceValue1, OutputImagePixelType);
115 itkGetConstMacro(ReplaceValue1, OutputImagePixelType);
116 itkSetMacro(ReplaceValue2, OutputImagePixelType);
117 itkGetConstMacro(ReplaceValue2, OutputImagePixelType);
119
121 itkGetConstMacro(IsolatedValue, double);
122
123protected:
125 ~IsolatedWatershedImageFilter() override = default;
128
131
133
135
136 double m_Threshold{};
140
141 // Override since the filter needs all the data for the algorithm
142 void
144
145 // Override since the filter produces the entire dataset
146 void
148
149 void
150 VerifyInputInformation() const override;
151 void
152 GenerateData() override;
153};
154} // end namespace itk
155
156#ifndef ITK_MANUAL_INSTANTIATION
157# include "itkIsolatedWatershedImageFilter.hxx"
158#endif
159
160#endif
Base class for all data objects in ITK.
Computes the gradient magnitude of an image region at each pixel.
Templated n-dimensional image class.
Definition itkImage.h:89
Control indentation during Print() invocation.
Definition itkIndent.h:50
void EnlargeOutputRequestedRegion(DataObject *output) override
typename InputImageType::PixelType InputImagePixelType
typename InputImageType::ConstPointer InputImageConstPointer
~IsolatedWatershedImageFilter() override=default
typename InputImageType::Pointer InputImagePointer
typename InputImageType::RegionType InputImageRegionType
typename OutputImageType::Pointer OutputImagePointer
void VerifyInputInformation() const override
Verifies that the input images occupy the same physical space and the each index is at the same physi...
typename InputImageType::SizeType SizeType
GradientMagnitudeType::Pointer m_GradientMagnitude
Image< RealPixelType, TInputImage::ImageDimension > RealImageType
typename OutputImageType::RegionType OutputImageRegionType
typename InputImageType::IndexType IndexType
void PrintSelf(std::ostream &os, Indent indent) const override
WatershedImageFilter< RealImageType > WatershedType
GradientMagnitudeImageFilter< InputImageType, RealImageType > GradientMagnitudeType
typename OutputImageType::PixelType OutputImagePixelType
typename NumericTraits< InputImagePixelType >::RealType RealPixelType
void GenerateInputRequestedRegion() override
ImageToImageFilter< TInputImage, TOutputImage > Superclass
Implements transparent reference counting.
A low-level image analysis algorithm that automatically produces a hierarchy of segmented,...
The "itk" namespace contains all Insight Segmentation and Registration Toolkit (ITK) classes....